This commit was manufactured by cvs2svn to create branch 'dv_xs_v1'.

git-svn-id: https://svn.apache.org/repos/asf/xerces/java/branches/dv_xs_v1@318077 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ISSUES b/ISSUES
deleted file mode 100644
index 60b2a20..0000000
--- a/ISSUES
+++ /dev/null
@@ -1,39 +0,0 @@
-*** UNRESOLVED ***
-
-1. Naming
- 1.1. XNI package names and content. Drop the XNI prefix?
-
-2. Dependencies
- 2.2. Java version
-
-3. APIs
- 3.2. Parser configuration
-  3.2.1. Filters
- 3.3. Buffer management
-  3.3.1. To transcode or not to transcode
-
-4. Layering and Packaging
- 4.1. Core vs. optional modules (dependencies?)
- 4.2. How to deal with community donations
-
-5. Website and Documentation
- 5.1. Continue to use Stylebook? plain HTML?
-
-*** DEFERRED ***
-
-*** RESOLVED ***
-
-2. Dependencies
- 2.1. APIs: DOM, SAX, etc.
-      Resolution: SAX dependence removed from XNI
-3. APIs
- 3.1. DTD handlers
-  3.1.1. Separate or combined?
-         Resolution: Separate.
-  3.1.2. Which methods are needed?
-         Resolution: Modification to content model callbacks
-                     so that start/endEntity is more useful.
- 3.2. Parser configuration
-  3.2.2. Scanners
-         Resolution: Source and scanner interfaces added.
-
diff --git a/KEYS b/KEYS
deleted file mode 100644
index 8030857..0000000
--- a/KEYS
+++ /dev/null
@@ -1,93 +0,0 @@
-This file contains the PGP keys of various Xerces developers.
-Please don't use them for email unless you have to. Their main
-purpose is code signing.
-
-This file is a shameless rip-off of the Xalan-J2 KEYS file.
-
-Xerces users: 
-    If you use PGP:  pgp < KEYS
-    If you use gpg:  gpg --import < KEYS
-Xerces developers: 
-    If you use pgp:  pgp -kxa <your name> and append it to this file.
-    If you use gpg:  gpg --export -a <your_name> >>KEYS should do the trick
-
-Name                User ID
-Neil Graham         neilg@ca.ibm.com
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.0.6 (MingW32)
-Comment: For info see http://www.gnupg.org
-
-mQGiBDp4qeoRBAC0LNU4DKxiGD4WlaCZytDOlzEpUEJ2osubqdUSnexv/NzOA3Jy
-ZaAsITi1kj8dQR/pqpFHEMeWsb1Xua33TtlPcCN3kFicjbTOo3jbilx4gUFeO9Oy
-mcMeu/scYGan4erT++vXEAVd+qKCUzOymFqpDCa3xpqmeDuWxBUjqbCRFwCgt6w/
-dvC1VRG2bh7Ja09zfCPr4hkEAIYdq/2k3YYc0T1Fh8fKDRzsRsDYj+8BAGg8YmDy
-wx04Nh6l3XmKt1DmR0U3ciH6rY3oWXB9oCzGoyr/ZvkakfknGsptBpVK0m9vVHVw
-uHvIEZDdsX2l4Eplc/FovueZQadCj1R6zwTNvri7h0vTDg9Pk0+dRUcWHuoBhWvN
-+hv3A/4mWImGrPsx6nq85TJWRJxqFeAnYiEqB69ns69S//+lqBRFWecTYu60dde/
-sHJ0mHDTP0u5FRUSj5BVufR5wLZH8+ieGNHl4Jei3VnN3voGhuGNpwGxLDTdXD3W
-bMlOVx0H2R9+yqlDANLAfRS8GZb93I+riE0H1yMG5YgQC58+VLRUTmVpbCBHcmFo
-YW0gKHRoaXMga2V5IGlzIHByaW1hcmlseSBmb3Igc2lnbmluZyBYZXJjZXMtSiBy
-ZWxlYXNlcykgPG5laWxnQGNhLmlibS5jb20+iFcEExECABcFAjp4qeoFCwcKAwQD
-FQMCAxYCAQIXgAAKCRCL9vl1lVl7BQNhAJ9nucE0TtlFxStFCepoV638ma/jQQCe
-ILRbfFIo/pef/k551p2+wNqI/Dy5BA0EOnirwBAQAJDuhNBw4SXWZwW84XJclbDz
-rsftmuI7GeXVYtYQyJCWk4OX+fqR1xpqtd6IDLJl/Q/lvde42jxVMSTH2k0NfYsC
-h+5lIDQ54pYOiHZYQYx6ZhochZJTXxy9R+gs/vK/UT9f8SqdwY5BlOBTh14hJV33
-lxk5Ptk9li92NSiiLI3+9GB0bl6dLWnQPqFeaSvY962i7zgIhnaDOC43cDzwRlTA
-9zJsI92wYs+QC3LSm5e5falQ7GtQf4dZ4oid+ayTOE4B9jMumLHn/YQPMzyNFWYQ
-Jkyohfninxm8+aPOAOmveF+K8FE0dQsXagIjHSX/4cJFoWGnOdq8emkhlNQaoPIl
-dpSQcNLIB0Psnc4RhKQ30tK5a1unTgexmYLfFO8oLd439SKSaU1D00V0blf/e5cf
-FaJsRoQnPjG+jLu9l5cj7wkYH1XC7efyQJ2tW8br+0ENn2Ap30Uy6C7fQshyATFP
-k0rSonfIpH0Gd7//b8DutYpY6/ySHoWMmuoqeqc1RdJc6qiJPj6OLrfzgLJrVt3M
-j6GgCltsHXreRqMtwhRZ1xx5EZIDXGQ7/wnbDYgTU1NsY6VmBgZdkNOoCySg7Tf7
-NuJzLJ1Mlc2HBWhRBcrkwYhjGMsPIzK/2jVY9qTDecPNMZcscWTPQp6t7VzgzxEe
-8UJlDDtVMUY02QKw+0ELAAMFD/9mdmU/mEgwv9IxfNwisRW7jRQJjo4weUU6K9zk
-KZvRSg0tPLlyjTGtYKV4JTkeY++O38iecLJQOtBc5OikPbfhF2EMF7U+ATsd0hVv
-EVpCzsxcBr76Nt607Hcq7EeyL7GrvpaSo5pTG89DFktB1xVji3X4ko+JI+uP5rva
-29y0o0KbjTReRqvdVUHHvnGgKu7UVmxWAEAikEd2mQ5OYwqgO53VfL49akWR6Br3
-0mymNw4oof1VqnPu0ZwN2WJkhM6fXA0Nk1+MsG8XZUe1hOX4pwFEmiv4R9htUhv3
-Hvl/HxY3oMRedHrkwLwEQQkW8UVJkS/u6QZzeOplEG4s7ArmxEWqr3pBxXehvDvc
-peWn8P+yhd8NgeZ7zDT1W+RT9iqIYvVvUOYvEop32HJeJKeaZR1WUhTOxrHggCFQ
-8G6VEVeVmcJrcrvHI+9mbM+5oxt2NeGXpf4eOErDxaFglvYSvXeX+IW3u7XQaxHs
-/D8v1fADzMi0xOIF7lxA7iyfNmfmb8NNvej/F/Wj99od18agGy566pNYquu0VSV1
-nU4v2JRyZFkvtxjqZK+WVjZlMvbjaZPN9IPWCtC7nKPOkpLdr1XoDrcIIZBldcOc
-Gf/MdIaG5idzwIl3264vtCeIIDrGjxolnQtO/wBr3R4e1BEksCNsHok+HoGfDvaK
-NTCWU4hGBBgRAgAGBQI6eKvAAAoJEIv2+XWVWXsFH1cAn3k4YjXAjj+xOnPXTckz
-7jMXwkZoAJ9+F70Jxv1uoUGzpBnFs4CuH39QDpkBogQ6eKnqEQQAtCzVOAysYhg+
-FpWgmcrQzpcxKVBCdqLLm6nVEp3sb/zczgNycmWgLCE4tZI/HUEf6aqRRxDHlrG9
-V7mt907ZT3Ajd5BYnI20zqN424pceIFBXjvTspnDHrv7HGBmp+Hq0/vr1xAFXfqi
-glMzsphaqQwmt8aapng7lsQVI6mwkRcAoLesP3bwtVURtm4eyWtPc3wj6+IZBACG
-Hav9pN2GHNE9RYfHyg0c7EbA2I/vAQBoPGJg8sMdODYepd15irdQ5kdFN3Ih+q2N
-6FlwfaAsxqMq/2b5GpH5JxrKbQaVStJvb1R1cLh7yBGQ3bF9peBKZXPxaL7nmUGn
-Qo9Ues8Ezb64u4dL0w4PT5NPnUVHFh7qAYVrzfob9wP+JliJhqz7Mep6vOUyVkSc
-ahXgJ2IhKgevZ7OvUv//pagURVnnE2LutHXXv7BydJhw0z9LuRUVEo+QVbn0ecC2
-R/PonhjR5eCXot1Zzd76BobhjacBsSw03Vw91mzJTlcdB9kffsqpQwDSwH0UvBmW
-/dyPq4hNB9cjBuWIEAufPlS0VE5laWwgR3JhaGFtICh0aGlzIGtleSBpcyBwcmlt
-YXJpbHkgZm9yIHNpZ25pbmcgWGVyY2VzLUogcmVsZWFzZXMpIDxuZWlsZ0BjYS5p
-Ym0uY29tPohXBBMRAgAXBQI6eKnqBQsHCgMEAxUDAgMWAgECF4AACgkQi/b5dZVZ
-ewUDYQCfZ7nBNE7ZRcUrRQnqaFet/Jmv40EAniC0W3xSKP6Xn/5OedadvsDaiPw8
-uQQNBDp4q8AQEACQ7oTQcOEl1mcFvOFyXJWw867H7ZriOxnl1WLWEMiQlpODl/n6
-kdcaarXeiAyyZf0P5b3XuNo8VTEkx9pNDX2LAofuZSA0OeKWDoh2WEGMemYaHIWS
-U18cvUfoLP7yv1E/X/EqncGOQZTgU4deISVd95cZOT7ZPZYvdjUooiyN/vRgdG5e
-nS1p0D6hXmkr2Petou84CIZ2gzguN3A88EZUwPcybCPdsGLPkAty0puXuX2pUOxr
-UH+HWeKInfmskzhOAfYzLpix5/2EDzM8jRVmECZMqIX54p8ZvPmjzgDpr3hfivBR
-NHULF2oCIx0l/+HCRaFhpznavHppIZTUGqDyJXaUkHDSyAdD7J3OEYSkN9LSuWtb
-p04HsZmC3xTvKC3eN/UikmlNQ9NFdG5X/3uXHxWibEaEJz4xvoy7vZeXI+8JGB9V
-wu3n8kCdrVvG6/tBDZ9gKd9FMugu30LIcgExT5NK0qJ3yKR9Bne//2/A7rWKWOv8
-kh6FjJrqKnqnNUXSXOqoiT4+ji6384Cya1bdzI+hoApbbB163kajLcIUWdcceRGS
-A1xkO/8J2w2IE1NTbGOlZgYGXZDTqAskoO03+zbicyydTJXNhwVoUQXK5MGIYxjL
-DyMyv9o1WPakw3nDzTGXLHFkz0Kere1c4M8RHvFCZQw7VTFGNNkCsPtBCwADBQ//
-ZnZlP5hIML/SMXzcIrEVu40UCY6OMHlFOivc5Cmb0UoNLTy5co0xrWCleCU5HmPv
-jt/InnCyUDrQXOTopD234RdhDBe1PgE7HdIVbxFaQs7MXAa++jbetOx3KuxHsi+x
-q76WkqOaUxvPQxZLQdcVY4t1+JKPiSPrj+a72tvctKNCm400Xkar3VVBx75xoCru
-1FZsVgBAIpBHdpkOTmMKoDud1Xy+PWpFkega99JspjcOKKH9Vapz7tGcDdliZITO
-n1wNDZNfjLBvF2VHtYTl+KcBRJor+EfYbVIb9x75fx8WN6DEXnR65MC8BEEJFvFF
-SZEv7ukGc3jqZRBuLOwK5sRFqq96QcV3obw73KXlp/D/soXfDYHme8w09VvkU/Yq
-iGL1b1DmLxKKd9hyXiSnmmUdVlIUzsax4IAhUPBulRFXlZnCa3K7xyPvZmzPuaMb
-djXhl6X+HjhKw8WhYJb2Er13l/iFt7u10GsR7Pw/L9XwA8zItMTiBe5cQO4snzZn
-5m/DTb3o/xf1o/faHdfGoBsueuqTWKrrtFUldZ1OL9iUcmRZL7cY6mSvllY2ZTL2
-42mTzfSD1grQu5yjzpKS3a9V6A63CCGQZXXDnBn/zHSGhuYnc8CJd9uuL7QniCA6
-xo8aJZ0LTv8Aa90eHtQRJLAjbB6JPh6Bnw72ijUwllOIRgQYEQIABgUCOnirwAAK
-CRCL9vl1lVl7BR9XAJ95OGI1wI4/sTpz103JM+4zF8JGaACffhe9Ccb9bqFBs6QZ
-xbOArh9/UA4=
-=iexT
------END PGP PUBLIC KEY BLOCK-----
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index fc736ae..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
diff --git a/README b/README
deleted file mode 100644
index 2c2f1fc..0000000
--- a/README
+++ /dev/null
@@ -1,41 +0,0 @@
-                Xerces Java Build Instructions
-                ------------------------------
-
-Before building Xerces, you need the source package and tools
-package available from the Apache XML Project's distribution
-web page:
-
-    http://xml.apache.org/dist/xerces-j/
-
-Download both the Xerces-J-src.X.Y.Z.zip and Xerces-J-tools.X.Y.Z.zip 
-files for the appropriate Xerces release (where "X.Y.Z" is the version
-number) and extract them in the same directory. If you are using Unix, 
-download the equivalent .tar.gz files instead of the .zip files.
-
-You also need to have a Java Development Kit (JDK) version 1.2 (or 
-higher) installed on your system. Before initiating any part of the 
-build, set the JAVA_HOME environment variable to the installation 
-directory of your JDK.
-
-The Ant program is used to build everything in Xerces, including
-the documentation. This tool, and the others needed (besides the
-pre-requisite JDK) are contained within the tools package. To
-make building the packages easier, a Windows batch file and a Unix 
-shell script are included.
-
-If you only want to compile the source code and make the JAR files,
-run the following command on Windows:
-
-    build.bat jars
-
-or from Unix (make sure that build.sh is executable):
-
-    build.sh jars
-
-This will compile all of the source code and generate the JAR
-files that are available as part of the binary package. After
-building, these files will be located in the build/ directory.
-
-If you want to build everything, including the documentation,
-run the build batch file (or shell script) specifying the "all"
-target instead of "jars".
\ No newline at end of file
diff --git a/REL-PLAN-SchemaAlpha.html b/REL-PLAN-SchemaAlpha.html
deleted file mode 100644
index 776fbef..0000000
--- a/REL-PLAN-SchemaAlpha.html
+++ /dev/null
@@ -1,287 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html id="htmlroot">
-<head>
-<title>Xerces-2 Schema alpha</title>
-<style type="text/css">
-         BODY {  margin: 2em 1em 2em 70px;  
-                 font-family: New Times Roman, serif;    
-                 color: black;    
-                 background-color: white;}
-</style>
-</head>
-
-<body>
-<h1>Xerces-2 Schema alpha</h1>
-
-<p><b>Features:</b>
-<ul>
-<li>Similar schema support to xerces-1, except no: 
-<ul>
-<li>particle derivation restriction checking
-<li>UPA checking
-<li>cos-element-consistent checking
-</ul>
-</ul>
-<p><b>Target date:</b> late October 
-<p><b>Overall status:</b> Oct 29:  Release posted.           
-
-<h3>Development line items </h3>
-<table align="right" border="2">
-<tr>
-<th style="text-align:left">Line item </th>
-<th style="text-align:left">Volunteer </th>
-<th style="text-align:left">Target start date </th>
-<th style="text-align:left">Target completion date </th>
-<th style="text-align:left">Status </th></tr>
-
-
-<tr>
-<td>Overall schema design work </td>
-<td>all     </td>
-<td>July 1
-<td>Aug 31</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Infrastructure and framework  </td>
-<td>Neil Graham, Elena Litani, Sandy Gao </td>
-<td>Aug. 24 </td>
-<td>Sept. 21</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Datatype and msg port </td>
-<td>Elena Litani</td>
-<td>Aug. 24 </td>
-<td>Aug. 31 </td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Schema Handler and document info </td>
-<td>Neil Graham      </td>
-<td>Aug. 24 </td>
-<td>Oct. 12</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Identity constraint traversal</td>
-<td>Neil Graham</td>
-<td>Sept. 13
-<td>Sept. 24
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>SimpleType traversal </td>
-<td>Elena Litani    </td>
-<td>Aug. 24 </td>
-<td>Sept. 21</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Element traversal </td>
-<td>Sandy Gao   </td>
-<td>Aug. 24 </td>
-<td>Sept. 25</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Attribute traversal - initial implementation </td>
-<td>Sandy Gao   </td>
-<td>Aug. 24 </td>
-<td>Sept. 25</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Group traversal</td>
-<td>Rahul Srivastava (Elena Litani, Lisa Martin) </td>
-<td>Sept. 1</td>
-<td>Sept. 10</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>wildcard support - initial implementation </td>
-<td>Sandy Gao, Rahul Srivastava   </td>
-<td>Aug. 24 </td>
-<td>Sept. 25</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Attribute group traversal - initial implementation </td>
-<td>Sandy Gao, Rahul Srivastava </td>
-<td>Aug. 24 </td>
-<td>Sept. 25</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Complex type support  </td>
-<td>Lisa Martin      </td>
-<td>Sept. 1</td>
-<td>Oct. 5 </td>
-<td>Complete </td>
-</tr>
-
-<tr>
-<td>Schema validator - initial implementation</td>
-<td>Sandy Gao</td>
-<td>Sept. 4</td>
-<td>Sept. 25</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Content models:  builder, simple</td>
-<td>Elena Litani</td>
-<td>Sept. 4</td>
-<td>Sept. 25</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Content models:  DFA</td>
-<td>Neil Graham</td>
-<td>Sept. 24</td>
-<td>Oct. 1</td>
-<td>Complete</td>
-</tr>
-<tr>
-<td>Notation traversal</td>
-<td>Rahul Srivastava</td>
-<td>Sept. 15</td>
-<td>Sept. 18</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Misc. AttributeUse, attributeGroup Changes
-<ul>
-<li>change implementation of union of attribute uses
-<li>ensure all constraint checking done (ag-props-correct 2 and 3)
-</ul>
-</td>
-<td>Rahul Srivastava     </td>
-<td>Oct. 1 </td>
-<td>Oct. 5 </td>
-<td>Complete </td>
-</tr>
-
-<tr>
-<td>wildcard utility methods
-<ul>
-<li>intersection, union, subset
-</ul>
-</td>
-<td>Rahul Srivastava      </td>
-<td>Oct. 1</td>
-<td>Oct. 19</td>
-<td>Complete </td>
-</tr>
-
-<tr>
-<td>Schema Validator - identity constraint checking  </td>
-<td>Neil Graham   </td>
-<td>Oct. 5</td>
-<td>Oct. 11  </td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Schema Validator - default/fixed element values  </td>
-<td>Neil Graham  </td>
-<td>Oct. 5</td>
-<td>Oct. 11</td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Schema Validator - ENTITY validation</td>
-<td>Elena Litani</td>
-<td>Oct. 1 </td>
-<td>Oct. 19 </td>
-<td>Complete. </td>
-</tr>
-
-<tr>
-<td>Schema resolution changes</td>
-<td>Elena Litani</td>
-<td>Oct. 1  </td>
-<td>Oct. 1  </td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>annotation  </td>
-<td>Pavani Mukthipudi</td>
-<td>Sept. 26
-<td>Oct. 1  </td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>all Content Model </td>
-<td>Pavani Mukthipudi</td>
-<td>Sept. 26 </td>
-<td>Oct. 4  </td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>mixed Content Model </td>
-<td>Elena Litani</td>
-<td>Sept. 24 </td>
-<td>Oct. 1 </td>
-<td>Complete </td>
-</tr>
-
-<tr>
-<td>Testing</td>
-<td>all</td>
-<td>Oct. 8 </td>
-<td>Oct. 22 </td>
-<td>Complete. </td>
-</tr>
-
-<tr>
-<td>Package restructuring</td>
-<td>Elena Litani</td>
-<td>Oct. 24</td>
-<td>Oct. 25 </td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Configuration changes</td>
-<td>Elena Litani, Sandy Gao</td>
-<td>Oct. 24</td>
-<td>Oct. 25 </td>
-<td>Complete</td>
-</tr>
-
-<tr>
-<td>Attempt final build and post to apache </td>
-<td>all</td>
-<td>Oct. 25 </td>
-<td>Oct. 31 </td>
-<td>Complete 
-<ul>
-<li>
-Build attempted Oct. 25.  Bugs fixed on 26.
-<li>Build re-initiated and posted Oct. 29
-</ul>
-</td>
-</tr>
-
-</table>
-
-</body>
-</html>
diff --git a/REL-PLAN-SchemaBeta.html b/REL-PLAN-SchemaBeta.html
deleted file mode 100644
index f80f9ad..0000000
--- a/REL-PLAN-SchemaBeta.html
+++ /dev/null
@@ -1,166 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html id="htmlroot">
-<head>
-<title>Xerces-2 Schema beta</title>
-<style type="text/css">
-         BODY {  margin: 2em 1em 2em 70px;  
-                 font-family: New Times Roman, serif;    
-                 color: black;    
-                 background-color: white;}
-</style>
-</head>
-
-<body>
-<h1>Xerces-2 Schema beta</h1>
-
-<p><b>Features:</b>
-<ul>
-<li>Full xerces-1 schema support 
-<li>New datatype validator design
-<li>PSVI support 
-<li>Grammar caching
-<li>Misc. DOM L3 features  
-</ul>
-<p><b>Target DCUT (code complete) date: </b> Nov. 30 
-<p><b>Target release date:</b> late December  
-
-<p><b>Open Issues:</b>
-<ul>
-<li>How do we pass PSVI info thru XNI?  (see Andy Clark's proposal)
-<li>Do we need to change our content model representation to include model group components?  
-<li>How do we expose the PSVI info to the application? 
-</ul>
-
-<p><b>Clean-up work.   Needs volunteers. </b>
-<ul>
-<li>Use reference comparison for schema element names in traversers.   Needs some investigative work. 
-<li>Error messages:  get rid of all calls to reportGenericSchemaError and ensure there are appropriate messages in the properties file. 
-<li>General performance work:  revisit use of Hashtable, Vector, string concat, QName lookup, etc. 
-<li>Complete work in the decl pool, and change the traversers to use it. 
-<li>Revisit our validation options and their semantics.   
-<li>Potentially revisit ENTITY validation - See Schema Rec Issue R-66. 
-</ul>
-
-<p><b>Features to be implemented if time permits</b>
-<ul>
-<li>Improved simple content model support
-<li>Support for content models containing large minOccurs/maxOccurs values
-<li>Improved error detection for XML Schema errors:  try to emit errors using line numbers from the Schema itself, and not the instance. 
-</ul>
-
-<h3>Development line items </h3>
-<table border="2" align="right">
-<tr>
-<th style="text-align:left">Line item </th>
-<th style="text-align:left">Volunteer </th>
-<th style="text-align:left">Sizing </th>
-<th style="text-align:left">Target start </th>
-<th style="text-align:left">Target completion </th>
-<th style="text-align:left">Status </th></tr>
-
-<tr>
-<td>New simpleType design 
-<td>Neeraj Bajaj (Sandy Gao)
-<td>2 pm </td>
-<td>Sept. 15</td>
-<td>Nov. 16</td>
-<td> </td>
-</tr>
-
-<tr>
-<td>Particle Derivation restriction checking </td>  
-<td> Lisa Martin</td>
-<td> 2-3 pw</td>
-<td> Nov. 1</td>
-<td> Nov. 23</td>
-<td> </td>
-</tr> 
-
-<tr>
-<td>cos-element-consistent checking </td>  
-<td> Lisa Martin</td>
-<td> 1 pw</td>
-<td> Nov. 26</td>
-<td> Nov. 30</td>
-<td> </td>
-</tr>
-
-<tr>
-<td>UPA checking and subsitution group handling</td>
-<td>Sandy Gao </td>
-<td>2 pw </td>
-<td>Nov. 1 </td>
-<td>Nov. 16 </td>
-</tr>
-
-<tr>
-<td>PSVI support 
-<ul>
-<li>XNI changes
-<li>gather information and pass thru XNI 
-<li>expose PSVI to app
-</ul>
-<td>Elena Litani, Sandy Gao, Arun Yadav </td>
-<td> 4 pw (elapsed) </td>
-<td> Nov. 1 </td>
-<td> Nov. 30 </td>
-<td> </td>
-<tr>
-
-<tr>
-<td>DOM L3 serialization 
-<td>Rahul Srivastava </td>
-<td>3 pw</td>
-<td>Nov. 1</td>
-<td>Nov. 23</td>
-<td> </td>
-</tr>
-
-<tr>
-<td>Misc. DOM L3 features: 
-<ul>
-<li>Load (2 pw)
-<li>Pre-parsing schemas (1 pw)
-<li>Misc. DOM L3 Core features - TBD
-</ul>
-</td> 
-<td>Gopal Sharma, Pavani Mukhtipudi </td>
-<td> </td>
-<td>Nov. 1 </td>
-<td>Nov. 30 </td>
-</tr>
-
-<tr>
-<td>Grammar caching
-<ul>
-<li>grammar resolution
-<li>schemaLocation feature?
-</ul>
-</td>
-<td>Neil Graham </td>
-<td>3-4 pw </td>
-<td>Nov. 1 </td>
-<td>Nov. 30 </td>
-<td> </td>
-</tr>
-
-<tr>
-<td>Testing 
-<td>all </td>
-<td>2 weeks (elapsed)  </td>
-<td>Dec. 3 </td>
-<td>Dec. 14 </td>
-<td> </td>
-</tr>
-
-<tr>
-<td>Build 
-<td>all </td>
-<td>  </td>
-<td>Week of Dec. 17 </td>
-<td>Week of Dec. 17 </td>
-<td> </td>
-</table>
-
-</body>
-</html>
diff --git a/Readme.html b/Readme.html
deleted file mode 100755
index 897495f..0000000
--- a/Readme.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
-<html>
- <head>
-  <meta http-equiv="Refresh" content="3; URL=docs/index.html">
-  <title>Xerces Java Parser</title>
- </head>
- <body>
-  <h1 align='center'>Xerces Java Parser</h1>
-  <h2>Redirecting to Documentation...</h2>
-  <p>
-   In a few seconds, you should be redirected to the Xerces Java Parser 
-   documentation. If you are not automatically redirected, please click 
-   on the following link:
-   <blockquote>
-    <a href='docs/index.html'>Xerces Java Documentation</a>
-   </blockquote>
-  </p>
-  <p>
-   <strong>Note:</strong> 
-   You must download the binary distribution to get the documentation.
-   If you downloaded the source distribution, then you must build the
-   documentation first.
-  </p>
- </body>
-</html>
diff --git a/STATUS b/STATUS
deleted file mode 100644
index 582f513..0000000
--- a/STATUS
+++ /dev/null
@@ -1,21 +0,0 @@
-This is the Status file for the Xerces for Java code base.
-This file provides an overview of the things that need to
-be done. However, specific action items are enumerated in
-the TODO file.
-
-There are lots of things that need to be done: 
-
-* Performance, performance, performance!
-* Conformance, conformance, conformance!
-* Kill bugs
-
-* Grammar caching
-* Grammar access
-* Re-validation
-
-* Documentation
-* Samples
-* Scripts to build parser subconfigurations
-* Additional configuration options
-
-* Anything else?
diff --git a/TODO b/TODO
deleted file mode 100644
index b18c982..0000000
--- a/TODO
+++ /dev/null
@@ -1,33 +0,0 @@
-*** CURRENT ***
-
-1. Documentation
- 1.4. JavaDoc
-  1.4.1. Fix all warnings reported by JavaDoc
-
-3. Validation Engine
- 3.2. Implement grammar cache
- 3.3. Add PSVI items to streaming infoset
-
-*** COMPLETED ***
-
-1. Documentation
- 1.1. Samples
- 1.2. Xerces Native Interface (XNI)
-  1.2.1. XNI overview
-  1.2.2. Parser components and configurations
-  1.2.3. Using Xerces2 Components
- 1.3. Remove/add FAQ items
-2. Schema Validation
- 2.1. Port of Xerces 1.x Schema code [andyc,???]
-      * in ...impl.v1 package
-  2.1.1. Remove old classes
-  2.1.2. Add classes, changing packaging
-  2.1.3. Remove StringPool dependencies
-  2.1.4. Move from internal interfaces to XNI
- 2.2. Implement new Schema code
-3. Validation Engine
- 3.1. Separate "universal" validator into separate components:
-      DTD validator, namespace binder
-  3.1.1. Separate source code, changing packages as needed
-  3.1.2. Update parser configuration
-      
diff --git a/build.bat b/build.bat
deleted file mode 100755
index 7cbe0a7..0000000
--- a/build.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-@echo off
-echo Xerces-Java Build System
-echo ------------------------
-
-if "%JAVA_HOME%" == "" goto error
-
-rem Keep this classpath to the minimum required to run ant
-rem Application dependent classpaths are specified in build.xml 
-set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;.\tools\ant.jar;.\tools\xerces.jar
-
-echo Building with ant classpath %LOCALCLASSPATH%
-echo Starting Ant...
-"%JAVA_HOME%\bin\java.exe" -Dant.home="./tools" -classpath "%LOCALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5
-goto end
-
-:error
-echo "ERROR: JAVA_HOME not found in your environment."
-echo "Please, set the JAVA_HOME variable in your environment to match the"
-echo "location of the Java Virtual Machine you want to use."
-
-:end
-set LOCALCLASSPATH=
-@echo on
diff --git a/build.sh b/build.sh
deleted file mode 100755
index dd47db2..0000000
--- a/build.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-echo
-echo "Xerces-Java Build System"
-echo "------------------------"
-
-if [ "$JAVA_HOME" = "" ] ; then
-   echo "ERROR: JAVA_HOME not found in your environment."
-   echo 
-   echo "Please, set the JAVA_HOME variable in your environment to match the"
-   echo "location of the Java Virtual Machine you want to use."
-   exit 1
-fi
-
-# UNIX
-CLPATHSEP=:
-# if we're on a Windows box make it ;
-uname | grep WIN && CLPATHSEP=\;
-
-# Keep this classpath to the minimum required to run ant
-# Application dependent classpaths are specified in build.xml 
-LOCALCLASSPATH="$JAVA_HOME/lib/tools.jar${CLPATHSEP}${JAVA_HOME}/lib/classes.zip${CLPATHSEP}./tools/ant.jar${CLPATHSEP}./tools/xerces.jar"
-ANT_HOME=./tools
-
-echo Building with classpath \"$LOCALCLASSPATH\"
-echo Starting Ant...
-echo
-"$JAVA_HOME"/bin/java -Dant.home="$ANT_HOME" -classpath "$LOCALCLASSPATH" org.apache.tools.ant.Main $@
diff --git a/build.xml b/build.xml
deleted file mode 100644
index dc6763e..0000000
--- a/build.xml
+++ /dev/null
@@ -1,651 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- ===================================================================
-
-Read the README file for build instruction.
-
-Authors:
-  Stefano Mazzocchi <stefano@apache.org>
-  Anupam Bagchi     <abagchi@apache.org>
-  Andy Clark, IBM
-
-Copyright:
-  Copyright (c) 2000 The Apache Software Foundation.
-
-   $Id$
-
-==================================================================== -->
-
-<project default="usage" basedir=".">
-
-  <target name="init">
-    <property name='parser.Name' value='Xerces-J'/>
-    <property name='parser.name' value='xerces-j'/>
-    <property name='parser.shortname' value='xerces'/>
-    <property name='parser.Version' value='2.0.0 (beta4)'/>
-    <property name='parser.version' value='2.0.0.beta4'/>
-    <property name='parser_version' value='2_0_0_beta4'/>
-
-    <property name='oldjar.parser' value='xerces.jar'/>
-    <property name='jar.apis' value='xmlParserAPIs.jar'/>
-    <property name='jar.parser' value='xercesImpl.jar'/>
-    <property name='jar.samples' value='xercesSamples.jar'/>
-
-    <property name="year" value="1999-2001"/>
-    <property name="copyright" value="Copyright &#169; ${year} Apache XML Project. All Rights Reserved."/>
-
-    <echo message= "---------------- ${parser.Name} ${parser.Version} [${year}] ---------------"/>
-    <!-- changed made to synchronize with a patch from Sam Ruby (<rubys@apache.org>) to Xerces1
-    <property name="build.compiler" value="classic"/> -->
-    <property name="debug" value="off"/>
-    <property name="optimize" value="on"/>
-    <property name="deprecation" value="off"/>
-
-    <property name="src.dir" value="./src"/>
-    <property name="tools.dir" value="./tools"/>
-    <property name="docs.dir" value="./docs"/>
-    <property name="data.dir" value="./data"/>
-    <property name="samples.dir" value="./samples"/>
-    <property name="tests.dir" value="./tests"/>
-    <property name="tools.dir" value="./tools"/>
-    <property name="docs.book" value="${docs.dir}/docs-book.xml"/>
-
-    <property name="packages" value="org.*"/>
-
-    <property name="doc.generator" value="org.apache.stylebook.StyleBook"/>
-    <property name="doc.generator.package" value="${tools.dir}/stylebook-1.0-b2.jar"/>
-
-    <property name="build.dir" value="./build"/>
-    <property name="build.src" value="${build.dir}/src"/>
-    <property name="build.dest" value="${build.dir}/classes"/>
-    <property name="build.docs" value="${build.dir}/docs"/>
-    <property name="build.samples" value="${build.dir}/samples"/>
-    <property name="build.tests" value="${build.dir}/tests"/>
-    <property name="build.data" value="${build.dir}/data"/>
-    <property name="build.javadocs" value="${build.dir}/docs/javadocs"/>
-
-    <property name="distsrc.dir" value="${build.dir}/${parser.shortname}-${parser_version}"/>
-    <property name="disttools.dir" value="${build.dir}/tools"/>
-    <property name="distbin.dir" value="${build.dir}/${parser.shortname}-${parser_version}"/>
-
-    <filter token="year" value="${year}"/>
-    <filter token="version" value="${parser.Version}"/>
-    <filter token="date" value="${TODAY}"/>
-    <filter token="log" value="true"/>
-    <filter token="verbose" value="true"/>
-
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Help on usage                                                       -->
-  <!-- =================================================================== -->
-  <target name="usage">
-    <echo message=""/>
-    <echo message=""/>
-    <echo message="${parser.Name} Build instructions"/>
-    <echo message="-------------------------------------------------------------"/>
-    <echo message=""/>
-    <echo message=" available targets are:"/>
-    <echo message=""/>
-    <echo message="   compile  --> compiles the source code"/>
-    <echo message="   jar      --> generates the xercesImpl.jar file"/>
-    <echo message="   oldjar      --> generates the old-style xerces.jar file"/>
-    <echo message="   samples  --> compiles the samples source code"/>
-    <echo message="   tests    --> compiles the tests source code"/>
-    <echo message="   sampjar  --> generates the xercesSamples.jar file"/>
-    <echo message="   apijar  --> generates the xmlParserAPIs.jar file"/>
-    <echo message="   oldjars     --> generates the xerces and xercesSamples jar files"/>
-    <echo message="   jars     --> generates the xercesImpl, xercesSamples and xmlParserAPIs jar files"/>
-    <echo message="   docs     --> generates the HTML documentation"/>
-    <echo message="   javadocs --> generates the API documentation (needs Java 1.2 or higher)"/>
-    <echo message="   pack-tools --> generates the tools distributions of Xerces-Java (zip and tar.gz)"/>
-    <echo message="   pack-src --> generates the source distributions of Xerces-Java (zip and tar.gz)"/>
-    <echo message="   oldpack-bin --> generates the old-style binary distributions of Xerces-Java (zip and tar.gz)"/>
-    <echo message="   pack-bin --> generates the binary distributions of Xerces-Java (zip and tar.gz)"/>
-    <echo message="   all      --> generates the binary, source and tools distributions of Xerces-Java"/>
-    <echo message="   oldall      --> generates the binary, source and tools distributions of Xerces-Java with the old-style xerces.jar"/>
-    <echo message="   test     --> runs a sanity test on the sample files"/>
-    <echo message="   clean    --> cleans up all generated files and directories"/>
-    <echo message="   usage    --> provides help on using the build tool (default)"/>
-    <echo message=""/>
-    <echo message=" See comments inside the build.xml file for more details."/>
-    <echo message="-------------------------------------------------------------"/>
-    <echo message=""/>
-    <echo message=""/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the build directory                                        -->
-  <!-- =================================================================== -->
-  <target name="prepare" depends="init">
-    <mkdir dir="${build.dir}"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Compiles the source code                                            -->
-  <!-- =================================================================== -->
-  <target name="prepare-src" depends="prepare">
-    <!-- create directories -->
-    <mkdir dir="${build.src}"/>
-    <mkdir dir="${build.dest}"/>
-    <mkdir dir="${build.dest}/META-INF"/>
-    <mkdir dir="${build.dest}/META-INF/services"/>
-
-    <copy file="${src.dir}/org/apache/xerces/jaxp/javax.xml.parsers.DocumentBuilderFactory"
-      tofile="${build.dest}/META-INF/services/javax.xml.parsers.DocumentBuilderFactory"/>
-
-    <copy file="${src.dir}/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory"
-      tofile="${build.dest}/META-INF/services/javax.xml.parsers.SAXParserFactory"/>
-
-    <copy file="${src.dir}/org/apache/xerces/parsers/org.xml.sax.driver"
-      tofile="${build.dest}/META-INF/services/org.xml.sax.driver"/>
-
-    <!-- copy src files -->
-    <copy todir="${build.src}">
-        <fileset 
-            dir="${src.dir}"
-            includes="**/Makefile, **/Makefile.incl, javax/**, org/**" 
-            excludes="**/classfiles_updated **/CVS* **/.#* **/XMLMessages.java
-                       **/SchemaImporter.java **/RevalidatingDOMParser.java
-                       **/DatatypeContentModel.java **/ComplexTypeInfo.java
-                       **/DTDImporter.java 
-                       **/v1/** **/v2/**">
-        </fileset>
-    </copy>
-    
-    <!-- substitute tokens as needed -->
-    <replace file="${build.dir}/src/org/apache/xerces/impl/Version.java" 
-             token="@@VERSION@@" value="${parser.Name} ${parser.Version}"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Compiles the source directory                                       -->
-  <!-- =================================================================== -->
-  <target name="compile" depends="prepare-src">
-    <copy todir="${build.dest}">
-      <fileset dir="${build.src}"
-        includes="**/*.res, **/*.properties">
-      </fileset>
-    </copy>
-
-    <javac srcdir="${build.src}"
-           excludes="**/RevalidatingDOMParser.java"
-           destdir="${build.dest}"
-           debug="${debug}"
-           deprecation="${deprecation}"
-           optimize="${optimize}"
-           includeAntRuntime="false"
-           includeJavaRuntime="true"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the omnibus class package                                           -->
-  <!-- =================================================================== -->
-  <target name="oldjar" depends="compile">
-    <jar jarfile="${build.dir}/${oldjar.parser}"
-         basedir="${build.dest}"
-         compress="false"
-         includes="org/**, javax/**,META-INF/**"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the implementation class package                                           -->
-  <!-- =================================================================== -->
-  <target name="jar" depends="compile">
-    <jar jarfile="${build.dir}/${jar.parser}"
-         basedir="${build.dest}"
-         compress="false"
-         includes="org/apache/**, META-INF/**"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the API class package                                           -->
-  <!-- =================================================================== -->
-  <target name="apijar" depends="compile">
-    <jar jarfile="${build.dir}/${jar.apis}"
-         basedir="${build.dest}"
-         compress="false"
-         includes="org/xml/**, org/w3c/**, javax/**"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Compiles the samples                                                -->
-  <!-- =================================================================== -->
-  <target name="samples" depends="compile">
-    <mkdir dir="${build.samples}"/>
-    <copy todir="${build.samples}" >
-        <fileset dir="${samples.dir}" />
-    </copy>
-    <javac srcdir="${build.samples}"
-           excludes="**/DOMAddLines.java "
-           destdir="${build.dest}"
-           classpath="${build.dir}/classes"
-           debug="${debug}"
-           includeAntRuntime="false"
-           includeJavaRuntime="true"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Compiles the tests                                                  -->
-  <!-- =================================================================== -->
-  <target name="tests" depends="samples">
-    <mkdir dir="${build.tests}"/>
-    <copy todir="${build.tests}">
-        <fileset dir="${tests.dir}" />
-    </copy>
-    <javac srcdir="${build.tests}"
-           destdir="${build.dest}"
-           classpath="${build.dir}/classes:./tools/junit.jar"
-           debug="${debug}"
-           includeAntRuntime="false"
-           includeJavaRuntime="true"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the samples package                                         -->
-  <!-- =================================================================== -->
-  <target name="sampjar" depends="samples">
-    <jar jarfile="${build.dir}/${jar.samples}"
-         basedir="${build.dest}"
-         compress="false"
-         includes="dom/**,sax/**,socket/**,ui/**,xni/**"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the docs                                                   -->
-  <!-- =================================================================== -->
-  <target name="prepare-docs" depends="init"> 
-    <mkdir dir="${build.docs}"/>
-    <mkdir dir="${build.dir}/xdocs"/>
-    <copy todir="${build.dir}/xdocs">
-        <fileset dir="${docs.dir}"/>
-    </copy>
-    <replace file="${build.dir}/xdocs/dtd/entities.ent" 
-             token="@@VERSION@@" value="${parser.Version}"/>
-    <replace file="${build.dir}/xdocs/dtd/entities.ent" 
-             token="@@version@@" value="${parser.version}"/>
-    <replace file="${build.dir}/xdocs/dtd/entities.ent" 
-             token="@@_version_@@" value="${parser_version}"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Generate HTML docs                                                  -->
-  <!-- =================================================================== -->
-  <target name="docs" depends="prepare, prepare-docs">
-    <echo message="Building docs for ${parser.Name} ${parser.Version} ..." />
-    <java fork="yes"
-          classpath="${java.class.path}:${doc.generator.package}:./tools/xalan.jar"
-          classname="${doc.generator}">
-      <arg value="targetDirectory=${build.docs}"/>
-      <arg value="${build.dir}/xdocs/docs-book.xml"/>
-      <arg value="${build.dir}/xdocs/style"/>
-    </java>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Creates the API documentation                                       -->
-  <!-- =================================================================== -->
-  <target name="javadocs" depends="prepare-src">
-    <!--
-    <mkdir dir="${build.javadocs}"/>
-    <javadoc packagenames="${packages}"
-             sourcepath="${build.src}"
-             destdir="${build.javadocs}"
-             author="true"
-             version="true"
-             use="true"
-             windowtitle="${parser.Name} API"
-             doctitle="${parser.Name}"
-             bottom="${copyright}" />
-    -->
-    <mkdir dir='${build.dir}/docs/javadocs/api'/>
-    <javadoc packagenames='javax.xml.parsers,org.w3c.*,org.xml.*'
-      sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/api'
-      author='true' version='true'
-      windowtitle='XML Standard API' doctitle='XML Standard API'
-      bottom='${copyright}'
-      locale='en_US'/>
-    <mkdir dir='${build.dir}/docs/javadocs/xni'/>
-    <javadoc packagenames='org.apache.xerces.xni.*'
-      sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/xni'
-      author='true' version='true'
-      windowtitle='Xerces Native Interface' 
-      doctitle='Xerces Native Interface'
-      bottom='${copyright}'
-      locale='en_US'/>
-    <mkdir dir='${build.dir}/docs/javadocs/dom3-api'/>
-    <javadoc packagenames='org.apache.xerces.dom3.*'
-     sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/dom3-api'
-     author='true' version='true'
-     windowtitle='DOM Level 3 API' doctitle='DOM Level 3 API'
-     bottom='${copyright}'
-     locale='en_US'/>
-    
-    <mkdir dir='${build.dir}/docs/javadocs/xerces2'/>
-    <javadoc packagenames='org.apache.xerces.dom.*,
-                           org.apache.xerces.impl.*,
-                           org.apache.xerces.jaxp,
-                           org.apache.xerces.parsers,
-                           org.apache.xerces.util'
-      sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/xerces2'
-      author='true' version='true'
-      windowtitle='Xerces2 Implementation' 
-      doctitle='Xerces2 Implementation'
-      bottom='${copyright}'
-      locale='en_US'/>
-    <mkdir dir='${build.dir}/docs/javadocs/other'/>
-    <javadoc packagenames='org.apache.html.*,
-                           org.apache.wml.*,
-                           org.apache.xml.serialize.*'
-      sourcepath='${build.src}' destdir='${build.dir}/docs/javadocs/other'
-      author='true' version='true'
-      windowtitle='Other Classes' doctitle='Other Classes'
-      bottom='${copyright}'
-      locale='en_US'/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the source distribution                                    -->
-  <!-- =================================================================== -->
-  <target name="pack-src" depends="init">
-    <echo message="Building the source distribution files (zip,tar)"/>
-    <delete dir="${distbin.dir}"/>
-
-    <mkdir dir="${distsrc.dir}"/>
-    <mkdir dir="${distsrc.dir}/src"/>
-    <mkdir dir="${distsrc.dir}/data"/>
-    <mkdir dir="${distsrc.dir}/docs"/>
-    <mkdir dir="${distsrc.dir}/samples"/>
-
-    <copy todir="${distsrc.dir}/src" >
-        <fileset
-            dir="${src.dir}"  
-            includes="**/Makefile, **/Makefile.incl, org/**, javax/**"
-            excludes="**/CVS*, **/.#*, **/*.class
-                      **/v1/** **/v2/**"
-        />
-    </copy>
-
-
-    <copy todir="${distsrc.dir}/data" >
-        <fileset
-            dir="${data.dir}"  
-            excludes="**/CVS*, **/.#*"
-        />
-    </copy>
-
-    <copy todir="${distsrc.dir}/docs" >
-        <fileset
-            dir="${docs.dir}" 
-            excludes="**/CVS*, **/*.#*, pdf/**, html/**, **/javadocs*"
-        />
-    </copy>
-
-    <copy todir="${distsrc.dir}/samples" >
-        <fileset
-            dir="${samples.dir}"  
-            excludes="**/CVS*, **/*.#*"
-        />
-    </copy>
-
-    <!--<copy file="Makefile" tofile="${distsrc.dir}/Makefile"/>-->
-    <copy file="LICENSE" tofile="${distsrc.dir}/LICENSE"/>
-    <copy file="README" tofile="${distsrc.dir}/README"/>
-    <copy file="Readme.html" tofile="${distsrc.dir}/Readme.html"/>
-    <copy file="STATUS" tofile="${distsrc.dir}/STATUS"/>
-    <copy file="TODO" tofile="${distsrc.dir}/TODO"/>
-    <copy file="ISSUES" tofile="${distsrc.dir}/ISSUES"/>
-    <copy file="build.xml" tofile="${distsrc.dir}/build.xml"/>
-    <copy file="${basedir}/build.sh" tofile="${distsrc.dir}/build.sh" />
-    <chmod file="${distsrc.dir}/build.sh" perm="ugo+rx" />
-    <copy file="${basedir}/build.bat" tofile="${distsrc.dir}/build.bat" />
-
-    <zip zipfile="${build.dir}/${parser.Name}-src.${parser.version}.zip" 
-         basedir="${build.dir}"
-         includes="${parser.shortname}-${parser_version}/**" excludes="*.class"/>
-
-    <tar tarfile="${build.dir}/${parser.Name}-src.${parser.version}.tar" 
-         basedir="${build.dir}"
-         includes="${parser.shortname}-${parser_version}/**" excludes="*.class"/>
-    <gzip zipfile="${build.dir}/${parser.Name}-src.${parser.version}.tar.gz"
-          src="${build.dir}/${parser.Name}-src.${parser.version}.tar" />
-    <!-- and why not get rid of the un-gzip'd tarball and save ourselves 15 Mb? -->
-    <delete file="${build.dir}/${parser.Name}-src.${parser.version}.tar"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the tools distribution                                    -->
-  <!-- =================================================================== -->
-  <target name="pack-tools" depends="init">
-    <echo message="Building the tools distribution files (zip,tar)"/>
-    <mkdir dir="${disttools.dir}"/>
-
-    <copy todir="${disttools.dir}" >
-        <fileset
-            dir="${tools.dir}"  
-            includes="ant*, **/*.bat, *.jar"
-            excludes="**/CVS*, **/.#*, **/*.class"
-        />
-    </copy>
-
-    <zip zipfile="${build.dir}/${parser.Name}-tools.${parser.version}.zip" 
-         basedir="${build.dir}"
-         includes="tools/**"/>
-
-    <tar tarfile="${build.dir}/${parser.Name}-tools.${parser.version}.tar" 
-         basedir="${build.dir}"
-         includes="tools/**"/>
-    <gzip zipfile="${build.dir}/${parser.Name}-tools.${parser.version}.tar.gz"
-          src="${build.dir}/${parser.Name}-tools.${parser.version}.tar" />
-    <!-- and why not get rid of the un-gzip'd tarball and save ourselves Mb? -->
-    <delete file="${build.dir}/${parser.Name}-tools.${parser.version}.tar"/>
-    <!-- and delete the directory:  -->
-    <delete dir="${disttools.dir}"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares common parts of the binary distributions                                    -->
-  <!-- =================================================================== -->
-  <target name="pack-bin-common" depends="javadocs, docs, sampjar">
-
-    <echo message="Building the binary distribution files (zip,tar)"/>
-    <delete dir="${distbin.dir}"/>
-    <mkdir dir="${distbin.dir}"/>
-    <mkdir dir="${distbin.dir}/data"/>
-    <mkdir dir="${distbin.dir}/docs"/>
-    <mkdir dir="${distbin.dir}/docs/javadocs"/>
-    <mkdir dir="${distsrc.dir}/samples"/>
-
-    <copy todir="${distbin.dir}/data" >
-        <fileset
-            dir="${data.dir}"
-            excludes="**/CVS*, **/*.#*"
-        />
-    </copy>
-
-    <copy todir="${distbin.dir}/docs" >
-        <fileset dir="${build.docs}" />
-    </copy>
-
-    <copy todir="${distbin.dir}/docs/javadocs/api" >
-        <fileset dir="${build.dir}/docs/javadocs/api" />
-    </copy>
-    <copy todir="${distbin.dir}/docs/javadocs/xni" >
-        <fileset dir="${build.dir}/docs/javadocs/xni" />
-    </copy>
-    <copy todir="${distbin.dir}/docs/javadocs/xerces2" >
-        <fileset dir="${build.dir}/docs/javadocs/xerces2" />
-    </copy>
-    <copy todir="${distbin.dir}/docs/javadocs/other" >
-        <fileset dir="${build.dir}/docs/javadocs/other" />
-    </copy>
-
-    <copy file="LICENSE" tofile="${distbin.dir}/LICENSE"/>
-    <copy file="Readme.html" tofile="${distbin.dir}/Readme.html"/>
-
-    <copy file="${build.dir}/${jar.samples}" tofile="${distbin.dir}/${jar.samples}"/>
-
-    <copy todir="${distsrc.dir}/samples" >
-        <fileset
-            dir="${samples.dir}"
-            excludes="**/CVS*, **/*.#*"
-        />
-    </copy>
-
-    <copydir src="${samples.dir}" dest="${distsrc.dir}/samples" excludes="**/CVS*, **/*.#*"/>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the binary distribution                                    -->
-  <!-- =================================================================== -->
-  <target name="pack-bin" depends="pack-bin-common, jars">
-    <copy file="${build.dir}/${jar.parser}" tofile="${distbin.dir}/${jar.parser}"/>
-    <copy file="${build.dir}/${jar.apis}" tofile="${distbin.dir}/${jar.apis}"/>
-
-    <zip zipfile="${build.dir}/${parser.Name}-bin.${parser.version}.zip" 
-         basedir="${build.dir}"
-         includes="${parser.shortname}-${parser_version}/**" 
-         excludes="*.class, **/${oldjar.parser}"/>
-    <tar tarfile="${build.dir}/${parser.Name}-bin.${parser.version}.tar" 
-         basedir="${build.dir}"
-         includes="${parser.shortname}-${parser_version}/**" 
-         excludes="*.class, **/${oldjar.parser}"/>
-    <gzip zipfile="${build.dir}/${parser.Name}-bin.${parser.version}.tar.gz"
-          src="${build.dir}/${parser.Name}-bin.${parser.version}.tar" />
-    <!-- as before, let's kill of the ungzip'd tarball! -->
-    <delete file="${build.dir}/${parser.Name}-bin.${parser.version}.tar"/>
-
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Prepares the old binary distribution                                    -->
-  <!-- =================================================================== -->
-  <target name="oldpack-bin" depends="pack-bin-common, oldjars">
-    <copy file="${build.dir}/${oldjar.parser}" tofile="${distbin.dir}/${oldjar.parser}"/>
-
-    <zip zipfile="${build.dir}/old${parser.Name}-bin.${parser.version}.zip" 
-         basedir="${build.dir}"
-         includes="${parser.shortname}-${parser_version}/**" 
-         excludes="*.class, **/${jar.parser}, **/${jar.apis}"/>
-    <tar tarfile="${build.dir}/old${parser.Name}-bin.${parser.version}.tar" 
-         basedir="${build.dir}"
-         includes="${parser.shortname}-${parser_version}/**" 
-         excludes="*.class, **/${jar.parser}, **/${jar.apis}"/>
-    <gzip zipfile="${build.dir}/old${parser.Name}-bin.${parser.version}.tar.gz"
-          src="${build.dir}/old${parser.Name}-bin.${parser.version}.tar" />
-    <!-- as before, let's kill of the ungzip'd tarball! -->
-    <delete file="${build.dir}/old${parser.Name}-bin.${parser.version}.tar"/>
-
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Do a sanity test using samples                                      -->
-  <!-- =================================================================== -->
-  <target name="test" depends="tests">
-    <echo message="Performing sanity test for ${parser.Name} ${parser.Version} ..." />
-    <echo message="Using classpath=&apos;${build.dir}/classes&apos;" />
-    <echo message="Running sax.Counter ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="sax.Counter">
-       <arg value="${data.dir}/personal.xml"/>
-    </java>
-    <echo message="Running sax.Writer ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="sax.Writer">
-       <arg value="${data.dir}/personal.xml"/>
-    </java>
-    <echo message="Running dom.Counter ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.Counter">
-       <arg value="${data.dir}/personal.xml"/>
-    </java>
-    <echo message="Running dom.Writer ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.Writer">
-       <arg value="${data.dir}/personal.xml"/>
-    </java>
-    <!--
-    <echo message="Running DOMFilter ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.DOMFilter"
-          args="-p dom.wrappers.DOMParser ${data.dir}/personal.xml"/>
-    -->
-    <!-- The following are samples but not command-line applications.
-    <echo message="Running IteratorView ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.traversal.IteratorView"
-          args="${data.dir}/personal.xml"/>
-    <echo message="Running TreeWalkerView ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.traversal.TreeWalkerView"
-          args="${data.dir}/personal.xml"/>
-    <echo message="Running TreeViewer ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.TreeViewer"
-          args="${data.dir}/personal.xml"/>
-     -->
-    <echo message="Running dom.mem.Test ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.mem.Test">
-    </java>
-    <echo message="Running dom.DTest ..." />
-    <java fork="yes"
-          classpath="${build.dir}/classes"
-          classname="dom.DTest">
-    </java>
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Builds both old xerces and sample jar files                             -->
-  <!-- =================================================================== -->
-  <target name="oldjars" depends="oldjar, sampjar">
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Builds xercesImpl, xmlParserAPIs and sample jar files                             -->
-  <!-- =================================================================== -->
-  <target name="jars" depends="jar, sampjar, apijar">
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Builds and packages tools, sources and binary distributions                -->
-  <!-- =================================================================== -->
-  <target name="all" depends="pack-bin, oldpack-bin, pack-src, pack-tools">
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Builds and packages tools, sources and binary distributions                -->
-  <!-- =================================================================== -->
-  <target name="oldall" depends="pack-src, oldpack-bin, pack-tools">
-  </target>
-
-  <target name="prepare-schema-src">
-    <copy todir="${build.src}">
-        <fileset 
-            dir="${src.dir}"
-            includes="**/v2/**/*.java **/v2/**/*.properties"
-            excludes="**/v2/new_datatypes/**">
-        </fileset>
-    </copy>
-  </target>
-  
-  <target name="schema-all" depends="prepare-src, prepare-schema-src, pack-src, pack-bin">
-  </target>
-
-  <!-- =================================================================== -->
-  <!-- Cleans everything                                                   -->
-  <!-- =================================================================== -->
-  <target name="clean" depends="init">
-    <delete dir="${build.dir}"/>
-  </target>
-
-</project>
diff --git a/data/personal-schema.xml b/data/personal-schema.xml
deleted file mode 100644
index c2f725b..0000000
--- a/data/personal-schema.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	   xsi:noNamespaceSchemaLocation='personal.xsd'>
-
-  <person id="Big.Boss" >
-    <name><family>Boss</family> <given>Big</given></name>
-    <email>chief@foo.com</email>
-    <link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
-  </person>
-
-  <person id="one.worker">
-    <name><family>Worker</family> <given>One</given></name>
-    <email>one@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="two.worker">
-    <name><family>Worker</family> <given>Two</given></name>
-    <email>two@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="three.worker">
-    <name><family>Worker</family> <given>Three</given></name>
-    <email>three@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="four.worker">
-    <name><family>Worker</family> <given>Four</given></name>
-    <email>four@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="five.worker">
-    <name><family>Worker</family> <given>Five</given></name>
-    <email>five@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-</personnel>
diff --git a/data/personal.dtd b/data/personal.dtd
deleted file mode 100644
index c64e48a..0000000
--- a/data/personal.dtd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml encoding="UTF-8"?>
-<!ELEMENT personnel (person)+>
-
-<!ELEMENT person (name,email*,url*,link?)>
-<!ATTLIST person id ID #REQUIRED>
-<!ATTLIST person note CDATA #IMPLIED>
-<!ATTLIST person contr (true|false) 'false'>
-<!ATTLIST person salary CDATA #IMPLIED>
-
-<!ELEMENT name ((family,given)|(given,family))>
-
-<!ELEMENT family (#PCDATA)>
-
-<!ELEMENT given (#PCDATA)>
-
-<!ELEMENT email (#PCDATA)>
-
-<!ELEMENT url EMPTY>
-<!ATTLIST url href CDATA 'http://'>
-
-<!ELEMENT link EMPTY>
-<!ATTLIST link manager IDREF #IMPLIED>
-<!ATTLIST link subordinates IDREFS #IMPLIED>
-
-<!NOTATION gif PUBLIC '-//APP/Photoshop/4.0' 'photoshop.exe'>
diff --git a/data/personal.xml b/data/personal.xml
deleted file mode 100644
index ad492e4..0000000
--- a/data/personal.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE personnel SYSTEM "personal.dtd">
-<personnel>
-
-  <person id="Big.Boss">
-    <name><family>Boss</family> <given>Big</given></name>
-    <email>chief@foo.com</email>
-    <link subordinates="one.worker two.worker three.worker four.worker five.worker"/>
-  </person>
-
-  <person id="one.worker">
-    <name><family>Worker</family> <given>One</given></name>
-    <email>one@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="two.worker">
-    <name><family>Worker</family> <given>Two</given></name>
-    <email>two@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="three.worker">
-    <name><family>Worker</family> <given>Three</given></name>
-    <email>three@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="four.worker">
-    <name><family>Worker</family> <given>Four</given></name>
-    <email>four@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-  <person id="five.worker">
-    <name><family>Worker</family> <given>Five</given></name>
-    <email>five@foo.com</email>
-    <link manager="Big.Boss"/>
-  </person>
-
-</personnel>
diff --git a/data/personal.xsd b/data/personal.xsd
deleted file mode 100644
index 274b09b..0000000
--- a/data/personal.xsd
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
-
- <xs:element name="personnel">
-  <xs:complexType>
-   <xs:sequence>
-     <xs:element ref="person" minOccurs='1' maxOccurs='unbounded'/>
-   </xs:sequence>
-  </xs:complexType>
-
-  <xs:unique name="unique1">
-   <xs:selector xpath="person"/>
-   <xs:field xpath="name/given"/>
-   <xs:field xpath="name/family"/>
-  </xs:unique>
-  <xs:key name='empid'>
-   <xs:selector xpath="person"/>
-   <xs:field xpath="@id"/>
-  </xs:key>
-  <xs:keyref name="keyref1" refer='empid'>
-   <xs:selector xpath="person"/> 
-   <xs:field xpath="link/@manager"/>  
-  </xs:keyref>
-
- </xs:element>
-
- <xs:element name="person">
-  <xs:complexType>
-   <xs:sequence>
-     <xs:element ref="name"/>
-     <xs:element ref="email" minOccurs='0' maxOccurs='unbounded'/>
-     <xs:element ref="url"   minOccurs='0' maxOccurs='unbounded'/>
-     <xs:element ref="link"  minOccurs='0' maxOccurs='1'/>
-   </xs:sequence>
-   <xs:attribute name="id"  type="xs:ID" use='required'/>
-   <xs:attribute name="note" type="xs:string"/>
-   <xs:attribute name="contr" default="false">
-    <xs:simpleType>
-     <xs:restriction base = "xs:string">
-       <xs:enumeration value="true"/>
-       <xs:enumeration value="false"/>
-     </xs:restriction>
-    </xs:simpleType>
-   </xs:attribute>
-   <xs:attribute name="salary" type="xs:integer"/>
-  </xs:complexType>
- </xs:element>
-
- <xs:element name="name">
-  <xs:complexType>
-   <xs:all>
-    <xs:element ref="family"/>
-    <xs:element ref="given"/>
-   </xs:all>
-  </xs:complexType>
- </xs:element>
-
- <xs:element name="family" type='xs:string'/>
-
- <xs:element name="given" type='xs:string'/>
-
- <xs:element name="email" type='xs:string'/>
-
- <xs:element name="url">
-  <xs:complexType>
-   <xs:attribute name="href" type="xs:string" default="http://"/>
-  </xs:complexType>
- </xs:element>
-
- <xs:element name="link">
-  <xs:complexType>
-   <xs:attribute name="manager" type="xs:IDREF"/>
-   <xs:attribute name="subordinates" type="xs:IDREFS"/>
-  </xs:complexType>
- </xs:element>
-
- <xs:notation name='gif' public='-//APP/Photoshop/4.0' system='photoshop.exe'/>
-
-</xs:schema>
diff --git a/design/architecture.html b/design/architecture.html
deleted file mode 100644
index 39c7505..0000000
--- a/design/architecture.html
+++ /dev/null
@@ -1,286 +0,0 @@
-<!-- $Id$ -->
-<html>
- <head>
-  <title>Xerces 2 | Architecture</title>
-  <link rel='stylesheet' type='text/css' href='css/site.css'>
-  <link rel='stylesheet' type='text/css' href='css/diagram.css'>
-  <style type='text/css'>
-   .note { font-size: smaller }
-   .pipeline { color: black; background: white;
-               border-style: solid; border-color: black; border-width: 1;
-               font-weight: normal  }
-  </style>
- </head>
- <body>
-  <span class='netscape'>
-  <a name='TOP'></a>
-  <h1>Xerces2 Architecture</h1>
-  <h2>Table of Contents</h2>
-  <p>
-   <ul>
-    <li><a href='#Overview'>Overview</a></li>
-    <li><a href='#DocumentInformation'>Document Information</a></li>
-    <li>
-     <a href='#ParserConfiguration'>Parser Configuration</a>
-     <ul>
-      <li><a href='#Configuration.FeaturesAndProperties'>Features &amp; Properties</a></li>
-      <li><a href='#Configuration.SettingsManagement'>Settings Management</a></li>
-     </ul>
-    </li>
-   </ul>
-  </p>
-  <hr>
-  <a name='Overview'></a>
-  <h2>Overview</h2>
-  <p>
-   The Xerces Native Interface (XNI) is a framework for communicating
-   a "streaming" document information set and constructing generic parser
-   configurations. XNI is part of the Xerces2 development but it is
-   important to note that the Xerces2 parser is just a standards compliant
-   reference implementation of the Xerces Native Interface. Other parsers 
-   can be written that conform to XNI without conforming to any particular 
-   standards.
-  </p>
-  <a name='DocumentInformation'></a>
-  <h2>Document Information</h2>
-  <p>
-   An XML parser can be viewed as a pipeline in which information flows 
-   from a scanner to a validator to the parser. In this pipeline, one 
-   component (the scanner) acts as a source of events; the final component 
-   (the parser) is the final target of the events; and any components 
-   between the source and target are known as filters. Filter components 
-   are both targets for the information sent by the previous component in 
-   the pipeline and sources for the information that the filter chooses to 
-   propagate to the next component in the pipeline. The following diagram 
-   illustrates the layout of the pipeline in this kind of parser.
-  </p>
-  <p>
-   <table border='2' cellpadding='10' cellspacing='0'>
-    <tr class='diagram'>
-     <td>
-      <table cellpadding='7' cellspacing='0'>
-       <tr class='diagram'>
-        <td class='diagram'>XML<br>Document</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='component'>Scanner</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='component'>Validator</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='component'>Parser</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='diagram'>Application<br>API</td>
-       </tr>
-      </table>
-     </td>
-    </tr>
-   </table>
-  </p>
-  <p>
-   Parsing of DTDs can also be viewed as a pipeline. Since the
-   DTD is referenced in the document instance by XML syntax
-   (the DOCTYPE declaration), the DTD pipeline is triggered by 
-   the document scanner. This contrasts with XML Schema because
-   there is no XML syntax that associates a Schema grammar with
-   a document; a special attribute in the document instance is
-   used as a <em>hint</em> to the location of the grammar. The 
-   following diagram illustrates the layout of the DTD pipeline.
-  </p>
-  <p>
-   <table border='2' cellpadding='10' cellspacing='0'>
-    <tr class='diagram'>
-     <td>
-      <table cellpadding='7' cellspacing='0'>
-       <tr class='diagram'>
-        <td class='diagram'>DTD<br>Document</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='component'>DTD<br>Scanner</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='component' rowspan='3'>Validator</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='component'>Parser</td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='diagram'>Application<br>API</td>
-       </tr>
-       <tr><td>&nbsp;</td></tr>
-       <tr class='diagram'>
-        <td></td>
-        <td></td>
-        <td></td>
-        <td></td>
-        <td><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <td class='component'>DTD<br>Grammar</td>
-       </tr>
-      </table>
-     </td>
-    </tr>
-   </table>
-  </p>
-  <p>
-   Note that the DTD scanner communicates directly with the validator.
-   The validator receives the callbacks from the DTD scanner in order
-   to create and populate the DTD grammar object. In this way, the
-   validator acts as a "tee", propogating the DTD events to both
-   the next stage in the pipeline and the DTD grammar object. This
-   allows the validation stage in the pipeline to be completely 
-   removed from the parser configuration, if needed.
-  </p>
-  <p>
-   The XML document information is defined by the 
-   <code><a href='design.html#XMLDocumentHandler'>XMLDocumentHandler</a></code>
-   interface and the DTD information is defined by the 
-   <code><a href='design.html#XMLDTDHandler'>XMLDTDHandler</a></code>
-   and
-   <code><a href='design.html#XMLDTDContentModelHandler'>XMLDTDContentModelHandler</a></code>
-   interfaces. 
-   (Note: As of 10 Apr 2001, the DTD interfaces are subject to change 
-    based on user feedback.)
-   This set of interfaces and supporting interfaces and classes
-   comprise the XNI Core. However, whereas the XNI Core defines what 
-   information document and DTD is communicated but does not define 
-   the semantics for configuring the parser pipeline.
-  </p>
-
-  <a name='ParserConfiguration'></a>
-  <h2>Parser Configuration</h2>
-  <p>
-   In the XNI world, a parser object used by an application is merely an
-   API generator (e.g. building DOM trees or calling SAX handlers). The 
-   components and configuration information for that parser is defined 
-   within a parser configuration object. With this approach, different 
-   parser configurations can be used with the existing parser instances 
-   without duplicating code.
-  </p>
-  <p>
-   The parser configuration object, defined by the
-   <code><a href='design.html#XMLParserConfiguration'>XMLParserConfiguration</a></code>
-   interface, that is used by the application is comprised of a series of 
-   components. The parser configuration assembles the parsing pipeline 
-   components, transmits settings to each component, and controls their 
-   actions. The following diagram shows a general parser configuration 
-   and its components. (No ordering or direct connection between 
-   components should be implied.)
-  </p>
-  <p>
-   <table border='2' cellspacing='0' cellpadding='7'>
-    <tr class='diagram'>
-     <td>
-      <table border='0' cellspacing='5' cellpadding='5'>
-       <tr align='center' valign='middle'>
-        <th class='manager' colspan='9'>Parser Configuration</th>
-       </tr>
-       <tr align='center' valign='middle'>
-        <td class='non-config-component'>Symbol<br>Table</td>
-        <td class='non-config-component'>Grammar<br>Pool</td>
-        <td class='non-config-component'>Datatype<br>Validator<br>Factory</td>
-        <td class='config-component'>Error<br>Reporter</td>
-        <td class='config-component'>Entity<br>Manager</td>
-        <td class='config-component'>Document<br>Scanner</td>
-        <td class='config-component'>DTD<br>Scanner</td>
-        <td class='config-component'>Validator</td>
-       </tr>
-      </table>
-     </td>
-    </tr>
-   </table>
-  </p>
-  <p>
-   The workings of the parser configuration object are unknown to
-   the parser. The parser is only able to set features and properties 
-   on the configuration, set the XNI handlers to receive the document
-   information, and initiate a parse. Typically the parser object
-   itself will be registered as the target of XNI events produced 
-   from the parser configuration when a document is parsed, but it
-   doesn't have to be. The following diagram illustrates this
-   situation.
-  </p>
-  <p>
-   <table border='2' cellspacing='0' cellpadding='7'>
-    <tr class='diagram'>
-     <td>
-      <table border='0' cellspacing='5' cellpadding='5'>
-       <tr align='center' valign='top'>
-        <th class='parser' colspan='9' rowspan='2'>
-         Parser
-         <table border='0' cellspacing='5' cellpadding='5'>
-          <th class='pipeline'>
-           <em>Parser Configuration Pipeline</em>
-           <table border='0' cellspacing='0' cellpadding='5'>
-            <tr>
-             <td class='config-component'>Scanner</td>
-             <td valign='center'><img alt='--&gt;' src='images/arrow-right.gif'></td>
-             <td class='config-component'>Validator</td>
-             <td valign='center'><img alt='--&gt;' src='images/arrow-right.gif'></td>
-            </tr>
-           </table>
-          </th>
-         </table>
-        </th>
-        <td valign='center'><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <th class='parser'>DOM<br>Parser</th>
-       </tr>
-       <tr align='center' valign='top'>
-        <td valign='center'><img alt='--&gt;' src='images/arrow-right.gif'></td>
-        <th class='parser'>SAX<br>Parser</th>
-       </tr>
-      </table>
-     </td>
-    </tr>
-   </table>
-
-  <a name='Configuration.FeaturesAndProperties'></a>
-  <h3>Features &amp; Properties</h3>
-  <p>
-   Features and properties are provided via the extensible mechanism
-   found in SAX2. Features are boolean settings on the parser 
-   configuration while properties are object settings. There are a 
-   number of SAX2 core features and properties but XNI parser components 
-   are free to define new ones. All of the features and properties are
-   managed by the parser configuration, though.
-  </p>
-  <p>
-   <em>TODO:</em> Expand on how features and properties are set, when,
-   and by who.
-  </p>
-
-  <a name='Configuration.SettingsManagement'></a>
-  <h3>Settings Management</h3>
-  <p>
-   The parser configuration implements the 
-   <code><a href='design.html#XMLComponentManager'>XMLComponentManager</a></code> 
-   interface and each component implements the 
-   <code><a href='design.html#XMLComponent'>XMLComponent</a></code> 
-   interface. For this configuration system to work, the parser
-   configuration must adhere to the following guidelines:
-   <span class='netscape'>
-   <ul>
-    <li>
-     Before each parse, the parser configuration <strong>must</strong> 
-     call the <code>reset</code> method on each configurable component.
-     This call allows each component to query the state of only
-     those features and properties that are important to the operation
-     of the component.
-    </li>
-    <li>
-     Any time that the application sets a feature or property on the 
-     parser <em>during a parse</em>, the parser configuration
-     <strong>must</strong> pass those settings to each configurable 
-     component. This is important because configuration settings can 
-     change while parsing an XML document and those settings may 
-     directly affect the operation of components. But this does 
-     <em>not</em> need to be done before or after a parse because 
-     each component will query settings during the call to 
-     <code>reset</code>.
-    </li>
-   </ul>
-   </span>
-  </p>
-
-  </span>
-  <a name='BOTTOM'></a>
-  <hr>
-  <span class='netscape'>
-   Author: Andy Clark <br>
-   Last modified: $Date$
-  </span>
- </body>
-</html>
\ No newline at end of file
diff --git a/design/coding.html b/design/coding.html
deleted file mode 100644
index 86b1d4c..0000000
--- a/design/coding.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<html>
- <head>
-  <title>Xerces 2 | Coding</title>
-  <link rel='stylesheet' type='text/css' href='css/site.css'>
- </head>
- <body>
-  <span class='netscape'>
-  <a name='TOP'></a>
-  <h1>Coding Conventions</h1>
-  <a name='TheProblem'></a>
-  <h2>The Problem</h2>
-  <p>
-   As with any coding effort, there are always arguments over
-   what coding conventions to use. Everyone thinks that they
-   have the best style which leads to the entire source tree 
-   looking different. This causes consternation as 
-   well as eye fatigue on subsequent developers that need to 
-   maintain the code. Therefore, we are going to make an 
-   <em>attempt</em> at defining some basic coding conventions 
-   for the Xerces 2 concept implementation.
-  </p>
-  <a name='Conventions'></a>
-  <h2>Conventions</h2>
-  <a name='Conventions.Comments'></a>
-  <h3>Comments</h3>
-  <p>
-   In general, code should be documented with comments. Complete
-   javadoc comments should be used for interfaces and classes;
-   constants; fields; methods; etc, regardless of their
-   visibility.
-  </p>
-  <a name='Conventions.Whitespace'></a>
-  <h3>Whitespace</h3>
-  <p>
-   Do not indent using tab characters -- they invariably display 
-   differently in everyone's editor or development environment. 
-   If your editor does this by default, then turn that feature off.
-   Use 4 space characters for each indention level. Also, each 
-   line of code, with indentation, should not exceed 80 characters. 
-  </p>
-  <a name='Conventions.Names'></a>
-  <h3>Names</h3>
-  <p>
-   The convention for names is pretty easy and follows the 
-   standard Java coding convention, except where there is no common
-   convention. Unless otherwise stated, all names will follow
-   the "camel-case" convention where the first letter of each
-   word in the name is capitalized while the remaining letters
-   are left lowercase (e.g. "camelCase"). Words in the name
-   shall not be separated with underscore ('_') characters.
-  </p>
-  <p>
-   <dl>
-    <a name='Conventions.Names.InterfacesAndClasses'></a>
-    <dt>Interfaces &amp; Classes</dt>
-    <dd>
-     The names of interfaces and classes shall start with an
-     uppercase letter and follow the standard camel-case
-     convention. If a word in the name is an acronym, the
-     acronym is left uppercase.
-     <ul>
-      <li><strong>Good:</strong> StringBuffer XMLDocumentHandler</li>
-      <li><strong>Bad:</strong> stringBuffer XmlDocumentHandler</li>
-     </ul>
-    </dd>
-    <a name='Conventions.Names.Constants'></a>
-    <dt>Constants</dt>
-    <dd>
-     Constant names are the one major place where the convention
-     for names is not followed. The names of constants shall be
-     written in uppercase, separating each word in the name with
-     an underscore character.
-     <ul>
-      <li><strong>Good:</strong> WRONG_DOCUMENT</li>
-      <li><strong>Bad:</strong> wrongDocument</li>
-     </ul>
-    </dd>
-    <a name='Conventions.Names.Fields'></a>
-    <dt>Fields</dt>
-    <dd>
-     The naming convention for fields differ than the code in
-     the standard Java libraries where each field starts with a 
-     lowercase letter and then uses camel-case for the field 
-     name. Subsequently, using these field names in code causes 
-     confusion as to whether a field is local to the method or 
-     global to the class. Because there are different types of
-     fields, we have selected different types of conventions
-     which are detailed below. When naming a field, follow the
-     first rule that applies, with the rules appearing first
-     in this list having more precedence.
-    </dd>
-    <a name='Conventions.Names.PublicFields'></a>
-    <dt>Public Fields</dt>
-    <dd>
-     When a class is designed to be used as a "structure" with 
-     public fields, follow the standard Java convention. For an
-     example of a	 structure, refer to the
-     <a href='design.html#QName'>QName</a> class.
-     <ul>
-      <li><strong>Good:</strong> type value</li>
-      <li><strong>Bad:</strong> fType</li>
-     </ul>
-    </dd>
-    <a name='Conventions.Names.LocalFields'></a>
-    <dt>Local Fields</dt>
-    <dd>
-     The letter 'f' is used as a prefix on fields with local
-     object scope. Acronyms are still capitalized as part of
-     the field name.
-     <ul>
-      <li><strong>Good:</strong> fStack fIANA2JavaMap</li>
-      <li><strong>Bad:</strong> uri</li>
-     </ul>
-    </dd>
-    <a name='Conventions.Names.StaticFields'></a>
-    <dt>Static Fields</dt>
-    <dd>
-     Static fields are prefixed with an 'f' to denote that it
-     is a field and a 'g' to denote that it's scope is global
-     to <em>all</em> instances of that class.
-     <ul>
-      <li><strong>Good:</strong> fgData</li>
-      <li><strong>Bad:</strong> data</li>
-     </ul>
-    </dd>
-    <a name='Conventions.Names.Methods'></a>
-    <dt>Methods</dt>
-    <dd>
-     Method names follow the camel-case rule.
-    </dd>
-   </dl>
-  </p>
-  <a name='Conventions.BlockStyle'></a>
-  <h3>Block Style</h3>
-  <p>
-   Another controversial coding convention is the code block
-   style. For the code in the Xerces2 implementation, it is 
-   agreed to use the following block style:
-   <ul>
-    <li>All indent levels are 4 space characters</li>
-    <li>Opening brace on same line as start of block</li>
-    <li>Code is indented 4 space characters from start of block</li>
-    <li>Closing brace on separate line and aligned with start of block</li>
-   </ul>
-  </p>
-  <p>
-   Here is an example:
-   <pre>
-    for (int i = 0; i &lt; 10; i++) {
-        // do something
-    }
-   </pre>
-  </p>
-  </span>
-  <a name='BOTTOM'></a>
-  <hr>
-  <span class='netscape'>
-   Author: Andy Clark <br>
-   Last modified: $Date$
-  </span>
- </body>
-</html>
\ No newline at end of file
diff --git a/design/crimson.html b/design/crimson.html
deleted file mode 100644
index 8914696..0000000
--- a/design/crimson.html
+++ /dev/null
@@ -1,94 +0,0 @@
-<!-- $Id$ -->
-<html>
- <head>
-  <title>Xerces 2 | Crimson</title>
-  <link rel='stylesheet' type='text/css' href='css/site.css'>
- </head>
- <body>
-  <span class='netscape'>
-  <a name='TOP'></a>
-  <h1>Evaluation of Crimson Code</h1>
-  <a name='Overview'></a>
-  <h2>Overview</h2>
-  <p>
-   The Crimson code donated to the <a href='http://xml.apache.org/'>XML
-   Apache Project</a> by <a href='http://www.sun.com/'>Sun Microsystems</a>
-   is a relatively clean and straightforward implementation of a
-   conforming <a href='http://www.w3.org/XML/'>XML</a> parser. However,
-   there are some serious drawbacks to its design that hamper its use
-   in the Xerces2 effort. This page will highlight some of the problems
-   that I see with the Crimson code. This doesn't mean, however, that
-   there aren't good ideas in Crimson! I'll highlight some of the things
-   that I like about Crimson as well.
-  </p>
-  <a name='TheGood'></a>
-  <h2>The Good</h2>
-  <p>
-   <table border='0'>
-    <tr>
-     <th>Size:</th>
-     <td>Crimson has a small code footprint.</td>
-    </tr>
-    <tr>
-     <th>Simplicity:</th>
-     <td>
-      The code is very straightforward and easy to grok. I especially
-      like the simple approach to reading the input streams. The advanced
-      reader code in Xerces has been a continual source of bugs and
-      developer confusion. See my <a href='xerces.html'>evaluation of
-      Xerces</a> for more detail.
-     </td>
-    </tr>
-   </table>
-  </p>
-  <a name='TheBad'></a>
-  <h2>The Bad</h2>
-  <p>
-   <table border='0'>
-    <tr>
-     <th>Standards:</th>
-     <td>
-      Crimson is lacking implementation of important standards. Some
-      examples are DOM Level 2 and XML Schema.
-     </td>
-    </tr>
-    <tr>
-     <th>Modularity:</th>
-     <td>
-      The design of Crimson is not modular enough to be of general
-      use in a wide variety of applications. For example, the document
-      and DTD scanning code is hard-coded into the parser. Also, a lot
-      of the classes used by the parser rely on package visibility of
-      members. (Yuck!)
-     </td>
-    </tr>
-    <tr>
-     <th>Validation:</th>
-     <td>
-      The validation engine is rather simplistic and not very fast.
-      Plus, it doesn't seem to be able to handle the advanced
-      validation requirements of XML Schema.
-     </td>
-    </tr>
-    <tr>
-     <th>Performance:</th>
-     <td>
-      The general performance of the Crimson code is good but there
-      are some areas where it can (and should) be tuned for performance.
-      First, validation is not as fast as it could be but there are
-      comments in the code that suggest "compiling" the model into a
-      DFA for faster validation. Also, the DOM implementation wastes a
-      lot memory when traversing the document.
-     </td>
-    </tr>
-   </table>
-  </p>
-  </span>
-  <a name='BOTTOM'></a>
-  <hr>
-  <span class='netscape'>
-   Author: Andy Clark <br>
-   Last modified: $Date$
-  </span>
- </body>
-</html>
\ No newline at end of file
diff --git a/design/css/design.css b/design/css/design.css
deleted file mode 100644
index f2faa63..0000000
--- a/design/css/design.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/* $Id$ */
-.class { background: #DDDDFF }
-.class-title { font: bold }
-
-.interface { background: #FFDDDD }
-.interface-title { font: italic }
-
-.extends { }
-.implements { }
-
-.constants { }
-.constant-title { }
-
-.fields { }
-.field-title { }
-
-.constructors { }
-.constructor-title { text-decoration: underline }
-
-.methods { }
-.method-title { text-decoration: underline }
-.param-title { }
diff --git a/design/css/diagram.css b/design/css/diagram.css
deleted file mode 100644
index 8a7124c..0000000
--- a/design/css/diagram.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/* $Id$ */
-.diagram { color: black; background: white; 
-           font-weight: normal;
-           text-align: center; vertical-align: middle }
-.component { color: black; background: silver;
-             border-style: solid; border-color: black; border-width: 2 }
-.parser { color: black; background: #FFFFDD; 
-           border-style: solid; border-color: black; border-width: 1;
-           text-align: center; vertical-align: middle }
-.manager { color: black; background: #DDDDFF; 
-           border-style: solid; border-color: black; border-width: 1;
-           text-align: center; vertical-align: middle }
-.config-component { color: black; background: #FFDDDD; 
-                    border-style: solid; border-color: black; border-width: 1;
-                    font-weight: normal; 
-                    text-align: center; vertical-align: middle }
-.non-config-component { color: black; background: silver; 
-                        border-style: solid; border-color: black; border-width: 1;
-                        font-weight: normal; 
-                        text-align: center; vertical-align: middle }
diff --git a/design/css/index.css b/design/css/index.css
deleted file mode 100644
index 36dc619..0000000
--- a/design/css/index.css
+++ /dev/null
@@ -1,2 +0,0 @@
-BODY { background: white }
-H1 { text-align: center }
diff --git a/design/css/site.css b/design/css/site.css
deleted file mode 100644
index 5e19b42..0000000
--- a/design/css/site.css
+++ /dev/null
@@ -1,26 +0,0 @@
-BODY { background: white; color: black; 
-       font-weight: bold }
-
-H1 { background: #0086b2; color: white; text-align: center }
-H2, H3, H4, H5, H6 { background: #0086b2; color: white }
-
-P { color: black; font-weight: normal; text-align: justify; 
-    margin-left: 20; margin-right: 20 }
-
-A { color: blue; text-decoration: underline }
-A:hover { color: red; text-decoration: underline }
-A:visited { color: blue; text-decoration: underline }
-
-DL { margin-right: 20; margin-left: 20 }
-DT { color: black; font-weight: bold; padding-top: 5 }
-
-TABLE { font-weight: normal }
-TR { vertical-align: top }
-TH { background: #0086b2; color: white; text-align: left }
-TD { color: black; font-weight: normal }
-
-STRONG { color: black }
-
-.netscape { color: black; font-weight: normal }
-.copyright { font-size: 8pt; font-style: italic;
-             text-align: center }
\ No newline at end of file
diff --git a/design/design.html b/design/design.html
deleted file mode 100644
index 7d1e1f1..0000000
--- a/design/design.html
+++ /dev/null
@@ -1,2368 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
-                      "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd">
-<HTML>
- <HEAD>
-  <TITLE>Xerces 2 | Design</TITLE>
-  <LINK href="css/index.css" rel="stylesheet" type="text/css">
-  <LINK href="css/design.css" rel="stylesheet" type="text/css">
- </HEAD>
- <BODY>
-  <H1 align="center">Xerces-J 2.0       Design     </H1>
-  <H2>Classes and Interfaces</H2>
-  <H3>Xerces Native Interface (XNI)</H3>
-  <BLOCKQUOTE>
-   <A name="XMLDocumentHandler"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLDocumentHandler</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">startDocument</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">xmlDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">version</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">standalone</SPAN>          )
-       <LI>
-        <SPAN class="method-title">doctypeDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">rootElement</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">comment</SPAN>      (   <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">processingInstruction</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">target</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">data</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startPrefixMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">prefix</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">uri</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">textDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">version</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startElement</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">element</SPAN>, <SPAN
-        class="interface-title">XMLAttributes</SPAN> <SPAN
-        class="param-title">attributes</SPAN>          )
-       <LI>
-        <SPAN class="method-title">emptyElement</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">element</SPAN>, <SPAN
-        class="interface-title">XMLAttributes</SPAN> <SPAN
-        class="param-title">attributes</SPAN>          )
-       <LI>
-        <SPAN class="method-title">characters</SPAN>      (   <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">ignorableWhitespace</SPAN>      (
-         <SPAN class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endElement</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">element</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endPrefixMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">prefix</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startCDATA</SPAN>      (
-        )
-       <LI>
-        <SPAN class="method-title">endCDATA</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">endDocument</SPAN>      (
-        )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLDocumentFragmentHandler"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLDocumentFragmentHandler</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">startDocumentFragment</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>, <SPAN
-        class="interface-title">NamespaceContext</SPAN> <SPAN
-        class="param-title">namespaceContext</SPAN>          )
-       <LI>
-        <SPAN class="method-title">comment</SPAN>      (   <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">processingInstruction</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">target</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">data</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startPrefixMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">prefix</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">uri</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startElement</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">element</SPAN>, <SPAN
-        class="interface-title">XMLAttributes</SPAN> <SPAN
-        class="param-title">attributes</SPAN>          )
-       <LI>
-        <SPAN class="method-title">emptyElement</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">element</SPAN>, <SPAN
-        class="interface-title">XMLAttributes</SPAN> <SPAN
-        class="param-title">attributes</SPAN>          )
-       <LI>
-        <SPAN class="method-title">characters</SPAN>      (   <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">ignorableWhitespace</SPAN>      (
-         <SPAN class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endElement</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">element</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endPrefixMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">prefix</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startCDATA</SPAN>      (
-        )
-       <LI>
-        <SPAN class="method-title">endCDATA</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">textDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">version</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endDocumentFragment</SPAN>      (
-        )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="NamespaceContext"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">NamespaceContext</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="constant-title">XMLNS</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getParentContext</SPAN>      (
-        )       :    <SPAN class="interface-title">NamespaceContext</SPAN>
-       <LI>
-        <SPAN class="method-title">getURI</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">prefix</SPAN>          )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">getDeclaredPrefixCount</SPAN>      (
-        )       :    int
-       <LI>
-        <SPAN class="method-title">getDeclaredPrefixAt</SPAN>      (
-        int <SPAN class="param-title">index</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLDTDHandler"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLDTDHandler</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>short <SPAN class="constant-title">CONDITIONAL_INCLUDE</SPAN>
-       <LI>short <SPAN class="constant-title">CONDITIONAL_IGNORE</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">startDTD</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">comment</SPAN>      (   <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">processingInstruction</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">target</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">data</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">textDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">version</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )
-       <LI>
-        <SPAN class="method-title">elementDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">contentModel</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startAttlist</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>          )
-       <LI>
-        <SPAN class="method-title">attributeDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">attributeName</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">type</SPAN>, <SPAN
-        class="class-title">String</SPAN>[]   <SPAN
-        class="param-title">enumeration</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">defaultType</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">defaultValue</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endAttlist</SPAN>      (
-        )
-       <LI>
-        <SPAN class="method-title">internalEntityDecl</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">externalEntityDecl</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">unparsedEntityDecl</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">notation</SPAN>          )
-       <LI>
-        <SPAN class="method-title">notationDecl</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startConditional</SPAN>      (
-        short <SPAN class="param-title">type</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endConditional</SPAN>      (
-        )
-       <LI>
-        <SPAN class="method-title">endDTD</SPAN>      (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLDTDContentModelHandler"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLDTDContentModelHandler</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>short <SPAN class="constant-title">SEPARATOR_CHOICE</SPAN>
-       <LI>short <SPAN class="constant-title">SEPARATOR_SEQUENCE</SPAN>
-       <LI>short <SPAN class="constant-title">OCCURS_ZERO_OR_ONE</SPAN>
-       <LI>short <SPAN class="constant-title">OCCURS_ZERO_OR_MORE</SPAN>
-       <LI>short <SPAN class="constant-title">OCCURS_ONE_OR_MORE</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">startContentModel</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>          )
-       <LI>
-        <SPAN class="method-title">any</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">empty</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">startGroup</SPAN>      (
-        )
-       <LI>
-        <SPAN class="method-title">pcdata</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">element</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>          )
-       <LI>
-        <SPAN class="method-title">separator</SPAN>      (   short <SPAN
-        class="param-title">separator</SPAN>          )
-       <LI>
-        <SPAN class="method-title">occurrence</SPAN>      (   short
-         <SPAN class="param-title">occurrence</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endGroup</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">endContentModel</SPAN>      (
-        )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="QName"><DL class="class">
-     <DT>class <SPAN class="class-title">QName</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">prefix</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">localpart</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">rawname</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">uri</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">prefix</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">localpart</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">rawname</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">uri</SPAN>          )
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLString"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLString</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>char[]   <SPAN class="field-title">ch</SPAN>
-       <LI>int <SPAN class="field-title">offset</SPAN>
-       <LI>int <SPAN class="field-title">length</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLString</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">XMLString</SPAN>      (   char[]
-         <SPAN class="param-title">ch</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, int <SPAN
-        class="param-title">length</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   char[]
-         <SPAN class="param-title">ch</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, int <SPAN
-        class="param-title">length</SPAN>          )
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">equals</SPAN>      (   char[]   <SPAN
-        class="param-title">ch</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, int <SPAN
-        class="param-title">length</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">equals</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">s</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">toString</SPAN>      (             )
-        :    <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLAttributes"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLAttributes</SPAN>
-     <DD class="extends">      extends      <SPAN class="interface-title">AttributeList</SPAN>
-      <SPAN class="interface-title">Attributes</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">addAttribute</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">type</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">value</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">removeAttributeAt</SPAN>      (   int
-         <SPAN class="param-title">index</SPAN>          )
-       <LI>
-        <SPAN class="method-title">removeAllAttributes</SPAN>      (
-        )
-       <LI>
-        <SPAN class="method-title">removeAllEntitiesFor</SPAN>      (
-        int <SPAN class="param-title">attrIndex</SPAN>          )
-       <LI>
-        <SPAN class="method-title">addAttributeEntity</SPAN>      (
-        int <SPAN class="param-title">index</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, int <SPAN
-        class="param-title">length</SPAN>          )
-       <LI>
-        <SPAN class="method-title">removeEntityAt</SPAN>      (   int
-         <SPAN class="param-title">attrIndex</SPAN>, int <SPAN
-        class="param-title">entityIndex</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setName</SPAN>      (   int <SPAN
-        class="param-title">index</SPAN>, <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">name</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getName</SPAN>      (   int <SPAN
-        class="param-title">index</SPAN>, <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">name</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setType</SPAN>      (   int <SPAN
-        class="param-title">index</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">type</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getType</SPAN>      (   int <SPAN
-        class="param-title">index</SPAN>          )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">setValue</SPAN>      (   int <SPAN
-        class="param-title">index</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">value</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setNonNormalizedValue</SPAN>      (
-        int <SPAN class="param-title">index</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">value</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getNonNormalizedValue</SPAN>      (
-        int <SPAN class="param-title">index</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">setSpecified</SPAN>      (   int
-         <SPAN class="param-title">index</SPAN>, boolean <SPAN
-        class="param-title">specified</SPAN>          )
-       <LI>
-        <SPAN class="method-title">isSpecified</SPAN>      (   int <SPAN
-        class="param-title">index</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">getEntityCount</SPAN>      (   int
-         <SPAN class="param-title">attrIndex</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">getEntityName</SPAN>      (   int
-         <SPAN class="param-title">attrIndex</SPAN>, int <SPAN
-        class="param-title">entityIndex</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">getEntityOffset</SPAN>      (   int
-         <SPAN class="param-title">attrIndex</SPAN>, int <SPAN
-        class="param-title">entityIndex</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">getEntityLength</SPAN>      (   int
-         <SPAN class="param-title">attrIndex</SPAN>, int <SPAN
-        class="param-title">entityIndex</SPAN>          )       :    int
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XNIException"><DL class="class">
-     <DT>class <SPAN class="class-title">XNIException</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">fException</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XNIException</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">message</SPAN>          )
-       <LI>
-        <SPAN class="constructor-title">XNIException</SPAN>      (
-         <SPAN class="class-title">Exception</SPAN> <SPAN
-        class="param-title">exception</SPAN>          )
-       <LI>
-        <SPAN class="constructor-title">XNIException</SPAN>      (
-         <SPAN class="class-title">Exception</SPAN> <SPAN
-        class="param-title">exception</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">message</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getException</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>XNI: Parser Pipeline</H3>
-  <BLOCKQUOTE>
-   <A name="XMLComponent"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLComponent</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">reset</SPAN>      (   <SPAN
-        class="interface-title">XMLComponentManager</SPAN> <SPAN
-        class="param-title">componentManager</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getRecognizedFeatures</SPAN>      (
-         <SPAN class="class-title">String</SPAN>[]   <SPAN
-        class="param-title">recognizedFeatures</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setFeature</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">featureId</SPAN>, boolean <SPAN
-        class="param-title">state</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getRecognizedProperties</SPAN>      (
-         <SPAN class="class-title">String</SPAN>[]   <SPAN
-        class="param-title">recognizedProperties</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setProperty</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">propertyId</SPAN>, <SPAN
-        class="class-title">Object</SPAN> <SPAN
-        class="param-title">value</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLComponentManager"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLComponentManager</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getFeature</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">featureId</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">getProperty</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">propertyId</SPAN>          )       :
-         <SPAN class="class-title">Object</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLParserConfiguration"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLParserConfiguration</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">addRecognizedFeatures</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">featureIds</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setFeature</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">featureId</SPAN>, boolean <SPAN
-        class="param-title">state</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getFeature</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">featureId</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">addRecognizedProperties</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">propertyIds</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setProperty</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">propertyId</SPAN>, <SPAN
-        class="class-title">Object</SPAN> <SPAN
-        class="param-title">value</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getProperty</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">propertyId</SPAN>          )       :
-         <SPAN class="class-title">Object</SPAN>
-       <LI>
-        <SPAN class="method-title">setLocale</SPAN>      (   <SPAN
-        class="class-title">Locale</SPAN> <SPAN
-        class="param-title">locale</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setDocumentHandler</SPAN>      (
-         <SPAN class="interface-title">XMLDocumentHandler</SPAN> <SPAN
-        class="param-title">documentHandler</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setDTDHandler</SPAN>      (   <SPAN
-        class="interface-title">XMLDTDHandler</SPAN> <SPAN
-        class="param-title">dtdHandler</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setDTDContentModelHandler</SPAN>
-        (   <SPAN
-        class="interface-title">XMLDTDContentModelHandler</SPAN> <SPAN
-        class="param-title">dtdContentModelHandler</SPAN>          )
-       <LI>
-        <SPAN class="method-title">parse</SPAN>      (   <SPAN
-        class="class-title">InputSource</SPAN> <SPAN
-        class="param-title">inputSource</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Implementation: Core Components</H3>
-  <BLOCKQUOTE>
-   <A name="XMLErrorReporter"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLErrorReporter</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">XMLComponent</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>short <SPAN class="constant-title">SEVERITY_WARNING</SPAN>
-       <LI>short <SPAN class="constant-title">SEVERITY_ERROR</SPAN>
-       <LI>short <SPAN class="constant-title">SEVERITY_FATAL_ERROR</SPAN>
-      </UL>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">Locale</SPAN> <SPAN class="field-title">fLocale</SPAN>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="interface-title">MessageFormatter</SPAN>      &gt;
-         <SPAN class="field-title">fMessageFormatters</SPAN>
-       <LI>
-        <SPAN class="interface-title">ErrorHandler</SPAN> <SPAN class="field-title">fErrorHandler</SPAN>
-       <LI>boolean <SPAN class="field-title">fContinueAfterFatalError</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLErrorReporter</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setLocale</SPAN>      (   <SPAN
-        class="class-title">Locale</SPAN> <SPAN
-        class="param-title">locale</SPAN>          )
-       <LI>
-        <SPAN class="method-title">putMessageFormatter</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">domain</SPAN>, <SPAN
-        class="interface-title">MessageFormatter</SPAN> <SPAN
-        class="param-title">messageFormatter</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getMessageFormatter</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">domain</SPAN>          )       :    <SPAN class="interface-title">MessageFormatter</SPAN>
-       <LI>
-        <SPAN class="method-title">removeMessageFormatter</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">domain</SPAN>          )       :    <SPAN class="interface-title">MessageFormatter</SPAN>
-       <LI>
-        <SPAN class="method-title">reportError</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">domain</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">key</SPAN>, <SPAN
-        class="class-title">Object</SPAN>[]   <SPAN
-        class="param-title">arguments</SPAN>, short <SPAN
-        class="param-title">severity</SPAN>          )
-       <LI>
-        <SPAN class="method-title">reportError</SPAN>      (   <SPAN
-        class="interface-title">Locator</SPAN> <SPAN
-        class="param-title">location</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">domain</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">key</SPAN>, <SPAN
-        class="class-title">Object</SPAN>[]   <SPAN
-        class="param-title">arguments</SPAN>, short <SPAN
-        class="param-title">severity</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLDocumentScanner"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLDocumentScanner</SPAN>
-     <DD class="implements">      implements      <SPAN
-      class="interface-title">XMLComponent</SPAN>, <SPAN
-      class="class-title"></SPAN>, <SPAN class="interface-title">XMLEntityHandler</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">SymbolTable</SPAN> <SPAN class="field-title">fSymbolTable</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLErrorReporter</SPAN> <SPAN class="field-title">fErrorReporter</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLEntityManager</SPAN> <SPAN class="field-title">fEntityManager</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLDTDScanner</SPAN> <SPAN class="field-title">fDTDScanner</SPAN>
-       <LI>boolean <SPAN class="field-title">fNamespaces</SPAN>
-       <LI>
-        <SPAN class="interface-title">XMLDocumentHandler</SPAN> <SPAN class="field-title">fDocumentHandler</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLDocumentScanner</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">scanDocument</SPAN>      (   boolean
-         <SPAN class="param-title">complete</SPAN>          )       :    boolean
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLDTDScanner"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLDTDScanner</SPAN>
-     <DD class="implements">      implements      <SPAN
-      class="interface-title">XMLComponent</SPAN>, <SPAN
-      class="class-title"></SPAN>, <SPAN class="class-title"></SPAN>,
-       <SPAN class="interface-title">XMLEntityHandler</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">SymbolTable</SPAN> <SPAN class="field-title">fSymbolTable</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLErrorReporter</SPAN> <SPAN class="field-title">fErrorReporter</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLEntityManager</SPAN> <SPAN class="field-title">fEntityManager</SPAN>
-       <LI>
-        <SPAN class="interface-title">XMLDTDHandler</SPAN> <SPAN class="field-title">fDTDHandler</SPAN>
-       <LI>
-        <SPAN class="interface-title">XMLDTDContentModelHandler</SPAN>
-         <SPAN class="field-title">fDTDContentModelHandler</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLDTDScanner</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">scanDTD</SPAN>      (   boolean <SPAN
-        class="param-title">complete</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">scanDTDFragment</SPAN>      (
-        boolean <SPAN class="param-title">complete</SPAN>          )
-        :    boolean
-       <LI>
-        <SPAN class="method-title">scanDTDInternalSubset</SPAN>      (
-        boolean <SPAN class="param-title">complete</SPAN>, boolean <SPAN
-        class="param-title">standalone</SPAN>, boolean <SPAN
-        class="param-title">hasExternalDTD</SPAN>          )       :    boolean
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLEntityManager"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLEntityManager</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">XMLComponent</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="interface-title">EntityResolver</SPAN> <SPAN class="field-title">fEntityResolver</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLEntityScanner</SPAN> <SPAN class="field-title">fEntityReader</SPAN>
-       <LI>
-        <SPAN class="interface-title">XMLEntityHandler</SPAN> <SPAN class="field-title">fEntityHandler</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLEntityManager</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setEntityHandler</SPAN>      (
-         <SPAN class="interface-title">XMLEntityHandler</SPAN> <SPAN
-        class="param-title">entityHandler</SPAN>          )
-       <LI>
-        <SPAN class="method-title">addExternalEntity</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">addInternalEntity</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">text</SPAN>          )
-       <LI>
-        <SPAN class="method-title">addUnparsedEntity</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">notation</SPAN>          )
-       <LI>
-        <SPAN class="method-title">isDeclaredEntity</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isExternalEntity</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isUnparsedEntity</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">setStandalone</SPAN>      (   boolean
-         <SPAN class="param-title">standalone</SPAN>          )
-       <LI>
-        <SPAN class="method-title">isStandalone</SPAN>      (
-        )       :    boolean
-       <LI>
-        <SPAN class="method-title">expandSystemId</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>          )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">expandSystemId</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">resolveEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>          )       :
-         <SPAN class="class-title">XMLInputSource</SPAN>
-       <LI>
-        <SPAN class="method-title">startDocumentEntity</SPAN>      (
-         <SPAN class="class-title">XMLInputSource</SPAN> <SPAN
-        class="param-title">inputSource</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startDTDEntity</SPAN>      (   <SPAN
-        class="class-title">XMLInputSource</SPAN> <SPAN
-        class="param-title">inputSource</SPAN>          )
-       <LI>
-        <SPAN class="method-title">startEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">XMLInputSource</SPAN> <SPAN
-        class="param-title">inputSource</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getEntityScanner</SPAN>      (
-        )       :    <SPAN class="class-title">XMLEntityScanner</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLEntityHandler"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">XMLEntityHandler</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">startEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endEntity</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLInputSource"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLInputSource</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">InputSource</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLInputSource</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">XMLInputSource</SPAN>      (
-         <SPAN class="class-title">InputSource</SPAN> <SPAN
-        class="param-title">inputSource</SPAN>          )
-       <LI>
-        <SPAN class="constructor-title">XMLInputSource</SPAN>      (
-         <SPAN class="class-title">Inputstream</SPAN> <SPAN
-        class="param-title">inputStream</SPAN>          )
-       <LI>
-        <SPAN class="constructor-title">XMLInputSource</SPAN>      (
-         <SPAN class="class-title">Reader</SPAN> <SPAN
-        class="param-title">reader</SPAN>          )
-       <LI>
-        <SPAN class="constructor-title">XMLInputSource</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setBaseSystemId</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getBaseSystemId</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">setExpandedSystemId</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">expandedSystemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getExpandedSystemId</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLEntityScanner"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLEntityScanner</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">Locator</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getBaseSystemId</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">setEncoding</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">isExternal</SPAN>      (
-        )       :    boolean
-       <LI>
-        <SPAN class="method-title">peekChar</SPAN>      (             )
-        :    int
-       <LI>
-        <SPAN class="method-title">scanChar</SPAN>      (             )
-        :    int
-       <LI>
-        <SPAN class="method-title">scanNmtoken</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">scanName</SPAN>      (             )
-        :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">scanQName</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">qname</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">scanContent</SPAN>      (   <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">content</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">scanLiteral</SPAN>      (   int <SPAN
-        class="param-title">quote</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">content</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">scanData</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">delimiter</SPAN>, <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">data</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">skipChar</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">skipSpaces</SPAN>      (
-        )       :    boolean
-       <LI>
-        <SPAN class="method-title">skipString</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">s</SPAN>          )       :    boolean
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLValidator"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLValidator</SPAN>
-     <DD class="implements">      implements      <SPAN
-      class="interface-title">XMLComponent</SPAN>, <SPAN class="class-title"></SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">SymbolTable</SPAN> <SPAN class="field-title">fSymbolTable</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLErrorReporter</SPAN> <SPAN class="field-title">fErrorReporter</SPAN>
-       <LI>
-        <SPAN class="class-title">GrammarPool</SPAN> <SPAN class="field-title">fGrammarPool</SPAN>
-       <LI>boolean <SPAN class="field-title">fNamespaces</SPAN>
-       <LI>boolean <SPAN class="field-title">fValidation</SPAN>
-       <LI>boolean <SPAN class="field-title">fDynamicValidation</SPAN>
-       <LI>
-        <SPAN class="interface-title">XMLDocumentHandler</SPAN> <SPAN class="field-title">fDocumentHandler</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLValidator</SPAN>      (
-        )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Implementation: Validation</H3>
-  <BLOCKQUOTE>
-   <A name="GrammarPool"><DL class="class">
-     <DT>class <SPAN class="class-title">GrammarPool</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">Grammar</SPAN>      &gt;   <SPAN class="field-title">fGrammars</SPAN>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">Grammar</SPAN>      &gt;   <SPAN class="field-title">fGrammarsNS</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">GrammarPool</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">putGrammar</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">rootElement</SPAN>, <SPAN
-        class="class-title">Grammar</SPAN> <SPAN
-        class="param-title">grammar</SPAN>          )
-       <LI>
-        <SPAN class="method-title">putGrammarNS</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">targetNamespace</SPAN>, <SPAN
-        class="class-title">Grammar</SPAN> <SPAN
-        class="param-title">grammar</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getGrammar</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">rootElement</SPAN>          )       :
-         <SPAN class="class-title">Grammar</SPAN>
-       <LI>
-        <SPAN class="method-title">getGrammarNS</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">targetNamespace</SPAN>          )       :
-         <SPAN class="class-title">Grammar</SPAN>
-       <LI>
-        <SPAN class="method-title">removeGrammar</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">rootElement</SPAN>          )       :
-         <SPAN class="class-title">Grammar</SPAN>
-       <LI>
-        <SPAN class="method-title">removeGrammarNS</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">targetNamespace</SPAN>          )       :
-         <SPAN class="class-title">Grammar</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="Grammar"><DL class="class">
-     <DT>class <SPAN class="class-title">Grammar</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>int <SPAN class="constant-title">TOP_LEVEL_SCOPE</SPAN>
-      </UL>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">fTargetNamespace</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">Grammar</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">isNamespaceAware</SPAN>      (
-        )       :    boolean
-       <LI>
-        <SPAN class="method-title">getTargetNamespace</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">getElementDeclCount</SPAN>      (
-        )       :    int
-       <LI>
-        <SPAN class="method-title">getElementDeclIndex</SPAN>      (
-         <SPAN class="class-title">QName</SPAN> <SPAN
-        class="param-title">elementDeclName</SPAN>, int <SPAN
-        class="param-title">scope</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">getElementDeclAt</SPAN>      (   int
-         <SPAN class="param-title">elementDeclIndex</SPAN>, <SPAN
-        class="class-title">XMLElementDecl</SPAN> <SPAN
-        class="param-title">elementDecl</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">getAttributeDeclCount</SPAN>      (
-        int <SPAN class="param-title">elementDeclIndex</SPAN>          )
-        :    int
-       <LI>
-        <SPAN class="method-title">getAttributeDeclIndex</SPAN>      (
-        int <SPAN class="param-title">elementDeclIndex</SPAN>, <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">attributeDeclName</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">getAttributeDeclAt</SPAN>      (
-        int <SPAN class="param-title">attributeDeclIndex</SPAN>, <SPAN
-        class="class-title">XMLAttributeDecl</SPAN> <SPAN
-        class="param-title">attributeDecl</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">getEntityDeclCount</SPAN>      (
-        )       :    int
-       <LI>
-        <SPAN class="method-title">getEntityDeclIndex</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">entityDeclName</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">getEntityDeclAt</SPAN>      (   int
-         <SPAN class="param-title">entityDeclIndex</SPAN>, <SPAN
-        class="class-title">XMLEntityDecl</SPAN> <SPAN
-        class="param-title">entityDecl</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">getNotationDeclCount</SPAN>      (
-        )       :    int
-       <LI>
-        <SPAN class="method-title">getNotationDeclIndex</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">notationDeclName</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">getNotationDeclAt</SPAN>      (   int
-         <SPAN class="param-title">notationDeclIndex</SPAN>, <SPAN
-        class="class-title">XMLNotationDecl</SPAN> <SPAN
-        class="param-title">notationDecl</SPAN>          )       :    boolean
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLElementDecl"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLElementDecl</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>short <SPAN class="constant-title">TYPE_ANY</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_EMPTY</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_MIXED</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_CHILDREN</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_SIMPLE</SPAN>
-      </UL>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">QName</SPAN> <SPAN class="field-title">name</SPAN>
-       <LI>int <SPAN class="field-title">scope</SPAN>
-       <LI>short <SPAN class="field-title">type</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLSimpleType</SPAN> <SPAN class="field-title">simpleType</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">name</SPAN>, int <SPAN
-        class="param-title">scope</SPAN>, short <SPAN
-        class="param-title">type</SPAN>, <SPAN
-        class="class-title">XMLSimpleType</SPAN> <SPAN
-        class="param-title">simpleType</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">XMLElementDecl</SPAN> <SPAN
-        class="param-title">elementDecl</SPAN>          )
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLAttributeDecl"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLAttributeDecl</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">QName</SPAN> <SPAN class="field-title">name</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLSimpleType</SPAN> <SPAN class="field-title">simpleType</SPAN>
-       <LI>boolean <SPAN class="field-title">optional</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">XMLSimpleType</SPAN> <SPAN
-        class="param-title">simpleType</SPAN>, boolean <SPAN
-        class="param-title">optional</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">XMLAttributeDecl</SPAN> <SPAN
-        class="param-title">attributeDecl</SPAN>          )
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLSimpleType"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLSimpleType</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>short <SPAN class="constant-title">TYPE_CDATA</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_ENTITY</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_ENUMERATION</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_ID</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_IDREF</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_NMTOKEN</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_NOTATION</SPAN>
-       <LI>short <SPAN class="constant-title">TYPE_NAMED</SPAN>
-       <LI>short <SPAN class="constant-title">DEFAULT_TYPE_DEFAULT</SPAN>
-       <LI>short <SPAN class="constant-title">DEFAULT_TYPE_FIXED</SPAN>
-       <LI>short <SPAN class="constant-title">DEFAULT_TYPE_IMPLIED</SPAN>
-       <LI>short <SPAN class="constant-title">DEFAULT_TYPE_REQUIRED</SPAN>
-      </UL>
-     <DD class="fields">      fields:      <UL>
-       <LI>short <SPAN class="field-title">type</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">name</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN>[]   <SPAN class="field-title">enumeration</SPAN>
-       <LI>boolean <SPAN class="field-title">list</SPAN>
-       <LI>short <SPAN class="field-title">defaultType</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">defaultValue</SPAN>
-       <LI>
-        <SPAN class="interface-title">DatatypeValidator</SPAN> <SPAN class="field-title">datatypeValidator</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   short <SPAN
-        class="param-title">type</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN>[]   <SPAN
-        class="param-title">enumeration</SPAN>, boolean <SPAN
-        class="param-title">list</SPAN>, short <SPAN
-        class="param-title">defaultType</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">defaultValue</SPAN>, <SPAN
-        class="interface-title">DatatypeValidator</SPAN> <SPAN
-        class="param-title">datatypeValidator</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">XMLSimpleType</SPAN> <SPAN
-        class="param-title">simpleType</SPAN>          )
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLEntityDecl"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLEntityDecl</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">name</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">publicId</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">systemId</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">baseSystemId</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">notation</SPAN>
-       <LI>boolean <SPAN class="field-title">isPE</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">baseSystemId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">notation</SPAN>, boolean <SPAN
-        class="param-title">isPE</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">XMLEntityDecl</SPAN> <SPAN
-        class="param-title">entityDecl</SPAN>          )
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLNotationDecl"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLNotationDecl</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">name</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">publicId</SPAN>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">systemId</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setValues</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">publicId</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">notationDecl</SPAN>      (   <SPAN
-        class="class-title">XMLNotationDecl</SPAN> <SPAN
-        class="param-title">notationDecl</SPAN>          )
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="DatatypeValidatorFactory"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">DatatypeValidatorFactory</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">createDatatypeValidator</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>, <SPAN
-        class="interface-title">DatatypeValidator</SPAN> <SPAN
-        class="param-title">base</SPAN>, <SPAN
-        class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">String</SPAN>      &gt;   <SPAN
-        class="param-title">facets</SPAN>, boolean <SPAN
-        class="param-title">list</SPAN>          )       :    <SPAN class="interface-title">DatatypeValidator</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="DatatypeValidator"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">DatatypeValidator</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getFacets</SPAN>      (             )
-        :    <SPAN class="class-title">Hashtable</SPAN>      &lt;
-         <SPAN class="class-title">String</SPAN>      &gt;
-       <LI>
-        <SPAN class="method-title">validate</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">data</SPAN>, <SPAN
-        class="class-title">Object</SPAN> <SPAN
-        class="param-title">state</SPAN>          )
-       <LI>
-        <SPAN class="method-title">compare</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">value1</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">value2</SPAN>          )       :    int
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="InvalidDatatypeFacetException"><DL class="class">
-     <DT>class <SPAN class="class-title">InvalidDatatypeFacetException</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">SAXException</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeFacetException</SPAN>
-        (             )
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeFacetException</SPAN>
-        (   <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">message</SPAN>          )
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeFacetException</SPAN>
-        (   <SPAN class="class-title">Exception</SPAN> <SPAN
-        class="param-title">exception</SPAN>          )
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeFacetException</SPAN>
-        (   <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">message</SPAN>, <SPAN
-        class="class-title">Exception</SPAN> <SPAN
-        class="param-title">exception</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="InvalidDatatypeValueException"><DL class="class">
-     <DT>class <SPAN class="class-title">InvalidDatatypeValueException</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">SAXException</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeValueException</SPAN>
-        (             )
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeValueException</SPAN>
-        (   <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">message</SPAN>          )
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeValueException</SPAN>
-        (   <SPAN class="class-title">Exception</SPAN> <SPAN
-        class="param-title">exception</SPAN>          )
-       <LI>
-        <SPAN
-        class="constructor-title">InvalidDatatypeValueException</SPAN>
-        (   <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">message</SPAN>, <SPAN
-        class="class-title">Exception</SPAN> <SPAN
-        class="param-title">exception</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="ContentModelValidator"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">ContentModelValidator</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">validate</SPAN>      (   <SPAN
-        class="class-title">QName</SPAN>[]   <SPAN
-        class="param-title">children</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, int <SPAN
-        class="param-title">length</SPAN>          )       :    int
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Implementation: Validation Content Models</H3>
-  <BLOCKQUOTE>
-   <A name="SimpleContentModel"><DL class="class">
-     <DT>class <SPAN class="class-title">SimpleContentModel</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">ContentModelValidator</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>short <SPAN class="constant-title">CHOICE</SPAN>
-       <LI>short <SPAN class="constant-title">SEQUENCE</SPAN>
-      </UL>
-     <DD class="fields">      fields:      <UL>
-       <LI>short <SPAN class="field-title">fOperator</SPAN>
-       <LI>
-        <SPAN class="class-title">QName</SPAN> <SPAN class="field-title">fFirstChild</SPAN>
-       <LI>
-        <SPAN class="class-title">QName</SPAN> <SPAN class="field-title">fSecondChild</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">SimpleContentModel</SPAN>      (
-        short <SPAN class="param-title">operator</SPAN>, <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">firstChild</SPAN>, <SPAN
-        class="class-title">QName</SPAN> <SPAN
-        class="param-title">secondChild</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="MixedContentModel"><DL class="class">
-     <DT>class <SPAN class="class-title">MixedContentModel</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">ContentModelValidator</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>int <SPAN class="field-title">fCount</SPAN>
-       <LI>
-        <SPAN class="class-title">QName</SPAN>[]   <SPAN class="field-title">fChildren</SPAN>
-       <LI>boolean <SPAN class="field-title">fOrdered</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">MixedContentModel</SPAN>      (
-        int <SPAN class="param-title">count</SPAN>, <SPAN
-        class="class-title">QName</SPAN>[]   <SPAN
-        class="param-title">children</SPAN>, boolean <SPAN
-        class="param-title">ordered</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="DFAContentModel"><DL class="class">
-     <DT>class <SPAN class="class-title">DFAContentModel</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">ContentModelValidator</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">DFAContentModel</SPAN>      (
-        )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Implementation: Validation Datatypes</H3>
-  <BLOCKQUOTE>
-   <A name="DatatypeValidatorFactoryImpl"><DL class="class">
-     <DT>class <SPAN class="class-title">DatatypeValidatorFactoryImpl</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">DatatypeValidatorFactory</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="interface-title">DatatypeValidator</SPAN>      &gt;
-         <SPAN class="field-title">fBaseTypes</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="AbstractDatatypeValidator"><DL class="class">
-     <DT>class <SPAN class="class-title">AbstractDatatypeValidator</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">DatatypeValidator</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">String</SPAN>      &gt;   <SPAN class="field-title">fFacets</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">AbstractDatatypeValidator</SPAN>
-        (   <SPAN class="interface-title">DatatypeValidator</SPAN> <SPAN
-        class="param-title">base</SPAN>, <SPAN
-        class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">String</SPAN>      &gt;   <SPAN
-        class="param-title">facets</SPAN>, boolean <SPAN
-        class="param-title">list</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="StringDatatypeValidator"><DL class="class">
-     <DT>class <SPAN class="class-title">StringDatatypeValidator</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">AbstractDatatypeValidator</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">StringDatatypeValidator</SPAN>
-        (   <SPAN class="interface-title">DatatypeValidator</SPAN> <SPAN
-        class="param-title">base</SPAN>, <SPAN
-        class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">String</SPAN>      &gt;   <SPAN
-        class="param-title">facets</SPAN>, boolean <SPAN
-        class="param-title">list</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Implementation: Validation Grammars</H3>
-  <BLOCKQUOTE>
-   <A name="DTDGrammar"><DL class="class">
-     <DT>class <SPAN class="class-title">DTDGrammar</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">Grammar</SPAN>
-     <DD class="implements">      implements      <SPAN
-      class="class-title"></SPAN>, <SPAN class="class-title"></SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="interface-title">XMLDTDHandler</SPAN> <SPAN class="field-title">fDTDHandler</SPAN>
-       <LI>
-        <SPAN class="interface-title">XMLDTDContentModelHandler</SPAN>
-         <SPAN class="field-title">fDTDContentModelHandler</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">DTDGrammar</SPAN>      (
-        )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="SchemaGrammar"><DL class="class">
-     <DT>class <SPAN class="class-title">SchemaGrammar</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">Grammar</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">SchemaGrammar</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">SchemaGrammar</SPAN>      (
-         <SPAN class="interface-title">Document</SPAN> <SPAN
-        class="param-title">grammarDocument</SPAN>          )
-       <LI>
-        <SPAN class="constructor-title">SchemaGrammar</SPAN>      (
-         <SPAN class="interface-title">Document</SPAN> <SPAN
-        class="param-title">grammarDocument</SPAN>, <SPAN
-        class="class-title">GrammarPool</SPAN> <SPAN
-        class="param-title">grammarPool</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Validation: XPath</H3>
-  <BLOCKQUOTE>
-   <A name="XPath"><DL class="class">
-     <DT>class <SPAN class="class-title">XPath</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XPath</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">xpath</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XPathException"><DL class="class">
-     <DT>class <SPAN class="class-title">XPathException</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XPathException</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">XPathException</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">message</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XPathMatcher"><DL class="class">
-     <DT>class <SPAN class="class-title">XPathMatcher</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">XMLDocumentFragmentHandler</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>boolean <SPAN class="field-title">fShouldBufferContent</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XPathMatcher</SPAN>      (
-         <SPAN class="class-title">XPath</SPAN> <SPAN
-        class="param-title">xpath</SPAN>          )
-       <LI>
-        <SPAN class="constructor-title">XPathMatcher</SPAN>      (
-         <SPAN class="class-title">XPath</SPAN> <SPAN
-        class="param-title">xpath</SPAN>, boolean <SPAN
-        class="param-title">shouldBufferContent</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">isMatched</SPAN>      (             )
-        :    boolean
-       <LI>
-        <SPAN class="method-title">getMatchedString</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">matched</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">content</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Validation: Identity Constraints</H3>
-  <BLOCKQUOTE>
-   <A name="IdentityConstraint"><DL class="class">
-     <DT>class <SPAN class="class-title">IdentityConstraint</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>short <SPAN class="constant-title">UNIQUE</SPAN>
-       <LI>short <SPAN class="constant-title">KEY</SPAN>
-       <LI>short <SPAN class="constant-title">KEYREF</SPAN>
-      </UL>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">fElementName</SPAN>
-       <LI>
-        <SPAN class="class-title">Selector</SPAN> <SPAN class="field-title">fSelector</SPAN>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">Field</SPAN>      &gt;   <SPAN class="field-title">fFields</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">IdentityConstraint</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getType</SPAN>      (             )
-        :    short
-       <LI>
-        <SPAN class="method-title">getElementName</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">setSelector</SPAN>      (   <SPAN
-        class="class-title">Selector</SPAN> <SPAN
-        class="param-title">selector</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getSelector</SPAN>      (
-        )       :    <SPAN class="class-title">Selector</SPAN>
-       <LI>
-        <SPAN class="method-title">addField</SPAN>      (   <SPAN
-        class="class-title">Field</SPAN> <SPAN
-        class="param-title">field</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getFieldCount</SPAN>      (
-        )       :    int
-       <LI>
-        <SPAN class="method-title">getFieldAt</SPAN>      (   int <SPAN
-        class="param-title">index</SPAN>          )       :    <SPAN class="class-title">Field</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="Unique"><DL class="class">
-     <DT>class <SPAN class="class-title">Unique</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">Unique</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="Key"><DL class="class">
-     <DT>class <SPAN class="class-title">Key</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">fKeyName</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">Key</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">keyName</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getKeyName</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="KeyRef"><DL class="class">
-     <DT>class <SPAN class="class-title">KeyRef</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">String</SPAN> <SPAN class="field-title">fKeyName</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">KeyRef</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">elementName</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">keyName</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getKeyName</SPAN>      (
-        )       :    <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="Selector"><DL class="class">
-     <DT>class <SPAN class="class-title">Selector</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">XPath</SPAN> <SPAN class="field-title">fXPath</SPAN>
-       <LI>
-        <SPAN class="class-title">IdentityConstraint</SPAN> <SPAN class="field-title">fIdentityConstraint</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">Selector</SPAN>      (   <SPAN
-        class="class-title">XPath</SPAN> <SPAN
-        class="param-title">xpath</SPAN>, <SPAN
-        class="class-title">IdentityConstraint</SPAN> <SPAN
-        class="param-title">identityConstraint</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getXPath</SPAN>      (             )
-        :    <SPAN class="class-title">XPath</SPAN>
-       <LI>
-        <SPAN class="method-title">getIdentityConstraint</SPAN>      (
-        )       :    <SPAN class="class-title">IdentityConstraint</SPAN>
-       <LI>
-        <SPAN class="method-title">createMatcher</SPAN>      (   <SPAN
-        class="interface-title">FieldActivator</SPAN> <SPAN
-        class="param-title">fieldActivator</SPAN>          )       :
-         <SPAN class="class-title">XPathMatcher</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="FieldActivator"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">FieldActivator</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">startValueScopeFor</SPAN>      (
-         <SPAN class="class-title">IdentityConstraint</SPAN> <SPAN
-        class="param-title">identityConstraint</SPAN>          )
-       <LI>
-        <SPAN class="method-title">activateField</SPAN>      (   <SPAN
-        class="class-title">Field</SPAN> <SPAN
-        class="param-title">field</SPAN>          )
-       <LI>
-        <SPAN class="method-title">endValueScopeFor</SPAN>      (
-         <SPAN class="class-title">IdentityConstraint</SPAN> <SPAN
-        class="param-title">identityConstraint</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="Field"><DL class="class">
-     <DT>class <SPAN class="class-title">Field</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">XPath</SPAN> <SPAN class="field-title">fXPath</SPAN>
-       <LI>
-        <SPAN class="class-title">IdentityConstraint</SPAN> <SPAN class="field-title">fIdentityConstraint</SPAN>
-       <LI>
-        <SPAN class="interface-title">DatatypeValidator</SPAN> <SPAN class="field-title">fDatatypeValidator</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">Field</SPAN>      (   <SPAN
-        class="class-title">XPath</SPAN> <SPAN
-        class="param-title">xpath</SPAN>, <SPAN
-        class="class-title">IdentityConstraint</SPAN> <SPAN
-        class="param-title">identityConstraint</SPAN>, <SPAN
-        class="interface-title">DatatypeValidator</SPAN> <SPAN
-        class="param-title">datatypeValidator</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getXPath</SPAN>      (             )
-        :    <SPAN class="class-title">XPath</SPAN>
-       <LI>
-        <SPAN class="method-title">getIdentityConstraint</SPAN>      (
-        )       :    <SPAN class="class-title">IdentityConstraint</SPAN>
-       <LI>
-        <SPAN class="method-title">getDatatypeValidator</SPAN>      (
-        )       :    <SPAN class="interface-title">DatatypeValidator</SPAN>
-       <LI>
-        <SPAN class="method-title">createMatcher</SPAN>      (   <SPAN
-        class="interface-title">ValueStore</SPAN> <SPAN
-        class="param-title">valueStore</SPAN>          )       :
-         <SPAN class="class-title">XPathMatcher</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="ValueStore"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">ValueStore</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">addValue</SPAN>      (   <SPAN
-        class="class-title">Field</SPAN> <SPAN
-        class="param-title">field</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">value</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Parsing</H3>
-  <BLOCKQUOTE>
-   <A name="CachingParserPool"><DL class="class">
-     <DT>class <SPAN class="class-title">CachingParserPool</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">SymbolTable</SPAN> <SPAN class="field-title">fSymbolTable</SPAN>
-       <LI>
-        <SPAN class="class-title">GrammarPool</SPAN> <SPAN class="field-title">fGrammarPool</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">CachingParserPool</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">CachingParserPool</SPAN>      (
-         <SPAN class="class-title">SymbolTable</SPAN> <SPAN
-        class="param-title">symbolTable</SPAN>, <SPAN
-        class="class-title">GrammarPool</SPAN> <SPAN
-        class="param-title">grammarPool</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getSymbolTable</SPAN>      (
-        )       :    <SPAN class="class-title">SymbolTable</SPAN>
-       <LI>
-        <SPAN class="method-title">getGrammarPool</SPAN>      (
-        )       :    <SPAN class="class-title">GrammarPool</SPAN>
-       <LI>
-        <SPAN class="method-title">createDOMParser</SPAN>      (
-        )       :    <SPAN class="class-title">DOMParser</SPAN>
-       <LI>
-        <SPAN class="method-title">createSAXParser</SPAN>      (
-        )       :    <SPAN class="class-title">SAXParser</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLParser"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLParser</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">XMLComponentManager</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">SymbolTable</SPAN> <SPAN class="field-title">fSymbolTable</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLEntityManager</SPAN> <SPAN class="field-title">fEntityManager</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLErrorReporter</SPAN> <SPAN class="field-title">fErrorReporter</SPAN>
-       <LI>boolean <SPAN class="field-title">fNamespaces</SPAN>
-       <LI>boolean <SPAN class="field-title">fValidation</SPAN>
-       <LI>boolean <SPAN class="field-title">fDynamicValidation</SPAN>
-       <LI>boolean <SPAN class="field-title">fContinueAfterFatalError</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLParser</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">XMLParser</SPAN>      (   <SPAN
-        class="class-title">SymbolTable</SPAN> <SPAN
-        class="param-title">symbolTable</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setFeature</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">featureId</SPAN>, boolean <SPAN
-        class="param-title">state</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getFeature</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">featureId</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">setProperty</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">propertyId</SPAN>, <SPAN
-        class="class-title">Object</SPAN> <SPAN
-        class="param-title">value</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getProperty</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">propertyId</SPAN>          )       :
-         <SPAN class="class-title">Object</SPAN>
-       <LI>
-        <SPAN class="method-title">setEntityResolver</SPAN>      (
-         <SPAN class="interface-title">EntityResolver</SPAN> <SPAN
-        class="param-title">entityResolver</SPAN>          )
-       <LI>
-        <SPAN class="method-title">setErrorHandler</SPAN>      (   <SPAN
-        class="interface-title">ErrorHandler</SPAN> <SPAN
-        class="param-title">errorHandler</SPAN>          )
-       <LI>
-        <SPAN class="method-title">parse</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">systemId</SPAN>          )
-       <LI>
-        <SPAN class="method-title">parse</SPAN>      (   <SPAN
-        class="class-title">InputSource</SPAN> <SPAN
-        class="param-title">inputSource</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLDocumentParser"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLDocumentParser</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">XMLParser</SPAN>
-     <DD class="implements">      implements      <SPAN
-      class="interface-title">XMLDocumentHandler</SPAN>, <SPAN
-      class="interface-title">XMLDTDHandler</SPAN>, <SPAN class="interface-title">XMLDTDContentModelHandler</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">XMLDocumentScanner</SPAN> <SPAN class="field-title">fScanner</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLDTDScanner</SPAN> <SPAN class="field-title">fDTDScanner</SPAN>
-       <LI>
-        <SPAN class="class-title">XMLValidator</SPAN> <SPAN class="field-title">fValidator</SPAN>
-       <LI>
-        <SPAN class="class-title">GrammarPool</SPAN> <SPAN class="field-title">fGrammarPool</SPAN>
-       <LI>
-        <SPAN class="interface-title">DatatypeValidatorFactory</SPAN>
-         <SPAN class="field-title">fDatatypeValidatorFactory</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLDocumentParser</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">XMLDocumentParser</SPAN>      (
-         <SPAN class="class-title">SymbolTable</SPAN> <SPAN
-        class="param-title">symbolTable</SPAN>, <SPAN
-        class="class-title">GrammarPool</SPAN> <SPAN
-        class="param-title">grammarPool</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="DOMParser"><DL class="class">
-     <DT>class <SPAN class="class-title">DOMParser</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">XMLDocumentParser</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">DOMParser</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">DOMParser</SPAN>      (   <SPAN
-        class="class-title">SymbolTable</SPAN> <SPAN
-        class="param-title">symbolTable</SPAN>, <SPAN
-        class="class-title">GrammarPool</SPAN> <SPAN
-        class="param-title">grammarPool</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">getDocument</SPAN>      (
-        )       :    <SPAN class="interface-title">Document</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="SAXParser"><DL class="class">
-     <DT>class <SPAN class="class-title">SAXParser</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">XMLDocumentParser</SPAN>
-     <DD class="implements">      implements      <SPAN
-      class="interface-title">Parser</SPAN>, <SPAN class="interface-title">XMLReader</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">SAXParser</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">SAXParser</SPAN>      (   <SPAN
-        class="class-title">SymbolTable</SPAN> <SPAN
-        class="param-title">symbolTable</SPAN>, <SPAN
-        class="class-title">GrammarPool</SPAN> <SPAN
-        class="param-title">grammarPool</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <H3>Utility Interfaces and Classes</H3>
-  <BLOCKQUOTE>
-   <A name="XMLChar"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLChar</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>byte[]   <SPAN class="constant-title">CHARS</SPAN>
-       <LI>byte <SPAN class="constant-title">MASK_VALID</SPAN>
-       <LI>byte <SPAN class="constant-title">MASK_SPACE</SPAN>
-       <LI>byte <SPAN class="constant-title">MASK_NAME_START</SPAN>
-       <LI>byte <SPAN class="constant-title">MASK_NAME</SPAN>
-       <LI>byte <SPAN class="constant-title">MASK_PUBID</SPAN>
-       <LI>byte <SPAN class="constant-title">MASK_CONTENT</SPAN>
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">isValid</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isInvalid</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isSpace</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isNameStart</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isName</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isPubid</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isContent</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isMarkup</SPAN>      (   int <SPAN
-        class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isHighSurrogate</SPAN>      (   int
-         <SPAN class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isLowSurrogate</SPAN>      (   int
-         <SPAN class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isSupplemental</SPAN>      (   int
-         <SPAN class="param-title">c</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">highSurrogate</SPAN>      (   int
-         <SPAN class="param-title">c</SPAN>          )       :    char
-       <LI>
-        <SPAN class="method-title">lowSurrogate</SPAN>      (   int
-         <SPAN class="param-title">c</SPAN>          )       :    char
-       <LI>
-        <SPAN class="method-title">supplemental</SPAN>      (   int
-         <SPAN class="param-title">highSurrogate</SPAN>, int <SPAN
-        class="param-title">lowSurrogate</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">isValidName</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">name</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isValidIANAEncoding</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">isValidJavaEncoding</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">encoding</SPAN>          )       :    boolean
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="EncodingMap"><DL class="class">
-     <DT>class <SPAN class="class-title">EncodingMap</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">String</SPAN>      &gt;   <SPAN class="field-title">fIANA2JavaMap</SPAN>
-       <LI>
-        <SPAN class="class-title">Hashtable</SPAN>      &lt;   <SPAN
-        class="class-title">String</SPAN>      &gt;   <SPAN class="field-title">fJava2IANAMap</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">EncodingMap</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">putIANA2JavaMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">ianaEncoding</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">javaEncoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getIANA2JavaMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">ianaEncoding</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">removeIANA2JavaMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">ianaEncoding</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">putJava2IANAMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">javaEncoding</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">ianaEncoding</SPAN>          )
-       <LI>
-        <SPAN class="method-title">getJava2IANAMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">javaEncoding</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">removeJava2IANAMapping</SPAN>      (
-         <SPAN class="class-title">String</SPAN> <SPAN
-        class="param-title">javaEncoding</SPAN>          )       :
-         <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="SymbolTable"><DL class="class">
-     <DT>class <SPAN class="class-title">SymbolTable</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">SymbolTable</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">addSymbol</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">symbol</SPAN>          )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">addSymbol</SPAN>      (   char[]
-         <SPAN class="param-title">buffer</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">length</SPAN>          )       :    <SPAN class="class-title">String</SPAN>
-       <LI>
-        <SPAN class="method-title">containsSymbol</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">symbol</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">containsSymbol</SPAN>      (   char[]
-         <SPAN class="param-title">buffer</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">length</SPAN>          )       :    boolean
-       <LI>
-        <SPAN class="method-title">hash</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">symbol</SPAN>          )       :    int
-       <LI>
-        <SPAN class="method-title">hash</SPAN>      (   char[]   <SPAN
-        class="param-title">buffer</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, int <SPAN
-        class="param-title">length</SPAN>          )       :    int
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="MessageFormatter"><DL class="interface">
-     <DT>interface <SPAN class="interface-title">MessageFormatter</SPAN>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">formatMessage</SPAN>      (   <SPAN
-        class="class-title">Locale</SPAN> <SPAN
-        class="param-title">locale</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">key</SPAN>, <SPAN
-        class="class-title">Object</SPAN>[]   <SPAN
-        class="param-title">arguments</SPAN>          )       :    <SPAN class="class-title">String</SPAN>
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLStringBuffer"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLStringBuffer</SPAN>
-     <DD class="extends">      extends      <SPAN class="class-title">XMLString</SPAN>
-     <DD class="constants">      constants:      <UL>
-       <LI>int <SPAN class="constant-title">DEFAULT_SIZE</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLStringBuffer</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">XMLStringBuffer</SPAN>      (
-        int <SPAN class="param-title">size</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">clear</SPAN>      (             )
-       <LI>
-        <SPAN class="method-title">append</SPAN>      (   char <SPAN
-        class="param-title">c</SPAN>          )
-       <LI>
-        <SPAN class="method-title">append</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">s</SPAN>          )
-       <LI>
-        <SPAN class="method-title">append</SPAN>      (   char[]   <SPAN
-        class="param-title">ch</SPAN>, int <SPAN
-        class="param-title">offset</SPAN>, int <SPAN
-        class="param-title">length</SPAN>          )
-       <LI>
-        <SPAN class="method-title">append</SPAN>      (   <SPAN
-        class="class-title">XMLString</SPAN> <SPAN
-        class="param-title">s</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="XMLAttributesImpl"><DL class="class">
-     <DT>class <SPAN class="class-title">XMLAttributesImpl</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">XMLAttributes</SPAN>
-     <DD class="fields">      fields:      <UL>
-       <LI>boolean <SPAN class="field-title">fNamespaces</SPAN>
-      </UL>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">XMLAttributesImpl</SPAN>      (
-        )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">setNamespaces</SPAN>      (   boolean
-         <SPAN class="param-title">namespaces</SPAN>          )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="NamespaceSupport"><DL class="class">
-     <DT>class <SPAN class="class-title">NamespaceSupport</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">NamespaceContext</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">NamespaceSupport</SPAN>      (
-        )
-       <LI>
-        <SPAN class="constructor-title">NamespaceSupport</SPAN>      (
-         <SPAN class="interface-title">NamespaceContext</SPAN> <SPAN
-        class="param-title">context</SPAN>          )
-      </UL>
-     <DD class="methods">      methods:      <UL>
-       <LI>
-        <SPAN class="method-title">pushContext</SPAN>      (
-        )
-       <LI>
-        <SPAN class="method-title">declarePrefix</SPAN>      (   <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">prefix</SPAN>, <SPAN
-        class="class-title">String</SPAN> <SPAN
-        class="param-title">uri</SPAN>          )
-       <LI>
-        <SPAN class="method-title">popContext</SPAN>      (
-        )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>
-  <BLOCKQUOTE>
-   <A name="DefaultErrorHandler"><DL class="class">
-     <DT>class <SPAN class="class-title">DefaultErrorHandler</SPAN>
-     <DD class="implements">      implements      <SPAN class="interface-title">ErrorHandler</SPAN>
-     <DD class="constructors">      constructors:      <UL>
-       <LI>
-        <SPAN class="constructor-title">DefaultErrorHandler</SPAN>
-        (             )
-      </UL>
-    </DL>
-   </A></BLOCKQUOTE>          Last modified: $Date$</BODY>
-</HTML>
diff --git a/design/design.xsl b/design/design.xsl
deleted file mode 100644
index dac2f6f..0000000
--- a/design/design.xsl
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-
- <xsl:template match='design'>
-  <HTML>
-   <HEAD>
-    <TITLE>Xerces 2 | Design</TITLE>
-    <LINK rel='stylesheet' type='text/css' href='index.css'/>
-    <LINK rel='stylesheet' type='text/css' href='design.css'/>
-   </HEAD>
-   <BODY>
-    <H1 align='center'>
-     <xsl:value-of select='@name'/>
-     <xsl:text> </xsl:text>
-     Design
-    </H1>
-    <H2>Classes and Interfaces</H2>
-    <xsl:for-each select='category'>
-     <xsl:apply-templates select='.'/>
-    </xsl:for-each>
-    Last modified: <xsl:value-of select='date'/>
-   </BODY>
-  </HTML>
- </xsl:template>
-
- <xsl:template match='category'>
-  <H3><xsl:value-of select='@name'/></H3>
-  <xsl:for-each select='class|interface'>
-   <BLOCKQUOTE>
-    <xsl:apply-templates select='.'/>
-   </BLOCKQUOTE>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template match='class|interface'>
-  <A name='{@name}'>
-  <DL class='{name()}'>
-   <DT>
-    <xsl:value-of select='name()'/>
-    <xsl:text> </xsl:text>
-    <SPAN class='{name()}-title'>
-     <xsl:value-of select='@name'/>
-    </SPAN>
-   </DT>
-   <xsl:if test='extends'>
-    <DD class='extends'>
-     extends
-     <xsl:for-each select='extends'>
-      <xsl:call-template name='type'/>
-     </xsl:for-each>
-    </DD>
-   </xsl:if>
-   <xsl:if test='implements'>
-    <DD class='implements'>
-     implements
-     <xsl:for-each select='implements'>
-      <xsl:call-template name='type'/>
-      <xsl:if test='not(position()=last())'>
-       <xsl:text>, </xsl:text>
-      </xsl:if>
-     </xsl:for-each>
-    </DD>
-   </xsl:if>
-   <xsl:if test='constant'>
-    <DD class='constants'>
-     constants:
-     <UL>
-      <xsl:for-each select='constant'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='field'>
-    <DD class='fields'>
-     fields:
-     <UL>
-      <xsl:for-each select='field'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='constructor'>
-    <DD class='constructors'>
-     constructors:
-     <UL>
-      <xsl:for-each select='constructor'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='method'>
-    <DD class='methods'>
-     methods:
-     <UL>
-      <xsl:for-each select='method'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-  </DL>
-  </A>
- </xsl:template>
-
- <xsl:template match='constant|field|param'>
-  <!--
-  <xsl:if test='not(name()="param") and not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <xsl:call-template name='type'/>
-  <xsl:text> </xsl:text>
-  <SPAN class='{name()}-title'>
-   <xsl:value-of select='@name'/>
-  </SPAN>
- </xsl:template>
-
- <xsl:template match='constructor'>
-  <!--
-  <xsl:if test='not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <SPAN class='constructor-title'>
-   <xsl:value-of select='../@name'/>
-  </SPAN>
-  (
-  <xsl:for-each select='param'>
-   <xsl:apply-templates select='.'/>
-   <xsl:if test='not(position()=last())'>
-    <xsl:text>, </xsl:text>
-   </xsl:if>
-  </xsl:for-each>
-  )
- </xsl:template>
-
- <xsl:template match='method'>
-  <!--
-  <xsl:if test='not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <SPAN class='method-title'>
-   <xsl:value-of select='@name'/>
-  </SPAN>
-  (
-  <xsl:for-each select='param'>
-   <xsl:apply-templates select='.'/>
-   <xsl:if test='not(position()=last())'>
-    <xsl:text>, </xsl:text>
-   </xsl:if>
-  </xsl:for-each>
-  )
-  <xsl:for-each select='returns'>
-   :
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template name='type'>
-  <xsl:apply-templates select='array|primitive|reference|collection'/>
- </xsl:template>
-
- <xsl:template match='array'>
-  <xsl:call-template name='type'/>[]
- </xsl:template>
-
- <xsl:template match='primitive'>
-  <xsl:value-of select='@type'/>
- </xsl:template>
-
- <xsl:template match='union'>
-  <xsl:for-each select='part'>
-   <xsl:apply-templates select='.'/>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template match='reference'>
-  <xsl:choose>
-   <xsl:when test='id(@idref)[name()="interface"]'>
-    <SPAN class='interface-title'>
-     <xsl:value-of select='id(@idref)/@name'/>
-    </SPAN>
-   </xsl:when>
-   <xsl:otherwise>
-    <SPAN class='class-title'>
-     <xsl:value-of select='id(@idref)/@name'/>
-    </SPAN>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match='collection'>
-  <xsl:for-each select='collector'>
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
-  &lt;
-  <xsl:for-each select='items'>
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
-  &gt;
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/design/design.zip b/design/design.zip
deleted file mode 100644
index 400829f..0000000
--- a/design/design.zip
+++ /dev/null
Binary files differ
diff --git a/design/entities.html b/design/entities.html
deleted file mode 100644
index 976ffe5..0000000
--- a/design/entities.html
+++ /dev/null
@@ -1,230 +0,0 @@
-<!-- $Id$ -->
-<html>
- <head>
-  <title>Xerces 2 | Entities</title>
-  <link rel='stylesheet' type='text/css' href='css/site.css'>
-  <link rel='stylesheet' type='text/css' href='css/diagram.css'>
-  <style type='text/css'>
-   .note { font-size: smaller }
-  </style>
- </head>
- <body>
-  <span class='netscape'>
-  <a name='TOP'></a>
-  <h1>Entity Management</h1>
-  <a name='TOC'></a>
-  <h2>Table of Contents</h2>
-  <p>
-   <ul>
-    <li><a href='#Overview'>Overview</a>
-     <ul>
-      <li><a href='#Overview.Xerces'>Xerces</a></li>
-      <li><a href='#Overview.Crimson'>Crimson</a></li>
-     </ul>
-    </li>
-    <li><a href='#Assumptions'>Assumptions</a></li>
-    <li><a href='#EntityManager'>EntityManager</a></li>
-    <li><a href='#EntityScanner'>EntityScanner</a></li>
-    <li><a href='#Notes'>Notes</a>
-     <ul>
-      <li><a href='#Notes.OpenIssues'>Open Issues</a></li>
-     </ul>
-    </li>
-   </ul>
-  </p>
-  <hr>
-  <a name='Overview'></a>
-  <h2>Overview</h2>
-  <p>
-   An XML document is comprised of various entities which can
-   be encoded using different character encodings. The document
-   instance is known as the <em>document entity</em> whereas
-   we'll call the DTD the <em>dtd entity</em>. In addition,
-   <em>general entities</em> and <em>parameter entities</em>
-   act as macros for inserting fragments into the parse stream 
-   when the entity is referenced in the document and DTD, 
-   respectively.
-  </p>
-  <p>
-   There must be a way to declare, locate, and read 
-   entities in their respective character encoding. The entity
-   manager handles locating entities and obtaining an entity
-   scanner capable of scanning the entity content. Depending on 
-   the character encoding, there may be custom readers for
-   performance reasons. Regardless of the character encoding,
-   though, the interface to scan the underlying content must
-   be consistent and simple.
-  </p>
-  <a name='Overview.Xerces'></a>
-  <h3>Xerces</h3>
-  <p>
-   The complexity of the original Xerces code resulted, in
-   large part, from the readers and entity management. The
-   entity readers were defined with a large set of methods
-   so that read operations could be optimized for each
-   reader and that character transcoding could be deferred.
-   However, this meant that every reader had to implement
-   all of the methods separately which introduced more
-   chances for bugs in the code and made it harder to 
-   understand the system.
-  </p>
-  <a name='Overview.Crimson'></a>
-  <h3>Crimson</h3>
-  <p>
-   Crimson took a simpler approach to reading entities.
-   There is only one reader class that delegates the read
-   calls to a few optimized input stream readers. And
-   without attempting to defer character encoding, the
-   code path is greatly simplified. But its not all roses.
-   If you look deep enough in the code you'll find that
-   the entity management code is <em>somewhat</em> complex 
-   because of the nature of XML entities.
-  </p>
-  <a name='Assumptions'></a>
-  <h2>Assumptions</h2>
-  <p>
-   Before designing the entity management, a few assumptions 
-   were made:
-   <ul>
-    <li>
-     Characters are <em>always</em> transcoded<br>
-     <span class='note'>
-      This greatly simplifies the system and allows us to avoid
-      using a string pool. There <em>is</em> a performance cost 
-      but the simplicity and understandability of the code far 
-      outweighs any performance lost.
-     </span>
-    </li>
-    <li>
-     There will be a single entity manager per parser instance<br>
-     <span class='note'>
-      Scanners need to have a way of locating entities and
-      reading their contents. An entity manager would provide
-      that mechanism.
-     </span>
-    </li>
-    <li>
-     There will be a single entity scanner per parser instance that 
-     XML scanners will use<br>
-     <span class='note'>
-      This entity scanner can still delegate to custom, optimized
-      input stream readers for performance.
-     </span>
-    </li>
-   </ul>
-  </p>
-  <a name='EntityManager'></a>
-  <h2>Entity Manager</h2>
-  <p>
-   The entity manager is a core component in any parser
-   configuration and there is only one entity manager per parser
-   instance. Some of the responsibilities of the entity 
-   manager are:
-   <ul>
-    <li>Registering declared entities</li>
-    <li>Resolving external entities</li>
-    <li>Starting entities</li>
-   </ul>
-  </p>
-  <p>
-   The <code><a href='design.html#XMLEntityManager'>XMLEntityManager</a></code>
-   class implements the entity management in the parser. This
-   class contains methods for registering general and parameter 
-   entities; resolving entities either by default or by using
-   the SAX <code>EntityResolver</code> registered by the user;
-   and starting named and unnamed entities. The various XML
-   scanners query the entity scanner by calling
-   <code>getEntityScanner</code> on the entity manager. 
-  </p>
-  <a name='EntityScanner'></a>
-  <h2>Entity Scanner</h2>
-  <p>
-   The entity scanner is responsible for scanning "primitive"
-   XML structure from an entity and reporting the parse location.
-   The <code><a href='design.html#XMLEntityScanner'>XMLEntityScanner</a></code>
-   class contains methods to peek at the current character; scan 
-   names and content; etc.
-  </p>
-  <p>
-   There is only one entity scanner per entity manager.
-   The entity scanner works directly with the entity manager in
-   order to read from the underlying character readers. This
-   makes scanning of the entities transparent to the caller.
-   Changing readers; auto-detecting encodings from input
-   streams; and buffering is done "under the covers" and does 
-   not affect how the caller interacts with the entity scanner.
-  </p>
-  <p>
-   If both the entity manager and entity scanner are singletons
-   per parser instance, why aren't they a single object?
-   The manager and scanner <em>could</em> be a single object
-   but they are separate in order to have a cleaner separation
-   of functionality and API. Even though they are separate, 
-   they share common data, as shown in the following diagram.
-  </p>
-  <p>
-   <table border='2' cellpadding='10' cellspacing='0'>
-    <tr class='diagram'>
-     <td>
-      <table border='0' cellpadding='2' cellspacing='0'>
-       <tr>
-        <td class='config-component'>
-         <table cellpadding='7' cellspacing='2'>
-          <tr class='diagram'>
-           <td class='component'>Entity<br>Manager</td>
-           <td class='component'>Entity<br>Scanner</td>
-          </tr>
-         </table>
-         <li>entity resolver</li>
-         <li>reader stack</li>
-         <li>entity handler</li>
-        </td>
-       </tr>
-      </table>
-     </td>
-    </tr>
-   </table>
-  </p>
-  <a name='Notes'></a>
-  <h2>Notes</h2>
-  <p>
-   It is expected that the entity management and readers will
-   need to be re-evaluated as the Xerces 2 concept is
-   implemented. The operation of reading entities directly
-   impacts the performance of the parser and while this isn't
-   an initial requirement it is important.
-  </p>
-  <a name='Notes.OpenIssues'></a>
-  <h3>Open Issues</h3>
-  <p>
-   There are currently some open issues. [Note: these should
-   move to <a href='issues.html'>implementation issues</a>.]
-   <dl>
-    <dt>Entity Encoding</dt>
-    <dd>
-     When an entity is started that is read from an input stream,
-     the encoding must first be auto-detected. Then, as the
-     appropriate scanner parses the XMLDecl or TextDecl line,
-     a new encoding must be set on the entity scanner. An API 
-     must be created in order to set the encoding. However,
-     the work of swapping out the character reader is done
-     transparently from the caller. 
-    </dd>
-    <dt>Open Readers</dt>
-    <dd>
-     Who closes open readers? The parser should close all readers
-     that it created but should not close any readers that are
-     passed to the parser via the <code>parse(InputSource)</code>
-     method. And at what time are the readers closed in the case
-     of an unrecoverable error?
-    </dd>
-   </dl>
-  </p>
-  </span>
-  <a name='BOTTOM'></a>
-  <hr>
-  <span class='netscape'>
-   Last modified: $Date$
-  </span>
- </body>
-</html>
\ No newline at end of file
diff --git a/design/images/arrow-right.gif b/design/images/arrow-right.gif
deleted file mode 100644
index b2f07da..0000000
--- a/design/images/arrow-right.gif
+++ /dev/null
Binary files differ
diff --git a/design/images/pipeline.gif b/design/images/pipeline.gif
deleted file mode 100644
index 28128a6..0000000
--- a/design/images/pipeline.gif
+++ /dev/null
Binary files differ
diff --git a/design/images/table.gif b/design/images/table.gif
deleted file mode 100644
index de21e53..0000000
--- a/design/images/table.gif
+++ /dev/null
Binary files differ
diff --git a/design/index.html b/design/index.html
deleted file mode 100644
index 0ec43f2..0000000
--- a/design/index.html
+++ /dev/null
@@ -1,241 +0,0 @@
-<!-- $Id$ -->
-<html>
- <head>
-  <title>Xerces2</title>
-  <link rel='stylesheet' type='text/css' href='css/site.css'>
-  <style type='text/css'>
-   .needs { font-size: smaller }
-  </style>
- </head>
- <body>
-  <span class='netscape'>
-  <a name='TOP'></a>
-  <h1>Xerces2</h1>
-  <a name='TOC'></a>
-  <h2>Table of Contents</h2>
-  <p>
-   <ul>
-    <li><a href='#Goals'>Goals</a></li>
-    <li><a href='#Scenarios'>Scenarios</a></li>
-    <li><a href='#Documentation'>Documentation</a></li>
-    <li><a href='#SourceCode'>Source Code</a>
-     <ul>
-      <li><a href='#SourceCode.MainBranches'>Main Branches</a></li>
-      <li><a href='#SourceCode.SupplementalBranches'>Supplemental Branches</a></li>
-     </ul>
-    </li>
-   </ul>
-  </p>
-  <hr>
-  <a name='Goals'></a>
-  <h2>Goals</h2>
-  <p>
-   The ultimate goal of the Xerces2 refactoring effort is to
-   develop an XML parser that is simple, clean, and modular.
-   By clearly defining the internal interfaces of the parser
-   components, the design of the parser will be better understood
-   and enable people to add features and fix bugs. Also, the
-   modularity of the design will enable custom configurations of
-   the parser that can be used in a wide variety of applications.
-  </p>
-  <a name='Scenarios'></a>
-  <h2>Scenarios</h2>
-  <p>
-   Xerces is a general purpose XML parser designed to be suitable
-   for a wide range of applications. A parser with better
-   performance can be written but it is believed that a general
-   design will suit a larger audience of XML application developers.
-   Therefore, any design should take into consideration what the
-   <em>users</em> of the parser need.
-  </p>
-  <p>
-   A few scenarios highlight the disparate needs of the developer
-   audience:
-   <ul>
-    <li>
-     <strong>XML Editor</strong><br>
-     <span class='needs'>grammar access; document 
-     editing and events; re-validation</span>
-    </li>
-    <li>
-     <strong>Transaction Server that "Speaks" XML</strong><br>
-     <span class='needs'>high performance; grammar caching</span>
-    </li>
-    <li>
-     <strong>Client-side XML Applets</strong><br>
-     <span class='needs'>small footprint; serialization</span>
-    </li>
-   </ul>
-  </p>
-  <a name='Documentation'></a>
-  <h2>Documentation</h2>
-  <p>
-   <dl>
-<!--
-    <dt><a href='schedule.html'>Implementation Schedule</a></dt>
--->
-
-    <dt><a href='coding.html'>Coding Conventions</a></dt>
-
-    <dt>Design Documents</dt>
-    <dd>
-     Evaluation of <a href='crimson.html'>Crimson</a> and
-     <a href='xerces.html'>Xerces</a> Code
-    </dd>
-    <dd><a href='architecture.html'>Xerces2 Architecture</a></dd>
-    <dd><a href='entities.html'>Entity Management</a></dd>
-    <dd><a href='issues.html'>Implementation Issues</a></dd>
-
-    <dt>Presentations</dt>
-    <dd>
-     <a href='http://www.apache.org/~andyc/speeches/20010407/Xerces2.ppt'>Xerces2</a> (PowerPoint 2000) <br>
-     07 Apr 2001: XML Developer's Day - Tokyo, Japan
-    </dd>
-    <dd>
-     <a href='http://www.apache.org/~andyc/speeches/20010611/xerces2ws.ppt'>Xerces2
-     Workshop</a> (PowerPoint 2000) <br>
-     11 Jun 2001: Xerces2 Workshop - Cupertino, CA
-    </dd>
-
-    <dt>Interfaces and Classes</dt>
-    <dd>
-     Design
-     [<a href='design.html'>.html</a>] 
-     [<a href='css/design.css'>.css</a>] 
-     [<a href='xml/design.dtd'>.dtd</a>] 
-     [<a href='xml/design-all.xml'>.xml</a>] 
-     [<a href='xsl/design.xsl'>.xsl</a>] 
-<!-- The DesignDoc program is currently broken. -Ac
-     [<a href='design.zip'>.zip</a>]
--->
-    </dd>
-
-    <dt>Useful Programs</dt>
-    <dd>
-     Stylesheet
-     [<a href='src/Stylesheet.java'>.java</a>]
-     [<a href='src/Stylesheet.class'>.class</a>]
-    </dd>
-<!-- The DesignDoc program is currently broken. -Ac
-    <dd>
-     DesignDoc
-     [<a href='src/DesignDoc.java'>.java</a>]
-     [<a href='src/DesignDoc.class'>.class</a>]
-     [<a href='src/DesignDoc$IndentingWriter.class'>.class</a>]
-    </dd>
--->
-   </dl>
-  </p>
-  <a name='SourceCode'></a>
-  <h2>Source Code</h2>
-  <p>
-   The source code is available in the Apache CVS repository
-   in the "xerces_j_2" branch of the "xml-xerces" module. For
-   anonymous access to the source code, use the following
-   commands to checkout the code into a local directory named
-   "x2":
-   <pre>
-    set CVSROOT=:pserver:anoncvs@cvs.apache.org:/home/cvspublic
-    cvs login        <em>(password: anoncvs)</em>
-    cvs checkout -d x2 -r xerces_j_2 xml-xerces/java 
-   </pre>
-  </p>
-  <a name='SourceCode.MainBranches'></a>
-  <h3>Main Branches</h3>
-  <p>
-   <table border='0' cellspacing='2' cellpadding='3'>
-    <tr><th>Branch</th><th>Description</th></tr>
-    <tr>
-     <td>xerces_j_2</td>
-     <td>
-      Main development branch for the Xerces2 implementation.
-     </td>
-    </tr>
-    <tr>
-     <td>x2m1</td>
-     <td>
-      Milestone 1<br>
-      The code from this milestone implements basic document parsing.
-      Only element, attributes, and text content is supported; all other
-      XML constructs are <strong>not</strong> supported. The SAXParser
-      and SAX examples can be used to test the code.
-     </td>
-    </tr>
-    <!--
-    <tr>
-     <td></td>
-     <td>
-     </td>
-    </tr>
-    -->
-   </table>
-  </p>
-  <a name='SourceCode.SupplementalBranches'></a>
-  <h3>Supplemental Branches</h3>
-  <p>
-   All of the supplemental branches are created from the main
-   development branch named "xerces_j_2". Supplemental branches are
-   used for discovery work with the intention that code and/or
-   ideas from the branch will be merged back into the "xerces_j_2"
-   branch.
-  </p>
-  <p>
-   <table border='0' cellspacing='2' cellpadding='3'>
-    <tr><th>Branch</th><th>Description</th></tr>
-    <tr>
-     <td>x2entities</td>
-     <td>
-      Code to implement a bare bones entity management system. 
-      <strong>Warning:</strong> The entity scanner is very inefficient 
-      and is not for production use. This entity scanner is only used 
-      to implement the essential entity scanning methods needed by the 
-      document scanner. <em>Note:</em> This branch is no longer needed
-      and the files have been removed.
-      <dl style='margin: 0'>
-       <dt>Contents:</dt>
-       <dd>src/org/apache/xerces/readers/XMLEntityManager.java</dd>
-       <dd>src/org/apache/xerces/readers/XMLEntityScanner.java</dd>
-      </dl>
-     </td>
-    </tr>
-    <tr>
-     <td>x2design</td>
-     <td>
-      A re-organization of class and interface packages to seperate core 
-      functionality from implementation. <em>Note:</em> This
-      work has now been merged back into the "xerces_j_2" branch.
-      <dl style='margin: 0'>
-       <dt>Contents:</dt>
-       <dd>design/xml/design.xml</dd>
-      </dl>
-     </td>
-    </tr>
-    <tr>
-     <td>parserConfig</td>
-     <td>
-      Experimentation with parser configuration. <em>Note:</em> This
-      work has now been merged back into the "xerces_j_2" branch.
-      <dl style='margin: 0'>
-       <dt>Contents:</dt>
-       <dd>src/org/apache/xerces/parsers (directory)</dd>
-      </dl>
-     </td>
-    </tr>
-    <!--
-    <tr>
-     <td></td>
-     <td>
-     </td>
-    </tr>
-    -->
-   </table>
-  </p>
-  </span>
-  <a name='BOTTOM'></a>
-  <hr>
-  <span class='netscape'>
-   Author: Andy Clark <br>
-   Last modified: $Date$
-  </span>
- </body>
-</html>
\ No newline at end of file
diff --git a/design/issues.html b/design/issues.html
deleted file mode 100644
index f0ff829..0000000
--- a/design/issues.html
+++ /dev/null
@@ -1,118 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
-                      "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd">
-<HTML>
- <HEAD>
-  <TITLE>Xerces 2 | Issues</TITLE>
-  <LINK href="css/site.css" rel="stylesheet" type="text/css">
- </HEAD>
- <BODY>
-  <SPAN class="netscape">
-   <A name="TOP"></A><H1>Implementation Issues</H1>
-   <A name></A>
-   <H2>Open Issues</H2>
-   <A name="I1"></A>
-   <H3>Entity Management &amp; Readers    (I1)   </H3>
-   <P>
-    <TABLE border="0" cellspacing="5">
-     <TR>
-      <TH>Originator:</TH>
-      <TD><A href="mailto:andyc@apache.org">Andy Clark</A></TD>
-     </TR>
-     <TR>
-      <TH>Details:</TH>
-      <TD>    The heart of parsing XML documents is the interaction
-       between    the various scanners and the document input stream.
-       Since this    is the critical path in the parser, performance is
-       an important    consideration. Yet, at the same time, the
-       interaction between    scanner and reader should be simple and
-       straightforward.   </TD>
-     </TR>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>     Entity stack management. The scanners can push readers on
-       the     stack when an entity reference is seen but who pops the
-       reader?    </TD>
-     </TR>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>     Who scans the XMLDecl and TextDecl lines? The scanner(s)
-       or     the entity reader?    </TD>
-     </TR>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>     Handling the changing of the input stream reader based
-       on the encoding specified in the XMLDecl or TextDecl lines.    </TD>
-     </TR>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>     How do we handle the pushback buffer needed at certain
-       times during parsing while still keeping the amount of
-       delegation down to a minimum?    </TD>
-     </TR>
-    </TABLE>
-   </P>
-   <A name="I2"></A>
-   <H3>Parser Pipeline Construction    (I2)   </H3>
-   <P>
-    <TABLE border="0" cellspacing="5">
-     <TR>
-      <TH>Originator:</TH>
-      <TD><A href="mailto:estaub@mediaone.net">Ed Staub</A></TD>
-     </TR>
-     <TR>
-      <TH>Details:</TH>
-      <TD>    The parser is designed as a pipeline and the components
-       need    to be connected together and configured.   </TD>
-     </TR>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>     Is there a generic way to put components together in
-       order to construct the pipeline? If users want to     construct a
-       new parser object with a different pipeline     configuration,
-       this should be easy to do.    </TD>
-     </TR>
-    </TABLE>
-   </P>
-   <A name="I3"></A>
-   <H3>Operations on XML Infoset    (I3)   </H3>
-   <P>
-    <TABLE border="0" cellspacing="5">
-     <TR>
-      <TH>Originator:</TH>
-      <TD><A href="mailto:estaub@mediaone.net">Ed Staub</A></TD>
-     </TR>
-     <TR>
-      <TH>Details:</TH>
-      <TD>    There are many emerging XML standards that involve
-       operations    on the XML Infoset.    XInclude is one of    these
-       standards that defines how XML inclusion operates on the
-       Infoset.   </TD>
-     </TR>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>     When should these operations take place in the parser
-       pipeline: before or after validation? And if it's after
-       validation, then what does it mean for the parser to say a
-       document is &quot;valid&quot;? The inclusion could cause the
-       document to      become invalid. This is more than an
-       implementation issue; it's     a standards issue.    <BR>
-       <STRONG>Comment: </STRONG>     If XInclude processing were called
-       after validation, then what would be     validated would be the
-       unexpanded XInclude.  In other words, the schema or     DTD would
-       describe the original unexpanded xinclude:href attributes, and so
-       forth.    </TD>
-     </TR>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>     Should operations on the XML Infoset even be in the
-       parser     pipeline?    </TD>
-     </TR>
-    </TABLE>
-   </P>
-  </SPAN>
-  <A name="BOTTOM"></A>
-  <HR>
-  <SPAN class="netscape">      Last updated on $Date: 2000/09/15
-   23:53:06 $</SPAN>
- </BODY>
-</HTML>
diff --git a/design/schedule.html b/design/schedule.html
deleted file mode 100644
index 819d344..0000000
--- a/design/schedule.html
+++ /dev/null
@@ -1,312 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
-                      "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd">
-<HTML>
- <HEAD>
-  <TITLE>Xerces 2 | Schedule</TITLE>
-  <LINK href="css/site.css" rel="stylesheet" type="text/css">
-<STYLE type="text/css">
-     .note { font-size: smaller }
-    </STYLE>
- </HEAD>
- <BODY>
-  <SPAN class="netscape">
-   <H1>Xerces 2 Schedule</H1>
-   <H2>Current Milestones</H2>
-   <A name="M2"></A>
-   <H3>Parser with DTD scanning without validation    (M2)   </H3>
-   <P>
-    <TABLE border="0">
-     <TR>
-      <TH>Date:</TH>
-      <TD>Friday, 6 October 2000</TD>
-     </TR>
-     <TR>
-      <TH>Depends:</TH>
-      <TD><A href="#M1">M1</A></TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>More documentation<SPAN class="note">
-        <BR>     Parser initialization and the validation system needs
-        to be     documented.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:jeffreyr@us.ibm.com">Jeff Rodriguez</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <A href="mailto:lehors@us.ibm.com">Arnaud Le Hors</A>
-        - <EM>Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>     Re-organize package structure to separate core interfaces
-       and     classes from implementation    <SPAN class="note">
-        <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:andyc@apache.org">Andy Clark</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <A href="mailto:lehors@us.ibm.com">Arnaud Le Hors</A>
-        - <EM>Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Improve entity manager and scanner<SPAN class="note">
-        <BR>     Must support external entities, including the DTD
-        entity and     pre-defined general entities (e.g. &amp;amp;).    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:andyc@apache.org">Andy Clark</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Improve document scanner<SPAN class="note">
-        <BR>     Handle trailing miscellaneous section; premature end of
-        file; use     the error reporter; etc.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:ericye@apache.org">Eric Ye</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Parsing of DOCTYPE line and DTD markup declarations<SPAN class="note">
-        <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:lehors@us.ibm.com">Arnaud Le Hors</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Storing basic DTD grammar information<SPAN class="note">
-        <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:jeffreyr@us.ibm.com">Jeff Rodriguez</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-    </TABLE>
-   </P>
-   <A name="M3"></A>
-   <H3>Parser with DTD scanning + datatypes and content model validation
-    (M3)   </H3>
-   <P>
-    <TABLE border="0">
-     <TR>
-      <TH>Depends:</TH>
-      <TD><A href="#M2">M2</A></TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Ever more documentation<SPAN class="note">
-        <BR>     Document parser configurations and how new components
-        and      configurations would be written and connected.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:andyc@apache.org">Andy Clark</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Datatype validators<SPAN class="note">
-        <BR>     Only those datatype validators needed for DTD grammars
-        need to be     added. All DTD datatypes should work: CDATA,
-        ENTITY, ENTITIES, ID,     IDREF, IDREFS, NMTOKEN, NMTOKENS, and
-        NOTATION.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:jeffreyr@us.ibm.com">Jeff Rodriguez</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Content model validators<SPAN class="note">
-        <BR>     This affects the following classes:
-        SimpleContentModel, MixedContentModel, DFAContentModel.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:ericye@apache.org">Eric Ye</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-    </TABLE>
-   </P>
-   <A name="M4"></A>
-   <H3>Parser with DTD scanning and Schema parsing + validation    (M4)   </H3>
-   <P>
-    <TABLE border="0">
-     <TR>
-      <TH>Depends:</TH>
-      <TD><A href="#M3">M3</A></TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>DOM implementation<SPAN class="note">
-        <BR>     Write the DOMParser to populate the DOM tree. Decide
-        what should     be done with the &quot;deferred&quot; DOM
-        implementation.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:lehors@us.ibm.com">Arnaud Le Hors</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Schema structures updated to current spec (22 Sep 2000)<SPAN class="note">
-        <BR>Can this be done without using the DOM?<BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:ericye@apache.org">Eric Ye</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Schema datatypes updated to current spec (22 Sep 2000)<SPAN class="note">
-        <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:jeffreyr@us.ibm.com">Jeff Rodriguez</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-    </TABLE>
-   </P>
-   <H2>Future Milestones</H2>
-   <A name="M666"></A>
-   <H3>Full Schema support    (M666)   </H3>
-   <P>
-    <TABLE border="0"></TABLE>
-   </P>
-   <A name="M9999"></A>
-   <H3>Party!    (M9999)   </H3>
-   <P>
-    <TABLE border="0"></TABLE>
-   </P>
-   <H2>Completed Milestones</H2>
-   <A name="M1"></A>
-   <H3>Parser without DTD support    (M1)   </H3>
-   <P>
-    <TABLE border="0">
-     <TR>
-      <TH>Date:</TH>
-      <TD>Friday, 29 Sep 2000</TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Document design based on Xerces community feedback<SPAN class="note">
-        <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:andyc@apache.org">Andy Clark</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Support classes<SPAN class="note">
-        <BR>     This affects the following classes:      XMLString,
-        XMLStringBuffer, XMLChar, EncodingMap, SymbolTable, QName.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:ericye@apache.org">Eric Ye</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Basic entity managment<SPAN class="note">
-        <BR>     This affects the following classes: XMLEntityManager,
-        XMLEntityScanner.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:jeffreyr@us.ibm.com">Jeff Rodriguez</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Basic error handling<SPAN class="note">
-        <BR>     This affects the following interfaces &amp; classes:
-        XMLErrorReporter, some MessageFormatter.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:ericye@apache.org">Eric Ye</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Parsing of elements and attributes using internal
-        interface<SPAN class="note">
-        <BR>     This affects the following classes: XMLAttributes,
-        XMLDocumentScanner.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:andyc@apache.org">Andy Clark</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-     <TR>
-      <TH>Task:</TH>
-      <TD>Implement a SAX2 parser from internal callbacks<SPAN class="note">
-        <BR>     This affects the following classes:      XMLParser,
-        XMLDocumentParser, SAXParser.    <BR>
-        <STRONG>Driver:</STRONG>
-        <A href="mailto:lehors@us.ibm.com">Arnaud Le Hors</A>
-        <BR>
-        <STRONG>Contributors:</STRONG>
-        <EM>Contributors wanted! Contact task driver to contribute.</EM>
-       </SPAN>
-      </TD>
-     </TR>
-    </TABLE>
-   </P>
-  </SPAN>
-  <HR>
-<SPAN class="netscape">
-     Last modified: $Date$</SPAN>
- </BODY>
-</HTML>
diff --git a/design/src/DesignDoc$IndentingWriter.class b/design/src/DesignDoc$IndentingWriter.class
deleted file mode 100644
index 64171d9..0000000
--- a/design/src/DesignDoc$IndentingWriter.class
+++ /dev/null
Binary files differ
diff --git a/design/src/DesignDoc.class b/design/src/DesignDoc.class
deleted file mode 100644
index 17ce928..0000000
--- a/design/src/DesignDoc.class
+++ /dev/null
Binary files differ
diff --git a/design/src/DesignDoc.java b/design/src/DesignDoc.java
deleted file mode 100644
index 719ee29..0000000
--- a/design/src/DesignDoc.java
+++ /dev/null
@@ -1,1172 +0,0 @@
-/* (C) Copyright 2000, Andy Clark. All rights reserved. */
-
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Vector;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import org.apache.xerces.parsers.DOMParser;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * @author Andy Clark
- * @version $Id$
- */
-public class DesignDoc {
-
-    //
-    // MAIN
-    //
-
-    public static void main(String argv[]) {
-        if (argv.length != 2) {
-            System.err.println("usage: DesignDoc xml_file zip_file");
-            System.exit(1);
-        }
-        Document document = readDesign(argv[0]);
-        if (document == null) {
-            System.err.println("error: Unable to read design.");
-            System.exit(1);
-        }
-        Element root = document.getDocumentElement();
-        if (root == null || !root.getNodeName().equals("design")) {
-            System.err.println("error: Design not found.");
-            System.exit(1);
-        }
-        DesignDoc design = new DesignDoc();
-        try {
-            design.generateDesign(argv[1], root);
-        }
-        catch (Exception e) {
-            System.err.println("error: Error building stubs.");
-            e.printStackTrace(System.err);
-            System.exit(1);
-        }
-        System.exit(0);
-    }
-
-    //
-    // Constants
-    //
-
-    public static final String GENERATOR_NAME = "DesignDoc";
-    
-    private static final String GENERATION_TIMESTAMP = new java.util.Date().toString();
-
-    //
-    // Static data
-    //
-
-    private static DOMParser parser;
-
-    //
-    // Data
-    //
-
-    private IndentingWriter out;
-    private ZipOutputStream zip;
-
-    //
-    // Public static methods
-    //
-
-    // reading
-
-    public static Document readDesign(String systemId) {
-        if (parser == null) {
-            parser = new DOMParser();
-            try {
-                parser.setFeature("http://xml.org/sax/features/validation", true);
-                parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false);
-            }
-            catch (Exception e) {
-                throw new RuntimeException("unable to set parser features");
-            }
-        }
-        try {
-            parser.parse(systemId);
-        }
-        catch (Exception e) {
-            return null;
-        }
-        return parser.getDocument();
-    }
-
-    //
-    // Public methods
-    //
-
-    // generation
-
-    public void generateDesign(String filename, Element design) throws IOException {
-        /***
-        int index = filename.lastIndexOf('.');
-        String basename = index != -1 ? filename.substring(0, index) : filename;
-        zip = new ZipOutputStream(new FileOutputStream(basename+".zip"));
-        /***/
-        zip = new ZipOutputStream(new FileOutputStream(filename));
-        /***/
-        out = new IndentingWriter(new PrintWriter(zip, true));
-        Element child = getFirstChildElement(design);
-        while (child != null) {
-            if (child.getNodeName().equals("category")) {
-                generateCategory(child);
-            }
-            child = getNextSiblingElement(child);
-        }
-        zip.finish();
-        zip.close();
-    }
-
-    public void generateCategory(Element category) throws IOException {
-        Element child = getFirstChildElement(category);
-        while (child != null) {
-            String name = child.getNodeName();
-            if (name.equals("class")) {
-                generateClass(child);
-            }
-            else if (name.equals("interface")) {
-                generateInterface(child);
-            }
-            child = getNextSiblingElement(child);
-        }
-    }
-
-    public void generateClass(Element cls) throws IOException {
-        zip.putNextEntry(new ZipEntry(makeFilename(cls)));
-        printCopyright();
-        /***
-        printClassProlog(cls);
-        /***/
-        printObjectProlog(cls);
-        /***/
-        printClassHeader(cls);
-        out.indent();
-        printConstants(cls);
-        printFields(cls);
-        printConstructors(cls);
-        printMethods(cls, true);
-        printImplementedMethods(cls);
-        out.outdent();
-        printClassFooter(cls);
-        zip.closeEntry();
-    }
-
-    public void generateInterface(Element inter) throws IOException {
-        zip.putNextEntry(new ZipEntry(makeFilename(inter)));
-        printCopyright();
-        /***
-        printInterfaceProlog(inter);
-        /***/
-        printObjectProlog(inter);
-        /***/
-        printInterfaceHeader(inter);
-        out.indent();
-        printConstants(inter);
-        printMethods(inter, false);
-        out.outdent();
-        printInterfaceFooter(inter);
-        zip.closeEntry();
-    }
-
-    // print: general
-
-    public void printCopyright() {
-        out.println("/*");
-        out.println(" * The Apache Software License, Version 1.1");
-        out.println(" *");
-        out.println(" *");
-        out.println(" * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights ");
-        out.println(" * reserved.");
-        out.println(" *");
-        out.println(" * Redistribution and use in source and binary forms, with or without");
-        out.println(" * modification, are permitted provided that the following conditions");
-        out.println(" * are met:");
-        out.println(" *");
-        out.println(" * 1. Redistributions of source code must retain the above copyright");
-        out.println(" *    notice, this list of conditions and the following disclaimer. ");
-        out.println(" *");
-        out.println(" * 2. Redistributions in binary form must reproduce the above copyright");
-        out.println(" *    notice, this list of conditions and the following disclaimer in");
-        out.println(" *    the documentation and/or other materials provided with the");
-        out.println(" *    distribution.");
-        out.println(" *");
-        out.println(" * 3. The end-user documentation included with the redistribution,");
-        out.println(" *    if any, must include the following acknowledgment:  ");
-        out.println(" *       \"This product includes software developed by the");
-        out.println(" *        Apache Software Foundation (http://www.apache.org/).\"");
-        out.println(" *    Alternately, this acknowledgment may appear in the software itself,");
-        out.println(" *    if and wherever such third-party acknowledgments normally appear.");
-        out.println(" *");
-        out.println(" * 4. The names \"Xerces\" and \"Apache Software Foundation\" must");
-        out.println(" *    not be used to endorse or promote products derived from this");
-        out.println(" *    software without prior written permission. For written ");
-        out.println(" *    permission, please contact apache@apache.org.");
-        out.println(" *");
-        out.println(" * 5. Products derived from this software may not be called \"Apache\",");
-        out.println(" *    nor may \"Apache\" appear in their name, without prior written");
-        out.println(" *    permission of the Apache Software Foundation.");
-        out.println(" *");
-        out.println(" * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED");
-        out.println(" * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES");
-        out.println(" * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE");
-        out.println(" * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR");
-        out.println(" * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,");
-        out.println(" * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT");
-        out.println(" * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF");
-        out.println(" * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND");
-        out.println(" * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,");
-        out.println(" * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT");
-        out.println(" * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF");
-        out.println(" * SUCH DAMAGE.");
-        out.println(" * ====================================================================");
-        out.println(" *");
-        out.println(" * This software consists of voluntary contributions made by many");
-        out.println(" * individuals on behalf of the Apache Software Foundation and was");
-        out.println(" * originally based on software copyright (c) 1999, International");
-        out.println(" * Business Machines, Inc., http://www.apache.org.  For more");
-        out.println(" * information on the Apache Software Foundation, please see");
-        out.println(" * <http://www.apache.org/>.");
-        out.println(" */");
-        out.println();
-    }
-
-    public void printObjectProlog(Element object) {
-        Element category = getParentNodeElement(object, "category");
-        String objectPackageName = "";
-        if (category != null) {
-            objectPackageName = category.getAttribute("package");
-            if (objectPackageName.length() > 0) {
-                out.print("package ");
-                out.print(objectPackageName);
-                out.print(';');
-                out.println();
-                out.println();
-            }
-        }
-        Vector references = new Vector();
-        collectImports(object, objectPackageName, references);
-        if (object.getNodeName().equals("class")) {
-            Element implementsElement = getFirstChildElement(object, "implements");
-            while (implementsElement != null) {
-                Element referenceElement = getLastChildElement(implementsElement, "reference");
-                String referenceIdref = referenceElement.getAttribute("idref");
-                Element interfaceElement = object.getOwnerDocument().getElementById(referenceIdref);
-                collectImports(interfaceElement, objectPackageName, references);
-                implementsElement = getNextSiblingElement(implementsElement, "implements");
-            }
-            int referenceCount = references.size();
-            if (referenceCount > 0) {
-                for (int i = 0; i < referenceCount; i++) {
-                    out.print("import ");
-                    out.print(String.valueOf(references.elementAt(i)));
-                    out.print(';');
-                    out.println();
-                }
-                out.println();
-            }
-        }
-    }
-
-    public void printObjectComment(Element object) {
-        out.println("/**");
-        Element note = getFirstChildElement(object, "note");
-        if (note != null) {
-            while (note != null) {
-                out.print(" * ");
-                out.println(getElementText(note));
-                note = getNextSiblingElement(note, "note");
-                if (note != null) {
-                    out.println(" * <p>");
-                }
-            }
-            out.println();
-        }
-        out.print(" * @author Stubs generated by ");
-        out.print(GENERATOR_NAME);
-        out.print(" on ");
-        out.println(GENERATION_TIMESTAMP);
-        out.println(" * @version $Id$");
-        out.println(" */");
-    }
-
-    // print: constants
-
-    public void printConstants(Element object) {
-        Element constant = getFirstChildElement(object, "constant");
-        if (constant != null) {
-            out.println("//");
-            out.println("// Constants");
-            out.println("//");
-            out.println();
-            while (constant != null) {
-                printConstant(constant);
-                constant = getNextSiblingElement(constant, "constant");
-            }
-        }
-    }
-
-    public void printConstant(Element constant) {
-        printConstantComment(constant);
-        out.print(constant.getAttribute("visibility"));
-        out.print(" static final ");
-        String defaultValue = printType(out, getLastChildElement(constant));
-        out.print(' ');
-        out.print(constant.getAttribute("name"));
-        out.print(" = ");
-        out.print(defaultValue);
-        out.println(';');
-        out.println();
-    }
-
-    public void printConstantComment(Element constant) {
-        out.print("/** ");
-        out.print(constant.getAttribute("name"));
-        out.print(" */");
-        out.println();
-    }
-
-    // print: fields
-
-    public void printFields(Element object) {
-        Element field = getFirstChildElement(object, "field");
-        if (field != null) {
-            out.println("//");
-            out.println("// Data");
-            out.println("//");
-            out.println();
-            while (field != null) {
-                printField(field);
-                field = getNextSiblingElement(field, "field");
-            }
-        }
-    }
-
-    public void printField(Element field) {
-        printFieldComment(field);
-        out.print(field.getAttribute("visibility"));
-        out.print(' ');
-        printType(out, getLastChildElement(field));
-        out.print(' ');
-        out.print(field.getAttribute("name"));
-        out.println(';');
-        out.println();
-    }
-
-    public void printFieldComment(Element field) {
-        out.print("/** ");
-        out.print(field.getAttribute("name"));
-        out.print(" */");
-        out.println();
-    }
-
-    // print: constructors
-
-    public void printConstructors(Element cls) {
-        Element constructor = getFirstChildElement(cls, "constructor");
-        if (constructor != null) {
-            out.println("//");
-            out.println("// Constructors");
-            out.println("//");
-            out.println();
-            while (constructor != null) {
-                printConstructor(constructor);
-                constructor = getNextSiblingElement(constructor, "constructor");
-            }
-        }
-    }
-
-    public void printConstructor(Element constructor) {
-        printConstructorComment(constructor);
-        out.print(constructor.getAttribute("visibility"));
-        out.print(' ');
-        String name = getParentNodeElement(constructor, "class").getAttribute("name");
-        out.print(name);
-        out.print('(');
-        Element param = getFirstChildElement(constructor, "param");
-        while (param != null) {
-            printType(out, getLastChildElement(param));
-            out.print(' ');
-            out.print(param.getAttribute("name"));
-            param = getNextSiblingElement(param, "param");
-            if (param != null) {
-                out.print(", ");
-            }
-        }
-        out.print(')');
-        Element throwsElement = getFirstChildElement(constructor, "throws");
-        if (throwsElement != null) {
-            Element packageElement = getParentNodeElement(constructor, "category");
-            String packageName = packageElement != null ? packageElement.getAttribute("package") : "";
-            out.println();
-            out.indent();
-            out.print("throws ");
-            while (throwsElement != null) {
-                String throwsIdref = getFirstChildElement(throwsElement, "reference").getAttribute("idref");
-                Element throwsClass = constructor.getOwnerDocument().getElementById(throwsIdref);
-                String throwsClassName = throwsClass.getAttribute("name");
-                /***
-                Element throwsCategory = getParentNodeElement(throwsClass);
-                String throwsPackageName = throwsCategory != null ? throwsCategory.getAttribute("package") : "";
-                if (throwsPackageName.length() == 0) {
-                    throwsPackageName = null;
-                }
-                if (packageName != null && throwsPackageName != null) {
-                    if (!packageName.equals(throwsPackageName)) {
-                        out.print(throwsPackageName);
-                        out.print('.');
-                    }
-                }
-                /***/
-                out.print(throwsClassName);
-                throwsElement = getNextSiblingElement(throwsElement, "throws");
-                if (throwsElement != null) {
-                    out.print(", ");
-                }
-            }
-            out.outdent();
-        }
-        out.println(" {");
-        out.println('}');
-        out.println();
-    }
-
-    public void printMethodComment(Element method) {
-        out.println("/**");
-        Element note = getFirstChildElement(method, "note");
-        if (note == null) {
-            out.print(" * ");
-            out.print(method.getAttribute("name"));
-            out.println();
-        }
-        else {
-            while (note != null) {
-                out.print(" * ");
-                out.println(getElementText(note));
-                note = getNextSiblingElement(note, "note");
-                if (note != null) {
-                    out.println(" * <p>");
-                }
-            }
-        }
-        Element param = getFirstChildElement(method, "param");
-        Element returns = getFirstChildElement(method, "returns");
-        if (param != null || returns != null) {
-            out.println(" * ");
-        }
-        if (param != null) {
-            while (param != null) {
-                printParamComment(param);
-                param = getNextSiblingElement(param, "param");
-            }
-        }
-        if (returns != null) {
-            if (getFirstChildElement(method, "param") != null) {
-                out.println(" * ");
-            }
-            printReturnsComment(returns);
-        }
-        out.println(" */");
-    }
-
-    // print: methods
-
-    public void printMethods(Element object, boolean body) {
-        Element method = getFirstChildElement(object, "method");
-        if (method != null) {
-            out.println("//");
-            out.println("// Methods");
-            out.println("//");
-            out.println();
-            while (method != null) {
-                printMethod(method, body);
-                method = getNextSiblingElement(method, "method");
-            }
-        }
-    }
-
-    public void printImplementedMethods(Element cls) {
-        Element implementsElement = getFirstChildElement(cls, "implements");
-        while (implementsElement != null) {
-            Element referenceElement = getLastChildElement(implementsElement, "reference");
-            String referenceIdref = referenceElement.getAttribute("idref");
-            Element interfaceElement = cls.getOwnerDocument().getElementById(referenceIdref);
-            Element method = getFirstChildElement(interfaceElement, "method");
-            if (method != null) {
-                out.println("//");
-                out.print("// ");
-                out.print(interfaceElement.getAttribute("name"));
-                out.println(" methods");
-                out.println("//");
-                out.println();
-                while (method != null) {
-                    printMethod(method, true);
-                    method = getNextSiblingElement(method, "method");
-                }
-            }
-            implementsElement = getNextSiblingElement(implementsElement, "implements");
-        }
-    }
-
-    public void printMethod(Element method, boolean body) {
-        printMethodComment(method);
-        out.print(method.getAttribute("visibility"));
-        out.print(' ');
-        Element returns = getFirstChildElement(method, "returns");
-        String defaultValue = null;
-        if (returns != null) {
-            defaultValue = printType(out, getLastChildElement(returns));
-        }
-        else {
-            out.print("void");
-        }
-        out.print(' ');
-        String name = method.getAttribute("name");
-        out.print(name);
-        out.print('(');
-        Element param = getFirstChildElement(method, "param");
-        while (param != null) {
-            printType(out, getLastChildElement(param));
-            out.print(' ');
-            out.print(param.getAttribute("name"));
-            param = getNextSiblingElement(param, "param");
-            if (param != null) {
-                out.print(", ");
-            }
-        }
-        out.print(')');
-        Element throwsElement = getFirstChildElement(method, "throws");
-        if (throwsElement != null) {
-            Element packageElement = getParentNodeElement(method, "category");
-            String packageName = packageElement != null ? packageElement.getAttribute("package") : "";
-            out.println();
-            out.indent();
-            out.print("throws ");
-            while (throwsElement != null) {
-                String throwsIdref = getFirstChildElement(throwsElement, "reference").getAttribute("idref");
-                Element throwsClass = method.getOwnerDocument().getElementById(throwsIdref);
-                String throwsClassName = throwsClass.getAttribute("name");
-                /***
-                Element throwsCategory = getParentNodeElement(throwsClass);
-                String throwsPackageName = throwsCategory != null ? throwsCategory.getAttribute("package") : "";
-                if (throwsPackageName.length() == 0) {
-                    throwsPackageName = null;
-                }
-                if (packageName != null && throwsPackageName != null) {
-                    if (!packageName.equals(throwsPackageName)) {
-                        out.print(throwsPackageName);
-                        out.print('.');
-                    }
-                }
-                /***/
-                out.print(throwsClassName);
-                throwsElement = getNextSiblingElement(throwsElement, "throws");
-                if (throwsElement != null) {
-                    out.print(", ");
-                }
-            }
-            out.outdent();
-        }
-        if (body) {
-            out.println(" {");
-            if (defaultValue != null) {
-                out.indent();
-                out.print("return ");
-                out.print(defaultValue);
-                out.println(';');
-                out.outdent();
-            }
-            out.print("} // ");
-            out.println(name);
-        }
-        else {
-            out.println(';');
-        }
-        out.println();
-    }
-
-    public void printConstructorComment(Element constructor) {
-        out.println("/**");
-        Element note = getFirstChildElement(constructor, "note");
-        if (note == null) {
-            out.print(" * ");
-            out.print(constructor.getAttribute("name"));
-            out.println();
-        }
-        else {
-            while (note != null) {
-                out.print(" * ");
-                out.println(getElementText(note));
-                note = getNextSiblingElement(note, "note");
-                if (note != null) {
-                    out.println(" * <p>");
-                }
-            }
-        }
-        Element param = getFirstChildElement(constructor, "param");
-        if (param != null) {
-            out.println(" * ");
-        }
-        if (param != null) {
-            while (param != null) {
-                printParamComment(param);
-                param = getNextSiblingElement(param, "param");
-            }
-        }
-        out.println(" */");
-    }
-
-    public void printParamComment(Element param) {
-        out.print(" * @param ");
-        out.print(param.getAttribute("name"));
-        out.print(' ');
-        Element note = getFirstChildElement(param, "note");
-        while (note != null) {
-            out.print(getElementText(note));
-            note = getNextSiblingElement(note, "note");
-            if (note != null) {
-                out.println();
-                out.println("<p>");
-                out.print(" * ");
-            }
-        }
-        out.println();
-    }
-
-    public void printReturnsComment(Element returns) {
-        out.print(" * @return ");
-        Element note = getFirstChildElement(returns, "note");
-        while (note != null) {
-            out.print(getElementText(note));
-            note = getNextSiblingElement(returns, "note");
-            if (note != null) {
-                out.println();
-                out.println(" * <p>");
-                out.print(" * ");
-            }
-        }
-        out.println();
-    }
-
-    // print: class
-
-    /***
-    public void printClassProlog(Element cls) {
-        Element category = getParentNodeElement(cls, "category");
-        String classPackageName = "";
-        if (category != null) {
-            classPackageName = category.getAttribute("package");
-            if (classPackageName.length() > 0) {
-                out.print("package ");
-                out.print(classPackageName);
-                out.print(';');
-                out.println();
-                out.println();
-            }
-        }
-        Vector references = new Vector();
-        collectImports(cls, classPackageName, references);
-        Element implementsElement = getFirstChildElement(cls, "implements");
-        while (implementsElement != null) {
-            Element referenceElement = getLastChildElement(implementsElement, "reference");
-            String referenceIdref = referenceElement.getAttribute("idref");
-            Element interfaceElement = cls.getOwnerDocument().getElementById(referenceIdref);
-            collectImports(interfaceElement, classPackageName, references);
-            implementsElement = getNextSiblingElement(implementsElement, "implements");
-        }
-        int referenceCount = references.size();
-        if (referenceCount > 0) {
-            for (int i = 0; i < referenceCount; i++) {
-                out.print("import ");
-                out.print(String.valueOf(references.elementAt(i)));
-                out.print(';');
-                out.println();
-            }
-            out.println();
-        }
-    }
-    /***/
-
-    public void printClassHeader(Element cls) {
-        printObjectComment(cls);
-        out.print(cls.getAttribute("visibility"));
-        out.print(" class ");
-        out.print(cls.getAttribute("name"));
-        Element extendsElement = getFirstChildElement(cls, "extends");
-        Element implementsElement = getFirstChildElement(cls, "implements");
-        if (extendsElement != null || implementsElement != null) {
-            /***
-            Element category = getParentNodeElement(cls, "category");
-            String packageName = category != null ? category.getAttribute("package") : "";
-            if (packageName.length() == 0) {
-                packageName = null;
-            }
-            /***/
-            if (extendsElement != null) {
-                out.println();
-                out.indent();
-                out.print("extends ");
-                String extendsIdref = getFirstChildElement(extendsElement, "reference").getAttribute("idref");
-                Element extendsClass = cls.getOwnerDocument().getElementById(extendsIdref);
-                String extendsClassName = extendsClass.getAttribute("name");
-                /***
-                Element extendsCategory = getParentNodeElement(extendsClass);
-                String extendsPackageName = extendsCategory != null ? extendsCategory.getAttribute("package") : "";
-                if (extendsPackageName.length() == 0) {
-                    extendsPackageName = null;
-                }
-                if (packageName != null && extendsPackageName != null) {
-                    if (!packageName.equals(extendsPackageName)) {
-                        out.print(extendsPackageName);
-                        out.print('.');
-                    }
-                }
-                /***/
-                out.print(extendsClassName);
-                out.outdent();
-            }
-            if (implementsElement != null) {
-                out.println();
-                out.indent();
-                out.print("implements ");
-                while (implementsElement != null) {
-                    String implementsIdref = getFirstChildElement(implementsElement, "reference").getAttribute("idref");
-                    Element implementsInterface = cls.getOwnerDocument().getElementById(implementsIdref);
-                    String implementsInterfaceName = implementsInterface.getAttribute("name");
-                    /***
-                    Element implementsPackage = getParentNodeElement(implementsInterface, "category");
-                    String implementsPackageName = implementsPackage != null ? implementsPackage.getAttribute("package") : "";
-                    if (implementsPackageName.length() == 0) {
-                        implementsPackageName = null;
-                    }
-                    if (packageName != null && implementsPackageName != null) {
-                        if (!packageName.equals(implementsPackageName)) {
-                            out.print(implementsPackageName);
-                            out.print('.');
-                        }
-                    }
-                    /***/
-                    out.print(implementsInterfaceName);
-                    implementsElement = getNextSiblingElement(implementsElement, "implements");
-                    if (implementsElement != null) {
-                        out.print(", ");
-                    }
-                }
-                out.outdent();
-            }
-        }
-        out.println(" {");
-        out.println();
-    }
-
-    public void printClassFooter(Element cls) {
-        out.print("} // class ");
-        out.println(cls.getAttribute("name"));
-    }
-
-    // print: interface
-
-    /***
-    public void printInterfaceProlog(Element inter) {
-        Element category = getParentNodeElement(inter, "category");
-        if (category != null) {
-            String packageName = category.getAttribute("package");
-            if (packageName.length() > 0) {
-                out.print("package ");
-                out.print(packageName);
-                out.print(';');
-                out.println();
-                out.println();
-            }
-        }
-        // REVISIT: How about adding the imports here?
-    }
-    /***/
-
-    public void printInterfaceHeader(Element inter) {
-        printObjectComment(inter);
-        out.print(inter.getAttribute("visibility"));
-        out.print(" interface ");
-        out.print(inter.getAttribute("name"));
-        Element extendsElement = getFirstChildElement(inter, "extends");
-        if (extendsElement != null) {
-            out.println();
-            out.indent();
-            out.print("extends ");
-            String extendsIdref = getFirstChildElement(extendsElement, "reference").getAttribute("idref");
-            Element extendsClass = inter.getOwnerDocument().getElementById(extendsIdref);
-            String extendsClassName = extendsClass.getAttribute("name");
-            /***
-            Element extendsCategory = getParentNodeElement(extendsClass);
-            String extendsPackageName = extendsCategory != null ? extendsCategory.getAttribute("package") : "";
-            if (extendsPackageName.length() == 0) {
-                extendsPackageName = null;
-            }
-            Element category = getParentNodeElement(inter, "category");
-            String packageName = category != null ? category.getAttribute("package") : "";
-            if (packageName.length() == 0) {
-                packageName = null;
-            }
-            if (packageName != null && extendsPackageName != null) {
-                if (!packageName.equals(extendsPackageName)) {
-                    out.print(extendsPackageName);
-                    out.print('.');
-                }
-            }
-            /***/
-            out.print(extendsClassName);
-            out.outdent();
-        }
-        out.println(" {");
-        out.println();
-    }
-
-    public void printInterfaceFooter(Element inter) {
-        out.print("} // interface ");
-        out.println(inter.getAttribute("name"));
-    }
-
-    //
-    // Private static methods
-    //
-
-    // other
-
-    private void collectImports(Element object, String objectPackageName,
-                                Vector references) {
-        Element place = getFirstChildElement(object);
-        while (place != null) {
-            if (place.getNodeName().equals("reference")) {
-                String idref = place.getAttribute("idref");
-                Element idrefElement = place.getOwnerDocument().getElementById(idref);
-                Element idrefCategoryElement = getParentNodeElement(idrefElement, "category");
-                String packageName = idrefCategoryElement.getAttribute("package");
-                if (packageName.length() > 0 && !packageName.equals(objectPackageName)) {
-                    String reference = packageName + '.' + idrefElement.getAttribute("name");
-                    if (!references.contains(reference)) {
-                        int index = references.size();
-                        while (index > 0) {
-                            if (reference.compareTo((String)references.elementAt(index - 1)) >= 0) {
-                                break;
-                            }
-                            index--;
-                        }
-                        references.insertElementAt(reference, index);
-                    }
-                }
-            }
-            Element next = getFirstChildElement(place);
-            while (next == null) {
-                next = getNextSiblingElement(place);
-                if (next == null) {
-                    place = getParentNodeElement(place);
-                    if (place == object) {
-                        break;
-                    }
-                }
-            }
-            place = next;
-        }
-    }
-
-    // file name generation
-
-    private static String makeFilename(Element object) {
-        String name = object.getAttribute("name");
-        Element packageElement = getParentNodeElement(object, "category");
-        String packageName = packageElement != null ? packageElement.getAttribute("package") : "";
-        int packageNameLen = packageName.length();
-        StringBuffer path = new StringBuffer(packageNameLen+1+name.length()+5);
-        if (packageNameLen > 0) {
-            path.append(packageName.replace('.', '/'));
-            path.append('/');
-        }
-        path.append(name);
-        path.append(".java");
-        return path.toString();
-    }
-
-    // printing
-
-    private static String printType(IndentingWriter out, Element type) {
-        String name = type.getNodeName();
-        if (name.equals("array")) {
-            printType(out, getLastChildElement(type));
-            String dimensionString = type.getAttribute("dimension");
-            int dimension = Integer.parseInt(dimensionString);
-            for (int i = 0; i < dimension; i++) {
-                out.print("[]");
-            }
-            return "null";
-        }
-        if (name.equals("primitive")) {
-            String typeName = type.getAttribute("type");
-            out.print(typeName);
-            if (typeName.equals("long") || typeName.equals("int") || typeName.equals("short")) {
-                return "-1";
-            }
-            if (typeName.equals("char")) {
-                return "'\\uFFFE'"; // 0xFFFE == Not a character
-            }
-            if (typeName.equals("boolean")) {
-                return "false";
-            }
-            return "???";
-        }
-        if (name.equals("reference")) {
-            String idref = type.getAttribute("idref");
-            type = type.getOwnerDocument().getElementById(idref);
-            String typeName = type.getAttribute("name");
-            /***
-            String typePackageName = ((Element)type.getParentNode()).getAttribute("package");
-            if (typePackageName.length() == 0) {
-                typePackageName = null;
-            }
-            Element category = (Element)type.getParentNode();
-            while (!category.getNodeName().equals("category")) {
-                category = (Element)category.getParentNode();
-            }
-            String packageName = category.getAttribute("package");
-            if (packageName.length() == 0) {
-                packageName = null;
-            }
-            if (packageName != null && typePackageName != null) {
-                if (!packageName.equals(typePackageName)) {
-                    out.print(typePackageName);
-                    out.print('.');
-                }
-            }
-            /***/
-            out.print(typeName);
-            return "null";
-        }
-        if (name.equals("collection")) {
-            Element child = getFirstChildElement(type);
-            while (!child.getNodeName().equals("collector")) {
-                child = getNextSiblingElement(type);
-            }
-            printType(out, getLastChildElement(child));
-            return "null";
-        }
-        out.print("???");
-        return "???";
-    }
-
-    // dom utils
-
-    private static Element getParentNodeElement(Node node) {
-        Node parent = node.getParentNode();
-        while (parent != null) {
-            if (parent.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)parent;
-            }
-            parent = parent.getParentNode();
-        }
-        return null;
-    }
-
-    private static Element getParentNodeElement(Node node, String name) {
-        Node parent = node.getParentNode();
-        while (parent != null) {
-            if (parent.getNodeType() == Node.ELEMENT_NODE && parent.getNodeName().equals(name)) {
-                return (Element)parent;
-            }
-            parent = parent.getParentNode();
-        }
-        return null;
-    }
-
-    private static String getElementText(Element element) {
-        Node child = element.getFirstChild();
-        if (child != null) {
-            StringBuffer str = new StringBuffer();
-            while (child != null) {
-                if (child.getNodeType() == Node.TEXT_NODE) {
-                    str.append(child.getNodeValue());
-                }
-                child = child.getNextSibling();
-            }
-            return str.toString();
-        }
-        return "";
-    }
-
-    private static Element getFirstChildElement(Node parent) {
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)child;
-            }
-            child = child.getNextSibling();
-        }
-        return null;
-    }
-
-    private static Element getFirstChildElement(Node parent, String name) {
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equals(name)) {
-                return (Element)child;
-            }
-            child = child.getNextSibling();
-        }
-        return null;
-    }
-
-    private static Element getLastChildElement(Node parent) {
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)child;
-            }
-            child = child.getPreviousSibling();
-        }
-        return null;
-    }
-
-    private static Element getLastChildElement(Node parent, String name) {
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equals(name)) {
-                return (Element)child;
-            }
-            child = child.getPreviousSibling();
-        }
-        return null;
-    }
-
-    private static Element getNextSiblingElement(Node node) {
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)sibling;
-            }
-            sibling = sibling.getNextSibling();
-        }
-        return null;
-    }
-
-    private static Element getNextSiblingElement(Node node, String name) {
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE && sibling.getNodeName().equals(name)) {
-                return (Element)sibling;
-            }
-            sibling = sibling.getNextSibling();
-        }
-        return null;
-    }
-
-    private static Element getPreviousSiblingElement(Node node) {
-        Node sibling = node.getPreviousSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)sibling;
-            }
-            sibling = sibling.getPreviousSibling();
-        }
-        return null;
-    }
-
-    private static Element getPreviousSiblingElement(Node node, String name) {
-        Node sibling = node.getPreviousSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE && sibling.getNodeName().equals(name)) {
-                return (Element)sibling;
-            }
-            sibling = sibling.getPreviousSibling();
-        }
-        return null;
-    }
-
-    //
-    // Classes
-    //
-
-    public static class IndentingWriter 
-        extends FilterWriter {
-
-        //
-        // Data
-        //
-
-        private PrintWriter out;
-        private int space = 4;
-        private String spaceStr = "    ";
-        private int level;
-        private boolean indent = true;
-
-        //
-        // Constructors
-        //
-
-        public IndentingWriter(PrintWriter out) {
-            super(out);
-            this.out = out;
-        }
-
-        //
-        // Public methods
-        //
-
-        public void indent() {
-            level++;
-        }
-
-        public void outdent() {
-            level--;
-        }
-
-        //
-        // PrintWriter methods
-        //
-
-        public void print(char ch) {
-            if (indent) { printIndent(); }
-            out.print(ch);
-        }
-
-        public void print(String s) {
-            if (indent) { printIndent(); }
-            out.print(s);
-        }
-
-        public void println(char ch) {
-            print(ch);
-            println();
-        }
-
-        public void println(String s) {
-            print(s);
-            println();
-        }
-
-        public void println() {
-            out.println();
-            indent = true;
-        }
-
-        //
-        // Private methods
-        //
-
-        private void printIndent() {
-            for (int i = 0; i < level; i++) {
-                out.print(spaceStr);
-            }
-            indent = false;
-        }
-
-    } // class IndentingWriter
-
-} // class Design
diff --git a/design/src/Stylesheet.class b/design/src/Stylesheet.class
deleted file mode 100644
index fd92269..0000000
--- a/design/src/Stylesheet.class
+++ /dev/null
Binary files differ
diff --git a/design/src/Stylesheet.java b/design/src/Stylesheet.java
deleted file mode 100644
index f75b3f6..0000000
--- a/design/src/Stylesheet.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/* (C) Copyright 2000, Andy Clark. All rights reserved. */
-
-import java.io.IOException;
-
-import org.apache.xalan.xslt.XSLTInputSource;
-import org.apache.xalan.xslt.XSLTProcessor;
-import org.apache.xalan.xslt.XSLTProcessorFactory;
-import org.apache.xalan.xslt.XSLTResultTarget;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xml.serialize.HTMLSerializer;
-import org.apache.xml.serialize.OutputFormat;
-
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-/**
- * @author Andy Clark
- * @version $Id$
- */
-public class Stylesheet {
-
-    public static void main(String argv[]) {
-
-        if (argv.length != 2) {
-            System.err.println("usage: java Stylesheet xml_file xsl_file");
-            System.exit(1);
-        }
-
-
-        Document doc = new DocumentImpl();
-        try {
-            XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
-            XSLTInputSource  xml  = new XSLTInputSource(argv[0]);
-            XSLTInputSource  xslt = new XSLTInputSource(argv[1]);
-            XSLTResultTarget target = new XSLTResultTarget(doc);
-            processor.process(xml, xslt, target);
-        }
-        catch (SAXException e) {
-            System.err.println("error: Error processing stylesheet.");
-            System.exit(1);
-        }
-
-        try {
-            OutputFormat format = new OutputFormat();
-            format.setIndenting(true);
-            format.setIndent(1);
-            HTMLSerializer serializer = new HTMLSerializer(format);
-            serializer.setOutputByteStream(System.out);
-            serializer.serialize(doc);
-        }
-        catch (IOException e) {
-            System.err.println("error: Unable to output document.");
-            System.exit(1);
-        }
-
-        System.exit(0);
-
-    } // main(String[])
-
-} // class Stylesheet
diff --git a/design/validation.htm b/design/validation.htm
deleted file mode 100644
index daa662c..0000000
--- a/design/validation.htm
+++ /dev/null
@@ -1,287 +0,0 @@
-<!-- $Id$ -->
-<html xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-<link rel='stylesheet' type='text/css' href='css/site.css'>
-<link rel='stylesheet' type='text/css' href='css/diagram.css'>
-<style type='text/css'>
-   .note { font-size: smaller }
-</style>
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List href="./validation_files/filelist.xml">
-<link rel=Edit-Time-Data href="./validation_files/editdata.mso">
-<link rel=OLE-Object-Data href="./validation_files/oledata.mso">
-<!--[if !mso]>
-<style>
-v\:* {behavior:url(#default#VML);}
-o\:* {behavior:url(#default#VML);}
-w\:* {behavior:url(#default#VML);}
-.shape {behavior:url(#default#VML);}
-</style>
-<![endif]-->
-<title>Validation</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
-  <o:Author>Jeffrey Rodriguez</o:Author>
-  <o:Template>Normal</o:Template>
-  <o:LastAuthor>Jeffrey Rodriguez</o:LastAuthor>
-  <o:Revision>5</o:Revision>
-  <o:TotalTime>421</o:TotalTime>
-  <o:LastPrinted>2000-10-06T22:51:00Z</o:LastPrinted>
-  <o:Created>2000-10-07T00:13:00Z</o:Created>
-  <o:LastSaved>2000-10-07T02:27:00Z</o:LastSaved>
-  <o:Pages>2</o:Pages>
-  <o:Words>553</o:Words>
-  <o:Characters>3155</o:Characters>
-  <o:Company>IBM</o:Company>
-  <o:Lines>26</o:Lines>
-  <o:Paragraphs>6</o:Paragraphs>
-  <o:CharactersWithSpaces>3874</o:CharactersWithSpaces>
-  <o:Version>9.3821</o:Version>
- </o:DocumentProperties>
-</xml><![endif]-->
-<style>
-<!--
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-	{mso-style-parent:"";
-	margin:0in;
-	margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	font-size:12.0pt;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
-h1
-	{mso-style-next:Normal;
-	margin:0in;
-	margin-bottom:.0001pt;
-	line-height:200%;
-	mso-pagination:widow-orphan;
-	page-break-after:avoid;
-	mso-outline-level:1;
-	font-size:12.0pt;
-	font-family:"Times New Roman";
-	mso-font-kerning:0pt;
-	text-decoration:underline;
-	text-underline:single;}
-h2
-	{mso-style-next:Normal;
-	margin-top:0in;
-	margin-right:0in;
-	margin-bottom:0in;
-	margin-left:.25in;
-	margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	page-break-after:avoid;
-	mso-outline-level:2;
-	font-size:12.0pt;
-	font-family:"Times New Roman";
-	font-weight:normal;
-	text-decoration:underline;
-	text-underline:single;}
-p.MsoCaption, li.MsoCaption, div.MsoCaption
-	{mso-style-next:Normal;
-	margin-top:6.0pt;
-	margin-right:0in;
-	margin-bottom:6.0pt;
-	margin-left:0in;
-	mso-pagination:widow-orphan;
-	font-size:10.0pt;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";
-	font-weight:bold;}
-a:link, span.MsoHyperlink
-	{color:blue;
-	text-decoration:underline;
-	text-underline:single;}
-a:visited, span.MsoHyperlinkFollowed
-	{color:purple;
-	text-decoration:underline;
-	text-underline:single;}
-@page Section1
-	{size:8.5in 11.0in;
-	margin:1.0in 1.25in 1.0in 1.25in;
-	mso-header-margin:.5in;
-	mso-footer-margin:.5in;
-	mso-paper-source:0;}
-div.Section1
-	{page:Section1;}
- /* List Definitions */
-@list l0
-	{mso-list-id:919675701;
-	mso-list-type:hybrid;
-	mso-list-template-ids:-133154018 67698703 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
-ol
-	{margin-bottom:0in;}
-ul
-	{margin-bottom:0in;}
--->
-</style>
-<!--[if gte mso 9]><xml>
- <o:shapedefaults v:ext="edit" spidmax="1027"/>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <o:shapelayout v:ext="edit">
-  <o:idmap v:ext="edit" data="1"/>
- </o:shapelayout></xml><![endif]-->
-</head>
-
-<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<h1 style='line-height:normal'><span style='font-size:18.0pt;mso-bidi-font-size:
-12.0pt'>Validation<o:p></o:p></span></h1>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<p class=MsoNormal>The <i>Validator </i>is a component in this architecture
-since it implements the <i>Component</i> interface and any class that
-implements the Component Manager interface can manage it. E.g. a parser would
-configure the <i>components</i> that it needs through this interface by
-adhering to the guideline spelled out in the <a
-href="architecture.html#Configuration.SettingsManagement">Setting Management</a>
-section of this architecture overview.</p>
-
-<p class=MsoNormal>The <i>Component Manager</i> is in charge of setting up the
-following internal <i>Validator</i> fields: <i>SymbolTable, GrammarPool and
-ErrorFormatter.</i></p>
-
-<p class=MsoNormal>The Validator is universal since it is both a filter and a
-source of document events regardless of the other components connected to in
-the pipeline architecture. See figure 1. </p>
-
-<p class=MsoNormal align=center style='text-align:center'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<p class=MsoCaption align=center style='text-align:center'><img border=0
-width=381 height=150 id="_x0000_i1025" src="images\pipeline.gif"></p>
-
-<p class=MsoCaption align=center style='text-align:center'>Figure <span
-style='mso-field-code:"SEQ Figure \\* ARABIC"'>1</span>- Pipeline Architecture
-- Sources &amp; Filters</p>
-
-<p class=MsoNormal><span style="mso-spacerun: yes"> </span></p>
-
-<p class=MsoNormal>The following is an outline of the validation process used by
-the Validator:</p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<ol style='margin-top:0in' start=1 type=1>
- <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'>The
-     Validator uses the <i>Grammar pool</i> set by the Component Manager to
-     acquire Grammars. See <a href="#_Grammar_pool_and">Grammar pool and
-     Grammars</a> for more details</li>
- <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'>The
-     Validator uses GrammarÂ’s getter methods to gain access to Element,
-     Attribute, Notation, and Entity declarations.</li>
- <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'>When a
-     document event (through the Document Handler of the Validator) is received
-     the respective declaration is obtained from the Grammar. </li>
- <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'>These
-     declarations are used to validate content and content model. See <a
-     href="#_Data_type_and">Data type and Content model validators</a>.</li>
- <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'>If no
-     validation errors are caught or returned. Then we generate a document
-     event using the registered Document handler of the next component in the
-     pipeline.</li>
- <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'>If a
-     validation error is caught or returned then the error information is
-     formatted using the Error Formatter which in turn may call the Error
-     Handler.</li>
- <li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'>The
-     Validator component reset method allows setting a new component manager.</li>
-</ol>
-
-<h2><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></h2>
-
-<h1 style='line-height:normal'><a name="_Data_type_and"></a><span
-style='font-size:18.0pt;mso-bidi-font-size:12.0pt'>Data type and Content model
-validators</span><span style='font-size:18.0pt;mso-bidi-font-size:12.0pt;
-font-weight:normal'><o:p></o:p></span></h1>
-
-<h2><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></h2>
-
-<h2>Datatype validators</h2>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<p class=MsoNormal>Datatype Validators are based on the XML Schema Datatype
-draft. They are used by the Validator to validate attribute content in the case
-of a DTD or XML Schema grammars and to validate element content in the case of
-XML Schema grammars. Datatype validators implement the DatatypeValidator
-interface.<span style="mso-spacerun: yes">  </span></p>
-
-<p class=MsoNormal>The Validator uses a factory method than implements the
-DatatypeValidatorFactory to get datatypes instances.</p>
-
-<p class=MsoNormal>Datatype validatorÂ’s references are attached to the Element
-and Attribute declaration in the internal implementation of Grammars. See <a
-href="#_Grammar_pool_and">Grammar pools and Grammars</a> </p>
-
-<p class=MsoNormal><u><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></u></p>
-
-<h2>Content model validators</h2>
-
-<p class=MsoNormal><u><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></u></p>
-
-<p class=MsoNormal>Content model validators are used to check elements against
-the content model defined in an Element Declaration for those elements. Content
-model validators implement the ContentModelValidator interface.</p>
-
-<h1 style='line-height:normal'><a name="_Grammar_pool_and"></a><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></h1>
-
-<h1 style='line-height:normal'><span style='font-size:18.0pt;mso-bidi-font-size:
-12.0pt'>Grammar pool and Grammars<o:p></o:p></span></h1>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<p class=MsoNormal>A GrammarPool is a registry of Grammars. Grammars are keyed
-using a “grammar name” which could be a name space. Grammars are classes
-derived from the Grammar class. Grammars contain internal array structures, and
-public getter methods that can be used by the Validator to access grammar
-information. These getter methods provide access to different Declaration
-constructs. </p>
-
-<p class=MsoNormal>These Declaration constructs are: XMLElementDecl,
-XMLAttributeDecl, and XMLEntityDecl, and XMLNotationDecl. </p>
-
-<p class=MsoNormal>Other constructs available through the Grammars are:
-XMLSimpleType, ContentModelValidator, and DatatypeValidator.</p>
-
-<p class=MsoNormal>XMLSimpleType (Simple type) declarations are a special type
-of Element Declaration, which contains additional information beyond the one
-provided by XMLElementDecl such as data type validator references.<span
-style="mso-spacerun: yes">   </span></p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<h1 style='line-height:normal'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></h1>
-
-<h1><span style='font-size:18.0pt;mso-bidi-font-size:12.0pt'>Internal Grammar
-Structures<o:p></o:p></span></h1>
-
-<p class=MsoNormal align=center style='text-align:center'>
-<img border=0 width=578 height=587
-src="images\table.gif" >
-</p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<p class=MsoNormal><b><span style='color:silver'><a href="architecture.html">Bach
-to Architecture Overview</a></span></b></p>
-
-<p class=MsoNormal style='margin-left:.25in'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html>
diff --git a/design/xerces.html b/design/xerces.html
deleted file mode 100644
index 0a90083..0000000
--- a/design/xerces.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!-- $Id$ -->
-<html>
- <head>
-  <title>Xerces 2 | Xerces</title>
-  <link rel='stylesheet' type='text/css' href='css/site.css'>
- </head>
- <body>
-  <span class='netscape'>
-  <a name='TOP'></a>
-  <h1>Evaluation of Xerces Code</h1>
-  <a name='Overview'></a>
-  <h2>Overview</h2>
-  <p>
-   Historically, the <a href='http://xml.apache.org/xerces-j/'>Xerces</a>
-   code was developed to be the fastest 
-   <a href='http://www.w3.org/XML/'>XML</a> parser on the planet.
-   This impacted design decisions and caused the parser to be
-   written from the inside out. While this produced an extremely
-   fast XML parser with DTD validation, the overall design
-   suffered. Xerces developers have found it difficult to understand, 
-   fix bugs, and add new features. Hence the Xerces2 effort.
-  </p>
-  <a name='TheGood'></a>
-  <h2>The Good</h2>
-  <p>
-   <table border='0'>
-    <tr>
-     <th>Standards:</th>
-     <td>
-      The Xerces parser is an extremely complete XML parser. Besides
-      conforming to the XML and Namespace specifications, it offers
-      support for SAX 1 and 2; DOM Level 1 and 2; and most of
-      the latest working draft of XML Schema.
-     </td>
-    </tr>
-    <tr>
-     <th>Modularity:</th>
-     <td>
-      The current Xerces code made a decent attempt at modularity by
-      defining a set of interfaces between components of the parser
-      such as the scanner and validator. The parser is designed as 
-      a pipeline of components. This is a good idea whose implementation
-      got complicated by performance considerations and feature creep.
-     </td>
-    </tr>
-    <tr>
-     <th>Validation:</th>
-     <td>
-      Xerces is able to validate documents with grammars specified
-      in DTD and XML Schema syntax. All validation is performed by
-      a universal validator that can validate the union of features
-      found in both syntaxes. This enables the parser to handle
-      current and future grammars in a consistent way.
-     </td>
-    </tr>
-    <tr>
-     <th>Performance:</th>
-     <td>
-      The Xerces parser has always performed well. Implementation of
-      XML Schema has caused the performance to slip but this is to
-      be expected -- you can't do a lot more work per element without
-      incurring a performance penalty.
-     </td>
-    </tr>
-   </table>
-  </p>
-  <a name='TheBad'></a>
-  <h2>The Bad</h2>
-  <p>
-   <table border='0'>
-    <tr>
-     <th>Size:</th>
-     <td>
-      The parser is too big but this is not all due to the code
-      required to parse XML files. A lot of contributed features
-      have been rolled into the Xerces jar file. For example: 
-      HTML and WML DOM implementations; document serializers; etc.
-      It would be nice to find a way to package the features into
-      separate distributable jars.
-     </td>
-    </tr>
-    <tr>
-     <th>Simplicity:</th>
-     <td>
-      The code needs to be simplified. A lot of complexity of the
-      Xerces parser can be found in the entity readers and the use
-      of the string pool throughout the system.
-     </td>
-    </tr>
-    <tr>
-     <th>Documentation:</th>
-     <td>
-      This is little to no documentation of the Xerces code. And
-      frequently the javadoc comments are missing or incorrect. 
-      More effort must be taken in Xerces 2 in order to make sure 
-      that everything is well documented.
-     </td>
-    </tr>
-   </table>
-  </p>
-  </span>
-  <a name='BOTTOM'></a>
-  <hr>
-  <span class='netscape'>
-   Author: Andy Clark <br>
-   Last modified: $Date$
-  </span>
- </body>
-</html>
\ No newline at end of file
diff --git a/design/xml/design-all.xml b/design/xml/design-all.xml
deleted file mode 100644
index eeafa56..0000000
--- a/design/xml/design-all.xml
+++ /dev/null
@@ -1,4392 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<design date="$Date$" name="Xerces-J 2.0">
- 
- <types>
-  
-<!-- $Id$ -->
-<category name="Java Language">
- <class id="java-exception" name="Exception" visibility="public"></class>
- <class id="java-object" name="Object" visibility="public"></class>
- <class id="java-string" name="String" visibility="public"></class>
- <interface id="java-cloneable" name="Cloneable" visibility="public"></interface>
-</category>
-
-<category name="Java I/O" package="java.io">
- <class id="java-io-exception" name="IOException" visibility="public"></class>
- <class id="java-io-input-stream" name="Inputstream" visibility="public"></class>
- <class id="java-io-reader" name="Reader" visibility="public"></class>
-</category>
-
-<category name="Java Utils" package="java.util">
- <class id="java-empty-stack-exception" name="EmptyStackException" visibility="public"></class>
- <class id="java-hashtable" name="Hashtable" visibility="public"></class>
- <class id="java-locale" name="Locale" visibility="public"></class>
- <class id="java-missing-resource-exception" name="MissingResourceException" visibility="public"></class>
- <class id="java-stack" name="Stack" visibility="public"></class>
- <class id="java-vector" name="Vector" visibility="public"></class>
-</category>
-
-  
-<!-- $Id$ -->
-<category name="Document Object Model" package="org.w3c.dom">
- <interface id="dom-document" name="Document" visibility="public"></interface>
-</category>
-
-  
-<!-- $Id$ -->
-<category name="Simple API for XML" package="org.xml.sax">
- <class id="sax-exception" name="SAXException" visibility="public"></class>
- <class id="sax-input-source" name="InputSource" visibility="public"></class>
- <class id="sax-not-recognized-exception" name="SAXNotRecognizedException" visibility="public"></class>
- <class id="sax-not-supported-exception" name="SAXNotSupportedException" visibility="public"></class>
- <class id="sax-parse-exception" name="SAXParseException" visibility="public"></class>
- <interface id="sax-attribute-list" name="AttributeList" visibility="public"></interface>
- <interface id="sax-attributes" name="Attributes" visibility="public"></interface>
- <interface id="sax-content-handler" name="ContentHandler" visibility="public"></interface>
- <interface id="sax-document-handler" name="DocumentHandler" visibility="public"></interface>
- <interface id="sax-dtd-handler" name="DTDHandler" visibility="public"></interface>
- <interface id="sax-entity-resolver" name="EntityResolver" visibility="public"></interface>
- <interface id="sax-error-handler" name="ErrorHandler" visibility="public"></interface>
- <interface id="sax-locator" name="Locator" visibility="public">
-  <method name="getPublicId" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  <method name="getSystemId" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  <method name="getLineNumber" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  <method name="getColumnNumber" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
- </interface>
- <interface id="sax-parser" name="Parser" visibility="public">
-  <method name="parse" visibility="public">
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  <method name="parse" visibility="public">
-   <param name="inputSource">
-    <reference idref="sax-input-source"></reference>
-   </param>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  <method name="setLocale" visibility="public">
-   <param name="locale">
-    <reference idref="java-locale"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  <method name="setEntityResolver" visibility="public">
-   <param name="entityResolver">
-    <reference idref="sax-entity-resolver"></reference>
-   </param>
-  </method>
-  <method name="setDocumentHandler" visibility="public">
-   <param name="documentHandler">
-    <reference idref="sax-document-handler"></reference>
-   </param>
-  </method>
-  <method name="setDTDHandler" visibility="public">
-   <param name="dtdHandler">
-    <reference idref="sax-dtd-handler"></reference>
-   </param>
-  </method>
-  <method name="setErrorHandler" visibility="public">
-   <param name="errorHandler">
-    <reference idref="sax-error-handler"></reference>
-   </param>
-  </method>
- </interface>
- <interface id="sax-xmlreader" name="XMLReader" visibility="public">
-  <method name="parse" visibility="public">
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  <method name="parse" visibility="public">
-   <param name="inputSource">
-    <reference idref="sax-input-source"></reference>
-   </param>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  <method name="setEntityResolver" visibility="public">
-   <param name="entityResolver">
-    <reference idref="sax-entity-resolver"></reference>
-   </param>
-  </method>
-  <method name="getEntityResolver" visibility="public">
-   <returns>
-    <reference idref="sax-entity-resolver"></reference>
-   </returns>
-  </method>
-  <method name="setContentHandler" visibility="public">
-   <param name="contentHandler">
-    <reference idref="sax-content-handler"></reference>
-   </param>
-  </method>
-  <method name="getContentHandler" visibility="public">
-   <returns>
-    <reference idref="sax-content-handler"></reference>
-   </returns>
-  </method>
-  <method name="setDTDHandler" visibility="public">
-   <param name="dtdHandler">
-    <reference idref="sax-dtd-handler"></reference>
-   </param>
-  </method>
-  <method name="getDTDHandler" visibility="public">
-   <returns>
-    <reference idref="sax-dtd-handler"></reference>
-   </returns>
-  </method>
-  <method name="setErrorHandler" visibility="public">
-   <param name="errorHandler">
-    <reference idref="sax-error-handler"></reference>
-   </param>
-  </method>
-  <method name="getErrorHandler" visibility="public">
-   <returns>
-    <reference idref="sax-error-handler"></reference>
-   </returns>
-  </method>
-  <method name="setFeature" visibility="public">
-   <param name="featureId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="state">
-    <primitive type="boolean"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  <method name="getFeature" visibility="public">
-   <param name="featureId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  <method name="setProperty" visibility="public">
-   <param name="propertyId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="value">
-    <reference idref="java-object"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  <method name="getProperty" visibility="public">
-   <param name="propertyId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-object"></reference>
-   </returns>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
- </interface>
-</category>
-
- </types>
- 
- 
-<!-- $Id$ -->
-<category name="Xerces Native Interface (XNI)" package="org.apache.xerces.xni">
- 
- <interface id="configurable" name="XMLComponent" visibility="public">
- 
-  <method name="reset" visibility="public">
-   <param name="componentManager">
-    <reference idref="configuration-manager"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="setFeature" visibility="public">
-   <param name="featureId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="state">
-    <primitive type="boolean"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="setProperty" visibility="public">
-   <param name="propertyId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="value">
-    <reference idref="java-object"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id="configuration-manager" name="XMLComponentManager" visibility="public">
- 
-  <method name="getFeature" visibility="public">
-   <param name="featureId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="getProperty" visibility="public">
-   <param name="propertyId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-object"></reference>
-   </returns>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id="document-source" name="XMLDocumentSource" visibility="public">
- 
-  <method name="setDocumentHandler" visibility="public">
-   <param name="documentHandler">
-    <reference idref="document-handler"></reference>
-   </param>
-  </method>
-  
- </interface>
-
- <interface id="document-handler" name="XMLDocumentHandler" visibility="public">
- 
-  <method name="startDocument" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="xmlDecl" visibility="public">
-   <param name="version">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="standalone">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="doctypeDecl" visibility="public">
-   <param name="rootElement">
-    <reference idref="java-string"></reference>    
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="comment" visibility="public">
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="processingInstruction" visibility="public">
-   <param name="target">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="data">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startPrefixMapping" visibility="public">
-   <param name="prefix">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="uri">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startEntity" visibility="public">
-   <param name="name">
-    <note>
-     The document has the pseudo-name of &quot;[xml]&quot;, the DTD has the
-     pseudo-name of &quot;[dtd]; parameter entity names start with '%';
-     and general entities are just specified by their name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="textDecl" visibility="public">
-   <param name="version">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startElement" visibility="public">
-   <param name="element">
-    <reference idref="qname"></reference>
-   </param>
-   <param name="attributes">
-    <reference idref="attributes"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="characters" visibility="public">
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="ignorableWhitespace" visibility="public">
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endElement" visibility="public">
-   <param name="element">
-    <reference idref="qname"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endPrefixMapping" visibility="public">
-   <param name="prefix">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startCDATA" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  <method name="endCDATA" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>   
-  
-  <method name="endDocument" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id="document-filter" name="XMLDocumentFilter" visibility="public">
- 
-  <extends>
-   <reference idref="document-handler"></reference>
-  </extends>
-  <extends>
-   <reference idref="document-source"></reference>
-  </extends>
-  
- </interface>
-
- <interface id="document-fragment-handler" name="XMLDocumentFragmentHandler" visibility="public">
- 
-  <method name="startDocumentFragment" visibility="public">
-   <param name="namespaceContext">
-    <reference idref="namespace-context"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="comment" visibility="public">
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="processingInstruction" visibility="public">
-   <param name="target">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="data">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startPrefixMapping" visibility="public">
-   <param name="prefix">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="uri">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startEntity" visibility="public">
-   <param name="name">
-    <note>
-     The document has the pseudo-name of &quot;[xml]&quot;, the DTD has the
-     pseudo-name of &quot;[dtd]; parameter entity names start with '%';
-     and general entities are just specified by their name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startElement" visibility="public">
-   <param name="element">
-    <reference idref="qname"></reference>
-   </param>
-   <param name="attributes">
-    <reference idref="attributes"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="characters" visibility="public">
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="ignorableWhitespace" visibility="public">
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endElement" visibility="public">
-   <param name="element">
-    <reference idref="qname"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endPrefixMapping" visibility="public">
-   <param name="prefix">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startCDATA" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endCDATA" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="textDecl" visibility="public">
-   <param name="version">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endDocumentFragment" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id="namespace-context" name="NamespaceContext" visibility="public">
- 
-  <constant name="XMLNS" visibility="public">
-   <reference idref="java-string"></reference>
-  </constant>
-  
-  <method name="getParentContext" visibility="public">
-   <returns>
-    <reference idref="namespace-context"></reference>
-   </returns>
-  </method>
-  
-  <method name="getURI" visibility="public">
-   <param name="prefix">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="getDeclaredPrefixCount" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getDeclaredPrefixAt" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
- </interface>
-
- <interface id="dtd-source" name="XMLDTDSource" visibility="public">
- 
-  <method name="setDTDHandler" visibility="public">
-   <param name="dtdHandler">
-    <reference idref="dtd-handler"></reference>
-   </param>
-  </method>
-  
- </interface>
-
- <interface id="dtd-handler" name="XMLDTDHandler" visibility="public">
- 
-  <constant name="CONDITIONAL_INCLUDE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="CONDITIONAL_IGNORE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <method name="startDTD" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="comment" visibility="public">
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="processingInstruction" visibility="public">
-   <param name="target">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="data">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startEntity" visibility="public">
-   <param name="name">
-    <note>
-     The document has the pseudo-name of &quot;[xml]&quot;, the DTD has the
-     pseudo-name of &quot;[dtd]; parameter entity names start with '%';
-     and general entities are just specified by their name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="textDecl" visibility="public">
-   <param name="version">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="elementDecl" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="contentModel">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startAttlist" visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="attributeDecl" visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="attributeName">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="type">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="enumeration">
-    <array dimension="1">
-     <reference idref="java-string"></reference>
-    </array>
-   </param>
-   <param name="defaultType">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="defaultValue">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endAttlist" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="internalEntityDecl" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="text">
-    <reference idref="string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="externalEntityDecl" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="unparsedEntityDecl" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="notation">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="notationDecl" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startConditional" visibility="public">
-   <param name="type">
-    <primitive type="short"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endConditional" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  <method name="endDTD" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id="dtd-filter" name="XMLDTDFilter" visibility="public">
- 
-  <extends>
-   <reference idref="dtd-handler"></reference>
-  </extends>
-  
-  <extends>
-   <reference idref="dtd-source"></reference>
-  </extends>
-  
- </interface>
-
- <interface id="dtd-content-model-source" name="XMLDTDContentModelSource" visibility="public">
- 
-  <method name="setDTDContentModelHandler" visibility="public">
-   <param name="dtdContentModelHandler">
-    <reference idref="dtd-content-model-handler"></reference>
-   </param>
-  </method>
-  
- </interface>
-
- <interface id="dtd-content-model-handler" name="XMLDTDContentModelHandler" visibility="public">
- 
-  <constant name="TYPE_EMPTY" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_ANY" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_MIXED" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_CHILDREN" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="SEPARATOR_CHOICE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="SEPARATOR_SEQUENCE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="OCCURS_ZERO_OR_ONE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="OCCURS_ZERO_OR_MORE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="OCCURS_ONE_OR_MORE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <method name="startContentModel" visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="type">
-    <primitive type="short"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="mixedElement" visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="childrenStartGroup" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="childrenElement" visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="childrenSeparator" visibility="public">
-   <param name="separator">
-    <primitive type="short"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="childrenOccurrence" visibility="public">
-   <param name="occurrence">
-    <primitive type="short"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="childrenEndGroup" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endContentModel" visibility="public">
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id="dtd-content-model-filter" name="XMLDTDContentModelFilter" visibility="public">
- 
-  <extends>
-   <reference idref="dtd-content-model-handler"></reference>
-  </extends>
-  
-  <extends>
-   <reference idref="dtd-content-model-source"></reference>
-  </extends>
-  
- </interface>
-
- <class id="qname" name="QName" visibility="public">
- 
-  <field name="prefix" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="localpart" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="rawname" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="uri" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <method name="setValues" visibility="public">
-   <param name="prefix">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="localpart">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="rawname">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="uri">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="clear" visibility="public"></method>
-  
- </class>
-
- <class id="string" name="XMLString" visibility="public">
- 
-  <field name="ch" visibility="public">
-   <array dimension="1">
-    <primitive type="char"></primitive>
-   </array>
-  </field>
-  
-  <field name="offset" visibility="public">
-   <primitive type="int"></primitive>
-  </field>
-  
-  <field name="length" visibility="public">
-   <primitive type="int"></primitive>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="ch">
-    <array dimension="1">
-     <primitive type="char"></primitive>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <primitive type="int"></primitive>
-   </param>
-  </constructor>
-  
-  <method name="setValues" visibility="public">
-   <param name="ch">
-    <array dimension="1">
-     <primitive type="char"></primitive>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <primitive type="int"></primitive>
-   </param>
-  </method>
-  
-  <method name="clear" visibility="public"></method>
-  
-  <method name="equals" visibility="public">
-   <param name="ch">
-    <array dimension="1">
-     <primitive type="char"></primitive>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="equals" visibility="public">
-   <param name="s">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="toString" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
- </class>
- 
- <interface id="attributes" name="XMLAttributes" visibility="public">
- 
-  <extends>
-   <reference idref="sax-attribute-list"></reference>
-  </extends>
-  
-  <extends>
-   <reference idref="sax-attributes"></reference>
-  </extends>
-  
-  <method name="addAttribute" visibility="public">
-   <param name="name">
-    <reference idref="qname"></reference>
-   </param>
-   <param name="type">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="value">
-    <reference idref="string"></reference>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="removeAttributeAt" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-  </method>
-  
-  <method name="removeAllAttributes" visibility="public"></method>
-  
-  <method name="removeAllEntitiesFor" visibility="public">
-   <param name="attrIndex">
-    <primitive type="int"></primitive>
-   </param>
-  </method>
-  
-  <method name="addAttributeEntity" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <primitive type="int"></primitive>
-   </param>
-  </method>
-  
-  <method name="removeEntityAt" visibility="public">
-   <param name="attrIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="entityIndex">
-    <primitive type="int"></primitive>
-   </param>
-  </method>
-  
-  <method name="setName" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="name">
-    <reference idref="qname"></reference>
-   </param>
-  </method>
-  
-  <method name="getName" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="name">
-    <reference idref="qname"></reference>
-   </param>
-  </method>
-  
-  <method name="setType" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="type">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="getType" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="setValue" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="value">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="setNonNormalizedValue" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="value">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="getNonNormalizedValue" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="getEntityCount" visibility="public">
-   <param name="attrIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getEntityName" visibility="public">
-   <param name="attrIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="entityIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="getEntityOffset" visibility="public">
-   <param name="attrIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="entityIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getEntityLength" visibility="public">
-   <param name="attrIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="entityIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
- </interface>
-
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Implementation: Core Components" package="org.apache.xerces.impl">
-
- <class id="error-reporter" name="XMLErrorReporter" visibility="public">
- 
-  <implements>
-   <reference idref="configurable"></reference>
-  </implements>
-  
-  <constant name="SEVERITY_WARNING" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="SEVERITY_ERROR" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="SEVERITY_FATAL_ERROR" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <field name="fLocale" visibility="protected">
-   <reference idref="java-locale"></reference>
-  </field>
-  
-  <field name="fMessageFormatters" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="message-formatter"></reference>
-    </items>
-   </collection>
-  </field>
-  
-  <field name="fErrorHandler" visibility="protected">
-   <reference idref="sax-error-handler"></reference>
-  </field>
-  
-  <field name="fContinueAfterFatalError" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <method name="setLocale" visibility="public">
-   <param name="locale">
-    <reference idref="java-locale"></reference>
-   </param>
-  </method>
-  
-  <method name="putMessageFormatter" visibility="public">
-   <param name="domain">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="messageFormatter">
-    <reference idref="message-formatter"></reference>
-   </param>
-  </method>
-  
-  <method name="getMessageFormatter" visibility="public">
-   <param name="domain">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="message-formatter"></reference>
-   </returns>
-  </method>
-  
-  <method name="removeMessageFormatter" visibility="public">
-   <param name="domain">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="message-formatter"></reference>
-   </returns>
-  </method>
-  
-  <method name="reportError" visibility="public">
-   <param name="domain">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="key">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="arguments">
-    <array dimension="1">
-     <reference idref="java-object"></reference>
-    </array>
-   </param>
-   <param name="severity">
-    <primitive type="short"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="reportError" visibility="public">
-   <param name="location">
-    <reference idref="sax-locator"></reference>
-   </param>
-   <param name="domain">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="key">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="arguments">
-    <array dimension="1">
-     <reference idref="java-object"></reference>
-    </array>
-   </param>
-   <param name="severity">
-    <primitive type="short"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </class>
-
- <class id="document-scanner" name="XMLDocumentScanner" visibility="public">
- 
-  <implements>
-   <reference idref="configurable"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="document-source"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="entity-handler"></reference>
-  </implements>
-  
-  <field name="fSymbolTable" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="symbol-table"></reference>
-  </field>
-  
-  <field name="fErrorReporter" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="error-reporter"></reference>
-  </field>
-  
-  <field name="fEntityManager" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="entity-manager"></reference>
-  </field>
-  
-  <field name="fDTDScanner" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="dtd-scanner"></reference>
-  </field>
-  
-  <field name="fNamespaces" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="fDocumentHandler" visibility="protected">
-   <reference idref="document-handler"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <method name="scanDocument" visibility="public">
-   <param name="complete">
-    <primitive type="boolean"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </class>
-
- <class id="dtd-scanner" name="XMLDTDScanner" visibility="public">
- 
-  <implements>
-   <reference idref="configurable"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="dtd-source"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="dtd-content-model-source"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="entity-handler"></reference>
-  </implements>
-  
-  <field name="fSymbolTable" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="symbol-table"></reference>
-  </field>
-  
-  <field name="fErrorReporter" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="error-reporter"></reference>
-  </field>
-  
-  <field name="fEntityManager" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="entity-manager"></reference>
-  </field>
-  
-  <field name="fDTDHandler" visibility="protected">
-   <reference idref="dtd-handler"></reference>
-  </field>
-  
-  <field name="fDTDContentModelHandler" visibility="protected">
-   <reference idref="dtd-content-model-handler"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <method name="scanDTD" visibility="public">
-   <param name="complete">
-    <primitive type="boolean"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanDTDFragment" visibility="public">
-   <param name="complete">
-    <primitive type="boolean"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanDTDInternalSubset" visibility="public">
-   <param name="complete">
-    <primitive type="boolean"></primitive>
-   </param>
-   <param name="standalone">
-    <primitive type="boolean"></primitive>
-   </param>
-   <param name="hasExternalDTD">
-    <primitive type="boolean"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </class>
-
- <class id="entity-manager" name="XMLEntityManager" visibility="public">
- 
-  <implements>
-   <reference idref="configurable"></reference>
-  </implements>
-  
-  <field name="fEntityResolver" visibility="protected">
-   <reference idref="sax-entity-resolver"></reference>
-  </field>
-  
-  <field name="fEntityReader" visibility="protected">
-   <reference idref="entity-reader"></reference>
-  </field>
-  
-  <field name="fEntityHandler" visibility="protected">
-   <reference idref="entity-handler"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <method name="setEntityHandler" visibility="public">
-   <param name="entityHandler">
-    <reference idref="entity-handler"></reference>
-   </param>
-  </method>
-  
-  <method name="addExternalEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="baseSystemId">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="addInternalEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="text">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-
-  <method name="addUnparsedEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="notation">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="isDeclaredEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-
-  <method name="isExternalEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-
-  <method name="isUnparsedEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-
-  <method name="setStandalone" visibility="public">
-   <param name="standalone">
-    <primitive type="boolean"></primitive>
-   </param>
-  </method>
-  
-  <method name="isStandalone" visibility="public">
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-
-  <method name="expandSystemId" visibility="public">
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-
-  <method name="expandSystemId" visibility="public">
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="baseSystemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-
-  <method name="resolveEntity" visibility="public">
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="baseSystemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="input-source"></reference>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="startDocumentEntity" visibility="public">
-   <param name="inputSource">
-    <reference idref="input-source"></reference>
-   </param>
-  </method>
-  
-  <method name="startDTDEntity" visibility="public">
-   <param name="inputSource">
-    <reference idref="input-source"></reference>
-   </param>
-  </method>
-  
-  <method name="startEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="inputSource">
-    <reference idref="input-source"></reference>
-   </param>
-  </method>
-
-  <method name="getEntityScanner" visibility="public">
-   <returns>
-    <reference idref="entity-reader"></reference>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id="entity-handler" name="XMLEntityHandler" visibility="public">
- 
-  <method name="startEntity" visibility="public">
-   <param name="name">
-    <note>
-     The document has the pseudo-name of &quot;[xml]&quot;, the DTD has the
-     pseudo-name of &quot;[dtd]; parameter entity names start with '%';
-     and general entities are just specified by their name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="encoding">
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="endEntity" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <class id="input-source" name="XMLInputSource" visibility="public">
- 
-  <extends>
-   <reference idref="sax-input-source"></reference>
-  </extends>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="inputSource">
-    <reference idref="sax-input-source"></reference>
-   </param>
-  </constructor>
-
-  <constructor visibility="public">
-   <param name="inputStream">
-    <reference idref="java-io-input-stream"></reference>
-   </param>
-  </constructor>
-
-  <constructor visibility="public">
-   <param name="reader">
-    <reference idref="java-io-reader"></reference>
-   </param>
-  </constructor>
-
-  <constructor visibility="public">
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor>
-
-  <method name="setBaseSystemId" visibility="public">
-   <param name="baseSystemId">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-
-  <method name="getBaseSystemId" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-
-  <method name="setExpandedSystemId" visibility="public">
-   <param name="expandedSystemId">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-
-  <method name="getExpandedSystemId" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-
- </class>
-
- <class id="entity-reader" name="XMLEntityScanner" visibility="public">
- 
-  <implements>
-   <reference idref="sax-locator"></reference>
-  </implements>
-
-  <method name="setEncoding" visibility="public">
-   <param name="encoding">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="isExternal" visibility="public">
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="peekChar" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanChar" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanNmtoken" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanName" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanQName" visibility="public">
-   <param name="qname">
-    <reference idref="qname"></reference>
-   </param>
-   <returns>
-    <note>True if QName was scanned.</note>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanContent" visibility="public">
-   <note>Scans parsed content in an XML document.</note>
-   <param name="content">
-    <reference idref="string"></reference>
-   </param>
-   <returns>
-    <note>The next character on the stream.</note>
-    <primitive type="int"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanLiteral" visibility="public">
-   <note>Scans attribute content.</note>
-   <param name="quote">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="content">
-    <reference idref="string"></reference>
-   </param>
-   <returns>
-    <note>The next character on the stream.</note>
-    <primitive type="int"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="scanData" visibility="public">
-   <param name="delimiter">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="data">
-    <reference idref="string"></reference>
-   </param>
-   <returns>
-    <note>True if there is more data to scan.</note>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="skipChar" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <note>True if the char was skipped.</note>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="skipSpaces" visibility="public">
-   <returns>
-    <note>True if spaces were skipped.</note>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="skipString" visibility="public">
-   <param name="s">
-    <note>The string to skip.</note>
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <note>True if string was skipped.</note>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </class>
-
- <class id="validator" name="XMLValidator" visibility="public">
- 
-  <implements>
-   <reference idref="configurable"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="document-filter"></reference>
-  </implements>
-  
-  <field name="fSymbolTable" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="symbol-table"></reference>
-  </field>
-  
-  <field name="fErrorReporter" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="error-reporter"></reference>
-  </field>
-  
-  <field name="fGrammarPool" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <reference idref="grammar-pool"></reference>
-  </field>
-  
-  <field name="fNamespaces" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="fValidation" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="fDynamicValidation" visibility="protected">
-   <note>This field is initialized on reset.</note>
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="fDocumentHandler" visibility="protected">
-   <reference idref="document-handler"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
- </class>
-
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Implementation: Validation" package="org.apache.xerces.impl.validation">
-
- <class id="grammar-pool" name="GrammarPool" visibility="public">
- 
-  <field name="fGrammars" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="grammar"></reference>
-    </items>
-   </collection>
-  </field>
-  
-  <field name="fGrammarsNS" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="grammar"></reference>
-    </items>
-   </collection>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <method name="putGrammar" visibility="public">
-   <param name="rootElement">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="grammar">
-    <reference idref="grammar"></reference>
-   </param>
-  </method>
-  
-  <method name="putGrammarNS" visibility="public">
-   <param name="targetNamespace">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="grammar">
-    <reference idref="grammar"></reference>
-   </param>
-  </method>
-  
-  <method name="getGrammar" visibility="public">
-   <param name="rootElement">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="grammar"></reference>
-   </returns>
-  </method>
-  
-  <method name="getGrammarNS" visibility="public">
-   <param name="targetNamespace">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="grammar"></reference>
-   </returns>
-  </method>
-  
-  <method name="removeGrammar" visibility="public">
-   <param name="rootElement">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="grammar"></reference>
-   </returns>
-  </method>
-  
-  <method name="removeGrammarNS" visibility="public">
-   <param name="targetNamespace">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="grammar"></reference>
-   </returns>
-  </method>
-  
- </class>
-
- <class id="grammar" name="Grammar" visibility="public">
- 
-  <constant name="TOP_LEVEL_SCOPE" visibility="public">
-   <primitive type="int"></primitive>
-  </constant>
-
-  <field name="fTargetNamespace" visibility="protected">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-
-  <method name="isNamespaceAware" visibility="public">
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>  
-
-  <method name="getTargetNamespace" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="getElementDeclCount" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getElementDeclIndex" visibility="public">
-   <param name="elementDeclName">
-    <reference idref="qname"></reference>
-   </param>
-   <param name="scope">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getElementDeclAt" visibility="public">
-   <param name="elementDeclIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="elementDecl">
-    <note>The values of this structure are set by this call.</note>
-    <reference idref="element-decl"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getAttributeDeclCount" visibility="public">
-   <param name="elementDeclIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getAttributeDeclIndex" visibility="public">
-   <param name="elementDeclIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="attributeDeclName">
-    <!-- REVISIT: This should be a QName in the code to handle such
-                  cases as attributes from other namespaces being
-                  allowed for the specified element. -Ac -->
-    <reference idref="qname"></reference>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getAttributeDeclAt" visibility="public">
-   <param name="attributeDeclIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="attributeDecl">
-    <note>The values of this structure are set by this call.</note>
-    <reference idref="attribute-decl"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getEntityDeclCount" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getEntityDeclIndex" visibility="public">
-   <param name="entityDeclName">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getEntityDeclAt" visibility="public">
-   <param name="entityDeclIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="entityDecl">
-    <reference idref="entity-decl"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getNotationDeclCount" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getNotationDeclIndex" visibility="public">
-   <param name="notationDeclName">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getNotationDeclAt" visibility="public">
-   <param name="notationDeclIndex">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="notationDecl">
-    <reference idref="notation-decl"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
- </class>
-
- <class id="element-decl" name="XMLElementDecl" visibility="public">
- 
-  <constant name="TYPE_ANY" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_EMPTY" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_MIXED" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_CHILDREN" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_SIMPLE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <field name="name" visibility="public">
-   <reference idref="qname"></reference>
-  </field>
-  
-  <field name="scope" visibility="public">
-   <primitive type="int"></primitive>
-  </field>
-  
-  <field name="type" visibility="public">
-   <primitive type="short"></primitive>
-  </field>
-  
-  <field name="simpleType" visibility="public">
-   <reference idref="simple-type"></reference>
-  </field>
-  
-  <method name="setValues" visibility="public">
-   <param name="name">
-    <reference idref="qname"></reference>
-   </param>
-   <param name="scope">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="type">
-    <primitive type="short"></primitive>
-   </param>
-   <param name="simpleType">
-    <reference idref="simple-type"></reference>
-   </param>
-  </method>
-  
-  <method name="setValues" visibility="public">
-   <param name="elementDecl">
-    <reference idref="element-decl"></reference>
-   </param>
-  </method>
-  
-  <method name="clear" visibility="public"></method>
-  
- </class>
-
- <class id="attribute-decl" name="XMLAttributeDecl" visibility="public">
- 
-  <field name="name" visibility="public">
-   <reference idref="qname"></reference>
-  </field>
-  
-  <field name="simpleType" visibility="public">
-   <reference idref="simple-type"></reference>
-  </field>
-  
-  <field name="optional" visibility="public">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <method name="setValues" visibility="public">
-   <param name="name">
-    <reference idref="qname"></reference>
-   </param>
-   <param name="simpleType">
-    <reference idref="simple-type"></reference>
-   </param>
-   <param name="optional">
-    <primitive type="boolean"></primitive>
-   </param>
-  </method>
-  
-  <method name="setValues" visibility="public">
-   <param name="attributeDecl">
-    <reference idref="attribute-decl"></reference>
-   </param>
-  </method>
-  
-  <method name="clear" visibility="public"></method>
-  
- </class>
-
- <class id="simple-type" name="XMLSimpleType" visibility="public">
- 
-  <constant name="TYPE_CDATA" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_ENTITY" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_ENUMERATION" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_ID" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_IDREF" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_NMTOKEN" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_NOTATION" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="TYPE_NAMED" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="DEFAULT_TYPE_DEFAULT" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="DEFAULT_TYPE_FIXED" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="DEFAULT_TYPE_IMPLIED" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="DEFAULT_TYPE_REQUIRED" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <field name="type" visibility="protected">
-   <primitive type="short"></primitive>
-  </field>
-  
-  <field name="name" visibility="protected">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="enumeration" visibility="public">
-   <array dimension="1">
-    <reference idref="java-string"></reference>
-   </array>
-  </field>
-  
-  <field name="list" visibility="public">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="defaultType" visibility="public">
-   <primitive type="short"></primitive>
-  </field>
-  
-  <field name="defaultValue" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="datatypeValidator" visibility="public">
-   <reference idref="datatype-validator"></reference>
-  </field>
-  
-  <method name="setValues" visibility="public">
-   <param name="type">
-    <primitive type="short"></primitive>
-   </param>
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="enumeration">
-    <array dimension="1">
-     <reference idref="java-string"></reference>
-    </array>
-   </param>
-   <param name="list">
-    <primitive type="boolean"></primitive>
-   </param>
-   <param name="defaultType">
-    <primitive type="short"></primitive>
-   </param>
-   <param name="defaultValue">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="datatypeValidator">
-    <reference idref="datatype-validator"></reference>
-   </param>
-  </method>
-
-  <method name="setValues" visibility="public">
-   <param name="simpleType">
-    <reference idref="simple-type"></reference>
-   </param>
-  </method>
-  
-  <method name="clear" visibility="public"></method>
-  
- </class>
-
- <class id="entity-decl" name="XMLEntityDecl" visibility="public">
- 
-  <field name="name" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="publicId" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="systemId" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="baseSystemId" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="notation" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="isPE" visibility="public">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <method name="setValues" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="baseSystemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="notation">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="isPE">
-    <primitive type="boolean"></primitive>
-   </param>
-  </method>
-
-  <method name="setValues" visibility="public">
-   <param name="entityDecl">
-    <reference idref="entity-decl"></reference>
-   </param>
-  </method>
-  
-  <method name="clear" visibility="public"></method>
-  
- </class>
-
- <class id="notation-decl" name="XMLNotationDecl" visibility="public">
- 
-  <field name="name" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="publicId" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="systemId" visibility="public">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <method name="setValues" visibility="public">
-   <param name="name">
-   <reference idref="java-string"></reference>
-   </param>
-   <param name="publicId">
-   <reference idref="java-string"></reference>
-   </param>
-   <param name="systemId">
-   <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="notationDecl" visibility="public">
-   <param name="notationDecl">
-    <reference idref="notation-decl"></reference>
-   </param>
-  </method>
-
-  <method name="clear" visibility="public"></method>
-  
- </class>
-
- <interface id="datatype-validator-factory" name="DatatypeValidatorFactory" visibility="public">
- 
-  <method name="createDatatypeValidator" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="base">
-    <reference idref="datatype-validator"></reference>
-   </param>
-   <param name="facets">
-    <collection>
-     <collector>
-      <reference idref="java-hashtable"></reference>
-     </collector>
-     <items>
-      <reference idref="java-string"></reference>
-     </items>
-    </collection>
-   </param>
-   <param name="list">
-    <primitive type="boolean"></primitive>
-   </param>
-   <returns>
-    <reference idref="datatype-validator"></reference>
-   </returns>
-   <throws>
-    <reference idref="invalid-datatype-facet-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="invalid-datatype-value-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id="datatype-validator" name="DatatypeValidator" visibility="public">
- 
-  <method name="getFacets" visibility="public">
-   <returns>
-    <collection>
-     <collector>
-      <reference idref="java-hashtable"></reference>
-     </collector>
-     <items>
-      <reference idref="java-string"></reference>
-     </items>
-    </collection>
-   </returns>
-  </method>
-  
-  <method name="validate" visibility="public">
-   <param name="data">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="state">
-    <reference idref="java-object"></reference>
-   </param>
-   <throws>
-    <reference idref="invalid-datatype-value-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="compare" visibility="public">
-   <param name="value1">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="value2">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-   <throws>
-    <reference idref="invalid-datatype-value-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <class id="invalid-datatype-facet-exception" name="InvalidDatatypeFacetException" visibility="public">
- 
-  <extends>
-   <reference idref="sax-exception"></reference>
-  </extends>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="message">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor>
-  
-  <constructor visibility="public">
-   <param name="exception">
-    <reference idref="java-exception"></reference>
-   </param>
-  </constructor>
-  
-  <constructor visibility="public">
-   <param name="message">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="exception">
-    <reference idref="java-exception"></reference>
-   </param>
-  </constructor>
-  
- </class>
-
- <class id="invalid-datatype-value-exception" name="InvalidDatatypeValueException" visibility="public">
- 
-  <extends>
-   <reference idref="sax-exception"></reference>
-  </extends>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="message">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor>
-  
-  <constructor visibility="public">
-   <param name="exception">
-    <reference idref="java-exception"></reference>
-   </param>
-  </constructor>
-  
-  <constructor visibility="public">
-   <param name="message">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="exception">
-    <reference idref="java-exception"></reference>
-   </param>
-  </constructor>
-  
- </class>
-
- <interface id="content-model" name="ContentModelValidator" visibility="public">
- 
-  <method name="validate" visibility="public">
-   <param name="children">
-    <array dimension="1">
-     <reference idref="qname"></reference>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <!-- REVISIT: Add this functionality in later. -Ac
-  &lt;method name='whatCanGoHere'&gt;
-   &lt;param name='insertableElementsInfo'&gt;
-    &lt;reference idref='insertable-elements-info'/&gt;
-   &lt;/param&gt;
-  &lt;/method&gt;
-  -->
-  
- </interface>
-
- <!-- REVISIT: Add this functionality in later. -Ac
- &lt;class id='insertable-elements-info' name='InsertableElementsInfo'&gt;
-  &lt;field name='canHoldPCData' visibility='public'&gt;
-   &lt;primitive type='boolean'/&gt;
-  &lt;/field&gt;
-  &lt;field name='childCount' visibility='public'&gt;
-   &lt;primitive type='int'/&gt;
-  &lt;/field&gt;
-  &lt;field name='currentChildren' visibility='public'&gt;
-   &lt;array&gt;
-    &lt;reference idref='qname'/&gt;
-   &lt;/array&gt;
-  &lt;/field&gt;
-  &lt;field name='insertAt' visibility='public'&gt;
-   &lt;primitive type='int'/&gt;
-  &lt;/field&gt;
-  &lt;field name='isValidEOC' visibility='public'&gt;
-   &lt;primitive type='boolean'/&gt;
-  &lt;/field&gt;
-  &lt;field name='possibleChildren' visibility='public'&gt;
-   &lt;array&gt;
-    &lt;reference idref='qname'/&gt;
-   &lt;/array&gt;
-  &lt;/field&gt;
-  &lt;field name='results' visibility='public'&gt;
-   &lt;array&gt;
-    &lt;primitive type='boolean'/&gt;
-   &lt;/array&gt;
-  &lt;/field&gt;
-  &lt;field name='resultsCount' visibility='public'&gt;
-   &lt;primitive type='int'/&gt;
-  &lt;/field&gt;
-  &lt;method name='setValues'&gt;
-   &lt;param name='canHoldPCData'&gt;
-    &lt;primitive type='boolean'/&gt;
-   &lt;/param&gt;
-   &lt;param name='childCount'&gt;
-    &lt;primitive type='int'/&gt;
-   &lt;/param&gt;
-   &lt;param name='currentChildren'&gt;
-    &lt;array&gt;
-     &lt;reference idref='qname'/&gt;
-    &lt;/array&gt;
-   &lt;/param&gt;
-   &lt;param name='insertAt'&gt;
-    &lt;primitive type='int'/&gt;
-   &lt;/param&gt;
-   &lt;param name='isValidEOC'&gt;
-    &lt;primitive type='boolean'/&gt;
-   &lt;/param&gt;
-   &lt;param name='possibleChildren'&gt;
-    &lt;array&gt;
-     &lt;reference idref='qname'/&gt;
-    &lt;/array&gt;
-   &lt;/param&gt;
-   &lt;param name='results'&gt;
-    &lt;array&gt;
-     &lt;primitive type='boolean'/&gt;
-    &lt;/array&gt;
-   &lt;/param&gt;
-   &lt;param name='resultsCount'&gt;
-    &lt;primitive type='int'/&gt;
-   &lt;/param&gt;
-  &lt;/method&gt;
-  &lt;method name='clear'/&gt;
- &lt;/class&gt;
- -->
-
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Implementation: Validation Content Models" package="org.apache.xerces.impl.validation.models">
- 
- <class id="simple-content-model" name="SimpleContentModel" visibility="public">
- 
-  <implements>
-   <reference idref="content-model"></reference>
-  </implements>
-  
-  <constant name="CHOICE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <constant name="SEQUENCE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-  
-  <field name="fOperator" visibility="protected">
-   <primitive type="short"></primitive>
-  </field>
-  
-  <field name="fFirstChild" visibility="protected">
-   <reference idref="qname"></reference>
-  </field>
-  
-  <field name="fSecondChild" visibility="protected">
-   <reference idref="qname"></reference>
-  </field>
-  
-  <constructor visibility="public">
-   <param name="operator">
-    <primitive type="short"></primitive>
-   </param>
-   <param name="firstChild">
-    <reference idref="qname"></reference>
-   </param>
-   <param name="secondChild">
-    <reference idref="qname"></reference>
-   </param>
-  </constructor>
-  
- </class>
- 
- <class id="mixed-content-model" name="MixedContentModel" visibility="public">
- 
-  <implements>
-   <reference idref="content-model"></reference>
-  </implements>
-  
-  <field name="fCount" visibility="protected">
-   <primitive type="int"></primitive>
-  </field>
-  
-  <field name="fChildren" visibility="protected">
-   <array dimension="1">
-    <reference idref="qname"></reference>
-   </array>
-  </field>
-  
-  <field name="fOrdered" visibility="protected">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <constructor visibility="public">
-   <param name="count">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="children">
-    <array dimension="1">
-     <reference idref="qname"></reference>
-    </array>
-   </param>
-   <param name="ordered">
-    <primitive type="boolean"></primitive>
-   </param>
-  </constructor>
-  
- </class>
- 
- <class id="dfa-content-model" name="DFAContentModel" visibility="public">
- 
-  <implements>
-   <reference idref="content-model"></reference>
-  </implements>
-  
-  <constructor visibility="public">
-   <!-- REVISIT: How do we communicate the model to the DFAContentModel?
-   &lt;param name='contentSpecProvider'&gt;
-    &lt;reference idref='content-spec-provider'/&gt;
-   &lt;/param&gt;
-   &lt;param name='contentSpecIndex'&gt;
-    &lt;primitive type='int'/&gt;
-   &lt;/param&gt;
-   -->
-  </constructor>
-  
- </class>
- 
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Implementation: Validation Datatypes" package="org.apache.xerces.impl.validation.datatypes">
-
- <class id="datatype-validator-factory-impl" name="DatatypeValidatorFactoryImpl" visibility="public">
- 
-  <implements>
-   <reference idref="datatype-validator-factory"></reference>
-  </implements>
-  
-  <field name="fBaseTypes" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="datatype-validator"></reference>
-    </items>
-   </collection>
-  </field>
-  
- </class>
-
- <class id="datatype-validator-abstract" name="AbstractDatatypeValidator" visibility="public">
- 
-  <implements>
-   <reference idref="datatype-validator"></reference>
-  </implements>
-  
-  <field name="fFacets" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="java-string"></reference>
-    </items>
-   </collection>
-  </field>
-  
-  <constructor visibility="protected">
-   <param name="base">
-    <reference idref="datatype-validator"></reference>
-   </param>
-   <param name="facets">
-    <collection>
-     <collector>
-      <reference idref="java-hashtable"></reference>
-     </collector>
-     <items>
-      <reference idref="java-string"></reference>
-     </items>
-    </collection>
-   </param>
-   <param name="list">
-    <primitive type="boolean"></primitive>
-   </param>
-   <throws>
-    <reference idref="invalid-datatype-facet-exception"></reference>
-   </throws>
-  </constructor>
-  
- </class>
-
- <class id="datatype-validator-string" name="StringDatatypeValidator" visibility="public">
- 
-  <extends>
-   <reference idref="datatype-validator-abstract"></reference>
-  </extends>
-  
-  <constructor visibility="public">
-   <param name="base">
-    <reference idref="datatype-validator"></reference>
-   </param>
-   <param name="facets">
-    <collection>
-     <collector>
-      <reference idref="java-hashtable"></reference>
-     </collector>
-     <items>
-      <reference idref="java-string"></reference>
-     </items>
-    </collection>
-   </param>
-   <param name="list">
-    <primitive type="boolean"></primitive>
-   </param>
-   <throws>
-    <reference idref="invalid-datatype-facet-exception"></reference>
-   </throws>
-  </constructor>
-  
- </class>
-
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Implementation: Validation Grammars" package="org.apache.xerces.impl.validation.grammars">
-
- <class id="dtd-grammar" name="DTDGrammar" visibility="public">
- 
-  <extends>
-   <reference idref="grammar"></reference>
-  </extends>
-  
-  <implements>
-   <reference idref="dtd-filter"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="dtd-content-model-filter"></reference>
-  </implements>
-  
-  <field name="fDTDHandler" visibility="protected">
-   <reference idref="dtd-handler"></reference>
-  </field>
-  
-  <field name="fDTDContentModelHandler" visibility="protected">
-   <reference idref="dtd-content-model-handler"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
- </class>
-
- <class id="schema-grammar" name="SchemaGrammar" visibility="public">
- 
-  <extends>
-   <reference idref="grammar"></reference>
-  </extends>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="grammarDocument">
-    <reference idref="dom-document"></reference>
-   </param>
-  </constructor>
-  
-  <constructor visibility="public">
-   <param name="grammarDocument">
-    <reference idref="dom-document"></reference>
-   </param>
-   <param name="grammarPool">
-    <reference idref="grammar-pool"></reference>
-   </param>
-  </constructor>
-  
- </class>
-
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Validation: XPath" package="org.apache.xerces.impl.xpath">
- 
- <class id="xpath" name="XPath" visibility="public">
- 
-  <constructor visibility="public">
-   <param name="xpath">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="xpath-exception"></reference>
-   </throws>
-  </constructor>
-
- </class>
- 
- <class id="xpath-exception" name="XPathException" visibility="public">
-
-  <constructor visibility="public"></constructor>
-
-  <constructor visibility="public">
-   <param name="message">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor>
-
- </class>
- 
- <class id="xpath-matcher" name="XPathMatcher" visibility="public">
- 
-  <implements>
-   <reference idref="document-fragment-handler"></reference>
-  </implements>
-
-  <field name="fShouldBufferContent" visibility="protected">
-   <primitive type="boolean"></primitive>
-  </field>
-
-  <constructor visibility="public">
-   <param name="xpath">
-    <reference idref="xpath"></reference>
-   </param>
-  </constructor>
-
-  <constructor visibility="public">
-   <param name="xpath">
-    <reference idref="xpath"></reference>
-   </param>
-   <param name="shouldBufferContent">
-    <primitive type="boolean"></primitive>
-   </param>
-  </constructor>
-
-  <method name="isMatched" visibility="public">
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getMatchedString" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="matched" visibility="protected">
-   <param name="content">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-
- </class>
-
-</category>
-
-<category name="Validation: Identity Constraints" package="org.apache.xerces.impl.validation.identity">
-
- <class id="identity-constraint" name="IdentityConstraint" visibility="public">
-
-  <constant name="UNIQUE" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-
-  <constant name="KEY" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-
-  <constant name="KEYREF" visibility="public">
-   <primitive type="short"></primitive>
-  </constant>
-
-  <field name="fElementName" visibility="protected">
-   <reference idref="java-string"></reference>
-  </field>
-  
-  <field name="fSelector" visibility="protected">
-   <reference idref="ic-selector"></reference>
-  </field>
-  
-  <field name="fFields" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="ic-field"></reference>
-    </items>
-   </collection>
-  </field>
-
-  <constructor visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor>
-  
-  <method name="getType" visibility="public">
-   <returns>
-    <primitive type="short"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getElementName" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="setSelector" visibility="public">
-   <param name="selector">
-    <reference idref="ic-selector"></reference>
-   </param>
-  </method>
-  
-  <method name="getSelector" visibility="public">
-   <returns>
-    <reference idref="ic-selector"></reference>
-   </returns>
-  </method>
-  
-  <method name="addField" visibility="public">
-   <param name="field">
-    <reference idref="ic-field"></reference>
-   </param>
-  </method>
-  
-  <method name="getFieldCount" visibility="public">
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="getFieldAt" visibility="public">
-   <param name="index">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <reference idref="ic-field"></reference>
-   </returns>
-  </method>
-
- </class>
-
- <class id="ic-unique" name="Unique" visibility="public">
-
-  <constructor visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor> 
-
- </class>
- 
- <class id="ic-key" name="Key" visibility="public">
-
-  <field name="fKeyName" visibility="protected">
-   <reference idref="java-string"></reference>
-  </field>
-
-  <constructor visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="keyName">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor> 
-
-  <method name="getKeyName" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
- </class>
-
- <class id="ic-keyref" name="KeyRef" visibility="public">
-
-  <field name="fKeyName" visibility="protected">
-   <reference idref="java-string"></reference>
-  </field>
-
-  <constructor visibility="public">
-   <param name="elementName">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="keyName">
-    <reference idref="java-string"></reference>
-   </param>
-  </constructor> 
-
-  <method name="getKeyName" visibility="public">
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
- </class>
- 
- <class id="ic-selector" name="Selector" visibility="public">
-
-  <field name="fXPath" visibility="protected">
-   <reference idref="xpath"></reference>
-  </field>
-  
-  <field name="fIdentityConstraint" visibility="protected">
-   <reference idref="identity-constraint"></reference>
-  </field>
-  
-  <constructor visibility="public">
-   <param name="xpath">
-    <reference idref="xpath"></reference>
-   </param>
-   <param name="identityConstraint">
-    <reference idref="identity-constraint"></reference>
-   </param>
-  </constructor>
-  
-  <method name="getXPath" visibility="public">
-   <returns>
-    <reference idref="xpath"></reference>
-   </returns>
-  </method>
-  
-  <method name="getIdentityConstraint" visibility="public">
-   <returns>
-    <reference idref="identity-constraint"></reference>
-   </returns>
-  </method>
-  
-  <method name="createMatcher" visibility="public">
-   <param name="fieldActivator">
-    <reference idref="ic-field-activator"></reference>
-   </param>
-   <returns>
-    <reference idref="xpath-matcher"></reference>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id="ic-field-activator" name="FieldActivator" visibility="public">
-
-  <method name="startValueScopeFor" visibility="public">
-   <param name="identityConstraint">
-    <reference idref="identity-constraint"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method> 
-
-  <method name="activateField" visibility="public">
-   <param name="field">
-    <reference idref="ic-field"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-
-  <method name="endValueScopeFor" visibility="public">
-   <param name="identityConstraint">
-    <reference idref="identity-constraint"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method> 
-
- </interface>
-
- <class id="ic-field" name="Field" visibility="public">
-
-  <field name="fXPath" visibility="protected">
-   <reference idref="xpath"></reference>
-  </field>
-  
-  <field name="fIdentityConstraint" visibility="protected">
-   <reference idref="identity-constraint"></reference>
-  </field>
-  
-  <field name="fDatatypeValidator" visibility="protected">
-   <reference idref="datatype-validator"></reference>
-  </field>
-
-  <constructor visibility="public">
-   <param name="xpath">
-    <reference idref="xpath"></reference>
-   </param>
-   <param name="identityConstraint">
-    <reference idref="identity-constraint"></reference>
-   </param>
-   <param name="datatypeValidator">
-    <reference idref="datatype-validator"></reference>
-   </param>
-  </constructor>
-  
-  <method name="getXPath" visibility="public">
-   <returns>
-    <reference idref="xpath"></reference>
-   </returns>
-  </method>
-  
-  <method name="getIdentityConstraint" visibility="public">
-   <returns>
-    <reference idref="identity-constraint"></reference>
-   </returns>
-  </method>
-  
-  <method name="getDatatypeValidator" visibility="public">
-   <returns>
-    <reference idref="datatype-validator"></reference>
-   </returns>
-  </method>
-
-  <method name="createMatcher" visibility="public">
-   <param name="valueStore">
-    <reference idref="ic-value-store"></reference>
-   </param>
-   <returns>
-    <reference idref="xpath-matcher"></reference>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id="ic-value-store" name="ValueStore" visibility="public">
-
-  <method name="addValue" visibility="public">
-   <param name="field">
-    <reference idref="ic-field"></reference>
-   </param>
-   <param name="value">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method> 
-
- </interface>
-
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Parsing" package="org.apache.xerces.parsers">
-
- <class id="caching-parser-pool" name="CachingParserPool" visibility="public">
- 
-  <field name="fSymbolTable" visibility="protected">
-   <reference idref="symbol-table"></reference>
-  </field>
-  
-  <field name="fGrammarPool" visibility="protected">
-   <reference idref="grammar-pool"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="symbolTable">
-    <reference idref="symbol-table"></reference>
-   </param>
-   <param name="grammarPool">
-    <reference idref="grammar-pool"></reference>
-   </param>
-  </constructor>
-  
-  <method name="getSymbolTable" visibility="public">
-   <returns>
-    <reference idref="symbol-table"></reference>
-   </returns>
-  </method>
-  
-  <method name="getGrammarPool" visibility="public">
-   <returns>
-    <reference idref="grammar-pool"></reference>
-   </returns>
-  </method>
-  
-  <method name="createDOMParser" visibility="public">
-   <returns>
-    <reference idref="domparser"></reference>
-   </returns>
-  </method>
-  
-  <method name="createSAXParser" visibility="public">
-   <returns>
-    <reference idref="saxparser"></reference>
-   </returns>
-  </method>
-  
- </class>         
-        
- <class id="parser" name="XMLParser" visibility="public">
-  
-  <implements>
-   <reference idref="configuration-manager"></reference>
-  </implements>
-  
-  <field name="fSymbolTable" visibility="protected">
-   <reference idref="symbol-table"></reference>
-  </field>
-  
-  <field name="fEntityManager" visibility="protected">
-   <reference idref="entity-manager"></reference>
-  </field>
-  
-  <field name="fErrorReporter" visibility="protected">
-   <reference idref="error-reporter"></reference>
-  </field>
-  
-  <field name="fNamespaces" visibility="protected">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="fValidation" visibility="protected">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="fDynamicValidation" visibility="protected">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <field name="fContinueAfterFatalError" visibility="protected">
-   <primitive type="boolean"></primitive>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="protected">
-   <param name="symbolTable">
-    <reference idref="symbol-table"></reference>
-   </param>
-  </constructor>
-  
-  <method name="setFeature" visibility="public">
-   <param name="featureId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="state">
-    <primitive type="boolean"></primitive>
-   </param>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="getFeature" visibility="public">
-   <param name="featureId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="setProperty" visibility="public">
-   <param name="propertyId">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="value">
-    <reference idref="java-object"></reference>
-   </param>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="getProperty" visibility="public">
-   <param name="propertyId">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-object"></reference>
-   </returns>
-   <throws>
-    <reference idref="sax-not-recognized-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-not-supported-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="setEntityResolver" visibility="public">
-   <param name="entityResolver">
-    <reference idref="sax-entity-resolver"></reference>
-   </param>
-  </method>
-  
-  <method name="setErrorHandler" visibility="public">
-   <param name="errorHandler">
-    <reference idref="sax-error-handler"></reference>
-   </param>
-  </method>
-  
-  <method name="parse" visibility="public">
-   <param name="systemId">
-    <reference idref="java-string"></reference>
-   </param>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
-  <method name="parse" visibility="public">
-   <param name="inputSource">
-    <reference idref="sax-input-source"></reference>
-   </param>
-   <throws>
-    <reference idref="java-io-exception"></reference>
-   </throws>
-   <throws>
-    <reference idref="sax-exception"></reference>
-   </throws>
-  </method>
-  
- </class>
-
- <class id="document-parser" name="XMLDocumentParser" visibility="public">
- 
-  <extends>
-   <reference idref="parser"></reference>
-  </extends>
-  
-  <implements>
-   <reference idref="document-handler"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="dtd-handler"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="dtd-content-model-handler"></reference>
-  </implements>
-  
-  <field name="fScanner" visibility="protected">
-   <reference idref="document-scanner"></reference>
-  </field>
-  
-  <field name="fDTDScanner" visibility="protected">
-   <reference idref="dtd-scanner"></reference>
-  </field>
-  
-  <field name="fValidator" visibility="protected">
-   <reference idref="validator"></reference>
-  </field>
-  
-  <field name="fGrammarPool" visibility="protected">
-   <reference idref="grammar-pool"></reference>
-  </field>
-  
-  <field name="fDatatypeValidatorFactory" visibility="protected">
-   <reference idref="datatype-validator-factory"></reference>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="protected">
-   <param name="symbolTable">
-    <reference idref="symbol-table"></reference>
-   </param>
-   <param name="grammarPool">
-    <reference idref="grammar-pool"></reference>
-   </param>
-  </constructor>
-  
- </class>
-
- <class id="domparser" name="DOMParser" visibility="public">
- 
-  <extends>
-   <reference idref="document-parser"></reference>
-  </extends>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="protected">
-   <param name="symbolTable">
-    <reference idref="symbol-table"></reference>
-   </param>
-   <param name="grammarPool">
-    <reference idref="grammar-pool"></reference>
-   </param>
-  </constructor>
-  
-  <method name="getDocument" visibility="public">
-   <returns>
-    <reference idref="dom-document"></reference>
-   </returns>
-  </method>
-  
- </class>
-
- <class id="saxparser" name="SAXParser" visibility="public">
- 
-  <extends>
-   <reference idref="document-parser"></reference>
-  </extends>
-  
-  <implements>
-   <reference idref="sax-parser"></reference>
-  </implements>
-  
-  <implements>
-   <reference idref="sax-xmlreader"></reference>
-  </implements>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="protected">
-   <param name="symbolTable">
-    <reference idref="symbol-table"></reference>
-   </param>
-   <param name="grammarPool">
-    <reference idref="grammar-pool"></reference>
-   </param>
-  </constructor>
-  
- </class>
-
-</category>
-
- 
-<!-- $Id$ -->
-<category name="Utility Interfaces and Classes" package="org.apache.xerces.util">
-
- <class id="char" name="XMLChar" visibility="public">
- 
-  <constant name="CHARS" visibility="public">
-   <array dimension="1">
-    <primitive type="byte"></primitive>
-   </array>
-  </constant>
-  
-  <constant name="MASK_VALID" visibility="public">
-   <primitive type="byte"></primitive>
-  </constant>
-  
-  <constant name="MASK_SPACE" visibility="public">
-   <primitive type="byte"></primitive>
-  </constant>
-  
-  <constant name="MASK_NAME_START" visibility="public">
-   <primitive type="byte"></primitive>
-  </constant>
-  
-  <constant name="MASK_NAME" visibility="public">
-   <primitive type="byte"></primitive>
-  </constant>
-  
-  <constant name="MASK_PUBID" visibility="public">
-   <primitive type="byte"></primitive>
-  </constant>
-  
-  <constant name="MASK_CONTENT" visibility="public">
-   <primitive type="byte"></primitive>
-  </constant>
-  
-  <method name="isValid" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isInvalid" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isSpace" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isNameStart" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isName" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isPubid" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isContent" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isMarkup" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isHighSurrogate" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isLowSurrogate" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isSupplemental" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="highSurrogate" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="char"></primitive>
-   </returns>
-  </method>
-  
-  <method name="lowSurrogate" visibility="public">
-   <param name="c">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="char"></primitive>
-   </returns>
-  </method>
-  
-  <method name="supplemental" visibility="public">
-   <param name="highSurrogate">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="lowSurrogate">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isValidName" visibility="public">
-   <param name="name">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isValidIANAEncoding" visibility="public">
-   <param name="encoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="isValidJavaEncoding" visibility="public">
-   <param name="encoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
- </class>
-
- <class id="encoding-map" name="EncodingMap" visibility="public">
- 
-  <field name="fIANA2JavaMap" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="java-string"></reference>
-    </items>
-   </collection>
-  </field>
-  
-  <field name="fJava2IANAMap" visibility="protected">
-   <collection>
-    <collector>
-     <reference idref="java-hashtable"></reference>
-    </collector>
-    <items>
-     <reference idref="java-string"></reference>
-    </items>
-   </collection>
-  </field>
-  
-  <constructor visibility="public"></constructor>
-  
-  <method name="putIANA2JavaMapping" visibility="public">
-   <param name="ianaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="javaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="getIANA2JavaMapping" visibility="public">
-   <param name="ianaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="removeIANA2JavaMapping" visibility="public">
-   <param name="ianaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="putJava2IANAMapping" visibility="public">
-   <param name="javaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="ianaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="getJava2IANAMapping" visibility="public">
-   <param name="javaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="removeJava2IANAMapping" visibility="public">
-   <param name="javaEncoding">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
- </class>
-
- <class id="symbol-table" name="SymbolTable" visibility="public">
- 
-  <constructor visibility="public"></constructor>
-  
-  <method name="addSymbol" visibility="public">
-   <param name="symbol">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="addSymbol" visibility="public">
-   <param name="buffer">
-    <array dimension="1">
-     <primitive type="char"></primitive>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-  </method>
-  
-  <method name="containsSymbol" visibility="public">
-   <param name="symbol">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="containsSymbol" visibility="public">
-   <param name="buffer">
-    <array dimension="1">
-     <primitive type="char"></primitive>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="boolean"></primitive>
-   </returns>
-  </method>
-  
-  <method name="hash" visibility="public">
-   <param name="symbol">
-    <reference idref="java-string"></reference>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
-  <method name="hash" visibility="public">
-   <param name="buffer">
-    <array dimension="1">
-     <primitive type="char"></primitive>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <primitive type="int"></primitive>
-   </param>
-   <returns>
-    <primitive type="int"></primitive>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id="message-formatter" name="MessageFormatter" visibility="public">
- 
-  <method name="formatMessage" visibility="public">
-   <param name="locale">
-    <reference idref="java-locale"></reference>
-   </param>
-   <param name="key">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="arguments">
-    <array dimension="1">
-     <reference idref="java-object"></reference>
-    </array>
-   </param>
-   <returns>
-    <reference idref="java-string"></reference>
-   </returns>
-   <throws>
-    <reference idref="java-missing-resource-exception"></reference>
-   </throws>
-  </method>
-  
- </interface>
-
- <class id="string-buffer" name="XMLStringBuffer" visibility="public">
- 
-  <extends>
-   <reference idref="string"></reference>
-  </extends>
-  
-  <constant name="DEFAULT_SIZE" visibility="public">
-   <primitive type="int"></primitive>
-  </constant>
-  
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="size">
-    <primitive type="int"></primitive>
-   </param>
-  </constructor>
-  
-  <method name="clear" visibility="public"></method>
-  
-  <method name="append" visibility="public">
-   <param name="c">
-    <primitive type="char"></primitive>
-   </param>
-  </method>
-  
-  <method name="append" visibility="public">
-   <param name="s">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-  
-  <method name="append" visibility="public">
-   <param name="ch">
-    <array dimension="1">
-     <primitive type="char"></primitive>
-    </array>
-   </param>
-   <param name="offset">
-    <primitive type="int"></primitive>
-   </param>
-   <param name="length">
-    <primitive type="int"></primitive>
-   </param>
-  </method>
-  
-  <method name="append" visibility="public">
-   <param name="s">
-    <reference idref="string"></reference>
-   </param>
-  </method>
-  
- </class>
- 
- <class id="attributes-impl" name="XMLAttributesImpl" visibility="public">
- 
-  <implements>
-   <reference idref="attributes"></reference>
-  </implements>
-  
-  <field name="fNamespaces" visibility="protected">
-   <primitive type="boolean"></primitive>
-  </field>
-
-  <constructor visibility="public"></constructor>
-
-  <method name="setNamespaces" visibility="public">
-   <param name="namespaces">
-    <primitive type="boolean"></primitive>
-   </param>
-  </method>
-
- </class>
-
- <class id="namespace-support" name="NamespaceSupport" visibility="public">
- 
-  <implements>
-   <reference idref="namespace-context"></reference>
-  </implements> 
-
-  <constructor visibility="public"></constructor>
-  
-  <constructor visibility="public">
-   <param name="context">
-    <reference idref="namespace-context"></reference>
-   </param>
-  </constructor>
-  
-  <method name="pushContext" visibility="public"></method>
-  
-  <method name="declarePrefix" visibility="public">
-   <param name="prefix">
-    <reference idref="java-string"></reference>
-   </param>
-   <param name="uri">
-    <reference idref="java-string"></reference>
-   </param>
-  </method>
-
-  <method name="popContext" visibility="public"></method>
-
- </class>
-
- <class id="default-error-handler" name="DefaultErrorHandler" visibility="public">
-
-  <implements>
-   <reference idref="sax-error-handler"></reference>
-  </implements>
-  
-  <constructor visibility="public"></constructor> 
-
- </class>
- 
-</category>
-
- 
-</design>
\ No newline at end of file
diff --git a/design/xml/design-datatypes.ent b/design/xml/design-datatypes.ent
deleted file mode 100644
index ebd843a..0000000
--- a/design/xml/design-datatypes.ent
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Implementation: Validation Datatypes' package='&package;.impl.validation.datatypes'>
-
- <class id='datatype-validator-factory-impl' name='DatatypeValidatorFactoryImpl'>
- 
-  <implements>
-   <reference idref='datatype-validator-factory'/>
-  </implements>
-  
-  <field name='fBaseTypes'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='datatype-validator'/>
-    </items>
-   </collection>
-  </field>
-  
- </class>
-
- <class id='datatype-validator-abstract' name='AbstractDatatypeValidator'>
- 
-  <implements>
-   <reference idref='datatype-validator'/>
-  </implements>
-  
-  <field name='fFacets'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='java-string'/>
-    </items>
-   </collection>
-  </field>
-  
-  <constructor visibility='protected'>
-   <param name='base'>
-    <reference idref='datatype-validator'/>
-   </param>
-   <param name='facets'>
-    <collection>
-     <collector>
-      <reference idref='java-hashtable'/>
-     </collector>
-     <items>
-      <reference idref='java-string'/>
-     </items>
-    </collection>
-   </param>
-   <param name='list'>
-    <primitive type='boolean'/>
-   </param>
-   <throws>
-    <reference idref='invalid-datatype-facet-exception'/>
-   </throws>
-  </constructor>
-  
- </class>
-
- <class id='datatype-validator-string' name='StringDatatypeValidator'>
- 
-  <extends>
-   <reference idref='datatype-validator-abstract'/>
-  </extends>
-  
-  <constructor>
-   <param name='base'>
-    <reference idref='datatype-validator'/>
-   </param>
-   <param name='facets'>
-    <collection>
-     <collector>
-      <reference idref='java-hashtable'/>
-     </collector>
-     <items>
-      <reference idref='java-string'/>
-     </items>
-    </collection>
-   </param>
-   <param name='list'>
-    <primitive type='boolean'/>
-   </param>
-   <throws>
-    <reference idref='invalid-datatype-facet-exception'/>
-   </throws>
-  </constructor>
-  
- </class>
-
-</category>
diff --git a/design/xml/design-grammars.ent b/design/xml/design-grammars.ent
deleted file mode 100644
index c0adf8e..0000000
--- a/design/xml/design-grammars.ent
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Implementation: Validation Grammars' package='&package;.impl.validation.grammars'>
-
- <class id='dtd-grammar' name='DTDGrammar'>
- 
-  <extends>
-   <reference idref='grammar'/>
-  </extends>
-  
-  <implements>
-   <reference idref='dtd-filter'/>
-  </implements>
-  
-  <implements>
-   <reference idref='dtd-content-model-filter'/>
-  </implements>
-  
-  <field name='fDTDHandler'>
-   <reference idref='dtd-handler'/>
-  </field>
-  
-  <field name='fDTDContentModelHandler'>
-   <reference idref='dtd-content-model-handler'/>
-  </field>
-  
-  <constructor/>
-  
- </class>
-
- <class id='schema-grammar' name='SchemaGrammar'>
- 
-  <extends>
-   <reference idref='grammar'/>
-  </extends>
-  
-  <constructor/>
-  
-  <constructor>
-   <param name='grammarDocument'>
-    <reference idref='dom-document'/>
-   </param>
-  </constructor>
-  
-  <constructor>
-   <param name='grammarDocument'>
-    <reference idref='dom-document'/>
-   </param>
-   <param name='grammarPool'>
-    <reference idref='grammar-pool'/>
-   </param>
-  </constructor>
-  
- </class>
-
-</category>
diff --git a/design/xml/design-identity.ent b/design/xml/design-identity.ent
deleted file mode 100644
index c723ebc..0000000
--- a/design/xml/design-identity.ent
+++ /dev/null
@@ -1,368 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Validation: XPath' package='&package;.impl.xpath'>
- 
- <class id='xpath' name='XPath'>
- 
-  <constructor>
-   <param name='xpath'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xpath-exception'/>
-   </throws>
-  </constructor>
-
- </class>
- 
- <class id='xpath-exception' name='XPathException'>
-
-  <constructor/>
-
-  <constructor>
-   <param name='message'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor>
-
- </class>
- 
- <class id='xpath-matcher' name='XPathMatcher'>
- 
-  <implements>
-   <reference idref='document-fragment-handler'/>
-  </implements>
-
-  <field name='fShouldBufferContent'>
-   <primitive type='boolean'/>
-  </field>
-
-  <constructor>
-   <param name='xpath'>
-    <reference idref='xpath'/>
-   </param>
-  </constructor>
-
-  <constructor>
-   <param name='xpath'>
-    <reference idref='xpath'/>
-   </param>
-   <param name='shouldBufferContent'>
-    <primitive type='boolean'/>
-   </param>
-  </constructor>
-
-  <method name='isMatched'>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='getMatchedString'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='matched' visibility='protected'>
-   <param name='content'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-
- </class>
-
-</category>
-
-<category name='Validation: Identity Constraints' package='&package;.impl.validation.identity'>
-
- <class id='identity-constraint' name='IdentityConstraint'>
-
-  <constant name='UNIQUE'>
-   <primitive type='short'/>
-  </constant>
-
-  <constant name='KEY'>
-   <primitive type='short'/>
-  </constant>
-
-  <constant name='KEYREF'>
-   <primitive type='short'/>
-  </constant>
-
-  <field name='fElementName'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='fSelector'>
-   <reference idref='ic-selector'/>
-  </field>
-  
-  <field name='fFields'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='ic-field'/>
-    </items>
-   </collection>
-  </field>
-
-  <constructor>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor>
-  
-  <method name='getType'>
-   <returns>
-    <primitive type='short'/>
-   </returns>
-  </method>
-  
-  <method name='getElementName'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='setSelector'>
-   <param name='selector'>
-    <reference idref='ic-selector'/>
-   </param>
-  </method>
-  
-  <method name='getSelector'>
-   <returns>
-    <reference idref='ic-selector'/>
-   </returns>
-  </method>
-  
-  <method name='addField'>
-   <param name='field'>
-    <reference idref='ic-field'/>
-   </param>
-  </method>
-  
-  <method name='getFieldCount'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getFieldAt'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <reference idref='ic-field'/>
-   </returns>
-  </method>
-
- </class>
-
- <class id='ic-unique' name='Unique'>
-
-  <constructor>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor> 
-
- </class>
- 
- <class id='ic-key' name='Key'>
-
-  <field name='fKeyName'>
-   <reference idref='java-string'/>
-  </field>
-
-  <constructor>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='keyName'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor> 
-
-  <method name='getKeyName'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
- </class>
-
- <class id='ic-keyref' name='KeyRef'>
-
-  <field name='fKeyName'>
-   <reference idref='java-string'/>
-  </field>
-
-  <constructor>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='keyName'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor> 
-
-  <method name='getKeyName'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
- </class>
- 
- <class id='ic-selector' name='Selector'>
-
-  <field name='fXPath'>
-   <reference idref='xpath'/>
-  </field>
-  
-  <field name='fIdentityConstraint'>
-   <reference idref='identity-constraint'/>
-  </field>
-  
-  <constructor>
-   <param name='xpath'>
-    <reference idref='xpath'/>
-   </param>
-   <param name='identityConstraint'>
-    <reference idref='identity-constraint'/>
-   </param>
-  </constructor>
-  
-  <method name='getXPath'>
-   <returns>
-    <reference idref='xpath'/>
-   </returns>
-  </method>
-  
-  <method name='getIdentityConstraint'>
-   <returns>
-    <reference idref='identity-constraint'/>
-   </returns>
-  </method>
-  
-  <method name='createMatcher'>
-   <param name='fieldActivator'>
-    <reference idref='ic-field-activator'/>
-   </param>
-   <returns>
-    <reference idref='xpath-matcher'/>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id='ic-field-activator' name='FieldActivator'>
-
-  <method name='startValueScopeFor'>
-   <param name='identityConstraint'>
-    <reference idref='identity-constraint'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method> 
-
-  <method name='activateField'>
-   <param name='field'>
-    <reference idref='ic-field'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-
-  <method name='endValueScopeFor'>
-   <param name='identityConstraint'>
-    <reference idref='identity-constraint'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method> 
-
- </interface>
-
- <class id='ic-field' name='Field'>
-
-  <field name='fXPath'>
-   <reference idref='xpath'/>
-  </field>
-  
-  <field name='fIdentityConstraint'>
-   <reference idref='identity-constraint'/>
-  </field>
-  
-  <field name='fDatatypeValidator'>
-   <reference idref='datatype-validator'/>
-  </field>
-
-  <constructor>
-   <param name='xpath'>
-    <reference idref='xpath'/>
-   </param>
-   <param name='identityConstraint'>
-    <reference idref='identity-constraint'/>
-   </param>
-   <param name='datatypeValidator'>
-    <reference idref='datatype-validator'/>
-   </param>
-  </constructor>
-  
-  <method name='getXPath'>
-   <returns>
-    <reference idref='xpath'/>
-   </returns>
-  </method>
-  
-  <method name='getIdentityConstraint'>
-   <returns>
-    <reference idref='identity-constraint'/>
-   </returns>
-  </method>
-  
-  <method name='getDatatypeValidator'>
-   <returns>
-    <reference idref='datatype-validator'/>
-   </returns>
-  </method>
-
-  <method name='createMatcher'>
-   <param name='valueStore'>
-    <reference idref='ic-value-store'/>
-   </param>
-   <returns>
-    <reference idref='xpath-matcher'/>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id='ic-value-store' name='ValueStore'>
-
-  <method name='addValue'>
-   <param name='field'>
-    <reference idref='ic-field'/>
-   </param>
-   <param name='value'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method> 
-
- </interface>
-
-</category>
diff --git a/design/xml/design-impl.ent b/design/xml/design-impl.ent
deleted file mode 100644
index 5821568..0000000
--- a/design/xml/design-impl.ent
+++ /dev/null
@@ -1,800 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Implementation: Core Components' package='&package;.impl'>
-
- <class id='error-reporter' name='XMLErrorReporter'>
- 
-  <implements>
-   <reference idref='configurable'/>
-  </implements>
-  
-  <constant name='SEVERITY_WARNING'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='SEVERITY_ERROR'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='SEVERITY_FATAL_ERROR'>
-   <primitive type='short'/>
-  </constant>
-  
-  <field name='fLocale'>
-   <reference idref='java-locale'/>
-  </field>
-  
-  <field name='fMessageFormatters'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='message-formatter'/>
-    </items>
-   </collection>
-  </field>
-  
-  <field name='fErrorHandler'>
-   <reference idref='sax-error-handler'/>
-  </field>
-  
-  <field name='fContinueAfterFatalError'>
-   <note>This field is initialized on reset.</note>
-   <primitive type='boolean'/>
-  </field>
-  
-  <constructor/>
-  
-  <method name='setLocale'>
-   <param name='locale'>
-    <reference idref='java-locale'/>
-   </param>
-  </method>
-  
-  <method name='putMessageFormatter'>
-   <param name='domain'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='messageFormatter'>
-    <reference idref='message-formatter'/>
-   </param>
-  </method>
-  
-  <method name='getMessageFormatter'>
-   <param name='domain'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='message-formatter'/>
-   </returns>
-  </method>
-  
-  <method name='removeMessageFormatter'>
-   <param name='domain'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='message-formatter'/>
-   </returns>
-  </method>
-  
-  <method name='reportError'>
-   <param name='domain'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='key'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='arguments'>
-    <array>
-     <reference idref='java-object'/>
-    </array>
-   </param>
-   <param name='severity'>
-    <primitive type='short'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='reportError'>
-   <param name='location'>
-    <reference idref='sax-locator'/>
-   </param>
-   <param name='domain'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='key'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='arguments'>
-    <array>
-     <reference idref='java-object'/>
-    </array>
-   </param>
-   <param name='severity'>
-    <primitive type='short'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
- </class>
-
- <class id='document-scanner' name='XMLDocumentScanner'>
- 
-  <implements>
-   <reference idref='configurable'/>
-  </implements>
-  
-  <implements>
-   <reference idref='document-source'/>
-  </implements>
-  
-  <implements>
-   <reference idref='entity-handler'/>
-  </implements>
-  
-  <field name='fSymbolTable'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='symbol-table'/>
-  </field>
-  
-  <field name='fErrorReporter'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='error-reporter'/>
-  </field>
-  
-  <field name='fEntityManager'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='entity-manager'/>
-  </field>
-  
-  <field name='fDTDScanner'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='dtd-scanner'/>
-  </field>
-  
-  <field name='fNamespaces'>
-   <note>This field is initialized on reset.</note>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='fDocumentHandler'>
-   <reference idref='document-handler'/>
-  </field>
-  
-  <constructor/>
-  
-  <method name='scanDocument'>
-   <param name='complete'>
-    <primitive type='boolean'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
- </class>
-
- <class id='dtd-scanner' name='XMLDTDScanner'>
- 
-  <implements>
-   <reference idref='configurable'/>
-  </implements>
-  
-  <implements>
-   <reference idref='dtd-source'/>
-  </implements>
-  
-  <implements>
-   <reference idref='dtd-content-model-source'/>
-  </implements>
-  
-  <implements>
-   <reference idref='entity-handler'/>
-  </implements>
-  
-  <field name='fSymbolTable'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='symbol-table'/>
-  </field>
-  
-  <field name='fErrorReporter'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='error-reporter'/>
-  </field>
-  
-  <field name='fEntityManager'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='entity-manager'/>
-  </field>
-  
-  <field name='fDTDHandler'>
-   <reference idref='dtd-handler'/>
-  </field>
-  
-  <field name='fDTDContentModelHandler'>
-   <reference idref='dtd-content-model-handler'/>
-  </field>
-  
-  <constructor/>
-  
-  <method name='scanDTD'>
-   <param name='complete'>
-    <primitive type='boolean'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanDTDFragment'>
-   <param name='complete'>
-    <primitive type='boolean'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanDTDInternalSubset'>
-   <param name='complete'>
-    <primitive type='boolean'/>
-   </param>
-   <param name='standalone'>
-    <primitive type='boolean'/>
-   </param>
-   <param name='hasExternalDTD'>
-    <primitive type='boolean'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
- </class>
-
- <class id='entity-manager' name='XMLEntityManager'>
- 
-  <implements>
-   <reference idref='configurable'/>
-  </implements>
-  
-  <field name='fEntityResolver'>
-   <reference idref='sax-entity-resolver'/>
-  </field>
-  
-  <field name='fEntityReader'>
-   <reference idref='entity-reader'/>
-  </field>
-  
-  <field name='fEntityHandler'>
-   <reference idref='entity-handler'/>
-  </field>
-  
-  <constructor/>
-  
-  <method name='setEntityHandler'>
-   <param name='entityHandler'>
-    <reference idref='entity-handler'/>
-   </param>
-  </method>
-  
-  <method name='addExternalEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='addInternalEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='text'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-
-  <method name='addUnparsedEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='notation'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='isDeclaredEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-
-  <method name='isExternalEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-
-  <method name='isUnparsedEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-
-  <method name='setStandalone'>
-   <param name='standalone'>
-    <primitive type='boolean'/>
-   </param>
-  </method>
-  
-  <method name='isStandalone'>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-
-  <method name='expandSystemId'>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-
-  <method name='expandSystemId'>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-
-  <method name='resolveEntity'>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='input-source'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startDocumentEntity'>
-   <param name='inputSource'>
-    <reference idref='input-source'/>
-   </param>
-  </method>
-  
-  <method name='startDTDEntity'>
-   <param name='inputSource'>
-    <reference idref='input-source'/>
-   </param>
-  </method>
-  
-  <method name='startEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='inputSource'>
-    <reference idref='input-source'/>
-   </param>
-  </method>
-
-  <method name='getEntityScanner'>
-   <returns>
-    <reference idref='entity-reader'/>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id='entity-handler' name='XMLEntityHandler'>
- 
-  <method name='startEntity'>
-   <param name='name'>
-    <note>
-     The document has the pseudo-name of "[xml]", the DTD has the
-     pseudo-name of "[dtd]; parameter entity names start with '%';
-     and general entities are just specified by their name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <class id='input-source' name='XMLInputSource'>
- 
-  <extends>
-   <reference idref='sax-input-source'/>
-  </extends>
-  
-  <constructor/>
-  
-  <constructor>
-   <param name='inputSource'>
-    <reference idref='sax-input-source'/>
-   </param>
-  </constructor>
-
-  <constructor>
-   <param name='inputStream'>
-    <reference idref='java-io-input-stream'/>
-   </param>
-  </constructor>
-
-  <constructor>
-   <param name='reader'>
-    <reference idref='java-io-reader'/>
-   </param>
-  </constructor>
-
-  <constructor>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor>
-
-  <method name='setBaseSystemId'>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-
-  <method name='getBaseSystemId'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-
-  <method name='setExpandedSystemId'>
-   <param name='expandedSystemId'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-
-  <method name='getExpandedSystemId'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-
- </class>
-
- <class id='entity-reader' name='XMLEntityScanner'>
- 
-  <implements>
-   <reference idref='sax-locator'/>
-  </implements>
-
-  <method name='getBaseSystemId'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  <method name='setEncoding'>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='isExternal'>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='peekChar'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanChar'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanNmtoken'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanName'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanQName'>
-   <param name='qname'>
-    <reference idref='qname'/>
-   </param>
-   <returns>
-    <note>True if QName was scanned.</note>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanContent'>
-   <note>Scans parsed content in an XML document.</note>
-   <param name='content'>
-    <reference idref='string'/>
-   </param>
-   <returns>
-    <note>The next character on the stream.</note>
-    <primitive type='int'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanLiteral'>
-   <note>Scans attribute content.</note>
-   <param name='quote'>
-    <primitive type='int'/>
-   </param>
-   <param name='content'>
-    <reference idref='string'/>
-   </param>
-   <returns>
-    <note>The next character on the stream.</note>
-    <primitive type='int'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='scanData'>
-   <param name='delimiter'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='data'>
-    <reference idref='string'/>
-   </param>
-   <returns>
-    <note>True if there is more data to scan.</note>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='skipChar'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <note>True if the char was skipped.</note>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='skipSpaces'>
-   <returns>
-    <note>True if spaces were skipped.</note>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='skipString'>
-   <param name='s'>
-    <note>The string to skip.</note>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <note>True if string was skipped.</note>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
- </class>
-
- <class id='validator' name='XMLValidator'>
- 
-  <implements>
-   <reference idref='configurable'/>
-  </implements>
-  
-  <implements>
-   <reference idref='document-filter'/>
-  </implements>
-  
-  <field name='fSymbolTable'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='symbol-table'/>
-  </field>
-  
-  <field name='fErrorReporter'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='error-reporter'/>
-  </field>
-  
-  <field name='fGrammarPool'>
-   <note>This field is initialized on reset.</note>
-   <reference idref='grammar-pool'/>
-  </field>
-  
-  <field name='fNamespaces'>
-   <note>This field is initialized on reset.</note>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='fValidation'>
-   <note>This field is initialized on reset.</note>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='fDynamicValidation'>
-   <note>This field is initialized on reset.</note>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='fDocumentHandler'>
-   <reference idref='document-handler'/>
-  </field>
-  
-  <constructor/>
-  
- </class>
-
-</category>
diff --git a/design/xml/design-models.ent b/design/xml/design-models.ent
deleted file mode 100644
index d072b4e..0000000
--- a/design/xml/design-models.ent
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Implementation: Validation Content Models' package='&package;.impl.validation.models'>
- 
- <class id='simple-content-model' name='SimpleContentModel'>
- 
-  <implements>
-   <reference idref='content-model'/>
-  </implements>
-  
-  <constant name='CHOICE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='SEQUENCE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <field name='fOperator'>
-   <primitive type='short'/>
-  </field>
-  
-  <field name='fFirstChild'>
-   <reference idref='qname'/>
-  </field>
-  
-  <field name='fSecondChild'>
-   <reference idref='qname'/>
-  </field>
-  
-  <constructor>
-   <param name='operator'>
-    <primitive type='short'/>
-   </param>
-   <param name='firstChild'>
-    <reference idref='qname'/>
-   </param>
-   <param name='secondChild'>
-    <reference idref='qname'/>
-   </param>
-  </constructor>
-  
- </class>
- 
- <class id='mixed-content-model' name='MixedContentModel'>
- 
-  <implements>
-   <reference idref='content-model'/>
-  </implements>
-  
-  <field name='fCount'>
-   <primitive type='int'/>
-  </field>
-  
-  <field name='fChildren'>
-   <array>
-    <reference idref='qname'/>
-   </array>
-  </field>
-  
-  <field name='fOrdered'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <constructor>
-   <param name='count'>
-    <primitive type='int'/>
-   </param>
-   <param name='children'>
-    <array>
-     <reference idref='qname'/>
-    </array>
-   </param>
-   <param name='ordered'>
-    <primitive type='boolean'/>
-   </param>
-  </constructor>
-  
- </class>
- 
- <class id='dfa-content-model' name='DFAContentModel'>
- 
-  <implements>
-   <reference idref='content-model'/>
-  </implements>
-  
-  <constructor>
-   <!-- REVISIT: How do we communicate the model to the DFAContentModel?
-   <param name='contentSpecProvider'>
-    <reference idref='content-spec-provider'/>
-   </param>
-   <param name='contentSpecIndex'>
-    <primitive type='int'/>
-   </param>
-   -->
-  </constructor>
-  
- </class>
- 
-</category>
diff --git a/design/xml/design-parsers.ent b/design/xml/design-parsers.ent
deleted file mode 100644
index 969ebfb..0000000
--- a/design/xml/design-parsers.ent
+++ /dev/null
@@ -1,295 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Parsing' package='&package;.parsers'>
-
- <class id='caching-parser-pool' name='CachingParserPool'>
- 
-  <field name='fSymbolTable'>
-   <reference idref='symbol-table'/>
-  </field>
-  
-  <field name='fGrammarPool'>
-   <reference idref='grammar-pool'/>
-  </field>
-  
-  <constructor/>
-  
-  <constructor>
-   <param name='symbolTable'>
-    <reference idref='symbol-table'/>
-   </param>
-   <param name='grammarPool'>
-    <reference idref='grammar-pool'/>
-   </param>
-  </constructor>
-  
-  <method name='getSymbolTable'>
-   <returns>
-    <reference idref='symbol-table'/>
-   </returns>
-  </method>
-  
-  <method name='getGrammarPool'>
-   <returns>
-    <reference idref='grammar-pool'/>
-   </returns>
-  </method>
-  
-  <method name='createDOMParser'>
-   <returns>
-    <reference idref='domparser'/>
-   </returns>
-  </method>
-  
-  <method name='createSAXParser'>
-   <returns>
-    <reference idref='saxparser'/>
-   </returns>
-  </method>
-  
- </class>         
-        
- <class id='parser' name='XMLParser'>
-  
-  <implements>
-   <reference idref='configuration-manager'/>
-  </implements>
-  
-  <field name='fSymbolTable'>
-   <reference idref='symbol-table'/>
-  </field>
-  
-  <field name='fEntityManager'>
-   <reference idref='entity-manager'/>
-  </field>
-  
-  <field name='fErrorReporter'>
-   <reference idref='error-reporter'/>
-  </field>
-  
-  <field name='fNamespaces'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='fValidation'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='fDynamicValidation'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='fContinueAfterFatalError'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <constructor/>
-  
-  <constructor visibility='protected'>
-   <param name='symbolTable'>
-    <reference idref='symbol-table'/>
-   </param>
-  </constructor>
-  
-  <method name='setFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='state'>
-    <primitive type='boolean'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='getFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='setProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='value'>
-    <reference idref='java-object'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='getProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-object'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='setEntityResolver'>
-   <param name='entityResolver'>
-    <reference idref='sax-entity-resolver'/>
-   </param>
-  </method>
-  
-  <method name='setErrorHandler'>
-   <param name='errorHandler'>
-    <reference idref='sax-error-handler'/>
-   </param>
-  </method>
-  
-  <method name='parse'>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
-  <method name='parse'>
-   <param name='inputSource'>
-    <reference idref='sax-input-source'/>
-   </param>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  
- </class>
-
- <class id='document-parser' name='XMLDocumentParser'>
- 
-  <extends>
-   <reference idref='parser'/>
-  </extends>
-  
-  <implements>
-   <reference idref='document-handler'/>
-  </implements>
-  
-  <implements>
-   <reference idref='dtd-handler'/>
-  </implements>
-  
-  <implements>
-   <reference idref='dtd-content-model-handler'/>
-  </implements>
-  
-  <field name='fScanner'>
-   <reference idref='document-scanner'/>
-  </field>
-  
-  <field name='fDTDScanner'>
-   <reference idref='dtd-scanner'/>
-  </field>
-  
-  <field name='fValidator'>
-   <reference idref='validator'/>
-  </field>
-  
-  <field name='fGrammarPool'>
-   <reference idref='grammar-pool'/>
-  </field>
-  
-  <field name='fDatatypeValidatorFactory'>
-   <reference idref='datatype-validator-factory'/>
-  </field>
-  
-  <constructor/>
-  
-  <constructor visibility='protected'>
-   <param name='symbolTable'>
-    <reference idref='symbol-table'/>
-   </param>
-   <param name='grammarPool'>
-    <reference idref='grammar-pool'/>
-   </param>
-  </constructor>
-  
- </class>
-
- <class id='domparser' name='DOMParser'>
- 
-  <extends>
-   <reference idref='document-parser'/>
-  </extends>
-  
-  <constructor/>
-  
-  <constructor visibility='protected'>
-   <param name='symbolTable'>
-    <reference idref='symbol-table'/>
-   </param>
-   <param name='grammarPool'>
-    <reference idref='grammar-pool'/>
-   </param>
-  </constructor>
-  
-  <method name='getDocument'>
-   <returns>
-    <reference idref='dom-document'/>
-   </returns>
-  </method>
-  
- </class>
-
- <class id='saxparser' name='SAXParser'>
- 
-  <extends>
-   <reference idref='document-parser'/>
-  </extends>
-  
-  <implements>
-   <reference idref='sax-parser'/>
-  </implements>
-  
-  <implements>
-   <reference idref='sax-xmlreader'/>
-  </implements>
-  
-  <constructor/>
-  
-  <constructor visibility='protected'>
-   <param name='symbolTable'>
-    <reference idref='symbol-table'/>
-   </param>
-   <param name='grammarPool'>
-    <reference idref='grammar-pool'/>
-   </param>
-  </constructor>
-  
- </class>
-
-</category>
diff --git a/design/xml/design-util.ent b/design/xml/design-util.ent
deleted file mode 100644
index 0308be3..0000000
--- a/design/xml/design-util.ent
+++ /dev/null
@@ -1,498 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Utility Interfaces and Classes' package='&package;.util'>
-
- <class id='char' name='XMLChar'>
- 
-  <constant name='CHARS'>
-   <array>
-    <primitive type='byte'/>
-   </array>
-  </constant>
-  
-  <constant name='MASK_VALID'>
-   <primitive type='byte'/>
-  </constant>
-  
-  <constant name='MASK_SPACE'>
-   <primitive type='byte'/>
-  </constant>
-  
-  <constant name='MASK_NAME_START'>
-   <primitive type='byte'/>
-  </constant>
-  
-  <constant name='MASK_NAME'>
-   <primitive type='byte'/>
-  </constant>
-  
-  <constant name='MASK_PUBID'>
-   <primitive type='byte'/>
-  </constant>
-  
-  <constant name='MASK_CONTENT'>
-   <primitive type='byte'/>
-  </constant>
-  
-  <method name='isValid'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isInvalid'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isSpace'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isNameStart'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isName'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isPubid'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isContent'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isMarkup'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isHighSurrogate'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isLowSurrogate'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isSupplemental'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='highSurrogate'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='char'/>
-   </returns>
-  </method>
-  
-  <method name='lowSurrogate'>
-   <param name='c'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='char'/>
-   </returns>
-  </method>
-  
-  <method name='supplemental'>
-   <param name='highSurrogate'>
-    <primitive type='int'/>
-   </param>
-   <param name='lowSurrogate'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='isValidName'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isValidIANAEncoding'>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='isValidJavaEncoding'>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
- </class>
-
- <class id='encoding-map' name='EncodingMap'>
- 
-  <field name='fIANA2JavaMap'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='java-string'/>
-    </items>
-   </collection>
-  </field>
-  
-  <field name='fJava2IANAMap'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='java-string'/>
-    </items>
-   </collection>
-  </field>
-  
-  <constructor/>
-  
-  <method name='putIANA2JavaMapping'>
-   <param name='ianaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='javaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='getIANA2JavaMapping'>
-   <param name='ianaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='removeIANA2JavaMapping'>
-   <param name='ianaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='putJava2IANAMapping'>
-   <param name='javaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='ianaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='getJava2IANAMapping'>
-   <param name='javaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='removeJava2IANAMapping'>
-   <param name='javaEncoding'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
- </class>
-
- <class id='symbol-table' name='SymbolTable'>
- 
-  <constructor/>
-  
-  <method name='addSymbol'>
-   <param name='symbol'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='addSymbol'>
-   <param name='buffer'>
-    <array>
-     <primitive type='char'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='containsSymbol'>
-   <param name='symbol'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='containsSymbol'>
-   <param name='buffer'>
-    <array>
-     <primitive type='char'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='hash'>
-   <param name='symbol'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='hash'>
-   <param name='buffer'>
-    <array>
-     <primitive type='char'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
- </class>
-
- <interface id='message-formatter' name='MessageFormatter'>
- 
-  <method name='formatMessage'>
-   <param name='locale'>
-    <reference idref='java-locale'/>
-   </param>
-   <param name='key'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='arguments'>
-    <array>
-     <reference idref='java-object'/>
-    </array>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-   <throws>
-    <reference idref='java-missing-resource-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <class id='string-buffer' name='XMLStringBuffer'>
- 
-  <extends>
-   <reference idref='string'/>
-  </extends>
-  
-  <constant name='DEFAULT_SIZE'>
-   <primitive type='int'/>
-  </constant>
-  
-  <constructor/>
-  
-  <constructor>
-   <param name='size'>
-    <primitive type='int'/>
-   </param>
-  </constructor>
-  
-  <method name='clear'/>
-  
-  <method name='append'>
-   <param name='c'>
-    <primitive type='char'/>
-   </param>
-  </method>
-  
-  <method name='append'>
-   <param name='s'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='append'>
-   <param name='ch'>
-    <array>
-     <primitive type='char'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <primitive type='int'/>
-   </param>
-  </method>
-  
-  <method name='append'>
-   <param name='s'>
-    <reference idref='string'/>
-   </param>
-  </method>
-  
- </class>
- 
- <class id='attributes-impl' name='XMLAttributesImpl'>
- 
-  <implements>
-   <reference idref='attributes'/>
-  </implements>
-  
-  <field name='fNamespaces'>
-   <primitive type='boolean'/>
-  </field>
-
-  <constructor/>
-
-  <method name='setNamespaces'>
-   <param name='namespaces'>
-    <primitive type='boolean'/>
-   </param>
-  </method>
-
- </class>
-
- <class id='namespace-support' name='NamespaceSupport'>
- 
-  <implements>
-   <reference idref='namespace-context'/>
-  </implements> 
-
-  <constructor/>
-  
-  <constructor>
-   <param name='context'>
-    <reference idref='namespace-context'/>
-   </param>
-  </constructor>
-  
-  <method name='pushContext'/>
-  
-  <method name='declarePrefix'>
-   <param name='prefix'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='uri'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-
-  <method name='popContext'/>
-
- </class>
-
- <class id='default-error-handler' name='DefaultErrorHandler'>
-
-  <implements>
-   <reference idref='sax-error-handler'/>
-  </implements>
-  
-  <constructor/> 
-
- </class>
- 
-</category>
diff --git a/design/xml/design-validation.ent b/design/xml/design-validation.ent
deleted file mode 100644
index f4508f2..0000000
--- a/design/xml/design-validation.ent
+++ /dev/null
@@ -1,781 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Implementation: Validation' package='&package;.impl.validation'>
-
- <class id='grammar-pool' name='GrammarPool'>
- 
-  <field name='fGrammars'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='grammar'/>
-    </items>
-   </collection>
-  </field>
-  
-  <field name='fGrammarsNS'>
-   <collection>
-    <collector>
-     <reference idref='java-hashtable'/>
-    </collector>
-    <items>
-     <reference idref='grammar'/>
-    </items>
-   </collection>
-  </field>
-  
-  <constructor/>
-  
-  <method name='putGrammar'>
-   <param name='rootElement'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='grammar'>
-    <reference idref='grammar'/>
-   </param>
-  </method>
-  
-  <method name='putGrammarNS'>
-   <param name='targetNamespace'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='grammar'>
-    <reference idref='grammar'/>
-   </param>
-  </method>
-  
-  <method name='getGrammar'>
-   <param name='rootElement'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='grammar'/>
-   </returns>
-  </method>
-  
-  <method name='getGrammarNS'>
-   <param name='targetNamespace'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='grammar'/>
-   </returns>
-  </method>
-  
-  <method name='removeGrammar'>
-   <param name='rootElement'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='grammar'/>
-   </returns>
-  </method>
-  
-  <method name='removeGrammarNS'>
-   <param name='targetNamespace'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='grammar'/>
-   </returns>
-  </method>
-  
- </class>
-
- <class id='grammar' name='Grammar'>
- 
-  <constant name='TOP_LEVEL_SCOPE'>
-   <primitive type='int'/>
-  </constant>
-
-  <field name='fTargetNamespace'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <constructor/>
-
-  <method name='isNamespaceAware'>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>  
-
-  <method name='getTargetNamespace'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='getElementDeclCount'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getElementDeclIndex'>
-   <param name='elementDeclName'>
-    <reference idref='qname'/>
-   </param>
-   <param name='scope'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getElementDeclAt'>
-   <param name='elementDeclIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='elementDecl'>
-    <note>The values of this structure are set by this call.</note>
-    <reference idref='element-decl'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='getAttributeDeclCount'>
-   <param name='elementDeclIndex'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getAttributeDeclIndex'>
-   <param name='elementDeclIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='attributeDeclName'>
-    <!-- REVISIT: This should be a QName in the code to handle such
-                  cases as attributes from other namespaces being
-                  allowed for the specified element. -Ac -->
-    <reference idref='qname'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getAttributeDeclAt'>
-   <param name='attributeDeclIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='attributeDecl'>
-    <note>The values of this structure are set by this call.</note>
-    <reference idref='attribute-decl'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='getEntityDeclCount'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getEntityDeclIndex'>
-   <param name='entityDeclName'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getEntityDeclAt'>
-   <param name='entityDeclIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='entityDecl'>
-    <reference idref='entity-decl'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='getNotationDeclCount'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getNotationDeclIndex'>
-   <param name='notationDeclName'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getNotationDeclAt'>
-   <param name='notationDeclIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='notationDecl'>
-    <reference idref='notation-decl'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
- </class>
-
- <class id='element-decl' name='XMLElementDecl'>
- 
-  <constant name='TYPE_ANY'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_EMPTY'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_MIXED'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_CHILDREN'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_SIMPLE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <field name='name' visibility='public'>
-   <reference idref='qname'/>
-  </field>
-  
-  <field name='scope' visibility='public'>
-   <primitive type='int'/>
-  </field>
-  
-  <field name='type' visibility='public'>
-   <primitive type='short'/>
-  </field>
-  
-  <field name='simpleType' visibility='public'>
-   <reference idref='simple-type'/>
-  </field>
-  
-  <method name='setValues'>
-   <param name='name'>
-    <reference idref='qname'/>
-   </param>
-   <param name='scope'>
-    <primitive type='int'/>
-   </param>
-   <param name='type'>
-    <primitive type='short'/>
-   </param>
-   <param name='simpleType'>
-    <reference idref='simple-type'/>
-   </param>
-  </method>
-  
-  <method name='setValues'>
-   <param name='elementDecl'>
-    <reference idref='element-decl'/>
-   </param>
-  </method>
-  
-  <method name='clear'/>
-  
- </class>
-
- <class id='attribute-decl' name='XMLAttributeDecl'>
- 
-  <field name='name' visibility='public'>
-   <reference idref='qname'/>
-  </field>
-  
-  <field name='simpleType' visibility='public'>
-   <reference idref='simple-type'/>
-  </field>
-  
-  <field name='optional' visibility='public'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <method name='setValues'>
-   <param name='name'>
-    <reference idref='qname'/>
-   </param>
-   <param name='simpleType'>
-    <reference idref='simple-type'/>
-   </param>
-   <param name='optional'>
-    <primitive type='boolean'/>
-   </param>
-  </method>
-  
-  <method name='setValues'>
-   <param name='attributeDecl'>
-    <reference idref='attribute-decl'/>
-   </param>
-  </method>
-  
-  <method name='clear'/>
-  
- </class>
-
- <class id='simple-type' name='XMLSimpleType'>
- 
-  <constant name='TYPE_CDATA'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_ENTITY'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_ENUMERATION'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_ID'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_IDREF'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_NMTOKEN'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_NOTATION'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='TYPE_NAMED'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='DEFAULT_TYPE_DEFAULT'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='DEFAULT_TYPE_FIXED'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='DEFAULT_TYPE_IMPLIED'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='DEFAULT_TYPE_REQUIRED'>
-   <primitive type='short'/>
-  </constant>
-  
-  <field name='type'>
-   <primitive type='short'/>
-  </field>
-  
-  <field name='name'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='enumeration' visibility='public'>
-   <array>
-    <reference idref='java-string'/>
-   </array>
-  </field>
-  
-  <field name='list' visibility='public'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <field name='defaultType' visibility='public'>
-   <primitive type='short'/>
-  </field>
-  
-  <field name='defaultValue' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='datatypeValidator' visibility='public'>
-   <reference idref='datatype-validator'/>
-  </field>
-  
-  <method name='setValues'>
-   <param name='type'>
-    <primitive type='short'/>
-   </param>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='enumeration'>
-    <array>
-     <reference idref='java-string'/>
-    </array>
-   </param>
-   <param name='list'>
-    <primitive type='boolean'/>
-   </param>
-   <param name='defaultType'>
-    <primitive type='short'/>
-   </param>
-   <param name='defaultValue'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='datatypeValidator'>
-    <reference idref='datatype-validator'/>
-   </param>
-  </method>
-
-  <method name='setValues'>
-   <param name='simpleType'>
-    <reference idref='simple-type'/>
-   </param>
-  </method>
-  
-  <method name='clear'/>
-  
- </class>
-
- <class id='entity-decl' name='XMLEntityDecl'>
- 
-  <field name='name' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='publicId' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='systemId' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='baseSystemId' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='notation' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='isPE' visibility='public'>
-   <primitive type='boolean'/>
-  </field>
-  
-  <method name='setValues'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='notation'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='isPE'>
-    <primitive type='boolean'/>
-   </param>
-  </method>
-
-  <method name='setValues'>
-   <param name='entityDecl'>
-    <reference idref='entity-decl'/>
-   </param>
-  </method>
-  
-  <method name='clear'/>
-  
- </class>
-
- <class id='notation-decl' name='XMLNotationDecl'>
- 
-  <field name='name' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='publicId' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='systemId' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <method name='setValues'>
-   <param name='name'>
-   <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-   <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-   <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='notationDecl'>
-   <param name='notationDecl'>
-    <reference idref='notation-decl'/>
-   </param>
-  </method>
-
-  <method name='clear'/>
-  
- </class>
-
- <interface id='datatype-validator-factory' name='DatatypeValidatorFactory'>
- 
-  <method name='createDatatypeValidator'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='base'>
-    <reference idref='datatype-validator'/>
-   </param>
-   <param name='facets'>
-    <collection>
-     <collector>
-      <reference idref='java-hashtable'/>
-     </collector>
-     <items>
-      <reference idref='java-string'/>
-     </items>
-    </collection>
-   </param>
-   <param name='list'>
-    <primitive type='boolean'/>
-   </param>
-   <returns>
-    <reference idref='datatype-validator'/>
-   </returns>
-   <throws>
-    <reference idref='invalid-datatype-facet-exception'/>
-   </throws>
-   <throws>
-    <reference idref='invalid-datatype-value-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id='datatype-validator' name='DatatypeValidator'>
- 
-  <method name='getFacets'>
-   <returns>
-    <collection>
-     <collector>
-      <reference idref='java-hashtable'/>
-     </collector>
-     <items>
-      <reference idref='java-string'/>
-     </items>
-    </collection>
-   </returns>
-  </method>
-  
-  <method name='validate'>
-   <param name='data'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='state'>
-    <reference idref='java-object'/>
-   </param>
-   <throws>
-    <reference idref='invalid-datatype-value-exception'/>
-   </throws>
-  </method>
-  
-  <method name='compare'>
-   <param name='value1'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='value2'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-   <throws>
-    <reference idref='invalid-datatype-value-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <class id='invalid-datatype-facet-exception' name='InvalidDatatypeFacetException'>
- 
-  <extends>
-   <reference idref='sax-exception'/>
-  </extends>
-  
-  <constructor/>
-  
-  <constructor>
-   <param name='message'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor>
-  
-  <constructor>
-   <param name='exception'>
-    <reference idref='java-exception'/>
-   </param>
-  </constructor>
-  
-  <constructor>
-   <param name='message'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='exception'>
-    <reference idref='java-exception'/>
-   </param>
-  </constructor>
-  
- </class>
-
- <class id='invalid-datatype-value-exception' name='InvalidDatatypeValueException'>
- 
-  <extends>
-   <reference idref='sax-exception'/>
-  </extends>
-  
-  <constructor/>
-  
-  <constructor>
-   <param name='message'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor>
-  
-  <constructor>
-   <param name='exception'>
-    <reference idref='java-exception'/>
-   </param>
-  </constructor>
-  
-  <constructor>
-   <param name='message'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='exception'>
-    <reference idref='java-exception'/>
-   </param>
-  </constructor>
-  
- </class>
-
- <interface id='content-model' name='ContentModelValidator'>
- 
-  <method name='validate'>
-   <param name='children'>
-    <array>
-     <reference idref='qname'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <!-- REVISIT: Add this functionality in later. -Ac
-  <method name='whatCanGoHere'>
-   <param name='insertableElementsInfo'>
-    <reference idref='insertable-elements-info'/>
-   </param>
-  </method>
-  -->
-  
- </interface>
-
- <!-- REVISIT: Add this functionality in later. -Ac
- <class id='insertable-elements-info' name='InsertableElementsInfo'>
-  <field name='canHoldPCData' visibility='public'>
-   <primitive type='boolean'/>
-  </field>
-  <field name='childCount' visibility='public'>
-   <primitive type='int'/>
-  </field>
-  <field name='currentChildren' visibility='public'>
-   <array>
-    <reference idref='qname'/>
-   </array>
-  </field>
-  <field name='insertAt' visibility='public'>
-   <primitive type='int'/>
-  </field>
-  <field name='isValidEOC' visibility='public'>
-   <primitive type='boolean'/>
-  </field>
-  <field name='possibleChildren' visibility='public'>
-   <array>
-    <reference idref='qname'/>
-   </array>
-  </field>
-  <field name='results' visibility='public'>
-   <array>
-    <primitive type='boolean'/>
-   </array>
-  </field>
-  <field name='resultsCount' visibility='public'>
-   <primitive type='int'/>
-  </field>
-  <method name='setValues'>
-   <param name='canHoldPCData'>
-    <primitive type='boolean'/>
-   </param>
-   <param name='childCount'>
-    <primitive type='int'/>
-   </param>
-   <param name='currentChildren'>
-    <array>
-     <reference idref='qname'/>
-    </array>
-   </param>
-   <param name='insertAt'>
-    <primitive type='int'/>
-   </param>
-   <param name='isValidEOC'>
-    <primitive type='boolean'/>
-   </param>
-   <param name='possibleChildren'>
-    <array>
-     <reference idref='qname'/>
-    </array>
-   </param>
-   <param name='results'>
-    <array>
-     <primitive type='boolean'/>
-    </array>
-   </param>
-   <param name='resultsCount'>
-    <primitive type='int'/>
-   </param>
-  </method>
-  <method name='clear'/>
- </class>
- -->
-
-</category>
diff --git a/design/xml/design-xni.ent b/design/xml/design-xni.ent
deleted file mode 100644
index d32a0b1..0000000
--- a/design/xml/design-xni.ent
+++ /dev/null
@@ -1,1374 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Xerces Native Interface (XNI)' package='&package;.xni'>
- 
- <interface id='document-handler' name='XMLDocumentHandler'>
- 
-  <method name='startDocument'>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='xmlDecl'>
-   <param name='version'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='standalone'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='doctypeDecl'>
-   <param name='rootElement'>
-    <reference idref='java-string'/>    
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='comment'>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='processingInstruction'>
-   <param name='target'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='data'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startPrefixMapping'>
-   <param name='prefix'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='uri'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startEntity'>
-   <param name='name'>
-    <note>
-     The DTD has the pseudo-name of "[dtd]; parameter entity names 
-     start with '%'; and general entities are just specified by 
-     their name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='textDecl'>
-   <param name='version'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startElement'>
-   <param name='element'>
-    <reference idref='qname'/>
-   </param>
-   <param name='attributes'>
-    <reference idref='attributes'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='emptyElement'>
-   <param name='element'>
-    <reference idref='qname'/>
-   </param>
-   <param name='attributes'>
-    <reference idref='attributes'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='characters'>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='ignorableWhitespace'>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endElement'>
-   <param name='element'>
-    <reference idref='qname'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endPrefixMapping'>
-   <param name='prefix'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startCDATA'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  <method name='endCDATA'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>   
-  
-  <method name='endDocument'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id='document-fragment-handler' name='XMLDocumentFragmentHandler'>
- 
-  <method name='startDocumentFragment'>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='namespaceContext'>
-    <reference idref='namespace-context'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='comment'>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='processingInstruction'>
-   <param name='target'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='data'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startPrefixMapping'>
-   <param name='prefix'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='uri'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startEntity'>
-   <param name='name'>
-    <note>
-     The DTD has the pseudo-name of "[dtd]; parameter entity names 
-     start with '%'; and general entities are just specified by 
-     their name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startElement'>
-   <param name='element'>
-    <reference idref='qname'/>
-   </param>
-   <param name='attributes'>
-    <reference idref='attributes'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='emptyElement'>
-   <param name='element'>
-    <reference idref='qname'/>
-   </param>
-   <param name='attributes'>
-    <reference idref='attributes'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='characters'>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='ignorableWhitespace'>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endElement'>
-   <param name='element'>
-    <reference idref='qname'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endPrefixMapping'>
-   <param name='prefix'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startCDATA'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endCDATA'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='textDecl'>
-   <param name='version'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endDocumentFragment'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id='namespace-context' name='NamespaceContext'>
- 
-  <constant name='XMLNS'>
-   <reference idref='java-string'/>
-  </constant>
-  
-  <method name='getParentContext'>
-   <returns>
-    <reference idref='namespace-context'/>
-   </returns>
-  </method>
-  
-  <method name='getURI'>
-   <param name='prefix'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='getDeclaredPrefixCount'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getDeclaredPrefixAt'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
- </interface>
-
- <interface id='dtd-handler' name='XMLDTDHandler'>
- 
-  <constant name='CONDITIONAL_INCLUDE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='CONDITIONAL_IGNORE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <method name='startDTD'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='comment'>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='processingInstruction'>
-   <param name='target'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='data'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startEntity'>
-   <param name='name'>
-    <note>
-     The DTD has the pseudo-name of "[dtd]; parameter entity names 
-     start with '%'; and general entities are just specified by 
-     their name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <note>
-     The auto-detected encoding of the entity or null if not appropriate. 
-     The encoding name will be specified using the IANA encoding name.
-    </note>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='textDecl'>
-   <param name='version'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='encoding'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endEntity'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='elementDecl'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='contentModel'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startAttlist'>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='attributeDecl'>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='attributeName'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='type'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='enumeration'>
-    <array>
-     <reference idref='java-string'/>
-    </array>
-   </param>
-   <param name='defaultType'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='defaultValue'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endAttlist'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='internalEntityDecl'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='text'>
-    <reference idref='string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='externalEntityDecl'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='baseSystemId'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='unparsedEntityDecl'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='notation'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='notationDecl'>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='publicId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='startConditional'>
-   <param name='type'>
-    <primitive type='short'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endConditional'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  <method name='endDTD'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id='dtd-content-model-handler' name='XMLDTDContentModelHandler'>
- 
-  <constant name='SEPARATOR_CHOICE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='SEPARATOR_SEQUENCE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='OCCURS_ZERO_OR_ONE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='OCCURS_ZERO_OR_MORE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <constant name='OCCURS_ONE_OR_MORE'>
-   <primitive type='short'/>
-  </constant>
-  
-  <method name='startContentModel'>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='any'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='empty'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-
-  <method name='startGroup'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='pcdata'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-
-  <method name='element'>
-   <param name='elementName'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='separator'>
-   <param name='separator'>
-    <primitive type='short'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='occurrence'>
-   <param name='occurrence'>
-    <primitive type='short'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endGroup'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='endContentModel'>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <class id='qname' name='QName'>
- 
-  <field name='prefix' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='localpart' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='rawname' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <field name='uri' visibility='public'>
-   <reference idref='java-string'/>
-  </field>
-  
-  <method name='setValues'>
-   <param name='prefix'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='localpart'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='rawname'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='uri'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='clear'/>
-  
- </class>
-
- <class id='string' name='XMLString'>
- 
-  <field name='ch' visibility='public'>
-   <array>
-    <primitive type='char'/>
-   </array>
-  </field>
-  
-  <field name='offset' visibility='public'>
-   <primitive type='int'/>
-  </field>
-  
-  <field name='length' visibility='public'>
-   <primitive type='int'/>
-  </field>
-  
-  <constructor/>
-  
-  <constructor>
-   <param name='ch'>
-    <array>
-     <primitive type='char'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <primitive type='int'/>
-   </param>
-  </constructor>
-  
-  <method name='setValues'>
-   <param name='ch'>
-    <array>
-     <primitive type='char'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <primitive type='int'/>
-   </param>
-  </method>
-  
-  <method name='clear'/>
-  
-  <method name='equals'>
-   <param name='ch'>
-    <array>
-     <primitive type='char'/>
-    </array>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='equals'>
-   <param name='s'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='toString'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
- </class>
- 
- <interface id='attributes' name='XMLAttributes'>
- 
-  <extends>
-   <reference idref='sax-attribute-list'/>
-  </extends>
-  
-  <extends>
-   <reference idref='sax-attributes'/>
-  </extends>
-  
-  <method name='addAttribute'>
-   <param name='name'>
-    <reference idref='qname'/>
-   </param>
-   <param name='type'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='value'>
-    <reference idref='string'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='removeAttributeAt'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-  </method>
-  
-  <method name='removeAllAttributes'/>
-  
-  <method name='removeAllEntitiesFor'>
-   <param name='attrIndex'>
-    <primitive type='int'/>
-   </param>
-  </method>
-  
-  <method name='addAttributeEntity'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <param name='name'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='offset'>
-    <primitive type='int'/>
-   </param>
-   <param name='length'>
-    <primitive type='int'/>
-   </param>
-  </method>
-  
-  <method name='removeEntityAt'>
-   <param name='attrIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='entityIndex'>
-    <primitive type='int'/>
-   </param>
-  </method>
-  
-  <method name='setName'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <param name='name'>
-    <reference idref='qname'/>
-   </param>
-  </method>
-  
-  <method name='getName'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <param name='name'>
-    <reference idref='qname'/>
-   </param>
-  </method>
-  
-  <method name='setType'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <param name='type'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='getType'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='setValue'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <param name='value'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='setNonNormalizedValue'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <param name='value'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-  
-  <method name='getNonNormalizedValue'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-
-  <method name='setSpecified'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <param name='specified'>
-    <primitive type='boolean'/>
-   </param>
-  </method>
-  
-  <method name='isSpecified'>
-   <param name='index'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-  </method>
-  
-  <method name='getEntityCount'>
-   <param name='attrIndex'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getEntityName'>
-   <param name='attrIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='entityIndex'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  
-  <method name='getEntityOffset'>
-   <param name='attrIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='entityIndex'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
-  <method name='getEntityLength'>
-   <param name='attrIndex'>
-    <primitive type='int'/>
-   </param>
-   <param name='entityIndex'>
-    <primitive type='int'/>
-   </param>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  
- </interface>
-
- <class id='xni-exception' name='XNIException'>
-  <field name='fException'>
-   <reference idref='java-string'/>
-  </field>
-  <constructor>
-   <param name='message'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor>
-  <constructor>
-   <param name='exception'>
-    <reference idref='java-exception'/>
-   </param>
-  </constructor>
-  <constructor>
-   <param name='exception'>
-    <reference idref='java-exception'/>
-   </param>
-   <param name='message'>
-    <reference idref='java-string'/>
-   </param>
-  </constructor>
-  <method name='getException'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
- </class>
-
-</category>
-
-<category name='XNI: Parser Pipeline' package='&package;.xni.pipeline'>
- <interface id='configurable' name='XMLComponent'>
- 
-  <method name='reset'>
-   <param name='componentManager'>
-    <reference idref='configuration-manager'/>
-   </param>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-  
-  <method name='getRecognizedFeatures'>
-   <param name='recognizedFeatures'>
-    <array>
-     <reference idref='java-string'/>
-    </array>
-   </param>
-  </method>
-
-  <method name='setFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='state'>
-    <primitive type='boolean'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='getRecognizedProperties'>
-   <param name='recognizedProperties'>
-    <array>
-     <reference idref='java-string'/>
-    </array>
-   </param>
-  </method>
-
-  <method name='setProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='value'>
-    <reference idref='java-object'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id='configuration-manager' name='XMLComponentManager'>
- 
-  <method name='getFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='getProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-object'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
- </interface>
-
- <interface id='parser-configuration' name='XMLParserConfiguration'>
- 
-  <method name='addRecognizedFeatures'>
-   <param name='featureIds'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-
-  <method name='setFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='state'>
-    <primitive type='boolean'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='getFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='addRecognizedProperties'>
-   <param name='propertyIds'>
-    <reference idref='java-string'/>
-   </param>
-  </method>
-
-  <method name='setProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='value'>
-    <reference idref='java-object'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  
-  <method name='getProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-object'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-
-  <method name='setLocale'>
-   <param name='locale'>
-    <reference idref='java-locale'/>
-   </param>
-  </method>
-  
-  <method name='setDocumentHandler'>
-   <param name='documentHandler'>
-    <reference idref='document-handler'/>
-   </param>
-  </method>
-
-  <!-- 
-    - // REVISIT: The following two methods to be combined, redesigned, 
-    -             or both. -Ac
-    -->
-    
-  <method name='setDTDHandler'>
-   <param name='dtdHandler'>
-    <reference idref='dtd-handler'/>
-   </param>
-  </method>
-
-  <method name='setDTDContentModelHandler'>
-   <param name='dtdContentModelHandler'>
-    <reference idref='dtd-content-model-handler'/>
-   </param>
-  </method>
-
-  <method name='parse'>
-   <param name='inputSource'>
-    <reference idref='sax-input-source'/>
-   </param>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='xni-exception'/>
-   </throws>
-  </method>
-
- </interface>
-
-</category>
-
-<!-- 
-  - Old interfaces to be either moved to another package or
-  - removed entirely. The decision on what should be done with
-  - then is currently deferred. -Ac
-  
- <interface id='document-source' name='XMLDocumentSource'>
- 
-  <method name='setDocumentHandler'>
-   <param name='documentHandler'>
-    <reference idref='document-handler'/>
-   </param>
-  </method>
-  
- </interface>
-
- <interface id='document-filter' name='XMLDocumentFilter'>
- 
-  <extends>
-   <reference idref='document-handler'/>
-  </extends>
-  <extends>
-   <reference idref='document-source'/>
-  </extends>
-  
- </interface>
-
- <interface id='dtd-source' name='XMLDTDSource'>
- 
-  <method name='setDTDHandler'>
-   <param name='dtdHandler'>
-    <reference idref='dtd-handler'/>
-   </param>
-  </method>
-  
- </interface>
-
- <interface id='dtd-filter' name='XMLDTDFilter'>
- 
-  <extends>
-   <reference idref='dtd-handler'/>
-  </extends>
-  
-  <extends>
-   <reference idref='dtd-source'/>
-  </extends>
-  
- </interface>
-
- <interface id='dtd-content-model-source' name='XMLDTDContentModelSource'>
- 
-  <method name='setDTDContentModelHandler'>
-   <param name='dtdContentModelHandler'>
-    <reference idref='dtd-content-model-handler'/>
-   </param>
-  </method>
-  
- </interface>
-
- <interface id='dtd-content-model-filter' name='XMLDTDContentModelFilter'>
- 
-  <extends>
-   <reference idref='dtd-content-model-handler'/>
-  </extends>
-  
-  <extends>
-   <reference idref='dtd-content-model-source'/>
-  </extends>
-  
- </interface>
-
--->
diff --git a/design/xml/design.dtd b/design/xml/design.dtd
deleted file mode 100644
index 2c2851a..0000000
--- a/design/xml/design.dtd
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-
-<!-- overall organization -->
-<!ELEMENT design (note*,types*,category*)>
-<!ATTLIST design name CDATA #IMPLIED
-                 date CDATA #IMPLIED>
-<!ELEMENT date (#PCDATA)>
-<!ELEMENT types (category)*>
-<!ELEMENT category (note*,(class|interface)*)>
-<!ATTLIST category name    CDATA   #REQUIRED
-                   package NMTOKEN #IMPLIED
->
-
-<!-- markup -->
-<!ELEMENT note (#PCDATA)>
-
-<!-- types -->
-<!ENTITY % types 'array|primitive|reference|collection'>
-<!ELEMENT array (note*,(primitive|reference))>
-<!ATTLIST array dimension CDATA '1'>
-<!ELEMENT primitive EMPTY>
-<!ATTLIST primitive type (long|int|short|byte|char|boolean) #REQUIRED>
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference idref IDREF #REQUIRED>
-<!ELEMENT collection (note*,collector,items)>
-<!ELEMENT collector (%types;)>
-<!ELEMENT items (%types;)>
-<!ELEMENT union (note?,part,part+)>
-<!ELEMENT part (note?,(%types;)*)>
-
-<!-- sections -->
-<!ENTITY % visibility 'public|private|protected'>
-<!ELEMENT constant (note*,(%types;))>
-<!ATTLIST constant name       NMTOKEN        #REQUIRED
-                   value      CDATA          #IMPLIED
-                   visibility (%visibility;) 'public'
->
-<!ELEMENT field (note*,(%types;))>
-<!ATTLIST field name       NMTOKEN        #REQUIRED
-                visibility (%visibility;) 'protected'
->
-<!ELEMENT constructor (note*,param*,throws*)>
-<!ATTLIST constructor visibility (%visibility;) 'public'>
-<!ELEMENT method (note*,param*,returns?,throws*)>
-<!ATTLIST method name       NMTOKEN        #REQUIRED
-                 visibility (%visibility;) 'public'
->
-<!ELEMENT param (note*,(%types;))>
-<!ATTLIST param name NMTOKEN #REQUIRED>
-<!ELEMENT returns (note*,(%types;))>
-<!ELEMENT throws (note*,reference)>
-
-<!-- objects -->
-<!ELEMENT class (note*,extends?,implements*,constant*,field*,constructor*,method*)>
-<!ATTLIST class id         ID             #REQUIRED 
-                name       NMTOKEN        #REQUIRED
-                visibility (%visibility;) #FIXED 'public'
->
-<!ELEMENT interface (note*,extends*,constant*,method*)>
-<!ATTLIST interface id         ID             #REQUIRED
-                    name       NMTOKEN        #REQUIRED
-                    visibility (%visibility;) #FIXED 'public'
->
-<!ELEMENT extends (note*,reference)>
-<!ELEMENT implements (note*,reference)>
diff --git a/design/xml/design.xml b/design/xml/design.xml
deleted file mode 100644
index 7a3620a..0000000
--- a/design/xml/design.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<!DOCTYPE design SYSTEM 'design.dtd' [
-<!ENTITY package 'org.apache.xerces'>
-<!ENTITY types-java SYSTEM 'types-java.ent'>
-<!ENTITY types-dom  SYSTEM 'types-dom.ent'>
-<!ENTITY types-sax  SYSTEM 'types-sax.ent'>
-<!ENTITY design-xni        SYSTEM 'design-xni.ent'>
-<!ENTITY design-impl       SYSTEM 'design-impl.ent'>
-<!ENTITY design-parsers    SYSTEM 'design-parsers.ent'>
-<!ENTITY design-util       SYSTEM 'design-util.ent'>
-<!ENTITY design-validation SYSTEM 'design-validation.ent'>
-<!ENTITY design-models     SYSTEM 'design-models.ent'>
-<!ENTITY design-datatypes  SYSTEM 'design-datatypes.ent'>
-<!ENTITY design-grammars   SYSTEM 'design-grammars.ent'>
-<!ENTITY design-identity   SYSTEM 'design-identity.ent'>
-]>
-<design name='Xerces-J 2.0' date='$Date$'>
- 
- <types>
-  &types-java;
-  &types-dom;
-  &types-sax;
- </types>
- 
- &design-xni;
- &design-impl;
- &design-validation;
- &design-models;
- &design-datatypes;
- &design-grammars;
- &design-identity;
- &design-parsers;
- &design-util;
- 
-</design>
\ No newline at end of file
diff --git a/design/xml/issues.dtd b/design/xml/issues.dtd
deleted file mode 100644
index 02375b4..0000000
--- a/design/xml/issues.dtd
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-
-<!-- Entities -->
-<!ENTITY % link    'a'>
-<!ENTITY % content '(#PCDATA|%link;)*'>
-
-<!ENTITY % status '(open|deferred|rejected|closed)'>
-<!ENTITY % space  '(default|preserve)'>
-
-<!-- Main elements -->
-<!ELEMENT issues (person*,issue*)>
-<!ATTLIST issues date CDATA #REQUIRED>
-
-<!-- Authors of issues and comments -->
-<!ENTITY % person SYSTEM 'person.dtd'>
-%person;
-
-<!-- Issue information -->
-<!ELEMENT issue (title,detail?,see*,problem*)>
-<!ATTLIST issue id         ID       #REQUIRED
-                status     %status;           'open'
-                originator IDREF    #IMPLIED
-                owner      IDREF    #IMPLIED>
-
-<!ELEMENT title (#PCDATA)>
-<!ELEMENT detail %content;>
-<!ELEMENT see EMPTY>
-<!ATTLIST see idref IDREF #REQUIRED>
-<!ELEMENT problem (detail,comment*,resolution?)>
-<!ATTLIST problem link CDATA #IMPLIED>
-<!ELEMENT comment %content;>
-<!ATTLIST comment author    IDREF   #REQUIRED
-                  link      CDATA   #IMPLIED>
-<!ELEMENT resolution %content;>
-
-<!-- HTML elements -->
-<!ELEMENT a (#PCDATA)>
-<!ATTLIST a href CDATA #REQUIRED>
diff --git a/design/xml/issues.xml b/design/xml/issues.xml
deleted file mode 100644
index a924df0..0000000
--- a/design/xml/issues.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<!DOCTYPE issues SYSTEM 'issues.dtd' [
-<!ENTITY people SYSTEM 'people.ent'>
-]>
-<issues date='$Date$'>
-
- <!-- People -->
- &people;
-
- <!-- Issues -->
- <issue id='I1' originator='andyc'>
-  <title>Entity Management &amp; Readers</title>
-  <detail>
-   The heart of parsing XML documents is the interaction between
-   the various scanners and the document input stream. Since this
-   is the critical path in the parser, performance is an important
-   consideration. Yet, at the same time, the interaction between
-   scanner and reader should be simple and straightforward.
-  </detail>
-  <problem>
-   <detail>
-    Entity stack management. The scanners can push readers on the
-    stack when an entity reference is seen but who pops the reader?
-   </detail>
-  </problem>
-  <problem>
-   <detail>
-    Who scans the XMLDecl and TextDecl lines? The scanner(s) or
-    the entity reader?
-   </detail>
-  </problem>
-  <problem>
-   <detail>
-    Handling the changing of the input stream reader based
-    on the encoding specified in the XMLDecl or TextDecl lines.
-   </detail>
-  </problem>
-  <problem>
-   <detail>
-    How do we handle the pushback buffer needed at certain
-    times during parsing while still keeping the amount of
-    delegation down to a minimum?
-   </detail>
-  </problem>
- </issue>
-
- <issue id='I2' originator='estaub'>
-  <title>Parser Pipeline Construction</title>
-  <detail>
-   The parser is designed as a pipeline and the components need
-   to be connected together and configured.
-  </detail>
-  <problem>
-   <detail>
-    Is there a generic way to put components together in 
-    order to construct the pipeline? If users want to
-    construct a new parser object with a different pipeline
-    configuration, this should be easy to do.
-   </detail>
-  </problem>
- </issue>
-
- <issue id='I3' originator='estaub'>
-  <title>Operations on XML Infoset</title>
-  <detail>
-   There are many emerging XML standards that involve operations
-   on the <a href='http://www.w3.org/TR/xml-infoset'>XML Infoset</a>.
-   <a href='http://www.w3.org/TR/xinclude'>XInclude</a> is one of
-   these standards that defines how XML inclusion operates on the
-   Infoset.
-  </detail>
-  <problem>
-   <detail>
-    When should these operations take place in the parser 
-    pipeline: before or after validation? And if it's after 
-    validation, then what does it mean for the parser to say a 
-    document is "valid"? The inclusion could cause the document to 
-    become invalid. This is more than an implementation issue; it's
-    a standards issue.
-   </detail>
-   <comment author='estaub' link='http://archive.covalent.net/xml/xerces-j-dev/2000/09/0482.xml'>
-    If XInclude processing were called after validation, then what would be
-    validated would be the unexpanded XInclude.  In other words, the schema or
-    DTD would describe the original unexpanded xinclude:href attributes, and so
-    forth.
-   </comment>
-  </problem>
-  <problem>
-   <detail>
-    Should operations on the XML Infoset even be in the parser
-    pipeline?
-   </detail>
-  </problem>
- </issue>
-
-</issues>
diff --git a/design/xml/people.ent b/design/xml/people.ent
deleted file mode 100644
index d2f7371..0000000
--- a/design/xml/people.ent
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<person id='andyc' email='andyc@apache.org'>Andy Clark</person>
-<person id='estaub' email='estaub@mediaone.net'>Ed Staub</person>
-<person id='lehors' email='lehors@us.ibm.com'>Arnaud Le Hors</person>
-<person id='jeffreyr' email='jeffreyr@us.ibm.com'>Jeff Rodriguez</person>
-<person id='ericye' email='ericye@apache.org'>Eric Ye</person>
-
diff --git a/design/xml/person.dtd b/design/xml/person.dtd
deleted file mode 100644
index 4f44a09..0000000
--- a/design/xml/person.dtd
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!ELEMENT person (#PCDATA)>
-<!ATTLIST person id    ID    #REQUIRED
-                 email CDATA #IMPLIED>
diff --git a/design/xml/schedule.dtd b/design/xml/schedule.dtd
deleted file mode 100644
index 721512d..0000000
--- a/design/xml/schedule.dtd
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<!ENTITY % person SYSTEM 'person.dtd'>
-%person;
-<!ELEMENT schedule (person*,milestone*)>
-<!ATTLIST schedule date CDATA #REQUIRED>
-<!ELEMENT milestone (title,depends*,task*)>
-<!ATTLIST milestone id    ID    #REQUIRED
-                    date  CDATA #IMPLIED
-		    owner IDREF #IMPLIED>
-<!ELEMENT title (#PCDATA)>
-<!ELEMENT depends EMPTY>
-<!ATTLIST depends idref IDREF #REQUIRED>
-<!ELEMENT task (title,detail?,contributor*)>
-<!ATTLIST task date   CDATA #IMPLIED
-               driver IDREF #IMPLIED
-               status (working|verify|done) 'working'>
-<!ELEMENT detail (#PCDATA)>
-<!ELEMENT contributor EMPTY>
-<!ATTLIST contributor idref IDREF #REQUIRED>
diff --git a/design/xml/schedule.xml b/design/xml/schedule.xml
deleted file mode 100644
index 085b274..0000000
--- a/design/xml/schedule.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<!DOCTYPE schedule SYSTEM 'schedule.dtd' [
-<!ENTITY people SYSTEM 'people.ent'>
-]>
-<schedule date='$Date$'>
- <!-- People -->
- &people;
- 
- <!-- Milestones -->
- <milestone id='M1' date='Friday, 29 Sep 2000'>
-  <title>Parser without DTD support</title>
-  <task driver='andyc' status='done'>
-   <title>Document design based on Xerces community feedback</title>
-  </task>
-  <task driver='ericye' status='done'>
-   <title>Support classes</title>
-   <detail>
-    This affects the following classes: 
-    XMLString, XMLStringBuffer, XMLChar, EncodingMap, SymbolTable, QName.
-   </detail>
-  </task>
-  <task driver='jeffreyr' status='done'>
-   <title>Basic entity managment</title>
-   <detail>
-    This affects the following classes: XMLEntityManager, XMLEntityScanner.
-   </detail>
-  </task>
-  <task driver='ericye' status='done'>
-   <title>Basic error handling</title>
-   <detail>
-    This affects the following interfaces &amp; classes:
-    XMLErrorReporter, some MessageFormatter.
-   </detail>
-  </task>
-  <task driver='andyc' status='done'>
-   <title>Parsing of elements and attributes using internal interface</title>
-   <detail>
-    This affects the following classes: XMLAttributes, XMLDocumentScanner.
-   </detail>
-  </task>
-  <task driver='lehors' status='done'>
-   <title>Implement a SAX2 parser from internal callbacks</title>
-   <detail>
-    This affects the following classes: 
-    XMLParser, XMLDocumentParser, SAXParser.
-   </detail>
-  </task>
- </milestone>
- <milestone id='M2' date='Friday, 6 October 2000'>
-  <title>Parser with DTD scanning without validation</title>
-  <depends idref='M1'/>
-  <task driver='jeffreyr'>
-   <title>More documentation</title>
-   <detail>
-    Parser initialization and the validation system needs to be
-    documented.
-   </detail>
-   <contributor idref='lehors'/>
-  </task>
-  <task driver='andyc' status='done'>
-   <title>
-    Re-organize package structure to separate core interfaces and
-    classes from implementation
-   </title>
-   <contributor idref='lehors'/>
-  </task>
-  <task driver='andyc'>
-   <title>Improve entity manager and scanner</title>
-   <detail>
-    Must support external entities, including the DTD entity and
-    pre-defined general entities (e.g. &amp;amp;).
-   </detail>
-  </task>
-  <task driver='ericye'>
-   <title>Improve document scanner</title>
-   <detail>
-    Handle trailing miscellaneous section; premature end of file; use
-    the error reporter; etc.
-   </detail>
-  </task>
-  <task driver='lehors'>
-   <title>Parsing of DOCTYPE line and DTD markup declarations</title>
-  </task>
-  <task driver='jeffreyr'>
-   <title>Storing basic DTD grammar information</title>
-  </task>
- </milestone>
- <milestone id='M3'>
-  <title>Parser with DTD scanning + datatypes and content model validation</title>
-  <depends idref='M2'/>
-  <task driver='andyc'>
-   <title>Ever more documentation</title>
-   <detail>
-    Document parser configurations and how new components and 
-    configurations would be written and connected.
-   </detail>
-  </task>
-  <task driver='jeffreyr'>
-   <title>Datatype validators</title>
-   <detail>
-    Only those datatype validators needed for DTD grammars need to be
-    added. All DTD datatypes should work: CDATA, ENTITY, ENTITIES, ID,
-    IDREF, IDREFS, NMTOKEN, NMTOKENS, and NOTATION.
-   </detail>
-  </task>
-  <task driver='ericye'>
-   <title>Content model validators</title>
-   <detail>
-    This affects the following classes: 
-    SimpleContentModel, MixedContentModel, DFAContentModel.
-   </detail>
-  </task>
- </milestone>
- <milestone id='M4'>
-  <title>Parser with DTD scanning and Schema parsing + validation</title>
-  <depends idref='M3'/>
-  <task driver='lehors'>
-   <title>DOM implementation</title>
-   <detail>
-    Write the DOMParser to populate the DOM tree. Decide what should
-    be done with the "deferred" DOM implementation.
-   </detail>
-  </task>
-  <task driver='ericye'>
-   <title>Schema structures updated to current spec (22 Sep 2000)</title>
-   <detail>Can this be done without using the DOM?</detail>
-  </task>
-  <task driver='jeffreyr'>
-   <title>Schema datatypes updated to current spec (22 Sep 2000)</title>
-  </task>
- </milestone>
- <milestone id='M666'>
-  <title>Full Schema support</title>
- </milestone>
- <milestone id='M9999'>
-  <title>Party!</title>
- </milestone>
-</schedule>
\ No newline at end of file
diff --git a/design/xml/types-dom.ent b/design/xml/types-dom.ent
deleted file mode 100644
index d3c19c7..0000000
--- a/design/xml/types-dom.ent
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Document Object Model' package='org.w3c.dom'>
- <interface id='dom-document' name='Document'/>
-</category>
diff --git a/design/xml/types-java.ent b/design/xml/types-java.ent
deleted file mode 100644
index 1479c18..0000000
--- a/design/xml/types-java.ent
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Java Language'>
- <class id='java-exception' name='Exception'/>
- <class id='java-object' name='Object'/>
- <class id='java-string' name='String'/>
- <interface id='java-cloneable' name='Cloneable'/>
-</category>
-
-<category name='Java I/O' package='java.io'>
- <class id='java-io-exception' name='IOException'/>
- <class id='java-io-input-stream' name='Inputstream'/>
- <class id='java-io-reader' name='Reader'/>
-</category>
-
-<category name='Java Utils' package='java.util'>
- <class id='java-empty-stack-exception' name='EmptyStackException'/>
- <class id='java-hashtable' name='Hashtable'/>
- <class id='java-locale' name='Locale'/>
- <class id='java-missing-resource-exception' name='MissingResourceException'/>
- <class id='java-stack' name='Stack'/>
- <class id='java-vector' name='Vector'/>
-</category>
diff --git a/design/xml/types-sax.ent b/design/xml/types-sax.ent
deleted file mode 100644
index 0277212..0000000
--- a/design/xml/types-sax.ent
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml encoding='US-ASCII'?>
-<!-- $Id$ -->
-<category name='Simple API for XML' package='org.xml.sax'>
- <class id='sax-exception' name='SAXException'/>
- <class id='sax-input-source' name='InputSource'/>
- <class id='sax-not-recognized-exception' name='SAXNotRecognizedException'/>
- <class id='sax-not-supported-exception' name='SAXNotSupportedException'/>
- <class id='sax-parse-exception' name='SAXParseException'/>
- <interface id='sax-attribute-list' name='AttributeList'/>
- <interface id='sax-attributes' name='Attributes'/>
- <interface id='sax-content-handler' name='ContentHandler'/>
- <interface id='sax-document-handler' name='DocumentHandler'/>
- <interface id='sax-dtd-handler' name='DTDHandler'/>
- <interface id='sax-entity-resolver' name='EntityResolver'/>
- <interface id='sax-error-handler' name='ErrorHandler'/>
- <interface id='sax-locator' name='Locator'>
-  <method name='getPublicId'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  <method name='getSystemId'>
-   <returns>
-    <reference idref='java-string'/>
-   </returns>
-  </method>
-  <method name='getLineNumber'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
-  <method name='getColumnNumber'>
-   <returns>
-    <primitive type='int'/>
-   </returns>
-  </method>
- </interface>
- <interface id='sax-parser' name='Parser'>
-  <method name='parse'>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  <method name='parse'>
-   <param name='inputSource'>
-    <reference idref='sax-input-source'/>
-   </param>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  <method name='setLocale'>
-   <param name='locale'>
-    <reference idref='java-locale'/>
-   </param>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  <method name='setEntityResolver'>
-   <param name='entityResolver'>
-    <reference idref='sax-entity-resolver'/>
-   </param>
-  </method>
-  <method name='setDocumentHandler'>
-   <param name='documentHandler'>
-    <reference idref='sax-document-handler'/>
-   </param>
-  </method>
-  <method name='setDTDHandler'>
-   <param name='dtdHandler'>
-    <reference idref='sax-dtd-handler'/>
-   </param>
-  </method>
-  <method name='setErrorHandler'>
-   <param name='errorHandler'>
-    <reference idref='sax-error-handler'/>
-   </param>
-  </method>
- </interface>
- <interface id='sax-xmlreader' name='XMLReader'>
-  <method name='parse'>
-   <param name='systemId'>
-    <reference idref='java-string'/>
-   </param>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  <method name='parse'>
-   <param name='inputSource'>
-    <reference idref='sax-input-source'/>
-   </param>
-   <throws>
-    <reference idref='java-io-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-exception'/>
-   </throws>
-  </method>
-  <method name='setEntityResolver'>
-   <param name='entityResolver'>
-    <reference idref='sax-entity-resolver'/>
-   </param>
-  </method>
-  <method name='getEntityResolver'>
-   <returns>
-    <reference idref='sax-entity-resolver'/>
-   </returns>
-  </method>
-  <method name='setContentHandler'>
-   <param name='contentHandler'>
-    <reference idref='sax-content-handler'/>
-   </param>
-  </method>
-  <method name='getContentHandler'>
-   <returns>
-    <reference idref='sax-content-handler'/>
-   </returns>
-  </method>
-  <method name='setDTDHandler'>
-   <param name='dtdHandler'>
-    <reference idref='sax-dtd-handler'/>
-   </param>
-  </method>
-  <method name='getDTDHandler'>
-   <returns>
-    <reference idref='sax-dtd-handler'/>
-   </returns>
-  </method>
-  <method name='setErrorHandler'>
-   <param name='errorHandler'>
-    <reference idref='sax-error-handler'/>
-   </param>
-  </method>
-  <method name='getErrorHandler'>
-   <returns>
-    <reference idref='sax-error-handler'/>
-   </returns>
-  </method>
-  <method name='setFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='state'>
-    <primitive type='boolean'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  <method name='getFeature'>
-   <param name='featureId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <primitive type='boolean'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  <method name='setProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <param name='value'>
-    <reference idref='java-object'/>
-   </param>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
-  <method name='getProperty'>
-   <param name='propertyId'>
-    <reference idref='java-string'/>
-   </param>
-   <returns>
-    <reference idref='java-object'/>
-   </returns>
-   <throws>
-    <reference idref='sax-not-recognized-exception'/>
-   </throws>
-   <throws>
-    <reference idref='sax-not-supported-exception'/>
-   </throws>
-  </method>
- </interface>
-</category>
diff --git a/design/xsl/design.xsl b/design/xsl/design.xsl
deleted file mode 100644
index 6a1d410..0000000
--- a/design/xsl/design.xsl
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-
- <xsl:template match='design'>
-  <HTML>
-   <HEAD>
-    <TITLE>Xerces 2 | Design</TITLE>
-    <LINK rel='stylesheet' type='text/css' href='css/index.css'/>
-    <LINK rel='stylesheet' type='text/css' href='css/design.css'/>
-   </HEAD>
-   <BODY>
-    <H1 align='center'>
-     <xsl:value-of select='@name'/>
-     <xsl:text> </xsl:text>
-     Design
-    </H1>
-    <H2>Classes and Interfaces</H2>
-    <xsl:for-each select='category'>
-     <xsl:apply-templates select='.'/>
-    </xsl:for-each>
-    Last modified: <xsl:value-of select='@date'/>
-   </BODY>
-  </HTML>
- </xsl:template>
-
- <xsl:template match='category'>
-  <H3><xsl:value-of select='@name'/></H3>
-  <xsl:for-each select='class|interface'>
-   <BLOCKQUOTE>
-    <xsl:apply-templates select='.'/>
-   </BLOCKQUOTE>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template match='class|interface'>
-  <A name='{@name}'>
-  <DL class='{name()}'>
-   <DT>
-    <xsl:value-of select='name()'/>
-    <xsl:text> </xsl:text>
-    <SPAN class='{name()}-title'>
-     <xsl:value-of select='@name'/>
-    </SPAN>
-   </DT>
-   <xsl:if test='extends'>
-    <DD class='extends'>
-     extends
-     <xsl:for-each select='extends'>
-      <xsl:call-template name='type'/>
-     </xsl:for-each>
-    </DD>
-   </xsl:if>
-   <xsl:if test='implements'>
-    <DD class='implements'>
-     implements
-     <xsl:for-each select='implements'>
-      <xsl:call-template name='type'/>
-      <xsl:if test='not(position()=last())'>
-       <xsl:text>, </xsl:text>
-      </xsl:if>
-     </xsl:for-each>
-    </DD>
-   </xsl:if>
-   <xsl:if test='constant'>
-    <DD class='constants'>
-     constants:
-     <UL>
-      <xsl:for-each select='constant'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='field'>
-    <DD class='fields'>
-     fields:
-     <UL>
-      <xsl:for-each select='field'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='constructor'>
-    <DD class='constructors'>
-     constructors:
-     <UL>
-      <xsl:for-each select='constructor'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='method'>
-    <DD class='methods'>
-     methods:
-     <UL>
-      <xsl:for-each select='method'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-  </DL>
-  </A>
- </xsl:template>
-
- <xsl:template match='constant|field|param'>
-  <!--
-  <xsl:if test='not(name()="param") and not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <xsl:call-template name='type'/>
-  <xsl:text> </xsl:text>
-  <SPAN class='{name()}-title'>
-   <xsl:value-of select='@name'/>
-  </SPAN>
- </xsl:template>
-
- <xsl:template match='constructor'>
-  <!--
-  <xsl:if test='not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <SPAN class='constructor-title'>
-   <xsl:value-of select='../@name'/>
-  </SPAN>
-  (
-  <xsl:for-each select='param'>
-   <xsl:apply-templates select='.'/>
-   <xsl:if test='not(position()=last())'>
-    <xsl:text>, </xsl:text>
-   </xsl:if>
-  </xsl:for-each>
-  )
- </xsl:template>
-
- <xsl:template match='method'>
-  <!--
-  <xsl:if test='not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <SPAN class='method-title'>
-   <xsl:value-of select='@name'/>
-  </SPAN>
-  (
-  <xsl:for-each select='param'>
-   <xsl:apply-templates select='.'/>
-   <xsl:if test='not(position()=last())'>
-    <xsl:text>, </xsl:text>
-   </xsl:if>
-  </xsl:for-each>
-  )
-  <xsl:for-each select='returns'>
-   :
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template name='type'>
-  <xsl:apply-templates select='array|primitive|reference|collection'/>
- </xsl:template>
-
- <xsl:template match='array'>
-  <xsl:call-template name='type'/>[]
- </xsl:template>
-
- <xsl:template match='primitive'>
-  <xsl:value-of select='@type'/>
- </xsl:template>
-
- <xsl:template match='union'>
-  <xsl:for-each select='part'>
-   <xsl:apply-templates select='.'/>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template match='reference'>
-  <xsl:choose>
-   <xsl:when test='id(@idref)[name()="interface"]'>
-    <SPAN class='interface-title'>
-     <xsl:value-of select='id(@idref)/@name'/>
-    </SPAN>
-   </xsl:when>
-   <xsl:otherwise>
-    <SPAN class='class-title'>
-     <xsl:value-of select='id(@idref)/@name'/>
-    </SPAN>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match='collection'>
-  <xsl:for-each select='collector'>
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
-  &lt;
-  <xsl:for-each select='items'>
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
-  &gt;
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/design/xsl/issues.xsl b/design/xsl/issues.xsl
deleted file mode 100644
index c3c45f3..0000000
--- a/design/xsl/issues.xsl
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
- <xsl:template match='issues'>
-  <HTML>
-   <HEAD>
-    <TITLE>Xerces 2 | Issues</TITLE>
-    <LINK rel='stylesheet' type='text/css' href='css/site.css'/>
-   </HEAD>
-   <BODY>
-    <SPAN class='netscape'>
-    <A name='TOP'/>
-    <H1>Implementation Issues</H1>
-    <xsl:choose>
-     <xsl:when test='issue'>
-      <xsl:if test='issue[@status="open"]'>
-       <A name='{@status}'/>
-       <H2>Open Issues</H2>
-       <xsl:for-each select='issue[@status="open"]'>
-        <xsl:apply-templates select='.'/>
-       </xsl:for-each>
-      </xsl:if>
-      <xsl:if test='issue[@status="deferred"]'>
-       <A name='{@status}'/>
-       <H2>Deferred Issues</H2>
-       <xsl:for-each select='issue[@status="deferred"]'>
-        <xsl:apply-templates select='.'/>
-       </xsl:for-each>
-      </xsl:if>
-      <xsl:if test='issue[@status="closed"]'>
-       <A name='{@status}'/>
-       <H2>Closed Issues</H2>
-       <xsl:for-each select='issue[@status="closed"]'>
-        <xsl:apply-templates select='.'/>
-       </xsl:for-each>
-      </xsl:if>
-      <xsl:if test='issue[@status="rejected"]'>
-       <A name='{@status}'/>
-       <H2>Rejected Issues</H2>
-       <xsl:for-each select='issue[@status="rejected"]'>
-        <xsl:apply-templates select='.'/>
-       </xsl:for-each>
-      </xsl:if>
-     </xsl:when>
-     <xsl:otherwise>
-      <H2><EM>There are currently no issues.</EM></H2>
-     </xsl:otherwise>
-    </xsl:choose>
-    </SPAN>
-    <A name='BOTTOM'/>
-    <HR/>
-    <SPAN class='netscape'>
-     Last updated on <xsl:value-of select='@date'/>
-    </SPAN>
-   </BODY>
-  </HTML>
- </xsl:template>
-
- <xsl:template match='issue'>
-  <A name='{@id}'/>
-  <H3>
-   <xsl:value-of select='title'/>
-   (<xsl:value-of select='@id'/>)
-  </H3>
-  <P>
-   <TABLE border='0' cellspacing='5'>
-    <TR>
-     <TH>Originator:</TH>
-     <TD><xsl:apply-templates select='@originator'/></TD>
-    </TR>
-    <xsl:if test='@owner'>
-     <TH>Owner:</TH>
-     <TD><xsl:apply-templates select='@owner'/></TD>
-    </xsl:if>
-    <xsl:if test='detail'>
-     <TR>
-      <TH>Details:</TH>
-      <TD><xsl:apply-templates select='detail'/></TD>
-     </TR>
-    </xsl:if>
-    <xsl:for-each select='problem'>
-     <TR>
-      <TH>Problem:</TH>
-      <TD>
-       <xsl:apply-templates select='detail'/>
-       <xsl:for-each select='comment'>
-        <BR/>
-        <STRONG>Comment: </STRONG>
-        <xsl:value-of select='.'/>
-       </xsl:for-each>
-       <xsl:if test='resolution'>
-        <BR/>
-        <STRONG>Resolution: </STRONG>
-        <xsl:value-of select='resolution'/>
-       </xsl:if>
-      </TD>
-     </TR>
-    </xsl:for-each>
-    <xsl:for-each select='comment'>
-     <TR>
-      <TH>Comment:</TH>
-      <TD>
-       <STRONG><xsl:apply-templates select='@author'/>: </STRONG>
-       <xsl:if test='@link'>
-        [<A href='{@link}'>link</A>]
-       </xsl:if>
-       <BLOCKQUOTE>
-        <xsl:apply-templates select='.'/>
-       </BLOCKQUOTE>
-      </TD>
-     </TR>
-    </xsl:for-each>
-   </TABLE>
-  </P>
- </xsl:template>
-
- <xsl:template match='@author|@originator|@owner'>
-  <xsl:choose>
-   <xsl:when test='id(.)/@email'>
-    <A href='mailto:{id(.)/@email}'>
-     <xsl:value-of select='id(.)'/>
-    </A>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:value-of select='id(.)'/>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/design/xsl/schedule.xsl b/design/xsl/schedule.xsl
deleted file mode 100644
index 76691fc..0000000
--- a/design/xsl/schedule.xsl
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-
- <xsl:template match='schedule'>
-  <HTML>
-   <HEAD>
-    <TITLE>Xerces 2 | Schedule</TITLE>
-    <LINK rel='stylesheet' type='text/css' href='css/site.css'/>
-    <STYLE type='text/css'>
-     .note { font-size: smaller }
-    </STYLE>
-   </HEAD>
-   <BODY>
-    <SPAN class='netscape'>
-    <H1>Xerces 2 Schedule</H1>
-    <xsl:if test='milestone[task/@status="working" or task/@status="verify"]'>
-     <H2>Current Milestones</H2>
-     <xsl:for-each select='milestone[task/@status="working" or task/@status="verify"]'>
-      <xsl:apply-templates select='.'/>
-     </xsl:for-each>
-    </xsl:if>
-    <xsl:if test='milestone[not(task)]'>
-     <H2>Future Milestones</H2>
-     <xsl:for-each select='milestone[not(task)]'>
-      <xsl:apply-templates select='.'/>
-     </xsl:for-each>
-    </xsl:if>
-    <xsl:if test='milestone[task and not(task/@status="working" or task/@status="verify")]'>
-     <H2>Completed Milestones</H2>
-     <xsl:for-each select='milestone[task and not(task/@status="working" or task/@status="verify")]'>
-      <xsl:apply-templates select='.'/>
-     </xsl:for-each>
-    </xsl:if>
-    </SPAN>
-    <HR/>
-    <SPAN class='netscape'>
-     Last modified: <xsl:value-of select='@date'/>
-    </SPAN>
-   </BODY>
-  </HTML>
- </xsl:template>
-
- <xsl:template match='milestone'>
-  <A name='{@id}'/>
-  <H3>
-   <xsl:value-of select='title'/>
-   (<xsl:value-of select='@id'/>)
-  </H3>
-  <P>
-   <TABLE border='0'>
-    <xsl:if test='@date'>
-     <TR>
-      <TH>Date:</TH>
-      <TD><xsl:value-of select='@date'/></TD>
-     </TR>
-    </xsl:if>
-    <xsl:if test='depends'>
-     <TR>
-      <TH>Depends:</TH>
-      <TD>
-       <xsl:for-each select='depends'>
-        <A href='#{@idref}'><xsl:value-of select='@idref'/></A>
-        <xsl:if test='not(position()=last())'>, </xsl:if>
-       </xsl:for-each>
-      </TD>
-     </TR>
-    </xsl:if>
-    <xsl:for-each select='task'>
-     <TR>
-      <TH>Task:</TH>
-      <TD>
-       <xsl:value-of select='title'/>
-       <SPAN class='note'>
-       <xsl:if test='detail'>
-        <BR/>
-        <xsl:value-of select='detail'/>
-       </xsl:if>
-       <!--
-       <xsl:if test='not(@status="working")'>
-        <BR/>
-        <STRONG>Status:</STRONG>
-        <xsl:text> </xsl:text>
-        <xsl:value-of select='@status'/>
-       </xsl:if>
-       -->
-       <xsl:if test='@driver'>
-	<BR/>
-        <STRONG>Driver:</STRONG> 
-	<xsl:choose>
-	 <xsl:when test='id(@driver)/@email'>
-	  <A href='mailto:{id(@driver)/@email}'><xsl:value-of select='id(@driver)'/></A>
-	 </xsl:when>
-	 <xsl:otherwise>
-	  <xsl:value-of select='id(@driver)'/>
-	 </xsl:otherwise>
-	</xsl:choose>
-       </xsl:if>
-       <BR/>
-       <STRONG>Contributors:</STRONG>
-       <xsl:choose>
-        <xsl:when test='contributor'>
-         <xsl:for-each select='contributor'>
-          <xsl:choose>
-           <xsl:when test='id(@idref)/@email'>
-            <A href='mailto:{id(@idref)/@email}'><xsl:value-of select='id(@idref)'/></A>
-           </xsl:when>
-           <xsl:otherwise>
-            <xsl:value-of select='id(@idref)'/>
-           </xsl:otherwise>
-          </xsl:choose>
-          <xsl:if test='not(position()=last())'>, </xsl:if>
-         </xsl:for-each>
-	 - <EM>Contact task driver to contribute.</EM>
-        </xsl:when>
-        <xsl:otherwise>
-         <EM>Contributors wanted! Contact task driver to contribute.</EM>
-        </xsl:otherwise>
-       </xsl:choose>
-       </SPAN>
-      </TD>
-     </TR>
-    </xsl:for-each>
-   </TABLE>
-  </P>
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/api.xml b/docs/api.xml
deleted file mode 100644
index ac4afeb..0000000
--- a/docs/api.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='API JavaDoc'>
- <s2 title='Standard API Documentation'>
-  <p>
-   Always try to use only the standard XML APIs when writing
-   XML applications. This will keep your application shielded
-   from changes in the underlying implementation of those
-   standard APIs and also gives you more flexibility to change
-   the implementation of the standard pieces without modifying
-   your application code.
-  </p>
-  <ul>
-   <li><jump href='javadocs/api/index.html'>Standard API</jump></li>
-   <ul>
-    <li>Java API for XML Processing (JAXP)</li>
-    <ul>
-     <li>
-      <jump href='javadocs/api/javax/xml/parsers/package-summary.html'>XML
-      Parser Factories</jump>
-     </li>
-    </ul>
-    <li>Document Object Model (DOM)</li>
-    <ul>
-     <li>
-      <jump href='javadocs/api/org/w3c/dom/package-summary.html'>Core</jump>
-     </li>
-     <li>
-      <jump href='javadocs/api/org/w3c/dom/events/package-summary.html'>Events</jump>
-     </li>
-     <li>
-      <jump href='javadocs/api/org/w3c/dom/html/package-summary.html'>HTML</jump>
-     </li>
-     <li>
-      <jump href='javadocs/api/org/w3c/dom/ranges/package-summary.html'>Ranges</jump>
-     </li>
-     <li>
-      <jump href='javadocs/api/org/w3c/dom/traversal/package-summary.html'>Traversal</jump>
-     </li>
-    </ul>
-    <li>Simple API for XML (SAX)</li>
-    <ul>
-     <li>
-      <jump href='javadocs/api/org/xml/sax/package-summary.html'>Core</jump>
-     </li>
-     <li>
-      <jump href='javadocs/api/org/xml/sax/helpers/package-summary.html'>Helper Classes</jump>
-     </li>
-     <li>
-      <jump href='javadocs/api/org/xml/sax/ext/package-summary.html'>Extensions</jump>
-     </li>
-    </ul>
-   </ul>
-  </ul>
- </s2>
- <s2 title='Xerces Native Interface Documentation'>
-  <p>
-   If you need functionality that is not available in the 
-   standard APIs like DOM and SAX, then perhaps using the Xerces
-   Native Interface (XNI) will provide the information to build
-   the appropriate parsing tools for your application. For more
-   detailed information regarding XNI, refer to the 
-   <link idref='xni'>XNI Manual</link>.
-  </p>
-  <ul>
-   <li>
-    <jump href='javadocs/xni/index.html'>Xerces Native Interface</jump>
-   </li>
-   <ul>
-    <li>
-     <jump href='javadocs/xni/org/apache/xerces/xni/package-summary.html'>Core</jump>
-    </li>
-    <li>
-     <jump href='javadocs/xni/org/apache/xerces/xni/parser/package-summary.html'>Parser
-     Configuration</jump>
-    </li>
-    <li>
-     <jump href='javadocs/xni/org/apache/xerces/xni/psvi/package-summary.html'>PSVI interfaces</jump>
-    </li>
-   </ul>
-  </ul>
- </s2>
-<s2 title='DOM Level 3 API'>
-  <p>Includes DOM Level 3 Working Draft APIs:</p>
-  <ul>
-    <li><jump href="http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025/">Abstract Schema and Load and Save</jump>
-    </li>
-    <li><jump href="http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010913/">DOM Level 3 Core</jump>
-    </li>
-   </ul>
-  <p>
-  Those APIs are unstable and may change:
-  <jump href='javadocs/dom3-api/index.html'>org.apache.xerces.dom3</jump> 
-</p>
-</s2>
- <s2 title='Xerces2 Implementation Documentation'>
-  <p>
-   For maintainers and developers of the Xerces2 reference
-   implementation, it's important to know the internal APIs
-   used.
-  </p>
-  <ul>
-   <li>
-    <jump href='javadocs/xerces2/index.html'>Xerces2 Implementation</jump>
-   </li>
-  </ul>
- </s2>
- <s2 title='Other Classes Documentation'>
-  <p>
-   The Xerces2 package also contains other implementation classes.
-   You can jump to the API for these classes via the following links:
-  </p>
-  <ul>
-   <li><jump href='javadocs/other/index.html'>Other Classes</jump></li>
-  </ul>
- </s2>
-</s1>
\ No newline at end of file
diff --git a/docs/docs-book.xml b/docs/docs-book.xml
deleted file mode 100644
index f4c650b..0000000
--- a/docs/docs-book.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE book SYSTEM 'dtd/book.dtd'>
-<book title='&ParserName; Documentation' 
-      copyright='1999-2001 The Apache Software Foundation'>
- <external label='Home' href='http://xml.apache.org/'/>
- <separator/>
- <document label='Readme' title='&ParserNameLong; Readme'
-           id='index' source='readme.xml'/>
- <document label='Installation' title='Installation Instructions'
-           id='install' source='install.xml'/>
- <external label='Download' href='http://xml.apache.org/dist/xerces-j/'/>
- <external label='CVS Repository'
-           href='http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/java/'/>
- <separator/>
- <document label='Samples' title='Sample Programs'
-           id='samples' source='samples.xml'/>
- <hidden title='DOM Samples' id='samples-dom' source='samples-dom.xml'/>
- <hidden title='SAX Samples' id='samples-sax' source='samples-sax.xml'/>
- <hidden title='Socket Samples' id='samples-socket' source='samples-socket.xml'/>
- <hidden title='User Interface Samples'
-         id='samples-ui' source='samples-ui.xml'/>
- <hidden title='XNI Samples' id='samples-xni' source='samples-xni.xml'/>
- <document label='API JavaDoc' title='API JavaDoc'
-           id='api' source='api.xml'/>
- <!--
- <external label='API JavaDoc' href='apiDocs/index.html'/>
- -->
- <document label='XNI Manual' title='Xerces Native Interface'
-           id='xni' source='xni.xml'/>
- <hidden title='XNI Design Details' 
-         id='xni-design' source='xni-design.xml'/>
- <hidden title='XNI Core Interfaces' 
-         id='xni-core' source='xni-core.xml'/>
- <hidden title='XNI Parser Configuration'
-         id='xni-config' source='xni-config.xml'/>
- <hidden title='Xerces2 Components' id='xni-xerces2' source='xni-xerces2.xml'/>
- <faqs label='FAQs' title='Frequently Asked Questions' id='faqs'>
-  <faq title='Common FAQs' id='faq-common' source='faq-common.xml'/>
-  <faq title='General FAQs' id='faq-general' source='faq-general.xml'/>
-  <faq title='Parser Configuration, Features and Properties FAQs' id='faq-pcfp' source='faq-pcfp.xml'/>
-  <faq title='Building and Running FAQs' 
-       id='faq-build' source='faq-build.xml'/>
-  <faq title='Writing Applications FAQs' 
-       id='faq-write' source='faq-write.xml'/>
-  <faq title='Performance FAQs' 
-       id='faq-performance' source='faq-performance.xml'/>
- </faqs>
- <separator/>
- <settings title='Parser Features' label='Features' 
-           id='features' source='features.xml'/>
- <settings title='Parser Properties' label='Properties' 
-           id='properties' source='properties.xml'/>
- <separator/>
- <releases label='Release Info' title='Release Information'
-           id='releases' source='releases.xml'/>
- <document label='Limitations' title='Parser Limitations'
-           id='limitations' source='limitations.xml'/>
- <hidden   title='Schema Implementation Limitations' id='limitations-schema' source='limitations-schema.xml'/>
- <hidden   title='DOM Level 3 Implementation' id='dom3' source='dom3.xml'/>
- <external label='Report a Bug' 
-           href='http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Xerces2-J'/>
-</book>
diff --git a/docs/dom3.xml b/docs/dom3.xml
deleted file mode 100644
index 51c29a2..0000000
--- a/docs/dom3.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE s1 SYSTEM
-"./dtd/document.dtd">
-<s1 title="Document Object Model Level 3 Implementation">
-<s2 title="Disclaimer">
-<p>
-The &ParserNameLong; &ParserVersion;  contains a partial implementation of the W3C Document Object Model 
-Level 3.  This implementation is experimental.  The DOM Level 3 specification is 
-still in working draft stage: you should not consider this implementation complete or correct.  The limitations of this implementation are detailed below. Please read this document before using this package.  
-</p>
-</s2> 
-<s2 title="Introduction">
-<p>
-The &ParserNameLong; &ParserVersion; contains an implementation of a subset of the W3C DOM Level 3 as 
-specified in <jump
-href="http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010913/">Core</jump>, <jump
-href="http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025/abstract-schemas.html">Abstract 
-Schemas</jump> and <jump
-href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025/load-save.html'>Load 
-and Save</jump>.  
-</p>
-<note>DOM Level 3 interfaces are located in org.apache.xerces.dom3 package</note>
-</s2>
-
-<s2 title='Implementation of DOM Level 3 Core'>
-<ul>
-    <li>
-        DOMImplementationRegistry (see DOMImplementationSource)
-    </li>
-    <li>
-        DOMImplementationRegistry (DOMImplementationSource really)
-    </li>
-    <li>
-        Node.isSameNode()
-    </li>
-    <li>
-        Node.getInterface()
-    </li>
-    <li>
-        Node.set/getUserData()
-    </li>
-    <li>
-        DOMErrorHandler, DOMError, DOMLocator
-    </li>
-</ul>
-</s2> <s2 title='Implementation of DOM Level 3 Load and Save'>
-<ul>
-    <li>
-        DOMBuilder - supports all required features. Does not provide implementation to 
-        parseWithContext() and DOMBuilderFilter
-    </li>
-    <li>
-        DOMWriter - supports all required features. Provides support for "format-pretty-print 
-         " (true)
-    </li>
-    <li>
-        DOMInputSource
-    </li>
-    <li>
-        DocumentLS
-    </li>
-    <li>
-        DOMImplementationLS
-    </li>
-</ul>
-</s2> <s2 title='Implementation of DOM Level 3 Abstract Schemas'>
-<ul>
-    <li>
-        DOMImplementationAS
-    </li>
-    <li>
-        DOMASBuilder that allows to preparse XML Schemas and set those on the parser.
-    </li>
-</ul>
-<note>
-DOMASBuilder only allows pre-parsing of XML Schemas. The parser provides a partial implementation for <code>ASModel</code> so that it can serve as a containter for several grammars. For more information, see dom.ASBuilder sample.
-</note>
-</s2></s1>
diff --git a/docs/dtd/blocks.ent b/docs/dtd/blocks.ent
deleted file mode 100644
index 8d46f87..0000000
--- a/docs/dtd/blocks.ent
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml encoding='UTF-8'?>
-
-<!-- BLOCKS ENTITY -->
-<!ENTITY % blocks "p|note|ul|ol|gloss|table|source|anchor">
-
-<!-- import the external markup.ent dtd -->
-<!ENTITY % markupEntity SYSTEM "markup.ent">
-%markupEntity;
-
-<!ENTITY % content "(#PCDATA|%markup;|%links;)*">
-
-<!ELEMENT p %content;>
-<!ELEMENT note %content;>
-
-<!ELEMENT ul (li|ol|ul)+>
-<!ELEMENT ol (li|ol|ul)+>
-<!ELEMENT li %content;>
-
-<!ELEMENT gloss (label|item)+>
-<!ELEMENT label %content;>
-<!ELEMENT item %content;>
-
-<!ELEMENT source (#PCDATA|link)*>
-
-<!ELEMENT table (tr)+>
-
-<!ELEMENT tr (tn|th|td)+>
-
-<!ELEMENT tn EMPTY>
-<!ATTLIST tn colspan CDATA "1"
-             rowspan CDATA "1">
-
-<!ELEMENT th %content;>
-<!ATTLIST th colspan CDATA "1"
-             rowspan CDATA "1">
-
-<!ELEMENT td %content;>
-<!ATTLIST td colspan CDATA "1"
-             rowspan CDATA "1">
-             
\ No newline at end of file
diff --git a/docs/dtd/book.dtd b/docs/dtd/book.dtd
deleted file mode 100644
index 09fd356..0000000
--- a/docs/dtd/book.dtd
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml encoding='UTF-8'?>
-
-<!-- STYLEBOOK BOOK DTD -->
-
-<!-- import the external source-specific dtd -->
-<!ENTITY % externalEntity SYSTEM "entities.ent">
-%externalEntity;
-
-<!ELEMENT book (resources?|document|hidden|faqs|releases|
-                external|separator|settings|design)+>
-<!ATTLIST book title     CDATA #REQUIRED
-               copyright CDATA #IMPLIED>
-               
-<!ELEMENT resources EMPTY>
-<!ATTLIST resources source CDATA #REQUIRED>
-
-<!ELEMENT document EMPTY>
-<!ATTLIST document label  CDATA #REQUIRED
-                   title  CDATA #REQUIRED
-                   id     ID    #REQUIRED
-                   source CDATA #REQUIRED>
-
-<!ELEMENT hidden EMPTY>
-<!ATTLIST hidden title  CDATA #REQUIRED
-                 id     ID    #REQUIRED
-                 source CDATA #REQUIRED>
-
-<!ELEMENT faqs (faq+)>
-<!ATTLIST faqs label CDATA #REQUIRED
-               title CDATA #REQUIRED
-	       id    ID    #IMPLIED>
-
-<!ELEMENT faq EMPTY>
-<!ATTLIST faq title  CDATA #REQUIRED
-              id     ID    #REQUIRED
-              source CDATA #REQUIRED>
-
-<!ELEMENT releases EMPTY>
-<!ATTLIST releases label  CDATA #REQUIRED
-                   title  CDATA #REQUIRED
-                   id     ID    #REQUIRED
-                   source CDATA #REQUIRED>
-
-<!ELEMENT external EMPTY>
-<!ATTLIST external label CDATA #REQUIRED
-                   href  CDATA #REQUIRED>
-                   
-<!ELEMENT separator EMPTY>
-
-<!ELEMENT settings EMPTY>
-<!ATTLIST settings label  CDATA #REQUIRED
-                   title  CDATA #REQUIRED
-                   id     ID    #REQUIRED
-                   source CDATA #REQUIRED>
-		   
-<!ELEMENT design EMPTY>
-<!ATTLIST design title  CDATA #REQUIRED
-                 id     ID    #REQUIRED
-                 source	CDATA #REQUIRED>
-
-<!-- CVS $Revision$ $Date$ -->
diff --git a/docs/dtd/characters.ent b/docs/dtd/characters.ent
deleted file mode 100644
index 080eeed..0000000
--- a/docs/dtd/characters.ent
+++ /dev/null
@@ -1,297 +0,0 @@
-<?xml encoding='UTF-8'?>
-
-<!-- CHARACTERS ENTITY -->
-
-<!-- Latin A -->
-<!ENTITY nbsp     "&#160;">  <!-- U+00A0 ISOnum    - no-break space = non-breaking space                                   -->
-<!ENTITY iexcl    "&#161;">  <!-- U+00A1 ISOnum    - inverted exclamation mark                                             -->
-<!ENTITY cent     "&#162;">  <!-- U+00A2 ISOnum    - cent sign                                                             -->
-<!ENTITY pound    "&#163;">  <!-- U+00A3 ISOnum    - pound sign                                                            -->
-<!ENTITY curren   "&#164;">  <!-- U+00A4 ISOnum    - currency sign                                                         -->
-<!ENTITY yen      "&#165;">  <!-- U+00A5 ISOnum    - yen sign = yuan sign                                                  -->
-<!ENTITY brvbar   "&#166;">  <!-- U+00A6 ISOnum    - broken bar = broken vertical bar                                      -->
-<!ENTITY sect     "&#167;">  <!-- U+00A7 ISOnum    - section sign                                                          -->
-<!ENTITY uml      "&#168;">  <!-- U+00A8 ISOdia    - diaeresis = spacing diaeresis                                         -->
-<!ENTITY copy     "&#169;">  <!-- U+00A9 ISOnum    - copyright sign                                                        -->
-<!ENTITY ordf     "&#170;">  <!-- U+00AA ISOnum    - feminine ordinal indicator                                            -->
-<!ENTITY laquo    "&#171;">  <!-- U+00AB ISOnum    - left-pointing double angle quotation mark = left pointing guillemet   -->
-<!ENTITY not      "&#172;">  <!-- U+00AC ISOnum    - not sign                                                              -->
-<!ENTITY shy      "&#173;">  <!-- U+00AD ISOnum    - soft hyphen = discretionary hyphen                                    -->
-<!ENTITY reg      "&#174;">  <!-- U+00AE ISOnum    - registered sign = registered trade mark sign                          -->
-<!ENTITY macr     "&#175;">  <!-- U+00AF ISOdia    - macron = spacing macron = overline = APL overbar                      -->
-<!ENTITY deg      "&#176;">  <!-- U+00B0 ISOnum    - degree sign                                                           -->
-<!ENTITY plusmn   "&#177;">  <!-- U+00B1 ISOnum    - plus-minus sign = plus-or-minus sign                                  -->
-<!ENTITY sup2     "&#178;">  <!-- U+00B2 ISOnum    - superscript two = superscript digit two = squared                     -->
-<!ENTITY sup3     "&#179;">  <!-- U+00B3 ISOnum    - superscript three = superscript digit three = cubed                   -->
-<!ENTITY acute    "&#180;">  <!-- U+00B4 ISOdia    - acute accent = spacing acute                                          -->
-<!ENTITY micro    "&#181;">  <!-- U+00B5 ISOnum    - micro sign                                                            -->
-<!ENTITY para     "&#182;">  <!-- U+00B6 ISOnum    - pilcrow sign = paragraph sign                                         -->
-<!ENTITY middot   "&#183;">  <!-- U+00B7 ISOnum    - middle dot = Georgian comma = Greek middle dot                        -->
-<!ENTITY cedil    "&#184;">  <!-- U+00B8 ISOdia    - cedilla = spacing cedilla                                             -->
-<!ENTITY sup1     "&#185;">  <!-- U+00B9 ISOnum    - superscript one = superscript digit one                               -->
-<!ENTITY ordm     "&#186;">  <!-- U+00BA ISOnum    - masculine ordinal indicator                                           -->
-<!ENTITY raquo    "&#187;">  <!-- U+00BB ISOnum    - right-pointing double angle quotation mark = right pointing guillemet -->
-<!ENTITY frac14   "&#188;">  <!-- U+00BC ISOnum    - vulgar fraction one quarter = fraction one quarter                    -->
-<!ENTITY frac12   "&#189;">  <!-- U+00BD ISOnum    - vulgar fraction one half = fraction one half                          -->
-<!ENTITY frac34   "&#190;">  <!-- U+00BE ISOnum    - vulgar fraction three quarters = fraction three quarters              -->
-<!ENTITY iquest   "&#191;">  <!-- U+00BF ISOnum    - inverted question mark = turned question mark                         -->
-<!ENTITY Agrave   "&#192;">  <!-- U+00C0 ISOlat1   - latin capital letter A with grave = latin capital letter A grave      -->
-<!ENTITY Aacute   "&#193;">  <!-- U+00C1 ISOlat1   - latin capital letter A with acute                                     -->
-<!ENTITY Acirc    "&#194;">  <!-- U+00C2 ISOlat1   - latin capital letter A with circumflex                                -->
-<!ENTITY Atilde   "&#195;">  <!-- U+00C3 ISOlat1   - latin capital letter A with tilde                                     -->
-<!ENTITY Auml     "&#196;">  <!-- U+00C4 ISOlat1   - latin capital letter A with diaeresis                                 -->
-<!ENTITY Aring    "&#197;">  <!-- U+00C5 ISOlat1   - latin capital letter A with ring above = latin capital letter A ring  -->
-<!ENTITY AElig    "&#198;">  <!-- U+00C6 ISOlat1   - latin capital letter AE = latin capital ligature AE                   -->
-<!ENTITY Ccedil   "&#199;">  <!-- U+00C7 ISOlat1   - latin capital letter C with cedilla                                   -->
-<!ENTITY Egrave   "&#200;">  <!-- U+00C8 ISOlat1   - latin capital letter E with grave                                     -->
-<!ENTITY Eacute   "&#201;">  <!-- U+00C9 ISOlat1   - latin capital letter E with acute                                     -->
-<!ENTITY Ecirc    "&#202;">  <!-- U+00CA ISOlat1   - latin capital letter E with circumflex                                -->
-<!ENTITY Euml     "&#203;">  <!-- U+00CB ISOlat1   - latin capital letter E with diaeresis                                 -->
-<!ENTITY Igrave   "&#204;">  <!-- U+00CC ISOlat1   - latin capital letter I with grave                                     -->
-<!ENTITY Iacute   "&#205;">  <!-- U+00CD ISOlat1   - latin capital letter I with acute                                     -->
-<!ENTITY Icirc    "&#206;">  <!-- U+00CE ISOlat1   - latin capital letter I with circumflex                                -->
-<!ENTITY Iuml     "&#207;">  <!-- U+00CF ISOlat1   - latin capital letter I with diaeresis                                 -->
-<!ENTITY ETH      "&#208;">  <!-- U+00D0 ISOlat1   - latin capital letter ETH                                              -->
-<!ENTITY Ntilde   "&#209;">  <!-- U+00D1 ISOlat1   - latin capital letter N with tilde                                     -->
-<!ENTITY Ograve   "&#210;">  <!-- U+00D2 ISOlat1   - latin capital letter O with grave                                     -->
-<!ENTITY Oacute   "&#211;">  <!-- U+00D3 ISOlat1   - latin capital letter O with acute                                     -->
-<!ENTITY Ocirc    "&#212;">  <!-- U+00D4 ISOlat1   - latin capital letter O with circumflex                                -->
-<!ENTITY Otilde   "&#213;">  <!-- U+00D5 ISOlat1   - latin capital letter O with tilde                                     -->
-<!ENTITY Ouml     "&#214;">  <!-- U+00D6 ISOlat1   - latin capital letter O with diaeresis                                 -->
-<!ENTITY times    "&#215;">  <!-- U+00D7 ISOnum    - multiplication sign                                                   -->
-<!ENTITY Oslash   "&#216;">  <!-- U+00D8 ISOlat1   - latin capital letter O with stroke = latin capital letter O slash     -->
-<!ENTITY Ugrave   "&#217;">  <!-- U+00D9 ISOlat1   - latin capital letter U with grave                                     -->
-<!ENTITY Uacute   "&#218;">  <!-- U+00DA ISOlat1   - latin capital letter U with acute                                     -->
-<!ENTITY Ucirc    "&#219;">  <!-- U+00DB ISOlat1   - latin capital letter U with circumflex                                -->
-<!ENTITY Uuml     "&#220;">  <!-- U+00DC ISOlat1   - latin capital letter U with diaeresis                                 -->
-<!ENTITY Yacute   "&#221;">  <!-- U+00DD ISOlat1   - latin capital letter Y with acute                                     -->
-<!ENTITY THORN    "&#222;">  <!-- U+00DE ISOlat1   - latin capital letter THORN                                            -->
-<!ENTITY szlig    "&#223;">  <!-- U+00DF ISOlat1   - latin small letter sharp s = ess-zed                                  -->
-<!ENTITY agrave   "&#224;">  <!-- U+00E0 ISOlat1   - latin small letter a with grave = latin small letter a grave          -->
-<!ENTITY aacute   "&#225;">  <!-- U+00E1 ISOlat1   - latin small letter a with acute                                       -->
-<!ENTITY acirc    "&#226;">  <!-- U+00E2 ISOlat1   - latin small letter a with circumflex                                  -->
-<!ENTITY atilde   "&#227;">  <!-- U+00E3 ISOlat1   - latin small letter a with tilde                                       -->
-<!ENTITY auml     "&#228;">  <!-- U+00E4 ISOlat1   - latin small letter a with diaeresis                                   -->
-<!ENTITY aring    "&#229;">  <!-- U+00E5 ISOlat1   - latin small letter a with ring above = latin small letter a ring      -->
-<!ENTITY aelig    "&#230;">  <!-- U+00E6 ISOlat1   - latin small letter ae = latin small ligature ae                       -->
-<!ENTITY ccedil   "&#231;">  <!-- U+00E7 ISOlat1   - latin small letter c with cedilla                                     -->
-<!ENTITY egrave   "&#232;">  <!-- U+00E8 ISOlat1   - latin small letter e with grave                                       -->
-<!ENTITY eacute   "&#233;">  <!-- U+00E9 ISOlat1   - latin small letter e with acute                                       -->
-<!ENTITY ecirc    "&#234;">  <!-- U+00EA ISOlat1   - latin small letter e with circumflex                                  -->
-<!ENTITY euml     "&#235;">  <!-- U+00EB ISOlat1   - latin small letter e with diaeresis                                   -->
-<!ENTITY igrave   "&#236;">  <!-- U+00EC ISOlat1   - latin small letter i with grave                                       -->
-<!ENTITY iacute   "&#237;">  <!-- U+00ED ISOlat1   - latin small letter i with acute                                       -->
-<!ENTITY icirc    "&#238;">  <!-- U+00EE ISOlat1   - latin small letter i with circumflex                                  -->
-<!ENTITY iuml     "&#239;">  <!-- U+00EF ISOlat1   - latin small letter i with diaeresis                                   -->
-<!ENTITY eth      "&#240;">  <!-- U+00F0 ISOlat1   - latin small letter eth                                                -->
-<!ENTITY ntilde   "&#241;">  <!-- U+00F1 ISOlat1   - latin small letter n with tilde                                       -->
-<!ENTITY ograve   "&#242;">  <!-- U+00F2 ISOlat1   - latin small letter o with grave                                       -->
-<!ENTITY oacute   "&#243;">  <!-- U+00F3 ISOlat1   - latin small letter o with acute                                       -->
-<!ENTITY ocirc    "&#244;">  <!-- U+00F4 ISOlat1   - latin small letter o with circumflex                                  -->
-<!ENTITY otilde   "&#245;">  <!-- U+00F5 ISOlat1   - latin small letter o with tilde                                       -->
-<!ENTITY ouml     "&#246;">  <!-- U+00F6 ISOlat1   - latin small letter o with diaeresis                                   -->
-<!ENTITY divide   "&#247;">  <!-- U+00F7 ISOnum    - division sign                                                         -->
-<!ENTITY oslash   "&#248;">  <!-- U+00F8 ISOlat1   - latin small letter o with stroke = latin small letter o slash         -->
-<!ENTITY ugrave   "&#249;">  <!-- U+00F9 ISOlat1   - latin small letter u with grave                                       -->
-<!ENTITY uacute   "&#250;">  <!-- U+00FA ISOlat1   - latin small letter u with acute                                       -->
-<!ENTITY ucirc    "&#251;">  <!-- U+00FB ISOlat1   - latin small letter u with circumflex                                  -->
-<!ENTITY uuml     "&#252;">  <!-- U+00FC ISOlat1   - latin small letter u with diaeresis                                   -->
-<!ENTITY yacute   "&#253;">  <!-- U+00FD ISOlat1   - latin small letter y with acute                                       -->
-<!ENTITY thorn    "&#254;">  <!-- U+00FE ISOlat1   - latin small letter thorn                                              -->
-<!ENTITY yuml     "&#255;">  <!-- U+00FF ISOlat1   - latin small letter y with diaeresis                                   -->
-
-
-<!-- C0 Controls and Basic Latin -->
-<!ENTITY quot     "&#34;">   <!-- U+0022 ISOnum    - quotation mark = APL quote                                            -->
-<!ENTITY amp      "&#38;">   <!-- U+0026 ISOnum    - ampersand                                                             -->
-<!ENTITY lt       "&#60;">   <!-- U+003C ISOnum    - less-than sign                                                        -->
-<!ENTITY gt       "&#62;">   <!-- U+003E ISOnum    - greater-than sign                                                     -->
-
-<!-- Latin Extended-A -->
-<!ENTITY OElig    "&#338;">  <!-- U+0152 ISOlat2   - latin capital ligature OE                                             -->
-<!ENTITY oelig    "&#339;">  <!-- U+0153 ISOlat2   - latin small ligature oe                                               -->
-
-<!-- ligature is a misnomer, this is a separate character in some languages -->
-<!ENTITY Scaron   "&#352;">  <!-- U+0160 ISOlat2   - latin capital letter S with caron                                     -->
-<!ENTITY scaron   "&#353;">  <!-- U+0161 ISOlat2   - latin small letter s with caron                                       -->
-<!ENTITY Yuml     "&#376;">  <!-- U+0178 ISOlat2   - latin capital letter Y with diaeresis                                 -->
-
-<!-- Spacing Modifier Letters -->
-<!ENTITY circ     "&#710;" > <!-- U+02C6 ISOpub    - modifier letter circumflex accent                                     -->
-<!ENTITY tilde    "&#732;" > <!-- U+02DC ISOdia    - small tilde                                                           -->
-
-<!-- General Punctuation -->
-<!ENTITY ensp     "&#8194;"> <!-- U+2002 ISOpub    - en space                                                              -->
-<!ENTITY emsp     "&#8195;"> <!-- U+2003 ISOpub    - em space                                                              -->
-<!ENTITY thinsp   "&#8201;"> <!-- U+2009 ISOpub    - thin space                                                            -->
-<!ENTITY zwnj     "&#8204;"> <!-- U+200C RFC 2070  - zero width non-joiner                                                 -->
-<!ENTITY zwj      "&#8205;"> <!-- U+200D RFC 2070  - zero width joiner                                                     -->
-<!ENTITY lrm      "&#8206;"> <!-- U+200E RFC 2070  - left-to-right mark                                                    -->
-<!ENTITY rlm      "&#8207;"> <!-- U+200F RFC 2070  - right-to-left mark                                                    -->
-<!ENTITY ndash    "&#8211;"> <!-- U+2013 ISOpub    - en dash                                                               -->
-<!ENTITY mdash    "&#8212;"> <!-- U+2014 ISOpub    - em dash                                                               -->
-<!ENTITY lsquo    "&#8216;"> <!-- U+2018 ISOnum    - left single quotation mark                                            -->
-<!ENTITY rsquo    "&#8217;"> <!-- U+2019 ISOnum    - right single quotation mark                                           -->
-<!ENTITY sbquo    "&#8218;"> <!-- U+201A NEW       - single low-9 quotation mark                                           -->
-<!ENTITY ldquo    "&#8220;"> <!-- U+201C ISOnum    - left double quotation mark                                            -->
-<!ENTITY rdquo    "&#8221;"> <!-- U+201D ISOnum    - right double quotation mark,                                          -->
-<!ENTITY bdquo    "&#8222;"> <!-- U+201E NEW       - double low-9 quotation mark                                           -->
-<!ENTITY dagger   "&#8224;"> <!-- U+2020 ISOpub    - dagger                                                                -->
-<!ENTITY Dagger   "&#8225;"> <!-- U+2021 ISOpub    - double dagger                                                         -->
-<!ENTITY permil   "&#8240;"> <!-- U+2030 ISOtech   - per mille sign                                                        -->
-<!ENTITY lsaquo   "&#8249;"> <!-- U+2039 ISO prop. - single left-pointing angle quotation mark                             -->
-
-<!-- lsaquo is proposed but not yet ISO standardized -->
-<!ENTITY rsaquo   "&#8250;"> <!-- U+203A ISO prop. -   single right-pointing angle quotation mark                          -->
-
-<!-- rsaquo is proposed but not yet ISO standardized -->
-<!ENTITY euro     "&#8364;"> <!-- U+20AC NEW       -   euro sign                                                           -->
-
-<!-- Latin Extended-B -->
-<!ENTITY fnof     "&#402;">  <!-- U+0192 ISOtech   - latin small f with hook = function = florin                           -->
-
-<!-- Greek -->
-<!ENTITY Alpha    "&#913;">  <!-- U+0391           - greek capital letter alpha                                            -->
-<!ENTITY Beta     "&#914;">  <!-- U+0392           - greek capital letter beta                                             -->
-<!ENTITY Gamma    "&#915;">  <!-- U+0393 ISOgrk3   - greek capital letter gamma                                            -->
-<!ENTITY Delta    "&#916;">  <!-- U+0394 ISOgrk3   - greek capital letter delta                                            -->
-<!ENTITY Epsilon  "&#917;">  <!-- U+0395           - greek capital letter epsilon                                          -->
-<!ENTITY Zeta     "&#918;">  <!-- U+0396           - greek capital letter zeta                                             -->
-<!ENTITY Eta      "&#919;">  <!-- U+0397           - greek capital letter eta                                              -->
-<!ENTITY Theta    "&#920;">  <!-- U+0398 ISOgrk3   - greek capital letter theta                                            -->
-<!ENTITY Iota     "&#921;">  <!-- U+0399           - greek capital letter iota                                             -->
-<!ENTITY Kappa    "&#922;">  <!-- U+039A           - greek capital letter kappa                                            -->
-<!ENTITY Lambda   "&#923;">  <!-- U+039B ISOgrk3   - greek capital letter lambda                                           -->
-<!ENTITY Mu       "&#924;">  <!-- U+039C           - greek capital letter mu                                               -->
-<!ENTITY Nu       "&#925;">  <!-- U+039D           - greek capital letter nu                                               -->
-<!ENTITY Xi       "&#926;">  <!-- U+039E ISOgrk3   - greek capital letter xi                                               -->
-<!ENTITY Omicron  "&#927;">  <!-- U+039F           - greek capital letter omicron                                          -->
-<!ENTITY Pi       "&#928;">  <!-- U+03A0 ISOgrk3   - greek capital letter pi                                               -->
-<!ENTITY Rho      "&#929;">  <!-- U+03A1           - greek capital letter rho                                              -->
-<!ENTITY Sigma    "&#931;">  <!-- U+03A3 ISOgrk3   - greek capital letter sigma                                            -->
-<!ENTITY Tau      "&#932;">  <!-- U+03A4           - greek capital letter tau                                              -->
-<!ENTITY Upsilon  "&#933;">  <!-- U+03A5 ISOgrk3   - greek capital letter upsilon                                          -->
-<!ENTITY Phi      "&#934;">  <!-- U+03A6 ISOgrk3   - greek capital letter phi                                              -->
-<!ENTITY Chi      "&#935;">  <!-- U+03A7           - greek capital letter chi                                              -->
-<!ENTITY Psi      "&#936;">  <!-- U+03A8 ISOgrk3   - greek capital letter psi                                              -->
-<!ENTITY Omega    "&#937;">  <!-- U+03A9 ISOgrk3   - greek capital letter omega                                            -->
-<!ENTITY alpha    "&#945;">  <!-- U+03B1 ISOgrk3   - greek small letter alpha                                              -->
-<!ENTITY beta     "&#946;">  <!-- U+03B2 ISOgrk3   - greek small letter beta                                               -->
-<!ENTITY gamma    "&#947;">  <!-- U+03B3 ISOgrk3   - greek small letter gamma                                              -->
-<!ENTITY delta    "&#948;">  <!-- U+03B4 ISOgrk3   - greek small letter delta                                              -->
-<!ENTITY epsilon  "&#949;">  <!-- U+03B5 ISOgrk3   - greek small letter epsilon                                            -->
-<!ENTITY zeta     "&#950;">  <!-- U+03B6 ISOgrk3   - greek small letter zeta                                               -->
-<!ENTITY eta      "&#951;">  <!-- U+03B7 ISOgrk3   - greek small letter eta                                                -->
-<!ENTITY theta    "&#952;">  <!-- U+03B8 ISOgrk3   - greek small letter theta                                              -->
-<!ENTITY iota     "&#953;">  <!-- U+03B9 ISOgrk3   - greek small letter iota                                               -->
-<!ENTITY kappa    "&#954;">  <!-- U+03BA ISOgrk3   - greek small letter kappa                                              -->
-<!ENTITY lambda   "&#955;">  <!-- U+03BB ISOgrk3   - greek small letter lambda                                             -->
-<!ENTITY mu       "&#956;">  <!-- U+03BC ISOgrk3   - greek small letter mu                                                 -->
-<!ENTITY nu       "&#957;">  <!-- U+03BD ISOgrk3   - greek small letter nu                                                 -->
-<!ENTITY xi       "&#958;">  <!-- U+03BE ISOgrk3   - greek small letter xi                                                 -->
-<!ENTITY omicron  "&#959;">  <!-- U+03BF NEW       - greek small letter omicron                                            -->
-<!ENTITY pi       "&#960;">  <!-- U+03C0 ISOgrk3   - greek small letter pi                                                 -->
-<!ENTITY rho      "&#961;">  <!-- U+03C1 ISOgrk3   - greek small letter rho                                                -->
-<!ENTITY sigmaf   "&#962;">  <!-- U+03C2 ISOgrk3   - greek small letter final sigma                                        -->
-<!ENTITY sigma    "&#963;">  <!-- U+03C3 ISOgrk3   - greek small letter sigma                                              -->
-<!ENTITY tau      "&#964;">  <!-- U+03C4 ISOgrk3   - greek small letter tau                                                -->
-<!ENTITY upsilon  "&#965;">  <!-- U+03C5 ISOgrk3   - greek small letter upsilon                                            -->
-<!ENTITY phi      "&#966;">  <!-- U+03C6 ISOgrk3   - greek small letter phi                                                -->
-<!ENTITY chi      "&#967;">  <!-- U+03C7 ISOgrk3   - greek small letter chi                                                -->
-<!ENTITY psi      "&#968;">  <!-- U+03C8 ISOgrk3   - greek small letter psi                                                -->
-<!ENTITY omega    "&#969;">  <!-- U+03C9 ISOgrk3   - greek small letter omega                                              -->
-<!ENTITY thetasym "&#977;">  <!-- U+03D1 NEW       - greek small letter theta symbol                                       -->
-<!ENTITY upsih    "&#978;">  <!-- U+03D2 NEW       - greek upsilon with hook symbol                                        -->
-<!ENTITY piv      "&#982;">  <!-- U+03D6 ISOgrk3   - greek pi symbol                                                       -->
-
-<!-- General Punctuation -->
-<!ENTITY bull     "&#8226;"> <!-- U+2022 ISOpub    - bullet = black small circle                                           -->
-<!ENTITY hellip   "&#8230;"> <!-- U+2026 ISOpub    - horizontal ellipsis = three dot leader                                -->
-<!ENTITY prime    "&#8242;"> <!-- U+2032 ISOtech   - prime = minutes = feet                                                -->
-<!ENTITY Prime    "&#8243;"> <!-- U+2033 ISOtech   - double prime = seconds = inches                                       -->
-<!ENTITY oline    "&#8254;"> <!-- U+203E NEW       - overline = spacing overscore                                          -->
-<!ENTITY frasl    "&#8260;"> <!-- U+2044 NEW       - fraction slash                                                        -->
-
-<!-- Letterlike Symbols -->
-<!ENTITY weierp   "&#8472;"> <!-- U+2118 ISOamso   - script capital P = power set = Weierstrass p                          -->
-<!ENTITY image    "&#8465;"> <!-- U+2111 ISOamso   - blackletter capital I = imaginary part                                -->
-<!ENTITY real     "&#8476;"> <!-- U+211C ISOamso   - blackletter capital R = real part symbol                              -->
-<!ENTITY trade    "&#8482;"> <!-- U+2122 ISOnum    - trade mark sign                                                       -->
-<!ENTITY alefsym  "&#8501;"> <!-- U+2135 NEW       - alef symbol = first transfinite cardinal                              -->
-
-<!-- Arrows -->
-<!ENTITY larr     "&#8592;"> <!-- U+2190 ISOnum    - leftwards arrow                                                       -->
-<!ENTITY uarr     "&#8593;"> <!-- U+2191 ISOnum    - upwards arrow                                                         -->
-<!ENTITY rarr     "&#8594;"> <!-- U+2192 ISOnum    - rightwards arrow                                                      -->
-<!ENTITY darr     "&#8595;"> <!-- U+2193 ISOnum    - downwards arrow                                                       -->
-<!ENTITY harr     "&#8596;"> <!-- U+2194 ISOamsa   - left right arrow                                                      -->
-<!ENTITY crarr    "&#8629;"> <!-- U+21B5 NEW       - downwards arrow with corner leftwards = carriage return               -->
-<!ENTITY lArr     "&#8656;"> <!-- U+21D0 ISOtech   - leftwards double arrow                                                -->
-<!ENTITY uArr     "&#8657;"> <!-- U+21D1 ISOamsa   - upwards double arrow                                                  -->
-<!ENTITY rArr     "&#8658;"> <!-- U+21D2 ISOtech   - rightwards double arrow                                               -->
-<!ENTITY dArr     "&#8659;"> <!-- U+21D3 ISOamsa   - downwards double arrow                                                -->
-<!ENTITY hArr     "&#8660;"> <!-- U+21D4 ISOamsa   - left right double arrow                                               -->
-
-<!-- Mathematical Operators -->
-<!ENTITY forall   "&#8704;"> <!-- U+2200 ISOtech   - for all                                                               -->
-<!ENTITY part     "&#8706;"> <!-- U+2202 ISOtech   - partial differential                                                  -->
-<!ENTITY exist    "&#8707;"> <!-- U+2203 ISOtech   - there exists                                                          -->
-<!ENTITY empty    "&#8709;"> <!-- U+2205 ISOamso   - empty set = null set = diameter                                       -->
-<!ENTITY nabla    "&#8711;"> <!-- U+2207 ISOtech   - nabla = backward difference                                           -->
-<!ENTITY isin     "&#8712;"> <!-- U+2208 ISOtech   - element of                                                            -->
-<!ENTITY notin    "&#8713;"> <!-- U+2209 ISOtech   - not an element of                                                     -->
-<!ENTITY ni       "&#8715;"> <!-- U+220B ISOtech   - contains as member                                                    -->
-<!ENTITY prod     "&#8719;"> <!-- U+220F ISOamsb   - n-ary product = product sign                                          -->
-<!ENTITY sum      "&#8721;"> <!-- U+2211 ISOamsb   - n-ary sumation                                                        -->
-<!ENTITY minus    "&#8722;"> <!-- U+2212 ISOtech   - minus sign                                                            -->
-<!ENTITY lowast   "&#8727;"> <!-- U+2217 ISOtech   - asterisk operator                                                     -->
-<!ENTITY radic    "&#8730;"> <!-- U+221A ISOtech   - square root = radical sign                                            -->
-<!ENTITY prop     "&#8733;"> <!-- U+221D ISOtech   - proportional to                                                       -->
-<!ENTITY infin    "&#8734;"> <!-- U+221E ISOtech   - infinity                                                              -->
-<!ENTITY ang      "&#8736;"> <!-- U+2220 ISOamso   - angle                                                                 -->
-<!ENTITY and      "&#8743;"> <!-- U+2227 ISOtech   - logical and = wedge                                                   -->
-<!ENTITY or       "&#8744;"> <!-- U+2228 ISOtech   - logical or = vee                                                      -->
-<!ENTITY cap      "&#8745;"> <!-- U+2229 ISOtech   - intersection = cap                                                    -->
-<!ENTITY cup      "&#8746;"> <!-- U+222A ISOtech   - union = cup                                                           -->
-<!ENTITY int      "&#8747;"> <!-- U+222B ISOtech   - integral                                                              -->
-<!ENTITY there4   "&#8756;"> <!-- U+2234 ISOtech   - therefore                                                             -->
-<!ENTITY sim      "&#8764;"> <!-- U+223C ISOtech   - tilde operator = varies with = similar to                             -->
-<!ENTITY cong     "&#8773;"> <!-- U+2245 ISOtech   - approximately equal to                                                -->
-<!ENTITY asymp    "&#8776;"> <!-- U+2248 ISOamsr   - almost equal to = asymptotic to                                       -->
-<!ENTITY ne       "&#8800;"> <!-- U+2260 ISOtech   - not equal to                                                          -->
-<!ENTITY equiv    "&#8801;"> <!-- U+2261 ISOtech   - identical to                                                          -->
-<!ENTITY le       "&#8804;"> <!-- U+2264 ISOtech   - less-than or equal to                                                 -->
-<!ENTITY ge       "&#8805;"> <!-- U+2265 ISOtech   - greater-than or equal to                                              -->
-<!ENTITY sub      "&#8834;"> <!-- U+2282 ISOtech   - subset of                                                             -->
-<!ENTITY sup      "&#8835;"> <!-- U+2283 ISOtech   - superset of                                                           -->
-<!ENTITY nsub     "&#8836;"> <!-- U+2284 ISOamsn   - not a subset of                                                       -->
-<!ENTITY sube     "&#8838;"> <!-- U+2286 ISOtech   - subset of or equal to                                                 -->
-<!ENTITY supe     "&#8839;"> <!-- U+2287 ISOtech   - superset of or equal to                                               -->
-<!ENTITY oplus    "&#8853;"> <!-- U+2295 ISOamsb   - circled plus = direct sum                                             -->
-<!ENTITY otimes   "&#8855;"> <!-- U+2297 ISOamsb   - circled times = vector product                                        -->
-<!ENTITY perp     "&#8869;"> <!-- U+22A5 ISOtech   - up tack = orthogonal to = perpendicular                               -->
-<!ENTITY sdot     "&#8901;"> <!-- U+22C5 ISOamsb   - dot operator                                                          -->
-
-<!-- Miscellaneous Technical -->
-<!ENTITY lceil    "&#8968;"> <!-- U+2308 ISOamsc   - left ceiling = apl upstile                                            -->
-<!ENTITY rceil    "&#8969;"> <!-- U+2309 ISOamsc   - right ceiling                                                         -->
-<!ENTITY lfloor   "&#8970;"> <!-- U+230A ISOamsc   - left floor = apl downstile                                            -->
-<!ENTITY rfloor   "&#8971;"> <!-- U+230B ISOamsc   - right floor                                                           -->
-<!ENTITY lang     "&#9001;"> <!-- U+2329 ISOtech   - left-pointing angle bracket = bra                                     -->
-<!ENTITY rang     "&#9002;"> <!-- U+232A ISOtech   - right-pointing angle bracket = ket                                    -->
-
-<!-- Geometric Shapes -->
-<!ENTITY loz      "&#9674;"> <!-- U+25CA ISOpub    - lozenge                                                               -->
-
-<!-- Miscellaneous Symbols -->
-<!ENTITY spades   "&#9824;"> <!-- U+2660 ISOpub    - black spade suit                                                      -->
-<!ENTITY clubs    "&#9827;"> <!-- U+2663 ISOpub    - black club suit = shamrock                                            -->
-<!ENTITY hearts   "&#9829;"> <!-- U+2665 ISOpub    - black heart suit = valentine                                          -->
-<!ENTITY diams    "&#9830;"> <!-- U+2666 ISOpub    - black diamond suit                                                    -->
-
-<!-- CVS $Revision$ $Date$ -->
-
-<!-- Portions (C) International Organization for Standardization 1986
-     Permission to copy in any form is granted for use with
-     conforming SGML systems and applications as defined in
-     ISO 8879, provided this notice is included in all copies. -->
diff --git a/docs/dtd/design.dtd b/docs/dtd/design.dtd
deleted file mode 100644
index 00c187d..0000000
--- a/docs/dtd/design.dtd
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml encoding='UTF-8'?>
-<!-- $Id$ -->
-
-<!-- overall organization -->
-<!ELEMENT design (note*,types*,category*)>
-<!ATTLIST design name CDATA #IMPLIED
-                 date CDATA #IMPLIED>
-<!ELEMENT date (#PCDATA)>
-<!ELEMENT types (category)*>
-<!ELEMENT category (note*,(class|interface)*)>
-<!ATTLIST category name    CDATA   #REQUIRED
-                   package NMTOKEN #IMPLIED
->
-
-<!-- markup -->
-<!ELEMENT note (#PCDATA)>
-
-<!-- types -->
-<!ENTITY % types 'array|primitive|reference|collection'>
-<!ELEMENT array (note*,(primitive|reference))>
-<!ATTLIST array dimension CDATA '1'>
-<!ELEMENT primitive EMPTY>
-<!ATTLIST primitive type (long|int|short|byte|char|boolean) #REQUIRED>
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference idref IDREF #REQUIRED>
-<!ELEMENT collection (note*,collector,items)>
-<!ELEMENT collector (%types;)>
-<!ELEMENT items (%types;)>
-<!ELEMENT union (note?,part,part+)>
-<!ELEMENT part (note?,(%types;)*)>
-
-<!-- sections -->
-<!ENTITY % visibility 'public|private|protected'>
-<!ELEMENT constant (note*,(%types;))>
-<!ATTLIST constant name       NMTOKEN        #REQUIRED
-                   value      CDATA          #IMPLIED
-                   visibility (%visibility;) 'public'
->
-<!ELEMENT field (note*,(%types;))>
-<!ATTLIST field name       NMTOKEN        #REQUIRED
-                visibility (%visibility;) 'protected'
->
-<!ELEMENT constructor (note*,param*,throws*)>
-<!ATTLIST constructor visibility (%visibility;) 'public'>
-<!ELEMENT method (note*,param*,returns?,throws*)>
-<!ATTLIST method name       NMTOKEN        #REQUIRED
-                 visibility (%visibility;) 'public'
->
-<!ELEMENT param (note*,(%types;))>
-<!ATTLIST param name NMTOKEN #REQUIRED>
-<!ELEMENT returns (note*,(%types;))>
-<!ELEMENT throws (note*,reference)>
-
-<!-- objects -->
-<!ELEMENT class (note*,extends?,implements*,constant*,field*,constructor*,method*)>
-<!ATTLIST class id         ID             #REQUIRED 
-                name       NMTOKEN        #REQUIRED
-                visibility (%visibility;) #FIXED 'public'
->
-<!ELEMENT interface (note*,extends*,constant*,method*)>
-<!ATTLIST interface id         ID             #REQUIRED
-                    name       NMTOKEN        #REQUIRED
-                    visibility (%visibility;) #FIXED 'public'
->
-<!ELEMENT extends (note*,reference)>
-<!ELEMENT implements (note*,reference)>
diff --git a/docs/dtd/document.dtd b/docs/dtd/document.dtd
deleted file mode 100644
index 9216ff8..0000000
--- a/docs/dtd/document.dtd
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml encoding='UTF-8'?>
-
-<!-- STYLEBOOK DOCUMENT DTD -->
-
-<!-- import the external blocks.ent dtd -->
-<!ENTITY % blocksEntity SYSTEM "blocks.ent">
-%blocksEntity;
-
-<!ELEMENT s1 (s2|%blocks;)*>
-<!ELEMENT s2 (s3|%blocks;)*>
-<!ELEMENT s3 (s4|%blocks;)*>
-<!ELEMENT s4 (%blocks;)*>
-
-<!ATTLIST s1 title CDATA #REQUIRED>
-<!ATTLIST s2 title CDATA #REQUIRED>
-<!ATTLIST s3 title CDATA #REQUIRED>
-<!ATTLIST s4 title CDATA #REQUIRED>
-
-<!-- CVS $Revision$ $Date$ -->
\ No newline at end of file
diff --git a/docs/dtd/entities.ent b/docs/dtd/entities.ent
deleted file mode 100644
index c0265d9..0000000
--- a/docs/dtd/entities.ent
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- upper case versions of names and versions -->
-<!ENTITY ParserNameLong 'Xerces2 Java Parser'>
-<!ENTITY ParserName 'Xerces-J'>
-<!ENTITY ParserVersion '@@VERSION@@'>
-
-<!-- lower case versions of names and versions -->
-<!ENTITY parsername 'xerces-j'>
-<!ENTITY parserversion '@@version@@'>
-
-<!-- packaging names -->
-<!ENTITY parserdir 'xerces-@@_version_@@'>
-<!ENTITY parserdistname 'Xerces-J-bin'>
diff --git a/docs/dtd/faqs.dtd b/docs/dtd/faqs.dtd
deleted file mode 100644
index 85eb5d1..0000000
--- a/docs/dtd/faqs.dtd
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml encoding='UTF-8'?>
-
-<!-- STYLEBOOK FAQS DTD -->
-
-<!-- import the external blocks.ent dtd -->
-<!ENTITY % blocksEntity SYSTEM "blocks.ent">
-%blocksEntity;
-
-<!ELEMENT faqs (faq)+>
-<!ATTLIST faqs title CDATA #REQUIRED>
-
-<!ELEMENT faq (q,a)>
-<!ATTLIST faq title CDATA #IMPLIED>
-
-
-<!ELEMENT q (#PCDATA)>
-<!ELEMENT a (%blocks;)+>
-
-<!-- CVS $Revision$ $Date$ -->
\ No newline at end of file
diff --git a/docs/dtd/links.ent b/docs/dtd/links.ent
deleted file mode 100644
index 69e8e35..0000000
--- a/docs/dtd/links.ent
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml encoding='UTF-8'?>
-
-<!-- LINKS ENTITY -->
-<!ENTITY % links "link|anchor|jump|img|resource-ref|human-resource-ref">
-
-<!ELEMENT anchor EMPTY>
-<!ATTLIST anchor name NMTOKEN #REQUIRED>
-
-<!ELEMENT img EMPTY>
-<!ATTLIST img src CDATA #REQUIRED
-              alt CDATA #REQUIRED>
-
-<!ELEMENT link (#PCDATA|img)*>
-<!ATTLIST link idref NMTOKEN #IMPLIED
-               anchor CDATA  #IMPLIED>
-
-<!ELEMENT jump (#PCDATA|img)*>
-<!ATTLIST jump href CDATA #REQUIRED>
-
-<!-- cross-reference resource elements -->
-<!ELEMENT resource-ref 		EMPTY>
-<!ATTLIST resource-ref 		idref CDATA #REQUIRED>
-<!ELEMENT human-resource-ref 	EMPTY>
-<!ATTLIST human-resource-ref 	 idref CDATA #REQUIRED>
\ No newline at end of file
diff --git a/docs/dtd/markup.ent b/docs/dtd/markup.ent
deleted file mode 100644
index d62d51c..0000000
--- a/docs/dtd/markup.ent
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml encoding='UTF-8'?>
-
-<!-- MARKUP ENTITY -->
-<!ENTITY % markup "em|strong|ref|code|br">
-
-<!-- import the external source-specific dtd -->
-<!ENTITY % externalEntity SYSTEM "entities.ent">
-%externalEntity;
-<!-- import the external charecters.ent dtd -->
-<!ENTITY % charEntity SYSTEM "characters.ent">
-%charEntity;
-<!-- import the external links.ent dtd -->
-<!ENTITY % linksEntity SYSTEM "links.ent">
-%linksEntity;
-
-<!ELEMENT em (#PCDATA|%links;)*>
-<!ELEMENT strong (#PCDATA|%links;)*>
-<!ELEMENT ref (#PCDATA|%links;)*>
-<!ELEMENT code (#PCDATA|%links;)*>
-<!ELEMENT br EMPTY>
-
-<!-- CVS $Revision$ $Date$ -->
diff --git a/docs/dtd/releases.dtd b/docs/dtd/releases.dtd
deleted file mode 100644
index 8c9cccd..0000000
--- a/docs/dtd/releases.dtd
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!ENTITY % include.blocks SYSTEM 'blocks.ent'>
-%include.blocks;
-
-<!ELEMENT desc (#PCDATA|%blocks;|%markup;|%links;)*>
-<!ELEMENT note (#PCDATA|%markup;)*>
-
-<!ELEMENT releases (desc?,release+)>
-<!ELEMENT release (desc?,changes?)>
-<!ATTLIST release version CDATA #REQUIRED
-                  date    CDATA #IMPLIED>
-<!ELEMENT changes (add|remove|fix|update)+>
-<!ELEMENT add (note,submitter?)>
-<!ELEMENT remove (note,submitter?)>
-<!ELEMENT fix (note,submitter?)>
-<!ELEMENT update (note,submitter?)>
-<!ELEMENT submitter EMPTY>
-<!ATTLIST submitter name   CDATA #REQUIRED
-                    mailto CDATA #IMPLIED>
diff --git a/docs/dtd/settings.dtd b/docs/dtd/settings.dtd
deleted file mode 100644
index 336ac64..0000000
--- a/docs/dtd/settings.dtd
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!ENTITY % include.blocks SYSTEM 'blocks.ent'>
-<!ENTITY % include.markup SYSTEM 'markup.ent'>
-%include.blocks;
-%include.markup;
-
-<!ENTITY % boolean '(true|false)'>
-<!ENTITY % access-options '(read-only|read-write|write-only)'>
-
-<!ELEMENT settings (features,properties)>
-<!ELEMENT features (desc?,(fcategory+|feature+)?)>
-<!ELEMENT properties (desc?,(pcategory+|property+)?)>
-
-<!ELEMENT desc (#PCDATA|%markup;|%blocks;)*>
-<!ATTLIST desc name CDATA #IMPLIED>
-<!ELEMENT note (#PCDATA|%markup;)*>
-<!ELEMENT fcategory (desc?,feature+)>
-<!ATTLIST fcategory name CDATA #REQUIRED>
-<!ELEMENT pcategory (desc?,property+)>
-<!ATTLIST pcategory name CDATA #REQUIRED>
-<!ELEMENT access EMPTY>
-<!ATTLIST access general     %access-options; #IMPLIED
-                 parsing     %access-options; #IMPLIED
-		 not-parsing %access-options; #IMPLIED>
-<!ELEMENT see EMPTY>
-<!ATTLIST see idref IDREF #REQUIRED>
-
-<!ELEMENT feature (desc?,true,false,default?,access?,note*,see*)>
-<!ATTLIST feature name CDATA #REQUIRED 
-                  id   ID    #IMPLIED>
-<!ELEMENT true (#PCDATA|%markup;)*>
-<!ELEMENT false (#PCDATA|%markup;)*>
-<!ELEMENT default EMPTY>
-<!ATTLIST default value CDATA #REQUIRED>
-		 
-<!ELEMENT property (desc?,type,default?,access?,note*,see*)>
-<!ATTLIST property name CDATA #REQUIRED
-                   id   ID    #IMPLIED>
-<!ELEMENT type (#PCDATA)>
diff --git a/docs/faq-build.xml b/docs/faq-build.xml
deleted file mode 100644
index 45e4a89..0000000
--- a/docs/faq-build.xml
+++ /dev/null
@@ -1,395 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE faqs SYSTEM 'dtd/faqs.dtd'>
-<faqs title='Building and Running FAQs'>
- <faq title='Swing version?'>
-  <q>Which version of Swing is required?</q>
-  <a>
-   <p>
-    This release uses Swing 1.1 (JFC 1.1). Swing is only used by
-    the sample programs and is not required by the parser itself.
-   </p>
-  </a>
- </faq>
- <faq title='Recompling source files?'>
-  <q>How do I recompile the source files?</q>
-  <a>
-   <p>
-    To build &ParserName; you need the Java Development
-    Kit (JDK) version 1.2 (or higher) installed on your machine.
-    The actual build is performed by the Ant program which is
-    written in Java and is a subproject of the Apache
-    <jump href='http://jakarta.apache.org/'>Jakarta</jump>
-    project. The build also requires a few other tools but
-    all of the tools you need (including Ant) are contained
-    in the <ref>&ParserName;-tools.&parserversion;.zip</ref>
-    file, packaged separately. Go to the &ParserName; 
-    <jump href='http://xml.apache.org/dist/xerces-j/'>download</jump>
-    page to download the tools package and then extract it in the
-    same location as the source package.
-   </p>
-   <p>
-    Once you have extracted both the source and tools packages
-    in the same directory, you can invoke a build by either
-    using the "build.bat" file for Windows platforms or the
-    "build.sh" file for UNIX platforms. Before invoking either
-    one of these scripts, though, be sure to set the JAVA_HOME
-    environment variable to the installed location of your JDK.
-   </p>
-   <p>
-    The script will invoke the Ant build program for you which
-    displays the list of allowed build targets. To only compile
-    the source files, type "build compile" (on Windows platforms)
-    at the command line in the directory where you extracted 
-    &ParserName;; to build the Jar files, type "build jars"; and
-    to build everything, including documentation, type "build
-    all".
-   </p>
-  </a>
- </faq>
- <faq title='Regenerating API documention?'>
-  <q>How do I regenerate the api documentation?</q>
-  <a>
-   <p>
-    To regenerate the api documentation, you need to set up
-    your environment to build &ParserName;.  Instead of typing 
-    "build all", you type "build javadocs".
-   </p>
-  </a>
- </faq>
- <faq title="How do I use Visual Age?">
-  <q>How do I import &ParserName; into Visual Age for Java</q>
-  <a>
-   <ul>
-    <li>
-     Why does VisualAge for Java 2.0 report problems when I import
-     the &ParserName; parser?
-     <br/>
-     The current version of the &ParserName; parser uses Swing 
-     1.1, while VisualAge for Java 2.0 comes with Swing 1.0.2. The 
-     free update for the Professional version of VisualAge for Java 
-     2.0 installs Swing 1.0.3. The most important difference between
-     Swing 1.0.2 - 1.0.3 and 1.1 is the Java package was changed 
-     from com.sun.java.swing.* to javax.swing.*.
-     <br/>
-     To fix the errors, you must download the Java Foundation Classes
-     1.1 with Swing 1.1 from Sun's Java home page and import the 
-     &quot;swingall.jar&quot; file into VisualAge for Java 2.0. The
-     Swing 1.1 package can be found at the following URL:
-     <br/>
-     <jump href="http://java.sun.com/products/jfc/index.html">http://java.sun.com/products/jfc/index.html</jump>
-     <br/>
-     Refer to the VisualAge for Java 2.0 documentation for information 
-     about how to import a JAR file into the repository and add that 
-     code to your workspace.
-    </li>
-    <li>
-     Are there any other tips for importing the &ParserName; 
-     parser into VisualAge for Java 2.0?
-     <br/>
-     The most useful tip applies to <em>any</em> updated code that you
-     import into the VisualAge for Java 2.0 product. Before updating 
-     code, do the following:
-     <br/>
-     1. version the old code
-     <br/>
-     2. delete it from your workspace
-     <br/>
-     3. import the new code
-     <br/>
-     Deleting code from your workspace does not actually delete 
-     the code permanently - the versioned code is moved to the 
-     repository where it can be retrieved later. Be aware, though, 
-     that removing code from your workspace will cause problems with
-     all of the other classes that use that code. VisualAge for Java
-     2.0 will flag them as errors but this situation is temporary. 
-     When you import the new code, the errors found when deleting the
-     old code will be fixed.
-     <br/>
-     If you are unsure as to how to perform any of these steps, refer 
-     to the VisualAge for Java 2.0 documentation.
-    </li>
-   </ul>
-  </a>
- </faq>
- <!--
-   - REVISIT: This needs to be re-run and re-verified before we
-   -          put this FAQ item back in.
- <faq title='100% Pure Java compliant?'>
-  <q>Is this &ParserName; version 100% pure Java compliant?</q>
-  <a>
-   <p>
-    Running JavaPureCheck on the &ParserName; parser code indicated 339 
-    pure Java classes, 9 warnings, and 0 errors. The nine warnings are 
-    enumerated below with explanations. To see the entire report, click 
-    <link idref="jpc">here</link>. 
-   </p>
-   <p>
-    There are many common cases where JavaPureCheck issues warnings 
-    even though the code is pure Java. These are the most common 
-    reasons:
-   </p>
-   <ol>
-    <li>
-     Warning: method reference: 
-     <code>java.lang.Class.forName(java.lang.String)</code>
-     <br/>
-     This warning is issued in the following two cases:
-    </li>
-    <ol>
-     <li>
-      Program code calls the <code>Class.forName(String)</code> 
-      method to dynamically load a class file. In this situation, 
-      the specified class may contain impure Java code. In the 
-      cases where this method is called directly in the parser 
-      code, an explanation is provided detailing why this warning
-      can be ignored.
-     </li>
-     <li>
-      Program code makes direct reference to an object&apos;s 
-      class. For example: <code>Class stringClass = String.class;</code>. 
-      In this situation the Java compiler converts 
-      <code>String.class</code> to the method call 
-      <code>Class.forName(&quot;java.lang.String&quot;)</code>. 
-      As long as the object whose class is being referenced is 
-      pure Java, the code making the reference remains pure.
-     </li>
-    </ol>
-    <li>
-     Warning: possible hard-coded path: ...
-     <br/>
-     When a String literal contains a common path separator character
-     (e.g. &apos;/&apos; or &apos;\&apos;), JavaPureCheck assumes that 
-     it is a hard-coded path and that the class may not contain
-     portable code. While a human tester can verify that the string is
-     not a path, JavaPureCheck must be conservative and issue a 
-     warning.
-    </li>
-   </ol>
-   <p>Explanations:</p>
-   <ul>
-    <li>Class: org.xml.sax.helpers.ParserFactory</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>
-      Explanation: The ParserFactory class is part of the standard
-      SAX 1.0 distribution. The warning given that this class "may
-      load impure class" is correct - the ParserFactory class may 
-      load impure Java class files. However, the purpose of this
-      utility class is to load parser classes by name and therefore
-      cannot dynamically check the pureness of parser classes loaded 
-      in this fashion. Since the &ParserName; parser does not use this
-      method directly, it is not a problem that concerns the &ParserName;
-      parser.
-     </li>
-    </ul>
-    <li>Class: org.apache.xml.serialize.SerializerFactory</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>
-      Explanation: The SerializerFactory supports querying a system 
-      property to dynamically instantiate a serializer by class name. 
-      However, all of the serializer classes provided in this 
-      distribution are pure. The only way to load an impure 
-      serializer is if the user provided an impure serializer
-      implementation.
-     </li>
-    </ul>
-    <li>Class: org.apache.xml.serialize.OutputFormat</li>
-    <ul>
-     <li>Warning: possible hard-coded path: text/xml</li>
-    </ul>
-    <ul>
-     <li>Warning: possible hard-coded path: text/plain</li>
-    </ul>
-    <ul>
-     <li>Warning: possible hard-coded path: application/pdf</li>
-    </ul>
-    <ul>
-     <li>Warning: possible hard-coded path: text/html</li>
-    </ul>
-    <ul>
-     <li>
-      Warning: possible hard-coded path: 
-      -//W3C//DTD XHTML 1.0 Strict//EN
-     </li>
-    </ul>
-    <ul>
-     <li>Explanation: These strings are not filenames.</li>
-    </ul>
-    <li>Class: org.apache.xml.serialize.HTMLdtd</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>Explanation: Referencing class object that is pure Java.</li>
-    </ul>
-    <li>Class: org.apache.html.dom.HTMLDocumentImpl</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>Explanation: Referencing class object that is pure Java.</li>
-    </ul>
-    <li>Class: org.apache.xerces.readers.StringReader</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>Explanation: Referencing class object that is pure Java.</li>
-    </ul>
-    <li>Class: org.apache.xerces.parsers.DOMParser</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>
-      Explanation: The DOMParser class allows the user to set the
-      DOM implemenation to use, by name. However, the default DOM
-      implementation is pure Java.
-     </li>
-    </ul>
-    <ul>
-     <li>Explanation: Referencing class object that is pure Java.</li>
-    </ul>
-    <li>Class: org.apache.xerces.utils.CharDataChunk</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>Explanation: Referencing class object that is pure Java.</li>
-    </ul>
-    <li>Class: org.apache.xerces.utils.UTF8DataChunk</li>
-    <ul>
-     <li>
-      Warning: method reference: 
-      java.lang.Class.forName(java.lang.String)
-     </li>
-    </ul>
-    <ul>
-     <li>Explanation: Referencing class object that is pure Java.</li>
-    </ul>
-   </ul>
-   <p>
-    The results file of the JavaPureCheck can be viewed by clicking
-    <link idref="jpc">here</link>.
-   </p>
-   <note>
-    The samples were not checked with JavaPureCheck and are not 
-    guaranteed to be pure Java. We reserve the right to write samples 
-    in the future that are platform specific and therefore may not 
-    pass as pure Java. The parser, however, will remain pure Java.
-   </note>
-  </a>
- </faq>
- -->
- <faq title='Running on the Mac?'>
-  <q>How do I get &ParserName; to run on the Mac under MRJ?</q>
-  <a>
-   <p>
-    <em>Prerequisites</em> (available from 
-    <jump href="http://developer.apple.com/java/">http://developer.apple.com/java/</jump>):
-   </p>
-   <ul>
-    <li>MRJ 2.1 (this is the most recent version of the JVM)</li>
-    <li>
-     MRJ SDK 2.1 (this is the most recent version of the Java
-     developer tools)
-    </li>
-   </ul>
-   <p>
-    <em>Instructions </em>(other variations would work also):
-   </p>
-   <ol>
-    <li>Download the .tar.gz file containing &ParserName;.</li>
-    <li>
-     Use Stuffit Expander(tm), Suntar, or some other Macintosh tool 
-     that supports the .tar.gz format to expand the downloaded file.
-    </li>
-    <li>
-     JBindery, part of MRJ SDK 2.1, is used to create a double-clickable 
-     Java application with the necessary configuration information built
-     in. It is analogous to writing a .bat or .sh script. 
-    </li>
-    <li><em>To run the dom.DOMWriter example:</em></li>
-    <ol>
-     <li>Double click on JBindery to start it up.</li>
-     <li>Click on the Classpath panel.</li>
-     <li>
-      Click on the &quot;Add .zip File&quot; button and add both the 
-      &quot;xerces.jar&quot; and &quot;xercesSamples.jar&quot; files.
-     </li>
-     <li>Click on the Command panel.</li>
-     <li>
-      Enter &quot;dom.Writer&quot; as the Class name. Enter 
-      &quot;data/personal.xml&quot; in the Optional parameters box.
-     </li>
-     <li>
-      Click on Save Settings button, pick a name such as &quot;Run
-      <code>dom.Writer</code>&quot; for the file, and <em>be 
-      sure</em> that &quot;Save as Application&quot; is selected 
-      (this is the default) and save the file.
-     </li>
-     <li>Quit JBindery.</li>
-     <li>
-      You can now double click on the file you created in step (f) to
-      run the XJParse example.
-     </li>
-    </ol>
-   </ol>
-  </a>
- </faq>
- <faq title='Visual Cafe exception error?'>
-  <q>
-   Why do I get ArrayIndexOutOfBoundsException in the Symantec Visual 
-   Cafe debugger?
-  </q>
-  <a>
-   <p>
-    The Visual Cafe debugger is set to trap 
-    <code>ArrayIndexOutOfBoundsException</code> exceptions by 
-    default. &ParserName; sometimes uses 
-    <code>ArrayIndexOutOfBoundsException</code> internally to 
-    signal exceptional, but not erroneous conditions. In order to 
-    run &ParserName; inside Visual Cafe's debugger, you need to
-    turn off the trapping of these exceptions.
-   </p>
-   <p><em>To do this:</em></p>
-   <ol>
-    <li>Select the &quot;Options&quot; item in the "Project" menu.</li>
-    <li>
-     Select the &quot;Debugger&quot; tab in the dialog which appears.
-    </li>
-    <li>Select &quot;Exceptions&quot; from the popup menu.</li>
-    <li>
-     Remove the check from the checkbox for 
-     <code>java.lang.ArrayIndexOutOfBoundsException</code>.
-    </li>
-   </ol>
-  </a>
- </faq>
-</faqs>
diff --git a/docs/faq-common.xml b/docs/faq-common.xml
deleted file mode 100644
index 1fff093..0000000
--- a/docs/faq-common.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE faqs SYSTEM 'dtd/faqs.dtd'>
-<faqs title='Common Problems FAQs'>
- <faq title='DOS Filenames No Longer Work'>
-  <q>
-   I used to be able to use DOS filenames with the parser and now
-   they don't work. Why not?
-  </q>
-  <a>
-   <p>
-    DOS filenames are not legal URIs as required by the XML 1.0
-    specification. Therefore, it was an error for the parser to 
-    accept DOS filenames. This bug is now fixed.
-   </p>
-   <p>
-    DOS filenames can be converted to legal URIs, however. For
-    example, the DOS filename "c:\xerces\data\personal.xml" would 
-    become "file:///c:/xerces/data/personal.xml", which is a legal
-    URI.
-   </p>
-  </a>
- </faq>
- <faq title='Parsing HTML Generated an Error.'>
-  <q>
-   I tried to use &ParserName; to parse an HTML file and it
-   generated an error. What did I do wrong?
-  </q>
-  <a>
-   <p>
-    Unfortunately, HTML does not, in general, follow the XML 
-    grammar rules. Most HTML files do not meet the XML style 
-    quidelines. Therefore, the XML parser generates XML 
-    well-formedness errors.
-   </p>
-   <p>Typical errors include:</p>
-   <ul>
-    <li>
-     Missing end tags, e.g. &lt;P&gt; with no &lt;/P&gt; (end 
-     tags are not required in HTML)
-    </li>
-    <li>
-     Missing closing slash on &lt;IMG HREF="foo" <em>/</em>&gt; 
-     (not required in HTML)
-    </li>
-    <li>
-     Missing quotes on attribute values, e.g. &lt;IMG width="600"&gt; 
-     (not generally required in HTML)
-    </li>
-   </ul>
-   <p>
-    HTML must match the XHTML standard for well-formedness before it 
-    can be parsed by &ParserName; or any other XML parser. You can 
-    find the 
-    <jump href="http://www.w3c.org/TR/1999/PR-xhtml1-19991210">XHTML 
-    standard</jump> on the 
-    <jump href="http://www.w3c.org">W3C web site</jump>.
-   </p>
-  </a>
- </faq>
- <faq title='UTF-8 Character Error'>
-  <q>I get an &quot;invalid UTF-8 character&quot; error.</q>
-  <a>
-   <p>
-    There are many Unicode characters that are not allowed in an 
-    XML document, according to the XML spec. Typical disallowed 
-    characters are control characters, even if you escape them 
-    using the Character Reference form: &amp;#xxxx; . See the XML
-    spec, sections 
-    <jump href="http://www.w3.org/TR/REC-xml#charsets">2.2</jump> 
-    and 
-    <jump href="http://www.w3.org/TR/REC-xml#sec-references">4.1</jump> 
-    for details. If the parser is generating this error, it is very
-    likely that there is a character in the file that you can not see.
-    You can generally use a UNIX command like &quot;od -hc&quot; to 
-    find it.
-   </p>
-  </a>
- </faq>
- <faq title='Error Accessing EBCDIC XML Files'>
-  <q>
-   I get an error when I access EBCDIC XML files, what is happening?
-  </q>
-  <a>
-   <p>
-    If an XML document/file is not UTF-8, then you MUST specify the
-    encoding. When transcoding a UTF8 document to EBCDIC, remember 
-    to change this:
-   </p>
-   <ul>
-    <li>
-     &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; 
-     <br/>
-     to something like this:
-     <br/>
-     &lt;?xml version=&quot;1.0&quot; encoding=&quot;ebcdic-cp-us&quot;?&gt;
-    </li>
-   </ul>
-  </a>
- </faq>
- <faq title='EOF Character Error'>
-  <q>
-   I get an error on the EOF character (0x1A) -- what is happening?
-  </q>
-  <a>
-   <p>
-    You are probably using the <em>LPEX</em> editor, which 
-    automatically inserts an End-of-file character (0x1A) at the end 
-    of your XML document (other editors might do this as well). 
-    Unfortunately, the EOF character (0x1A) is an illegal character 
-    according to the XML specification, and &ParserName; 
-    correctly generates an error.
-   </p>
-  </a>
- </faq>
-</faqs>
diff --git a/docs/faq-general.xml b/docs/faq-general.xml
deleted file mode 100644
index 1453cfc..0000000
--- a/docs/faq-general.xml
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE faqs SYSTEM 'dtd/faqs.dtd'>
-<faqs title='General FAQs'>
-    <faq title="Jar file changes">
-    <q>What happened to xerces.jar</q>
-    <a>
-        <p>In order to take advantage of the fact that this parser is 
-        very often used in conjunction with other XML technologies, 
-        such as XSLT processors, which also rely on standard
-        API&apos;s like DOM and SAX, xerces.jar was split into two
-        jarfiles:
-        </p>
-        <ul>
-        <li><code>xmlParserAPIs.jar</code> contains the DOM level 2,
-        SAX 2.0 and JAXP 1.1 API&apos;s;</li>
-        <li><code>xercesImpl.jar</code> contains the implementation of
-        these API&apos;s as well as the XNI API.
-        </li>
-        </ul>
-        <p>For backwards compatibility, we have retained the ability
-        to generate old-style jarfiles.  For instructions, see <link
-        idref="install">the installation documentation</link>.
-        </p>
-    </a>
- </faq>
- <faq title='Validation against DTD'>
-  <q>How do I turn on DTD validation?</q>
-  <a>
-   <p>
-    You can turn validation on and off via methods available
-    on the SAX2 <code>XMLReader</code> interface. While only the 
-    <code>SAXParser</code> implements the <code>XMLReader</code>
-    interface, the methods required for turning on validation
-    are available to both parser classes, DOM and SAX.
-    <br/>
-    The code snippet below shows how to turn validation on -- assume
-    that <ref>parser</ref> is an instance of either 
-    <code>org.apache.xerces.parsers.SAXParser</code> or
-    <code>org.apache.xerces.parsers.DOMParser</code>. 
-    <br/><br/>
-    <code>parser.setFeature("http://xml.org/sax/features/validation", true);</code>
-   </p>
-  </a>
- </faq> 
-<faq title='IDs and XML Schemas'>
-  <q>Why does getElementById() not always work for documents validated against XML Schemas?</q>
-  <a>
-   <p>According to the XML Schema specification, an instance document might have
-more than one <jump href="http://www.w3.org/TR/xmlschema-1/#key-vr">validation root</jump> and 
-<jump href="http://www.w3.org/TR/xmlschema-1/#cvc-id">ID/IDREFS</jump> must be 
-unique only within the context of a particular validation root, meaning that a 
-document may potentially contain multiple identical ids. In this case, the output 
-of getElementById() is unspecified. On the other hand, if the document root is 
-a validation root of the document, getElementById() should work as expected.
-    </p>
-  </a>
- </faq>
- 
-<faq title='PSVI'>
-  <q>How do I get access to the PSVI?</q>
-  <a>
-   <p>Xerces provides a sample component PSVIWriter that intercepts document 
-handler events and collects PSVI information. For more information read <link 
-idref="samples-xni">samples documentation</link> on how to use xni.parser.PSVIParser 
-and xni.parser.PSVIConfiguration.
-    </p>
-<note>Xerces only produces light-weight  PSVI.</note>
-  </a>
- </faq>
- 
-
- <faq title='International Encodings'>
-  <q>What international encodings are supported by &ParserName;?</q>
-  <a>
-   <ul>
-    <li>UTF-8</li>
-    <li>UTF-16 Big Endian, UTF-16 Little Endian</li>
-    <li>IBM-1208</li>
-    <li>ISO Latin-1 (ISO-8859-1)</li>
-    <li>
-     ISO Latin-2 (ISO-8859-2) [Bosnian, Croatian, Czech, 
-     Hungarian, Polish, Romanian, Serbian (in Latin transcription), 
-     Serbocroatian, Slovak, Slovenian, Upper and Lower Sorbian]
-    </li>
-    <li>ISO Latin-3 (ISO-8859-3) [Maltese, Esperanto]</li>
-    <li>ISO Latin-4 (ISO-8859-4)</li>
-    <li>ISO Latin Cyrillic (ISO-8859-5)</li>
-    <li>ISO Latin Arabic (ISO-8859-6)</li>
-    <li>ISO Latin Greek (ISO-8859-7)</li>
-    <li>ISO Latin Hebrew (ISO-8859-8)</li>
-    <li>ISO Latin-5 (ISO-8859-9) [Turkish]</li>
-    <li>Extended Unix Code, packed for Japanese (euc-jp, eucjis)</li>
-    <li>Japanese Shift JIS (shift-jis)</li>
-    <li>Chinese (big5)</li>
-    <li>Chinese for PRC (mixed 1/2 byte) (gb2312)</li>
-    <li>Japanese ISO-2022-JP (iso-2022-jp)</li>
-    <li>Cyrillic (koi8-r)</li>
-    <li>Extended Unix Code, packed for Korean (euc-kr)</li>
-    <li>Russian Unix, Cyrillic (koi8-r)</li>
-    <li>Windows Thai (cp874)</li>
-    <li>Latin 1 Windows (cp1252) (and all other cp125? encodings recognized by IANA)</li>
-    <li>cp858</li>
-    <li>EBCDIC encodings:</li>
-     <ul>
-      <li>EBCDIC US (ebcdic-cp-us)</li>
-      <li>EBCDIC Canada (ebcdic-cp-ca)</li>
-      <li>EBCDIC Netherland (ebcdic-cp-nl)</li>
-      <li>EBCDIC Denmark (ebcdic-cp-dk)</li>
-      <li>EBCDIC Norway (ebcdic-cp-no)</li>
-      <li>EBCDIC Finland (ebcdic-cp-fi)</li>
-      <li>EBCDIC Sweden (ebcdic-cp-se)</li>
-      <li>EBCDIC Italy (ebcdic-cp-it)</li>
-      <li>EBCDIC Spain, Latin America (ebcdic-cp-es)</li>
-      <li>EBCDIC Great Britain (ebcdic-cp-gb)</li>
-      <li>EBCDIC France (ebcdic-cp-fr)</li>
-      <li>EBCDIC Hebrew (ebcdic-cp-he)</li>
-      <li>EBCDIC Switzerland (ebcdic-cp-ch)</li>
-      <li>EBCDIC Roece (ebcdic-cp-roece)</li>
-      <li>EBCDIC Yugoslavia (ebcdic-cp-yu)</li>
-      <li>EBCDIC Iceland (ebcdic-cp-is)</li>
-      <li>EBCDIC Urdu (ebcdic-cp-ar2)</li>
-      <li>Latin 0 EBCDIC</li>
-      <li>EBCDIC Arabic (ebcdic-cp-ar1)</li>
-     </ul>
-   </ul>
-   <note>UCS-4 is not yet supported, but it is hoped that support will be available soon.</note>
-  </a>
- </faq>
-</faqs>
diff --git a/docs/faq-pcfp.xml b/docs/faq-pcfp.xml
deleted file mode 100644
index 6145130..0000000
--- a/docs/faq-pcfp.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE faqs SYSTEM 'dtd/faqs.dtd'>
-<faqs title='Parser Configuration and Validation'>
- <faq title='Validation and infoset augmentation'>
-  <q>What's the result of having a DTD validator or XML Schema validator in the pipeline?</q>
-  <a>
-   <p>
-    If a validator is included in the pipeline, the assessment is
-    done, whether the validation feature is set to true or false.
-    The validation feature only enables the validation constraint error reporting and it does not control the infoset augmentation: if a validator is included in the pipeline the parser will augment the infoset according to the grammar specified for the instance document. 
-   </p>
-  </a>
- </faq>
-
- <faq title='Default Parser Configuration'>
-  <q>What validation behavior do I expect from the default parser configuration?</q>
-  <a>
-   <p>
-    The default configuration (StandardParserConfiguration) includes the DTD validator 
-    and the Namespace binder. Thus, the <link idref='features' anchor="validation">
-    validation feature</link> will enable validation against a DTD only.
-To allow validation against XML Schemas you must turn on the <link 
-idref='features' anchor="validation">validation feature</link> and the 
-<link idref='features' anchor="validation.schema">schema feature</link>, and 
-XML Schema Validator will be inserted in the pipeline. 
-If you've created your own configuration which does not extend StandardParserConfiguration, 
-you must make sure that your configuration inserts all needed validators in the pipeline.
-   </p>
-  </a>
- </faq>
-
- <faq title='Validation Features'>
-  <q>What happens if I set both validation and schema validation features on?</q>
-  <a>
-   <p>
-     If both validators are present in the pipeline (this is the default behavior), then
-   </p>
-   <ul>
-    <li>if the instance document has only a DTD grammar
-        (DOCTYPE before the root element), then only DTD
-        validation errors are reported;</li>
-    <li>if the instance document has only XML Schema grammars,
-        then only XML Schema validation errors are reported</li>
-    <li>if the instance document has both DTD and XML Schema
-        grammars, validation errors for both DTD and XML
-        Schema are reported;</li>
-    <li>if no grammar can be found for the instance document,
-        the last validator in the pipeline will report validation errors.
-    </li>
-   </ul>
-   <p>
-     An application may choose to create a configuration that does not have a DTD 
-     validator but has an XML Schema validator. This will turn Xerces into a 
-     non-compliant processor according to XML 1.0 and XML Schema specifications, 
-     thus the validation/augmentation outcome is undefined.
-   </p>
-
-  </a>
-</faq>
-<faq title='Validation against a specific schema language'>
-  <q>How can I tell the parser to validate against XML Schema and not to report DTD validation errors?</q>
-  <a>
-   <p>
-     Currently this is impossible. We hope that JAXP 1.2 will provide this capability 
-     via its schema language property. Otherwise, we might introduce a Xerces 
-     language property that will allow specifying the language against which validation will occur.
-   </p>
-   </a>
- </faq>
-
-</faqs>
diff --git a/docs/faq-performance.xml b/docs/faq-performance.xml
deleted file mode 100644
index 6605abf..0000000
--- a/docs/faq-performance.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE faqs SYSTEM 'dtd/faqs.dtd'>
-<faqs title='Performance FAQs'>
- <faq title='General Performance'>
-  <q>General Performance</q>
-  <a>
-   <p>
-    Don't use XML where it doesn't make sense. XML is not a panacea. 
-    You will not get good performance by transferring and parsing a 
-    lot of XML files. 
-   </p>
-   <p>Using XML is memory, CPU, and network intensive.</p>
-  </a>
- </faq>
- <faq title='Parser Performance'>
-  <q>Parser Performance</q>
-  <a>
-   <p>
-    Avoid creating a new parser each time you parse; reuse parser 
-    instances. A pool of reusable parser instances might be a good idea 
-    if you have multiple threads parsing at the same time.
-   </p>
-   <p>
-    The parser configuration will affect the performance of the parser.
-    If you are interested in evaluating the parser performance with DTDs use     StandardParserConfiguration (Note: this is the default parser configuration). 
-    For testing the performance for XML Schema evaluation turn on schema validation feature (this will insert XML Schema Validator in the pipeline).
-   </p>
-  </a>
- </faq>
- <faq title='Parsing Documents Performance'>
-  <q>Parsing Documents Performance</q>
-  <a>
-   <p>
-    There are a variety of things that you can do to improve the
-    performance when parsing documents:
-   </p>
-   <ul>
-    <li>
-     Convert the document to US ASCII ("US-ASCII") or Unicode 
-     ("UTF-8" or "UTF-16") before parsing. Documents written using 
-     ASCII are the fastest to parse because each character is 
-     guaranteed to be a single byte and map directly to their 
-     equivalent Unicode value. For documents that contain Unicode 
-     characters beyond the ASCII range, multiple byte sequences 
-     must be read and converted for each character. There is a 
-     performance penalty for this conversion. The UTF-16 encoding 
-     alleviates some of this penalty because each character is 
-     specified using two bytes, assuming no surrogate characters. 
-     However, using UTF-16 can roughly double the size of the 
-     original document which takes longer to parse.
-    </li>
-    <li>
-     Explicitly specify "US-ASCII" encoding if your document is in 
-     ASCII format. If no encoding is specified, the XML specification 
-     requires the parser to assume UTF-8 which is slower to process.
-    </li>
-    <li>
-     Avoid external entities and external DTDs. The extra file 
-     opens and transcoding setup is expensive.
-    </li>
-    <li>
-     Reduce character count; smaller documents are parsed quicker. 
-     Replace elements with attributes where it makes sense. Avoid 
-     gratuitous use of whitespace because the parser must scan past it.
-    </li>
-    <li>
-     Avoid using too many default attributes. Defaulting attribute
-     values slows down processing.
-    </li>
-   </ul>
-  </a>
- </faq>
- <faq title='XML Application Performance'>
-  <q>XML Application Performance</q>
-  <a>
-   <ul>
-    <li>If you don't need validation (and infoset augmentation) of XML documents, don't include validators (DTD or XML Schema) in the pipeline. Including the validator components in the pipeline will result in a performance hit for your application: if a validator component is present in the pipeline, Xerces will try to augment the infoset even if the validation feature is set to false.
-If you are only interested in validating against DTDs don't include XML Schema validator in the pipeline.
-
-    </li>
-    <li> If you don't need validation, avoid using a DOCTYPE line in your XML document. 
-     The current version of the parser will always read the DTD if the DOCTYPE line
-     is specified even when validation feature is set to false.
-    </li>
-    <li>
-     For large documents, avoid using DOM which uses a lot of memory.
-     Instead, use SAX if appropriate. The DOM parser requires that 
-     the entire document be read into memory before the application
-     processes the document. The SAX parser uses very little memory
-     and notifies the application as parts of the document are parsed.
-    </li>
-   </ul>
-  </a>
- </faq>
-</faqs>
diff --git a/docs/faq-write.xml b/docs/faq-write.xml
deleted file mode 100644
index 30160f8..0000000
--- a/docs/faq-write.xml
+++ /dev/null
@@ -1,369 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE faqs SYSTEM 'dtd/faqs.dtd'>
-<faqs title='Writing Application FAQs'>
- <faq title='Creating a DOM Parser'>
-  <q>How do I create a DOM parser?</q>
-  <a>
-   <p>
-    You can create a DOM parser by using the Java APIs for
-    XML Processing (JAXP). The following source code shows
-    how:
-   </p>
-   <source>import java.io.IOException;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-  ...
-
-String xmlFile = &quot;file:///&parserdir;/data/personal.xml&quot;; 
-try {
-    DocumentBuilderFactory factory = 
-        DocumentBuilderFactory.newInstance();
-    DocumentBuilder builder = factory.newDocumentBuilder();
-    Document document = builder.parse(xmlFile);
-}
-catch (FactoryConfigurationError e) {
-    // unable to get a document builder factory
-} 
-catch (ParserConfigurationException e) {
-    // parser was unable to be configured
-catch (SAXException e) {
-    // parsing error
-} 
-catch (IOException e) {
-    // i/o error
-}</source>
-  </a>
- </faq>
- <faq title="Creating a SAX Parser">
-  <q>How do I create a SAX parser?</q>
-  <a>
-   <p>
-    You can create a SAX parser by using the Java APIs for
-    XML Processing (JAXP). The following source code shows
-    how:
-   </p>
-   <source>
-import java.io.IOException; 
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-  ...
-
-String xmlFile = &quot;file:///&parserdir;/data/personal.xml&quot;; 
-try {
-    SAXParserFactory factory = SAXParserFactory.newInstance();
-    SAXParser parser = factory.newSAXParser();
-    DefaultHandler handler = /* custom handler class */;
-    parser.parse(xmlFile, handler);
-} 
-catch (FactoryConfigurationError e) {
-    // unable to get a document builder factory
-} 
-catch (ParserConfigurationException e) {
-    // parser was unable to be configured
-catch (SAXException e) {
-    // parsing error
-} 
-catch (IOException e) {
-    // i/o error
-}</source>
-  </a>
- </faq>
- <!--
-   - REVISIT: make sure that JAXP implementation can handle
-   -          passing features and properties through to the
-   -          parser implementation. Then complete this section.
- <faq title='Controlling parser options'>
-  <q>How do I control the various parser options?</q>
-  <a>TBD</a>
- </faq>
- -->
- <faq title='Handling Errors'>
-  <q>How do handle errors?</q>
-  <a>
-   <p>
-    You should register an error handler with the parser by supplying
-    a class which implements the <code>org.xml.sax.ErrorHandler</code>
-    interface. This is true regardless of whether your parser is a
-    DOM based or SAX based parser.
-   </p>
-   <p>
-    You can register an error handler on a <code>DocumentBuilder</code>
-    created using JAXP like this:
-   </p>
-   <source>import javax.xml.parsers.DocumentBuilder;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-ErrorHandler handler = new ErrorHandler() {
-    public void warning(SAXParseException e) throws SAXException {
-        System.err.println("[warning] "+e.getMessage());
-    }
-    public void error(SAXParseException e) throws SAXException {
-        System.err.println("[error] "+e.getMessage());
-    }
-    public void fatalError(SAXParseException e) throws SAXException {
-        System.err.println("[fatal error] "+e.getMessage());
-	throw e;
-    }
-};
-
-DocumentBuilder builder = /* builder instance */;
-builder.setErrorHandler(handler);</source>
-   <p>
-    You can also register an error handler on a SAXParser using JAXP
-    like this:
-   </p>
-   <source>import javax.xml.parsers.SAXParser;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-ErrorHandler handler = new ErrorHandler() {
-    public void warning(SAXParseException e) throws SAXException {
-        System.err.println("[warning] "+e.getMessage());
-    }
-    public void error(SAXParseException e) throws SAXException {
-        System.err.println("[error] "+e.getMessage());
-    }
-    public void fatalError(SAXParseException e) throws SAXException {
-        System.err.println("[fatal error] "+e.getMessage());
-	throw e;
-    }
-};
-
-SAXParser parser = /* parser instance */;
-parser.getXMLReader().setErrorHandler(handler);</source>
-  </a>
- </faq>
- <faq title='Controlling Entity Representation'>
-  <q>
-   How can I control the way that entities are represented in the DOM?
-  </q>
-  <a>
-   <p>
-    The feature 
-    <code>http://apache.org/xml/features/dom/create-entity-ref-nodes</code>
-    controls how entities appear in the DOM tree. When this feature
-    is set to true (the default), an occurance of an entity reference
-    in the XML document will be represented by a subtree with an 
-    EntityReference node at the root whose children represent the 
-    entity expansion.
-   </p>
-   <p>
-    If the property is false, an entity reference in the XML document
-    is represented by only the nodes that represent the entity 
-    expansion.
-   </p> 
-   <p>
-    In either case, the entity expansion will be a DOM tree 
-    representing the structure of the entity expansion, not a text
-    node containing the entity expansion as text.
-   </p>
-  </a>
- </faq>
- <faq title='What does &quot;non-validating&quot; mean?'>  
-  <q>
-   Why does &quot;non-validating&quot; not mean &quot;well-formedness 
-   checking only&quot;?
-  </q>
-  <a>
-   <p>
-    Using a &quot;non-validating&quot; parser does not mean that
-    only well-formedness checking is done! There are still many 
-    things that the XML specification requires of the parser, 
-    including entity substitution, defaulting of attribute values, 
-    and attribute normalization.
-   </p>
-   <p>
-    This table describes what &quot;non-validating&quot; really
-    means for &ParserName; parsers. In this table, "no DTD" 
-    means no internal or external DTD subset is present.
-   </p>
-   <table>
-    <tr>
-     <tn/>
-     <th colspan="2">non-validating parsers</th>
-     <th colspan="2">validating parsers</th>
-    </tr>
-    <tr>
-     <tn/>
-     <th>DTD present</th>
-     <th>no DTD</th>
-     <th>DTD present</th>
-     <th>no DTD</th>
-    </tr>
-    <tr>
-     <th>DTD is read</th>
-     <td>Yes</td>
-     <td>No</td>
-     <td>Yes</td>
-     <td>Error</td>
-    </tr>
-    <tr>
-     <th>entity substitution</th>
-     <td>Yes</td>
-     <td>No</td>
-     <td>Yes</td>
-     <td>Error</td>
-    </tr>
-    <tr>
-     <th>defaulting of attributes</th>
-     <td>Yes</td>
-     <td>No</td>
-     <td>Yes</td>
-     <td>Error</td>
-    </tr>
-    <tr>
-     <th>attribute normalization</th>
-     <td>Yes</td>
-     <td>No</td>
-     <td>Yes</td>
-     <td>Error</td>
-    </tr>
-    <tr>
-     <th>checking against model</th>
-     <td>No</td>
-     <td>No</td>
-     <td>Yes</td>
-     <td>Error</td>
-    </tr>
-   </table>
-  </a>
- </faq>
- <faq title='Associating Data with a Node'>
-  <q>How do I associate my own data with a node in the DOM tree?</q>
-  <a>
-   <p>
-    The class <code>org.apache.xerces.dom.NodeImpl</code> provides a 
-    <code>void setUserData(Object o)</code> and an <code>Object 
-    getUserData()</code> method that you can use to attach any object
-    to a node in the DOM tree.
-   </p>
-   <p>
-    Beware that you should try and remove references to your data on
-    nodes you no longer use (by calling <code>setUserData(null)</code>,
-    or these nodes will not be garbage collected until the entire
-    document is garbage collected.
-   </p>
-  </a>
- </faq>
- <faq title='Parsing Several Documents'>
-  <q>
-   How do I more efficiently parse several documents sharing a 
-   common DTD?
-  </q>
-  <a>
-   <p>
-    DTDs are not currently cached by the parser. The common DTD, 
-    since it is specified in each XML document, will be re-parsed 
-    once for each document.
-   </p>
-   <p>
-    However, there are things that you can do now, to make the 
-    process of reading DTD's more efficient:
-   </p>
-   <ul>
-    <li>keep your DTD and DTD references local</li>
-    <li>use internal DTD subsets, if possible</li>
-    <li>load files from server to local client before parsing</li>
-    <li>
-     Cache document files into a local client cache. You should do an 
-     HTTP header request to check whether the document has changed, 
-     before accessing it over the network.
-    </li>
-    <li>
-     Do not reference an external DTD or internal DTD subset at all. 
-     In this case, no DTD will be read.
-    </li>
-    <li>
-     Use a custom <code>EntityResolver</code> and keep common 
-     DTDs in a memory buffer.
-    </li>
-   </ul>
-  </a>
- </faq>
- <!--
-   - REVISIT: Rewrite this section with better information.
- <faq title='How do I read data from a stream as it arrives?'>
-  <q>How do I read data from a stream as it arrives?</q>
-  <a>
-   <p>There are 2 problems you have to deal with:</p>
-   <ol>
-    <li>
-     The Apache parsers terminate when they reach end-of-file; with 
-     a data stream, unless the sender drops the socket, you have no
-     end-of-file, so you need to terminate in some other way
-    </li>
-    <li>
-     The Apache parsers close the input stream on termination, and 
-     this closes the socket; you normally don't want this, because 
-     you'll want to send an ack to the data stream source, and you
-     may want to have further exchanges on the socket anyway.
-    </li>
-   </ol>
-   <p>Terminating the parse</p>
-   <p>
-    One way that works forSAX is to throw an exception when you
-    detect the logical end-of-document.
-   </p>
-   <p>
-    For instance, in your class extending DefaultHandler, you can 
-    have:
-   </p>
-   <source>public class DocProcessor extends DefaultHandler {
-    private int level;
-    .
-    .
-    public void startElement(String uri,
-                             String localName,
-                             String raw,
-                             Attributes attrs) throws SAXException
-    {
-        ++level;
-    }
-
-    public void endElement (String namespaceURI,
-                            String localName,
-                            String qName) throws SAXException
-    {
-        level = level - 1;
-        if (level == 0) {
-            throw new SAXException ("Finished");
-        }
-    }</source>
-  <p>Preventing the parser from closing the socket</p>
-  <p>
-   One way is to subclass BufferedReader to provide an empty close 
-   method. So, invoke the parser as follows:
-  </p>
-  <source>Socket socket;
-
-    // code to set the socket
-
-    parser.parse(new InputSource(new MyBufferedReader(new InputStreamReader(socket.getInputStream()))));
-    .
-    .
-    class MyBufferedReader extends BufferedReader
-    {
-        public MyBufferedReader(InputStreamReader i) {
-            super(i);
-        }
-
-        public void close() {
-        }
-    }</source>
-  </a>
- </faq>
- -->
-</faqs>
diff --git a/docs/features.xml b/docs/features.xml
deleted file mode 100644
index 21434f7..0000000
--- a/docs/features.xml
+++ /dev/null
@@ -1,314 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE features SYSTEM 'dtd/settings.dtd'>
-<features>
- <desc name='Setting Features'>
-  <p>
-   If you have created a DOM document builder or a SAX parser using
-   the JAXP interfaces, you may have difficulty setting features and
-   properties directly using those interfaces. The following
-   instructions tell you how to set features on document builders
-   and SAX parsers created from the JAXP interfaces.
-  </p>
-  <p>
-   The DocumentBuilderFactory interface contains a 
-   <code>setAttribute(String,Object)</code> method which <em>may</em>
-   provide a means to set features and properties on the underyling
-   parser. However, it cannot be relied upon. Therefore, you must
-   use the Xerces DOMParser object directly. For example:
-  </p>
-  <source>import org.apache.xerces.parsers.DOMParser;
-import org.xml.sax.SAXException;
-  
-DOMParser parser = new DOMParser();
-try {
-    parser.setFeature("http://xml.org/sax/features/allow-java-encodings", 
-                      true);
-} 
-catch (SAXException e) {
-    System.err.println("could not set parser feature");
-}</source>
-  <p>
-   Using the SAXParser interface in JAXP is better because you can
-   query the underlying XMLReader implementation directly and that
-   interface contains methods to set and query features and 
-   properties. For example:
-  </p>
-  <source>import javax.xml.parsers.SAXParser;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-SAXParser parser = /* created from SAXParserFactory */;
-XMLReader reader = parser.getXMLReader();
-try {
-    reader.setFeature("http://xml.org/sax/features/allow-java-encodings", 
-                      true);
-} 
-catch (SAXException e) {
-    System.err.println("could not set parser feature");
-}</source>
- </desc>
- <fcategory name='General Features'>
-  <feature name='http://xml.org/sax/features/namespaces'
-           id='namespaces'>
-   <true>
-    Perform namespace processing: prefixes will be stripped off 
-    element and attribute names and replaced with the corresponding 
-    namespace URIs. By default, the two will simply be concatenated, 
-    but the namespace-sep core property allows the application to 
-    specify a delimiter string for separating the URI part and the 
-    local part.
-   </true>
-   <false>Do not perform namespace processing.</false>
-   <default value='true'/>
-   <access parsing='read-only' not-parsing='read-write'/>
-   <note>
-    If the validation feature is set to true, then the document 
-    must contain a grammar that supports the use of namespaces.
-   </note>
-   <see idref='namespace-prefixes'/>
-   <see idref='validation'/>
-  </feature>
-  <feature name='http://xml.org/sax/features/validation' 
-           id='validation'>
-   <true>Validate the document and report validity errors.</true>
-   <false>Do not report validity errors.</false>
-   <default value='false'/>
-   <access parsing='read-only' not-parsing='read-write'/>
-   <note>
-    If this feature is set to true, the document must specify 
-    a grammar. By default, validation will occur against DTD. For more information, please, refer to the  <link idref='faq-pcfp'>FAQ</link>.
-    If this feature is set to false, and document specifies a grammar 
-    that grammar might be parsed but no validation of the document contents 
-    will be performed.
-   </note>
-   <see idref='validation.dynamic'/>
-   <see idref='namespaces'/>
-   <see idref='nonvalidating.load-external-dtd'/>
-  </feature>
-  <feature name='http://apache.org/xml/features/validation/dynamic'
-           id='validation.dynamic'>
-   <true>
-    The parser will validate the document only if a grammar is 
-    specified.
-   </true>
-   <false>
-    Validation is determined by the state of the <ref>validation</ref>
-    feature.  
-   </false>
-   <default value='false'/>
-   <see idref='validation'/>
-  </feature>
-  <feature name='http://apache.org/xml/features/validation/schema'
-           id='validation.schema'>
-   <true>Turn on XML Schema validation by inserting XML Schema validator in the pipeline.
-   </true>
-   <false>Do not report validation errors against XML Schema.</false>
-   <default value='false'/>   
-   <access parsing='read-only' not-parsing='read-write'/>
-   <note> Validation errors will only be reported if <link anchor="validation">validation feature</link> is set to true. For more information, please, refer to the <link idref='faq-pcfp'>FAQ</link>
-   </note>  
-   <see idref='validation'/>
-   <see idref='validation.dynamic'/>
-   <see idref='namespaces'/>
-  </feature>
-  <feature name='http://apache.org/xml/features/validation/schema-full-checking'
-           id='validation.schema-full-checking'>
-   <true>
-    Enable full schema grammar constraint checking, including checking 
-    which may be time-consuming or memory intensive. Currently, particle 
-    unique attribution constraint checking and particle derivation 
-    resriction checking are controlled by this option. 
-   </true>
-   <false>Disable full constraint checking.</false>
-   <default value='false'/>
-   <note>
-    This feature checks the Schema grammar itself for additional 
-    errors that are time-consuming or memory intensive. It does
-    <strong>not</strong> affect the level of checking performed on
-    document instances that use Schema grammars.
-   </note>
-  </feature>
-  <feature name='http://xml.org/sax/features/external-general-entities'
-           id='external-general-entities'>
-   <true>Include external general entities.</true>
-   <false>Do not include external general entities.</false>
-   <default value='true'/>
-   <access parsing='read-only' not-parsing='read-write'/>
-   <see idref='external-parameter-entities'/>
-  </feature>
-  <feature name='http://xml.org/sax/features/external-parameter-entities'
-           id='external-parameter-entities'>
-   <true>
-    Include external parameter entities and the external DTD subset.
-   </true>
-   <false>
-    Do not include external parameter entities or the external DTD subset.
-   </false>
-   <default value='true'/>
-   <access parsing='read-only' not-parsing='read-write'/>
-   <see idref='external-general-entities'/>
-  </feature>
-  <feature name='http://apache.org/xml/features/validation/warn-on-duplicate-attdef'
-           id='validation.warn-on-duplicate-attdef'>
-   <true>Report a warning when a duplicate attribute is re-declared.</true>
-   <false>
-    Do not report a warning when a duplicate attribute is re-declared.
-   </false>
-   <default value='false'/>
-  </feature>
-  <feature name='http://apache.org/xml/features/validation/warn-on-undeclared-elemdef'
-           id='validation.warn-on-undeclared-elemdef'>
-   <true>
-    Report a warning if an element referenced in a content model is 
-    not declared.
-   </true>
-   <false>
-    Do not report a warning if an element referenced in a content model
-    is not declared.  
-   </false>
-   <default value='false'/>
-  </feature>
-  <feature name='http://apache.org/xml/features/allow-java-encodings'
-           id='allow-java-encodings'>
-   <true>Allow Java encoding names in XMLDecl and TextDecl line.</true>
-   <false>
-    Do not allow Java encoding names in XMLDecl and TextDecl line.
-   </false>
-   <default value='false'/>
-   <note>
-    A true value for this feature allows the encoding of the file to
-    be specified as a Java encoding name as well as the standard ISO
-    encoding name. Be aware that other parsers may not be able to use
-    Java encoding names. If this feature is set to false, an error 
-    will be generated if Java encoding names are used.  
-   </note>
-  </feature>
-  <feature name='http://apache.org/xml/features/continue-after-fatal-error'
-           id='continue-after-fatal-error'>
-   <true>Attempt to continue parsing after a fatal error.</true>
-   <false>Stops parse on first fatal error.</false>
-   <default value='false'/>
-   <note>
-    The behavior of the parser when this feature is set to 
-    <code>true</code> is <strong>undetermined</strong>! Therefore use
-    this feature with extreme caution because the parser may get stuck
-    in an infinite loop or worse.
-   </note>
-  </feature>
-  <feature name='http://apache.org/xml/features/nonvalidating/load-dtd-grammar'
-           id='nonvalidating.load-dtd-grammar'>
-   <true>
-    Load the DTD and use it to add default attributes and set attribute 
-    types when parsing.
-   </true>
-   <false>
-    Build the grammar but do not use the default attributes and attribute
-    types information it contains.
-   </false>
-   <default value='true'/>
-   <note>This feature is always on when validation is on.</note>
-   <see idref='validation'/>
-   <see idref='nonvalidating.load-external-dtd'/>
-  </feature>
-  <feature name='http://apache.org/xml/features/nonvalidating/load-external-dtd'
-           id='nonvalidating.load-external-dtd'>
-   <true>Load the external DTD.</true>
-   <false>Ignore the external DTD completely.</false>
-   <default value='true'/>
-   <note>This feature is always on when validation is on.</note>
-   <see idref='validation'/>
-   <see idref='nonvalidating.load-dtd-grammar'/>
-  </feature>
- </fcategory>
- <fcategory name='DOM Features'>
-  <feature name='http://apache.org/xml/features/dom/defer-node-expansion'
-           id="dom.defer-node-expansion">
-   <true>
-    Lazily expand the DOM nodes.
-   </true>
-   <false>
-    Fully expand the DOM nodes.
-   </false>
-   <default value='true'/>
-   <note>
-<!--
-    This feature only applies when the <link idref="properties"
-    anchor="document-class-name">http://apache.org/xml/properties/dom/document-class-name</link>
-    property is set to a value other than the name of the default document
-    factory.
--->
-    When this feature is set to true, the DOM nodes in the returned document
-    are expanded as the tree is traversed. This allows the parser to return a
-    document faster than if the tree is fully expanded during parsing and
-    improves memory usage when the whole tree is not traversed.
-   </note>
-  </feature>
-  <feature name='http://apache.org/xml/features/dom/create-entity-ref-nodes'
-           id='dom.create-entity-ref-nodes'>
-   <true>
-    Create <code>EntityReference</code> nodes in the DOM tree. The 
-    <code>EntityReference</code> nodes and their child nodes will be 
-    read-only.  
-   </true>
-   <false>
-    Do not create <code>EntityReference</code> nodes in the DOM tree. 
-    No <code>EntityReference</code> nodes will be created, only the 
-    nodes corresponding to their fully expanded sustitution text will 
-    be created.  
-   </false>
-   <default value='true'/>
-   <note>
-    This feature only affects the appearance of <code>EntityReference</code>
-    nodes in the DOM tree. The document will always contain the entity
-    reference child nodes.  
-   </note>
-  </feature>
-  <feature name='http://apache.org/xml/features/dom/include-ignorable-whitespace'
-           id='dom.include-ignorable-whitespace'>
-   <true>
-    Include text nodes that can be considered "ignorable whitespace" in 
-    the DOM tree.
-   </true>
-   <false>Do not include ignorable whitespace in the DOM tree.</false>
-   <default value='true'/>
-   <note>
-    The only way that the parser can determine if text is ignorable 
-    is by reading the associated grammar and having a content model for
-    the document. When ignorable whitespace text nodes are included in 
-    the DOM tree, they will be flagged as ignorable. The ignorable flag
-    can be queried by calling the 
-    <code>TextImpl#isIgnorableWhitespace():boolean</code> method.  
-   </note>
-  </feature>
- </fcategory>
- <fcategory name='SAX Features'>
-  <feature name='http://xml.org/sax/features/namespace-prefixes'
-           id='namespace-prefixes'>
-   <true>
-    Report the original prefixed names and attributes used for namespace
-    declarations.
-   </true>
-   <false>
-    Do not report attributes used for Namespace declarations, and 
-    optionally do not report original prefixed names.
-   </false>
-   <default value='false'/>
-   <access parsing='read-only' not-parsing='read-write'/>
-  </feature>
-  <feature name='http://xml.org/sax/features/string-interning'
-           id='string-interning'>
-   <true>
-    All element names, prefixes, attribute names, namespace URIs, and
-    local names are internalized using the
-    <code>java.lang.String#intern(String):String</code> method.
-   </true>
-   <false>Names are not necessarily internalized.</false>
-   <default value='false'/>
-   <access parsing='read-only' not-parsing='read-write'/>
-   <note>
-    &ParserName; always internalizes all strings mentioned above
-    using the <code>String#intern()</code> method.
-   </note>
-  </feature>
- </fcategory>
-</features>
diff --git a/docs/install.xml b/docs/install.xml
deleted file mode 100644
index 7ba1d08..0000000
--- a/docs/install.xml
+++ /dev/null
@@ -1,169 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='Installation'>
- <s2 title='Unpacking the Files'>
-  <p>
-   &ParserName; is packaged as a ZIP file for all platforms 
-   and operating systems. The parser release is also packaged
-   as Tar GZip files as a convenience for UNIX users. You can
-   extract the ZIP files using the Java <ref>jar</ref> command
-   to unpack the distribution.
-  </p>
-  <source>jar xf &ParserName;-bin.&parserversion;.zip
-jar xf &ParserName;-src.&parserversion;.zip
-jar xf &ParserName;-tools.&parserversion;.zip</source>
-  <p>
-   All of these commands create a sub-directory called
-   "&parserdir;" in the current directory, except for the command to unpack
-   the &quot;tools&quot; distribution, since you may install this anywhere you like.
-  </p>
- </s2>
- <s2 title='Files in the Binary Package'>
-  <table>
-   <tr>
-    <td>LICENSE</td>
-    <td>License for &ParserName;</td>
-   </tr>
-   <tr>
-    <td>Readme.html</td>
-    <td>Web page redirect to docs/html/index.html</td>
-   </tr>
-   <tr>
-    <td>xercesImpl.jar</td>
-    <td>Jar file containing all the parser class files that implement
-    one of the standard API&apos;s supported by the parser</td>
-   </tr>
-   <tr>
-    <td>xmlParserAPIs.jar</td>
-    <td>Jar file containing all the standard API&apos;s implemented by
-    the parser.  Currently, &ParserName; supports DOM level 2, SAX
-    2.0 R2 PR1, and the <code>javax.xml.parsers</code> part of JAXP
-    1.1.  </td>
-   </tr>
-   <tr>
-    <td>xercesSamples.jar</td>
-    <td>Jar file containing all sample class files</td>
-   </tr>
-   <tr>
-    <td>data/</td>
-    <td>Directory containing sample XML data files</td>
-   </tr>
-   <tr>
-    <td>docs/</td>
-    <td>Directory containing documentation</td>
-   </tr>
-   <tr>
-    <td>docs/javadocs/</td>
-    <td>Directory containing Javadoc API for parser framework</td>
-   </tr>
-   <tr>
-    <td>samples/</td>
-    <td>Directory containing the source code for the samples</td>
-   </tr>
-  </table>
-  <note>
-   To use &ParserName; you do not need the source files. 
-   However, if you want to recompile the sources you need to
-   download the source package and have the contents of the tools
-   package (or equivalent) available.
-  </note>
- </s2>
- <s2 title='Files in the Source Package'>
-  <table>
-   <tr>
-    <td>LICENSE</td>
-    <td>License for &ParserName;</td>
-   </tr>
-   <tr>
-    <td>build.bat</td>
-    <td>Batch file for invoking Ant build for Windows users</td>
-   </tr>
-   <tr>
-    <td>build.sh</td>
-    <td>Shell script for invoking Ant build for UNIX users</td>
-   </tr>
-   <tr>
-    <td>build.xml</td>
-    <td>Ant build file -- read README file before building</td>
-   </tr>
-   <tr>
-    <td>README</td>
-    <td>Build instructions</td>
-   </tr>
-   <tr>
-    <td>Readme.html</td>
-    <td>Web page redirect required for building documentation</td>
-   </tr>
-   <tr>
-    <td>STATUS</td>
-    <td>Current source code status information</td>
-   </tr>
-   <tr>
-    <td>TODO</td>
-    <td>Current list of "todo" items</td>
-   </tr>
-   <tr>
-    <td>ISSUES</td>
-    <td>Current open issues that need to be resolved</td>
-   </tr>
-   <tr>
-    <td>data/</td>
-    <td>Directory containing sample XML data files</td>
-   </tr>
-   <tr>
-    <td>docs/</td>
-    <td>Directory containing documentation, in XML form</td>
-   </tr>
-   <tr>
-    <td>samples/</td>
-    <td>Directory containing source code for samples</td>
-   </tr>
-   <tr>
-    <td>src/</td>
-    <td>
-     Directory containing source code for parser and supplemental 
-     APIs
-    </td>
-   </tr>
-  </table>
-  <note>
-   In order to compile the source code using Ant or to build the
-   release distributions yourself, you must have the contents of 
-   <code>&ParserName;-tools.&parserversion;.zip</code>
-   on your classpath; i.e., you will need access to a version of ant,
-   xalan, StyleBook and an XML parser such as xerces.
-   For ease of use, we recommend extracting
-   <code>&ParserName;-tools.&parserversion;.zip</code>
-   in your xerces root directory; the build.sh and build.bat scripts
-   are written for this case.
-  </note>
- </s2>
- <s2 title='Changes in Xerces jar files'>
- <p>In order to accomodate the very common case in which xerces is
- used with an XSL processor such as xalan, between Xerces 2.0.0 beta 3
- and beta 4 a change in the default organization of xerces&apos;s jar
- files was introduced.  As well as the <code>xercesSamples.jar</code>
- file, which we still produce, xerces formerly came with a file called
- <code>xerces.jar</code>.  This file contained all of the
- parser&apos;s functionality.  Two files are now included:
- <code>xercesImpl.jar</code>, our implementation of various API&apos;s,
- and <code>xmlParserAPIs.jar</code>, the API&apos;s themselves.  This
- was done so that, if your XSLT processor ships with API&apos;s at the
- same level as those supported by &ParserName;, you can avoid putting
- <code>xmlParserAPIs.jar</code> on your classpath.</p>
- <p>Should you wish to use the old form of the jarfiles, we have
- included several ant targets for backward compatibility.  An
- &quot;ant target&quot; is an argument given to ant, our build tool,
- that tells it which portions of the <code>build.xml</code> file to
- apply.  If you are on a Windows system and you wish to get only the
- old xerces jar files, you would execute <code>build.bat
- oldjars</code>.  If you want to regenerate new versions of the xerces
- binary, source and tools distributions with the old-style jarfiles,
- you would execute <code>build.bat oldall</code>.  The situation is
- analogous for Unix users, except that <code>build.sh</code> would be
- used instead of <code>build.bat</code>.  For further information and
- more options, please look inside build.xml itself; all possibilities
- are documented there.
- </p>
-</s2>
-</s1>
diff --git a/docs/limitations-schema.xml b/docs/limitations-schema.xml
deleted file mode 100644
index 76345f6..0000000
--- a/docs/limitations-schema.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title="Schema Implementation Limitations">
-	<s2 title="Introduction">
-		<p>This package contains an implementation of the W3C XML 
-		Schema Language, a recommendation of the Worldwide Web Consortium
-        available in three parts:  
-		<jump href="http://www.w3.org/TR/XMLSchema-0">XML Schema:  Primer</jump>  and
-		<jump href="http://www.w3.org/TR/XMLSchema-1">XML Schema:  Structures</jump>  and
-		<jump href="http://www.w3.org/TR/XMLSchema-2">XML Schema:  Datatypes</jump>. 
-        We consider this implementation to be complete except for the
-        limitations cited below.  The implementation has been
-        extensively tested and known problem areas are set out below.
-        In this document we also discuss our interpretation of the
-        specifications where it seems to us particularly likely that
-        others might arrive at a different interpretation.
-        Please read this document before using this package.
-        </p>
-	</s2>
-	<s2 title="Limitations">
-        <ul>
-            <li> Length, minLength, and maxLength facets are limited to the value 
-            2147483647. Items larger than this limit will not be validated 
-            correctly.</li>
-            <li> Year and seconds values in date/time datatypes are limited to the 
-            value 2147483647. Items larger than this limit will not be validated 
-            correctly. </li>
-        </ul>
-    </s2>
-    <s2 title='Problem Areas/Known Bugs'>
-        <ul>
-            <li> Due to changes in the specification for Decimals in
-            JDK1.3, not all decimals that should be invalid according
-            to the Schema specs may be found by the parser;</li>
-            <li> When the same schema document is both imported and
-            included by the same schema document, only the first one
-            takes effect;</li>
-            <li> If an imported/included/redefined schema document is
-            specified via a relative path, the parser may not
-            always succeed in locating the document.  Please implement and register a SAX
-            EntityResolver (<code>org.xml.sax.EntityResolver</code>) to customize
-            the parser&apos;s behaviour to your situation;</li>
-        </ul>
-    </s2>
-    <s2 title='Interpretation of Areas that are Unclear or
-            Implementation-Dependent'>
-        <ul>
-            <li> QName: the specification does not define the unit of length. We 
-            chose to implement the length facet as being in units of XML characters 
-            in the value space ( # of chars in namespace URI + ":" +
-            local part );</li>
-            <li> We have interpreted the specs as requiring
-            &lt;keyref&gt; Identity Constraints to refer to
-            &lt;key&gt; or &lt;unique&gt; identity constraints within
-            the scope of the elements to which the &lt;keyref&gt; is
-            attached.  This interpretation is at variance with the
-            Schema Primer, which contains an example with a
-            &lt;keyref&gt; declared on an element used inside the
-            element of its corresponding &lt;key&gt;;</li>
-        </ul>
-    </s2>
-	<s2 title="Other Notes">
-        <p> The parsers contained in this package are able to read and
-        validate XML documents with the grammar specified in either
-        DTD or XML Schema format.  
-		The schema is specified by the xsi:schemaLocation or
-		xsi:noNamespaceSchemaLocation attribute on the root 
-		element of the document. The xsi prefix must be bound to the 
-		Schema document instance namespace, as specified by the
-		Recommendation. See the sample provided in the
-		Usage section.</p>
-	</s2>
-	<s2 title="Usage">
-		<p>In this release, schema validation has been integrated with the 
-		regular SAXParser and DOMParser classes. No special classes are 
-		required to parse documents that use a schema.</p>
-                <p>Each document that uses XML Schema grammars must specify the location of the
-                grammars it uses by using an xsi:schemaLocation attribute if they use
-        	namespaces, and an xsi:noNamespaceSchemaLocation attribute
-	        otherwise.  These are usually placed on the root / top-level element 
-		in the document, though they may occur on any element; for more details see XML
-                Schema Part 1 section 4.3.2. 
-		Here is an example with no target namespace: </p>
-<source>&lt;document
-  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
-  xsi:noNamespaceSchemaLocation='document.xsd'&gt;
-...
-&lt;/document&gt;</source>
-		<p>Here is an example with a target namespace. Note that it is an
-		error to specify a different namespace than the target namespace
-		defined in the Schema.</p>
-<source>&lt;document
-  xmlns='http://my.com'
-  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
-  xsi:schemaLocation='http://my.com document.xsd'&gt;
-...
-&lt;/document&gt;</source>
-		<p>Review the sample file, 'data/personal.xsd' for an example of an XML 
-		Schema grammar.</p>
-	</s2>
-</s1>
diff --git a/docs/limitations.xml b/docs/limitations.xml
deleted file mode 100644
index c2b07ee..0000000
--- a/docs/limitations.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='Limitations'>
- <s2 title='Known Limitations'>
-  <p>
-   This is a list of the limitations in this release of &ParserName;.
-   There is also a list of <link idref='limitations-schema'>
-   XML Schema limitations</link>.
-  </p>
-  <ul>
-   <li>
-    Due to a transcoding bug in the Sun JDK's (1.1.6, 1.1.7, 1.1.8, 1.2)
-    handling of EBCDIC data (specifically, end of line characters), you 
-    must use IBM's JDK 1.1.6, if you want to use EBCDIC support. The IBM 
-    JDK has the bug fixed.  We don't know when the bug fix will get into 
-    the Sun JDKs.
-   </li>
-  </ul>
- </s2>
-</s1>
diff --git a/docs/properties.xml b/docs/properties.xml
deleted file mode 100644
index 351e9fc..0000000
--- a/docs/properties.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE properties SYSTEM 'dtd/settings.dtd'>
-<properties>
- <desc name='Setting Properties'>
-  <p>
-   If you have created a DOM document builder or a SAX parser using
-   the JAXP interfaces, you may have difficulty setting features and
-   properties directly using those interfaces. The following
-   instructions tell you how to set properties on document builders
-   and SAX parsers created from the JAXP interfaces.
-  </p>
-  <p>
-   The DocumentBuilderFactory interface contains a 
-   <code>setAttribute(String,Object)</code> method which <em>may</em>
-   provide a means to set features and properties on the underyling
-   parser. However, it cannot be relied upon. Therefore, you must
-   use the Xerces DOMParser object directly. For example:
-  </p>
-  <source>import org.apache.xerces.parsers.DOMParser;
-import org.xml.sax.SAXException;
-  
-DOMParser parser = new DOMParser();
-
-String id    = "http://apache.org/xml/properties/dom/document-class-name";
-Object value = "org.apache.xerces.dom.DocumentImpl";
-try {
-    parser.setProperty(id, value);
-} 
-catch (SAXException e) {
-    System.err.println("could not set parser feature");
-}</source>
-  <p>
-   Using the SAXParser interface in JAXP is better because you can
-   query the underlying XMLReader implementation directly and that
-   interface contains methods to set and query features and 
-   properties. For example:
-  </p>
-  <source>import javax.xml.parsers.SAXParser;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-
-SAXParser parser = /* created from SAXParserFactory */;
-XMLReader reader = parser.getXMLReader();
-
-String id    = "http://apache.org/xml/properties/dom/document-class-name";
-Object value = "org.apache.xerces.dom.DocumentImpl";
-try {
-    reader.setProperty(id, value);
-} 
-catch (SAXException e) {
-    System.err.println("could not set parser feature");
-}</source>
- </desc>
- <pcategory name='General Properties'>
-  <property name='http://xml.org/sax/properties/xml-string'
-            id='xml-string'>
-   <desc>
-    Get the string of characters associated with the current event. 
-    If the parser recognizes and supports this property but is not
-    currently parsing text, it should return null.  
-   </desc>
-   <type>java.lang.String</type>
-   <access general='read-only'/>
-   <note>
-    This property is currently not supported because the contents of
-    the XML string returned by this property is not well defined.  
-   </note>
-  </property>
-  <property name='http://apache.org/xml/properties/schema/external-schemaLocation'
-            id='schema.external-schemaLocation'>
-   <desc>
-    The XML Schema Recommendation explicitly states that the inclusion
-    of schemaLocation/noNamespaceSchemaLocation attributes is only a 
-    hint; it does not mandate that these attributes must be used to 
-    locate schemas. Similar situation happens to &lt;import&gt; element in
-    schema documents. This property allows the user to specify a list of
-    schemas to use. If the targetNamespace of a schema (specified 
-    using this property) matches the targetNamespace of a schema 
-    occurring in the instance document in schemaLocation attribute, or
-    if the targetNamespace matches the namespace attribute of &lt;import&gt;
-    element, the schema specified by the user using this property will
-    be used (i.e., the schemaLocation attribute in the instance document
-    or on the &lt;import&gt; element will be effectively ignored).
-   </desc>
-   <type>java.lang.String</type>
-   <access general='read-write'/>
-   <note>
-    The syntax is the same as for schemaLocation attributes in 
-    instance documents: e.g, "http://www.example.com file_name.xsd". 
-    The user can specify more than one XML Schema in the list.   
-   </note>
-  </property>
-  <property name='http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation'
-            id='schema.external-noNamespaceSchemaLocation'>
-   <desc>
-    This property allows the user to specify an XML Schema with no 
-    namespace.
-   </desc>
-   <type>java.lang.String</type>
-   <access general='read-write'/>
-   <note>
-    The syntax is a same as for the noNamespaceSchemaLocation attribute 
-    that may occur in an instance document: e.g."file_name.xsd". The 
-    user may specify only one XML Schema. For more information see the
-    documentation for the 
-    http://apache.org/xml/properties/schema/external-schemaLocation 
-    property.
-   </note>
-  </property>
- </pcategory>
- <pcategory name='DOM Properties'>
-  <property name='http://apache.org/xml/properties/dom/current-element-node'
-            id='dom.current-element-node'>
-   <desc>The current DOM element node while parsing.</desc>
-   <type>org.w3c.dom.Element</type>
-   <access general='read-only'/>
-   <note>
-    This property is useful for determining the location with a DOM
-    document when an error occurs.
-   </note>
-  </property>
-  <property name='http://apache.org/xml/properties/dom/document-class-name'
-            id='dom.document-class-name'>
-   <desc>
-    The fully qualified class name of the DOM implementation. The
-    implementation used must have a zero argument constructor.  
-   </desc>
-   <type>java.lang.String</type>
-   <default value='"org.apache.xerces.dom.DocumentImpl"'/>
-   <access general='read-write'/>
-   <note>
-    When the document class name is set to a value other than the 
-    name of the default document factory, the deferred node expansion 
-    feature does not work.   
-   </note>
-  </property>
- </pcategory>
- <pcategory name='SAX Properties'>
-  <property name='http://xml.org/sax/properties/declaration-handler'
-            id='declaration-handler'>
-   <desc>Set the handler for DTD declarations.</desc>
-   <type>org.xml.sax.ext.DeclHandler</type>
-   <access general='read-write'/>
-  </property>
-  <property name='http://xml.org/sax/properties/lexical-handler'
-            id='lexical-handler'>
-   <desc>Set the handler for lexical parsing events.</desc>
-   <type>org.xml.sax.ext.LexicalHandler</type>
-   <access general='read-write'/>
-  </property>
-  <property name='http://xml.org/sax/properties/dom-node'
-            id='dom-node'>
-   <desc>
-    The DOM node currently being visited, if SAX is being used as
-    a DOM iterator. If the parser recognizes and supports this 
-    property but is not currently visiting a DOM node, it should 
-    return null.  
-   </desc>
-   <type>org.w3c.dom.Node</type>
-   <access parsing='read-only' not-parsing='read-write'/>
-   <note>
-    This property is only for SAX parser implementations used as
-    DOM tree walkers. Currently, Xerces does not have this
-    functionality.
-   </note>
-  </property>
- </pcategory>
-</properties>
diff --git a/docs/readme.xml b/docs/readme.xml
deleted file mode 100644
index eb387f7..0000000
--- a/docs/readme.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='&ParserNameLong; Readme'>
- <s2 title='&ParserNameLong; &ParserVersion; Release'>
-  <p>
-   Welcome to the future! Xerces2 is the next generation of
-   high performance, fully compliant XML parsers in the Apache
-   Xerces family. This new version of Xerces introduces the
-   Xerces Native Interface (XNI), a complete framework for
-   building parser components and configurations that is
-   extremely modular and easy to program. 
-  </p>
-  <p>
-   The Apache Xerces2 parser is the reference implementation 
-   of XNI but other parser components, configurations, and parsers
-   can be written using the Xerces Native Interface. For complete
-   design and implementation documents, refer to the 
-   <link idref='xni'>XNI Manual</link>.
-  </p>
-  <p>
-   <strong>Note:</strong> Since this is a beta release, bugs are
-   to be expected. Please use 
-   <jump href='http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=Xerces2-J'>BugZilla</jump>
-   to report any bugs that you find.
-  </p>
- </s2>
- <s2 title='Features of This Release'>
-  <p>
-   The &ParserNameLong; &ParserVersion; supports the
-   following standards and APIs:
-  </p>
-  <ul>
-   <li>
-    <jump href='http://www.w3.org/XML/'>eXtensible Markup Language</jump>
-    (XML) 1.0 
-    <jump href='http://www.w3.org/TR/2000/REC-xml-20001006'>Second 
-    Edition</jump> Recommendation
-   </li>
-   <li>
-    <jump href='http://www.w3.org/TR/REC-xml-names/'>Namespaces
-    in XML</jump> Recommendation
-   </li>
-   <li>
-    <jump href='http://www.w3.org/DOM/'>Document Object Model</jump>
-    (DOM) Level 2
-    <jump href='http://www.w3.org/TR/DOM-Level-2-Core/'>Core</jump>,
-    <jump href='http://www.w3.org/TR/DOM-Level-2-Events'>Events</jump>,
-    and
-    <jump href='http://www.w3.org/TR/DOM-Level-2-Traversal-Range'>Traversal
-    and Range</jump> Recommendations
-   </li>
-   <li>
-    <jump href='http://sax.sourceforge.net/'>Simple API for XML</jump>
-    (SAX) 2.0
-    <jump href='http://prdownloads.sourceforge.net/sax/sax2-r2pre2.jar'>Core</jump>,
-    and
-    <jump href='http://prdownloads.sourceforge.net/sax/sax2-ext-1.0.zip'>Extension</jump>
-   </li>
-   <li>
-    <jump href='http://java.sun.com/xml/xml_jaxp.html'>Java APIs for 
-    XML Processing</jump> (JAXP) 1.1
-   </li>
-   <li>
-    <jump href='http://www.w3.org/XML/Schema'>XML Schema</jump> 1.0
-    <jump href='http://www.w3.org/TR/xmlschema-1/'>Structures</jump>
-    and
-    <jump href='http://www.w3.org/TR/xmlschema-2/'>Datatypes</jump>
-    Recommendations
-   </li>
-   
-  </ul>
- </s2>
- <s2 title='Changes from Previous Release'>
-  <p>
-   Xerces2 release includes full XML Schema support with completely redesigned and rewritten XML Schema validation engine. For more information, refer to the 
-   <link idref='limitations-schema'>XML Schema Implementation</link> page. 
-  </p>
-  <p>
-   This release also provides a partial implementation of Document Object Model Level 3  
-    <jump href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010913/'>Core</jump>, 
-    <jump href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025/abstract-schemas.html'>Abstract Schemas</jump> and 
-    <jump href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025/load-save.html'>Load and Save</jump> Working Drafts. For more information, refer to the 
-   <link idref='dom3'>DOM Level 3 Implementation</link> page. 
-  </p>
-  <p>
-   The &ParserNameLong; &ParserVersion; introduced some changes to the Xerces Native
-   Interface. The following list enumerates the important changes:
-  </p>
-  <ul>
-   <li>The <code>Augmentations</code> interface was added to the core XNI interfaces.
-   </li>
-   <li>
-    The <code>XMLDocumentHandler</code> interface was modified to include <code>Augmentations</code> as an extra parameter for parser events. Getter methods were added to the <code>XMLAttributes</code> to query the <code>Augmentations</code>. 
-   </li>
-
-   <li>
-    The PSVI interfaces were added as an extention to the core XNI (still under development).
-   </li>
-  </ul>
-  <p>
-   For a more complete list of changes, refer to the 
-   <link idref='releases'>Release Information</link> page.
-  </p>	      
- </s2>
- <s2 title='Changes from Xerces 1.x'>
-  <p>
-   Xerces2 is a nearly complete rewrite of the Xerces 1.x codebase
-   in order to make the code cleaner, more modular, and easier to
-   maintain. Applications using only the standard interfaces such as
-   JAXP, DOM, and SAX should not see any differences.
-  </p>
- </s2>
- <s2 title='License Information'>
-  <p>
-   The &ParserName; &ParserVersion; release is available
-   in source code and precompiled binary (JAR files) form. 
-   Both &ParserName; packages are made available under the 
-   <jump href='http://xml.apache.org/LICENSE'>Apache Software
-   License</jump>.
-  </p>
- </s2>
-</s1>
diff --git a/docs/releases.xml b/docs/releases.xml
deleted file mode 100644
index 7fa2e9b..0000000
--- a/docs/releases.xml
+++ /dev/null
@@ -1,487 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- $Id$ -->
-<!DOCTYPE releases SYSTEM 'dtd/releases.dtd'>
-<releases>
- <release version='NOT YET RELEASED'>
-  <desc>
-  </desc>
-  <changes>
-   <add>
-    <note>Implemented support for UCS-4 and UCS-2 encodings.</note>
-    <submitter name='Neil Graham'/>
-   </add>
-   <add>
-    <note>Added internal subset string to DOM.</note>
-    <submitter name='Andy Clark'/>
-   </add>
-  </changes>
- </release>
- <release version='Xerces 2.0.0 (beta4)'>
-  <desc>
-   This release fixes a number of bugs, introduces more changes to the Xerces
-   Native Interface, provides partial experimental DOM Level 3 implementation,
-   and includes full XML Schema support.
-  </desc>
-  <changes>
-    <add>
-        <note> 
-            Implemented schema particle derivation restriction checking
-        </note>
-        <submitter name="Lisa Martin"/>
-    </add>
-    <add>
-        <note> 
-            Added checking for schema constraint cos-element-consistent 
-        </note>
-        <submitter name="Lisa Martin"/>
-    </add>
-    <fix>
-        <note> 
-            resolved misc. SAX2 bugs
-        </note>
-        <submitter name="Lisa Martin"/>
-    </fix>
-    <add>
-    <note>
-     Added implementation of DOMInputSource, DOMError, DOMLocator and wrappers
-     for entity resolver and error handler (DOM Level 3).
-    </note>
-    <submitter name='Gopal Sharma, Elena Litani'/>
-   </add>
-
-   <add>
-    <note>
-     Added implementation of DOMWriter, DocumentLS, DOMImplementationLS and new
-     features support for save and load: create-cdata-nodes,
-     split-cdata-sections (DOM Level 3).
-    </note>
-    <submitter name='Rahul Srivastava, Elena Litani'/>
-   </add>
-
-   <add>
-    <note>
-     Added implementation of DOMBuilder, DOMASBuilder and partial
-     implementation of ASModel.  Add support for a new feature
-     "include-comments" (DOM Level 3).
-    </note>
-    <submitter name='Pavani Mukthipudi, Neil Graham, Elena Litani'/>
-   </add>
-
-   <add>
-    <note>
-     Added Augmentations interface to core XNI interfaces and PSVI interfaces
-     as an extension to XNI (unstable). Added DOM Level 3 interfaces to
-     xerces.dom3 package. Modified samples accordingly.
-    </note>
-    <submitter name='Elena Litani'/>
-   </add>
-
-   <add>
-    <note>
-        Implemented split of xerces.jar file into an API-only jar file
-        (xmlParserAPIs.jar) and a jarfile containing only the API
-        implementation (xercesImpl.jar).
-     </note>
-     <submitter name="Neil Graham"/>
-    </add>
-
-   <update>
-    <note>
-     Modified XNI document handler interface to include Augmentations as an
-     extra parameter on each parser event. Modified XMLAttributes interface to
-     include getter methods for augmentations.
-    </note>
-    <submitter name='Elena Litani'/>
-   </update>
-
-   <add>
-    <note>
-     Implemented PSVI support in Xerces and added PSVIWriter, PSVIParser and
-     PSVIConfiguration sample files.
-    </note>
-    <submitter name='Arun Yadav, Elena Litani, Sandy Gao'/>
-   </add>
-   
-   <add>
-    <note>
-     Added "external-schemaLocation" and "external-noNamespaceSchemaLocation"
-     properties.
-    </note>
-    <submitter name='Sandy Gao'/>
-   </add>
-
-   <add>
-    <note>
-     New schema simple type interface and implementation. It fixes various bugs
-     in the old implementation, and provides enough information for PSVI
-     support.
-    </note>
-    <submitter name='Sandy Gao, Neeraj Bajaj'/>
-   </add>
-
-   <update>
-    <note>
-     Internalize all symbols in SymbolTable using
-     java.lang.String#intern(). Now applications can compare the symbols by
-     reference.
-    </note>
-    <submitter name='Sandy Gao'/>
-   </update>
-
-   <add>
-    <note>
-     Added "schema-full-checking" feature, and implemented "Unique Particle
-     Attribution" constraint.
-    </note>
-    <submitter name='Sandy Gao'/>
-   </add>
-
-   <fix>
-    <note>
-     Changed the default configuration to standard parser configuration (that
-     does not include XML Schema validator), modified how and when the pipeline
-     is constructed.
-    </note>
-    <submitter name='Elena Litani'/>
-   </fix>
-
-   <fix>
-    <note>
-     Changed XML Schema validation behavior back to validate only if the
-     http://xml.org/sax/features/validation feature is true. Note: XML Schema
-     validation is off by default.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-
-   <fix>
-    <note>
-     Added constructor to new DTDXSParserConfiguration so it can
-     share settings from a parent configuration.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
- 
-   <fix>
-    <note>
-     The parser no longer wraps RuntimeException with XNIException
-     in the parse method.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-
-   <fix>
-    <note>
-      Fixed cloneNode() for Entity, EntityReference and DocumentType. Fixed
-      importNode() of EntityReference nodes which mistakenly carried the old
-      value. Fixed handling EntityReference node subtrees that left the node
-      empty in non deferred DOM.
-    </note>
-    <submitter name='Arnaud Le Hors'/>
-   </fix>
-
-   <fix>
-    <note>
-     Added missing default attribute values in the DOM and fixed 
-     double entity value bug in deferred DOM.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-
-   <fix>
-    <note>
-     Fixed getElementById() in the DOMParser. Bound namespace attributes to
-     http://www.w3.org/2000/xmlns/ (DOM only).
-    </note>
-    <submitter name='Elena Litani'/>
-   </fix>
-
-    <fix>
-    <note>Various documentation fixes.</note>
-    <submitter name='Andy Clark, Elena Litani'/>
-   </fix>
-  
-   <add>
-    <note>
-     Added more DOM Level 3 interfaces to xerces.dom3 package. Implemented
-     DOMImplementationRegistry (DOMImplementationSource really),
-     Node.set/getTextContent(), Node.isSameNode(), Node.getInterface(),
-     Node.set/getUserData(). Extended dom.mem.Test to test these additions.
-    </note>
-    <submitter name='Arnaud Le Hors'/>
-   </add>
-
-   <add>
-    <note>
-        Added ASBuilder sample to the DOM samples package to show how
-        to use the new DOM level 3 ASBuilder interface to implement a
-        form of grammar caching.
-    </note>
-    <submitter name='Sandy Gao'/>
-   </add>
-
-   <fix>
-    <note>
-        Enabled the parser to process documents encoded in EBCDIC and
-        UTF-16.
-    </note>
-    <submitter name='Neil Graham'/>
-   </fix>
-  </changes>
- </release>
-
- <release version='Xerces 2.0.0 (beta3)'>
-  <desc>
-   This release fixes a number of bugs, introduces some changes to
-   the Xerces Native Interface, and is the first Xerces2 release to
-   include XML Schema validation support. Please note that the XML
-   Schema validation code was completely rewritten for Xerces2 and
-   should be considered alpha at this time.
-  </desc>
-  <changes>
-  
- <add>
-    <note>
-     Redesigned and rewrote XML Schema validation code. Also updated
-     standard parser configuration to include the XML Schema validator 
-     in the document pipeline by default.
-    </note>
-    <submitter name='Sandy Gao, Lisa Martin, Neil Graham, Elena Litani, Rahul Srivastava, Gopal Sharma, Pavani Mukthipudi, Neeraj Bajaj'/>
-   </add>
-
-  <add>
-    <note>
-     Added new default parser configuration that includes DTD and XML Schema
-     validators (DTDXSParserConfiguration). Implemented dynamic validation for
-     both validators.
-    </note>
-    <submitter name='Sandy Gao, Elena Litani'/>
-   </add>
-   
-  <fix>
-    <note>
-     Synced up javax.xml.parsers package with latest code from xml-commons
-  module and various bug fixes.
-    </note>
-    <submitter name='Edwin Goei'/>
-   </fix> 
-   <fix>
-    <note>
-    DOM/ DOMParser bug fixes. 
-    </note>
-    <submitter name='Ted Leung, Andy Clark, Elena Litani, Arun Yadav'/>
-   </fix> 
-
-
-   <fix>
-    <note>
-     Fixed newline normalization bug. Previously, the sequence #x0A #x0D
-     was being converted to #x0A instead of #x0A #x0A per section 2.11 of
-     the XML 1.0 specification. Thanks to Aleksander Slominski for the
-     bug report.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <update>
-    <note>
-     Added getter methods to XMLParserConfiguration interface and added
-     filter interfaces for components that consume and produce document 
-     and DTD information.
-    </note>
-    <submitter name='Andy Clark'/>
-   </update>
-   <fix>
-    <note>
-     Fixed DTD scanner from reporting entity boundaries appearing
-     inside of markup declarations. Entity boundaries appearing
-     in the content model of an element declaration is still
-     reported, though.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <update>
-    <note>
-     Simplified XMLAttributes interface by removing the methods
-     related to entities appearing in attribute values.
-    </note>
-    <submitter name='Andy Clark'/>
-   </update>
-   <update>
-    <note>
-     Changed the XMLDTDHandler defined in XNI to add a non-normalized 
-     value parameter to the internal element declaration callback. Also
-     implemented the non-normalized value for attribute values.
-    </note>
-    <submitter name='Andy Clark'/>
-   </update>
-   <fix>
-    <note>
-     Fixed bug in entity manager that would never resolve IANA encoding
-     names to Java encoding names properly. (Bug #3449) 
-    </note>
-    <submitter name='Pavani Mukthipudi' mailto='Pavani.Mukthipudi@sun.com'/>
-   </fix>
-   <fix>
-    <note>
-     Fixed bug in SAX parser that was not forwarding external entity
-     declarations in the DTD. (Bug #3392)
-    </note>
-    <submitter name='Neeraj Bajaj' mailto='Neeraj.Bajaj@sun.com'/>
-   </fix>
-   <add>
-    <note>
-     Separated the XMLDocumentScannerImpl class so that it derives
-     from XMLDocumentFragmentScannerImpl which enables an
-     application to parse document fragments.
-    </note>
-    <submitter name='Andy Clark'/>
-   </add>
-   <add>
-    <note>
-     Ported the deferred DOM implementation from the Xerces 1.x
-     codebase.
-    </note>
-    <submitter name='Arnaud  Le Hors'/>
-   </add>
-  </changes>
- </release>
- <release version='&ParserName; 2.0.0 (beta2)'>
-  <desc>
-   This is primarily a bug fix release. However, a new XNI
-   interface and additional documentation have been added.
-  </desc>
-  <changes>
-   <fix>
-    <note>
-     Fixed bug for when namespace bindings were added as default
-     attributes from the DTD.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <fix>
-    <note>
-     Fixed Xerces2 standard components to properly recognize and use
-     the features and properties that they are documented to accept.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <add>
-    <note>
-     Added documentation to the XNI Manual for re-using the Xerces2
-     parser components.
-    </note>
-    <submitter name='Andy Clark'/>
-   </add>
-   <update>
-    <note>
-     Moved Xerces 1.x to "xerces_j_1" branch and moved Xerces2 to the main 
-     trunk of the "xml-xerces" module.
-    </note>
-    <submitter name='Arnaud  Le Hors'/>
-   </update>
-   <fix>
-    <note>
-     Improved ability of document and DTD scanners to perform pull parsing.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <fix>
-    <note>
-     Fixed bug where namespace binder would turn an emptyElement callback into
-     startElement and endElement callbacks.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <update>
-    <note>
-     Updated standard parser configuration to separate DTD validation
-     and namespace binding in the parsing pipeline.
-    </note>
-    <submitter name='Andy Clark'/>
-   </update>
-   <remove>
-    <note>
-     Removed old XML Schema code that was not being used. This code 
-     is intended to be replaced by either a port of the Xerces 1.x 
-     XML Schema implementation or by a re-designed, re-implemented
-     XML Schema implementation.
-    </note>
-    <submitter name='Andy Clark'/>
-   </remove>
-   <fix>
-    <note>
-     Fixed bug in scanner that allowed the built-in entity references
-     to be sent via XNI. The default value for this feature should have
-     been false.
-    </note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <fix>
-    <note>Fixed several SAX bugs.</note>
-    <submitter name='Andy Clark'/>
-   </fix>
-   <update>
-    <note>
-     Synchronized DOM implementation code from Xerces 1.x codebase.
-    </note>
-    <submitter name='Andy Clark'/>
-   </update>
-  </changes>
- </release>
- <release version='&ParserName; 2.0.0 (beta)'>
-  <desc>
-   First beta release of the Xerces2 code. Besides numerous bug 
-   fixes, this release has changes and additions to XNI. The new
-   XNI parser configuration framework has been added in this release.
-   Refer to the <link idref='xni'>XNI Manual</link> for complete
-   information.
-  </desc>
-  <changes>
-   <add>
-    <note>
-     Added document and DTD scanner interfaces to XNI to allow
-     parser configuration pipelines to be constructed generically.
-    </note>
-    <submitter name='Andy Clark'/>
-   </add>
-   <fix>
-    <note>
-     Fixed bug in DTD grammar for mixed content models that was 
-     building the wrong validation content model.
-    </note>
-    <submitter name='Sandy Gao'/>
-   </fix>
-   <update>
-    <note>
-     Removed SAX dependency from XNI framework. Now the only
-     dependence on external API such as SAX is in the implementation
-     of the AbstractSAXParser and DOMParser so that legacy code
-     doesn't break.
-    </note>
-    <submitter name='Andy Clark'/>
-   </update>
-   <update>
-    <note>
-     Rewrote existing documentation, added XNI information, cleaned
-     up stylesheets, and converted some docs to use custom DTDs.
-    </note>
-    <submitter name='Andy Clark'/>
-   </update>
-   <fix>
-    <note>DTD method ordering problem for INCLUDE/IGNORE sections.</note>
-    <submitter name='Petr Kuzel'/>
-   </fix>
-   <update>
-    <note>Improved DFA build-time performance.</note>
-    <submitter name='ATOZAWA@jp.ibm.com' mailto='ATOZAWA@jp.ibm.com'/>
-   </update>
-   <update>
-    <note>Synchronized with Xerces 1.3.0</note>
-    <submitter name='Arnaud  Le Hors'/>
-   </update>
-  </changes>
- </release>
- <release version='&ParserName; 2.0.0 (alpha)'>
-  <desc>Initial alpha release of Xerces2 code.</desc>
- </release>
-</releases>
diff --git a/docs/samples-dom.xml b/docs/samples-dom.xml
deleted file mode 100644
index 1cc45b5..0000000
--- a/docs/samples-dom.xml
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='DOM Samples'>
- <s2 title='Overview'>
-  <p>
-   This page documents the various Document Object Model (DOM)
-   samples included with Xerces. Besides being useful programs,
-   they can be used as DOM programming examples to learn how to
-   program using the DOM API.
-  </p>
-  <p>Basic DOM samples:</p>
-  <ul>
-   <li><link anchor='Counter'>dom.Counter</link></li>
-   <!--
-     - Should the following samples be removed? rewritten? revamped?
-   <li><link anchor='DOMAddLines'>dom.DOMAddLines</link></li>
-   <li><link anchor='DOMGenerate'>dom.DOMGenerate</link></li>
-   -->
-   <li><link anchor='GetElementsByTagName'>dom.GetElementsByTagName</link></li>
-   <li><link anchor='Writer'>dom.Writer</link></li>
-   <li><link anchor='ASBuilder'>dom.ASBuilder</link></li>
-  </ul>
-  <!--
-    - These samples should be redone.
-  <p>DOM Traversal samples:</p>
-  <ul>
-   <li><link anchor='IteratorView'>dom.traversal.IteratorView</link></li>
-   <li><link anchor='NameNodeFilter'>dom.traversal.NameNodeFilter</link></li>
-   <li><link anchor='TreeWalkerView'>dom.traversal.TreeWalkerView</link></li>
-  </ul>
-  -->
-  <p>
-   Most of the DOM parser samples have a command line option that
-   allows the user to specify a different DOM parser to use. In
-   order to supply another DOM parser besides the default Xerces
-   <code>DOMParser</code>, a DOM parser wrapper class must be written.
-   This class must implement the <code>dom.ParserWrapper</code>
-   interface.
-  </p>
-  <note>
-   JAXP could be used instead of the special DOM parser wrapper
-   class. However, that feature is not implemented at this time.
-   Using JAXP would require the user to specify the
-   <code>-Djavax.xml.parsers.DocumentBuilderFactory=...</code>
-   option to the virtual machine in order to use a different
-   document builder factory.
-  </note>
- </s2>
- <anchor name='Counter'/>
- <s2 title='Sample dom.Counter'>
-  <p>
-   A sample DOM counter. This sample program illustrates how to
-   traverse a DOM tree in order to get information about the document.
-   The output of this program shows the time and count of elements,
-   attributes, ignorable whitespaces, and characters appearing in
-   the document. Three times are shown: the parse time, the first
-   traversal of the document, and the second traversal of the tree.
-  </p>
-  <p>
-   This class is useful as a "poor-man's" performance tester to
-   compare the speed and accuracy of various DOM parsers. However,
-   it is important to note that the first parse time of a parser
-   will include both VM class load time and parser initialization
-   that would not be present in subsequent parses with the same
-   file. 
-  </p>
-  <note>
-   The results produced by this program should never be accepted as
-   true performance measurements.
-  </note>
-  <s3 title='usage'>
-   <source>java dom.Counter (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select parser wrapper by name.</td></tr>
-    <tr><td>-x number</td><td>Select number of repetitions.</td></tr>
-    <tr><td>-n  | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr>
-     <td>-np | -NP</td>
-     <td>
-      Turn on/off namespace prefixes.<br/>
-      <strong>NOTE:</strong> Requires use of -n.
-     </td>
-    </tr>
-    <tr><td>-v  | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s  | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parsers.
-     </td>
-    </tr>
-    <tr>
-     <td>-f  | -F</td>
-     <td>
-      Turn on/off Schema full checking.<br/>
-      <strong>NOTE:</strong> Requires use of -s and not supported by all parsers.
-     </td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
- <!--
-   - Should the following samples be removed? rewritten? revamped?
- <anchor name='DOMAddLines'/>
- <s2 title='Sample dom.DOMAddLines'>
-  <p>TODO</p>
- </s2>
- <anchor name='DOMGenerate'/>
- <s2 title='Sample dom.DOMGenerate'>
-  <p>TODO</p>
- </s2>
- -->
- <anchor name='GetElementsByTagName'/>
- <s2 title='Sample dom.GetElementsByTagName'>
-  <p>
-   A sample DOM filter. This sample program illustrates how to
-   use the <code>Document#getElementsByTagName()</code> method 
-   to quickly and easily locate elements by name.
-  </p>
-  <s3 title='usage'>
-   <source>java dom.GetElementsByTagName (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select parser wrapper by name.</td></tr>
-    <tr><td>-e name</td><td>Specify element name for search.</td></tr>
-    <tr><td>-a name</td><td>Specify attribute name for specified elements.</td></tr>
-    <tr><td>-n | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr><td>-v | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-     <strong>NOTE:</strong> Not supported by all parsers.
-     </td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
- <anchor name='Writer'/>
- <s2 title='Sample dom.Writer'>
-  <p>
-   A sample DOM writer. This sample program illustrates how to
-   traverse a DOM tree in order to print a document that is parsed.
-  </p>
-  <s3 title='usage'>
-   <source>java dom.Writer (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><td>-p name</td><td>Select parser wrapper by name.</td></tr>
-    <tr><td>-n | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr><td>-v | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parsers.
-     </td>
-    </tr>
-    <tr>
-     <td>-c | -C</td>
-     <td>
-      Turn on/off Canonical XML output.<br/>
-      <strong>NOTE:</strong> This is not W3C canonical output.
-     </td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
- <anchor name='ASBuilder'/>
- <s2 title='Sample dom.ASBuilder'>
-  <p>
-   This sample program illustrates how to preparse xml schema
-   documents and how to validate instance documents against
-   preparsed schema grammars.
-  </p>
-  <s3 title='usage'>
-   <source>java dom.ASBuilder [-f|-F] -a uri ... [-i uri ...]</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><td>-f | -F</td><td>Turn on/off schema full checking.</td></tr>
-    <tr><td>-a uri ...</td><td>Provide a list of schema documents.</td></tr>
-    <tr><td>-i uri ...</td><td>Provide a list of instance documents to validate.</td></tr>
-   </table>
-  </s3>
- </s2>
- <!--
-   - These samples should be redone.
- <anchor name='IteratorView'/>
- <s2 title='Sample dom.traversal.IteratorView'>
-  <p>TODO</p>
- </s2>
- <anchor name='NameNodeFilter'/>
- <s2 title='Sample dom.traversal.NameNodeFilter'>
-  <p>TODO</p>
- </s2>
- <anchor name='TreeWalkerView'/>
- <s2 title='Sample dom.traversal.TreeWalkerView'>
-  <p>TODO</p>
- </s2>
- -->
-</s1>
diff --git a/docs/samples-sax.xml b/docs/samples-sax.xml
deleted file mode 100644
index 4cc8243..0000000
--- a/docs/samples-sax.xml
+++ /dev/null
@@ -1,177 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='SAX Samples'>
- <s2 title='Overview'>
-  <p>
-   This page documents the various Simple API for XML (SAX)
-   samples included with Xerces. Besides being useful programs,
-   they can be used as SAX programming examples to learn how to
-   program using the SAX API.
-  </p>
-  <p>SAX samples:</p>
-  <ul>
-   <li><link anchor='Counter'>sax.Counter</link></li>
-   <li><link anchor='DocumentTracer'>sax.DocumentTracer</link></li>
-   <li><link anchor='Writer'>dom.Writer</link></li>
-  </ul>
-  <p>
-   Most of the SAX parser samples have a command line option that
-   allows the user to specify a different parser to use. In
-   order to supply another SAX parser besides the default Xerces
-   <code>SAXParser</code>, the parser must implement either the
-   <code>org.xml.sax.Parser</code> or <code>org.xml.sax.XMLReader</code>
-   interfaces. You may specify xni.parser.PSVIParser if you want Xerces to output PSVI.
-  </p>
-  <note>
-   JAXP could be used instead but this feature is not implemented 
-   at this time. Using JAXP would require the user to specify the
-   <code>-Djavax.xml.parsers.SAXParserFactory=...</code>
-   option to the virtual machine in order to use a different
-   SAX parser factory.
-  </note>
- </s2>
- <anchor name='Counter'/>
- <s2 title='Sample sax.Counter'>
-  <p>
-   A sample SAX2 counter. This sample program illustrates how to
-   register a SAX2 ContentHandler and receive the callbacks in
-   order to print information about the document. The output of
-   this program shows the time and count of elements, attributes, 
-   ignorable whitespaces, and characters appearing in the document. 
-  </p>
-  <p>
-   This class is useful as a "poor-man's" performance tester to
-   compare the speed and accuracy of various SAX parsers. However,
-   it is important to note that the first parse time of a parser
-   will include both VM class load time and parser initialization
-   that would not be present in subsequent parses with the same
-   file. 
-  </p>
-  <note>
-   The results produced by this program should never be accepted 
-   as true performance measurements.
-  </note>
-  <s3 title='usage'>
-   <source>java sax.Counter (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select parser by name.</td></tr>
-    <tr><td>-x number</td><td>Select number of repetitions.</td></tr>
-    <tr><td>-n  | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr>
-     <td>-np | -NP</td>
-     <td>
-      Turn on/off namespace prefixes.<br/>
-      <strong>NOTE:</strong> Requires use of -n.
-     </td>
-    </tr>
-    <tr><td>-v  | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s  | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parsers.
-     </td>
-    </tr>
-    <tr>
-     <td>-f  | -F</td>
-     <td>
-      Turn on/off Schema full checking.<br/>
-      <strong>NOTE:</strong> Requires use of -s and not supported by all parsers.
-     </td>
-    </tr>
-    <tr><td>-m  | -M</td><td>Turn on/off memory usage report.</td></tr>
-    <tr><td>-t  | -T</td><td>Turn on/off \"tagginess\" report.</td></tr>
-    <tr>
-     <td>--rem text</td>
-     <td>Output user defined comment before next parse.</td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
-  <s3 title='notes'>
-   <p>
-    The speed and memory results from this program should NOT be 
-    used as the basis of parser performance comparison! Real 
-    analytical methods should be used. For better results, perform
-    multiple document parses within the same virtual machine to 
-    remove class loading from parse time and memory usage.
-   </p>
-   <p>
-    The "tagginess" measurement gives a rough estimate of the 
-    percentage of markup versus content in the XML document. The 
-    percent tagginess of a document is equal to the minimum amount 
-    of tag characters required for elements, attributes, and 
-    processing instructions divided by the total amount of 
-    characters (characters, ignorable whitespace, and tag characters)
-    in the document.
-   </p>
-   <p>
-    Not all features are supported by different parsers.
-   </p>
-  </s3>
- </s2>
- <anchor name='DocumentTracer'/>
- <s2 title='Sample sax.DocumentTracer'>
-  <p>
-   Provides a complete trace of SAX2 events for files parsed. This is
-   useful for making sure that a SAX parser implementation faithfully
-   communicates all information in the document to the SAX handlers.
-  </p>
-  <s3 title='usage'>
-   <source>java sax.DocumentTracer (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select parser by name.</td></tr>
-    <tr><td>-n | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr><td>-v | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parsers.
-     </td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
- <anchor name='Writer'/>
- <s2 title='Sample sax.Writer'>
-  <p>
-   A sample SAX2 writer. This sample program illustrates how to
-   register a SAX2 ContentHandler and receive the callbacks in
-   order to print a document that is parsed.
-  </p>
-  <s3 title='usage'>
-   <source>java sax.Writer (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select parser by name.</td></tr>
-    <tr><td>-n | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr><td>-v | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parsers.
-     </td>
-    </tr>
-    <tr>
-     <td>-c | -C</td>
-     <td>
-      Turn on/off Canonical XML output.<br/>
-      <strong>NOTE:</strong> This is not W3C canonical output.
-     </td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
-</s1>
diff --git a/docs/samples-socket.xml b/docs/samples-socket.xml
deleted file mode 100644
index 1b694cb..0000000
--- a/docs/samples-socket.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='Socket Samples'>
- <s2 title='Overview'>
-  <p>
-   Very often, applications need to transmit XML documents over
-   the network using a socket stream. However, XML is not designed
-   to make this possible because XML documents do not contain an
-   explicit end-of-document terminal. Therefore, the stream must
-   end (i.e. the socket must close) in order for the parser to
-   finish parsing the complete XML document.
-  </p>
-  <p>
-   Since creating socket streams is expensive the application needs
-   to re-use the same stream but XML doesn't define an end-of-document. 
-   Therefore, another solution must be found. The socket samples 
-   included with Xerces can be used to learn how to overcome this 
-   common problem in a general way.
-  </p>
-  <p>Socket samples:</p>
-  <ul>
-   <li><link anchor='DelayedInput'>socket.DelayedInput</link></li>
-   <li><link anchor='KeepSocketOpen'>socket.KeepSocketOpen</link></li>
-  </ul>
- </s2>
- <anchor name='DelayedInput'/>
- <s2 title='Sample socket.DelayedInput'>
-  <p>
-   This sample delays the input to the SAX parser to simulate reading data
-   from a socket where data is not always immediately available. An XML
-   parser should be able to parse the input and perform the necessary
-   callbacks as data becomes available. So this is a good way to test
-   any parser that implements the SAX2 <code>XMLReader</code> interface
-   to see if it can parse data as it arrives.
-  </p>
-  <p>
-   <strong>Note:</strong> This sample uses NSGMLS-like output of elements
-   and attributes interspersed with information about how many bytes are
-   being read at a time.
-  </p>
-  <s3 title='usage'>
-   <source>java socket.DelayedInput (options) filename ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select SAX2 parser by name.</td></tr>
-    <tr><td>-n | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr><td>-v | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parsers.");
-     </td>
-    </tr>
-    <tr>
-     <td>-f  | -F</td>
-     <td>
-      Turn on/off Schema full checking.<br/>
-      <strong>NOTE:</strong> Requires use of -s and not supported by all parsers.
-     </td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
- <anchor name='KeepSocketOpen'/>
- <s2 title='Sample socket.KeepSocketOpen'>
-  <p>
-   This sample provides a solution to the problem of 1) sending multiple
-   XML documents over a single socket connection or 2) sending other types
-   of data after the XML document without closing the socket connection.
-  </p>
-  <p>
-   The first situation is a problem because the XML specification does
-   not allow a document to contain multiple root elements. Therefore a
-   document stream must end (or at least appear to end) for the XML
-   parser to accept it as the end of the document.
-  </p>
-  <p>
-   The second situation is a problem because the XML parser buffers the
-   input stream in specified block sizes for performance reasons. This
-   could cause the parser to accidentally read additional bytes of data
-   beyond the end of the document. This actually relates to the first
-   problem if the documents are encoding in two different international
-   encodings.
-  </p>
-  <p>
-   The solution that this sample introduces wraps both the input and
-   output stream on both ends of the socket. The stream wrappers 
-   introduce a protocol that allows arbitrary length data to be sent
-   as separate, localized input streams. While the socket stream
-   remains open, a separate input stream is created to "wrap" an
-   incoming document and make it appear as if it were a standalone
-   input stream.
-  </p>
-  <p>
-   To use this sample, enter any number of filenames of XML documents
-   as parameters to the program. For example:
-  </p>
-  <source>java socket.KeepSocketOpen doc1.xml doc2.xml doc3.xml</source>
-  <p>
-   This program will create a server and client thread that communicate
-   on a specified port number on the "localhost" address. When the client
-   connects to the server, the server sends each XML document specified
-   on the command line to the client in sequence, wrapping each document
-   in a <code>WrappedOutputStream</code>. The client uses a 
-   <code>WrappedInputStream</code> to read the data and pass it to the
-   parser.
-  </p>
-  <note>
-   Do not send any XML documents with associated grammars to the client. 
-   In other words, don't send any documents that contain a DOCTYPE line
-   that references an external DTD because the client will not be able 
-   to resolve the location of the DTD and an error will be issued by 
-   the client.
-  </note>
- </s2>
-</s1>
diff --git a/docs/samples-ui.xml b/docs/samples-ui.xml
deleted file mode 100644
index 32fbc54..0000000
--- a/docs/samples-ui.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='UI Samples'>
- <!--
-   - REVISIT: The UI samples should be completely rewritten.
-   -
- <anchor name='DOMTree'/>
- <s2 title='Sample ui.DOMTree'>
-  <p><strong>TODO</strong></p>
- </s2>
- <anchor name='DOMTreeFull'/>
- <s2 title='Sample ui.DOMTreeFull'>
-  <p><strong>TODO</strong></p>
- </s2>
- <p><strong>TODO</strong></p>
- <s2 title='Sample ui.TreeView'>
- </s2>
- <anchor name='TreeViewer'/>
- <s2 title='Sample ui.TreeViewer'>
-  <p><strong>TODO</strong></p>
- </s2>
- -->
- <p><strong>TODO</strong></p>
-</s1>
diff --git a/docs/samples-xni.xml b/docs/samples-xni.xml
deleted file mode 100644
index 22743f1..0000000
--- a/docs/samples-xni.xml
+++ /dev/null
@@ -1,365 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='XNI Samples'>
- <s2 title='Overview'>
-  <p>
-   The Xerces Native Interface (XNI) is an internal API that is
-   independent of other XML APIs and is used to implement the 
-   Xerces family of parsers. XNI allows a wide variety of parsers
-   to be written in an easy and modular fashion. The XNI samples
-   included with Xerces are simple examples of how to program
-   using the XNI API. However, for information on how to take full
-   advantage of this powerful framework, refer to the
-   <link idref='xni'>XNI Manual</link>.
-  </p>
-  <p>Basic XNI samples:</p>
-  <ul>
-   <li><link anchor='Counter'>xni.Counter</link></li>
-   <li><link anchor='DocumentTracer'>xni.DocumentTracer</link></li>
-   <li><link anchor='Writer'>xni.Writer</link></li>
-   <li><link anchor='PSVIWriter'>xni.PSVIWriter</link></li>
-  </ul>
-  <ul>
-   <li><link anchor='PassThroughFilter'>xni.PassThroughFilter</link></li>
-   <li><link anchor='UpperCaseFilter'>xni.UpperCaseFilter</link></li>
-  </ul>
-  <p>Parser configuration samples:</p>
-  <ul>
-   <li><link anchor='NonValidatingParserConfiguration'>xni.parser.NonValidatingParserConfiguration</link></li>
-   <li><link anchor='AbstractConfiguration'>xni.parser.AbstractConfiguration</link></li>
-   <!--
-     - REVISIT: Add in this sample once the proper interfaces have been
-     -          designed and implemented in the parser. *And* after the
-     -          sample code has been written.
-     -
-   <li><link anchor='DynamicParserConfiguration'>xni.parser.DynamicParserConfiguration</link></li>
-   -->
-  </ul>
-  <ul>
-   <li><link anchor='CSVConfiguration'>xni.parser.CSVConfiguration</link></li>
-   <li><link anchor='CSVParser'>xni.parser.CSVParser</link></li>
-   <li><link anchor='PSVIConfiguration'>xni.parser.PSVIConfiguration</link></li>
-   <li><link anchor='PSVIParser'>xni.parser.PSVIParser</link></li>
-  </ul>
-  <p>
-   Most of the XNI samples have a command line option that allows the
-   user to specify a different XNI parser configuration to use. In
-   order to supply another parser configuration besides the default
-   Xerces <code>StandardParserConfiguration</code>, the configuration
-   must implement the 
-   <code>org.apache.xerces.xni.parser.XMLParserConfiguration</code>
-   interface.
-  </p>
- </s2>
- <anchor name='Counter'/>
- <s2 title='Sample xni.Counter'>
-  <p>
-   A sample XNI counter. The output of this program shows the time
-   and count of elements, attributes, ignorable whitespaces, and 
-   characters appearing in the document. 
-  </p>
-  <p>
-   This class is useful as a "poor-man's" performance tester to
-   compare the speed and accuracy of various parser configurations. 
-   However, it is important to note that the first parse time of a
-   parser will include both VM class load time and parser 
-   initialization that would not be present in subsequent parses 
-   with the same file. 
-  </p>
-  <note>
-   The results produced by this program should never be accepted as
-   true performance measurements.
-  </note>
-  <s3 title='usage'>
-   <source>java xni.Counter (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select parser configuration by name.</td></tr>
-    <tr><td>-x number</td><td>Select number of repetitions.</td></tr>
-    <tr><td>-n  | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr>
-     <td>-np | -NP</td>
-     <td>
-      Turn on/off namespace prefixes.<br/>
-      <strong>NOTE:</strong> Requires use of -n.
-     </td>
-    </tr>
-    <tr><td>-v  | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s  | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parser configurations.
-     </td>
-    </tr>
-    <tr>
-     <td>-f  | -F</td>
-     <td>
-      Turn on/off Schema full checking.<br/>
-      <strong>NOTE:</strong> Requires use of -s and not supported by all parsers.
-     </td>
-    </tr>
-    <tr><td>-m  | -M</td><td>Turn on/off memory usage report.</td></tr>
-    <tr><td>-t  | -T</td><td>Turn on/off \"tagginess\" report.</td></tr>
-    <tr>
-     <td>--rem text</td>
-     <td>Output user defined comment before next parse.</td>
-    </tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
-  <s3 title='notes'>
-   <p>
-    The speed and memory results from this program should NOT be used
-    as the basis of parser performance comparison! Real analytical 
-    methods should be used. For better results, perform multiple 
-    document parses within the same virtual machine to remove class
-    loading from parse time and memory usage.
-   </p>
-   <p>
-    The "tagginess" measurement gives a rough estimate of the percentage
-    of markup versus content in the XML document. The percent tagginess
-    of a document is equal to the minimum amount of tag characters 
-    required for elements, attributes, and processing instructions 
-    divided by the total amount of characters (characters, ignorable 
-    whitespace, and tag characters) in the document.
-   </p>
-   <p>
-    Not all features are supported by different parser configurations.
-   </p>
-  </s3>
- </s2>
- <anchor name='DocumentTracer'/>
- <s2 title='Sample xni.DocumentTracer'>
-  <p>
-   Provides a complete trace of XNI document and DTD events for 
-   files parsed.
-  </p>
-  <s3 title='usage'>
-   <source>java xni.DocumentTracer (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Specify parser configuration by name.</td></tr>
-    <tr><td>-n | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr><td>-v | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parser configurations.
-     </td>
-    </tr>
-    <tr><td>-c | -C</td><td>Turn on/off character notifications");</td></tr>
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
- <anchor name='Writer'/>
- <s2 title='Sample xni.Writer'>
-  <p>
-   A sample XNI writer. This sample program illustrates how to
-   take receive XMLDocumentHandler callbacks in order to print 
-   a document that is parsed.
-  </p>
-  <s3 title='usage'>
-   <source>java xni.Writer (options) uri ...</source>
-  </s3>
-  <s3 title='options'>
-   <table>
-    <tr><th>Option</th><th>Description</th></tr>
-    <tr><td>-p name</td><td>Select parser configuration by name.</td></tr>
-    <tr><td>-n | -N</td><td>Turn on/off namespace processing.</td></tr>
-    <tr><td>-v | -V</td><td>Turn on/off validation.</td></tr>
-    <tr>
-     <td>-s | -S</td>
-     <td>
-      Turn on/off Schema validation support.<br/>
-      <strong>NOTE:</strong> Not supported by all parser configurations.
-     </td>
-    </tr>
-    <!--
-    <tr>
-     <td>-c | -C</td>
-     <td>
-      Turn on/off Canonical XML output.<br/>
-      <strong>NOTE:</strong> This is not W3C canonical output.
-     </td>
-    </tr>
-    -->
-    <tr><td>-h</td><td>Display help screen.</td></tr>
-   </table>
-  </s3>
- </s2>
-
-<anchor name='PSVIWriter'/>
- <s2 title='Sample xni.PSVIWriter'>
-  <p>
-   This is an example of a component that intercepts document handler events and gathers PSVI information. The PSVI output is written as XML.
-</p>
-<p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a component. See <link anchor='PSVIParser'>xni.parser.PSVIParser</link>.
-</p>
-</s2>
-
-
- <anchor name='PassThroughFilter'/>
- <s2 title='Sample xni.PassThroughFilter'>
-  <p>
-   This sample demonstrates how to implement a simple pass-through
-   filter for the document "streaming" information set using XNI.
-   This filter could be used in a pipeline of XNI parser components
-   that communicate document events.
-  </p>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a document
-   handler.
-  </p>
- </s2>
- <anchor name='UpperCaseFilter'/>
- <s2 title='Sample xni.UpperCaseFilter'>
-  <p>
-   This sample demonstrates how to create a filter for the document
-   "streaming" information set that turns element names into upper
-   case.
-  </p>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a document
-   handler.
-  </p>
- </s2>
- <anchor name='NonValidatingParserConfiguration'/>
- <s2 title='Sample xni.parser.NonValidatingParserConfiguration'>
-  <p>Non-validating parser configuration.</p>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a parser
-   configuration using XNI. You can use this parser configuration
-   by specifying the fully qualified class name to all of the XNI
-   samples that accept a parser configuration using the 
-   <code>-p</code> option. For example:
-  </p>
-  <source>java xni.Counter -p xni.parser.NonValidatingParserConfiguration document.xml</source>
- </s2>
- <anchor name='AbstractConfiguration'/>
- <s2 title='Sample xni.parser.AbstractConfiguration'>
-  <p>
-   This abstract parser configuration simply helps manage components, 
-   features and properties, and other tasks common to all parser
-   configurations. In order to subclass this configuration and use
-   it effectively, the subclass is required to do the following:
-  </p>
-  <ul>
-   <li>
-    Add all configurable components using the <code>addComponent</code>
-    method,</li>
-   <li>Implement the <code>parse</code> method, and</li>
-   <li>Call the <code>resetComponents</code> before parsing.</li>
-  </ul>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a parser
-   configuration using XNI.
-  </p>
- </s2>
- <!--
-   - REVISIT: Add in this sample once the proper interfaces have been
-   -          designed and implemented in the parser. *And* after the
-   -          sample code has been written.
-   -
- <anchor name='DynamicParserConfiguration'/>
- <s2 title='Sample xni.parser.DynamicParserConfiguration'>
- </s2>
- -->
- <anchor name='CSVConfiguration'/>
- <s2 title='Sample xni.parser.CSVConfiguration'>
-  <p>
-   This example is a very simple parser configuration that can 
-   parse files with comma-separated values (CSV) to generate XML
-   events. For example, the following CSV document:
-  </p>
-  <source>Andy Clark,16 Jan 1973,Cincinnati</source>
-  <p>
-   produces the following XML "document" as represented by the 
-   XNI streaming document information:
-  </p>
-  <source><![CDATA[<?xml version='1.0' encoding='UTF-8' standalone='true'?>
-<!DOCTYPE csv [
-<!ELEMENT csv (row)*>
-<!ELEMENT row (col)*>
-<!ELEMENT col (#PCDATA)>
-]>
-<csv>
- <row>
-  <col>Andy Clark</col>
-  <col>16 Jan 1973</col>
-  <col>Cincinnati</col>
- </row>
-</csv>]]></source>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a parser
-   configuration using XNI. You can use this parser configuration
-   by specifying the fully qualified class name to all of the XNI
-   samples that accept a parser configuration using the 
-   <code>-p</code> option. For example:
-  </p>
-  <source>java xni.Counter -p xni.parser.CSVConfiguration document.xml</source>
- </s2>
- <anchor name='CSVParser'/>
- <s2 title='Samples xni.parser.CSVParser'>
-  <p>
-   This parser class implements a SAX parser that can parse simple
-   comma-separated value (CSV) files.
-  </p>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a parser
-   using XNI. You can use this parser
-   by specifying the fully qualified class name to all of the SAX
-   samples that accept a parser using the 
-   <code>-p</code> option. For example:
-  </p>
-  <source>java sax.Counter -p xni.parser.CSVParser document.xml</source>
- </s2>
-
-  <anchor name='PSVIConfiguration'/>
- <s2 title='Sample xni.parser.PSVIConfiguration'>
-  <p>
-   This example is a parser configuration that can output post schema validation infoset. The configuration infludes: DTD validator, Namespace binder, XML Schema validators and PSVIWriter component. 
-  </p>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a parser
-   configuration using XNI. You can use this parser configuration
-   by specifying the fully qualified class name to all of the XNI
-   samples that accept a parser configuration using the 
-   <code>-p</code> option:
-  </p>
-  <source>java xni.Counter -v -s -p xni.parser.PSVIConfiguration personal-schema.xml</source>
-   <note><link idref='features' anchor="validation">Validation</link> and <link idref='features' anchor="validation.schema">schema validation</link> features must be set to true to receive the correct PSVI output.</note>
- </s2>
-
-<anchor name='PSVIParser'/>
- <s2 title='Samples xni.parser.PSVIParser'>
-  <p>
-   This parser class implements a SAX parser that outputs post schema validation infoset as XML.
-  </p>
-  <p>
-   This class can <strong>NOT</strong> be run as a standalone
-   program. It is only an example of how to write a parser
-   using XNI. You can use this parser
-   by specifying the fully qualified class name to all of the SAX
-   samples that accept a parser using the 
-   <code>-p</code> option. For example:
-  </p>
-  <source>java sax.Counter -v -s -p xni.parser.PSVIParser personal-schema.xml</source>
-  <note><link idref='features' anchor="validation">Validation</link> and <link idref='features' anchor="validation.schema">schema validation</link> features must be set to true to receive the correct PSVI output.</note>
- </s2>
-</s1>
diff --git a/docs/samples.xml b/docs/samples.xml
deleted file mode 100644
index c42d4a1..0000000
--- a/docs/samples.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='Sample Programs'>
- <s2 title='Overview'>
-  <p>
-   &ParserName; contains many useful samples to help you get 
-   up-and-running with writing XML applications. Many of the sample
-   programs are even useful as standalone programs to help in 
-   testing the validity of XML documents and/or debugging 
-   applications.
-  </p>
-  <p>
-   The samples are organized either by API or by programming area in
-   the following categories:
-  </p>
-  <ul>
-   <li><link idref='samples-dom'>DOM Samples</link></li>
-   <li><link idref='samples-sax'>SAX Samples</link></li>
-   <li><link idref='samples-socket'>Socket Samples</link></li>
-   <li><link idref='samples-ui'>UI Samples</link></li>
-   <li><link idref='samples-xni'>XNI Samples</link></li>
-  </ul>
- </s2>
- <s2 title='Running the Samples'>
-  <p>
-   Running the sample applications requires that you have already
-   installed the Java Development Kit (JDK) or Java Runtime
-   Environment (JRE) on you computer and extracted the 
-   &ParserName; software.
-  </p>
-  <p>
-   If you do not already have a JDK already on your computer download
-   one from Sun&apos;s Java website: 
-   <jump href="http://java.sun.com">http://java.sun.com</jump> or from 
-   IBM&apos;s website
-   <jump href="http://www.ibm.com/developer/java/">http://www.ibm.com/developer/java/</jump>.
-   The sample applications described in the following pages support 
-   Java 1.x (e.g. 1.1.8, etc) and/or Java 2 (e.g. 1.2.2, 1.3, etc).
-   The UI samples are written using Swing and require Java 2 in order
-   to run but all of the command line programs will run using Java 1.x.
-  </p>
-  <p>
-   Command lines examples on the following pages use the Windows path
-   separator &apos;;&apos; (semicolon) and directory separator 
-   &apos;\&apos; (backslash). On UNIX, use the &apos;:&apos; (colon) 
-   character to separate the JAR files in the classpath, and replace
-   Windows directory separator &apos;\&apos; (backslash) with 
-   &apos;/&apos; (forward slash).
-  </p>
- </s2>
-</s1>
diff --git a/docs/style/graphics/button-a.gif b/docs/style/graphics/button-a.gif
deleted file mode 100644
index 5d0b8c2..0000000
--- a/docs/style/graphics/button-a.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/graphics/button-b.gif b/docs/style/graphics/button-b.gif
deleted file mode 100644
index 06e0381..0000000
--- a/docs/style/graphics/button-b.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/loader.xml b/docs/style/loader.xml
deleted file mode 100644
index 3bb469d..0000000
--- a/docs/style/loader.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- CVS $Revision$ $Date$ -->
-
-<loader>
-  <processor name="xslt">
-    <parameter name="stylesheet" value="sbk:/style/stylesheets/book2project.xsl"/>
-  </processor>
-</loader>
diff --git a/docs/style/resources/bottom.gif b/docs/style/resources/bottom.gif
deleted file mode 100644
index f39031e..0000000
--- a/docs/style/resources/bottom.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/button-asf-hi.gif b/docs/style/resources/button-asf-hi.gif
deleted file mode 100644
index 08b880a..0000000
--- a/docs/style/resources/button-asf-hi.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/button-asf-lo.gif b/docs/style/resources/button-asf-lo.gif
deleted file mode 100644
index 134580f..0000000
--- a/docs/style/resources/button-asf-lo.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/button-w3c-hi.gif b/docs/style/resources/button-w3c-hi.gif
deleted file mode 100644
index 3bf0be3..0000000
--- a/docs/style/resources/button-w3c-hi.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/button-w3c-lo.gif b/docs/style/resources/button-w3c-lo.gif
deleted file mode 100644
index d383d3d..0000000
--- a/docs/style/resources/button-w3c-lo.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/button-xml-hi.gif b/docs/style/resources/button-xml-hi.gif
deleted file mode 100644
index 01d095c..0000000
--- a/docs/style/resources/button-xml-hi.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/button-xml-lo.gif b/docs/style/resources/button-xml-lo.gif
deleted file mode 100644
index 5719c7e..0000000
--- a/docs/style/resources/button-xml-lo.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/changes-add.jpg b/docs/style/resources/changes-add.jpg
deleted file mode 100644
index beb9207..0000000
--- a/docs/style/resources/changes-add.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/changes-fix.jpg b/docs/style/resources/changes-fix.jpg
deleted file mode 100644
index 1d6820b..0000000
--- a/docs/style/resources/changes-fix.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/changes-remove.jpg b/docs/style/resources/changes-remove.jpg
deleted file mode 100644
index 8c9b9ef..0000000
--- a/docs/style/resources/changes-remove.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/changes-update.jpg b/docs/style/resources/changes-update.jpg
deleted file mode 100644
index 06831ee..0000000
--- a/docs/style/resources/changes-update.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/close.gif b/docs/style/resources/close.gif
deleted file mode 100644
index 48a9782..0000000
--- a/docs/style/resources/close.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/dot.gif b/docs/style/resources/dot.gif
deleted file mode 100644
index 6227d1d..0000000
--- a/docs/style/resources/dot.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/join.gif b/docs/style/resources/join.gif
deleted file mode 100644
index 02e7611..0000000
--- a/docs/style/resources/join.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/line.gif b/docs/style/resources/line.gif
deleted file mode 100644
index fd25c39..0000000
--- a/docs/style/resources/line.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/logo.gif b/docs/style/resources/logo.gif
deleted file mode 100644
index 53538c3..0000000
--- a/docs/style/resources/logo.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/note.gif b/docs/style/resources/note.gif
deleted file mode 100644
index 3394222..0000000
--- a/docs/style/resources/note.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/right.gif b/docs/style/resources/right.gif
deleted file mode 100644
index bcb50e3..0000000
--- a/docs/style/resources/right.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/script.js b/docs/style/resources/script.js
deleted file mode 100644
index ebadeb2..0000000
--- a/docs/style/resources/script.js
+++ /dev/null
@@ -1,21 +0,0 @@
-rolloverImagesOn=new Array();
-rolloverImagesOff=new Array();
-
-function rolloverOn(name) {
-  if(rolloverImagesOn[name]){
-    document.images[name].src=rolloverImagesOn[name].src;
-  }
-}
-
-function rolloverOff(name) {
-  if(rolloverImagesOff[name]){
-      document.images[name].src=rolloverImagesOff[name].src;
-  }
-}
-
-function rolloverLoad(name,on,off) {
-  rolloverImagesOn[name]=new Image();
-  rolloverImagesOn[name].src=on;
-  rolloverImagesOff[name]=new Image();
-  rolloverImagesOff[name].src=off;
-}
diff --git a/docs/style/resources/separator.gif b/docs/style/resources/separator.gif
deleted file mode 100644
index e774943..0000000
--- a/docs/style/resources/separator.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/resources/void.gif b/docs/style/resources/void.gif
deleted file mode 100644
index 75b945d..0000000
--- a/docs/style/resources/void.gif
+++ /dev/null
Binary files differ
diff --git a/docs/style/stylesheets/any2header.xsl b/docs/style/stylesheets/any2header.xsl
deleted file mode 100644
index 248de4d..0000000
--- a/docs/style/stylesheets/any2header.xsl
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:param name="label"/>
-
-  <xsl:template match='/'>
-    <image width="456" height="35" bgcolor="0086b2">
-      <text font="Arial" size="29" x="454" y="8" halign="right" valign="top" color="004080"
-            text="{label}"/>
-      <text font="Arial" size="29" x="452" y="6" halign="right" valign="top" color="ffffff"
-            text="{$label}"/>
-    </image>
-  </xsl:template>
-
-<!--
-  <xsl:template match="/">
-    <image width="456" height="35" bgcolor="0086b2">
-     <xsl:apply-templates/>
-    </image>
-  </xsl:template>
-
-  <xsl:template match="s1|faqs|releases|features|properties">
-      <xsl:variable name="title">
-        <xsl:if test="string-length(@title)=0">
-          <xsl:value-of select="$label"/>
-        </xsl:if>
-        <xsl:if test="string-length(@title)>0">
-          <xsl:value-of select="@title"/>
-        </xsl:if>
-      </xsl:variable>
-
-      <text font="Arial" size="29" x="454" y="8" halign="right" valign="top" color="004080"
-            text="{$title}"/>
-      <text font="Arial" size="29" x="452" y="6" halign="right" valign="top" color="ffffff"
-            text="{$title}"/>
-  </xsl:template>
--->
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/any2project.xsl b/docs/style/stylesheets/any2project.xsl
deleted file mode 100644
index 191961f..0000000
--- a/docs/style/stylesheets/any2project.xsl
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:param name="label"/>
-
-  <xsl:template match="/">
-    <project>
-      <xsl:apply-templates/>
-    </project>
-  </xsl:template>
-
-  <xsl:template match="img">
-    <resource source="{@src}" target="images/{@src}"/>
-  </xsl:template>
-
-  <xsl:template match="node()">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/book2group.xsl b/docs/style/stylesheets/book2group.xsl
deleted file mode 100644
index 98ba6d4..0000000
--- a/docs/style/stylesheets/book2group.xsl
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:param name="id"/>
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="book">
-    <group title="{faqs[attribute::id=$id]/@label}">
-      <xsl:apply-templates select="faqs[attribute::id=$id]/faq"/>
-    </group>
-  </xsl:template>
-
-  <xsl:template match="faq">
-    <entry id="{@id}" title="{document(concat('sbk:/sources/',@source))/faqs/@title}">
-      <xsl:apply-templates 
-           select="document(concat('sbk:/sources/',@source))/faqs/faq"
-	   mode='faqs-faq'/>
-    </entry>
-  </xsl:template>
-
-  <xsl:template match="faq" mode='faqs-faq'>
-    <voice>
-      <xsl:if test="string-length(@title)=0">
-        <xsl:value-of select="q"/>
-      </xsl:if>
-      <xsl:if test="string-length(@title)>0">
-        <xsl:value-of select="@title"/>
-      </xsl:if>
-    </voice>
-  </xsl:template>
-  
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/book2project.xsl b/docs/style/stylesheets/book2project.xsl
deleted file mode 100644
index 9a9a03b..0000000
--- a/docs/style/stylesheets/book2project.xsl
+++ /dev/null
@@ -1,273 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <!-- match the root book element -->
-  <xsl:template match="/book">
-    <project>
-
-      <parameter name="copyright" value="{@copyright}"/>
-
-      <!-- copy all resources to the targets -->
-      <process source="sbk:/style/resources/" producer="directory">
-        <processor name="xslt">
-          <parameter name="stylesheet" value="sbk:/style/stylesheets/directory2project.xsl"/>
-          <parameter name="base" value="resources/"/>
-        </processor>
-      </process>
-
-      <xsl:apply-templates/>
-
-    </project>
-  </xsl:template>
-
-<!-- ********************************************************************** -->
-<!-- CREATE THE TARGET HTML -->
-<!-- ********************************************************************** -->
-
-  <xsl:template match="document">
-
-    <process source="{@source}" producer="parser">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/>
-      </processor>
-    </process>
-
-    <xsl:call-template name="header">
-      <xsl:with-param name="id"     select="@id"/>
-      <xsl:with-param name="source" select="@source"/>
-      <xsl:with-param name="label"  select="@title"/>
-    </xsl:call-template>
-
-    <xsl:call-template name="labels">
-      <xsl:with-param name="id" select="@id"/>
-      <xsl:with-param name="label" select="@label"/>
-    </xsl:call-template>
-
-    <create source="{@source}" target="{@id}.html" producer="parser" printer="html">
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/>
-      </processor>
-    </create>
-  </xsl:template>
-
-  <xsl:template match="hidden">
-    <process source="{@source}" producer="parser">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/>
-      </processor>
-    </process>
-    <xsl:call-template name="header">
-      <xsl:with-param name="id"     select="@id"/>
-      <xsl:with-param name="source" select="@source"/>
-      <xsl:with-param name="label"  select="@title"/>
-    </xsl:call-template>
-    <create source="{@source}" target="{@id}.html" producer="parser" printer="html">
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/>
-      </processor>
-    </create>
-  </xsl:template>
-
-  <xsl:template match="design">
-    <process source="{@source}" producer="parser">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/>
-      </processor>
-    </process>
-    <xsl:call-template name="header">
-      <xsl:with-param name="id"     select="@id"/>
-      <xsl:with-param name="source" select="@source"/>
-      <xsl:with-param name="label"  select="@title"/>
-    </xsl:call-template>
-    <create source="{@source}" target="{@id}.html" producer="parser" printer="html">
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/design2document.xsl"/>
-      </processor>
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/>
-      </processor>
-    </create>
-  </xsl:template>
-
-  <xsl:template match="settings">
-
-    <process source="{@source}" producer="parser">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/>
-      </processor>
-    </process>
-
-    <xsl:call-template name="header">
-      <xsl:with-param name="id"     select="@id"/>
-      <xsl:with-param name="source" select="@source"/>
-      <xsl:with-param name="label"  select="@title"/>
-    </xsl:call-template>
-
-    <xsl:call-template name="labels">
-      <xsl:with-param name="id" select="@id"/>
-      <xsl:with-param name="label" select="@label"/>
-    </xsl:call-template>
-
-    <create source="{@source}" target="{@id}.html" producer="parser" printer="html">
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/settings2document.xsl"/>
-      </processor>
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/>
-      </processor>
-    </create>
-  </xsl:template>
-
-  <xsl:template match="releases">
-
-    <process source="{@source}" producer="parser">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/>
-      </processor>
-    </process>
-
-    <xsl:call-template name="header">
-      <xsl:with-param name="id"     select="@id"/>
-      <xsl:with-param name="source" select="@source"/>
-      <xsl:with-param name="label"  select="@title"/>
-    </xsl:call-template>
-
-    <xsl:call-template name="labels">
-      <xsl:with-param name="id" select="@id"/>
-      <xsl:with-param name="label" select="@label"/>
-    </xsl:call-template>
-
-    <create source="{@source}" target="{@id}.html" producer="parser" printer="html">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/releases2document.xsl"/>
-      </processor>
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/>
-      </processor>
-    </create>
-
-  </xsl:template>
-
-  <xsl:template match="faqs">
-    <xsl:apply-templates/>
-
-    <xsl:call-template name="header">
-      <xsl:with-param name="id"     select="@id"/>
-      <xsl:with-param name="source" select="@source"/>
-      <xsl:with-param name="label"  select="@title"/>
-    </xsl:call-template>
-
-    <xsl:call-template name="labels">
-      <xsl:with-param name="id" select="@id"/>
-      <xsl:with-param name="label" select="@label"/>
-    </xsl:call-template>
-
-    <create source="" target="{@id}.html" producer="project" printer="html">
-      <parameter name="id" value="{@id}"/>
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/book2group.xsl"/>
-      </processor>
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/group2document.xsl"/>
-      </processor>
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/>
-      </processor>
-    </create>
-
-  </xsl:template>
-
-  <xsl:template match="faq">
-
-    <process source="{@source}" producer="parser">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/>
-      </processor>
-    </process>
-
-    <xsl:call-template name="header">
-      <xsl:with-param name="id"     select="@id"/>
-      <xsl:with-param name="source" select="@source"/>
-      <xsl:with-param name="label"  select="@title"/>
-    </xsl:call-template>
-
-    <create source="{@source}" target="{@id}.html" producer="parser" printer="html">
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/faqs2document.xsl"/>
-      </processor>
-      <processor name="xslt">
-        <parameter name="id" value="{@id}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/>
-      </processor>
-    </create>
-
-  </xsl:template>
-
-  <xsl:template match="external">
-
-    <xsl:call-template name="labels">
-      <xsl:with-param name="id" select="concat('ext-',position())"/>
-      <xsl:with-param name="label" select="@label"/>
-    </xsl:call-template>
-
-  </xsl:template>
-<!-- ********************************************************************** -->
-<!-- NAMED TEMPLATES -->
-<!-- ********************************************************************** -->
-
-<!-- Generate the doument header image -->
-  <xsl:template name="header"> 
-    <xsl:param name="id"/>
-    <xsl:param name="source"/>
-    <xsl:param name="label"/>
-
-    <create source="{$source}" target="graphics/{$id}-header.jpg" producer="parser" printer="image">
-      <processor name="xslt">
-        <parameter name="label" value="{$label}"/>
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/any2header.xsl"/>
-      </processor>
-    </create>
-  </xsl:template>
-
-<!-- Generate the three rollover label images -->
-  <xsl:template name="labels"> 
-    <xsl:param name="id"/>
-    <xsl:param name="label"/>
-    
-    <create source="" target="graphics/{$id}-label-1.jpg" producer="context" printer="image">
-      <parameter name="label" value="{$label}"/>
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/>
-        <parameter name="image" value="sbk:/style/graphics/button-a.gif"/>
-        <parameter name="color" value="ffffff"/>
-      </processor>
-    </create>
-
-    <create source="" target="graphics/{$id}-label-2.jpg" producer="context" printer="image">
-      <parameter name="label" value="{$label}"/>
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/>
-        <parameter name="image" value="sbk:/style/graphics/button-b.gif"/>
-        <parameter name="color" value="ffff00"/>
-      </processor>
-    </create>
-
-    <create source="" target="graphics/{$id}-label-3.jpg" producer="context" printer="image">
-      <parameter name="label" value="{$label}"/>
-      <processor name="xslt">
-        <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/>
-        <parameter name="image" value="sbk:/style/graphics/button-b.gif"/>
-        <parameter name="color" value="ffffff"/>
-      </processor>
-    </create>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/changes2document.xsl b/docs/style/stylesheets/changes2document.xsl
deleted file mode 100644
index c0fd6ba..0000000
--- a/docs/style/stylesheets/changes2document.xsl
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="changes">
-    <s1 title="{@title}">
-      <xsl:apply-templates/>
-    </s1>
-  </xsl:template>
-
-  <xsl:template match="release">
-    <s2 title="Release {@version} {@date}">
-      <br/><xsl:apply-templates/>
-    </s2>
-  </xsl:template>
-
-  <xsl:template match="features">
-    <s3 title="Features">
-      <ul><xsl:apply-templates/></ul>
-    </s3>
-  </xsl:template>
-
-  <xsl:template match="fixes">
-    <s3 title="Bugs fixed">
-      <ul><xsl:apply-templates/></ul>
-    </s3>
-  </xsl:template>
-
-  <xsl:template match="feat|fix">
-    <li><xsl:apply-templates/></li>
-  </xsl:template>
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/context2footer.xsl b/docs/style/stylesheets/context2footer.xsl
deleted file mode 100644
index 16887a7..0000000
--- a/docs/style/stylesheets/context2footer.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="context">
-    <image source="sbk:/style/graphics/footer.gif">
-      <xsl:apply-templates/>
-    </image>
-  </xsl:template>
-
-  <xsl:template match="parameter">
-    <xsl:if test="@name='copyright'">
-      <text font="Arial Bold" size="11" x="124" y="6" style="plain"
-            halign="left" valign="top" color="666699"
-            text="Copyright &#169; {@value}. All Rights Reserved."/>
-      <text font="Arial Bold" size="11" x="123" y="5" style="plain"
-            halign="left" valign="top" color="333366"
-            text="Copyright &#169; {@value}. All Rights Reserved."/>
-      <text font="Arial Bold" size="11" x="122" y="4" style="plain"
-            halign="left" valign="top" color="ffffff"
-            text="Copyright &#169; {@value}. All Rights Reserved."/>
-    </xsl:if>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/context2label.xsl b/docs/style/stylesheets/context2label.xsl
deleted file mode 100644
index 4970f3a..0000000
--- a/docs/style/stylesheets/context2label.xsl
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:param name="image"/>
-  <xsl:param name="color"/>
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="context">
-    <image source="{$image}">
-      <xsl:apply-templates/>
-    </image>
-  </xsl:template>
-
-  <xsl:template match="parameter">
-    <xsl:if test="@name='label'">
-      <text font="Arial" size="12" x="14" y="1" halign="left"
-            valign="top" color="{$color}" style="italic" text="{@value}"/>
-    </xsl:if>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/design2document.xsl b/docs/style/stylesheets/design2document.xsl
deleted file mode 100644
index 5659bb3..0000000
--- a/docs/style/stylesheets/design2document.xsl
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-
- <!--<xsl:strip-space elements='p th td li strong em'/>-->
-
- <xsl:template match='/design'>
-  <s1 title='{@name}'>
-   <xsl:apply-templates select='category'/>
-  </s1>
- </xsl:template>
- 
- <xsl:template match='category'>
-  <s2 title='{@name}'>
-   <s3 title='Package {@package}'>
-    <xsl:apply-templates select='interface|class'/>
-   </s3>
-  </s2>
- </xsl:template>
- 
- <xsl:template match='interface|class'>
-  <anchor name='{@id}'/>
-  <table>
-  <tr>
-   <th>
-    <xsl:choose>
-     <xsl:when test='name()="interface"'>
-      interface <em><xsl:value-of select='@name'/></em>
-     </xsl:when>
-     <xsl:otherwise>
-      class <strong><xsl:value-of select='@name'/></strong>
-     </xsl:otherwise>
-    </xsl:choose>
-   </th>
-  </tr>
-  <xsl:if test='extends'>
-   <tr>
-    <td>
-     extends
-     <xsl:for-each select='extends'>
-      <xsl:call-template name='type'/>
-      <xsl:if test='not(position()=last())'>
-       <xsl:text>, </xsl:text>
-      </xsl:if>
-     </xsl:for-each>
-    </td>
-   </tr>
-  </xsl:if>
-  <xsl:if test='implements'>
-   <tr>
-    <td>
-     implements
-     <xsl:for-each select='implements'>
-      <xsl:call-template name='type'/>
-      <xsl:if test='not(position()=last())'>
-       <xsl:text>, </xsl:text>
-      </xsl:if>
-     </xsl:for-each>
-    </td>
-   </tr>
-  </xsl:if>
-  <xsl:if test='constant'>
-   <tr>
-    <td>
-     constants:
-     <ul>
-      <xsl:for-each select='constant'>
-       <li>
-        <xsl:value-of select='@visibility'/>
-	<xsl:text> </xsl:text>
-        <xsl:apply-templates/>
-	<xsl:text> </xsl:text>
-        <xsl:value-of select='@name'/>
-       </li>
-      </xsl:for-each>
-     </ul>
-    </td>
-   </tr>
-  </xsl:if>
-  <xsl:if test='method'>
-   <tr>
-    <td>
-     methods:
-     <ul>
-      <xsl:for-each select='method'>
-       <li>
-        <xsl:value-of select='@visibility'/>
-	<xsl:text> </xsl:text>
-	<xsl:choose>
-	 <xsl:when test='returns'>
-          <xsl:apply-templates/>
-          <xsl:text> </xsl:text>
-	 </xsl:when>
-	 <xsl:otherwise>void </xsl:otherwise>
-	</xsl:choose>
-        <xsl:value-of select='@name'/>
-	<xsl:text>(</xsl:text>
-	<xsl:for-each select='param'>
-	 <xsl:apply-templates/>
-	 <xsl:if test='not(position()=last())'>, </xsl:if>
-	</xsl:for-each>
-	<xsl:text>)</xsl:text>
-       </li>
-      </xsl:for-each>
-     </ul>
-    </td>
-   </tr>
-  </xsl:if>
-  </table>
- </xsl:template>
- 
- <xsl:template match='constant|field|param'>
-  <xsl:call-template name='type'/>
-  <xsl:text> </xsl:text>
-  <xsl:value-of select='@name'/>
- </xsl:template>
- 
- <xsl:template name='type'>
-  <xsl:apply-templates select='primitive|array|reference|collection'/>
- </xsl:template>
-
- <xsl:template match='primitive'>
-  <xsl:value-of select='@type'/>
- </xsl:template>
- 
- <xsl:template match='array'>
-  <xsl:call-template name='type'/>[]
- </xsl:template>
-
- <xsl:template match='reference'>
-  <xsl:variable name='idref'><xsl:value-of select='@idref'/></xsl:variable>
-  <xsl:choose>
-   <xsl:when test='//class[@id=$idref]'>
-    <strong><xsl:value-of select='//*[@id=$idref]/@name'/></strong>
-   </xsl:when>
-   <xsl:otherwise>
-    <em><xsl:value-of select='//*[@id=$idref]/@name'/></em>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match='collection'>
-  COLLECTION
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/docs/style/stylesheets/design2html.xsl b/docs/style/stylesheets/design2html.xsl
deleted file mode 100644
index d18dc74..0000000
--- a/docs/style/stylesheets/design2html.xsl
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version='1.0' encoding='US-ASCII'?>
-<!-- $Id$ -->
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-
- <xsl:template match='design'>
-  <HTML>
-   <HEAD>
-    <TITLE>Xerces 2 | Design</TITLE>
-    <STYLE type='text/css'>
-     .class { background: #DDDDFF }
-     .class-title { font: bold }
-     .interface { background: #FFDDDD }
-     .interface-title { font: italic }
-     .extends { }
-     .implements { }
-     .constants { }
-     .constant-title { }
-     .fields { }
-     .field-title { }
-     .constructors { }
-     .constructor-title { text-decoration: underline }
-     .methods { }
-     .method-title { text-decoration: underline }
-     .param-title { }
-    </STYLE>
-   </HEAD>
-   <BODY>
-    <H1 align='center'>
-     <xsl:value-of select='@name'/>
-     <xsl:text> </xsl:text>
-     Design
-    </H1>
-    <H2>Classes and Interfaces</H2>
-    <xsl:for-each select='category'>
-     <xsl:apply-templates select='.'/>
-    </xsl:for-each>
-    Last modified: <xsl:value-of select='@date'/>
-   </BODY>
-  </HTML>
- </xsl:template>
-
- <xsl:template match='category'>
-  <H3><xsl:value-of select='@name'/></H3>
-  <xsl:for-each select='class|interface'>
-   <BLOCKQUOTE>
-    <xsl:apply-templates select='.'/>
-   </BLOCKQUOTE>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template match='class|interface'>
-  <A name='{@name}'>
-  <DL class='{name()}'>
-   <DT>
-    <xsl:value-of select='name()'/>
-    <xsl:text> </xsl:text>
-    <SPAN class='{name()}-title'>
-     <xsl:value-of select='@name'/>
-    </SPAN>
-   </DT>
-   <xsl:if test='extends'>
-    <DD class='extends'>
-     extends
-     <xsl:for-each select='extends'>
-      <xsl:call-template name='type'/>
-     </xsl:for-each>
-    </DD>
-   </xsl:if>
-   <xsl:if test='implements'>
-    <DD class='implements'>
-     implements
-     <xsl:for-each select='implements'>
-      <xsl:call-template name='type'/>
-      <xsl:if test='not(position()=last())'>
-       <xsl:text>, </xsl:text>
-      </xsl:if>
-     </xsl:for-each>
-    </DD>
-   </xsl:if>
-   <xsl:if test='constant'>
-    <DD class='constants'>
-     constants:
-     <UL>
-      <xsl:for-each select='constant'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='field'>
-    <DD class='fields'>
-     fields:
-     <UL>
-      <xsl:for-each select='field'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='constructor'>
-    <DD class='constructors'>
-     constructors:
-     <UL>
-      <xsl:for-each select='constructor'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-   <xsl:if test='method'>
-    <DD class='methods'>
-     methods:
-     <UL>
-      <xsl:for-each select='method'>
-       <LI>
-        <xsl:apply-templates select='.'/>
-       </LI>
-      </xsl:for-each>
-     </UL>
-    </DD>
-   </xsl:if>
-  </DL>
-  </A>
- </xsl:template>
-
- <xsl:template match='constant|field|param'>
-  <!--
-  <xsl:if test='not(name()="param") and not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <xsl:call-template name='type'/>
-  <xsl:text> </xsl:text>
-  <SPAN class='{name()}-title'>
-   <xsl:value-of select='@name'/>
-  </SPAN>
- </xsl:template>
-
- <xsl:template match='constructor'>
-  <!--
-  <xsl:if test='not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <SPAN class='constructor-title'>
-   <xsl:value-of select='../@name'/>
-  </SPAN>
-  (
-  <xsl:for-each select='param'>
-   <xsl:apply-templates select='.'/>
-   <xsl:if test='not(position()=last())'>
-    <xsl:text>, </xsl:text>
-   </xsl:if>
-  </xsl:for-each>
-  )
- </xsl:template>
-
- <xsl:template match='method'>
-  <!--
-  <xsl:if test='not(@visibility="public")'>
-   <IMG alt='' src='{@visibility}.gif'/>
-  </xsl:if>
-  -->
-  <SPAN class='method-title'>
-   <xsl:value-of select='@name'/>
-  </SPAN>
-  (
-  <xsl:for-each select='param'>
-   <xsl:apply-templates select='.'/>
-   <xsl:if test='not(position()=last())'>
-    <xsl:text>, </xsl:text>
-   </xsl:if>
-  </xsl:for-each>
-  )
-  <xsl:for-each select='returns'>
-   :
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template name='type'>
-  <xsl:apply-templates select='array|primitive|reference|collection'/>
- </xsl:template>
-
- <xsl:template match='array'>
-  <xsl:call-template name='type'/>[]
- </xsl:template>
-
- <xsl:template match='primitive'>
-  <xsl:value-of select='@type'/>
- </xsl:template>
-
- <xsl:template match='union'>
-  <xsl:for-each select='part'>
-   <xsl:apply-templates select='.'/>
-  </xsl:for-each>
- </xsl:template>
-
- <xsl:template match='reference'>
-  <xsl:choose>
-   <xsl:when test='id(@idref)[name()="interface"]'>
-    <SPAN class='interface-title'>
-     <xsl:value-of select='id(@idref)/@name'/>
-    </SPAN>
-   </xsl:when>
-   <xsl:otherwise>
-    <SPAN class='class-title'>
-     <xsl:value-of select='id(@idref)/@name'/>
-    </SPAN>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match='collection'>
-  <xsl:for-each select='collector'>
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
-  &lt;
-  <xsl:for-each select='items'>
-   <xsl:call-template name='type'/>
-  </xsl:for-each>
-  &gt;
- </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/directory2project.xsl b/docs/style/stylesheets/directory2project.xsl
deleted file mode 100644
index 9942788..0000000
--- a/docs/style/stylesheets/directory2project.xsl
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:param name="base"/>
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="directory">
-    <project>
-      <xsl:apply-templates/>
-    </project>
-  </xsl:template>
-
-  <xsl:template match="entry">
-
-    <!--xsl:if test="@directory!='true'"-->
-      <resource source="{@href}" target="{$base}{@href}"/>
-    <!--/xsl:if-->
-<!-- don't copy subdir to avoid copying proprietary CVS files
-    <xsl:if test="@directory='true'">
-      <process source="{@href}" producer="directory">
-        <processor name="xslt">
-          <parameter name="stylesheet" value="sbk:/style/stylesheets/directory2project.xsl"/>
-          <parameter name="base" value="{$base}{@href}"/>
-        </processor>
-      </process>
-    </xsl:if>
--->    
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/document2html.xsl b/docs/style/stylesheets/document2html.xsl
deleted file mode 100644
index 09eb9e4..0000000
--- a/docs/style/stylesheets/document2html.xsl
+++ /dev/null
@@ -1,468 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:param name="stylebook.project"/>
-  <xsl:param name="copyright"/>
-  <xsl:param name="id"/>
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="s1">
-    <html>
-      <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
-        <script language="JavaScript" type="text/javascript" src="resources/script.js"/>
-        <title><xsl:value-of select="@title"/></title>
-      </head>
-      <body text="#000000" link="#0000ff" vlink="#0000aa" alink="#ff0000"
-            topmargin="4" leftmargin="4" marginwidth="4" marginheight="4"
-            bgcolor="#ffffff">
-        <!-- THE TOP BAR (HEADER) -->
-        <table width="620" cellspacing="0" cellpadding="0" border="0">
-          <tr>
-            <td width="135" height="60" rowspan="3" valign="top" align="left">
-              <img width="135" height="60" src="resources/logo.gif" hspace="0" vspace="0" border="0"/></td>
-            <td width="456" height="5" valign="top" align="left" colspan="4">
-              <img width="456" height="5" src="resources/line.gif" hspace="0" vspace="0" border="0"/></td>
-            <td width="29" height="60"  rowspan="3" valign="top" align="left">
-              <img width="29" height="60" src="resources/right.gif" hspace="0" vspace="0" border="0"/></td>
-          </tr>
-          <tr>
-            <td width="456" height="35" valign="top" align="left" colspan="4" bgcolor="#0086b2">
-              <img src="graphics/{$id}-header.jpg" width="456" height="35" hspace="0" vspace="0" border="0" alt="{s1/@title}"/></td>
-          </tr>
-          <tr>
-            <td width="168" height="20" valign="top" align="left">
-              <img width="168" height="20" src="resources/bottom.gif" hspace="0" vspace="0" border="0"/></td>
-            <td width="96" height="20" valign="top" align="left">
-              <a href="http://xml.apache.org/" onMouseOver="rolloverOn('xml');" onMouseOut="rolloverOff('xml');" target="new">
-                <img alt="http://xml.apache.org/" width="96" height="20" src="resources/button-xml-lo.gif"
-                     name="xml" hspace="0" vspace="0" border="0"
-                     onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');"/>
-              </a>
-            </td>
-            <td width="96" height="20" valign="top" align="left">
-              <a href="http://www.apache.org/" onMouseOver="rolloverOn('asf');" onMouseOut="rolloverOff('asf');" target="new">
-                <img alt="http://www.apache.org/" width="96" height="20" src="resources/button-asf-lo.gif"
-                     name="asf" hspace="0" vspace="0" border="0"
-                     onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');"/>
-              </a>
-            </td>
-            <td width="96" height="20" valign="top" align="left">
-              <a href="http://www.w3.org/" onMouseOver="rolloverOn('w3c');" onMouseOut="rolloverOff('w3c');" target="new">
-                <img alt="http://www.w3.org/" width="96" height="20" src="resources/button-w3c-lo.gif"
-                     name="w3c" hspace="0" vspace="0" border="0"
-                     onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');"/>
-              </a>
-            </td>
-          </tr>
-        </table>
-        <!-- THE MAIN PANEL (SIDEBAR AND CONTENT) -->
-        <table width="620" cellspacing="0" cellpadding="0" border="0">
-          <tr>
-            <!-- THE SIDE BAR -->
-            <td width="120" valign="top" align="left">
-              <img width="120" height="14" src="resources/join.gif" hspace="0" vspace="0" border="0"/><br/>
-                <xsl:apply-templates select="document($stylebook.project)"/>
-              <img width="120" height="14" src="resources/close.gif" hspace="0" vspace="0" border="0"/><br/>
-            </td>
-            <!-- THE CONTENT PANEL -->
-            <td width="500" valign="top" align="left">
-              <table border="0" cellspacing="0" cellpadding="3">
-                <tr><td><xsl:apply-templates/></td></tr>
-              </table>
-            </td>
-          </tr>
-        </table><br/>
-        <table width="620" border="0" cellspacing="0" cellpadding="0">
-          <tr><td bgcolor="#0086b2"><img src="images/dot.gif" width="1" height="1"/></td></tr>
-          <tr>
-            <td align="center"><font size="-1" color="#0086b2"><i>
-              Copyright &#169; <xsl:value-of select="$copyright"/>.
-              All Rights Reserved.
-            </i></font></td>
-          </tr>
-        </table>
-      </body>
-    </html>
-  </xsl:template>
-
-<!-- ###################################################################### -->
-<!-- book -->
-
-  <xsl:template match="book">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="document|faqs|releases|settings">
-    <xsl:if test="@id=$id">
-      <img src="graphics/{@id}-label-1.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/>
-    </xsl:if>
-    <xsl:if test="@id!=$id">
-      <a href="{@id}.html" onMouseOver="rolloverOn('side-{@id}');" onMouseOut="rolloverOff('side-{@id}');">
-        <img onLoad="rolloverLoad('side-{@id}','graphics/{@id}-label-2.jpg','graphics/{@id}-label-3.jpg');"
-             name="side-{@id}" src="graphics/{@id}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/>
-      </a>
-    </xsl:if>
-    <br/>
-  </xsl:template>
-
-  <xsl:template match="external">
-    <xsl:variable name="extid" select="concat('ext-',position())"/>
-    <a href="{@href}" onMouseOver="rolloverOn('side-{$extid}');" onMouseOut="rolloverOff('side-{$extid}');">
-      <img onLoad="rolloverLoad('side-{$extid}','graphics/{$extid}-label-2.jpg','graphics/{$extid}-label-3.jpg');"
-           name="side-{$extid}" src="graphics/{$extid}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/>
-    </a>
-    <br/>
-  </xsl:template>
-
-  <xsl:template match="separator">
-    <img src="resources/separator.gif" width="120" height="6" hspace="0" vspace="0" border="0"/><br/>
-  </xsl:template>
-
-
-<!-- ###################################################################### -->
-<!-- document -->
-
-  <xsl:template match="s2">
-    <table width="494" cellspacing="0" cellpadding="0" border="0">
-      <tr>
-        <td bgcolor="666699" colspan="2" width="494">
-          <table width="494" cellspacing="0" cellpadding="0" border="0">
-            <tr>
-              <td bgcolor="#039acc" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-              <td bgcolor="#039acc" width="492" height="1"><img src="resources/void.gif" width="492" height="1" vspace="0" hspace="0" border="0"/></td>
-              <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-            </tr>
-            <tr>
-              <td bgcolor="#039acc" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-              <td bgcolor="#0086b2"  width="492">
-                <font size="+1" face="arial,helvetica,sanserif" color="#ffffff">
-                  <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
-                  <b><xsl:value-of select="@title"/></b>
-                </font>
-              </td>
-              <td bgcolor="#017299" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-            </tr>
-            <tr>
-              <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-              <td bgcolor="#017299" width="492" height="1"><img src="resources/void.gif" width="492" height="1" vspace="0" hspace="0" border="0"/></td>
-              <td bgcolor="#017299" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-            </tr>
-          </table>
-        </td>
-      </tr>
-      <tr>
-        <td width="10">&#160;</td>
-        <td width="484">
-          <font face="arial,helvetica,sanserif" color="#000000">
-            <xsl:apply-templates/>
-          </font>
-        </td>
-      </tr>
-    </table>
-    <br/>
-  </xsl:template>
-
-  <xsl:template match="s3">
-    <table width="484" cellspacing="0" cellpadding="0" border="0">
-      <tr>
-        <td bgcolor="666699" colspan="2" width="484">
-          <table width="484" cellspacing="0" cellpadding="0" border="0">
-          <tr>
-            <td bgcolor="#039acc" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#039acc" width="482" height="1"><img src="resources/void.gif" width="482" height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-          </tr>
-          <tr>
-            <td bgcolor="#039acc" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#0086b2"  width="482">
-              <font face="arial,helvetica,sanserif" color="#ffffff">
-                <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
-                <b><xsl:value-of select="@title"/></b>
-              </font>
-            </td>
-            <td bgcolor="#017299" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-          </tr>
-          <tr>
-            <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#017299" width="482" height="1"><img src="resources/void.gif" width="482" height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#017299" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-          </tr>
-          </table>
-        </td>
-      </tr>
-      <tr>
-        <td width="10">&#160;</td>
-        <td width="474">
-          <font size="-1" face="arial,helvetica,sanserif" color="#000000">
-            <xsl:apply-templates/>
-          </font>
-        </td>
-      </tr>
-    </table>
-    <br/>
-  </xsl:template>
-
-  <xsl:template match="s4">
-    <table width="474" cellspacing="0" cellpadding="0" border="0">
-      <tr>
-        <td bgcolor="666699" colspan="2" width="484">
-          <table width="474" cellspacing="0" cellpadding="0" border="0">
-          <tr>
-            <td bgcolor="#039acc" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#039acc" width="472" height="1"><img src="resources/void.gif" width="472" height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-          </tr>
-          <tr>
-            <td bgcolor="#039acc" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#0086b2"  width="472">
-              <font size="-1" face="arial,helvetica,sanserif" color="#ffffff">
-                <img src="resources/void.gif" width="2" height="2" vspace="0" hspace="0" border="0"/>
-                <b><xsl:value-of select="@title"/></b>
-              </font>
-            </td>
-            <td bgcolor="#017299" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-          </tr>
-          <tr>
-            <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#017299" width="472" height="1"><img src="resources/void.gif" width="472" height="1" vspace="0" hspace="0" border="0"/></td>
-            <td bgcolor="#017299" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-          </tr>
-          </table>
-        </td>
-      </tr>
-      <tr>
-        <td width="10">&#160;</td>
-        <td width="464">
-          <font size="-1" face="arial,helvetica,sanserif" color="#000000">
-            <xsl:apply-templates/>
-          </font>
-        </td>
-      </tr>
-    </table>
-    <br/>
-  </xsl:template>
-
-<!-- ###################################################################### -->
-<!-- blocks -->
-
-  <xsl:template match="p">
-    <p><xsl:apply-templates/></p>
-  </xsl:template>
-
-  <xsl:template match="note">
-    <table width="100%" cellspacing="3" cellpadding="0" border="0">
-      <tr>
-        <td width="20" valign="top">
-          <img src="resources/note.gif" width="20" height="24" vspace="0" hspace="0" border="0" alt="Note:"/>
-        </td>
-        <td valign="top">
-          <font size="-1" face="arial,helvetica,sanserif" color="#000000">
-            <i>
-              <xsl:apply-templates/>
-            </i>
-          </font>
-        </td>
-      </tr>
-    </table>
-  </xsl:template>
-
-  <xsl:template match="ul">
-    <ul><xsl:apply-templates/></ul>
-  </xsl:template>
-
-  <xsl:template match="ol">
-    <ol><xsl:apply-templates/></ol>
-  </xsl:template>
-
-  <xsl:template match="li">
-    <li><xsl:apply-templates/></li>
-  </xsl:template>
-
-    <!--Definition lists: gloss, term, label, item -->
-  <xsl:template match="gloss">
-    <dl><xsl:apply-templates/></dl>
-  </xsl:template>
-   <!-- <term> contains a single-word, multi-word or symbolic
-       designation which is regarded as a technical term. -->
-  <xsl:template match="term">
-    <dfn><xsl:apply-templates/></dfn>
-  </xsl:template>
-  <xsl:template match="label" priority="1">
-    <dt><xsl:apply-templates/></dt>
-  </xsl:template>
-  <xsl:template match="item" priority="2">
-    <dd>
-      <xsl:apply-templates/>
-    </dd>
-  </xsl:template>
-
-  <xsl:template match="source">
-  <div align="right">
-  <table width="464" cellspacing="4" cellpadding="0" border="0">
-    <tr>
-      <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" width="462" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-    </tr>
-    <tr>
-      <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#ffffff"  width="462">
-          <font size="-1"><pre><xsl:apply-templates/></pre></font>
-      </td>
-      <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
-    </tr>
-    <tr>
-      <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" width="462" height="1" vspace="0" hspace="0" border="0"/></td>
-      <td bgcolor="#0086b2" width="1"   height="1"><img src="resources/void.gif" width="1"   height="1" vspace="0" hspace="0" border="0"/></td>
-    </tr>
-  </table>
-  </div>
-  </xsl:template>
-
-  <xsl:template match="table">
-    <table width="100%" border="0" cellspacing="2" cellpadding="2">
-      <xsl:apply-templates/>
-    </table>
-  </xsl:template>
-
-  <xsl:template match="tr">
-    <tr><xsl:apply-templates/></tr>
-  </xsl:template>
-
-  <xsl:template match="th">
-    <td bgcolor="#039acc" colspan="{@colspan}" rowspan="{@rowspan}" valign="center" align="center">
-      <font color="#ffffff" size="-1" face="arial,helvetica,sanserif">
-        <b><xsl:apply-templates/></b>&#160;
-      </font>
-    </td>
-  </xsl:template>
-
-  <xsl:template match="td">
-    <td bgcolor="#a0ddf0" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="{@align}">
-      <font color="#000000" size="-1" face="arial,helvetica,sanserif">
-        <xsl:apply-templates/>&#160;
-      </font>
-    </td>
-  </xsl:template>
-
-  <xsl:template match="tn">
-    <td bgcolor="#ffffff" colspan="{@colspan}" rowspan="{@rowspan}">
-      &#160;
-    </td>
-  </xsl:template>
-
-<!-- ###################################################################### -->
-<!-- markup -->
-
-  <xsl:template match="em">
-    <i><xsl:apply-templates/></i>
-  </xsl:template>
-
-  <xsl:template match='strong'>
-   <strong><xsl:apply-templates/></strong>
-  </xsl:template>
-
-  <xsl:template match="ref">
-    <i><xsl:apply-templates/></i>
-  </xsl:template>
-
-  <xsl:template match="code">
-    <!--<code><font face="courier, monospaced"><xsl:apply-templates/></font></code>-->
-    <code><xsl:apply-templates/></code>
-  </xsl:template>
-
-  <xsl:template match="br">
-    <br/>
-  </xsl:template>
-
-<!-- ###################################################################### -->
-<!-- links -->
-
-  <xsl:template match="link">
-    <xsl:if test="string-length(@anchor)=0">
-      <xsl:if test="string-length(@idref)=0">
-        <xsl:apply-templates/>
-      </xsl:if>
-      <xsl:if test="string-length(@idref)>0">
-        <a href="{@idref}.html"><xsl:apply-templates/></a>
-      </xsl:if>
-    </xsl:if>
-
-    <xsl:if test="string-length(@anchor)>0">
-      <xsl:if test="string-length(@idref)=0">
-        <a href="#{@anchor}"><xsl:apply-templates/></a>
-      </xsl:if>
-      <xsl:if test="string-length(@idref)>0">
-        <a href="{@idref}.html#{@anchor}"><xsl:apply-templates/></a>
-      </xsl:if>
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template match="anchor">
-    <a name="{@name}"><xsl:comment>anchor</xsl:comment></a>
-  </xsl:template>
-
-  <xsl:template match="jump">
-    <a href="{@href}"><xsl:apply-templates/></a>
-  </xsl:template>
-
-  <xsl:template match="img">
-   <xsl:choose>
-   <xsl:when test='starts-with(@src,"sbk:/resources/")'>
-    <img src='resources/{substring-after(@src,"sbk:/resources/")}' 
-         border="0" vspace="4" hspace="4">
-     <xsl:if test='@alt'>
-      <xsl:attribute name='alt'><xsl:value-of select='@alt'/></xsl:attribute>
-     </xsl:if>
-    </img>
-   </xsl:when>
-   <xsl:otherwise>
-    <img src="images/{@src}" border="0" vspace="4" hspace="4">
-     <xsl:if test='@alt'>
-      <xsl:attribute name='alt'><xsl:value-of select='@alt'/></xsl:attribute>
-     </xsl:if>
-    </img>
-    <!--<img src="images/{@src}" border="0" vspace="4" hspace="4" align="right"/>-->
-    <!--<img src="{@src}" border="0"/>-->
-   </xsl:otherwise>
-   </xsl:choose>
-  </xsl:template>
-
-  <xsl:template match="resource-ref">
-    <xsl:variable name="resourceFile"
-          select="document($stylebook.project)/book/resources/@source"/>
-    <xsl:variable name="xref" select="@idref"/>
-    <xsl:variable name="href"
-          select="document($resourceFile)/resources/resource[@id=$xref]/@location"/>
-    <xsl:variable name="label"
-          select="document($resourceFile)/resources/resource[@id=$xref]/@title"/>
-    <A href="{$href}" target="_top"><xsl:value-of select="$label"/></A>
-  </xsl:template>
-
-  <xsl:template match="human-resource-ref">
-    <xsl:variable name="resourceFile"
-          select="document($stylebook.project)/book/resources/@source"/>
-    <xsl:variable name="ref"  select="@idref"/>
-    <xsl:variable name="mailto"
-          select="document($resourceFile)/resources/human-resource[@id=$ref]/@mailto"/>
-   <xsl:variable name="name"
-          select="document($resourceFile)/resources/human-resource[@id=$ref]/@name"/>
-    <A href="mailto:{$mailto}"><xsl:value-of select="$name"/></A>
-  </xsl:template>
-
-<!-- ###################################################################### -->
-<!-- copy
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
--->
-</xsl:stylesheet>
diff --git a/docs/style/stylesheets/faqs2document.xsl b/docs/style/stylesheets/faqs2document.xsl
deleted file mode 100644
index aaaeb02..0000000
--- a/docs/style/stylesheets/faqs2document.xsl
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="faqs">
-    <s1 title="{@title}">
-      <s2 title="Questions">
-        <ul>
-          <xsl:apply-templates select="faq" mode="index"/>
-        </ul>
-      </s2>
-      <s2 title="Answers">
-        <br/>
-        <xsl:apply-templates select="faq"/>
-      </s2>
-    </s1>
-  </xsl:template>
-
-  <xsl:template match="faq" mode="index">
-    <li>
-      <link anchor="faq-{position()}">
-        <xsl:if test="string-length(@title)=0">
-          <xsl:value-of select="q"/>
-        </xsl:if>
-        <xsl:if test="string-length(@title)>0">
-          <xsl:value-of select="@title"/>
-        </xsl:if>
-      </link>
-    </li>
-  </xsl:template>
-
-  <xsl:template match="faq">
-    <anchor name="faq-{position()}"/>
-    <s3 title="{q}">
-      <xsl:apply-templates select="a"/>
-    </s3>
-  </xsl:template>
-
-  <xsl:template match="a">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/group2document.xsl b/docs/style/stylesheets/group2document.xsl
deleted file mode 100644
index 0c26651..0000000
--- a/docs/style/stylesheets/group2document.xsl
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
-  <xsl:template match="/">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="group">
-    <s1 title="{@title}">
-      <xsl:apply-templates/>
-    </s1>
-  </xsl:template>
-
-  <xsl:template match="entry">
-    <s2 title="{@title}">
-      <p>
-        Read the <link idref="{@id}"><xsl:value-of select="@title"/></link>
-        document or jump directly to:
-      </p>
-      <ul>
-        <xsl:apply-templates/>
-      </ul>
-    </s2>
-  </xsl:template>
-
-  <xsl:template match="voice">
-    <li><link idref="{ancestor::*/@id}" anchor="faq-{position()}"><xsl:apply-templates/></link></li>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
diff --git a/docs/style/stylesheets/releases2document.xsl b/docs/style/stylesheets/releases2document.xsl
deleted file mode 100644
index e6e2b90..0000000
--- a/docs/style/stylesheets/releases2document.xsl
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-
- <xsl:template match='/releases'>
-  <s1 title='Releases'>
-   <xsl:apply-templates/>
-  </s1>
- </xsl:template>
- 
- <xsl:template match='release'>
-  <s2>
-   <xsl:choose>
-    <xsl:when test='@date'>
-     <xsl:attribute name='title'>
-      <xsl:value-of select='@version'/>
-      - 
-      <xsl:value-of select='@date'/>
-     </xsl:attribute>
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:attribute name='title'>
-      <xsl:value-of select='@version'/>
-     </xsl:attribute>
-    </xsl:otherwise>
-   </xsl:choose>
-   <xsl:apply-templates select='desc'/>
-   <xsl:if test='changes'>
-    <ul>
-     <xsl:apply-templates select='changes/*'/>
-    </ul>
-   </xsl:if>
-  </s2>
- </xsl:template>
- 
- <xsl:template match='desc'>
-  <xsl:copy-of select='*|text()'/>
- </xsl:template>
-
- <xsl:template match='add|remove|fix|update'>
-  <xsl:variable name='name'><xsl:value-of select='name()'/></xsl:variable>
-  <li>
-   <img alt='{$name}:' src='sbk:/resources/changes-{$name}.jpg' border='0'/>
-   <xsl:copy-of select='note/*|note/text()'/>
-   <xsl:if test='submitter'>
-    <xsl:apply-templates select='submitter'/>
-   </xsl:if>
-  </li>
- </xsl:template>
- 
- <xsl:template match='submitter'>
-  <code>
-   <xsl:choose>
-    <xsl:when test='@mailto'>
-     [<jump href='mailto:{@mailto}'><xsl:value-of select='@name'/></jump>]
-    </xsl:when>
-    <xsl:otherwise>
-     [<xsl:value-of select='@name'/>]
-    </xsl:otherwise>
-   </xsl:choose>
-  </code>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/docs/style/stylesheets/settings2document.xsl b/docs/style/stylesheets/settings2document.xsl
deleted file mode 100644
index ff1541a..0000000
--- a/docs/style/stylesheets/settings2document.xsl
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
-
- <!-- Top-Level Templates -->
-
- <xsl:template match='/features'>
-  <s1 title='Features'>
-   <xsl:apply-templates select='desc' mode='header'/>
-   <xsl:apply-templates select='fcategory'/>
-  </s1>
- </xsl:template>
- 
- <xsl:template match='/properties'>
-  <s1 title='Properties'>
-   <xsl:apply-templates select='desc' mode='header'/>
-   <xsl:apply-templates select='pcategory'/>
-  </s1>
- </xsl:template>
- 
- <xsl:template match='fcategory|pcategory'>
-  <s2 title='{@name}'>
-   <xsl:apply-templates select='desc'/>
-   <xsl:apply-templates/>
-  </s2>
- </xsl:template>
-
- <xsl:template match='feature'>
-  <anchor name='{@id}'/>
-  <s3 title='{@name}'>
-   <table>
-    <xsl:apply-templates select='desc' mode='table'/>
-    <tr>
-     <th>True:</th>
-     <td><xsl:apply-templates select='true'/></td>
-    </tr>
-    <tr>
-     <th>False:</th>
-     <td><xsl:apply-templates select='false'/></td>
-    </tr>
-    <xsl:apply-templates select='default' mode='table'/>
-    <xsl:apply-templates select='access' mode='table'/>
-    <xsl:apply-templates select='note' mode='table'/>
-    <xsl:apply-templates select='see' mode='table'/>
-   </table>
-  </s3>
- </xsl:template>
-
- <xsl:template match='property'>
-  <anchor name='{@id}'/>
-  <s3 title='{@name}'>
-   <table>
-    <xsl:apply-templates select='desc' mode='table'/>
-    <tr>
-     <th>Type:</th>
-     <td><xsl:value-of select='type'/></td>
-    </tr>
-    <xsl:apply-templates select='default' mode='table'/>
-    <xsl:apply-templates select='access' mode='table'/>
-    <xsl:apply-templates select='note' mode='table'/>
-    <xsl:apply-templates select='see' mode='table'/>
-   </table>
-  </s3>
- </xsl:template>
- 
- <!-- Table Contents Templates -->
- 
- <xsl:template match='desc' mode='table'>
-  <tr>
-   <th>Desc:</th>
-   <td><xsl:apply-templates/></td>
-  </tr>
- </xsl:template>
-
- <xsl:template match='access' mode='table'>
-  <tr>
-   <th>Access:</th>
-   <td>
-    <xsl:choose>
-     <xsl:when test='@general'>
-      <xsl:value-of select='@general'/>
-     </xsl:when>
-     <xsl:otherwise>
-      <xsl:if test='@parsing'>
-       (parsing) <xsl:value-of select='@parsing'/>;
-      </xsl:if>
-      <xsl:if test='@not-parsing'>
-       (not parsing) <xsl:value-of select='@not-parsing'/>;
-      </xsl:if>
-     </xsl:otherwise>
-    </xsl:choose>
-   </td>
-  </tr>
- </xsl:template>
-
- <xsl:template match='default' mode='table'>
-  <tr>
-   <th>Default:</th>
-   <td><xsl:value-of select='@value'/></td>
-  </tr>
- </xsl:template>
- 
- <xsl:template match='note' mode='table'>
-  <tr>
-   <th>Note:</th>
-   <td><xsl:call-template name='markup'/></td>
-  </tr>
- </xsl:template>
-
- <xsl:template match='see' mode='table'>
-  <tr>
-   <th>See:</th>
-   <td>
-    <xsl:variable name='idref'><xsl:value-of select='@idref'/></xsl:variable>
-    <jump href='#{$idref}'><xsl:value-of select='//*[@id=$idref]/@name'/></jump>
-   </td>
-  </tr>
- </xsl:template>
-
- <!-- General Templates -->
-
- <xsl:template match='desc'>
-  <xsl:call-template name='markup'/>
- </xsl:template>
-
- <xsl:template match='desc' mode='header'>
-  <s2 title='{@name}'>
-   <xsl:call-template name='markup'/>
-  </s2>
- </xsl:template>
-
- <xsl:template name='markup'>
-  <xsl:copy-of select='*|text()'/>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/docs/xni-components-dependence.gif b/docs/xni-components-dependence.gif
deleted file mode 100644
index a898591..0000000
--- a/docs/xni-components-dependence.gif
+++ /dev/null
Binary files differ
diff --git a/docs/xni-components-overview.gif b/docs/xni-components-overview.gif
deleted file mode 100644
index f380d16..0000000
--- a/docs/xni-components-overview.gif
+++ /dev/null
Binary files differ
diff --git a/docs/xni-config.xml b/docs/xni-config.xml
deleted file mode 100644
index e663dd1..0000000
--- a/docs/xni-config.xml
+++ /dev/null
@@ -1,1268 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='XNI Parser Configuration'>
- <s2 title='Parser Configuration'>
-  <p>
-   Parser configurations built using the Xerces Native Interface
-   are made from a series of parser components. This document
-   details the XNI API for these components and how they are put
-   together to construct a parser configuration in the following
-   sections:
-  </p>
-  <ul>
-   <li><link anchor='components'>Components</link></li>
-   <li><link anchor='configurations'>Configurations</link></li>
-   <li><link anchor='pipelines'>Pipelines</link></li>
-  </ul>
-  <p>
-   In addition, several <link anchor='examples'>examples</link>
-   are included to show how to create some parser components and 
-   configurations:
-  </p>
-  <ul>
-   <li><link anchor='abstract-parser-config'>Abstract Parser Configuration</link></li>
-   <li><link anchor='csv-parser-config'>CSV Parser Configuration</link></li>
-  </ul>
-  <note>
-   All of the interfaces and classes defined in this document
-   reside in the <code>org.apache.xerces.xni.parser</code> package
-   but may use various interfaces and classes from the core XNI
-   package, <code>org.apache.xerces.xni</code>.
-  </note>
-  <note>
-   The source code for the samples in this document are included
-   in the downloaded packages for Xerces2.
-  </note>
- </s2>
- <anchor name='components'/>
- <s2 title='Components'>
-  <p>
-   Parser configurations are comprised of a number of parser
-   components that perform various tasks. For example, a parser
-   component may be responsible for the actual scanning of XML
-   documents to generate document "streaming" information
-   events; another component may manage commonly used symbols
-   within the parser configuration in order to improve
-   performance; and a third component may even manage the
-   resolution of external parsed entities and the transcoding
-   of these entities from various international encodings into
-   <jump href='http://www.unicode.org/'>Unicode</jump> used 
-   within the Java virtual machine. When these components are
-   assembled in a certain way, they constitute a single parser
-   configuration but they can also be used interchangeably with
-   other components that implement the appropriate interfaces.
-  </p>
-  <p>
-   <strong>Note:</strong>
-   Even though a parser is comprised of a number of components,
-   not all of these components are <em>configurable</em>. In
-   other words, some components depend on knowing the state of
-   certain features and properties of the parser configuration
-   while others can operate completely independent of the parser
-   configuration. However, when we use the term "component" when
-   talking about XNI, we are talking about a <em>configurable
-   component</em> within the parser configuration.
-  </p>
-  <p>
-   The following diagram shows an example of this collection of 
-   parser components: (Please note that this is not the <em>only</em>
-   configuration of parser components.)
-  </p>
-  <p>
-   <img alt='Parser Components' src='xni-components-overview.gif'/>
-  </p>
-  <p>
-   The only distinguishing feature of a component
-   is that it can be notified of the state
-   of parser features and properties. Features represent parser
-   state of type <code>boolean</code> whereas properties represent
-   parser state of type <code>java.lang.Object</code>. Each
-   component can also be queried for which features and properties
-   it recognizes.
-  </p>
-  <anchor name='component'/>
-  <s3 title='Interface XMLComponent'>
-   <p>
-    This interface is the basic configurable component in a parser
-    configuration. It is managed by the
-    <link anchor='component-manager'>XMLComponentManager</link>
-    which holds the parser state.
-   </p>
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void reset(
-           <link anchor='component-manager'>XMLComponentManager</link> manager
-           ) throws <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setFeature(
-           String featureId,
-           boolean state
-           ) throws <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setProperty(
-           String propertyId,
-	   Object value
-           ) throws <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr><td><code>public String[] getRecognizedFeatures();</code></td></tr>
-    <tr><td><code>public String[] getRecognizedProperties();</code></td></tr>
-   </table>
-  </s3>
-  <anchor name='configuration-exception'/>
-  <s3 title='Class XMLConfigurationException'>
-   <p>
-   </p>
-   <table>
-    <tr>
-     <th>
-      Extends <link idref='xni-core' anchor='exception'>XNIException</link>
-     </th>
-    </tr>
-    <tr><th>Constants</th></tr>
-    <tr>
-     <td><code>public static final short NOT_RECOGNIZED;</code></td>
-    </tr>
-    <tr>
-     <td><code>public static final short NOT_SUPPORTED;</code></td>
-    </tr>
-    <tr><th>Constructors</th></tr>
-    <tr>
-     <td>
-      <code>
-       public XMLConfigurationException(
-           short type,
-	   String identifier
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public XMLConfigurationException(
-           short type,
-	   String identifier,
-	   String message
-           );
-      </code>
-     </td>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr><td><code>public short getType();</code></td></tr>
-    <tr><td><code>public String getIdentifier();</code></td></tr>
-   </table>
-  </s3>
-  <p>
-   Components are managed by a component manager. The component
-   manager keeps track of the parser state for features and 
-   properties.  The component manager is responsible for notifying
-   each component when the value of those features and properties
-   change.
-  </p>
-  <p>
-   Before parsing a document, a parser configuration <em>must</em>
-   use the component manager to reset all of the parser components.
-   Then, during parsing, each time a feature or property value is
-   modified, all of the components <em>must</em> be informed of the 
-   change.
-  </p>
-  <anchor name='component-manager'/>
-  <s3 title='Interface XMLComponentManager'>
-   <p>
-    The component manager interface allows components to query
-    needed features and properties during a call to the
-    <code>XMLComponent#reset(XMLComponentManager)</code> method.
-    However, components <em>should not</em> keep a reference to
-    the component manager. In other words, all necessary state
-    should be queried when the component is reset.
-   </p>
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public boolean getFeature(
-           String featureId
-           ) throws <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public Object getProperty(
-           String propertyId
-           ) throws <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <p>
-   <strong>Note:</strong>
-   A compliant XNI parser configuration is <em>not</em>
-   required to use any components that implement the
-   <code><link anchor='component'>XMLComponent</link></code>
-   interface. That interface is included as a convenience for
-   people building modular and configurable parser components.
-   The Xerces2 reference implementation uses the component
-   interface to implement its components so that they can be
-   used interchangeably in various configurations.
-  </p>
- </s2>
- <anchor name='configurations'/>
- <s2 title='Configurations'>
-  <p>
-   An XNI parser configuration defines the entry point for a
-   parser to set features and properties, initiate a parse of
-   an XML instance document, perform entity resolution, and
-   receive notification of errors that occurred in the document.
-  </p>
-  <p>
-   A parser configuration is typically comprised of a series of
-   parser components. Some of these components may be
-   connected together to form the parsing pipeline. This parser
-   configuration is then used by a specific parser implementation
-   that generates a particular API, such as DOM or SAX. The
-   separation between the parser configuration and parser instance
-   allows the same API-generating parser to be used with an
-   unlimited number of different parser configurations.
-  </p>
-  <p>
-   When a document is parsed, the parser configuration resets the
-   configurable components and initiates the scanning of the
-   document. Typically, a scanner starts scanning the document
-   which generates XNI information set events that are sent to
-   the next component in the pipeline (e.g. the validator). The
-   information set events coming out of the end of the pipeline
-   are then communicated to the document and DTD handlers that
-   are registered with the parser configuration. 
-  </p>
-  <p>
-   The following diagram shows both the generic parsing pipeline
-   contained within a parser configuration and the separation of 
-   parser configuration and specific parser classes.
-  </p>
-  <p>
-   <img alt='Parser Configuration' src='xni-parser-configuration.gif'/>
-  </p>
-  <p>
-   There are two parser configuration interfaces defined in XNI:
-   the <code>XMLParserConfiguration</code> and the
-   <code>XMLPullParserConfiguration</code>. For most purposes, the
-   standard parser configuration will suffice. Document and DTD
-   handler interfaces will be registered on the parser configuration
-   and the document will be parsed completely by calling the
-   <code>parse(XMLInputSource)</code> method. In this situation,
-   the application is driven by the output of the configuration.
-  </p>
-  <p>
-   However, the <code>XMLPullParserConfiguration</code> interface
-   extends the <code>XMLParserConfiguration</code> interface to
-   provide methods that allow the application to drive the
-   configuration. Any configuration class that implements this
-   interface guarantees that it can be driven in a pull parsing
-   fashion but does not make any statement as to how much or how
-   little pull parsing will be performed at each step.
-  </p>
-  <anchor name='parser-configuration'/>
-  <s3 title='Interface XMLParserConfiguration'>
-   <p>
-    The parser configuration is the primary connection to specific
-    parser instances. Because the parser configuration is responsible
-    for holding the parser state, the 
-    <code>addRecognizedFeatures(String[])</code> and
-    <code>addRecognizedProperties(String[])</code> methods allow the
-    parser instance to add recognized features and properties that
-    the parser configuration will store.
-   </p>
-   <table>
-    <tr>
-     <th>
-      Extends <link anchor='component-manager'>XMLComponentManager</link>
-     </th>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setFeature(
-           String featureId,
-	   boolean state
-	   ) throws <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setProperty(
-           String propertyId,
-	   Object value
-	   ) throws <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public void addRecognizedFeatures(String[] featureIds);</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public void addRecognizedProperties(String[] propertyIds);</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setEntityResolver(
-           <link anchor='entity-resolver'>XMLEntityResolver</link> resolver
-	   );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public <link anchor='entity-resolver'>XMLEntityResolver</link>
-           getEntityResolver();
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setErrorHandler(
-           <link anchor='error-handler'>XMLErrorHandler</link> handler
-	   );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public <link anchor='error-handler'>XMLErrorHandler</link>
-           getErrorHandler();
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setDocumentHandler(
-           <link idref='xni-core' anchor='document-handler'>XMLDocumentHandler</link> handler
-	   );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public <link anchor='document-handler'>XMLDocumentHandler</link>
-           getDocumentHandler();
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setDTDHandler(
-           <link idref='xni-core' anchor='dtd-handler'>XMLDTDHandler</link> handler
-	   );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public <link anchor='dtd-handler'>XMLDTDHandler</link>
-           getDTDHandler();
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setDTDContentModelHandler(
-           <link idref='xni-core' anchor='dtd-content-model-handler'>XMLDTDContentModelHandler</link> handler
-	   );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public <link anchor='dtd-content-model-handler'>XMLDTDContentModelHandler</link>
-           getDTDContentModelHandler();
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void parse(
-           <link anchor='input-source'>XMLInputSource</link> source
-	   ) throws java.io.IOException, <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr><td><code>public void setLocale(java.util.Locale);</code></td></tr>
-    <tr><td><code>public Locale getLocale();</code></td></tr>
-   </table>
-  </s3>
-  <anchor name='pull-parser-configuration'/>
-  <s3 title='Interface XMLPullParserConfiguration'>
-   <p>
-    Parser configurations that implement this interface state that they
-    can be driven by the application in a pull parser fashion.
-   </p>
-   <table>
-    <tr>
-     <th>
-      Extends <link anchor='parser-configuration'>XMLParserConfiguration</link>
-     </th>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setInputSource(
-           <link anchor='input-source'>XMLInputSource</link> source
-	   ) throws java.io.IOException, 
-                    <link anchor='configuration-exception'>XMLConfigurationException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public boolean parse(boolean complete)
-	   throws java.io.IOException, 
-                  <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='entity-resolver'/>
-  <s3 title='Interface XMLEntityResolver'>
-   <p>
-    This interface allows resolution of the external DTD subset and
-    external parsed entities appearing in the document instance.
-   </p>
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public <link anchor='input-source'>XMLInputSource</link> resolveEntity(
-           String publicId,
-	   String systemId,
-	   String baseSystemId
-	   ) throws java.io.IOException, <link anchor='parse-exception'>XMLParseException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='error-handler'/>
-  <s3 title='Interface XMLErrorHandler'>
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void warning(
-           String domain,
-	   String key,
-           <link anchor='parse-exception'>XMLParseException</link> exception
-	   ) throws <link idref='xni-core' anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void error(
-           String domain,
-	   String key,
-           <link anchor='parse-exception'>XMLParseException</link> exception
-	   ) throws <link idref='xni-core' anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void fatalError(
-           String domain,
-	   String key,
-           <link anchor='parse-exception'>XMLParseException</link> exception
-	   ) throws <link idref='xni-core' anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='input-source'/>
-  <s3 title='Class XMLInputSource'>
-   <table>
-    <tr><th>Constructors</th></tr>
-    <tr>
-     <td>
-      <code>
-       public XMLInputSource(
-           String publicId,
-	   String systemId,
-	   String baseSystemId
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public XMLInputSource(
-           String publicId,
-	   String systemId,
-	   String baseSystemId,
-	   java.io.InputStream byteStream,
-	   String encoding
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public XMLInputSource(
-           String publicId,
-	   String systemId,
-	   String baseSystemId
-	   java.io.Reader characterStream,
-	   String encoding
-           );
-      </code>
-     </td>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr><td><code>public void setPublicId(String publicId);</code></td></tr>
-    <tr><td><code>public String getPublicId();</code></td></tr>
-    <tr><td><code>public void setSystemId(String systemId);</code></td></tr>
-    <tr><td><code>public String getSystemId();</code></td></tr>
-    <tr><td><code>public void getBaseSystemId(String baseSystemId);</code></td></tr>
-    <tr><td><code>public String getBaseSystemId();</code></td></tr>
-    <tr><td><code>public void getByteStream(java.io.InputStream byteStream);</code></td></tr>
-    <tr><td><code>public java.io.InputStream getByteStream();</code></td></tr>
-    <tr><td><code>public void getCharacterStream(java.io.Reader characterStream);</code></td></tr>
-    <tr><td><code>public java.io.Reader getCharacterStream();</code></td></tr>
-    <tr><td><code>public void setEncoding(String encoding);</code></td></tr>
-    <tr><td><code>public String getEncoding();</code></td></tr>
-   </table>
-  </s3>
-  <anchor name='parse-exception'/>
-  <s3 title='Class XMLParseException'>
-   <table>
-    <tr>
-     <th>
-      Extends <link idref='xni-core' anchor='exception'>XNIException</link>
-     </th>
-    </tr>
-    <tr><th>Constructors</th></tr>
-    <tr>
-     <td>
-      <code>
-       public XMLParseException(
-           <link idref='xni-core' anchor='locator'>XMLLocator</link> location,
-	   String message
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public XMLParseException(
-           <link idref='xni-core' anchor='locator'>XMLLocator</link> location,
-	   String message,
-	   Exception exception
-           );
-      </code>
-     </td>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr><td><code>public String getPublicId();</code></td></tr>
-    <tr><td><code>public String getSystemId();</code></td></tr>
-    <tr><td><code>public String getBaseSystemId();</code></td></tr>
-    <tr><td><code>public int getLineNumber();</code></td></tr>
-    <tr><td><code>public int getColumnNumber();</code></td></tr>
-   </table>
-  </s3>
- </s2>
- <anchor name='pipelines'/>
- <s2 title='Pipelines'>
-  <p>
-   The <link idref='xni-core'>Core Interfaces</link> provide
-   interfaces for the streaming information set. While these
-   interfaces are sufficient for communicating the document and
-   DTD information, it does not provide an easy way to construct
-   the pipeline or initiate the pipeline to start parsing an
-   XML document. The <code>org.apache.xerces.xni.parser</code> 
-   package has additional interfaces to fill exactly this need.
-  </p>
-  <p>
-   Each parser configuration can be thought of as two separate
-   pipelines: one for document information and one for DTD
-   information. Each pipeline starts with a scanner and is followed
-   by zero or more filters (objects that implement interfaces
-   to handle the incoming information as well as register
-   handlers for the outgoing information). The information that
-   comes out the end of the pipeline is usually forwarded by
-   the parser configuration to the registered handlers.
-  </p>
-  <p>
-   There are two scanner interfaces defined: the XMLDocumentScanner
-   and the XMLDTDScanner:
-  </p>
-  <anchor name='document-scanner'/>
-  <s3 title='Interface XMLDocumentScanner'>
-   <p>This interface defines an XML document scanner.</p>
-   <table>
-    <tr>
-     <th>
-      Extends <link anchor='document-source'>XMLDocumentSource</link>
-     </th>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setInputSource(
-           <link anchor='input-source'>XMLInputSource</link> source
-           ) throws java.io.IOException;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public boolean scanDocument(boolean complete)
-           throws java.io.IOException, <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='dtd-scanner'/>
-  <s3 title='Interface XMLDTDScanner'>
-   <p>
-    This interface defines a DTD scanner. Typically, scanning of
-    the DTD internal subset is initiated from the XML document 
-    scanner so the input source is implicitly the same as the
-    one used by the document scanner. Therefore, the 
-    <code>setInputSource</code> method should only be called before
-    scanning of the DTD external subset.
-   </p>
-   <table>
-    <tr>
-     <th>
-      Extends <link anchor='dtd-source'>XMLDTDSource</link>,
-      <link anchor='dtd-content-model-source'>XMLDTDContentModelSource</link>
-     </th>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setInputSource(
-           <link anchor='input-source'>XMLInputSource</link> source
-           ) throws java.io.IOException;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public boolean scanDTDInternalSubset(
-           boolean complete,
-	   boolean standalone,
-	   boolean hasExternalSubset
-	   ) throws java.io.IOException, <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public boolean scanDTDExternalSubset(
-           boolean complete
-	   ) throws java.io.IOException, <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <p>
-   Notice how each scanner interface's scanning methods take a
-   <code>complete</code> parameter and returns a boolean. This
-   allows (but does not require) scanners that implement these
-   interfaces to provide "pull" parsing behaviour in which the
-   application drives the parser's operation instead of having
-   parsing events "pushed" to the registered handlers.
-  </p>
-  <p>
-   After the scanners, zero or filters may be present in a parser
-   configuration pipeline. A document pipeline filter implements the
-   <link idref='xni-core' anchor='document-handler'>XMLDocumentHandler</link>
-   interface from the XNI Core Interfaces as well as the
-   <link anchor='document-source'>XMLDocumentSource</link>
-   interface which allows filters to be chained together in
-   the pipeline. There are equivalents source interfaces for the
-   DTD information as well.
-  </p>
-  <anchor name='document-source'/>
-  <s3 title='Interface XMLDocumentSource'>
-   <p>This interface allows a document handler to be registered.</p>
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setDocumentHandler(
-           <link idref='xni-core' anchor='document-handler'>XMLDocumentHandler</link> handler
-           );
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='document-filter'/>
-  <s3 title='Interface XMLDocumentFilter'>
-   <p>
-    Defines a document filter that acts as both a receiver and 
-    an emitter of document events.
-   </p>
-   <table>
-    <tr>
-     <th> Extends 
-      <link idref='xni-core' anchor='document-handler'>XMLDocumentHandler</link>,
-      <link anchor='document-source'>XMLDocumentSource</link>
-     </th>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='dtd-source'/>
-  <s3 title='Interface XMLDTDSource'>
-   <p>This interface allows a DTD handler to be registered.</p>
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setDTDHandler(
-           <link idref='xni-core' anchor='dtd-handler'>XMLDTDHandler</link> handler
-           );
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='dtd-filter'/>
-  <s3 title='Interface XMLDTDFilter'>
-   <p>
-    Defines a DTD filter that acts as both a receiver and 
-    an emitter of DTD events.
-   </p>
-   <table>
-    <tr>
-     <th> Extends 
-      <link idref='xni-core' anchor='dtd-handler'>XMLDTDHandler</link>,
-      <link anchor='dtd-source'>XMLDTDSource</link>
-     </th>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='dtd-content-model-source'/>
-  <s3 title='Interface XMLDTDContentModelSource'>
-   <p>This interface allows a DTD content model handler to be registered.</p>
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setDTDContentModelHandler(
-           <link idref='xni-core' anchor='dtd-content-model-handler'>XMLDTDContentModelHandler</link> handler
-           );
-      </code>
-     </td>
-    </tr>
-   </table>
-  </s3>
-  <anchor name='dtd-filter'/>
-  <s3 title='Interface XMLDTDContentModelFilter'>
-   <p>
-    Defines a DTD content model filter that acts as both a receiver and 
-    an emitter of DTD content model events.
-   </p>
-   <table>
-    <tr>
-     <th> Extends 
-      <link idref='xni-core' anchor='dtd-content-model-handler'>XMLDTDContentModelHandler</link>,
-      <link anchor='dtd-content-model-source'>XMLDTDContentModelSource</link>
-     </th>
-    </tr>
-   </table>
-  </s3>
-  <p>
-   The next section gives some basic examples for using the XNI
-   framework to construct filters and parser configurations.
-  </p>
- </s2>
- <anchor name='examples'/>
- <s2 title='Examples'>
-  <p>
-   The following samples show how to create various parser components
-   and parser configurations. The XNI samples included with the Xerces2
-   reference release provide a convenient way to test a parser
-   configuration. For example, to test the 
-   <link anchor='csv-parser-config'>CSV Parser Configuration</link>
-   example, run the following command:
-  </p>
-  <source>java xni.DocumentTracer -p CSVConfiguration document.csv</source>
-  <p>
-   Or a new CSV parser can be constructed that produces standard
-   SAX events. For example:
-  </p>
-  <source>import org.apache.xerces.parsers.AbstractSAXParser;
-
-public class CSVParser
-    extends AbstractSAXParser {
-
-    // Constructors
-
-    public CSVParser() {
-        super(new CSVConfiguration());
-    }
-
-} // class CSVParser</source>
-  <p>
-   The following samples are available:
-  </p>
-  <ul>
-   <li><link anchor='abstract-parser-config'>Abstract Parser Configuration</link></li>
-   <li><link anchor='csv-parser-config'>CSV Parser Configuration</link></li>
-  </ul>
-  <anchor name='abstract-parser-config'/>
-  <s3 title='Abstract Parser Configuration'>
-   <p>
-    This abstract parser configuration simply helps manage
-    components, features and properties, and other tasks common to
-    all parser configurations.
-   </p>
-   <source><![CDATA[import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.Vector;
-
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XNIException;
-
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-public abstract class AbstractConfiguration 
-    implements XMLParserConfiguration {
-
-    // Data
-
-    protected final Vector fRecognizedFeatures = new Vector();
-    protected final Vector fRecognizedProperties = new Vector();
-    protected final Hashtable fFeatures = new Hashtable();
-    protected final Hashtable fProperties = new Hashtable();
-
-    protected XMLEntityResolver fEntityResolver;
-    protected XMLErrorHandler fErrorHandler;
-    protected XMLDocumentHandler fDocumentHandler;
-    protected XMLDTDHandler fDTDHandler;
-    protected XMLDTDContentModelHandler fDTDContentModelHandler;
-    
-    protected Locale fLocale;
-
-    protected final Vector fComponents = new Vector();
-
-    // XMLParserConfiguration methods
-
-    public void addRecognizedFeatures(String[] featureIds) {
-        int length = featureIds != null ? featureIds.length : 0;
-        for (int i = 0; i < length; i++) {
-            String featureId = featureIds[i];
-            if (!fRecognizedFeatures.contains(featureId)) {
-                fRecognizedFeatures.addElement(featureId);
-            }
-        }
-    }
-    
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-        if (!fRecognizedFeatures.contains(featureId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, featureId);
-        }
-        fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE);
-        int length = fComponents.size();
-        for (int i = 0; i < length; i++) {
-            XMLComponent component = (XMLComponent)fComponents.elementAt(i);
-            component.setFeature(featureId, state);
-        }
-    }
-
-    public boolean getFeature(String featureId) 
-        throws XMLConfigurationException {
-        if (!fRecognizedFeatures.contains(featureId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, featureId);
-        }
-        Boolean state = (Boolean)fFeatures.get(featureId);
-        return state != null ? state.booleanValue() : false;
-    }
-    
-    public void addRecognizedProperties(String[] propertyIds) {
-        int length = propertyIds != null ? propertyIds.length : 0;
-        for (int i = 0; i < length; i++) {
-            String propertyId = propertyIds[i];
-            if (!fRecognizedProperties.contains(propertyId)) {
-                fRecognizedProperties.addElement(propertyId);
-            }
-        }
-    }
-
-    public void setProperty(String propertyId, Object value) 
-        throws XMLConfigurationException {
-        if (!fRecognizedProperties.contains(propertyId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, propertyId);
-        }
-        if (value != null) {
-            fProperties.put(propertyId, value);
-        }
-        else {
-            fProperties.remove(propertyId);
-        }
-        int length = fComponents.size();
-        for (int i = 0; i < length; i++) {
-            XMLComponent component = (XMLComponent)fComponents.elementAt(i);
-            component.setProperty(propertyId, value);
-        }
-    }
-
-    public Object getProperty(String propertyId) 
-        throws XMLConfigurationException {
-        if (!fRecognizedProperties.contains(propertyId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, propertyId);
-        }
-        Object value = fProperties.get(propertyId);
-        return value;
-    }
-
-    public void setEntityResolver(XMLEntityResolver resolver) {
-        fEntityResolver = resolver;
-    }
-    
-    public XMLEntityResolver getEntityResolver() {
-        return fEntityResolver;
-    }
-
-    public void setErrorHandler(XMLErrorHandler handler) {
-        fErrorHandler = handler;
-    }
-    
-    public XMLErrorHandler getErrorHandler() {
-        return fErrorHandler;
-    }
-
-    public void setDocumentHandler(XMLDocumentHandler handler) {
-        fDocumentHandler = handler;
-    }
-
-    public XMLDocumentHandler getDocumentHandler() {
-        return fDocumentHandler;
-    }
-
-    public void setDTDHandler(XMLDTDHandler handler) {
-        fDTDHandler = handler;
-    }
-
-    public XMLDTDHandler getDTDHandler() {
-        return fDTDHandler;
-    }
-
-    public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
-        fDTDContentModelHandler = handler;
-    }
-    
-    public XMLDTDContentModelHandler getDTDContentModelHandler() {
-        return fDTDContentModelHandler;
-    }
-
-    public abstract void parse(XMLInputSource inputSource) 
-        throws IOException, XNIException;
-    
-    public void setLocale(Locale locale) {
-        fLocale = locale;
-    }
-    
-    // Protected methods
-
-    protected void addComponent(XMLComponent component) {
-        if (!fComponents.contains(component)) {
-            fComponents.addElement(component);
-            addRecognizedFeatures(component.getRecognizedFeatures());
-            addRecognizedProperties(component.getRecognizedProperties());
-        }
-    }
-
-    protected void resetComponents() 
-        throws XMLConfigurationException {
-        int length = fComponents.size();
-        for (int i = 0; i < length; i++) {
-            XMLComponent component = (XMLComponent)fComponents.elementAt(i);
-            component.reset(this);
-        }
-    }
-
-    protected void openInputSourceStream(XMLInputSource source)
-        throws IOException {
-        if (source.getCharacterStream() != null) {
-            return;
-        }
-        InputStream stream = source.getByteStream();
-        if (stream == null) {
-            String systemId = source.getSystemId();
-            try {
-                URL url = new URL(systemId);
-                stream = url.openStream();
-            }
-            catch (MalformedURLException e) {
-                stream = new FileInputStream(systemId);
-            }
-            source.setByteStream(stream);
-        }
-    }
-
-} // class AbstractConfiguration]]></source>
-  </s3>
-  <anchor name='csv-parser-config'/>
-  <s3 title='CSV Parser Configuration'>
-   <p>
-    This example is a very simple parser configuration that can
-    parse files with comma-separated values (CSV) to generate
-    XML events. For example, the following CSV document:
-   </p>
-   <source>Andy Clark,16 Jan 1973,Cincinnati</source>
-   <p>
-    produces the following XML "document" as represented by the
-    XNI streaming document information:
-   </p>
-   <source><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE csv [
-<!ELEMENT csv (row)*>
-<!ELEMENT row (col)*>
-<!ELEMENT col (#PCDATA)>
-]>
-<csv>
- <row>
-  <col>Andy Clark</col>
-  <col>16 Jan 1973</col>
-  <col>Cincinnati</col>
- </row>
-</csv>]]></source>
-   <p>
-    Here is the source code for the CSV parser configuration. 
-    Notice that it does not use any components. Rather, it implements
-    the CSV parsing directly in the parser configuration's 
-    <code>parse(XMLInputSource)</code> method. This demonstrates
-    that you are <em>not</em> required to use the 
-    <code>XMLComponent</code> interface but it is there for
-    building modular components that can be used in other
-    configurations.
-   </p>
-   <source><![CDATA[import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.StringTokenizer;
-
-import org.apache.xerces.util.XMLAttributesImpl;
-import org.apache.xerces.util.XMLStringBuffer;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XNIException;
-
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-public class CSVConfiguration
-    extends AbstractConfiguration {
-
-    // Constants
-
-    protected static final QName CSV = new QName(null, null, "csv", null);
-    protected static final QName ROW = new QName(null, null, "row", null);
-    protected static final QName COL = new QName(null, null, "col", null);
-    protected static final XMLAttributes EMPTY_ATTRS = new XMLAttributesImpl();
-
-    // Data
-
-    private final XMLStringBuffer fStringBuffer = new XMLStringBuffer();
-
-    // XMLParserConfiguration methods
-
-    public void setFeature(String featureId, boolean state) {}
-    public boolean getFeature(String featureId) { return false; }
-    public void setProperty(String propertyId, Object value) {}
-    public Object getProperty(String propertyId) { return null; }
-
-    public void parse(XMLInputSource source) 
-        throws IOException, XNIException {
-
-        // get reader
-        openInputSourceStream(source);
-        Reader reader = source.getCharacterStream();
-        if (reader == null) {
-            InputStream stream = source.getByteStream();
-            reader = new InputStreamReader(stream);
-        }
-        BufferedReader bufferedReader = new BufferedReader(reader);
-
-        // start document
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startDocument(null, "UTF-8");
-            fDocumentHandler.xmlDecl("1.0", "UTF-8", null);
-            fDocumentHandler.doctypeDecl("csv", null, null);
-        }
-        if (fDTDHandler != null) {
-            fDTDHandler.startDTD(null);
-            fDTDHandler.elementDecl("csv", "(row)*");
-            fDTDHandler.elementDecl("row", "(col)*");
-            fDTDHandler.elementDecl("col", "(#PCDATA)");
-        }
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.startContentModel("csv");
-            fDTDContentModelHandler.startGroup();
-            fDTDContentModelHandler.element("row");
-            fDTDContentModelHandler.endGroup();
-            short csvOccurs = XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE;
-            fDTDContentModelHandler.occurrence(csvOccurs);
-            fDTDContentModelHandler.endContentModel();
-            
-            fDTDContentModelHandler.startContentModel("row");
-            fDTDContentModelHandler.startGroup();
-            fDTDContentModelHandler.element("col");
-            fDTDContentModelHandler.endGroup();
-            short rowOccurs = XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE;
-            fDTDContentModelHandler.occurrence(rowOccurs);
-            fDTDContentModelHandler.endContentModel();
-        
-            fDTDContentModelHandler.startContentModel("col");
-            fDTDContentModelHandler.startGroup();
-            fDTDContentModelHandler.pcdata();
-            fDTDContentModelHandler.endGroup();
-            fDTDContentModelHandler.endContentModel();
-        }
-        if (fDTDHandler != null) {
-            fDTDHandler.endDTD();
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(CSV, EMPTY_ATTRS);
-        }
-
-        // read lines
-        String line;
-        while ((line = bufferedReader.readLine()) != null) {
-            if (fDocumentHandler != null) {
-                fDocumentHandler.startElement(ROW, EMPTY_ATTRS);
-                StringTokenizer tokenizer = new StringTokenizer(line, ",");
-                while (tokenizer.hasMoreTokens()) {
-                    fDocumentHandler.startElement(COL, EMPTY_ATTRS);
-                    String token = tokenizer.nextToken();
-                    fStringBuffer.clear();
-                    fStringBuffer.append(token);
-                    fDocumentHandler.characters(fStringBuffer);
-                    fDocumentHandler.endElement(COL);
-                }
-                fDocumentHandler.endElement(ROW);
-            }
-        }
-        bufferedReader.close();
-
-        // end document
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endElement(CSV);
-            fDocumentHandler.endDocument();
-        }
-
-    }
-    
-} // class CSVConfiguration]]></source>
-  <p>
-   The source code is longer than it actually needs to be because
-   it also emits the DTD information necessary for a validating
-   parser to validate the document. The real core of the example
-   is the following:
-  </p>
-  <source><![CDATA[fDocumentHandler.startDocument(null, "UTF-8");
-fDocumentHandler.startElement(CSV, EMPTY_ATTRS);
-
-String line;
-while ((line = bufferedReader.readLine()) != null) {
-    if (fDocumentHandler != null) {
-        fDocumentHandler.startElement(ROW, EMPTY_ATTRS);
-        
-	StringTokenizer tokenizer = new StringTokenizer(line, ",");
-        while (tokenizer.hasMoreTokens()) {
-            fDocumentHandler.startElement(COL, EMPTY_ATTRS);
-            String token = tokenizer.nextToken();
-            fStringBuffer.clear();
-            fStringBuffer.append(token);
-            fDocumentHandler.characters(fStringBuffer);
-            fDocumentHandler.endElement(COL);
-        }
-	
-        fDocumentHandler.endElement(ROW);
-    }
-}
-
-fDocumentHandler.endElement(CSV);
-fDocumentHandler.endDocument();]]></source>
-  </s3>
- </s2>
-</s1>
diff --git a/docs/xni-core.xml b/docs/xni-core.xml
deleted file mode 100644
index d4a4109..0000000
--- a/docs/xni-core.xml
+++ /dev/null
@@ -1,1388 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='XNI Core Interfaces'>
- <s2 title='Core Interfaces'>
-  <p>
-   The Xerces Native Interface core contains a series of
-   interfaces and classes designed to communicate a document's
-   "streaming" information set. This page documents the API
-   available for receiving this information in the following
-   sections:
-  </p>
-  <ul>
-   <li><link anchor='document-information'>Document Information</link></li>
-   <li><link anchor='dtd-information'>DTD Information</link></li>
-  </ul>
-  <p>
-   A few examples are also included to illustrate the use of the
-   streaming information set:
-  </p>
-  <ul>
-   <li>
-    <link anchor='pass-through-filter'>Pass-Through Document 
-    Handler Filter</link>
-   </li>
-   <li><link anchor='upper-case-filter'>Upper-Case Filter</link></li>
-  </ul>
-  <p>
-   For information regarding the parser configuration framework, 
-   refer to the <link idref='xni-config'>Parser Configuration</link>
-   documentation.
-  </p>
-  <note>
-   The source code for the samples in this document are included
-   in the downloaded packages for Xerces2.
-  </note>
- </s2>
- <s2 title='Document Information'>
-  <p>
-   The document information is communicated using the
-   <code>XMLDocumentHandler</code> interface. In addition, the
-   <code>XMLDocumentFragmentHandler</code> interface is included
-   to get information regarding document fragments. Programmers
-   already familiar with the SAX programming interfaces should
-   be immediately comfortable programming to the Xerces Native
-   Interface. However, XNI does not depend on the SAX interfaces
-   and classes.
-  </p>
-  <note>
-   All of the interfaces and classes documented on this page
-   are contained within the <code>org.apache.xerces.xni</code>
-   package.
-  </note>
-  <anchor name='document-handler'/>
-  <s3 title='Interface XMLDocumentHandler'>
-   <p>
-    Communicates document structure and content information. This
-    is the most important handler interface in the Xerces Native
-    Interface.
-   </p>
-<!-- REVISIT: this info is already available in http://xml.apache.org/xerces2-j/api.html
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void startDocument(
-           <link anchor='locator'>XMLLocator</link> locator, 
-           String encoding
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void xmlDecl(
-           String version,
-           String encoding,
-	   String standalone
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void doctypeDecl(
-           String rootElement,
-	   String publicId,
-           String systemId
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void comment(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void processingInstruction(
-           String target,
-           <link anchor='string'>XMLString</link> data
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startPrefixMapping(
-           String prefix,
-	   String uri
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endPrefixMapping(
-           String prefix
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startElement(
-           <link anchor='qname'>QName</link> element,
-	   <link anchor='attributes'>XMLAttributes</link> attributes
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void emptyElement(
-           <link anchor='qname'>QName</link> element,
-	   <link anchor='attributes'>XMLAttributes</link> attributes
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endElement(
-           <link anchor='qname'>QName</link> element
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startEntity(
-           String name,
-	   String publicId,
-	   String systemId,
-	   String baseSystemId,
-	   String encoding
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void textDecl(
-           String version,
-	   String encoding
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endEntity(
-           String name
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void characters(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void ignorableWhitespace(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startCDATA() 
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endCDATA() 
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endDocument() 
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
--->
-
-  </s3>
-  <anchor name='document-fragment-handler'/>
-  <s3 title='Interface XMLDocumentFragmentHandler'>
-   <p>
-    Communicates information about a document fragment. This
-    interface is provided for convenience in defining a document
-    fragment but is not required to be used by a compliant XNI
-    parser component or configuration.
-   </p>
-
-<!-- REVISIT: see http://xml.apache.org/xerces2-j/api.html
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void startDocumentFragment(
-           <link anchor='locator'>XMLLocator</link> locator,
-           <link anchor='namespace-context'>NamespaceContext</link>
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startEntity(
-           String name,
-	   String publicId,
-	   String systemId,
-	   String baseSystemId,
-	   String encoding
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void textDecl(
-           String version,
-	   String encoding
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endEntity(
-           String name
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void comment(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void processingInstruction(
-           String target,
-           <link anchor='string'>XMLString</link> data
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startPrefixMapping(
-           String prefix,
-	   String uri
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endPrefixMapping(
-           String prefix
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startElement(
-           <link anchor='qname'>QName</link> element,
-	   <link anchor='attributes'>XMLAttributes</link> attributes
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void emptyElement(
-           <link anchor='qname'>QName</link> element,
-	   <link anchor='attributes'>XMLAttributes</link> attributes
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endElement(
-           <link anchor='qname'>QName</link> element
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void characters(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void ignorableWhitespace(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startCDATA() 
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endCDATA() 
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endDocumentFragment() 
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
--->
-  </s3>
-  <p>
-   Besides the handler interfaces there are several related 
-   interfaces and classes. All of these are described below.
-  </p>
-  <anchor name='exception'/>
-  <s3 title='Class XNIException'>
-   <p>Represents a generic Xerces Native Interface exception.</p>
-   <p>
-    <strong>Note:</strong> 
-    This exception extends <code>java.lang.RuntimeException</code>. 
-    Therefore, even though all of the handler interface methods can 
-    throw this type of exception, it is not explicitly required to 
-    be caught. Since XNI is intended to be an internal set of 
-    interfaces, it is expected that XNI implementations will provide 
-    a catch block for this exception at the top level so that XNI 
-    exceptions do not "leak" out to the application code.
-   </p>
-
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html
-
-   <table>
-    <tr><th>Constructors</th></tr>
-    <tr><td><code>public XNIException(String message);</code></td></tr>
-    <tr>
-     <td><code>public XNIException(Exception exception);</code></td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public XNIException(String message, Exception exception);
-      </code>
-     </td>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr><td><code>public Exception getException();</code></td></tr>
-   </table>
-
--->
-  </s3>
-  <anchor name='locator'/>
-  <s3 title='Interface XMLLocator'>
-   <p>
-    This interface is used to communicate the document location to
-    the various handler interfaces. The application can use the
-    methods on this interface to query the public, system, and
-    base system identifier as well as the line and column number.
-   </p>
-   <p>
-    A locator is passed as a parameter in the first method called
-    by the <code>XMLDocumentHandler</code>,
-    <code>XMLDocumentFragmentHandler</code>, and
-    <code>XMLDTDHandler</code> interfaces. 
-   </p>
-   <p>
-    <strong>Note:</strong> 
-    Parser components that emit document information are not required
-    to provide a locator object. However, the Xerces2 reference 
-    implementation <em>does</em> provide a locator to registered
-    handlers.
-   </p>
-   
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html
-<table>
-    <tr><th>Methods</th></tr>
-    <tr><td><code>public String getPublicId();</code></td></tr>
-    <tr><td><code>public String getSystemId();</code></td></tr>
-    <tr><td><code>public String getBaseSystemId();</code></td></tr>
-    <tr><td><code>public int getLineNumber();</code></td></tr>
-    <tr><td><code>public int getColumnNumber();</code></td></tr>
-   </table>
--->
-  </s3>
-  <anchor name='qname'/>
-  <s3 title='Class QName'>
-   <p>The QName object is a structure of qualified name information.</p>
-   <p>
-    <strong>Note:</strong>
-    The fields of this object have public visibility but should be
-    considered to be <em>read-only</em> to all methods that are
-    passed this object. The caller that creates and passes the QName
-    object "owns" the data. Therefore, callees should 
-    <strong>not</strong> retain a reference to the passed object and
-    are required to copy the references contained in the object if
-    the data is to be used beyond the scope of the method call.
-   </p>
-
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html
-   <table>
-    <tr><th>Fields</th></tr>
-    <tr><td><code>public String prefix;</code></td></tr>
-    <tr><td><code>public String localpart;</code></td></tr>
-    <tr><td><code>public String rawname;</code></td></tr>
-    <tr><td><code>public String uri;</code></td></tr>
-    <tr><th>Constructors</th></tr>
-    <tr><td><code>public QName();</code></td></tr>
-    <tr>
-     <td>
-      <code>
-       public QName(String prefix, String localpart,
-                    String rawname, String uri);
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public QName(<link anchor='qname'>QName</link> qname);
-      </code>
-     </td>
-    </tr>
-    <tr><th>Convenience Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setValues(String prefix, String localpart,
-                             String rawname, String uri);
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setValues(<link anchor='qname'>QName</link> qname);
-      </code>
-     </td>
-    </tr>
-    <tr><td><code>public void clear();</code></td></tr>
-   </table>
--->
-  </s3>
-  <anchor name='attributes'/>
-  <s3 title='Interface XMLAttributes'>
-   <p>
-    This interface represents the collection of attributes that is
-    passed to the <code>startElement</code> and <code>emptyElement</code>
-    methods of the <code>XMLDocumentHandler</code> and
-    <code>XMLDocumentFragmentHandler</code> interfaces. This
-    collection of attributes contains all of the information about
-    the attributes of an element (except order) and is editable.
-   </p>
-   <p>
-    This interface is also capable of storing information about
-    entities appearing in the attribute value. However, it should
-    be noted that if entity information is set for an attribute,
-    then the non-normalized value of the attribute <strong>must</strong>
-    also be stored because the offsets and lengths of entities in
-    the attribute have no meaning for the normalized value.
-   </p>
-
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html
-   <table>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void addAttribute(
-           <link anchor='qname'>QName</link> attrName,
-	   String attrType, 
-	   String attrValue
-           );
-      </code>
-     </td>
-    </tr>
-    <tr><td><code>public void removeAllAttributes();</code></td></tr>
-    <tr>
-     <td><code>public void removeAttributeAt(int attrIndex);</code></td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void addAttributeEntity(
-           int attrIndex,
-	   String entityName,
-	   int entityOffset,
-	   int entityLength
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public void removeAllEntitiesFor(int attrIndex);</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void removeEntityAt(int attrIndex, int entityIndex);
-      </code>
-     </td>
-    </tr>
-    <tr><td><code>public int getLength();</code></td></tr>
-    <tr><td><code>public int getIndex(String qName);</code></td></tr>
-    <tr>
-     <td>
-      <code>public int getIndex(String uri, String localName);</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setName(
-           int attrIndex,
-           <link anchor='qname'>QName</link> attrName
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void getName(
-           int attrIndex,
-           <link anchor='qname'>QName</link> attrName
-           );
-      </code>
-     </td>
-    </tr>
-    <tr><td><code>public String getURI(int attrIndex);</code></td></tr>
-    <tr>
-     <td><code>public String getLocalName(int attrIndex);</code></td>
-    </tr>
-    <tr><td><code>public String getQName(int attrIndex);</code></td></tr>
-    <tr>
-     <td>
-      <code>public void setType(int attrIndex, String attrType);</code>
-     </td>
-    </tr>
-    <tr><td><code>public String getType(int attrIndex);</code></td></tr>
-    <tr><td><code>public String getType(String qName);</code></td></tr>
-    <tr>
-     <td>
-      <code>public String getType(String uri, String localName);</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public void setValue(int attrIndex, String attrValue);</code>
-     </td>
-    </tr>
-    <tr><td><code>public String getValue(int attrIndex);</code></td></tr>
-    <tr><td><code>public String getValue(String qName);</code></td></tr>
-    <tr>
-     <td>
-      <code>public String getValue(String uri, String localName);</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setNonNormalizedValue(int attrIndex, String attrValue);
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public String getNonNormalizedValue(int attrIndex);</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setSpecified(int attrIndex, boolean specified);
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td><code>public boolean isSpecified(int attrIndex);</code></td>
-    </tr>
-    <tr>
-     <td><code>public int getEntityCount(int attrIndex);</code></td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setEntityName(
-           int attrIndex, 
-	   int entityIndex,
-	   String entityName
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public String getEntityName(
-           int attrIndex, 
-	   int entityIndex
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setEntityOffset(
-           int attrIndex, 
-	   int entityIndex,
-	   int entityOffset
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public int getEntityOffset(
-           int attrIndex, 
-	   int entityIndex
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setEntityLength(
-           int attrIndex, 
-	   int entityIndex,
-	   int entityLength
-           );
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public int getEntityLength(
-           int attrIndex, 
-	   int entityIndex
-	   );
-      </code>
-     </td>
-    </tr>
-   </table>
-
--->
-
-  </s3>
-  <anchor name='string'/>
-  <s3 title='Class XMLString'>
-   <p>
-    The XMLString object is a structure for holding text information.
-    This object allows the underlying implementation to pass text
-    information by using its own internal character buffer without
-    creating new String objects or copying the data.
-   </p>
-   <p>
-    <strong>Note:</strong>
-    The fields of this object have public visibility but should be
-    considered to be <em>read-only</em> to all methods that are
-    passed this object. The caller that creates and passes the 
-    XMLString object "owns" the data. Therefore, callees should 
-    <strong>not</strong> retain a reference to the passed object and
-    are required to copy the information contained in the object if
-    the data is to be used beyond the scope of the method call. Also,
-    callees should <strong>never</strong> modify the contents of the
-    character array directly as that could adversely affect the
-    operation of the caller.
-   </p>
-
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html
-   <table>
-    <tr><th>Fields</th></tr>
-    <tr><td><code>public char[] ch;</code></td></tr>
-    <tr><td><code>public int offset;</code></td></tr>
-    <tr><td><code>public int length;</code></td></tr>
-    <tr><th>Constructors</th></tr>
-    <tr><td><code>public XMLString();</code></td></tr>
-    <tr>
-     <td>
-      <code>
-       public XMLString(char[] ch, int offset, int length);
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public XMLString(<link anchor='string'>XMLString</link> string);
-      </code>
-     </td>
-    </tr>
-    <tr><th>Convenience Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void setValues(char[] ch, int offset, int length);
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void setValues(<link anchor='string'>XMLString</link> string);
-      </code>
-     </td>
-    </tr>
-    <tr><td><code>public void clear();</code></td></tr>
-   </table>
--->
-  </s3>
-  <anchor name='namespace-context'/>
-  <s3 title='Interface NamespaceContext'>
-   <p>
-    Namespace context information for document fragments. This 
-    object is passed to the first method of the
-    <code>XMLDocumentFragmentHandler</code> interface.
-   </p>
-
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html   
-<table>
-    <tr><th>Constants</th></tr>
-    <tr><td><code>public static final String XMLNS;</code></td></tr>
-    <tr><td><code>public String getURI(String prefix);</code></td></tr>
-    <tr><td><code>public int getDeclaredPrefixCount();</code></td></tr>
-    <tr>
-     <td><code>public String getDeclaredPrefixAt(int index);</code></td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public <link anchor='namespace-context'>NamespaceContext</link>
-       getParentContext();
-      </code>
-     </td>
-    </tr>
-   </table>
--->
-
-  </s3>
- </s2>
- <s2 title='DTD Information'>
-  <p>
-   The DTD information is communicated through two interfaces:
-   <code>XMLDTDHandler</code> and <code>XMLDTDContentModelHandler</code>.
-   The first handler interface passes the basic DTD information
-   whereas the second handler interface breaks down each element
-   declaration content model into separate callbacks.
-  </p>
-  <s3 title='Interface XMLDTDHandler'>
-   <p>
-    Communicates basic DTD information such as element and attribute
-    declarations. The implementor of this interface can also be
-    informed of characters within an ignored conditional section.
-   </p>
-
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html
-   <table>
-    <tr><th>Constants</th></tr>
-    <tr>
-     <td><code>public static final short CONDITIONAL_INCLUDE;</code></td>
-    </tr>
-    <tr>
-     <td><code>public static final short CONDITIONAL_IGNORE;</code></td>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void startDTD(
-           <link anchor='locator'>XMLLocator</link> locator
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startEntity(
-           String name,
-	   String publicId,
-	   String systemId,
-	   String baseSystemId,
-	   String encoding
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void textDecl(
-           String version,
-	   String encoding
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endEntity(
-           String name
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void comment(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void processingInstruction(
-           String target,
-           <link anchor='string'>XMLString</link> data
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void elementDecl(
-           String name,
-	   String contentModel
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startAttlist(
-           String elementName
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void attributeDecl(
-           String elementName,
-	   String attributeName,
-	   String type,
-	   String[] enumeration,
-	   String defaultType,
-	   <link anchor='string'>XMLString</link> defaultValue
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endAttlist() throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void internalEntityDecl(
-           String name,
-	   <link anchor='string'>XMLString</link> text
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void externalEntityDecl(
-           String name,
-	   String publicId,
-	   String systemId,
-	   String baseSystemId
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void unparsedEntityDecl(
-           String name,
-	   String publicId,
-	   String systemId,
-	   String notation
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void notationDecl(
-           String name,
-	   String publicId,
-	   String systemId
-           ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startConditional(
-           short type
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void characters(
-           <link anchor='string'>XMLString</link> text
-	   ) throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endConditional() throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endDTD() throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
--->
-
-  </s3>
-  <s3 title='Interface XMLDTDContentModelHandler'>
-   <p>
-    Breaks down each element declaration's content model into 
-    a set of separate methods so that handlers don't have to 
-    reparse the content model string given in the 
-    <code>XMLDTDHandler#elementDecl(String,String)</code> method. 
-    This separation also helps those applications that want to 
-    know boundaries of entities when used as part of an element's 
-    content model.
-   </p>
-
-<!-- REVISIT: http://xml.apache.org/xerces2-j/api.html
-   <table>
-    <tr><th>Constants</th></tr>
-    <tr>
-     <td>
-      <code>public static final short SEPARATOR_CHOICE;</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public static final short SEPARATOR_SEQUENCE;</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public static final short OCCURS_ZERO_OR_ONE;</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public static final short OCCURS_ZERO_OR_MORE;</code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>public static final short OCCURS_ONE_OR_MORE;</code>
-     </td>
-    </tr>
-    <tr><th>Methods</th></tr>
-    <tr>
-     <td>
-      <code>
-       public void startContentModel()
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void any()
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void empty()
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void startGroup()
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void pcdata()
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void element(String elementName)
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void separator(short type)
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void occurrence(short type)
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endGroup()
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-    <tr>
-     <td>
-      <code>
-       public void endContentModel()
-           throws <link anchor='exception'>XNIException</link>;
-      </code>
-     </td>
-    </tr>
-   </table>
-
--->
-
-  </s3>
- </s2>
- <s2 title='Examples'>
-  <p>
-   The following examples demonstrate the basic use of the various
-   XNI handler interfaces.
-  </p>
-  <anchor name='pass-through-filter'/>
-  <s3 title='Pass-Through Document Handler Filter'>
-   <p>
-    The following example demonstrates a basic pass-through 
-    document handler filter. This filter receives document handler
-    events and passes them through to the next document handler.
-   </p>
-   <source>import org.apache.xerces.xni.<link anchor='qname'>QName</link>;
-import org.apache.xerces.xni.<link anchor='attributes'>XMLAttributes</link>;
-import org.apache.xerces.xni.<link anchor='document-handler'>XMLDocumentHandler</link>;
-import org.apache.xerces.xni.<link anchor='locator'>XMLLocator</link>;
-import org.apache.xerces.xni.<link anchor='string'>XMLString</link>;
-import org.apache.xerces.xni.<link anchor='string'>XNIException</link>;
-
-public class PassThroughFilter
-    implements <link anchor='document-handler'>XMLDocumentHandler</link> {
-    
-    // Data
-    
-    protected <link anchor='document-handler'>XMLDocumentHandler</link> fDocumentHandler;
-    
-    // Public methods
-   
-    public void setDocumentHandler(<link anchor='document-handler'>XMLDocumentHandler</link> handler) {
-        fDocumentHandler = handler;
-    }
-    
-    // XMLDocumentHandler methods
-    
-    public void startDocument(<link anchor='locator'>XMLLocator</link> locator, String encoding)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startDocument(locator, encoding);
-        }
-    }
-    
-    public void xmlDecl(String version, String encoding, 
-                        String standalone) throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.xmlDecl(version, encoding, standalone);
-        }
-    }
-    
-    public void doctypeDecl(String rootElement, String publicId, 
-                            String systemId) throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId);
-        }
-    }
-    
-    public void comment(<link anchor='string'>XMLString</link> text)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.comment(text);
-        }
-    }
-    
-    public void processingInstruction(String target, <link anchor='string'>XMLString</link> data)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.processingInstruction(target, data);
-        }
-    }
-    
-    public void startPrefixMapping(String prefix, String uri)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startPrefixMapping(prefix, uri);
-        }
-    }
-    
-    public void endPrefixMapping(String prefix)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endPrefixMapping(prefix);
-        }
-    }
-    
-    public void startElement(<link anchor='qname'>QName</link> element, <link anchor='attributes'>XMLAttributes</link> attributes)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(element, attributes);
-        }
-    }
-    
-    public void emptyElement(<link anchor='qname'>QName</link> element, <link anchor='attributes'>XMLAttributes</link> attributes)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.emptyElement(element, attributes);
-        }
-    }
-    
-    public void endElement(<link anchor='qname'>QName</link> element)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endElement(element);
-        }
-    }
-    
-    public void startEntity(String name, 
-                            String publicId, String systemId, 
-                            String baseSystemId, String encoding) 
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startEntity(name, 
-                                         publicId, systemId, 
-                                         baseSystemId, encoding);
-        }
-    }
-    
-    public void textDecl(String version, String encoding)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.textDecl(version, encoding);
-        }
-    }
-    
-    public void endEntity(String name)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endEntity(name);
-        }
-    }
-    
-    public void characters(<link anchor='string'>XMLString</link> text)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.characters(text);
-        }
-    }
-    
-    public void ignorableWhitespace(<link anchor='string'>XMLString</link> text)
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.ignorableWhitespace(text);
-        }
-    }
-    
-    public void startCDATA()
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startCDATA();
-        }
-    }
-    
-    public void endCDATA()
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endCDATA();
-        }
-    }
-    
-    public void endDocument()
-        throws <link anchor='exception'>XNIException</link> {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endDocument();
-        }
-    }
-    
-} // class PassThroughFilter</source>
-  </s3>
-  <anchor name='upper-case-filter'/>
-  <s3 title='Upper-Case Filter'>
-   <p>
-    The following code extends the pass-through document handler
-    filter to upper-case all of the element names.
-   </p>
-   <source>import org.apache.xerces.xni.<link anchor='qname'>QName</link>;
-import org.apache.xerces.xni.<link anchor='attributes'>XMLAttributes</link>;
-import org.apache.xerces.xni.<link anchor='string'>XNIException</link>;
- 
-public class UpperCaseFilter
-    extends PassThroughFilter {
-    
-    // Data
-    
-    private final <link anchor='qname'>QName</link> fQName = new QName();
-
-    // XMLDocumentHandler methods
-    
-    public void startElement(<link anchor='qname'>QName</link> element, <link anchor='attributes'>XMLAttributes</link> attributes)
-        throws <link anchor='exception'>XNIException</link> {
-        super.startElement(toUpperCase(element), attributes);
-    }
-    
-    public void emptyElement(<link anchor='qname'>QName</link> element, <link anchor='attributes'>XMLAttributes</link> attributes)
-        throws <link anchor='exception'>XNIException</link> {
-        super.emptyElement(toUpperCase(element), attributes);
-    }
-    
-    public void endElement(<link anchor='qname'>QName</link> element)
-        throws <link anchor='exception'>XNIException</link> {
-        super.endElement(toUpperCase(element));
-    }
-    
-    // Protected methods
-    
-    protected QName toUpperCase(<link anchor='qname'>QName</link> qname) {
-        String prefix = qname.prefix != null
-                      ? qname.prefix.toUpperCase() : null;
-        String localpart = qname.localpart != null
-                         ? qname.localpart.toUpperCase() : null;
-        String rawname = qname.rawname != null
-                       ? qname.rawname.toUpperCase() : null;
-        String uri = qname.uri;
-        fQName.setValues(prefix, localpart, rawname, uri);
-        return fQName;
-    }
-
-} // class UpperCaseFilter</source>
-  </s3>
- </s2>
-</s1>
diff --git a/docs/xni-design.xml b/docs/xni-design.xml
deleted file mode 100644
index 18eabfb..0000000
--- a/docs/xni-design.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='XNI Design Details'>
- <s2 title='Overview'>
-  <p>
-   A parser written to conform to the Xerces Native Interface (XNI)
-   framework is configured as a pipeline of parser components. The
-   document's "streaming" information set flows through this pipeline
-   of components to produce some sort of programming interface as the
-   output. For example, the pipeline could produce a W3C Document
-   Object Model (DOM) or a series of Simple API for XML (SAX) events.
-  </p>
-  <p>
-   The core XNI interfaces provide a mechanism for the document
-   information to flow from component to component. However, beyond 
-   the basic information intefaces, XNI also defines a framework for 
-   constructing these pipelines and parser configurations. This
-   document is designed to give you an overview of this framework
-   and what a parser looks like that is written to conform to the
-   Xerces Native Interface. An overview of these frameworks are
-   described below:
-  </p>
-  <ul>
-   <li><link anchor='pipeline'>Pipeline</link></li>
-   <li><link anchor='configuration'>Configuration</link></li>
-  </ul>
-  <p>
-   For more detailed information, refer to the following documents:
-  </p>
-  <ul>
-   <li><link idref='xni-core'>Core Interfaces</link></li>
-   <li><link idref='xni-config'>Parser Configuration</link></li>
-   <li><link idref='xni-xerces2'>Xerces2 Parser Components</link></li>
-  </ul>
- </s2>
- <anchor name='pipeline'/>
- <s2 title='Pipeline'>
-  <p>
-   The XNI parser pipeline is any combination of components that
-   are either capable of producing XNI events, consuming XNI events,
-   or both. All pipelines consist of a source, zero or more filters,
-   and a target. The source is typically the XML scanner; common
-   filters are DTD and XML Schema validators, a namespace binder,
-   etc; and the target is the parser that consumes the XNI events
-   and produces a common programming interface such as DOM or SAX.
-   The following diagram illustrates the basic pipeline configuration.
-  </p>
-  <p>
-   <img alt='Basic Pipeline Configuration' src='xni-pipeline-basic.gif'/>
-  </p>
-  <p>
-   However, this is a simplified view of the pipeline configuration.
-   The Xerces Native Interface actually defines two different pipelines
-   with three interfaces: one for document information and two for DTD
-   information. 
-  </p>
-  <p>
-   The Xerces2 parser, the reference implementation of XNI,
-   contains more components than the basic pipeline configuration 
-   diagram shows. The following diagram shows the Xerces2 pipeline
-   configuration. The arrow going from left to right on the top of the
-   image represents the flow of document information and the arrows on 
-   the bottom of the image represent the DTD information flowing through
-   the parser pipeline.
-  </p>
-  <p>
-   <img alt='Xerces2 Pipeline Configuration' src='xni-pipeline-detailed.gif'/>
-  </p>
-  <p>
-   As the diagram shows, the "Document Scanner" is the source for
-   document information and the "DTD Scanner" is the source for DTD
-   information. Both document and DTD information generated by the
-   scanners flow into the "DTD Validator" where structure and content 
-   is validated according to the DTD grammar, if present. From here, 
-   the validated document information with possible augmentations such 
-   as default attribute values and attribute value normalization flows 
-   to the "Namespace Binder" which applies the namespace information to 
-   elements and attributes. The newly namespace-bound document 
-   document information then flows to the "Schema Validator" for 
-   validation based on the XML Schema, if present. Finally, the
-   document and DTD information flow to the "Parser" which generates
-   a programming interface such as DOM or SAX.
-  </p>
-  <p>
-   XNI defines the document information using a number of core
-   interfaces. (These interfaces are described in more detail in the
-   <link idref='xni-api-core'>Core API</link> documentation.) But XNI 
-   also defines a set of interfaces to build parser configurations 
-   that assemble the pipelines in order to parse documents. The next
-   section gives a general overview of the this parser configuration
-   provided by XNI.
-  </p>
- </s2>
- <anchor name='configuration'/>
- <s2 title='Configuration'>
-  <p>
-   A parser implementation written using the Xerces Native Interface
-   can be seen as a collection of components, some of which are
-   connected together to form the pipelines for document and DTD
-   information. All of the components in the parser are managed by
-   a "Component Manager" that does the following:
-  </p>
-  <ul>
-   <li>Keeps track of parser settings and options,</li>
-   <li>
-    Instantiates and configures the various components in the parser, and
-   </li>
-   <li>Assembles the parsing pipeline and initiates parsing of documents.</li>
-  </ul>
-  <p>
-   The following diagram represents a typical parser configuration
-   that has a component manager and various components such as a
-   "Symbol Table", "Scanner", etc.
-  </p>
-  <p>
-   <img alt='Generic Parser Configuration' src='xni-components-overview.gif'/>
-  </p>
-  <p>
-   Some of the components in a configuration are configurable and others
-   are not. The actual details regarding component configuration, however,
-   can be found in the <link idref='xni-config'>XNI Parser Configuration</link>
-   document. But for now it is sufficient to understand the basic overview
-   of parser configurations.
-  </p>
-  <p>
-   The XNI parser configuration framework provides an easy and
-   convenient way to construct different kinds of parser configurations.
-   By separating the configuration from the API generation (in each
-   specific parser object), different parser configurations can be used to
-   build a DOM tree or emit SAX events without re-implementing the DOM or
-   SAX code. The following diagram shows this separation. Notice how the
-   document information flows through the pipeline in the parser 
-   configuration and then to the parser object which generates different
-   APIs.
-  </p>
-  <p>
-   <img alt='Configuration and Parser Separation' src='xni-parser-configuration.gif'/>
-  </p>
- </s2>
-</s1>
diff --git a/docs/xni-entity-manager.gif b/docs/xni-entity-manager.gif
deleted file mode 100644
index 9a2dd11..0000000
--- a/docs/xni-entity-manager.gif
+++ /dev/null
Binary files differ
diff --git a/docs/xni-parser-configuration.gif b/docs/xni-parser-configuration.gif
deleted file mode 100644
index c6f1568..0000000
--- a/docs/xni-parser-configuration.gif
+++ /dev/null
Binary files differ
diff --git a/docs/xni-pipeline-basic.gif b/docs/xni-pipeline-basic.gif
deleted file mode 100644
index 6a10503..0000000
--- a/docs/xni-pipeline-basic.gif
+++ /dev/null
Binary files differ
diff --git a/docs/xni-pipeline-detailed.gif b/docs/xni-pipeline-detailed.gif
deleted file mode 100644
index cd1f2f9..0000000
--- a/docs/xni-pipeline-detailed.gif
+++ /dev/null
Binary files differ
diff --git a/docs/xni-xerces2.xml b/docs/xni-xerces2.xml
deleted file mode 100644
index ab17543..0000000
--- a/docs/xni-xerces2.xml
+++ /dev/null
@@ -1,517 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='Xerces2 Components'>
- <s2 title='Re-using Xerces2 Parser Components'>
-  <p>
-   The Xerces Native Interface (XNI) defines a general way to build
-   parser components and configurations. The Xerces2 reference
-   implementation is written using this framework so that the parser
-   components can be re-used to create new parser configurations. In
-   order to re-use the Xerces2 parser components, however, the
-   developer must know the dependencies of each standard component.
-   This document provides an overview of the Xerces2 parser components
-   and lists the relevent dependencies.
-  </p>
-  <p>
-   An overview of the general dependencies and the dependencies for
-   each standard component are detailed below:
-  </p>
-  <ul>
-   <li><link anchor='overview'>Overview</link></li>
-   <li>Fundamental Dependencies</li>
-   <ul>
-    <li><link anchor='symbol-table'>Symbol Table</link></li>
-    <li><link anchor='error-reporter'>Error Reporter</link></li>
-   </ul>
-   <li>Individual Component Dependencies</li>
-   <ul>
-    <li><link anchor='document-scanner'>Document Scanner</link></li>
-    <li><link anchor='dtd-scanner'>DTD Scanner</link></li>
-    <li><link anchor='entity-manager'>Entity Manager</link></li>
-    <li><link anchor='dtd-validator'>DTD Validator</link></li>
-    <li><link anchor='namespace-binder'>Namespace Binder</link></li>
-    <li><link anchor='schema-validator'>Schema Validator</link></li>
-   </ul>
-   <!-- NOTE:
-     - More components and their dependencies may be added as
-     - they are made and integrated into the standard Xerces2
-     - configuration.
-     -->
-  </ul>
- </s2>
- <anchor name='overview'/>
- <s2 title='Overview'>
-  <p>
-   The standard parser configuration for the Xerces2 reference
-   implementation of XNI is defined in the
-   <code>org.apache.xerces.parsers.StandardParserConfiguration</code>
-   class. This configuration is comprised of a number of 
-   components. Some of these components are configurable and some 
-   are shared within the configuration but do not implement the
-   <link idref='xni-config' anchor='component'>XMLComponent</link>
-   interface.
-  </p>
-  <p>
-   The following list details the set of components used in the 
-   Xerces2 standard configuration. The components marked with an
-   asterisk (*) are configurable.
-  </p>
-  <ul>
-   <li>Symbol Table</li>
-   <li>Error Reporter (*)</li>
-   <li>Document Scanner (*)</li>
-   <li>DTD Scanner (*)</li>
-   <li>Entity Manager (*)</li>
-   <li>DTD Validator (*)</li>
-   <li>Namespace Binder (*)</li>
-   <li>Schema Validator (*)</li>
-  </ul>
-  <note>
-   There are additional components other than those in the above
-   list, such as the "Grammar Pool" and "Datatype Validator
-   Factory". However, the validation engine in the Xerces2
-   reference implementation is currently being re-designed and
-   re-implemented. Therefore, these components are subject to
-   change and should not be used or relied upon.
-  </note>
-  <p>
-   In general, there are levels of dependency among the components
-   in the standard configuration. Some components are required by
-   all of the configurable components, where as there are certain
-   components required by other components. The following diagram
-   illustrates these basic levels of dependency.
-  </p>
-  <p>
-   <img alt='Xerces2 Component Dependencies' src='xni-components-dependence.gif'/>
-  </p>
-  <p>
-   The dependencies of each component are detailed in subsequent
-   sections of this document but the basic dependencies are 
-   listed below:
-  </p>
-  <ul>
-   <li>
-    All of the configurable Xerces2 components in the standard 
-    configuration depend on the 
-    "<link anchor='symbol-table'>Symbol Table</link>" and the
-    "<link anchor='error-reporter'>Error Reporter</link>".
-   </li>
-   <li>
-    Both the "<link anchor='document-scanner'>Document Scanner</link>"
-    and the "<link anchor='dtd-scanner'>DTD Scanner</link>" depend 
-    on the "<link anchor='entity-manager'>Entity Manager</link>"
-    component.
-   </li>
-   <li>
-    In addition to the other dependencies, the 
-    "<link anchor='document-scanner'>Document Scanner</link>" also
-    depends on the 
-    "<link anchor='dtd-scanner'>DTD Scanner</link>" for scanning of
-    the internal and external subsets of the DTD.
-   </li>
-  </ul>
-  <p>
-   Each configurable component queries the components that it
-   depends on before each document is parsed. The configuration 
-   is required to call the 
-   <link idref='xni-config' anchor='component'>XMLComponent</link>'s 
-   "reset" method. From the 
-   <link idref='xni-config' anchor='component-manager'>XMLComponentManager</link>
-   object that is passed to the "reset" method, the component
-   can query the other components that it needs. Therefore, each
-   component is assigned a unique property identifier used to
-   query the components from the component manager.
-  </p>
-  <p>
-   The following example source code shows how one of the
-   standard Xerces2 components is queried within a configurable
-   component. However, for complete dependency details and the 
-   property identifiers defined for each component, refer to the
-   appropriate sections of this document.
-  </p>
-  <source><![CDATA[import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-
-public class MyComponent
-    implements XMLComponent {
-    
-    // Constants
-    
-    public static final String SYMBOL_TABLE =
-        "http://apache.org/xml/properties/internal/symbol-table";
-
-    // XMLComponent methods
-    
-    public void reset(XMLComponentManager manager)
-        throws XMLConfigurationException {
-        SymbolTable symbolTable = 
-	    (SymbolTable)manager.getProperty(SYMBOL_TABLE);
-    }
-
-}]]></source>
- </s2>
- <anchor name='symbol-table'/>
- <s2 title='Symbol Table'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/symbol-table</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.util.SymbolTable</td>
-   </tr>
-  </table>
-  <p>
-   For performance reasons, the Xerces2 reference implementation
-   uses a custom symbol table in order to re-use common strings
-   that appear in the document. The symbol table is responsible
-   for keeping track of these common strings and always return
-   the same <code>java.lang.String</code> reference for lexically
-   equivalent strings. This not only reduces the amount of unique
-   objects created while parsing, it also allows components (e.g.
-   the validators, etc) to perform comparisons directly on the
-   references for certain string objects without having to call
-   the "equals" method.
-  </p>
-  <p>
-   <strong>Note:</strong> 
-   Nearly all of the standard components depend on this component.
-   Therefore, if you write a parser configuration that re-uses any
-   of the standard components, you must have an instance of this
-   component registered with the appropriate property identifier.
-  </p>
- </s2>
- <anchor name='error-reporter'/>
- <s2 title='Error Reporter'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/error-reporter</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.impl.XMLErrorReporter</td>
-   </tr>
-  </table>
-  <p>Recognized features:</p>
-  <ul>
-   <li>http://apache.org/xml/features/continue-after-fatal-error</li>
-  </ul>
-  <p>Recognized properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/internal/error-handler</li>
-  </ul>
-  <p>
-   In any parser instance, there must be a way for components to
-   report errors in a uniform way. The "Error Reporter" component
-   serves this purpose and simplifies the process of localizing
-   error messages and notifying the registered
-   <link idref='xni-parser' anchor='error-handler'>XMLErrorHandler</link>.
-  </p>
-  <p>
-   In general, errors are identified by the domain of the error 
-   and a unique key within that domain. The XMLErrorReporter class
-   allows message formatters to be set for each domain and then
-   delegates the formatting of error messages (with replacement
-   text) to the message formatter assigned to that error domain.
-   The localized error message is then sent to the registered
-   error handler.
-  </p>
-  <p>
-   An error message formatter is any class that implements the
-   <code>org.apache.xerces.util.MessageFormatter</code> interface.
-   If you write a new parser component for use with the existing
-   Xerces2 components, you should implement your own message 
-   formatter and register it with the Error Reporter. For
-   example:
-  </p>
-  <source><![CDATA[import java.util.Locale;
-import java.util.MissingResourceException;
-import org.apache.xerces.util.MessageFormatter;
-
-public class MyFormatter
-    implements MessageFormatter {
-
-    // MessageFormatter methods
-    
-    public String formatMessage(Locale locale, String key, Object[] args)
-        throws MissingResourceException {
-        // localize and format message based on locale, key, 
-	// and replacement text arguments
-	return "MY ERROR ("+key+")";
-    }
-
-}]]></source>
-  <source><![CDATA[import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-
-public class MyComponent
-    implements XMLComponent {
-    
-    // Constants
-    
-    public static final String ERROR_REPORTER =
-        "http://apache.org/xml/properties/internal/error-reporter";
-
-    public static final String DOMAIN = "http://example.com/mydomain";
-
-    // XMLComponent methods
-    
-    public void reset(XMLComponentManager manager)
-        throws XMLConfigurationException {
-        XMLErrorReporter reporter = 
-	    (XMLErrorReporter)manager.getProperty(ERROR_REPORTER);
-	if (reporter.getMessageFormatter(DOMAIN) == null) {
-	    reporter.putMesssageFormatter(DOMAIN, new MyFormatter());
-	}
-    }
-
-}]]></source>
-  <p>
-   <strong>Note:</strong>
-   It is <em>strongly</em> encouraged that any new error domains
-   that you create follow the standard URI syntax. While there is
-   no requirement that the URI must point to an actual resource on 
-   the Internet, it is a common way to separate domains and it
-   provides more useful information to the application. 
-  </p>
-  <p>
-   <strong>Note:</strong> 
-   Nearly all of the standard components depend on this component.
-   Therefore, if you write a parser configuration that re-uses any
-   of the standard components, you must have an instance of this
-   component registered with the appropriate property identifier.
-  </p>
- </s2>
- <anchor name='document-scanner'/>
- <s2 title='Document Scanner'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/document-scanner</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.xni.parser.XMLDocumentScanner</td>
-   </tr>
-  </table>
-  <p>Required properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/internal/symbol-table</li>
-   <li>http://apache.org/xml/properties/internal/error-reporter</li>
-   <li>http://apache.org/xml/properties/internal/entity-manager</li>
-   <li>http://apache.org/xml/properties/internal/dtd-scanner</li>
-  </ul>
-  <p>Recognized features:</p>
-  <ul>
-   <li>http://xml.org/sax/features/namespaces</li>
-   <li>http://xml.org/sax/features/validation</li>
-   <li>http://apache.org/xml/features/nonvalidating/load-external-dtd</li>
-   <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
-   <li>http://apache.org/xml/features/scanner/notify-builtin-refs</li>
-  </ul>
-  <p>
-   The <code>org.apache.xerces.impl.XMLDocumentScannerImpl</code>
-   class implements the XNI document scanner interface and is
-   implemented so that it can also function as a "pull" parser.
-   A pull parser allows the application to drive the parsing of 
-   the document instead of having all of the document events
-   "pushed" to the registered handlers.
-  </p>
- </s2>
- <anchor name='dtd-scanner'/>
- <s2 title='DTD Scanner'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/dtd-scanner</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.xni.parser.XMLDTDScanner</td>
-   </tr>
-  </table>
-  <p>Required properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/internal/symbol-table</li>
-   <li>http://apache.org/xml/properties/internal/error-reporter</li>
-   <li>http://apache.org/xml/properties/internal/entity-manager</li>
-  </ul>
-  <p>Recognized features:</p>
-  <ul>
-   <li>http://xml.org/sax/features/validation</li>
-   <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
-  </ul>
-  <p>
-   The <code>org.apache.xerces.impl.XMLDTDScannerImpl</code>
-   class implements the XNI DTD scanner interface and is
-   implemented so that it can also function as a "pull" parser.
-   A pull parser allows the application to drive the parsing of 
-   the DTD instead of having all of the DTD events
-   "pushed" to the registered handlers.
-  </p>
- </s2>
- <anchor name='entity-manager'/>
- <s2 title='Entity Manager'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/entity-manager</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.impl.XMLEntityManager</td>
-   </tr>
-  </table>
-  <p>Required properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/internal/symbol-table</li>
-   <li>http://apache.org/xml/properties/internal/error-reporter</li>
-  </ul>
-  <p>Recognized features:</p>
-  <ul>
-   <li>http://xml.org/sax/features/validation</li>
-   <li>http://xml.org/sax/features/external-general-entities</li>
-   <li>http://xml.org/sax/features/external-parameter-entities</li>
-   <li>http://apache.org/xml/features/allow-java-encodings</li>
-  </ul>
-  <p>Recognized properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/entity-resolver</li>
-  </ul>
-  <p>
-   Both the <link anchor='document-scanner'>Document Scanner</link>
-   and the <link anchor='dtd-scanner'>DTD Scanner</link> depend
-   on the Entity Manager. This component handles starting and
-   stopping entities automatically so that the scanners can continue
-   operation transparently even when entities go in and out of
-   scope.
-  </p>
-  <p>
-   The Entity Manager implements an Entity Scanner which is a 
-   low-level scanner for document and DTD information. Because
-   the document and DTD scanners interact only with the Entity
-   Scanner to scan the document, the scanners are shielded from
-   changes caused by starting and stopping entities. Changes in
-   the entities being scanned happens transparently within the 
-   Manager/Scanner combination but the scanner components are
-   notified of the start and end of the entity by implementing
-   the XMLEntityHandler interface that is only part of the
-   Xerces2 reference implementation.
-  </p>
- </s2>
- <anchor name='dtd-validator'/>
- <s2 title='DTD Validator'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/validator/dtd</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.impl.dtd.XMLDTDValidator</td>
-   </tr>
-  </table>
-  <p>Required properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/internal/symbol-table</li>
-   <li>http://apache.org/xml/properties/internal/error-reporter</li>
-   <!--
-     - NOTE: The following properties are also required but the
-     -       validation engine is being redesigned so I'm not
-     -       listing them in the documentation.
-   <li>http://apache.org/xml/properties/internal/grammar-pool</li>
-   <li>http://apache.org/xml/properties/internal/datatype-validator-factory</li>
-   -->
-  </ul>
-  <p>Recognized features:</p>
-  <ul>
-   <li>http://xml.org/sax/features/namespaces</li>
-   <li>http://xml.org/sax/features/validation</li>
-   <li>http://apache.org/xml/features/validation/dynamic</li>
-  </ul>
-  <p>
-   The DTD Validator performs validation of the document events that 
-   it receives which may augment the streaming information set with
-   default attribute values and normalizing attribute values.
-  </p>
- </s2>
- <anchor name='namespace-binder'/>
- <s2 title='Namespace Binder'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/namespace-binder</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.impl.XMLNamespaceBinder</td>
-   </tr>
-  </table>
-  <p>Required properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/internal/symbol-table</li>
-   <li>http://apache.org/xml/properties/internal/error-reporter</li>
-  </ul>
-  <p>Recognized features:</p>
-  <ul>
-   <li>http://xml.org/sax/features/namespaces</li>
-  </ul>
-  <p>
-   The Namespace Binder is responsible for detecting namespace bindings
-   in the startElement/emptyElement methods and emitting appropriate 
-   start and end prefix mapping events. Namespace binding should always
-   occur <em>after</em> DTD validation (since namespace bindings may
-   have been defaulted from an attribute declaration in the DTD) and
-   <em>before</em> Schema validation.
-  </p>
- </s2>
- <anchor name='schema-validator'/>
- <s2 title='Schema Validator'>
-  <p>Property information:</p>
-  <table>
-   <tr>
-    <th>Property Id</th>
-    <td>http://apache.org/xml/properties/internal/validator/schema</td>
-   </tr>
-   <tr>
-    <th>Type</th>
-    <td>org.apache.xerces.impl.xs.XMLSchemaValidator</td>
-   </tr>
-  </table>
-  <p>Required properties:</p>
-  <ul>
-   <li>http://apache.org/xml/properties/internal/symbol-table</li>
-   <li>http://apache.org/xml/properties/internal/error-reporter</li>
-   <!--
-     - NOTE: The following properties are also required but the
-     -       validation engine is being redesigned so I'm not
-     -       listing them in the documentation.
-   <li>http://apache.org/xml/properties/internal/grammar-pool</li>
-   <li>http://apache.org/xml/properties/internal/datatype-validator-factory</li>
-   -->
-  </ul>
-  <p>Recognized features:</p>
-  <ul>
-   <li>http://xml.org/sax/features/namespaces</li>
-   <li>http://xml.org/sax/features/validation</li>
-   <li>http://apache.org/xml/features/validation/dynamic</li>
-  </ul>
-  <p>
-   The Schema Validator performs validation of the document events that 
-   it receives which may augment the streaming information set with
-   default simple type values and normalizing simple type values.
-  </p>
- </s2>
-</s1> 
diff --git a/docs/xni.xml b/docs/xni.xml
deleted file mode 100644
index b0d4b7c..0000000
--- a/docs/xni.xml
+++ /dev/null
@@ -1,167 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE s1 SYSTEM 'dtd/document.dtd'>
-<s1 title='Xerces Native Interface'>
- <s2 title='Overview'>
-  <p>
-   The Xerces Native Interface (XNI) is a framework for communicating
-   a "streaming" document information set and constructing generic
-   parser configurations. XNI is part of the Xerces2 development but
-   the Xerces2 parser is just a standards compliant reference 
-   implementation of the Xerces Native Interface. Other parsers can be
-   written that conform to XNI without conforming to any particular 
-   standards or using any code from the reference implementation.
-  </p>
-  <p>
-   The Xerces Native Interface is used to implement the Xerces2 parser
-   from a set of modular components in a standard configuration. This 
-   configuration is then used to drive the DOM and SAX parser 
-   implementations provided with Xerces2. However, XNI is merely an
-   <em>internal</em> set of interfaces. There is no need for an XML
-   application programmer to learn XNI if they only intend to interface
-   to the Xerces2 parser using standard interfaces like JAXP, DOM, and
-   SAX. Xerces developers and application developers that need more
-   power and flexibility than that provided by the standard interfaces
-   should read and understand XNI.
-  </p>
-  <p>Overview information:</p>
-  <ul>
-   <li>
-    <jump href='#streaming-info-set'>"Streaming" Information 
-    Set</jump>
-   </li>
-   <li>
-    <jump href='#generic-parser-configurations'>Generic Parser
-    Configurations</jump>
-   </li>
-  </ul>
-  <p>Design and implementation information:</p>
-  <ul>
-   <li><link idref='xni-design'>Design Details</link></li>
-   <li><link idref='xni-core'>Core Interfaces</link></li>
-   <li><link idref='xni-config'>Parser Configuration</link></li>
-   <li><link idref='xni-xerces2'>Xerces2 Parser Components</link></li>
-  </ul>
- </s2>
- <anchor name='streaming-info-set'/>
- <s2 title='"Streaming" Information Set'>
-  <p>
-   What is meant by a "streaming" information set? Quite simply,
-   the streaming information set is the document information that can
-   be communicated by parsing the document in a serial manner. In
-   other words, it is the information received as-you-see-it. An XNI
-   parser provides this streaming info set to a registered document
-   handler. The XNI document handler is similar to the standard
-   SAX <code>ContentHandler</code> interface but is different in 
-   several important ways:
-  </p>
-  <ul>
-   <li>
-    XNI attempts to provide lossless communication of the streaming
-    information set. Therefore, XNI passes the encodings of external
-    parsed entities and other information that is lost when using SAX.
-   </li>
-   <li>
-    The XNI document handler interface is also designed to build a
-    pipeline of parser components where the streaming information set
-    can be fully modified and augmented by each stage in the pipeline.
-    SAX, however, is primarilly a read-only set of interfaces.
-   </li>
-  </ul>
-  <p>
-   The Xerces Native Interface breaks the document's streaming
-   information set into several more manageable interfaces:
-  </p>
-  <table>
-   <tr><th>Interface</th><th>Description</th></tr>
-   <tr>
-    <td><code>XMLDocumentHandler</code></td>
-    <td>Communicates document structure and content information.</td>
-   </tr>
-   <tr>
-    <td><code>XMLDTDHandler</code></td>
-    <td>
-     Communicates basic DTD information such as element and attribute
-     declarations.
-    </td>
-   </tr>
-   <tr>
-    <td><code>XMLDTDContentModelHandler</code></td>
-    <td>
-     Breaks down each element declaration's content model into a
-     set of separate methods so that handlers don't have to reparse
-     the content model string given in the 
-     <code>XMLDTDHandler#elementDecl(String,String)</code> method.
-     This separation also helps those applications that want to
-     know boundaries of entities when used as part of an element's
-     content model.
-    </td>
-   </tr>
-  </table>
-  <p>
-   And an additional handler is provided for convenience in defining
-   document fragments:
-  </p>
-  <table>
-   <tr><th>Interface</th><th>Description</th></tr>
-   <tr>
-    <td><code>XMLDocumentFragmentHandler</code></td>
-    <td>Communicates information about a document fragment.</td>
-   </tr>
-  </table>
-  <p>
-   For complete details of the Xerces Native Interface, refer to
-   the <link idref='xni-core'>Core Interfaces</link> documentation.
-  </p>
- </s2>
- <anchor name='generic-parser-configurations'/>
- <s2 title='Generic Parser Configurations'>
-  <p>
-   The Xerces Native Interface document handler interfaces define a
-   document's streaming information set but XNI also contains a set 
-   of interfaces that define parser components and configurations. 
-   These interfaces provide a framework for a library of parser parts
-   that can be used interchangeably or completely replaced at the
-   programmer's option. This framework allows an unparalleled level
-   of configuration and implementation choices to implement XML
-   applications. 
-  </p>
-  <p>
-   The following list details some possible examples of parsers and
-   configurations that can be written using the XNI parser configuration
-   framework:
-  </p>
-  <ul>
-   <li>
-    <strong>HTML Parser</strong><br/>
-    An HTML scanner can be written that breaks an HTML document into
-    a series of XNI callbacks. Using a configuration that swaps the
-    default XML scanner with the HTML scanner, you can create DOM and
-    SAX parsers for HTML documents.
-   </li>
-   <li>
-    <strong>Optimized Parser</strong><br/>
-    For improved XML performance, a minimal XML scanner can be written
-    and swapped for the default, fully compliant XML scanner. In
-    addition, the validator component can be removed from the parser
-    pipeline to reduce the amount of work required to parse XML
-    documents.
-   </li>
-   <li>
-    <strong>XInclude Processor</strong><br/>
-    An XNI parser component can be written to handle XInclude by
-    analyzing the streaming information set and automatically
-    inserting the contents of referenced links into the event stream.
-    By adding this component to the parser pipeline before the
-    validator, included content would appear transparent to the
-    validator as if that content was in the original document.
-   </li>
-  </ul>
-  <p>
-   This is just a small sample of what is possible when using the
-   XNI parser configuration framework. For complete details of the
-   XNI parser configurations, refer to the 
-   <link idref='xni-config'>Parser Configuration</link> 
-   documentation.
-  </p>
- </s2>
-</s1>
diff --git a/proposals/XRI-requirements/issues.dtd b/proposals/XRI-requirements/issues.dtd
deleted file mode 100644
index 67da412..0000000
--- a/proposals/XRI-requirements/issues.dtd
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- edited with XML Spy v3.0 (http://www.xmlspy.com) by Edward Staub (private) -->
-<!--DTD generated by XML Spy v3.0 (http://www.xmlspy.com)-->
-<!ENTITY nbsp "&#160;">
-<!ELEMENT a (strong | em)>
-<!ATTLIST a
-	href CDATA #IMPLIED
-	name CDATA #IMPLIED
->
-<!ELEMENT cat (#PCDATA)>
-<!ELEMENT categories (cat+)>
-<!ELEMENT def (#PCDATA | br | a | ul)*>
-
-<!ELEMENT br EMPTY>
-<!ELEMENT seeAlso EMPTY>
-<!ELEMENT edReqNote (#PCDATA)>
-<!ELEMENT em (#PCDATA | small)*>
-<!ELEMENT li (#PCDATA | a | em | ul)*>
-<!ELEMENT small (#PCDATA)>
-<!ELEMENT strong (#PCDATA)>
-<!ELEMENT ul (li*)>
-<!ELEMENT mailHeaderSet (li+)>
-<!ATTLIST mailHeaderSet
-	id (gen | xdev) #REQUIRED
->
-<!ELEMENT mailHeaderSets (mailHeaderSet+)>
-<!ELEMENT ref (#PCDATA | br)*>
-<!ATTLIST ref
-	set CDATA #REQUIRED
-	id CDATA #REQUIRED
->
-<!ELEMENT refs (ref)*>
-<!ELEMENT voteSet (vote*)>
-<!ATTLIST voteSet
-	opened CDATA #REQUIRED
-	closed CDATA #REQUIRED
-	callForVote CDATA #IMPLIED
->
-<!ELEMENT vote (voteComment?)>
-<!ATTLIST vote
-	voter CDATA #REQUIRED
-	email CDATA #REQUIRED
-	vote CDATA #REQUIRED
->
-<!ELEMENT voteComment (#PCDATA)>
-<!ELEMENT req (def, seeAlso*, edReqNote*, voteSet?, refs)>
-<!ATTLIST req
-	status (approved | tooQuiet | hardnessConflict | vetoConflict | rejected | unevaluated) "unevaluated"
-	id CDATA #REQUIRED
-	strength (hard | soft) #REQUIRED
-	cat CDATA #REQUIRED
->
-<!ATTLIST seeAlso
-	id CDATA #REQUIRED
-	type (Conflict) #IMPLIED
->
-<!ELEMENT requirementCatalog (categories, requirements, mailHeaderSets)>
-<!ATTLIST requirementCatalog
-	date CDATA #REQUIRED
-	version CDATA #REQUIRED
->
-<!ELEMENT requirements (req+)>
diff --git a/proposals/XRI-requirements/issues.html b/proposals/XRI-requirements/issues.html
deleted file mode 100644
index 49c0a45..0000000
--- a/proposals/XRI-requirements/issues.html
+++ /dev/null
@@ -1,2407 +0,0 @@
-<!-- saved from url=(0022)http://internet.e-mail -->
-<html xmlns:fo="http://www.w3.org/1999/XSL/Format">
-<head>
-<title>Proposed Xerces2 Requirements -  15 September 2000</title>
-</head>
-<body bgcolor="#FFFFFF">
-<h1>Proposed Xerces2 Requirements</h1>
-<h4>Date: 15 September 2000<br>
-  Editors: &nbsp;&nbsp;<a href="mailto:estaub@mediaone.net">Ed Staub</a>&nbsp;&nbsp;<a href="mailto:twleung@sauria.com">Ted Leung</a>
-</h4>
-<hr>
-<h2>Schema</h2>
-<p>Proposed requirements are organized into categories. &nbsp;Some requirements 
-  occur in more than one category in the future.</p>
-<p>Each requirement has a number. Underneath the number is a "hardness" 
-  and "status".</p>
-<dl>
-<dt>Possible "hardness" values are:</dt>
-<dd>
-<b>hard</b> - Xerces2 must and shall meet this requirement<br>
-<b>soft</b> - Xerces2 should meet this requirement, but it may be dropped 
-    because of conflicting requirements or time pressures</dd>
-<dt>
-<br>
-    Possible "status" values are:</dt>
-<dd>
-<span style="background-color:aquamarine"><b>approved</b> - there appears to be a clear consensus</span>
-<br>
-<b>tooQuiet</b> - there may be a consensus, but there hasn't been enough 
-    input to be sure <br>
-<b>hardnessConflict</b> - there is conflict over whether this is a hard or 
-    soft requirement<b>
-<br>
-    vetoConflict</b> - there is a conflict over whether this proposed requirement 
-    is a requirement at all<br>
-<span style="background-color:silver"><b>rejected</b> - the proposed requirement appears to be dead</span>
-<br>
-<b>unevaluated</b> - editor hasn't finished reviewing input
-					</dd>
-</dl>
-<hr>
-<h2>Requirements by Number</h2>
-<a href="#req.1" style="background-color:aquamarine">1</a>
-			&nbsp;	&nbsp;
-			The code shall be maintainable and simple to read.<br>
-<a href="#req.2" style="background-color:aquamarine">2</a>
-			&nbsp;	&nbsp;
-			The parser should have a competitive memory footprint (competitive
-against the other Java based parsers out there).
-<br>
-<a href="#req.3" style="background-color:aquamarine">3</a>
-			&nbsp;	&nbsp;
-			The parser shall be designed so as to allow deployment of minimal subsets suitable for low-end, memory-constrained appli...<br>
-<a href="#req.4" style="background-color:aquamarine">4</a>
-			&nbsp;	&nbsp;
-			The parser shall run well on all virutal machines and 			shall not be optimized toward a particular virtual machine.<br>
-<a href="#req.5" style="background-color:aquamarine">5</a>
-			&nbsp;	&nbsp;
-			Optimizations that interfere with readability,        modularity, or size should be shunned.  <br>
-<br>
-<a href="#req.6" style="background-color:silver">6</a>
-			&nbsp;	&nbsp;
-			The parser should have the smallest possible distribution (JAR) size.<br>
-<a href="#req.7" style="background-color:aquamarine">7</a>
-			&nbsp;	&nbsp;
-			The design of the parser should be documented, with diagrams where they are more expressive than text.<br>
-<a href="#req.8" style="background-color:silver">8</a>
-			&nbsp;	&nbsp;
-			The parser should have the characteristics needed for it to be included in the JDK.<br>
-<a href="#req.9" style="background-color:silver">9</a>
-			&nbsp;	&nbsp;
-			The parser should be upwardly compatible with Xerces.<br>
-<a href="#req.10" style="background-color:aquamarine">10</a>
-			&nbsp;	&nbsp;
-			The parser shall be cleanly modular.<br>
-<br>
-<a href="#req.11" style="background-color:snow">11</a>
-			&nbsp;	&nbsp;
-			Development should be coordinated with xerces-c.<br>
-<a href="#req.12" style="background-color:aquamarine">12</a>
-			&nbsp;	&nbsp;
-			The parser shall support SAX2.<br>
-<a href="#req.13a" style="background-color:snow">13a</a>
-			&nbsp;	&nbsp;
-			
-				Read-only, memory conservative, high performance DOM subset. In some  ways, this is optional, since the alternative...<br>
-<a href="#req.13b" style="background-color:snow">13b</a>
-			&nbsp;	&nbsp;
-			
-				parse-next function, with added control over buffer size.  <br>
-<a href="#req.13c" style="background-color:snow">13c</a>
-			&nbsp;	&nbsp;
-			
-				Some sort of way to tell if a SAX char buffer is going to be  overwritten, so data doesn't have to be copied until ...<br>
-<a href="#req.13d" style="background-color:snow">13d</a>
-			&nbsp;	&nbsp;
-			
-				Serialization support, as is currently in Assaf's classes.  <br>
-<a href="#req.13e" style="background-color:snow">13e</a>
-			&nbsp;	&nbsp;
-			
-				Schema data-type support, which will be needed for XSLT2, and Xalan 2.0  extensions. <br>
-<a href="#req.13f" style="background-color:snow">13f</a>
-			&nbsp;	&nbsp;
-			
-				Small core footprint for standalone, compiled stylesheet capability, for  use on small devices. This would need to ...<br>
-<a href="#req.14" style="background-color:aquamarine">14</a>
-			&nbsp;	&nbsp;
-			The parser shall validate XML 1.0.<br>
-<a href="#req.15" style="background-color:aquamarine">15</a>
-			&nbsp;	&nbsp;
-			 The parser shall support namespaces.<br>
-<br>
-<a href="#req.16" style="background-color:aquamarine">16</a>
-			&nbsp;	&nbsp;
-			 The parser shall support DOM Level 2. <br>
-<a href="#req.18" style="background-color:aquamarine">18</a>
-			&nbsp;	&nbsp;
-			 The parser shall support XML Schema. <br>
-<a href="#req.19" style="background-color:aquamarine">19</a>
-			&nbsp;	&nbsp;
-			 The parser shall support XPath. <br>
-<a href="#req.20" style="background-color:snow">20</a>
-			&nbsp;	&nbsp;
-			 The parser should support XInclude. <br>
-<br>
-<a href="#req.21" style="background-color:snow">21</a>
-			&nbsp;	&nbsp;
-			 The parser should support write validation of a DOM tree or revalidation. <br>
-<a href="#req.22" style="background-color:snow">22</a>
-			&nbsp;	&nbsp;
-			 The parser shall support grammar access for both DTD and Schema. <br>
-<a href="#req.23" style="background-color:aquamarine">23</a>
-			&nbsp;	&nbsp;
-			 No significant speed penalty should be invoked for unused features, notably validation. When not validating, the parser...<br>
-<a href="#req.24" style="background-color:aquamarine">24</a>
-			&nbsp;	&nbsp;
-			 The parser should provide best-of-breed performance across all JIT's (not just Hotspot). Such performance
-shall not com...<br>
-<a href="#req.25" style="background-color:aquamarine">25</a>
-			&nbsp;	&nbsp;
-			 The parser should support grammar caching and precompilation. <br>
-<br>
-<a href="#req.28" style="background-color:aquamarine">28</a>
-			&nbsp;	&nbsp;
-			 Xerces Native API.  The parser should provide a reasonable core API (fast!) upon which to layer other API's.  Examples ...<br>
-<a href="#req.29" style="background-color:aquamarine">29</a>
-			&nbsp;	&nbsp;
-			 The project should produce testcases for both conformance and benchmarking.  <br>
-<a href="#req.30" style="background-color:silver">30</a>
-			&nbsp;	&nbsp;
-			 The parse shall support SAX 1 <br>
-<br>
-<a href="#req.31" style="background-color:snow">31</a>
-			&nbsp;	&nbsp;
-			 The core parser should not directly support any tree model. <br>
-<a href="#req.32" style="background-color:silver">32</a>
-			&nbsp;	&nbsp;
-			 The parser shall support Java 1.1 <br>
-<a href="#req.33" style="background-color:snow">33</a>
-			&nbsp;	&nbsp;
-			 The parser should support loading and validating only certainrequested portions of a document -- a useful feature  when...<br>
-<a href="#req.34" style="background-color:snow">34</a>
-			&nbsp;	&nbsp;
-			 The parser shall support the XML  Information Set. <br>
-<a href="#req.35" style="background-color:snow">35</a>
-			&nbsp;	&nbsp;
-			 The parser should support pull model parsing. <br>
-<br>
-<a href="#req.37" style="background-color:snow">37</a>
-			&nbsp;	&nbsp;
-			 The DOM should emit events to interested listeners when changes are made to the DOM <br>
-<a href="#req.38" style="background-color:snow">38</a>
-			&nbsp;	&nbsp;
-			 The parser should support 
-					RELAX
-				. <br>
-<a href="#req.39" style="background-color:snow">39</a>
-			&nbsp;	&nbsp;
-			 The parser should allow for automatic detection of compressed/encrypted documents. <br>
-<hr>
-<h2>Requirement Categories</h2>
-<a href="#cat.{.}">Architecture</a>
-<br>
-<a href="#cat.{.}">Standards</a>
-<br>
-<a href="#cat.{.}">Features</a>
-<br>
-<a href="#cat.{.}">Memory</a>
-<br>
-<a href="#cat.{.}">Speed</a>
-<br>
-<a href="#cat.{.}">Quality</a>
-<br>
-<a href="#cat.{.}">Other</a>
-<br>
-<hr>
-<h2>Requirements by Category</h2>
-<h3>
-<a name="#cat.{.}"></a>Architecture</h3>
-<table border="1" width="95%">
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.3"></a><b>3.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser shall be designed so as to allow deployment of minimal subsets suitable for low-end, memory-constrained applications
-			<br>The build process shall create both:
-<ul>
-					<li>a .jar file containing all standard components of Xerces (xerces.jar).</li>
-					<li>a set of .jar files which together contain everything in xerces.jar, broken into the following components:
-<ul>
-							<li>xerces kernel, which supports the “internal APIs” and SAX support</li>
-							<li>DOM support</li>
-							<li>Validation support</li>
-							<li>other components of large size which can be easily factored and for which there is a significant audience who will benefit from not including them in a deployment.</li>
-						</ul>
-					</li>
-				</ul>
-			</def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.2">2</a>
-		&nbsp;&nbsp;
-	
-			See also:
-		<a href="#req.13">13</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>Voted</i></b>
-		 on from 26-Aug-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1<blockquote>
-<voteComment>If this type of surgery is possible, then it should help
-requirement 2 since loading unused classes could be avoided.
-</voteComment>
-</blockquote>
-</li>
-<li>
-<a href="mailto:chris.laprun@nist.gov">Chris Laprun</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-<li>
-<a href="mailto:arkin@arkin.exoffice.com">Assaf Arkin</a>
-			: +1</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:Edwin.Goei@eng.sun.com">Edwin Goei</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2091">It should be possible to build a parser as a set of Jar files        so that a smaller parser can be assembled which fits the need of a        particular implementation. For example, in TV sets do you really need        validation?</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2223">Where I am now we use XML as a wire format, so the data volume is small,  and parsing takes place on the client (the customer's e-commerce  environment) and on the server. Small footprint (memory *and* disk)  are much more important in this context than speed or even validation.  </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2223.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2223">
-					<em>Rod McChesney</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000         - 01:32:31 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2223">... many applications could benefit ...</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2223.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2223">
-					<em>Rod McChesney</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000         - 01:32:31 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="xdev" id="1324">"small-but-performant-ambitious"  devices vs. "as-small-and-cheap-as-possible" devices</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1324.html">
-					<strong>RE: REDOM Design discussion.</strong>
-				</a>
-				<a name="1324">
-					<em>Paulo Gaspar <small>(Sat Jul 15 2000 - 15:33:49         MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>"<ref set="xdev" id="1361">I [am] a proponent [of support for] "small-but-perfrormant-ambitious", not  "as-small-and-cheap-as-possible" [devices] </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1361.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1361">
-					<em>James Duncan Davidson <small>(Tue Jul 18 2000 -         00:28:02 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-</table>
-<h3>
-<a name="#cat.{.}"></a>Standards</h3>
-<table border="1" width="95%">
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.12"></a><b>12.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser shall support SAX2.</def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.13">13</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2243.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2243">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:49:04         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.14"></a><b>14.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser shall validate XML 1.0.</def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2243.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2243">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:49:04         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.15"></a><b>15.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser shall support namespaces.</def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2243.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2243">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:49:04         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.18"></a><b>18.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser shall support XML Schema. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2242.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2242">
-					<em>Eric         Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:48:42 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2243.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2243">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:49:04         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.19"></a><b>19.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser shall support XPath. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2245.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2245">
-					<em>Donald         Ball</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:57:59         MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2275.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2275">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 16:07:32         MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2284.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2284">
-					<em>Eduardo         Pelegri--Llopart</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:31:22 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2285.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2285">
-					<em>Jeffrey         Rodriguez</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:38:42         MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2320.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2320">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 01:11:58         MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1277.html">
-					<strong>Re: XRI requirements</strong>
-				</a>
-				<a name="1277">
-					<em>Jeffrey Rodriguez <small>(Wed Jul 12 2000 - 09:59:50         MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.20"></a><b>20.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should support XInclude. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2245">+1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2245.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2245">
-					<em>Donald         Ball</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:57:59         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2271">+1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2271.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2271">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 15:02:47         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2285">+1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2285.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2285">
-					<em>Jeffrey         Rodriguez</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:38:42         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.22"></a><b>22.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser shall support grammar access for both DTD and Schema. </def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.13">13</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2242.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2242">
-					<em>Eric         Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:48:42 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="silver">
-<td valign="top">
-<p>
-<a name="req.30"></a><b>30.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;rejected</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parse shall support SAX 1 </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2249">-1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2249.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2249">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 03:07:59         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2257">-1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2257.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2257">
-					<em>N. Sean         Timm</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 05:59:47         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2271">-1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2271.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2271">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 15:02:47         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="silver">
-<td valign="top">
-<p>
-<a name="req.32"></a><b>32.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;rejected</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser shall support Java 1.1 </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2249">-1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2249.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2249">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 03:07:59         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2257">-1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2257.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2257">
-					<em>N. Sean         Timm</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 05:59:47         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2271">-1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2271.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2271">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 15:02:47         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="xdev" id="1314">+1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1314.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1314">
-					<em>Jeffrey Rodriguez <small>(Fri Jul 14 2000 -         18:47:28 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>"<ref set="xdev" id="1317">+-0</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1317.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1317">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         19:22:19 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.34"></a><b>34.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser shall support the XML  Information Set. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2298">+1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2298.html">
-					<strong>Re: [Xerces2] Requirements list; 'Xerces2'?;         cross-posting</strong>
-				</a>&nbsp;<a name="2298">
-					<em>Arnaud         Le Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 20:46:38         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2321">+1</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2321.html">
-					<strong>Re: [Xerces2] Requirements list; 'Xerces2'?;         cross-posting</strong>
-				</a>&nbsp;<a name="2321">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 01:13:00         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-</table>
-<h3>
-<a name="#cat.{.}"></a>Features</h3>
-<table border="1" width="95%">
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.13a"></a><b>13a.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def>
-				<br>Read-only, memory conservative, high performance DOM subset. In some  ways, this is optional, since the alternative is that the XSLT processor  implement it's own DOM, as it does today. But it would be neat and simpler  if only one DOM implementation needed to exist.  <br>  a) Document-order indexes or API as a DOM extension. I know of few or  no conformant XSLT processors that can do without this.  <br>  b) [optional] isWhite() method as a DOM extensions (pure telling of  whether or not the text contains non-whitespace), for performance reasons.  <br>  c) Some sort of weak reference, where nodes could be released if not  referenced, and then rebuilt if requested. For performance and memory  footprint.  </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2296.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2296">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:59:46 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.13b"></a><b>13b.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def>
-				<br>parse-next function, with added control over buffer size.  </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2296.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2296">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:59:46 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.13c"></a><b>13c.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def>
-				<br>Some sort of way to tell if a SAX char buffer is going to be  overwritten, so data doesn't have to be copied until this occurs.  </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2296.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2296">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:59:46 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.13d"></a><b>13d.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def>
-				<br>Serialization support, as is currently in Assaf's classes.  </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2296.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2296">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:59:46 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.13e"></a><b>13e.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def>
-				<br>Schema data-type support, which will be needed for XSLT2, and Xalan 2.0  extensions. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2296.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2296">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:59:46 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.13f"></a><b>13f.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def>
-				<br>Small core footprint for standalone, compiled stylesheet capability, for  use on small devices. This would need to include the Serializer. I'm not  sure if this should really be a separate micro-parser?   </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2296.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2296">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:59:46 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.16"></a><b>16.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser shall support DOM Level 2. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2243.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2243">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:49:04         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.21"></a><b>21.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should support write validation of a DOM tree or revalidation. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2242.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2242">
-					<em>Eric         Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:48:42 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.28"></a><b>28.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> Xerces Native API.  The parser should provide a reasonable core API (fast!) upon which to layer other API's.  Examples of such API's include SAX2, DOM, and JDOM. </def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.10">10</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2207.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2207">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 00:28:32         MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2221">JDOM is an important up and coming API that already has established a large and rapidly growing groundswell of support and in the  developer community.</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2221.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2221">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         01:15:59 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.31"></a><b>31.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The core parser should not directly support any tree model. </def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.10">10</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2154">My understanding of the design, which I think is good, is that the  "core" actually doesn't directly support any tree model.  <br>                API Layer JDOM DOM SAX2  <br>               Core Layer Java parser code </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2154.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2154">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 03:41:05 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2263.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2263">
-					<em>Jason         Hunter</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 07:51:22         MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2326.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2326">
-					<em>Tim         Bray</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 02:33:14         MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1169.html">
-					<strong>[spinnaker] Design discussion</strong>
-				</a>
-				<a name="1169">
-					<em>James Duncan Davidson <small>(Mon Jul 10 2000 -         08:04:29 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1179.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1179">
-					<em>costin@eng.sun.com <small>(Mon Jul 10 2000         - 20:40:06 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1185.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1185">
-					<em>Edwin Goei <small>(Tue Jul 11 2000 -         00:48:20 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1211.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1211">
-					<em>Arnaud Le Hors <small>         (Tue Jul 11 2000 - 06:51:24 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1320.html">
-					<strong>[Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1320">
-					<em>Ed Staub <small>(Fri Jul 14 2000 - 23:34:45         MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1321.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1321">
-					<em>Brett McLaughlin <small>(Fri Jul 14 2000 -         23:52:26 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1322.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1322">
-					<em>Arved Sandstrom <small>(Sat Jul 15 2000 -         01:08:07 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.33"></a><b>33.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should support loading and validating only certainrequested portions of a document -- a useful feature  when dealing with large xml databases, for example.   See the W3C <a href="http://www.w3.org/TR/WD-xml-fragment">
-					<em>XML Fragement Interchange</em>
-				</a> Working Draft. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2276.html">
-					<strong>RE: XRI requirements</strong>
-				</a>&nbsp;<a name="2276">
-					<em>James Snell</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         07:25:50 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.35"></a><b>35.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should support pull model parsing. </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2310.html">
-					<strong>Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2310">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 21:46:16 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2323.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2323">
-					<em>Ted Leung</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         02:08:55 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2333.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2333">
-					<em>Ted Leung</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         06:46:09 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2335.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2335">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         09:15:49 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2340.html">
-					<strong>RE: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2340">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Thu Jul         13 2000 - 06:29:25 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.37"></a><b>37.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The DOM should emit events to interested listeners when changes are made to the DOM </def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1201.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1201">
-					<em>Kelly Campbell <small>         (Tue Jul 11 2000 - 03:08:57 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.38"></a><b>38.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should support <a href="http://www.xml.gr.jp/relax/">
-					<em>RELAX</em>
-				</a>. </def>
-</b>
-</p>
-<blockquote>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.39"></a><b>39.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should allow for automatic detection of compressed/encrypted documents. </def>
-</b>
-</p>
-<blockquote>
-</blockquote>
-</td>
-</tr>
-</table>
-<h3>
-<a name="#cat.{.}"></a>Memory</h3>
-<table border="1" width="95%">
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.2"></a><b>2.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser should have a competitive memory footprint (competitive
-against the other Java based parsers out there).
-</def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.3">3</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>Voted</i></b>
-		 on from 26-Aug-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1<blockquote>
-<voteComment>I assume that the comparison would be some basket of scenarios, so
-that being efficient with large documents could offset a slightly
-greater initial load size.</voteComment>
-</blockquote>
-</li>
-<li>
-<a href="mailto:chris.laprun@nist.gov">Chris Laprun</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-<li>
-<a href="mailto:arkin@arkin.exoffice.com">Assaf Arkin</a>
-			: +1</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +0</li>
-<li>
-<a href="mailto:Edwin.Goei@eng.sun.com">Edwin Goei</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2091">This means small distribution size (JAR file)        and small memory footprint.</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2341.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2341">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 01:52:43 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2345.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2345">
-					<em>costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 21:46:20 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="silver">
-<td valign="top">
-<p>
-<a name="req.6"></a><b>6.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;rejected</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser should have the smallest possible distribution (JAR) size.</def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.3">3</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>Voted</i></b>
-		 on from 26-Aug-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:chris.laprun@nist.gov">Chris Laprun</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:arkin@arkin.exoffice.com">Assaf Arkin</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:Edwin.Goei@eng.sun.com">Edwin Goei</a>
-			: +1 to remove</li>
-</ul>
-<blockquote>
-<i>Ed:</i>The votes below were votes to remove this requirement.  Its concerns are addressed elsewhere.</blockquote>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2091">This means small distribution size (JAR file)        and small memory footprint.  </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2093">These two requirements [small memory footprint, small jar size -ed] are in direct conflict.   </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2093.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2093">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Sat Jul 08         2000 - 19:56:58 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-</table>
-<h3>
-<a name="#cat.{.}"></a>Speed</h3>
-<table border="1" width="95%">
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.4"></a><b>4.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser shall run well on all virutal machines and 			shall not be optimized toward a particular virtual machine.</def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1299.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1299">
-					<em>Jim Driscoll <small>(Thu Jul 13 2000 - 18:12:19         MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1307.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1307">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         06:38:44 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.23"></a><b>23.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> No significant speed penalty should be invoked for unused features, notably validation. When not validating, the parser should run almost as fast (within 5%) as a non-validating parser. </def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.10">10</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: 0</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +0</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-</ul>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.24"></a><b>24.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should provide best-of-breed performance across all JIT's (not just Hotspot). Such performance
-shall not come at the expense of requirement 5.</def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.5">5</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="xdev" id="1317">-1 (on JDK 1.1)</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1317.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1317">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         19:22:19 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-<p>"<ref set="xdev" id="1323">Fast enough to not notice that a parse happened for most data (10 lines to  10K).  To expand on that, when I have Ant read it's data from build.xml, I  shouldn't notice. If I send a bit of form encoded XML data to a server, and  then get some back, it shouldn't be appreciable considering the connection  cost. </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1323.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1323">
-					<em>James Duncan Davidson <small>(Sat Jul 15 2000 -         06:31:24 MEST)</small>
-					</em>
-				</a>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.25"></a><b>25.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The parser should support grammar caching and precompilation. </def>
-</b>
-</p>
-<blockquote>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2242.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2242">
-					<em>Eric         Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:48:42 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2261.html">
-					<strong>Re: XRI requirements</strong>
-				</a>&nbsp;<a name="2261">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 07:01:23 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-</table>
-<h3>
-<a name="#cat.{.}"></a>Quality</h3>
-<table border="1" width="95%">
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.1"></a><b>1.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The code shall be maintainable and simple to read.</def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.5">5</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>Voted</i></b>
-		 on from 26-Aug-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1<blockquote>
-<voteComment>+1 on intent.  But how can this be a "shall" when there is not a measure
-for maintainability or simplicity.  Are there specific criteria that we
-want to establish such as the Sun's Java coding conventions or something
-else from the Apache world?
-</voteComment>
-</blockquote>
-</li>
-<li>
-<a href="mailto:chris.laprun@nist.gov">Chris Laprun</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1<blockquote>
-<voteComment>I have an easy way to measure this.. Committers should only be committers if
-they are prepared to read the code commits. If the code commit isn't
-readable to somebody and they throw a flag, then it probably fails the test.
-For example, my criteria on such code would be that I can understand it. If
-everybody's criteria is this, then it works.
-</voteComment>
-</blockquote>
-</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-<li>
-<a href="mailto:arkin@arkin.exoffice.com">Assaf Arkin</a>
-			: +1</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:Edwin.Goei@eng.sun.com">Edwin Goei</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2091"> Above all, this is the primary goal        for any openly developed project as without the ability to read the        code, it's impossible for people to contribute and get involved.</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2138.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2138">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         23:18:54 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2186">[current code too complex, scares off users]</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2186.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2186">
-					<em>Brett McLaughlin</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 22:17:03 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2209">I don't think I am [willing to trade off some performance for clearly written code]. Performance is too damned important in the XML  world</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2209.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2209">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 00:25:18 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2220">You're not going to get a diverse developer community built around code that  is too damned hard to read... </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2220.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2220">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 01:11:58 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2311.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2311">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 23:44:52 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.5"></a><b>5.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>Optimizations that interfere with readability,        modularity, or size should be shunned.  </def>
-</b>
-</p>
-<blockquote>
-<p>
-			See also:
-		<a href="#req.1">1</a>
-		&nbsp;&nbsp;
-	</p>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.7"></a><b>7.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The design of the parser should be documented, with diagrams where they are more expressive than text.</def>
-</b>
-</p>
-<blockquote>
-<b><i>Voted</i></b>
-		 on from 26-Aug-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +0</li>
-<li>
-<a href="mailto:chris.laprun@nist.gov">Chris Laprun</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-<li>
-<a href="mailto:arkin@arkin.exoffice.com">Assaf Arkin</a>
-			: +1</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:Edwin.Goei@eng.sun.com">Edwin Goei</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2104">... would benefit greatly from requirements and design documentation; most especially some diagrams. I find that a dozen or so good diagrams often do a better job of  conveying the design and, perhaps more importantly, the design approach or  philosophy, than written documents.  </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2104.html">
-					<strong>design docs and diagrams [was Re: [spinnaker]         Announce]</strong>
-				</a>&nbsp;<a name="2104">
-					<em>Randall J.         Parr</em>
-				</a>&nbsp;<em>(Sun Jul 09 2000 - 18:43:49         MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="silver">
-<td valign="top">
-<p>
-<a name="req.9"></a><b>9.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;rejected</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser should be upwardly compatible with Xerces.</def>
-</b>
-</p>
-<blockquote>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: 0</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +0</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: 0</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2110">Whatever happened to making things upgrade compatiable. </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2110.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2110">
-					<em>MITCHELL SOJDEHEI</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 02:57:49 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.10"></a><b>10.</b>
-<br>
-        &nbsp;&nbsp;hard<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser shall be cleanly modular.</def>
-</b>
-</p>
-<blockquote>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2122.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2122">
-					<em>costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 19:54:06 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2130.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2130">
-					<em>costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 22:48:38 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2154">[star vs. pipeline]</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2154.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2154">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 03:41:05 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-</table>
-<h3>
-<a name="#cat.{.}"></a>Other</h3>
-<table border="1" width="95%">
-<tr bgcolor="silver">
-<td valign="top">
-<p>
-<a name="req.8"></a><b>8.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;rejected</p>
-</td><td valign="top">
-<p>
-<b>
-<def>The parser should have the characteristics needed for it to be included in the JDK.</def>
-</b>
-</p>
-<blockquote>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +0</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1 to remove</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2108.html">
-					<strong>[spinnaker] XML Hack Article</strong>
-				</a>&nbsp;<a name="2108">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>         (Mon Jul 10 2000 - 00:47:01 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="snow">
-<td valign="top">
-<p>
-<a name="req.11"></a><b>11.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;unevaluated</p>
-</td><td valign="top">
-<p>
-<b>
-<def>Development should be coordinated with xerces-c.</def>
-</b>
-</p>
-<blockquote>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: 0</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +0</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: -1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: -1 (non-committer)</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +1</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>"<ref set="gen" id="2133">I'd also like to see this be coordinated with the xerces-c developers ... it would be  nice to keep the two parsers in sync so that changes to one parser and  relatively easy to implement in the other. 		 </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2133.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2133">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000         - 23:05:18 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2144">I disagree...</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2144.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2144">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:34:54 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2161">Java is a very different language from C++, and you need  different strategies.  </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2161.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2161">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 05:25:51 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2182">...there's much to be gained by keeping the  overall architecture and design the same between the two versions. </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2182.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2182">
-					<em>Andy Heninger</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000         - 18:59:24 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2194">[forcing deep similarity is bad]</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2194.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2194">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 22:39:19 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2222">...trying to find one design that fits both  languages well will produce one design that doesn't quite fit either  language. </ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2222.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2222">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         01:23:23 MEST)</em>
-			</li>
-</p>
-<p>"<ref set="gen" id="2241">Let's push for high-level designs that  can accommodate any OO language...</ref>"<br>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2241.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2241">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 02:22:53 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2246.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2246">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 02:55:07 MEST)</em>
-			</li>
-</p>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2248.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2248">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         03:03:32 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-<tr bgcolor="aquamarine">
-<td valign="top">
-<p>
-<a name="req.29"></a><b>29.</b>
-<br>
-        &nbsp;&nbsp;soft<br>
-        &nbsp;&nbsp;approved</p>
-</td><td valign="top">
-<p>
-<b>
-<def> The project should produce testcases for both conformance and benchmarking.  </def>
-</b>
-</p>
-<blockquote>
-<b><i>Voted</i></b>
-		 on from 07-Sept-00 to 15-Sept-00.  Votes:
-	<ul>
-<li>
-<a href="mailto:jeffreyr_97@hotmail.com">Jeffrey Rodriguez</a>
-			: 0</li>
-<li>
-<a href="mailto:ericye@locus.apache.org">Eric Ye</a>
-			: +1</li>
-<li>
-<a href="mailto:CurtA@techie.com">Curt Arnold</a>
-			: +1</li>
-<li>
-<a href="mailto:duncan@x180.com">James Duncan Davidson</a>
-			: +1</li>
-<li>
-<a href="mailto:twleung@sauria.com">Ted Leung</a>
-			: +1</li>
-<li>
-<a href="mailto:mhk@dia.dk">Mikael Helbo Kjaer</a>
-			: +1</li>
-<li>
-<a href="mailto:lehors@us.ibm.com">Arnaud Le Hors</a>
-			: +0</li>
-</ul>
-<b><i>References</i></b>
-<br>
-<p>
-<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2242.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2242">
-					<em>Eric         Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:48:42 MEST)</em>
-			</li>
-</p>
-</blockquote>
-</td>
-</tr>
-</table>
-</body>
-</html>
diff --git a/proposals/XRI-requirements/issues.xml b/proposals/XRI-requirements/issues.xml
deleted file mode 100644
index d93dbbf..0000000
--- a/proposals/XRI-requirements/issues.xml
+++ /dev/null
@@ -1,4411 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- edited with XML Spy v3.0 (http://www.xmlspy.com) by Edward Staub (private) -->
-<?xml-stylesheet type="text/xsl" href="issues.xsl"?>
-<!DOCTYPE requirementCatalog SYSTEM "issues.dtd">
-<requirementCatalog date="15 September 2000" version="1.5">
-	<!-- Checked apache general list through messages 2091 through 2375 -->
-	<!-- Checked apache xerces-j-dev list messages 1160 through 1380 -->
-	<categories>
-		<cat>Architecture</cat>
-		<cat>Standards</cat>
-		<cat>Features</cat>
-		<cat>Memory</cat>
-		<cat>Speed</cat>
-		<cat>Quality</cat>
-		<cat>Other</cat>
-	</categories>
-	<requirements>
-		<req id="1" status="approved" strength="hard" cat="Quality">
-			<def>The code shall be maintainable and simple to read.</def>
-			<seeAlso id="5"/>
-			<voteSet opened="26-Aug-00" closed="15-Sept-00">
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1">
-					<voteComment>+1 on intent.  But how can this be a "shall" when there is not a measure
-for maintainability or simplicity.  Are there specific criteria that we
-want to establish such as the Sun's Java coding conventions or something
-else from the Apache world?
-</voteComment>
-				</vote>
-				<vote voter="Chris Laprun" email="chris.laprun@nist.gov" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1">
-					<voteComment>I have an easy way to measure this.. Committers should only be committers if
-they are prepared to read the code commits. If the code commit isn't
-readable to somebody and they throw a flag, then it probably fails the test.
-For example, my criteria on such code would be that I can understand it. If
-everybody's criteria is this, then it works.
-</voteComment>
-				</vote>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-				<vote voter="Assaf Arkin" email="arkin@arkin.exoffice.com" vote="+1"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Edwin Goei" email="Edwin.Goei@eng.sun.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2091"> Above all, this is the primary goal        for any openly developed project as without the ability to read the        code, it's impossible for people to contribute and get involved.</ref>
-				<ref set="gen" id="2138"/>
-				<ref set="gen" id="2186">[current code too complex, scares off users]</ref>
-				<ref set="gen" id="2209">I don't think I am [willing to trade off some performance for clearly written code]. Performance is too damned important in the XML  world</ref>
-				<ref set="gen" id="2220">You're not going to get a diverse developer community built around code that  is too damned hard to read... </ref>
-				<ref set="gen" id="2311"/>
-			</refs>
-		</req>
-		<req id="2" status="approved" strength="soft" cat="Memory">
-			<def>The parser should have a competitive memory footprint (competitive
-against the other Java based parsers out there).
-</def>
-			<seeAlso id="3"/>
-			<voteSet opened="26-Aug-00" closed="15-Sept-00">
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1">
-					<voteComment>I assume that the comparison would be some basket of scenarios, so
-that being efficient with large documents could offset a slightly
-greater initial load size.</voteComment>
-				</vote>
-				<vote voter="Chris Laprun" email="chris.laprun@nist.gov" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-				<vote voter="Assaf Arkin" email="arkin@arkin.exoffice.com" vote="+1"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+0"/>
-				<vote voter="Edwin Goei" email="Edwin.Goei@eng.sun.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2091">This means small distribution size (JAR file)        and small memory footprint.</ref>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2341"/>
-				<ref set="gen" id="2345"/>
-			</refs>
-		</req>
-		<req id="3" status="approved" strength="hard" cat="Architecture">
-			<def>The parser shall be designed so as to allow deployment of minimal subsets suitable for low-end, memory-constrained applications
-			<br/>The build process shall create both:
-<ul>
-					<li>a .jar file containing all standard components of Xerces (xerces.jar).</li>
-					<li>a set of .jar files which together contain everything in xerces.jar, broken into the following components:
-<ul>
-							<li>xerces kernel, which supports the “internal APIs” and SAX support</li>
-							<li>DOM support</li>
-							<li>Validation support</li>
-							<li>other components of large size which can be easily factored and for which there is a significant audience who will benefit from not including them in a deployment.</li>
-						</ul>
-					</li>
-				</ul>
-			</def>
-			<seeAlso id="2"/>
-			<seeAlso id="13"/>
-			<voteSet opened="26-Aug-00" closed="15-Sept-00">
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1">
-					<voteComment>If this type of surgery is possible, then it should help
-requirement 2 since loading unused classes could be avoided.
-</voteComment>
-				</vote>
-				<vote voter="Chris Laprun" email="chris.laprun@nist.gov" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-				<vote voter="Assaf Arkin" email="arkin@arkin.exoffice.com" vote="+1"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Edwin Goei" email="Edwin.Goei@eng.sun.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2091">It should be possible to build a parser as a set of Jar files        so that a smaller parser can be assembled which fits the need of a        particular implementation. For example, in TV sets do you really need        validation?</ref>
-				<ref set="gen" id="2223">Where I am now we use XML as a wire format, so the data volume is small,  and parsing takes place on the client (the customer's e-commerce  environment) and on the server. Small footprint (memory *and* disk)  are much more important in this context than speed or even validation.  </ref>
-				<ref set="gen" id="2223">... many applications could benefit ...</ref>
-				<ref set="xdev" id="1324">"small-but-performant-ambitious"  devices vs. "as-small-and-cheap-as-possible" devices</ref>
-				<ref set="xdev" id="1361">I [am] a proponent [of support for] "small-but-perfrormant-ambitious", not  "as-small-and-cheap-as-possible" [devices] </ref>
-			</refs>
-		</req>
-		<req id="4" status="approved" strength="hard" cat="Speed">
-			<def>The parser shall run well on all virutal machines and 			shall not be optimized toward a particular virtual machine.</def>
-			<refs>
-				<ref set="gen" id="2091"/>
-				<ref set="xdev" id="1299"/>
-				<ref set="xdev" id="1307"/>
-			</refs>
-		</req>
-		<req id="5" status="approved" strength="soft" cat="Quality">
-			<def>Optimizations that interfere with readability,        modularity, or size should be shunned.  </def>
-			<seeAlso id="1"/>
-			<refs>
-				<ref set="gen" id="2091"/>
-			</refs>
-		</req>
-		<req id="6" status="rejected" strength="soft" cat="Memory">
-			<def>The parser should have the smallest possible distribution (JAR) size.</def>
-			<seeAlso id="3"/>
-			<edReqNote>The votes below were votes to remove this requirement.  Its concerns are addressed elsewhere.</edReqNote>
-			<voteSet opened="26-Aug-00" closed="15-Sept-00">
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1 to remove"/>
-				<vote voter="Chris Laprun" email="chris.laprun@nist.gov" vote="+1 to remove"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1 to remove"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1 to remove"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1 to remove"/>
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1 to remove"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1 to remove"/>
-				<vote voter="Assaf Arkin" email="arkin@arkin.exoffice.com" vote="+1 to remove"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1 to remove"/>
-				<vote voter="Edwin Goei" email="Edwin.Goei@eng.sun.com" vote="+1 to remove"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2091">This means small distribution size (JAR file)        and small memory footprint.  </ref>
-				<ref set="gen" id="2093">These two requirements [small memory footprint, small jar size -ed] are in direct conflict.   </ref>
-			</refs>
-		</req>
-		<req id="7" status="approved" strength="soft" cat="Quality">
-			<def>The design of the parser should be documented, with diagrams where they are more expressive than text.</def>
-			<voteSet opened="26-Aug-00" closed="15-Sept-00">
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+0"/>
-				<vote voter="Chris Laprun" email="chris.laprun@nist.gov" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-				<vote voter="Assaf Arkin" email="arkin@arkin.exoffice.com" vote="+1"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Edwin Goei" email="Edwin.Goei@eng.sun.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2104">... would benefit greatly from requirements and design documentation; most especially some diagrams. I find that a dozen or so good diagrams often do a better job of  conveying the design and, perhaps more importantly, the design approach or  philosophy, than written documents.  </ref>
-			</refs>
-		</req>
-		<req id="8" status="rejected" strength="soft" cat="Other">
-			<def>The parser should have the characteristics needed for it to be included in the JDK.</def>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1 to remove"/>
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1 to remove"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1 to remove"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+0"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1 to remove"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1 to remove"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2108"/>
-			</refs>
-		</req>
-		<req id="9" strength="soft" status="rejected" cat="Quality">
-			<def>The parser should be upwardly compatible with Xerces.</def>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="0"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+0"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="0"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2110">Whatever happened to making things upgrade compatiable. </ref>
-			</refs>
-		</req>
-		<req id="10" status="approved" strength="hard" cat="Quality">
-			<def>The parser shall be cleanly modular.</def>
-			<refs>
-				<ref set="gen" id="2091"/>
-				<ref set="gen" id="2122"/>
-				<ref set="gen" id="2130"/>
-				<ref set="gen" id="2154">[star vs. pipeline]</ref>
-			</refs>
-		</req>
-		<req id="11" strength="soft" cat="Other">
-			<def>Development should be coordinated with xerces-c.</def>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="0"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+0"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="-1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="-1 (non-committer)"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2133">I'd also like to see this be coordinated with the xerces-c developers ... it would be  nice to keep the two parsers in sync so that changes to one parser and  relatively easy to implement in the other. 		 </ref>
-				<ref set="gen" id="2144">I disagree...</ref>
-				<ref set="gen" id="2161">Java is a very different language from C++, and you need  different strategies.  </ref>
-				<ref set="gen" id="2182">...there's much to be gained by keeping the  overall architecture and design the same between the two versions. </ref>
-				<ref set="gen" id="2194">[forcing deep similarity is bad]</ref>
-				<ref set="gen" id="2222">...trying to find one design that fits both  languages well will produce one design that doesn't quite fit either  language. </ref>
-				<ref set="gen" id="2241">Let's push for high-level designs that  can accommodate any OO language...</ref>
-				<ref set="gen" id="2246"/>
-				<ref set="gen" id="2248"/>
-			</refs>
-		</req>
-		<req id="12" status="approved" strength="hard" cat="Standards">
-			<def>The parser shall support SAX2.</def>
-			<seeAlso id="13"/>
-			<refs>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2243"/>
-			</refs>
-		</req>
-		<req id="13a" strength="soft" cat="Features">
-			<def>
-				<br/>Read-only, memory conservative, high performance DOM subset. In some  ways, this is optional, since the alternative is that the XSLT processor  implement it's own DOM, as it does today. But it would be neat and simpler  if only one DOM implementation needed to exist.  <br/>  a) Document-order indexes or API as a DOM extension. I know of few or  no conformant XSLT processors that can do without this.  <br/>  b) [optional] isWhite() method as a DOM extensions (pure telling of  whether or not the text contains non-whitespace), for performance reasons.  <br/>  c) Some sort of weak reference, where nodes could be released if not  referenced, and then rebuilt if requested. For performance and memory  footprint.  </def>
-			<refs>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2296"/>
-			</refs>
-		</req>
-		<req id="13b" strength="soft" cat="Features">
-			<def>
-				<br/>parse-next function, with added control over buffer size.  </def>
-			<refs>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2296"/>
-			</refs>
-		</req>
-		<req id="13c" strength="soft" cat="Features">
-			<def>
-				<br/>Some sort of way to tell if a SAX char buffer is going to be  overwritten, so data doesn't have to be copied until this occurs.  </def>
-			<refs>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2296"/>
-			</refs>
-		</req>
-		<req id="13d" strength="soft" cat="Features">
-			<def>
-				<br/>Serialization support, as is currently in Assaf's classes.  </def>
-			<refs>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2296"/>
-			</refs>
-		</req>
-		<req id="13e" strength="soft" cat="Features">
-			<def>
-				<br/>Schema data-type support, which will be needed for XSLT2, and Xalan 2.0  extensions. </def>
-			<refs>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2296"/>
-			</refs>
-		</req>
-		<req id="13f" strength="soft" cat="Features">
-			<def>
-				<br/>Small core footprint for standalone, compiled stylesheet capability, for  use on small devices. This would need to include the Serializer. I'm not  sure if this should really be a separate micro-parser?   </def>
-			<refs>
-				<ref set="gen" id="2203"/>
-				<ref set="gen" id="2296"/>
-			</refs>
-		</req>
-		<req id="14" status="approved" strength="hard" cat="Standards">
-			<def>The parser shall validate XML 1.0.</def>
-			<refs>
-				<ref set="gen" id="2243"/>
-			</refs>
-		</req>
-		<req id="15" status="approved" strength="hard" cat="Standards">
-			<def> The parser shall support namespaces.</def>
-			<refs>
-				<ref set="gen" id="2243"/>
-			</refs>
-		</req>
-		<req id="16" status="approved" strength="hard" cat="Features">
-			<def> The parser shall support DOM Level 2. </def>
-			<refs>
-				<ref set="gen" id="2243"/>
-			</refs>
-		</req>
-		<req id="18" status="approved" strength="hard" cat="Standards">
-			<def> The parser shall support XML Schema. </def>
-			<refs>
-				<ref set="gen" id="2242"/>
-				<ref set="gen" id="2243"/>
-			</refs>
-		</req>
-		<req id="19" status="approved" strength="hard" cat="Standards">
-			<def> The parser shall support XPath. </def>
-			<refs>
-				<ref set="gen" id="2245"/>
-				<ref set="gen" id="2275"/>
-				<ref set="gen" id="2284"/>
-				<ref set="gen" id="2285"/>
-				<ref set="gen" id="2320"/>
-				<ref set="xdev" id="1277"/>
-			</refs>
-		</req>
-		<req id="20" strength="soft" cat="Standards">
-			<def> The parser should support XInclude. </def>
-			<refs>
-				<ref set="gen" id="2245">+1</ref>
-				<ref set="gen" id="2271">+1</ref>
-				<ref set="gen" id="2285">+1</ref>
-			</refs>
-		</req>
-		<req id="21" strength="soft" cat="Features">
-			<def> The parser should support write validation of a DOM tree or revalidation. </def>
-			<refs>
-				<ref set="gen" id="2242"/>
-			</refs>
-		</req>
-		<req id="22" strength="hard" cat="Standards">
-			<def> The parser shall support grammar access for both DTD and Schema. </def>
-			<seeAlso id="13"/>
-			<refs>
-				<ref set="gen" id="2242"/>
-			</refs>
-		</req>
-		<req id="23" status="approved" strength="soft" cat="Speed">
-			<def> No significant speed penalty should be invoked for unused features, notably validation. When not validating, the parser should run almost as fast (within 5%) as a non-validating parser. </def>
-			<seeAlso id="10"/>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="0"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+0"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-			</voteSet>
-			<refs/>
-		</req>
-		<req id="24" status="approved" strength="soft" cat="Speed">
-			<def> The parser should provide best-of-breed performance across all JIT's (not just Hotspot). Such performance
-shall not come at the expense of requirement 5.</def>
-			<seeAlso id="5"/>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="xdev" id="1317">-1 (on JDK 1.1)</ref>
-				<ref set="xdev" id="1323">Fast enough to not notice that a parse happened for most data (10 lines to  10K).  To expand on that, when I have Ant read it's data from build.xml, I  shouldn't notice. If I send a bit of form encoded XML data to a server, and  then get some back, it shouldn't be appreciable considering the connection  cost. </ref>
-			</refs>
-		</req>
-		<req id="25" strength="soft" status="approved" cat="Speed">
-			<def> The parser should support grammar caching and precompilation. </def>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2242"/>
-				<ref set="gen" id="2261"/>
-			</refs>
-		</req>
-		<!--		<req id="27" strength="soft" cat="Speed"> 			<def> The parser should provide mid to upper range validation performance across all JVMs. </def> 			<refs> 				<ref set="gen" id="2242"/> 			</refs> 		</req> -->
-		<req id="28" status="approved" strength="soft" cat="Features">
-			<def> Xerces Native API.  The parser should provide a reasonable core API (fast!) upon which to layer other API's.  Examples of such API's include SAX2, DOM, and JDOM. </def>
-			<seeAlso id="10"/>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="+1"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+1"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2207"/>
-				<ref set="gen" id="2221">JDOM is an important up and coming API that already has established a large and rapidly growing groundswell of support and in the  developer community.</ref>
-			</refs>
-		</req>
-		<req id="29" strength="soft" status="approved" cat="Other">
-			<def> The project should produce testcases for both conformance and benchmarking.  </def>
-			<voteSet opened="07-Sept-00" closed="15-Sept-00">
-				<vote voter="Jeffrey Rodriguez" email="jeffreyr_97@hotmail.com" vote="0"/>
-				<vote voter="Eric Ye" email="ericye@locus.apache.org" vote="+1"/>
-				<vote voter="Curt Arnold" email="CurtA@techie.com" vote="+1"/>
-				<vote voter="James Duncan Davidson" email="duncan@x180.com" vote="+1"/>
-				<vote voter="Ted Leung" email="twleung@sauria.com" vote="+1"/>
-				<vote voter="Mikael Helbo Kjaer" email="mhk@dia.dk" vote="+1"/>
-				<vote voter="Arnaud Le Hors" email="lehors@us.ibm.com" vote="+0"/>
-			</voteSet>
-			<refs>
-				<ref set="gen" id="2242"/>
-			</refs>
-		</req>
-		<req id="30" status="rejected" strength="hard" cat="Standards">
-			<def> The parse shall support SAX 1 </def>
-			<refs>
-				<ref set="gen" id="2249">-1</ref>
-				<ref set="gen" id="2257">-1</ref>
-				<ref set="gen" id="2271">-1</ref>
-			</refs>
-		</req>
-		<req id="31" strength="soft" cat="Features">
-			<def> The core parser should not directly support any tree model. </def>
-			<seeAlso id="10"/>
-			<refs>
-				<ref set="gen" id="2154">My understanding of the design, which I think is good, is that the  "core" actually doesn't directly support any tree model.  <br/>                API Layer JDOM DOM SAX2  <br/>               Core Layer Java parser code </ref>
-				<ref set="gen" id="2263"/>
-				<ref set="gen" id="2326"/>
-				<ref set="xdev" id="1169"/>
-				<ref set="xdev" id="1179"/>
-				<ref set="xdev" id="1185"/>
-				<ref set="xdev" id="1211"/>
-				<ref set="xdev" id="1320"/>
-				<ref set="xdev" id="1321"/>
-				<ref set="xdev" id="1322"/>
-			</refs>
-		</req>
-		<req id="32" status="rejected" strength="hard" cat="Standards">
-			<def> The parser shall support Java 1.1 </def>
-			<refs>
-				<ref set="gen" id="2249">-1</ref>
-				<ref set="gen" id="2257">-1</ref>
-				<ref set="gen" id="2271">-1</ref>
-				<ref set="xdev" id="1314">+1</ref>
-				<ref set="xdev" id="1317">+-0</ref>
-			</refs>
-		</req>
-		<req id="33" strength="soft" cat="Features">
-			<def> The parser should support loading and validating only certainrequested portions of a document -- a useful feature  when dealing with large xml databases, for example.   See the W3C <a href="http://www.w3.org/TR/WD-xml-fragment">
-					<em>XML Fragement Interchange</em>
-				</a> Working Draft. </def>
-			<refs>
-				<ref set="gen" id="2276"/>
-			</refs>
-		</req>
-		<req id="34" strength="hard" cat="Standards">
-			<def> The parser shall support the XML  Information Set. </def>
-			<refs>
-				<ref set="gen" id="2298">+1</ref>
-				<ref set="gen" id="2321">+1</ref>
-			</refs>
-		</req>
-		<req id="35" strength="soft" cat="Features">
-			<def> The parser should support pull model parsing. </def>
-			<refs>
-				<ref set="gen" id="2310"/>
-				<ref set="gen" id="2323"/>
-				<ref set="gen" id="2333"/>
-				<ref set="gen" id="2335"/>
-				<ref set="gen" id="2340"/>
-			</refs>
-		</req>
-		<req id="37" strength="soft" cat="Features">
-			<def> The DOM should emit events to interested listeners when changes are made to the DOM </def>
-			<refs>
-				<ref set="xdev" id="1201"/>
-			</refs>
-		</req>
-		<req id="38" strength="soft" cat="Features">
-			<def> The parser should support <a href="http://www.xml.gr.jp/relax/">
-					<em>RELAX</em>
-				</a>. </def>
-			<refs/>
-		</req>
-		<req id="39" strength="soft" cat="Features">
-			<def> The parser should allow for automatic detection of compressed/encrypted documents. </def>
-			<refs/>
-		</req>
-	</requirements>
-	<mailHeaderSets>
-		<mailHeaderSet id="xdev">
-			<!-- xml-archive-xerces-j-dev -->
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1160.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>
-				<a name="1160">
-					<em>James Duncan Davidson <small>(Sat Jul 08 2000 -         07:31:16 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1164.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1164">
-					<em>Andy Clark <small>(Sat Jul 08 2000 - 09:22:28         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1165.html">
-					<strong>RE: Duplicate Element Declaration         errors</strong>
-				</a>
-				<a name="1165">
-					<em>Andrew Fawcett         <small>(Sat Jul 08 2000 - 13:31:42 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1166.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1166">
-					<em>James Duncan Davidson <small>(Sun Jul 09 2000 -         07:46:31 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1167.html">
-					<strong>RE: Nodes from External Entities are read         only</strong>
-				</a>
-				<a name="1167">
-					<em>Brett Knights <small>         (Sun Jul 09 2000 - 20:52:10 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1168.html">
-					<strong>BUG: SAXParser endElement reports incorrect local         name w/ namespaces</strong>
-				</a>
-				<a name="1168">
-					<em>Kevin         Wiggen <small>(Mon Jul 10 2000 - 05:57:32         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1169.html">
-					<strong>[spinnaker] Design discussion</strong>
-				</a>
-				<a name="1169">
-					<em>James Duncan Davidson <small>(Mon Jul 10 2000 -         08:04:29 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1170.html">
-					<strong>RE: Re[2]: Shema: problem with definition recursive         data types</strong>
-				</a>
-				<a name="1170">
-					<em>Jean-Louis Vila         <small>(Mon Jul 10 2000 - 09:28:36 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1171.html">
-					<strong>RE: complexType derivation by extension &amp;         simpleType</strong>
-				</a>
-				<a name="1171">
-					<em>Jean-Louis Vila         <small>(Mon Jul 10 2000 - 09:38:40 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1172.html">
-					<strong>Bug in DeclHandler</strong>
-				</a>
-				<a name="1172">
-					<em>         Philippe MOUAWAD <small>(Mon Jul 10 2000 - 11:23:32         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1173.html">
-					<strong>Null in the Elements and Attribute</strong>
-				</a>
-				<a name="1173">
-					<em>Khan Intakhab <small>(Mon Jul 10 2000 -         12:22:09 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1174.html">
-					<strong>URGENT: Validation in DOM Parser doesn't         work!</strong>
-				</a>
-				<a name="1174">
-					<em>Martijn Lindhout         <small>(Mon Jul 10 2000 - 13:15:59 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1175.html">
-					<strong>serialize.XMLSerializer little patch</strong>
-				</a>
-				<a name="1175">
-					<em>Frank Taffelt <small>(Mon Jul 10 2000 -         13:38:26 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1176.html">
-					<strong>Urgent: Any one can check it?</strong>
-				</a>
-				<a name="1176">
-					<em>Khan Intakhab <small>(Mon Jul 10 2000 - 14:35:13         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1177.html">
-					<strong>Re: Urgent: Any one can check it?</strong>
-				</a>
-				<a name="1177">
-					<em>Jeffrey Rodriguez <small>(Mon Jul 10 2000 -         20:29:48 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1178.html">
-					<strong>Fw: [spinnaker] Announce</strong>
-				</a>
-				<a name="1178">
-					<em>Edwin Goei <small>(Mon Jul 10 2000 - 20:50:56         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1179.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1179">
-					<em>costin@eng.sun.com <small>(Mon Jul 10 2000         - 20:40:06 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1180.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1180">
-					<em>Rajiv Mordani <small>(Mon Jul 10 2000 - 22:11:48         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1181.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1181">
-					<em>Rajiv Mordani <small>(Mon Jul 10 2000 - 23:11:35         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1182.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1182">
-					<em>James Duncan Davidson <small>(Mon Jul 10         2000 - 23:20:35 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1183.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1183">
-					<em>James Duncan Davidson <small>(Mon Jul 10 2000 -         23:22:32 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1184.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1184">
-					<em>Edwin Goei <small>(Tue Jul 11 2000 - 00:25:14         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1185.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1185">
-					<em>Edwin Goei <small>(Tue Jul 11 2000 -         00:48:20 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1186.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1186">
-					<em>costin@eng.sun.com <small>(Tue Jul 11 2000         - 01:14:54 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1187.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1187">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         01:22:08 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1188.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1188">
-					<em>James Duncan Davidson <small>(Tue Jul 11         2000 - 01:23:42 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1189.html">
-					<strong>RE: [spinnaker] Announce</strong>
-				</a>
-				<a name="1189">
-					<em>Timm, Sean <small>(Tue Jul 11 2000 - 01:43:10         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1190.html">
-					<strong>?? Design discussion</strong>
-				</a>
-				<a name="1190">
-					<em>Eric Ye <small>(Tue Jul 11 2000 - 01:47:07         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1191.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1191">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         01:54:14 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1192.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1192">
-					<em>Edwin Goei <small>(Tue Jul 11 2000 - 01:58:36         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1193.html">
-					<strong>Re: ?? Design discussion</strong>
-				</a>
-				<a name="1193">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         02:03:04 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1194.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1194">
-					<em>Eric Ye <small>(Tue Jul 11 2000 - 02:09:26         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1195.html">
-					<strong>Re: ?? Design discussion</strong>
-				</a>
-				<a name="1195">
-					<em>Edwin Goei <small>(Tue Jul 11 2000 - 02:10:18         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1196.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1196">
-					<em>Jeffrey Rodriguez         <small>(Tue Jul 11 2000 - 02:24:45 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1197.html">
-					<strong>Re: ?? Design discussion</strong>
-				</a>
-				<a name="1197">
-					<em>costin@eng.sun.com <small>(Tue Jul 11 2000 -         02:30:22 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1198.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1198">
-					<em>costin@eng.sun.com         <small>(Tue Jul 11 2000 - 02:40:19 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1199.html">
-					<strong>Fw: ?? Design discussion</strong>
-				</a>
-				<a name="1199">
-					<em>Eric Ye <small>(Tue Jul 11 2000 - 02:55:44         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1200.html">
-					<strong>RE: [spinnaker] Announce</strong>
-				</a>
-				<a name="1200">
-					<em>Timm, Sean <small>(Tue Jul 11 2000 - 03:00:05         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1201.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1201">
-					<em>Kelly Campbell <small>         (Tue Jul 11 2000 - 03:08:57 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1202.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1202">
-					<em>Eric Ye <small>(Tue Jul 11 2000 - 03:28:57         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1203.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1203">
-					<em>Jeffrey Rodriguez         <small>(Tue Jul 11 2000 - 03:40:35 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1204.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1204">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         04:39:12 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1205.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1205">
-					<em>James Duncan Davidson         <small>(Tue Jul 11 2000 - 04:43:17 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1206.html">
-					<strong>Re: ?? Design discussion</strong>
-				</a>
-				<a name="1206">
-					<em>Edwin Goei <small>(Tue Jul 11 2000 - 04:45:39         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1207.html">
-					<strong>Re: ?? Design discussion</strong>
-				</a>
-				<a name="1207">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         04:47:47 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1208.html">
-					<strong>Directory name [was Re: [spinnaker]         Announce]</strong>
-				</a>
-				<a name="1208">
-					<em>Arnaud Le Hors         <small>(Tue Jul 11 2000 - 05:16:40 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1209.html">
-					<strong>RE: [spinnaker] Announce</strong>
-				</a>
-				<a name="1209">
-					<em>Timm, Sean <small>(Tue Jul 11 2000 - 05:07:29         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1210.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1210">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         06:21:14 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1211.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1211">
-					<em>Arnaud Le Hors <small>         (Tue Jul 11 2000 - 06:51:24 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1212.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1212">
-					<em>Costin Manolache         <small>(Tue Jul 11 2000 - 07:22:17 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1213.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1213">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         08:04:43 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1214.html">
-					<strong>RE: [spinnaker] Announce</strong>
-				</a>
-				<a name="1214">
-					<em>Rajiv Mordani <small>(Tue Jul 11 2000 - 08:45:58         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1215.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1215">
-					<em>Rajiv Mordani <small>         (Tue Jul 11 2000 - 08:50:42 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1216.html">
-					<strong>RE: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1216">
-					<em>David Waite <small>         (Tue Jul 11 2000 - 09:07:11 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1217.html">
-					<strong>RE: complexType derivation by extension &amp;         simpleType</strong>
-				</a>
-				<a name="1217">
-					<em>Jean-Louis Vila         <small>(Tue Jul 11 2000 - 09:32:50 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1218.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1218">
-					<em>Jeffrey Rodriguez         <small>(Tue Jul 11 2000 - 11:16:14 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1219.html">
-					<strong>REDOM Design discussion.</strong>
-				</a>
-				<a name="1219">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         11:28:52 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1220.html">
-					<strong>REDOM Design discussion.</strong>
-				</a>
-				<a name="1220">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         11:28:53 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1221.html">
-					<strong>RE: DOM Design discussion.</strong>
-				</a>
-				<a name="1221">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         11:33:08 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1222.html">
-					<strong>Re: serialize.XMLSerializer little         patch</strong>
-				</a>
-				<a name="1222">
-					<em>Jeffrey Rodriguez         <small>(Tue Jul 11 2000 - 11:36:27 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1223.html">
-					<strong>Re: Bug in DeclHandler</strong>
-				</a>
-				<a name="1223">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 - 12:01:10         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1224.html">
-					<strong>Re: BUG: SAXParser endElement reports incorrect         local name w/ namespaces</strong>
-				</a>
-				<a name="1224">
-					<em>         Jeffrey Rodriguez <small>(Tue Jul 11 2000 - 12:05:22         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1225.html">
-					<strong>How can I read a DTD?</strong>
-				</a>
-				<a name="1225">
-					<em>Sylvain Julliard <small>(Tue Jul 11 2000 - 13:12:27         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1226.html">
-					<strong>Re: How can I read a DTD?</strong>
-				</a>
-				<a name="1226">
-					<em>Philippe MOUAWAD <small>(Tue Jul 11 2000 -         13:46:22 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1227.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1227">
-					<em>Costin Manolache <small>(Tue Jul 11 2000 -         16:46:10 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1228.html">
-					<strong>supported encodings</strong>
-				</a>
-				<a name="1228">
-					<em>maciejka@tiger.com.pl <small>(Fri Aug 11 2000 -         17:04:20 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1229.html">
-					<strong>DTD parsing?</strong>
-				</a>
-				<a name="1229">
-					<em>Javi         Ferro <small>(Tue Jul 11 2000 - 12:58:18         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1230.html">
-					<strong>XMLValidator not found in import</strong>
-				</a>
-				<a name="1230">
-					<em>Michael jamison <small>(Tue Jul 11 2000 -         17:09:45 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1231.html">
-					<strong>Re: XMLValidator not found in import</strong>
-				</a>
-				<a name="1231">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11         2000 - 17:43:55 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1232.html">
-					<strong>Re: DTD parsing?</strong>
-				</a>
-				<a name="1232">
-					<em>         Jeffrey Rodriguez <small>(Tue Jul 11 2000 - 17:56:40         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1233.html">
-					<strong>Re: supported encodings</strong>
-				</a>
-				<a name="1233">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         18:01:36 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1234.html">
-					<strong>Re: supported encodings</strong>
-				</a>
-				<a name="1234">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         17:40:23 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1235.html">
-					<strong>RE: BUG: SAXParser endElement reports incorrect         local name w/ nam espaces</strong>
-				</a>
-				<a name="1235">
-					<em>         Sieger, Nicholas <small>(Tue Jul 11 2000 - 18:06:48         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1236.html">
-					<strong>Re: How can I read a DTD?</strong>
-				</a>
-				<a name="1236">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         18:14:21 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1237.html">
-					<strong>RE: BUG: SAXParser endElement reports incorrect         local name w/ nam espaces</strong>
-				</a>
-				<a name="1237">
-					<em>         Jeffrey Rodriguez <small>(Tue Jul 11 2000 - 18:25:04         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1238.html">
-					<strong>Re: supported encodings</strong>
-				</a>
-				<a name="1238">
-					<em>maciejka@tiger.com.pl <small>(Fri Aug 11 2000 -         18:41:59 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1239.html">
-					<strong>Bug in getOwnerElement()</strong>
-				</a>
-				<a name="1239">
-					<em>Philippe MOUAWAD <small>(Tue Jul 11 2000 -         17:55:36 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1240.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1240">
-					<em>Eric Ye <small>(Tue Jul 11 2000 - 19:18:14         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1241.html">
-					<strong>Re: complexType derivation by extension &amp;         simpleType</strong>
-				</a>
-				<a name="1241">
-					<em>Eric Ye <small>         (Tue Jul 11 2000 - 19:29:09 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1242.html">
-					<strong>Fw: ?? Design discussion</strong>
-				</a>
-				<a name="1242">
-					<em>Eric Ye <small>(Tue Jul 11 2000 - 20:13:38         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1243.html">
-					<strong>Re: Bug in getOwnerElement()</strong>
-				</a>
-				<a name="1243">
-					<em>Jeffrey Rodriguez <small>(Tue Jul 11 2000 -         20:13:58 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1244.html">
-					<strong>Re: Errata in XHTML 1.0</strong>
-				</a>
-				<a name="1244">
-					<em>Jim Clune <small>(Tue Jul 11 2000 - 20:22:11         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1245.html">
-					<strong>Re: Directory name [was Re: [spinnaker]         Announce]</strong>
-				</a>
-				<a name="1245">
-					<em>Eric Ye <small>         (Tue Jul 11 2000 - 21:08:19 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1246.html">
-					<strong>Problems with EntityResolver</strong>
-				</a>
-				<a name="1246">
-					<em>Scott Greenough <small>(Tue Jul 11 2000 -         21:29:31 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1247.html">
-					<strong>Re: Directory name [was Re: [spinnaker]         Announce]</strong>
-				</a>
-				<a name="1247">
-					<em>Brett McLaughlin         <small>(Tue Jul 11 2000 - 21:40:32 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1248.html">
-					<strong>Re: Directory name [was Re: [spinnaker]         Announce]</strong>
-				</a>
-				<a name="1248">
-					<em>Rajiv Mordani         <small>(Tue Jul 11 2000 - 22:09:26 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1249.html">
-					<strong>Re: ?? Design discussion - xerces-design-dev new         list</strong>
-				</a>
-				<a name="1249">
-					<em>James Duncan Davidson         <small>(Tue Jul 11 2000 - 22:46:17 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1250.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>
-				<a name="1250">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         22:52:45 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1251.html">
-					<strong>Re: XMLValidator not found in import</strong>
-				</a>
-				<a name="1251">
-					<em>James Duncan Davidson <small>(Tue Jul 11         2000 - 22:51:26 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1252.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1252">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         22:50:25 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1254.html">
-					<strong>Re: ?? Design discussion</strong>
-				</a>
-				<a name="1254">
-					<em>James Duncan Davidson <small>(Tue Jul 11 2000 -         22:56:00 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1253.html">
-					<strong>Re: Directory name [was Re: [spinnaker]         Announce]</strong>
-				</a>
-				<a name="1253">
-					<em>James Duncan         Davidson <small>(Tue Jul 11 2000 - 22:57:15         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1255.html">
-					<strong>RE: Directory name [was Re: [spinnaker]         Announce]</strong>
-				</a>
-				<a name="1255">
-					<em>Timm, Sean         <small>(Tue Jul 11 2000 - 23:01:16 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1256.html">
-					<strong>Re: What name?</strong>
-				</a>
-				<a name="1256">
-					<em>         Brett McLaughlin <small>(Tue Jul 11 2000 - 23:18:22         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1257.html">
-					<strong>Re: Nodes from External Entities are read         only</strong>
-				</a>
-				<a name="1257">
-					<em>Eric Ye <small>(Tue         Jul 11 2000 - 23:28:15 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1258.html">
-					<strong>Re: What name?</strong>
-				</a>
-				<a name="1258">
-					<em>Eric         Ye <small>(Wed Jul 12 2000 - 00:06:41         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1259.html">
-					<strong>ignore DTD in XML document and provide an DTD at         runtime</strong>
-				</a>
-				<a name="1259">
-					<em>George Tsai <small>         (Wed Jul 12 2000 - 00:05:58 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1260.html">
-					<strong>Re: XMLValidator not found in import</strong>
-				</a>
-				<a name="1260">
-					<em>Jeffrey Rodriguez <small>(Wed Jul 12         2000 - 00:06:51 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1261.html">
-					<strong>Re: What name?</strong>
-				</a>
-				<a name="1261">
-					<em>         Brett McLaughlin <small>(Wed Jul 12 2000 - 00:36:54         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1262.html">
-					<strong>Encoding</strong>
-				</a>
-				<a name="1262">
-					<em>Igor         Seletskiy <small>(Wed Jul 12 2000 - 01:35:45         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1263.html">
-					<strong>Re: What name?</strong>
-				</a>
-				<a name="1263">
-					<em>         Edwin Goei <small>(Wed Jul 12 2000 - 01:20:43         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1264.html">
-					<strong>Re: ?? Design discussion</strong>
-				</a>
-				<a name="1264">
-					<em>Edwin Goei <small>(Wed Jul 12 2000 - 02:11:25         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1265.html">
-					<strong>Re: What name?</strong>
-				</a>
-				<a name="1265">
-					<em>         James Duncan Davidson <small>(Wed Jul 12 2000 - 02:12:54         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1266.html">
-					<strong>RE: ignore DTD in XML document and provide an DTD         at runtime</strong>
-				</a>
-				<a name="1266">
-					<em>Wayne Jenkins         <small>(Wed Jul 12 2000 - 02:24:10 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1267.html">
-					<strong>RE: What name?</strong>
-				</a>
-				<a name="1267">
-					<em>         David Waite <small>(Wed Jul 12 2000 - 02:20:26         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1268.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1268">
-					<em>Edwin Goei <small>(Wed Jul 12 2000 - 02:26:06         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1269.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1269">
-					<em>Costin Manolache <small>(Wed Jul 12 2000 -         02:40:41 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1270.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>
-				<a name="1270">
-					<em>Eric Ye         <small>(Wed Jul 12 2000 - 02:48:42 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1271.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1271">
-					<em>Edwin Goei <small>(Wed Jul 12 2000 - 02:54:06         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1272.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1272">
-					<em>Costin Manolache <small>(Wed Jul 12 2000 -         03:21:00 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1273.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1273">
-					<em>James Duncan Davidson <small>(Wed Jul 12 2000 -         04:06:48 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1274.html">
-					<strong>Re: javax.xml support</strong>
-				</a>
-				<a name="1274">
-					<em>Jeffrey Rodriguez <small>(Wed Jul 12 2000 - 05:59:41         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1275.html">
-					<strong>Re: XRI requirements</strong>
-				</a>
-				<a name="1275">
-					<em>Jeffrey Rodriguez <small>(Wed Jul 12 2000 - 07:01:23         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1276.html">
-					<strong>Re: ignore DTD in XML document and provide an DTD         at runtime</strong>
-				</a>
-				<a name="1276">
-					<em>Lisa Retief         <small>(Wed Jul 12 2000 - 07:48:29 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1277.html">
-					<strong>Re: XRI requirements</strong>
-				</a>
-				<a name="1277">
-					<em>Jeffrey Rodriguez <small>(Wed Jul 12 2000 - 09:59:50         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1278.html">
-					<strong>Processing XML using bytestream input and DOM         output?</strong>
-				</a>
-				<a name="1278">
-					<em>David Gibbs <small>         (Wed Jul 12 2000 - 15:16:35 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1279.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1279">
-					<em>Jay Sachs <small>(Wed Jul 12 2000 - 16:33:25         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1280.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1280">
-					<em>Costin Manolache <small>(Wed Jul 12 2000 -         17:28:51 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1281.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1281">
-					<em>Jay Sachs <small>(Wed Jul 12 2000 - 17:55:08         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1282.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1282">
-					<em>Costin Manolache <small>(Wed Jul 12 2000 -         18:09:45 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1283.html">
-					<strong>[Xerces2] Requirements list; 'Xerces2'?;         cross-posting</strong>
-				</a>
-				<a name="1283">
-					<em>Ed Staub         <small>(Wed Jul 12 2000 - 19:55:52 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1284.html">
-					<strong>Re: XRI requirements - for those whose are         interested in XPath and Schema Identity         constraints</strong>
-				</a>
-				<a name="1284">
-					<em>Eric Ye <small>         (Wed Jul 12 2000 - 20:00:29 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1285.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1285">
-					<em>Kevin Regan <small>(Wed Jul 12 2000 - 20:11:07         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1286.html">
-					<strong>Re: XRI requirements - for those whose are         interested in XPath and Schema Identity         constraints</strong>
-				</a>
-				<a name="1286">
-					<em>         costin@eng.sun.com <small>(Wed Jul 12 2000 - 20:25:29         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1287.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1287">
-					<em>costin@eng.sun.com <small>(Wed Jul 12 2000 -         20:29:42 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1288.html">
-					<strong>Fw: XRI requirements - for those whose are         interested in XPath and SchemaIdentity         constraints</strong>
-				</a>
-				<a name="1288">
-					<em>Eric Ye <small>         (Wed Jul 12 2000 - 23:18:58 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1289.html">
-					<strong>Document question</strong>
-				</a>
-				<a name="1289">
-					<em>         Stuart D Jackson <small>(Wed Jul 12 2000 - 23:18:12         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1290.html">
-					<strong>RE: XRI requirements - for those whose are         interested in XPath an d SchemaIdentity         constraints</strong>
-				</a>
-				<a name="1290">
-					<em>Arnold, Curt         <small>(Wed Jul 12 2000 - 23:39:56 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1291.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1291">
-					<em>Edwin Goei <small>(Thu Jul 13 2000 - 00:16:57         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1292.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1292">
-					<em>Ted Leung <small>(Thu Jul 13 2000 - 02:42:52         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1293.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1293">
-					<em>Ryan Schmidt <small>(Thu Jul 13 2000 - 05:23:13         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1294.html">
-					<strong>Stupid Question (ints,string)</strong>
-				</a>
-				<a name="1294">
-					<em>Ravan Naidoo <small>(Thu Jul 13 2000 - 08:56:24         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1295.html">
-					<strong>Bug in DeclHandler 2</strong>
-				</a>
-				<a name="1295">
-					<em>Philippe MOUAWAD <small>(Thu Jul 13 2000 - 12:29:26         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1296.html">
-					<strong>Re: [spinnaker] Design discussion</strong>
-				</a>
-				<a name="1296">
-					<em>Eric de Haan <small>(Thu Jul 13 2000 -         15:25:21 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1297.html">
-					<strong>Re: How can I read a DTD?</strong>
-				</a>
-				<a name="1297">
-					<em>Eric de Haan <small>(Thu Jul 13 2000 - 16:23:58         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1298.html">
-					<strong>Bug in DocumentImpl.cloneNode?</strong>
-				</a>
-				<a name="1298">
-					<em>Ramkumar Natarajan <small>(Thu Jul 13 2000         - 17:00:58 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1299.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1299">
-					<em>Jim Driscoll <small>(Thu Jul 13 2000 - 18:12:19         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1300.html">
-					<strong>Strings vs. RecylclableStrings vs int (was Re:         REDOM Design discussion.)</strong>
-				</a>
-				<a name="1300">
-					<em>         Jay Sachs <small>(Thu Jul 13 2000 - 18:11:35         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1301.html">
-					<strong>Re: Bug in DocumentImpl.cloneNode?</strong>
-				</a>
-				<a name="1301">
-					<em>Jeffrey Rodriguez <small>(Thu Jul 13 2000 -         18:15:50 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1302.html">
-					<strong>Building XML over a DTD</strong>
-				</a>
-				<a name="1302">
-					<em>drozdik <small>(Thu Jul 13 2000 - 19:46:23         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1303.html">
-					<strong>Re: Stupid Question (ints,string)</strong>
-				</a>
-				<a name="1303">
-					<em>Edwin Goei <small>(Thu Jul 13 2000 -         21:33:26 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1304.html">
-					<strong>xml-xerces/java make docs</strong>
-				</a>
-				<a name="1304">
-					<em>fleur diana dragan <small>(Fri Jul 14 2000 -         00:47:02 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1305.html">
-					<strong>Re: xml-xerces/java make docs</strong>
-				</a>
-				<a name="1305">
-					<em>Eric Ye <small>(Fri Jul 14 2000 - 01:01:42         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1306.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1306">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         06:38:43 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1307.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1307">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         06:38:44 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1308.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1308">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         06:38:44 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1309.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1309">
-					<em>Ted Leung <small>(Fri Jul 14 2000 - 07:38:08         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1310.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1310">
-					<em>Elliotte Rusty Harold <small>(Fri Jul 14 2000 -         15:28:45 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1311.html">
-					<strong>Trying to run the TreeWalkerviewView and         IteratorView samples</strong>
-				</a>
-				<a name="1311">
-					<em>         glassblower <small>(Fri Jul 14 2000 - 16:14:36         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1312.html">
-					<strong>RE: REDOM Design discussion.</strong>
-				</a>
-				<a name="1312">
-					<em>Timm, Sean <small>(Fri Jul 14 2000 - 17:10:45         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1313.html">
-					<strong>entity resolution with schema         validation</strong>
-				</a>
-				<a name="1313">
-					<em>Blankenship,         David <small>(Fri Jul 14 2000 - 18:15:31         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1314.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1314">
-					<em>Jeffrey Rodriguez <small>(Fri Jul 14 2000 -         18:47:28 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1315.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1315">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         18:58:22 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1316.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1316">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         19:12:50 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1317.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1317">
-					<em>James Duncan Davidson <small>(Fri Jul 14 2000 -         19:22:19 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1318.html">
-					<strong>Re: Building XML over a DTD</strong>
-				</a>
-				<a name="1318">
-					<em>drozdik <small>(Fri Jul 14 2000 - 21:11:32         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1319.html">
-					<strong>Re: entity resolution with schema         validation</strong>
-				</a>
-				<a name="1319">
-					<em>Eric Ye <small>         (Fri Jul 14 2000 - 21:49:04 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1320.html">
-					<strong>[Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1320">
-					<em>Ed Staub <small>(Fri Jul 14 2000 - 23:34:45         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1321.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1321">
-					<em>Brett McLaughlin <small>(Fri Jul 14 2000 -         23:52:26 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1322.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1322">
-					<em>Arved Sandstrom <small>(Sat Jul 15 2000 -         01:08:07 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1323.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1323">
-					<em>James Duncan Davidson <small>(Sat Jul 15 2000 -         06:31:24 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1324.html">
-					<strong>RE: REDOM Design discussion.</strong>
-				</a>
-				<a name="1324">
-					<em>Paulo Gaspar <small>(Sat Jul 15 2000 - 15:33:49         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1325.html">
-					<strong>RE: REDOM Design discussion.</strong>
-				</a>
-				<a name="1325">
-					<em>Paulo Gaspar <small>(Sat Jul 15 2000 - 15:37:32         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1326.html">
-					<strong>RE: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1326">
-					<em>Paulo Gaspar <small>(Sat Jul 15 2000 - 15:41:04         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1328.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1328">
-					<em>Ted Leung <small>(Sat Jul 15 2000 - 23:50:01         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1327.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1327">
-					<em>Ted Leung <small>(Sat Jul 15 2000 - 23:49:06         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1329.html">
-					<strong>Re: XRI requirements</strong>
-				</a>
-				<a name="1329">
-					<em>Ted Leung <small>(Sun Jul 16 2000 - 00:02:31         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1330.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1330">
-					<em>Arved Sandstrom <small>(Sun Jul 16 2000 -         01:00:16 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1331.html">
-					<strong>Re: XRI requirements</strong>
-				</a>
-				<a name="1331">
-					<em>Arved Sandstrom <small>(Sun Jul 16 2000 - 01:21:42         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1332.html">
-					<strong>Away</strong>
-				</a>
-				<a name="1332">
-					<em>Ted Leung         <small>(Sun Jul 16 2000 - 09:04:34 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1333.html">
-					<strong>RE: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1333">
-					<em>Paulo         Gaspar <small>(Sun Jul 16 2000 - 17:56:17         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1334.html">
-					<strong>[XRI] XRI requirements list posted to Apache         website</strong>
-				</a>
-				<a name="1334">
-					<em>Ed Staub <small>         (Sun Jul 16 2000 - 18:08:56 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1335.html">
-					<strong>RE: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1335">
-					<em>Ed Staub         <small>(Sun Jul 16 2000 - 18:42:45 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1336.html">
-					<strong>RE: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1336">
-					<em>Arved         Sandstrom <small>(Sun Jul 16 2000 - 18:31:44         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1337.html">
-					<strong>Re: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1337">
-					<em>N. Sean         Timm <small>(Sun Jul 16 2000 - 18:48:11         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1338.html">
-					<strong>Xerces vs. com.sun.xml</strong>
-				</a>
-				<a name="1338">
-					<em>Magnus ?or Torfason <small>(Sun Jul 16 2000 - 19:12:38         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1339.html">
-					<strong>Re: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1339">
-					<em>Arved         Sandstrom <small>(Sun Jul 16 2000 - 19:18:25         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1340.html">
-					<strong>An extensibility framework for Xerces and its         clients?</strong>
-				</a>
-				<a name="1340">
-					<em>Ed Staub <small>         (Mon Jul 17 2000 - 06:00:25 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1341.html">
-					<strong>RE: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1341">
-					<em>Paulo         Gaspar <small>(Mon Jul 17 2000 - 07:21:27         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1342.html">
-					<strong>RE: An extensibility framework for Xerces and its         clients?</strong>
-				</a>
-				<a name="1342">
-					<em>Paulo Gaspar         <small>(Mon Jul 17 2000 - 07:21:28 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1343.html">
-					<strong>Re: An extensibility framework for Xerces and its         clients?</strong>
-				</a>
-				<a name="1343">
-					<em>Pae Choi <small>         (Sun Jul 16 2000 - 07:45:04 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1344.html">
-					<strong>Re: An extensibility framework for Xerces and its         clients?</strong>
-				</a>
-				<a name="1344">
-					<em>markd@lutris.com         <small>(Mon Jul 17 2000 - 07:47:39 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1345.html">
-					<strong>RE: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1345">
-					<em>Arved         Sandstrom <small>(Mon Jul 17 2000 - 07:50:19         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1346.html">
-					<strong>RE: An extensibility framework for Xerces and its         clients?</strong>
-				</a>
-				<a name="1346">
-					<em>Ed Staub <small>         (Mon Jul 17 2000 - 13:55:29 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1347.html">
-					<strong>Cannot obtain elements from the         DTD(documentTypeImpl Object)</strong>
-				</a>
-				<a name="1347">
-					<em>Grengbondai, Jules C. <small>(Mon Jul 17 2000 -         15:09:39 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1348.html">
-					<strong>RE: An extensibility framework for Xerces and its         clients?</strong>
-				</a>
-				<a name="1348">
-					<em>Ed Staub <small>         (Mon Jul 17 2000 - 16:58:10 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1349.html">
-					<strong>setValidating method</strong>
-				</a>
-				<a name="1349">
-					<em>Martin Fuhrer <small>(Mon Jul 17 2000 - 17:54:04         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1350.html">
-					<strong>parsing problem with:         &lt;URL&gt;..344&amp;CONTEXT=34..&lt;/URL&gt;</strong>
-				</a>
-				<a name="1350">
-					<em>Armin S. A. Roehrl <small>(Mon Jul 17         2000 - 19:59:02 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1351.html">
-					<strong>Re: parsing problem with:         &lt;URL&gt;..344&amp;CONTEXT=34..&lt;/URL&gt;</strong>
-				</a>
-				<a name="1351">
-					<em>Eric Ye <small>(Mon Jul 17 2000 -         20:12:16 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1352.html">
-					<strong>Re: serialize.XMLSerializer little         patch</strong>
-				</a>
-				<a name="1352">
-					<em>Jeffrey Rodriguez         <small>(Mon Jul 17 2000 - 20:13:38 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1353.html">
-					<strong>Re: setValidating method</strong>
-				</a>
-				<a name="1353">
-					<em>Eric Ye <small>(Mon Jul 17 2000 - 20:54:18         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1354.html">
-					<strong>Re: parsing problem with:         &lt;URL&gt;..344&amp;CONTEXT=34..&lt;/URL&gt;</strong>
-				</a>
-				<a name="1354">
-					<em>Ye_Tao@i2.com <small>(Mon Jul 17 2000 -         20:05:18 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1355.html">
-					<strong>RE: Cannot obtain elements from the         DTD(documentTypeImpl Object)</strong>
-				</a>
-				<a name="1355">
-					<em>Grengbondai, Jules C. <small>(Mon Jul 17 2000 -         21:05:36 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1356.html">
-					<strong>Re: [XRI] XRI requirements list posted to Apache         website</strong>
-				</a>
-				<a name="1356">
-					<em>Edwin Goei <small>         (Mon Jul 17 2000 - 21:26:51 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1357.html">
-					<strong>Re: Cannot obtain elements from the         DTD(documentTypeImpl Object)</strong>
-				</a>
-				<a name="1357">
-					<em>Eric Ye <small>(Mon Jul 17 2000 - 21:49:54         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1358.html">
-					<strong>RE: Cannot obtain elements from the         DTD(documentTypeImpl Object)</strong>
-				</a>
-				<a name="1358">
-					<em>Grengbondai, Jules C. <small>(Mon Jul 17 2000 -         21:58:37 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1359.html">
-					<strong>Special characters</strong>
-				</a>
-				<a name="1359">
-					<em>         Igor Seletskiy <small>(Mon Jul 17 2000 - 22:20:50         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1360.html">
-					<strong>RE: Cannot obtain elements from the         DTD(documentTypeImpl Object)</strong>
-				</a>
-				<a name="1360">
-					<em>Jeffrey Rodriguez <small>(Mon Jul 17 2000 - 22:35:54         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1361.html">
-					<strong>Re: REDOM Design discussion.</strong>
-				</a>
-				<a name="1361">
-					<em>James Duncan Davidson <small>(Tue Jul 18 2000 -         00:28:02 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1362.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1362">
-					<em>James Duncan Davidson <small>(Tue Jul 18 2000 -         00:30:08 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1363.html">
-					<strong>Re: [XRI] XRI requirements list posted to Apache         website</strong>
-				</a>
-				<a name="1363">
-					<em>James Duncan         Davidson <small>(Tue Jul 18 2000 - 00:41:10         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1364.html">
-					<strong>Re: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1364">
-					<em>James         Duncan Davidson <small>(Tue Jul 18 2000 - 00:53:14         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1365.html">
-					<strong>Re: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1365">
-					<em>Mike Pogue <small>(Tue Jul 18 2000 - 01:45:44         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1366.html">
-					<strong>Re: XRI requirements - and overdefensiveness in         OpenSourceLand...</strong>
-				</a>
-				<a name="1366">
-					<em>Mike         Pogue <small>(Tue Jul 18 2000 - 01:48:48         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1367.html">
-					<strong>Re: Special characters</strong>
-				</a>
-				<a name="1367">
-					<em>Mike Pogue <small>(Tue Jul 18 2000 - 01:49:22         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1368.html">
-					<strong>RE: An extensibility framework for Xerces and its         clients?</strong>
-				</a>
-				<a name="1368">
-					<em>Paulo Gaspar         <small>(Tue Jul 18 2000 - 02:44:46 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1369.html">
-					<strong>RE: REDOM Design discussion.</strong>
-				</a>
-				<a name="1369">
-					<em>Paulo Gaspar <small>(Tue Jul 18 2000 - 02:49:20         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1370.html">
-					<strong>RE: REDOM Design discussion.</strong>
-				</a>
-				<a name="1370">
-					<em>Paulo Gaspar <small>(Tue Jul 18 2000 - 02:51:47         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1371.html">
-					<strong>RE: [Xerces2] What is CORE?</strong>
-				</a>
-				<a name="1371">
-					<em>Paulo Gaspar <small>(Tue Jul 18 2000 - 03:37:20         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1372.html">
-					<strong>The Deferred DOM (was Re: REDOM Design         discussion.)</strong>
-				</a>
-				<a name="1372">
-					<em>Arnaud Le Hors         <small>(Tue Jul 18 2000 - 03:50:57 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1375.html">
-					<strong>NodeContainer (was Re: entity resolution with         schema validation)</strong>
-				</a>
-				<a name="1375">
-					<em>Arnaud         Le Hors <small>(Tue Jul 18 2000 - 03:51:15         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1373.html">
-					<strong>Managing/implementing several DOM         implementations</strong>
-				</a>
-				<a name="1373">
-					<em>Arnaud Le         Hors <small>(Tue Jul 18 2000 - 03:51:32         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1374.html">
-					<strong>Re: Stupid Question (ints,string)</strong>
-				</a>
-				<a name="1374">
-					<em>Arnaud Le Hors <small>(Tue Jul 18 2000 -         03:52:11 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1376.html">
-					<strong>RE: Managing/implementing several DOM         implementations</strong>
-				</a>
-				<a name="1376">
-					<em>Paulo         Gaspar <small>(Tue Jul 18 2000 - 04:52:39         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1377.html">
-					<strong>Re: The Deferred DOM (was Re: REDOM Design         discussion.)</strong>
-				</a>
-				<a name="1377">
-					<em>Ryan Schmidt         <small>(Tue Jul 18 2000 - 04:54:48 MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1378.html">
-					<strong>Re: BUG: SAXParser endElement reports incorrect         local name w/ namespaces</strong>
-				</a>
-				<a name="1378">
-					<em>         Jeffrey Rodriguez <small>(Tue Jul 18 2000 - 05:50:47         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1379.html">
-					<strong>Xerces Redesign</strong>
-				</a>
-				<a name="1379">
-					<em>         Andy Clark <small>(Tue Jul 18 2000 - 06:09:44         MEST)</small>
-					</em>
-				</a>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-xerces-j-dev/1380.html">
-					<strong>Re: setValidating method</strong>
-				</a>
-				<a name="1380">
-					<em>Martin Fuhrer <small>(Tue Jul 18 2000 - 09:36:31         MEST)</small>
-					</em>
-				</a>
-			</li>
-		</mailHeaderSet>
-		<mailHeaderSet id="gen">
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2091.html">
-					<strong>[spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2091">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 07:31:16 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2092.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2092">
-					<em>Andy Clark</em>
-				</a>&nbsp;<em>(Sat Jul 08 2000 -         09:22:28 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2093.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2093">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Sat Jul 08         2000 - 19:56:58 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2094.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2094">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sat Jul         08 2000 - 23:46:00 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2095.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2095">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sun Jul         09 2000 - 00:10:51 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2096.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2096">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Sun Jul 09         2000 - 00:31:25 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2097.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2097">
-					<em>Kevin Regan</em>
-				</a>&nbsp;<em>(Sun Jul 09 2000 -         00:41:41 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2098.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2098">
-					<em>burtonator</em>
-				</a>&nbsp;<em>(Sun Jul 09 2000 -         05:19:38 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2099.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2099">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sun Jul         09 2000 - 07:04:49 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2100.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2100">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sun Jul         09 2000 - 07:38:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2101.html">
-					<strong>Xerces-J download</strong>
-				</a>&nbsp;<a name="2101">
-					<em>Krassimir Dimov</em>
-				</a>&nbsp;<em>(Sun Jul 09 2000 -         09:34:56 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2102.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2102">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Sun Jul 09         2000 - 13:55:20 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2103.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2103">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Sun Jul 09         2000 - 17:36:18 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2104.html">
-					<strong>design docs and diagrams [was Re: [spinnaker]         Announce]</strong>
-				</a>&nbsp;<a name="2104">
-					<em>Randall J.         Parr</em>
-				</a>&nbsp;<em>(Sun Jul 09 2000 - 18:43:49         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2105.html">
-					<strong>Re: design docs and diagrams</strong>
-				</a>&nbsp;<a name="2105">
-					<em>Guy Hulbert</em>
-				</a>&nbsp;<em>(Sun Jul 09         2000 - 18:55:54 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2106.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2106">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Sun Jul         09 2000 - 23:32:40 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2107.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2107">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 00:12:30 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2108.html">
-					<strong>[spinnaker] XML Hack Article</strong>
-				</a>&nbsp;<a name="2108">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>         (Mon Jul 10 2000 - 00:47:01 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2109.html">
-					<strong>Re: design docs and diagrams</strong>
-				</a>&nbsp;<a name="2109">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 01:56:41 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2110.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2110">
-					<em>MITCHELL SOJDEHEI</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 02:57:49 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2111.html">
-					<strong>RE: Entities not supported in         DTDs</strong>
-				</a>&nbsp;<a name="2111">
-					<em>Peter Guldbaek -         Netnord A/S</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 - 07:25:46         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2112.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2112">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 07:41:06 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2113.html">
-					<strong>Re: design docs and diagrams</strong>
-				</a>&nbsp;<a name="2113">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>         (Mon Jul 10 2000 - 08:05:16 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2114.html">
-					<strong>RE: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2114">
-					<em>GOMEZ Henri</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         08:25:20 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2115.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2115">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 12:29:40 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2116.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2116">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 12:38:31 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2117.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2117">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 16:55:02 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2118.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2118">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 17:37:28 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2119.html">
-					<strong>Re: XML Database</strong>
-				</a>&nbsp;<a name="2119">
-					<em>Falko Braeutigam</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         16:29:23 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2120.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2120">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 18:22:17 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2121.html">
-					<strong>Re: Xerces-J download</strong>
-				</a>&nbsp;<a name="2121">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 19:51:53 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2122.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2122">
-					<em>costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 19:54:06 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2123.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2123">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         19:35:39 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2124.html">
-					<strong>Re: Xerces-J download</strong>
-				</a>&nbsp;<a name="2124">
-					<em>Krassimir Dimov</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 20:39:52 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2125.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2125">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         20:47:58 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2126.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2126">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         21:10:43 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2127.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2127">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 21:14:31 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2128.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2128">
-					<em>Rajiv Mordani</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000         - 22:11:48 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2129.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2129">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 22:32:01 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2130.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2130">
-					<em>costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 22:48:38 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2131.html">
-					<strong>RE: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2131">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         22:44:13 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2132.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2132">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:00:34 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2133.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2133">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000         - 23:05:18 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2134.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2134">
-					<em>Rajiv Mordani</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000         - 23:11:35 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2135.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2135">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:11:32 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2136.html">
-					<strong>Xalan Extensions &amp; Tomcat Class         Loader</strong>
-				</a>&nbsp;<a name="2136">
-					<em>Roytman,         Alex</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 - 23:18:49         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2137.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2137">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:18:08 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2138.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2138">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         23:18:54 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2139.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2139">
-					<em>Jim Driscoll</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000         - 23:31:05 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2140.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2140">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:32:47 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2141.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2141">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:36:31 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2142.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2142">
-					<em>costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 23:37:05 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2143.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2143">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:38:01 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2144.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2144">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:34:54 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2145.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2145">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Mon Jul         10 2000 - 23:43:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2146.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2146">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 23:48:51 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2147.html">
-					<strong>RE: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2147">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         23:47:08 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2148.html">
-					<strong>HotSpot Bashing (was RE: [spinnaker]         Announce)</strong>
-				</a>&nbsp;<a name="2148">
-					<em>Eric         Hodges</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 00:17:00         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2149.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2149">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 00:37:40 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2150.html">
-					<strong>Re: HotSpot Bashing (was RE: [spinnaker]         Announce)</strong>
-				</a>&nbsp;<a name="2150">
-					<em>         costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         00:55:24 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2151.html">
-					<strong>Re: HotSpot Bashing (was RE: [spinnaker]         Announce)</strong>
-				</a>&nbsp;<a name="2151">
-					<em>James Duncan         Davidson</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 01:20:41         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2152.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2152">
-					<em>rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 02:07:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2153.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2153">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 02:43:43 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2154.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2154">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 03:41:05 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2155.html">
-					<strong>Re: XML Database</strong>
-				</a>&nbsp;<a name="2155">
-					<em>Joseph Shraibman</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         03:47:55 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2156.html">
-					<strong>Re: [spinnaker] Can't we all work         together?</strong>
-				</a>&nbsp;<a name="2156">
-					<em>         rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         03:44:22 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2157.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2157">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         04:13:38 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2158.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2158">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 04:51:43 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2159.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2159">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 05:20:52 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2160.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2160">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 05:13:33 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2161.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2161">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 05:25:51 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2162.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2162">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 05:54:01 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2163.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2163">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 06:05:54 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2164.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2164">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 06:21:14 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2165.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2165">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 06:25:05 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2166.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2166">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 06:47:55 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2167.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2167">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 07:06:26 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2168.html">
-					<strong>Re: XML Database</strong>
-				</a>&nbsp;<a name="2168">
-					<em>Brian Tol</em>
-				</a>&nbsp;<em>(Fri Jul 07 2000 - 22:22:21         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2169.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2169">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 08:00:06 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2170.html">
-					<strong>RE: XML Database</strong>
-				</a>&nbsp;<a name="2170">
-					<em>steven.noels@the-ecorp.com</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 10:07:47 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2171.html">
-					<strong>Re: Xerces-J download</strong>
-				</a>&nbsp;<a name="2171">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 11:12:54 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2172.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2172">
-					<em>twleung@sauria.com</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 12:45:28 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2173.html">
-					<strong>[XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2173">
-					<em>         rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         12:51:17 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2174.html">
-					<strong>RE: XML Database</strong>
-				</a>&nbsp;<a name="2174">
-					<em>Paulo Gaspar</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         13:15:23 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2175.html">
-					<strong>Re: [XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2175">
-					<em>N. Sean         Timm</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 13:22:41         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2176.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2176">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 14:08:26 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2177.html">
-					<strong>Re: [XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2177">
-					<em>         rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         14:12:12 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2178.html">
-					<strong>RE: [XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2178">
-					<em>Ed         Staub</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 16:30:21         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2179.html">
-					<strong>RE: [XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2179">
-					<em>Crook,         Charles</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 16:48:12         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2180.html">
-					<strong>RE: [XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2180">
-					<em>HERRICK,         CHUCK (SBCSI)</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 17:17:33         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2181.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2181">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         18:49:11 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2182.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2182">
-					<em>Andy Heninger</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000         - 18:59:24 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2183.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2183">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         19:04:56 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2184.html">
-					<strong>Let's move on!</strong>
-				</a>&nbsp;<a name="2184">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         19:37:12 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2185.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2185">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         21:42:51 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2189.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2189">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         22:08:07 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2186.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2186">
-					<em>Brett McLaughlin</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 22:17:03 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2187.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2187">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         22:19:47 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2188.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2188">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         21:52:03 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2190.html">
-					<strong>Re: [XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2190">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         22:31:26 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2191.html">
-					<strong>Re: Let's move on!</strong>
-				</a>&nbsp;<a name="2191">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         22:34:06 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2195.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2195">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         22:37:36 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2192.html">
-					<strong>What name?</strong>
-				</a>&nbsp;<a name="2192">
-					<em>         Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         22:54:13 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2193.html">
-					<strong>Re: XML Database</strong>
-				</a>&nbsp;<a name="2193">
-					<em>Edward Q. Bridges</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         19:41:36 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2194.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2194">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 22:39:19 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2196.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2196">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Tue Jul         11 2000 - 22:19:35 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2197.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2197">
-					<em>Brett McLaughlin</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:18:22 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2198.html">
-					<strong>[ANN] Xalan-J 1.1 Point Release posted to         xml.apache.org</strong>
-				</a>&nbsp;<a name="2198">
-					<em>         Shane_Curcuru@lotus.com</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000         - 23:20:29 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2199.html">
-					<strong>Re: [ANN] Xalan-J 1.1 Point Release posted to         xml.apache.org</strong>
-				</a>&nbsp;<a name="2199">
-					<em>Jeffrey         Rodriguez</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 23:30:48         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2200.html">
-					<strong>Xerces calls SAXParserFactoryImpl but doesn't have         it?</strong>
-				</a>&nbsp;<a name="2200">
-					<em>Longstrom,         Ed</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 23:35:41 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2201.html">
-					<strong>Re: XML Database</strong>
-				</a>&nbsp;<a name="2201">
-					<em>Tom Bradford</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:38:32 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2202.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2202">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:46:24 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2203.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2203">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:42:10 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2204.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2204">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 -         23:57:57 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2205.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2205">
-					<em>Brett McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         00:22:49 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2206.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2206">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 00:14:42 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2207.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2207">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 00:28:32         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2208.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2208">
-					<em>Brett McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         00:36:54 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2209.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2209">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 00:25:18 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2210.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2210">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         00:44:03 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2211.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2211">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         00:46:34 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2212.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2212">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 00:53:46         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2213.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2213">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 01:02:27         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2214.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2214">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         00:53:40 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2215.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2215">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         00:58:46 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2216.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2216">
-					<em>Andy Heninger</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         01:01:25 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2217.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2217">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 01:03:03 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2218.html">
-					<strong>RE: What name?</strong>
-				</a>&nbsp;<a name="2218">
-					<em>HERRICK, CHUCK (SBCSI)</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 00:29:43 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2219.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2219">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 01:08:45 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2220.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2220">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 01:11:58 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2221.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2221">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         01:15:59 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2222.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2222">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         01:23:23 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2223.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2223">
-					<em>Rod McChesney</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000         - 01:32:31 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2224.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2224">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 01:35:50         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2225.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2225">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 15:20:18 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2228.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2228">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Tue Jul 11         2000 - 15:25:39 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2227.html">
-					<strong>Re: [XRI] Xerces Refactoring         Initiative</strong>
-				</a>&nbsp;<a name="2227">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Tue Jul 11 2000 - 15:33:04         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2226.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2226">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 01:39:34 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2229.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2229">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 01:44:51 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2230.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2230">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000         - 01:43:17 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2231.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2231">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         01:47:23 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2232.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2232">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         01:52:27 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2233.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2233">
-					<em>Randall         J. Parr</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 01:52:27         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2234.html">
-					<strong>RE: What name?</strong>
-				</a>&nbsp;<a name="2234">
-					<em>HERRICK, CHUCK (SBCSI)</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 01:55:22 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2235.html">
-					<strong>RE: What name?</strong>
-				</a>&nbsp;<a name="2235">
-					<em>HERRICK, CHUCK (SBCSI)</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 01:57:29 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2236.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2236">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 01:59:59 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2237.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2237">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         02:13:53 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2238.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2238">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         02:15:55 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2239.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2239">
-					<em>Andy Heninger</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         02:25:53 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2240.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2240">
-					<em>Costin         Manolache</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:31:12         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2241.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2241">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 02:22:53 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2242.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2242">
-					<em>Eric         Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:48:42 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2243.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2243">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:49:04         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2244.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2244">
-					<em>Eric Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         02:51:31 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2245.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2245">
-					<em>Donald         Ball</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:57:59         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2246.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2246">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 02:55:07 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2247.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2247">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 02:56:56 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2248.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2248">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         03:03:32 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2249.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2249">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 03:07:59         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2250.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2250">
-					<em>Joe         Polastre</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 03:11:02         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2251.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2251">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 03:22:05         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2252.html">
-					<strong>[spinnaker] proposal: move spinnaker to         xml-xerces/proposals /spinnaker</strong>
-				</a>&nbsp;<a name="2252">
-					<em>rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Mon Jul 10         2000 - 22:49:53 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2253.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2253">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         04:12:50 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2254.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2254">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         04:15:37 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2255.html">
-					<strong>javax.xml support</strong>
-				</a>&nbsp;<a name="2255">
-					<em>Szegedi, Attila</em>
-				</a>&nbsp;<em>(Mon Jul 10 2000 -         17:10:56 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2256.html">
-					<strong>Re: javax.xml support</strong>
-				</a>&nbsp;<a name="2256">
-					<em>Christopher Elkins</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 04:37:42 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2257.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2257">
-					<em>N. Sean         Timm</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 05:59:47         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2258.html">
-					<strong>XRI requirements</strong>
-				</a>&nbsp;<a name="2258">
-					<em>Ed Staub</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 06:03:53         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2259.html">
-					<strong>Re: [spinnaker] proposal: move spinnaker to         xml-xerces/proposals/spinnaker</strong>
-				</a>&nbsp;<a name="2259">
-					<em>N. Sean Timm</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000         - 06:10:48 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2260.html">
-					<strong>Fwd: Re: javax.xml support</strong>
-				</a>&nbsp;<a name="2260">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Wed         Jul 12 2000 - 06:42:55 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2261.html">
-					<strong>Re: XRI requirements</strong>
-				</a>&nbsp;<a name="2261">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 07:01:23 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2262.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2262">
-					<em>Jason         Hunter</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 07:56:29         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2263.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2263">
-					<em>Jason         Hunter</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 07:51:22         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2264.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2264">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 10:19:36 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2265.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2265">
-					<em>Jeffrey         Rodriguez</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 10:52:30         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2266.html">
-					<strong>AW: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2266">
-					<em>Henning von Bargen</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 11:26:17 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2267.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2267">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 02:20:14 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2268.html">
-					<strong>Restoring original signal/noise         ratio</strong>
-				</a>&nbsp;<a name="2268">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 02:43:02         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2269.html">
-					<strong>Re: Restoring original signal/noise         ratio</strong>
-				</a>&nbsp;<a name="2269">
-					<em>         rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         14:36:46 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2270.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2270">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 14:52:54 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2273.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2273">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 14:56:53 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2272.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2272">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 15:00:16         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2271.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2271">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 15:02:47         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2274.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2274">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 16:01:02         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2275.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2275">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 16:07:32         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2276.html">
-					<strong>RE: XRI requirements</strong>
-				</a>&nbsp;<a name="2276">
-					<em>James Snell</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         07:25:50 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2277.html">
-					<strong>[ANN] Xalan-C 0.40.0 posted to         xml.apache.org</strong>
-				</a>&nbsp;<a name="2277">
-					<em>         David_N_Bertoni@lotus.com</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 17:49:29 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2278.html">
-					<strong>deprecated apis in xml4j</strong>
-				</a>&nbsp;<a name="2278">
-					<em>Muktavaram, Vikas (FUSA)</em>
-				</a>&nbsp;<em>(Wed         Jul 12 2000 - 17:46:55 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2279.html">
-					<strong>Re: Restoring original signal/noise         ratio</strong>
-				</a>&nbsp;<a name="2279">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 18:05:18         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2280.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2280">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 18:41:29         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2281.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2281">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:02:01         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2282.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2282">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:20:41         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2283.html">
-					<strong>Re: XRI requirements</strong>
-				</a>&nbsp;<a name="2283">
-					<em>Eric Ye</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:25:41 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2284.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2284">
-					<em>Eduardo         Pelegri--Llopart</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:31:22 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2285.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2285">
-					<em>Jeffrey         Rodriguez</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:38:42         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2286.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2286">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:41:29 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2287.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2287">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:42:47 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2288.html">
-					<strong>[Xerces2] Requirements list; 'Xerces2'?;         cross-posting</strong>
-				</a>&nbsp;<a name="2288">
-					<em>Ed         Staub</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:55:52         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2289.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2289">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:50:14         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2290.html">
-					<strong>Re: [Xerces2] Requirements list; 'Xerces2'?;         cross-posting</strong>
-				</a>&nbsp;<a name="2290">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 19:50:59         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2291.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2291">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000         - 19:59:28 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2292.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2292">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 20:01:51         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2294.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2294">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         18:42:01 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2296.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2296">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         19:59:46 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2295.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2295">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         18:52:11 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2293.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2293">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 20:13:42         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2297.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2297">
-					<em>Arnaud Le Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         20:20:43 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2298.html">
-					<strong>Re: [Xerces2] Requirements list; 'Xerces2'?;         cross-posting</strong>
-				</a>&nbsp;<a name="2298">
-					<em>Arnaud         Le Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 20:46:38         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2299.html">
-					<strong>Re: What name?</strong>
-				</a>&nbsp;<a name="2299">
-					<em>Edwin Goei</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         21:15:51 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2300.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2300">
-					<em>Donald         Ball</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 21:21:13         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2301.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2301">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 21:19:06         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2302.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2302">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 21:39:55         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2303.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2303">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 22:05:45         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2304.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2304">
-					<em>Arved Sandstrom</em>
-				</a>&nbsp;<em>(Wed Jul 12         2000 - 22:14:57 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2305.html">
-					<strong>RE: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2305">
-					<em>Eric         Hodges</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 22:37:59         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2306.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2306">
-					<em>Edwin         Goei</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 23:05:01         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2311.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2311">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 23:44:52 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2307.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2307">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 - 23:54:10         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2308.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2308">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         21:13:50 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2310.html">
-					<strong>Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2310">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul         12 2000 - 21:46:16 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2309.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2309">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         21:31:24 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2312.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2312">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Wed Jul 12 2000 -         21:50:35 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2313.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2313">
-					<em>Tom Bradford</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000         - 00:08:47 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2314.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2314">
-					<em>Brett         McLaughlin</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 00:18:09         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2315.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2315">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 00:23:10         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2316.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2316">
-					<em>Octav Chipara</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000         - 00:36:37 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2317.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2317">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000         - 00:40:24 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2318.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2318">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         00:50:27 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2319.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2319">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Thu Jul         13 2000 - 01:10:37 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2320.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2320">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 01:11:58         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2321.html">
-					<strong>Re: [Xerces2] Requirements list; 'Xerces2'?;         cross-posting</strong>
-				</a>&nbsp;<a name="2321">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 01:13:00         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2322.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2322">
-					<em>Eric         Hodges</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 01:57:10         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2323.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2323">
-					<em>Ted Leung</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         02:08:55 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2324.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2324">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Thu Jul         13 2000 - 02:26:42 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2325.html">
-					<strong>Re: XRI requirements</strong>
-				</a>&nbsp;<a name="2325">
-					<em>Ted Leung</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         02:25:56 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2326.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2326">
-					<em>Tim         Bray</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 02:33:14         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2327.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2327">
-					<em>rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 02:37:30 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2328.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2328">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000         - 02:39:30 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2329.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2329">
-					<em>Arnaud Le         Hors</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 02:46:08         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2330.html">
-					<strong>RE: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2330">
-					<em>Ed Staub</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         03:29:30 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2331.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2331">
-					<em>Edwin         Goei</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 04:27:46         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2332.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2332">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         05:42:17 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2333.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2333">
-					<em>Ted Leung</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         06:46:09 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2334.html">
-					<strong>AW: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2334">
-					<em>Henning von Bargen</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 08:57:46 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2335.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2335">
-					<em>Eric Hodges</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         09:15:49 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2336.html">
-					<strong>Re: javax.xml support</strong>
-				</a>&nbsp;<a name="2336">
-					<em>Rajiv Mordani</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000         - 09:42:39 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2337.html">
-					<strong>Re: [spinnaker] proposal: move spinnaker to         xml-xerces/proposals/spinnaker</strong>
-				</a>&nbsp;<a name="2337">
-					<em>Rajiv Mordani</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000         - 09:45:06 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2338.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2338">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         06:07:25 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2339.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2339">
-					<em>Scott         Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 -         06:12:28 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2340.html">
-					<strong>RE: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2340">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Thu Jul         13 2000 - 06:29:25 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2341.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2341">
-					<em>Stefano Mazzocchi</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 01:52:43 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2342.html">
-					<strong>Generation of Static Pages using the         Cache</strong>
-				</a>&nbsp;<a name="2342">
-					<em>Bob Van         Cleef</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 18:06:48         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2343.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2343">
-					<em>Thomas B. Passin</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 19:28:10 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2344.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2344">
-					<em>Thomas B. Passin</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 19:33:11 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2345.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2345">
-					<em>costin@eng.sun.com</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 21:46:20 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2346.html">
-					<strong>Re: [spinnaker] proposal: move spinnaker to         xml-xerces/proposals /spinnaker</strong>
-				</a>&nbsp;<a name="2346">
-					<em>rubys@us.ibm.com</em>
-				</a>&nbsp;<em>(Thu Jul 13         2000 - 16:35:20 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2347.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2347">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 -         06:38:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2351.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2351">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul         14 2000 - 06:38:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2348.html">
-					<strong>Re: XRI requirements</strong>
-				</a>&nbsp;<a name="2348">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul         14 2000 - 06:38:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2349.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2349">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 -         06:38:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2350.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2350">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 -         06:38:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2352.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2352">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul         14 2000 - 06:38:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2353.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2353">
-					<em>Jeffrey Rodriguez</em>
-				</a>&nbsp;<em>(Fri Jul 14         2000 - 09:07:29 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2354.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2354">
-					<em>Stefano         Mazzocchi</em>
-				</a>&nbsp;<em>(Thu Jul 13 2000 - 14:42:49         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2355.html">
-					<strong>RE: XRI requirements</strong>
-				</a>&nbsp;<a name="2355">
-					<em>Ed Staub</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 -         14:03:26 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2356.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2356">
-					<em>Arved         Sandstrom</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 - 16:11:08         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2357.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2357">
-					<em>Octav         Chipara</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 - 17:42:09         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2358.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2358">
-					<em>Jeffrey         Rodriguez</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 - 18:40:14         MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2359.html">
-					<strong>Re: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2359">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul         14 2000 - 18:40:06 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2360.html">
-					<strong>Re: XRI requirements</strong>
-				</a>&nbsp;<a name="2360">
-					<em>James Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul         14 2000 - 18:52:35 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2361.html">
-					<strong>Re: parser-next-gen goals, plan, and         requirements</strong>
-				</a>&nbsp;<a name="2361">
-					<em>James         Duncan Davidson</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000 -         18:54:42 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2362.html">
-					<strong>RE: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2362">
-					<em>Paulo Gaspar</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000         - 19:34:13 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2363.html">
-					<strong>RE: Microsoft XML stuff</strong>
-				</a>&nbsp;<a name="2363">
-					<em>Paulo Gaspar</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000         - 19:36:37 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2364.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2364">
-					<em>Jim Driscoll</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000         - 20:25:44 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2365.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2365">
-					<em>Joe Polastre</em>
-				</a>&nbsp;<em>(Fri Jul 14 2000         - 20:41:21 MEST)</em>
-			</li>
-			<li>
-				<a href="http://xml-archive.webweaving.org/xml-archive-general/2366.html">
-					<strong>Re: [spinnaker] Announce</strong>
-				</a>&nbsp;<a name="2366">
-					<em>Scott Boag/CAM/Lotus</em>
-				</a>&nbsp;<em>(Fri Jul         14 2000 - 21:31:30 MEST)</em>
-			</li>
-		</mailHeaderSet>
-	</mailHeaderSets>
-</requirementCatalog>
diff --git a/proposals/XRI-requirements/issues.xsl b/proposals/XRI-requirements/issues.xsl
deleted file mode 100644
index 3bb032a..0000000
--- a/proposals/XRI-requirements/issues.xsl
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- define nbsp char entity for output -->
-<!DOCTYPE menu [
-	<!ENTITY nbsp "&#160;">
-]>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
-	<xsl:output media-type="text/html" encoding="UTF-8"/>
-	<xsl:template match="/">
-		<html>
-			<head>
-				<title>Proposed Xerces2 Requirements -  <xsl:value-of select="/requirementCatalog/@date"/>
-				</title>
-			</head>
-			<body bgcolor="#FFFFFF">
-				<h1>Proposed Xerces2 Requirements</h1>
-				<h4>Date: <xsl:value-of select="/requirementCatalog/@date"/>
-					<br/>
-  Editors: &nbsp;&nbsp;<a href="mailto:estaub@mediaone.net">Ed Staub</a>&nbsp;&nbsp;<a href="mailto:twleung@sauria.com">Ted Leung</a>
-				</h4>
-				<hr/>
-				<h2>Schema</h2>
-				<p>Proposed requirements are organized into categories. &nbsp;Some requirements 
-  occur in more than one category in the future.</p>
-				<p>Each requirement has a number. Underneath the number is a &quot;hardness&quot; 
-  and &quot;status&quot;.</p>
-				<dl>
-					<dt>Possible &quot;hardness&quot; values are:</dt>
-					<dd>
-						<b>hard</b> - Xerces2 must and shall meet this requirement<br/>
-						<b>soft</b> - Xerces2 should meet this requirement, but it may be dropped 
-    because of conflicting requirements or time pressures</dd>
-					<dt>
-						<br/>
-    Possible &quot;status&quot; values are:</dt>
-					<dd>
-						<span style="background-color:aquamarine"><b>approved</b> - there appears to be a clear consensus</span><br/>
-						<b>tooQuiet</b> - there may be a consensus, but there hasn't been enough 
-    input to be sure <br/>
-						<b>hardnessConflict</b> - there is conflict over whether this is a hard or 
-    soft requirement<b>
-							<br/>
-    vetoConflict</b> - there is a conflict over whether this proposed requirement 
-    is a requirement at all<br/>
-						<span style="background-color:silver"><b>rejected</b> - the proposed requirement appears to be dead</span><br/>
-						<b>unevaluated</b> - editor hasn't finished reviewing input
-					</dd>
-				</dl>
-				<hr/>
-				<xsl:apply-templates/>
-			</body>
-		</html>
-	</xsl:template>
-	<xsl:template match="requirementCatalog">
-		<xsl:call-template name="indexByNumber"/>
-		<xsl:apply-templates select="categories" mode="toc"/>
-		<xsl:apply-templates select="categories"/>
-	</xsl:template>
-	<!-- Table of contents -->
-	<xsl:template match="categories" mode="toc">
-		<h2>Requirement Categories</h2>
-		<xsl:for-each select="cat">
-			<a>
-				<xsl:attribute name="href">#cat.{.}</xsl:attribute>
-				<xsl:value-of select="."/>
-			</a>
-			<br/>
-		</xsl:for-each>
-		<hr/>
-	</xsl:template>
-	<xsl:template name="indexByNumber">
-		<h2>Requirements by Number</h2>
-		<xsl:for-each select="/requirementCatalog/requirements/req">
-			<a href="#req.{@id}">
-				<xsl:attribute name="style">
-				<xsl:choose>
-					<xsl:when test="@status='rejected'">background-color:silver</xsl:when>
-					<xsl:when test="@status='approved'">background-color:aquamarine</xsl:when>
-					<xsl:otherwise>background-color:snow</xsl:otherwise>
-				</xsl:choose>
-				</xsl:attribute>
-				<xsl:value-of select="@id"/>
-			</a>&nbsp;	&nbsp;
-			<xsl:value-of select="substring(def,1,120)"/>
-			<xsl:if test="string-length(def)>120">...</xsl:if>
-			<br/>
-			<xsl:if test="@id mod 5 = 0">
-				<br/>
-			</xsl:if>
-		</xsl:for-each>
-		<hr/>
-	</xsl:template>
-	<xsl:template match="categories">
-		<h2>Requirements by Category</h2>
-		<xsl:for-each select="cat">
-			<h3>
-				<a>
-					<xsl:attribute name="name">#cat.{.}</xsl:attribute>
-				</a>
-				<xsl:value-of select="."/>
-			</h3>
-			<table width="95%" border="1">
-				<xsl:for-each select="/requirementCatalog/requirements/req[@cat=current()]">
-					<xsl:apply-templates select="."/>
-				</xsl:for-each>
-			</table>
-		</xsl:for-each>
-	</xsl:template>
-	<xsl:template match="req">
-		<xsl:variable name="reqId" select="@id"/>
-		<tr>
-			<xsl:attribute name="bgcolor">
-				<xsl:choose>
-					<xsl:when test="@status='rejected'">silver</xsl:when>
-					<xsl:when test="@status='approved'">aquamarine</xsl:when>
-					<xsl:otherwise>snow</xsl:otherwise>
-				</xsl:choose>
-			</xsl:attribute>
-			<td valign="top">
-				<p>
-					<a>
-						<xsl:attribute name="name">req.<xsl:value-of select="$reqId"/></xsl:attribute>
-					</a>
-					<b>
-						<!--						<xsl:value-of select="@id"/>.</b> -->
-						<xsl:value-of select="$reqId"/>.</b>
-					<br/>
-        &nbsp;&nbsp;<xsl:value-of select="@strength"/>
-					<br/>
-        &nbsp;&nbsp;<xsl:value-of select="@status"/>
-				</p>
-			</td>
-			<td valign="top">
-				<p>
-					<b>
-						<xsl:copy-of select="def"/>
-					</b>
-				</p>
-				<blockquote>
-					<xsl:if test="seeAlso">
-						<p><xsl:apply-templates select="seeAlso"/></p>
-					</xsl:if>
-					<xsl:apply-templates select="voteSet"/>
-					<xsl:apply-templates select="edReqNote"/>
-					<xsl:if test="refs/ref">
-						<b><i>References</i></b>
-						<br/>
-					</xsl:if>
-					<xsl:apply-templates select="refs/ref"/>
-				</blockquote>
-			</td>
-		</tr>
-	</xsl:template>
-	<xsl:template match="voteSet">
-		<b>
-			<i>Voted</i>
-		</b> on from <xsl:value-of select="@opened"/> to <xsl:value-of select="@closed"/>.  Votes:
-	<ul>
-			<xsl:apply-templates select="vote"/>
-		</ul>
-	</xsl:template>
-	<xsl:template match="vote">
-		<li>
-			<a href="mailto:{@email}">
-				<xsl:value-of select="@voter"/>
-			</a>: <xsl:value-of select="@vote"/>
-			<xsl:apply-templates select="voteComment"/>
-		</li>
-	</xsl:template>
-	<xsl:template match="voteComment">
-		<blockquote>
-			<xsl:copy-of select="."/>
-		</blockquote>
-	</xsl:template>
-	<xsl:template match="seeAlso">
-		<xsl:if test="@type">
-			<xsl:value-of select="concat(@type,':')"/>
-		</xsl:if>
-		<xsl:if test="not(@type)">
-			See also:
-		</xsl:if>
-		<a href="#req.{@id}">
-			<xsl:value-of select="@id"/>
-		</a>&nbsp;&nbsp;
-	</xsl:template>
-	<xsl:template match="edReqNote">
-		<blockquote>
-			<i>Ed:</i>
-			<xsl:value-of select="."/>
-		</blockquote>
-	</xsl:template>
-	<xsl:template match="ref">
-		<p>
-			<xsl:if test="string(.)">"<xsl:copy-of select="."/>"<br/>
-			</xsl:if>
-			<xsl:apply-templates select="/requirementCatalog/mailHeaderSets/mailHeaderSet[@id=current()/@set]/li[a/@name=current()/@id]"/>
-		</p>
-	</xsl:template>
-	<xsl:template match="li">
-		<xsl:copy-of select="."/>
-	</xsl:template>
-	<xsl:template match="br">
-		<br/>
-	</xsl:template>
-	<xsl:template match="mailHeaderSets"/>
-</xsl:stylesheet>
diff --git a/samples/dom/ASBuilder.java b/samples/dom/ASBuilder.java
deleted file mode 100644
index a108e3f..0000000
--- a/samples/dom/ASBuilder.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom;
-
-import org.apache.xerces.dom3.DOMError;
-import org.apache.xerces.dom3.DOMErrorHandler;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import org.apache.xerces.dom.DOMImplementationImpl;
-import org.apache.xerces.dom3.as.DOMImplementationAS;
-import org.apache.xerces.dom3.as.ASModel;
-import org.apache.xerces.dom3.as.DOMASBuilder;
-
-import org.w3c.dom.DOMImplementation;
-import java.util.Vector;
-
-/**
- * This sample program illustrates how to use DOM3 DOMASBuilder interface to
- * preparse ASModels and associate ASModels with an instance document to be
- * validated.
- * <p>
- * Xerces only support preparsing XML Schema grammars, so all ASModel
- * appears in this sample program are assumed to be XML Schema grammars. When
- * Xerces provide more complete DOM AS support, the sample should be extended
- * for other types of grammars.
- * <p>
- * <p>
- * Since XML Schema document might import other schemas: it is better to set each 
- * parsed schema (ASModel)  on the parser before parsing another schema document. 
- * The schema on the parser will be used in the case it is referenced from a 
- * schema document the parser is parsing.
- * If a schema document imports other schemas, the parser returns a container ASModel that
- * includes the list of all schemas that are referenced plus the schema that was set
- * on the parser.
- * NOTE: this behavior might be changed
- * 
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class ASBuilder implements DOMErrorHandler {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // default settings
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // too fee parameters
-        if (argv.length < 4) {
-            printUsage();
-            System.exit(1);
-        }
-        // get DOM implementation
-        DOMImplementationAS domImpl = (DOMImplementationAS)DOMImplementationImpl.getDOMImplementation();
-        // create a new parser, and set the error handler
-        DOMASBuilder parser = domImpl.createDOMASBuilder();
-        parser.setErrorHandler(new ASBuilder());
-
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-
-        String arg = null;
-        int i = 0;
-
-        // process -f/F
-        arg = argv[i];
-        if (arg.equals("-f")) {
-            schemaFullChecking = true;
-            arg = argv[++i];
-        } else if (arg.equals("-F")) {
-            schemaFullChecking = false;
-            arg = argv[++i];
-        }
-
-        // set the features. since we only deal with schema, some features have
-        // to be true
-        parser.setFeature(NAMESPACES_FEATURE_ID, true);
-        parser.setFeature(VALIDATION_FEATURE_ID, true);
-        parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
-        parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-
-        // process -a: as model files
-        if (!arg.equals("-a")) {
-            printUsage();
-            System.exit(1);
-        }
-
-        i++;
-        Vector asfiles = new Vector();
-        while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
-            asfiles.addElement(arg);
-            i++;
-        }
-
-        // has to be at least one as file, and there has to be other parameters
-        if (asfiles.size() == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // process -i: instance files, if any
-        Vector ifiles = null;
-        if (i < argv.length) {
-            if (!arg.equals("-i")) {
-                printUsage();
-                System.exit(1);
-            }
-
-            i++;
-            ifiles = new Vector();
-            while (i < argv.length && !(arg = argv[i]).startsWith("-")) {
-                ifiles.addElement(arg);
-                i++;
-            }
-
-            // has to be at least one instance file, and there has to be no more
-            // parameters
-            if (ifiles.size() == 0 || i != argv.length) {
-                printUsage();
-                System.exit(1);
-            }
-        }
-
-        //
-        // PARSING XML SCHEMAS
-        //
-
-        try {
-            ASModel asmodel = null;
-            for (i = 0; i < asfiles.size(); i++) {
-                asmodel = parser.parseASURI((String)asfiles.elementAt(i));
-                parser.setAbstractSchema(asmodel);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            System.exit(1);
-        }
-
-        // then for each instance file, try to validate it
-        if (ifiles != null) {
-            try {
-                for (i = 0; i < ifiles.size(); i++) {
-                    parser.parseURI((String)ifiles.elementAt(i));
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-                System.exit(1);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java dom.ASBuilder [-f|-F] -a uri ... [-i uri ...]");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -f  | -F    Turn on/off Schema full checking.");
-        System.err.println("  -a uri ...  Provide a list of schema documents.");
-        System.err.println("  -i uri ...  Provide a list of instalce documents to validate.");
-        System.err.println();
-
-        System.err.println("default:");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-        System.err.println();
-        System.err.println("notes:");
-        System.err.println("DOM Level 3 APIs might change in the future.");
-
-
-    } // printUsage()
-
-    public boolean handleError(DOMError error) {
-
-        System.err.print("[");
-        switch (error.getSeverity()) {
-            case DOMError.SEVERITY_WARNING:
-                System.err.print("Warning");
-                break;
-            case DOMError.SEVERITY_ERROR:
-                System.err.print("Error");
-                break;
-            case DOMError.SEVERITY_FATAL_ERROR:
-                System.err.print("Fatal Error");
-                break;
-        }
-        System.err.print("] ");
-
-        String systemId = error.getLocation().getUri();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(error.getLocation().getLineNumber());
-        System.err.print(':');
-        System.err.print(error.getLocation().getColumnNumber());
-        System.err.print(": ");
-        System.err.print(error.getMessage());
-        System.err.println();
-        System.err.flush();
-
-        return error.getSeverity() != DOMError.SEVERITY_FATAL_ERROR;
-    }
-
-} // class DOMCount
diff --git a/samples/dom/Counter.java b/samples/dom/Counter.java
deleted file mode 100644
index e8d77e4..0000000
--- a/samples/dom/Counter.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom;
-
-import java.io.PrintWriter;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * A sample DOM counter. This sample program illustrates how to
- * traverse a DOM tree in order to get information about the document.
- * The output of this program shows the time and count of elements,
- * attributes, ignorable whitespaces, and characters appearing in
- * the document. Three times are shown: the parse time, the first
- * traversal of the document, and the second traversal of the tree.
- * <p>
- * This class is useful as a "poor-man's" performance tester to
- * compare the speed and accuracy of various DOM parsers. However,
- * it is important to note that the first parse time of a parser
- * will include both VM class load time and parser initialization
- * that would not be present in subsequent parses with the same
- * file.
- * <p>
- * <strong>Note:</strong> The results produced by this program
- * should never be accepted as true performance measurements.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class Counter {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // default settings
-
-    /** Default parser name (dom.wrappers.Xerces). */
-    protected static final String DEFAULT_PARSER_NAME = "dom.wrappers.Xerces";
-
-    /** Default repetition (1). */
-    protected static final int DEFAULT_REPETITION = 1;
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default namespace prefixes (false). */
-    protected static final boolean DEFAULT_NAMESPACE_PREFIXES = false;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    //
-    // Data
-    //
-
-    /** Number of elements. */
-    protected long fElements;
-
-    /** Number of attributes. */
-    protected long fAttributes;
-
-    /** Number of characters. */
-    protected long fCharacters;
-
-    /** Number of ignorable whitespace characters. */
-    protected long fIgnorableWhitespace;
-
-    /** Document information. */
-    protected ParserWrapper.DocumentInfo fDocumentInfo;
-
-    //
-    // Public methods
-    //
-
-    /** Sets the parser wrapper. */
-    public void setDocumentInfo(ParserWrapper.DocumentInfo documentInfo) {
-        fDocumentInfo = documentInfo;
-    } // setDocumentInfo(ParserWrapper.DocumentInfo)
-
-    /** Traverses the specified node, recursively. */
-    public void count(Node node) {
-
-        // is there anything to do?
-        if (node == null) {
-            return;
-        }
-
-        int type = node.getNodeType();
-        switch (type) {
-            case Node.DOCUMENT_NODE: {
-                fElements = 0;
-                fAttributes = 0;
-                fCharacters = 0;
-                fIgnorableWhitespace = 0;
-                Document document = (Document)node;
-                count(document.getDocumentElement());
-                break;
-            }
-
-            case Node.ELEMENT_NODE: {
-                fElements++;
-                NamedNodeMap attrs = node.getAttributes();
-                if (attrs != null) {
-                    fAttributes += attrs.getLength();
-                }
-                // drop through to entity reference
-            }
-
-            case Node.ENTITY_REFERENCE_NODE: {
-                Node child = node.getFirstChild();
-                while (child != null) {
-                    count(child);
-                    child = child.getNextSibling();
-                }
-                break;
-            }
-
-            case Node.CDATA_SECTION_NODE: {
-                fCharacters += ((Text)node).getLength();
-                break;
-            }
-
-            case Node.TEXT_NODE: {
-                if (fDocumentInfo != null) {
-                    Text text = (Text)node;
-                    int length = text.getLength();
-                    if (fDocumentInfo.isIgnorableWhitespace(text)) {
-                        fIgnorableWhitespace += length;
-                    }
-                    else {
-                        fCharacters += length;
-                    }
-                }
-                break;
-            }
-        }
-
-    } // count(Node)
-
-    /** Prints the results. */
-    public void printResults(PrintWriter out, String uri,
-                             long parse, long traverse1, long traverse2,
-                             int repetition) {
-
-        // filename.xml: 631/200/100 ms (4 elems, 0 attrs, 78 spaces, 0 chars)
-        out.print(uri);
-        out.print(": ");
-        if (repetition == 1) {
-            out.print(parse);
-        }
-        else {
-            out.print(parse);
-            out.print('/');
-            out.print(repetition);
-            out.print('=');
-            out.print(parse/repetition);
-        }
-        out.print(';');
-        out.print(traverse1);
-        out.print(';');
-        out.print(traverse2);
-        out.print(" ms (");
-        out.print(fElements);
-        out.print(" elems, ");
-        out.print(fAttributes);
-        out.print(" attrs, ");
-        out.print(fIgnorableWhitespace);
-        out.print(" spaces, ");
-        out.print(fCharacters);
-        out.print(" chars)");
-        out.println();
-        out.flush();
-
-    } // printResults(PrintWriter,String,long,long,long)
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        Counter counter = new Counter();
-        PrintWriter out = new PrintWriter(System.out);
-        ParserWrapper parser = null;
-        int repetition = DEFAULT_REPETITION;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parser = (ParserWrapper)Class.forName(parserName).newInstance();
-                    }
-                    catch (Exception e) {
-                        parser = null;
-                        System.err.println("error: Unable to instantiate parser ("+parserName+")");
-                    }
-                    continue;
-                }
-                if (option.equals("x")) {
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -x option.");
-                        continue;
-                    }
-                    String number = argv[i];
-                    try {
-                        int value = Integer.parseInt(number);
-                        if (value < 1) {
-                            System.err.println("error: Repetition must be at least 1.");
-                            continue;
-                        }
-                        repetition = value;
-                    }
-                    catch (NumberFormatException e) {
-                        System.err.println("error: invalid number ("+number+").");
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parser == null) {
-
-                // create parser
-                try {
-                    parser = (ParserWrapper)Class.forName(DEFAULT_PARSER_NAME).newInstance();
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            try {
-                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-            }
-
-            // parse file
-            try {
-                long beforeParse = System.currentTimeMillis();
-                Document document = null;
-                for (int j = 0; j < repetition; j++) {
-                    document = parser.parse(arg);
-                }
-                long afterParse = System.currentTimeMillis();
-                long parse = afterParse - beforeParse;
-
-                ParserWrapper.DocumentInfo documentInfo = parser.getDocumentInfo();
-                counter.setDocumentInfo(documentInfo);
-
-                long beforeTraverse1 = System.currentTimeMillis();
-                counter.count(document);
-                long afterTraverse1 = System.currentTimeMillis();
-                long traverse1 = afterTraverse1 - beforeTraverse1;
-
-                long beforeTraverse2 = System.currentTimeMillis();
-                counter.count(document);
-                long afterTraverse2 = System.currentTimeMillis();
-                long traverse2 = afterTraverse2 - beforeTraverse2;
-                counter.printResults(out, arg, parse, traverse1, traverse2,
-                                     repetition);
-            }
-            catch (SAXParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                Exception se = e;
-                if (e instanceof SAXException) {
-                    se = ((SAXException)e).getException();
-                }
-                if (se != null)
-                  se.printStackTrace(System.err);
-                else
-                  e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java dom.Counter (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name     Select parser by name.");
-        System.err.println("  -x number   Select number of repetitions.");
-        System.err.println("  -n  | -N    Turn on/off namespace processing.");
-        System.err.println("  -np | -NP   Turn on/off namespace prefixes.");
-        System.err.println("              NOTE: Requires use of -n.");
-        System.err.println("  -v  | -V    Turn on/off validation.");
-        System.err.println("  -s  | -S    Turn on/off Schema validation support.");
-        System.err.println("              NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F    Turn on/off Schema full checking.");
-        System.err.println("              NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -h          This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.err.println("  Parser:     "+DEFAULT_PARSER_NAME);
-        System.err.println("  Repetition: "+DEFAULT_REPETITION);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Prefixes:   ");
-        System.err.println(DEFAULT_NAMESPACE_PREFIXES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-
-    } // printUsage()
-
-} // class DOMCount
diff --git a/samples/dom/DOMAddLines.java b/samples/dom/DOMAddLines.java
deleted file mode 100644
index 836d2b6..0000000
--- a/samples/dom/DOMAddLines.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom;                    
-
-import java.io.*;
-
-import org.apache.xerces.dom.NodeImpl;
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLString;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.NamedNodeMap;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.*;
-
-/**
- * A sample of Adding lines to the DOM Node. This sample program illustrates:
- * - How to override methods from  DocumentHandler ( XMLDocumentHandler) 
- * - How to turn off ignorable white spaces by overriding ignorableWhiteSpace
- * - How to use the SAX Locator to return row position ( line number of DOM element).
- * - How to attach user defined Objects to Nodes using method setUserData
- * This example relies on the following:
- * - Turning off the "fast" DOM so we can use set expansion to FULL 
- * @version $Id$
- */
-
-public class DOMAddLines extends DOMParser  {
-
-   /** Print writer. */
-   private PrintWriter out;
-   static private boolean NotIncludeIgnorableWhiteSpaces = false; 
-
-
-   public DOMAddLines( String inputName ) {
-      //fNodeExpansion = FULL; // faster than: this.setFeature("http://apache.org/xml/features/defer-node-expansion", false);
-
-      try {                        
-         this.setFeature( "http://apache.org/xml/features/dom/defer-node-expansion", false ); 
-         this.parse( inputName );
-         out = new PrintWriter(new OutputStreamWriter(System.out, "UTF8"));
-      } catch ( IOException e ) {
-         System.err.println( "except" + e );
-      } catch ( org.xml.sax.SAXException e ) {
-         System.err.println( "except" + e );
-      }
-   } // constructor
-
-   /** Prints the specified node, recursively. */
-   public void print(Node node) {
-      // is there anything to do?
-      if ( node == null ) {
-         return;
-      }
-
-      String lineRowColumn = (String ) ((NodeImpl) node).getUserData();
-
-      int type = node.getNodeType();
-      switch ( type ) {
-         // print document
-         case Node.DOCUMENT_NODE: {
-               out.println(  lineRowColumn + ":" + "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
-               print( ((Document)node).getDocumentElement());
-               out.flush();
-               break;
-            }
-
-            // print element with attributes
-         case Node.ELEMENT_NODE: {
-               out.print( lineRowColumn + ":" + '<');
-               out.print(node.getNodeName());
-               Attr attrs[] = sortAttributes(node.getAttributes());
-               for ( int i = 0; i < attrs.length; i++ ) {
-                  Attr attr = attrs[i];
-                  out.print(' ');
-                  out.print(attr.getNodeName());
-                  out.print("=\"");
-                  out.print( attr.getNodeValue());
-                  out.print('"');
-               }
-               out.print('>');
-               NodeList children = node.getChildNodes();
-               if ( children != null ) {
-                  int len = children.getLength();
-                  for ( int i = 0; i < len; i++ ) {
-                     print(children.item(i));
-                  }
-               }
-               break;
-            }
-
-            // handle entity reference nodes
-         case Node.ENTITY_REFERENCE_NODE: {
-               out.print('&');
-               out.print(node.getNodeName());
-               out.print(';');
-               break;
-            }
-
-            // print cdata sections
-         case Node.CDATA_SECTION_NODE: {
-               out.print("<![CDATA[");
-               out.print(node.getNodeValue());
-               out.print("]]>");
-               break;
-            }
-
-            // print text
-         case Node.TEXT_NODE: {
-               out.print(  node.getNodeValue());
-               break;
-            }
-
-            // print processing instruction
-         case Node.PROCESSING_INSTRUCTION_NODE: {
-               out.print("<?");
-               out.print(node.getNodeName());
-               String data = node.getNodeValue();
-               if ( data != null && data.length() > 0 ) {
-                  out.print(' ');
-                  out.print(data);
-               }
-               out.print("?>");
-               break;
-            }
-      }
-
-      if ( type == Node.ELEMENT_NODE ) {
-         out.print("</");
-         out.print(node.getNodeName());
-         out.print('>');
-      }
-
-      out.flush();
-
-   } // print(Node)
-
-
-   /** Returns a sorted list of attributes. */
-   private Attr[] sortAttributes(NamedNodeMap attrs) {
-
-      int len = (attrs != null) ? attrs.getLength() : 0;
-      Attr array[] = new Attr[len];
-      for ( int i = 0; i < len; i++ ) {
-         array[i] = (Attr)attrs.item(i);
-      }
-      for ( int i = 0; i < len - 1; i++ ) {
-         String name  = array[i].getNodeName();
-         int    index = i;
-         for ( int j = i + 1; j < len; j++ ) {
-            String curName = array[j].getNodeName();
-            if ( curName.compareTo(name) < 0 ) {
-               name  = curName;
-               index = j;
-            }
-         }
-         if ( index != i ) {
-            Attr temp    = array[i];
-            array[i]     = array[index];
-            array[index] = temp;
-         }
-      }
-
-      return (array);
-
-   } // sortAttributes(NamedNodeMap):Attr[]
-
-   /* Methods that we override */
-
-   /*   We override startElement callback  from DocumentHandler */
-
-   public void startElement(QName elementQName, XMLAttributes attrList) 
-    throws SAXException {
-      super.startElement(elementQName, attrList);
-
-      NodeImpl node = null;
-      try {
-      node = (NodeImpl) this.getProperty( "http://apache.org/xml/properties/dom/current-element-node" );
-      //System.out.println( "The node = " + node );  TODO JEFF
-      }
-      catch( org.xml.sax.SAXException ex )
-      {
-          System.err.println( "except" + ex );;
-      }
-      //NodeImpl node = (NodeImpl)getCurrentNode();       // Get current node
-      if( node != null )
-          node.setUserData(  String.valueOf( fEntityManager.getEntityScanner().getLineNumber() ) ); // Save location String into node
-   } //startElement 
-
-   /* We override startDocument callback from DocumentHandler */
-
-   public void startDocument() throws SAXException {
-     //super.startDocument( versionIndex, encodingIndex,
-     //                               standAloneIndex);
-     super.startDocument();
-     NodeImpl node = null ;
-      try {
-      node = (NodeImpl) this.getProperty( "http://apache.org/xml/properties/dom/current-element-node" );
-      //System.out.println( "The node = " + node );
-      }
-     catch( org.xml.sax.SAXException ex )
-      {
-        System.err.println( "except" + ex );;
-      }
-     
-//     NodeImpl node = (NodeImpl)getCurrentNode();       // Get current node
-     if( node != null )
-          node.setUserData(  String.valueOf( fEntityManager.getEntityScanner().getLineNumber() ) ); // Save location String into node
-  } //startDocument 
-   
-
-   public void ignorableWhitespace(XMLString text) throws SAXException
-    {
-    if(! NotIncludeIgnorableWhiteSpaces )
-       super.ignorableWhitespace( text);
-    else
-       ;// Ignore ignorable white spaces
-    }// ignorableWhitespace
-   
-
-
-   //
-   // Main
-   //
-
-   /** Main program entry point. */
-   public static void main(String argv[]) {
-      // is there anything to do?
-      if ( argv.length == 0 ) {
-         printUsage();
-         System.exit(1);
-      }
-      // check parameters
-
-      for ( int i = 0; i < argv.length; i++ ) {
-         String arg = argv[i];
-
-         // options
-         if ( arg.startsWith("-") ) {
-            if ( arg.equals("-h") ) {
-               printUsage();
-               System.exit(1);
-            }
-            if (arg.equals("-i")) {
-                   NotIncludeIgnorableWhiteSpaces = true;
-                   continue;
-               }
-            
-         }
-      // DOMAddLine parse and print
-
-      DOMAddLines domAddExample = new DOMAddLines( arg );
-      Document doc             = domAddExample.getDocument();
-      domAddExample.print( doc );
-
-     }
-   } // main(String[])
-
-   /** Prints the usage. */
-   private static void printUsage() {
-      System.err.println("usage: jre dom.DOMAddLines uri ...");
-      System.err.println();
-      System.err.println("  -h       This help screen.");
-      System.err.println("  -i       don't print ignorable white spaces");
-
-   } // printUsage()
-
-}
diff --git a/samples/dom/DOMGenerate.java b/samples/dom/DOMGenerate.java
deleted file mode 100644
index e6a2226..0000000
--- a/samples/dom/DOMGenerate.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-
-package dom;
-import  org.w3c.dom.*;
-import  org.apache.xerces.dom.DocumentImpl;
-import  org.apache.xerces.dom.DOMImplementationImpl;
-import  org.w3c.dom.Document;
-import  org.apache.xml.serialize.OutputFormat;
-import  org.apache.xml.serialize.Serializer;
-import  org.apache.xml.serialize.SerializerFactory;
-import  org.apache.xml.serialize.XMLSerializer;
-import  java.io.*;
-
-/**
- * Simple Sample that:
- * - Generate a DOM from Scratch.
- * - Output DOM to a String using Serializer
- * @author Jeffrey Rodriguez
- * @version $Id$
- */
-public class DOMGenerate {
-    public static void main( String[] argv ) {
-        try {
-            Document doc= new DocumentImpl();
-            Element root = doc.createElement("person");     // Create Root Element
-            Element item = doc.createElement("name");       // Create element
-            item.appendChild( doc.createTextNode("Jeff") );
-            root.appendChild( item );                       // atach element to Root element
-            item = doc.createElement("age");                // Create another Element
-            item.appendChild( doc.createTextNode("28" ) );       
-            root.appendChild( item );                       // Attach Element to previous element down tree
-            item = doc.createElement("height");            
-            item.appendChild( doc.createTextNode("1.80" ) );
-            root.appendChild( item );                       // Attach another Element - grandaugther
-            doc.appendChild( root );                        // Add Root to Document
-
-
-            OutputFormat    format  = new OutputFormat( doc );   //Serialize DOM
-            StringWriter  stringOut = new StringWriter();        //Writer will be a String
-            XMLSerializer    serial = new XMLSerializer( stringOut, format );
-            serial.asDOMSerializer();                            // As a DOM Serializer
-
-            serial.serialize( doc.getDocumentElement() );
-
-            System.out.println( "STRXML = " + stringOut.toString() ); //Spit out DOM as a String
-        } catch ( Exception ex ) {
-            ex.printStackTrace();
-        }
-    }
-}
-
diff --git a/samples/dom/GetElementsByTagName.java b/samples/dom/GetElementsByTagName.java
deleted file mode 100644
index 27ce5bc..0000000
--- a/samples/dom/GetElementsByTagName.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom;
-
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-
-/**
- * A sample DOM filter. This sample program illustrates how to
- * use the Document#getElementsByTagName() method to quickly
- * and easily locate elements by name.
- *
- * @author Jeffrey Rodriguez, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class GetElementsByTagName {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // default settings
-
-    /** Default parser name (dom.wrappers.Xerces). */
-    protected static final String DEFAULT_PARSER_NAME = "dom.wrappers.Xerces";
-
-    /** Default element name (*). */
-    protected static final String DEFAULT_ELEMENT_NAME = "*";
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    //
-    // Public static methods
-    //
-
-    /** Prints the specified elements in the given document. */
-    public static void print(PrintWriter out, Document document,
-                             String elementName, String attributeName) {
-
-        // get elements that match
-        NodeList elements = document.getElementsByTagName(elementName);
-
-        // is there anything to do?
-        if (elements == null) {
-            return;
-        }
-
-        // print all elements
-        if (attributeName == null) {
-            int elementCount = elements.getLength();
-            for (int i = 0; i < elementCount; i++) {
-                Element element = (Element)elements.item(i);
-                print(out, element, element.getAttributes());
-            }
-        }
-
-        // print elements with given attribute name
-        else {
-            int elementCount = elements.getLength();
-            for (int i = 0; i < elementCount; i++) {
-                Element      element    = (Element)elements.item(i);
-                NamedNodeMap attributes = element.getAttributes();
-                if (attributes.getNamedItem(attributeName) != null) {
-                    print(out, element, attributes);
-                }
-            }
-        }
-
-    } // print(PrintWriter,Document,String,String)
-
-    //
-    // Protected static methods
-    //
-
-    /** Prints the specified element. */
-    protected static void print(PrintWriter out,
-                                Element element, NamedNodeMap attributes) {
-
-        out.print('<');
-        out.print(element.getNodeName());
-        if (attributes != null) {
-            int attributeCount = attributes.getLength();
-            for (int i = 0; i < attributeCount; i++) {
-                Attr attribute = (Attr)attributes.item(i);
-                out.print(' ');
-                out.print(attribute.getNodeName());
-                out.print("=\"");
-                out.print(normalize(attribute.getNodeValue()));
-                out.print('"');
-            }
-        }
-        out.println('>');
-        out.flush();
-
-    } // print(PrintWriter,Element,NamedNodeMap)
-
-    /** Normalizes the given string. */
-    protected static String normalize(String s) {
-        StringBuffer str = new StringBuffer();
-
-        int len = (s != null) ? s.length() : 0;
-        for (int i = 0; i < len; i++) {
-            char ch = s.charAt(i);
-            switch (ch) {
-            case '<': {
-                    str.append("&lt;");
-                    break;
-                }
-            case '>': {
-                    str.append("&gt;");
-                    break;
-                }
-            case '&': {
-                    str.append("&amp;");
-                    break;
-                }
-            case '"': {
-                    str.append("&quot;");
-                    break;
-                }
-            case '\r':
-            case '\n': {
-                    str.append("&#");
-                    str.append(Integer.toString(ch));
-                    str.append(';');
-                    break;
-                }
-            default: {
-                    str.append(ch);
-                }
-            }
-        }
-
-        return str.toString();
-
-    } // normalize(String):String
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        Counter counter = new Counter();
-        PrintWriter out = new PrintWriter(System.out);
-        ParserWrapper parser = null;
-        String elementName = DEFAULT_ELEMENT_NAME;
-        String attributeName = null;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parser = (ParserWrapper)Class.forName(parserName).newInstance();
-                    }
-                    catch (Exception e) {
-                        parser = null;
-                        System.err.println("error: Unable to instantiate parser ("+parserName+")");
-                    }
-                    continue;
-                }
-                if (option.equals("e")) {
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -e option.");
-                    }
-                    elementName = argv[i];
-                    continue;
-                }
-                if (option.equals("a")) {
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -a option.");
-                    }
-                    attributeName = argv[i];
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parser == null) {
-
-                // create parser
-                try {
-                    parser = (ParserWrapper)Class.forName(DEFAULT_PARSER_NAME).newInstance();
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            try {
-                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-            }
-
-            // parse file
-            try {
-                Document document = parser.parse(arg);
-                GetElementsByTagName.print(out, document, elementName, attributeName);
-            }
-            catch (SAXParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof SAXException) {
-                    e = ((SAXException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java dom.GetElementsByTagName (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name  Select parser by name.");
-        System.err.println("  -e name  Specify element name for search.");
-        System.err.println("  -a name  Specify attribute name for specified elements.");
-        System.err.println("  -n | -N  Turn on/off namespace processing.");
-        System.err.println("  -v | -V  Turn on/off validation.");
-        System.err.println("  -s | -S  Turn on/off Schema validation support.");
-        System.err.println("           NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F Turn on/off Schema full checking.");
-        System.err.println("           NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -h       This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.err.println("  Parser:     "+DEFAULT_PARSER_NAME);
-        System.err.println("  Element:    "+DEFAULT_ELEMENT_NAME);
-        System.out.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.out.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.out.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-
-    } // printUsage()
-
-} // class GetElementsByTagName
diff --git a/samples/dom/ParserWrapper.java b/samples/dom/ParserWrapper.java
deleted file mode 100644
index 5b26b4b..0000000
--- a/samples/dom/ParserWrapper.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Text;
-
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-/**
- * Encapsulates a DOM parser.
- *
- * @version $Id$
- */
-public interface ParserWrapper {
-
-    //
-    // ParserWrapper methods
-    //
-
-    /** Parses the specified URI and returns the document. */
-    public Document parse(String uri) throws Exception;
-
-    /**
-     * Set the state of a feature.
-     *
-     * Set the state of any feature in a SAX2 parser.  The parser
-     * might not recognize the feature, and if it does recognize
-     * it, it might not be able to fulfill the request.
-     *
-     * @param featureId The unique identifier (URI) of the feature.
-     * @param state The requested state of the feature (true or false).
-     *
-     * @exception org.xml.sax.SAXNotRecognizedException If the
-     *            requested feature is not known.
-     * @exception org.xml.sax.SAXNotSupportedException If the
-     *            requested feature is known, but the requested
-     *            state is not supported.
-     * @exception org.xml.sax.SAXException If there is any other
-     *            problem fulfilling the request.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws  SAXNotRecognizedException, SAXNotSupportedException; 
-
-    /** Returns the document information. */
-    public DocumentInfo getDocumentInfo();
-
-    //
-    // Interfaces
-    //
-
-    /**
-     * This interface is here to query information about the document
-     * implementation returned by the <code>ParserWrapper#parse</code>
-     * method.
-     *
-     * @author Andy Clark, IBM
-     */
-    public interface DocumentInfo {
-
-        //
-        // DocumentInfo methods
-        //
-
-        /** 
-         * Returns true if the specified text node is ignorable whitespace. 
-         */
-        public boolean isIgnorableWhitespace(Text text);
-
-    } // interface DocumentInfo
-
-} // interface ParserWrapper
diff --git a/samples/dom/Writer.java b/samples/dom/Writer.java
deleted file mode 100644
index a842580..0000000
--- a/samples/dom/Writer.java
+++ /dev/null
@@ -1,571 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * A sample DOM writer. This sample program illustrates how to
- * traverse a DOM tree in order to print a document that is parsed.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class Writer {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // property ids
-
-    /** Lexical handler property id (http://xml.org/sax/properties/lexical-handler). */
-    protected static final String LEXICAL_HANDLER_PROPERTY_ID = "http://xml.org/sax/properties/lexical-handler";
-
-    // default settings
-
-    /** Default parser name. */
-    protected static final String DEFAULT_PARSER_NAME = "dom.wrappers.Xerces";
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    /** Default canonical output (false). */
-    protected static final boolean DEFAULT_CANONICAL = false;
-
-    //
-    // Data
-    //
-
-    /** Print writer. */
-    protected PrintWriter fOut;
-
-    /** Canonical output. */
-    protected boolean fCanonical;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public Writer() {
-    } // <init>()
-
-    public Writer(boolean canonical) {
-        fCanonical = canonical;
-    } // <init>(boolean)
-
-    //
-    // Public methods
-    //
-
-    /** Sets whether output is canonical. */
-    public void setCanonical(boolean canonical) {
-        fCanonical = canonical;
-    } // setCanonical(boolean)
-
-    /** Sets the output stream for printing. */
-    public void setOutput(OutputStream stream, String encoding)
-        throws UnsupportedEncodingException {
-
-        if (encoding == null) {
-            encoding = "UTF8";
-        }
-
-        java.io.Writer writer = new OutputStreamWriter(stream, encoding);
-        fOut = new PrintWriter(writer);
-
-    } // setOutput(OutputStream,String)
-
-    /** Sets the output writer. */
-    public void setOutput(java.io.Writer writer) {
-
-        fOut = writer instanceof PrintWriter
-             ? (PrintWriter)writer : new PrintWriter(writer);
-
-    } // setOutput(java.io.Writer)
-
-    /** Writes the specified node, recursively. */
-    public void write(Node node) {
-
-        // is there anything to do?
-        if (node == null) {
-            return;
-        }
-
-        short type = node.getNodeType();
-        switch (type) {
-            case Node.DOCUMENT_NODE: {
-                Document document = (Document)node;
-                if (!fCanonical) {
-                    fOut.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
-                    fOut.flush();
-                    write(document.getDoctype());
-                }
-                write(document.getDocumentElement());
-                break;
-            }
-
-            case Node.DOCUMENT_TYPE_NODE: {
-                DocumentType doctype = (DocumentType)node;
-                fOut.print("<!DOCTYPE ");
-                fOut.print(doctype.getName());
-                String publicId = doctype.getPublicId();
-                String systemId = doctype.getSystemId();
-                if (publicId != null) {
-                    fOut.print(" PUBLIC '");
-                    fOut.print(publicId);
-                    fOut.print("' '");
-                    fOut.print(systemId);
-                    fOut.print('\'');
-                }
-                else {
-                    fOut.print(" SYSTEM '");
-                    fOut.print(systemId);
-                    fOut.print('\'');
-                }
-                String internalSubset = doctype.getInternalSubset();
-                if (internalSubset != null) {
-                    fOut.println(" [");
-                    fOut.print(internalSubset);
-                    fOut.print(']');
-                }
-                fOut.println('>');
-                break;
-            }
-
-            case Node.ELEMENT_NODE: {
-                fOut.print('<');
-                fOut.print(node.getNodeName());
-                Attr attrs[] = sortAttributes(node.getAttributes());
-                for (int i = 0; i < attrs.length; i++) {
-                    Attr attr = attrs[i];
-                    fOut.print(' ');
-                    fOut.print(attr.getNodeName());
-                    fOut.print("=\"");
-                    normalizeAndPrint(attr.getNodeValue());
-                    fOut.print('"');
-                }
-                fOut.print('>');
-                fOut.flush();
-
-                Node child = node.getFirstChild();
-                while (child != null) {
-                    write(child);
-                    child = child.getNextSibling();
-                }
-                break;
-            }
-
-            case Node.ENTITY_REFERENCE_NODE: {
-                if (fCanonical) {
-                    Node child = node.getFirstChild();
-                    while (child != null) {
-                        write(child);
-                        child = child.getNextSibling();
-                    }
-                }
-                else {
-                    fOut.print('&');
-                    fOut.print(node.getNodeName());
-                    fOut.print(';');
-                    fOut.flush();
-                }
-                break;
-            }
-
-            case Node.CDATA_SECTION_NODE: {
-                if (fCanonical) {
-                    normalizeAndPrint(node.getNodeValue());
-                }
-                else {
-                    fOut.print("<![CDATA[");
-                    fOut.print(node.getNodeValue());
-                    fOut.print("]]>");
-                }
-                fOut.flush();
-                break;
-            }
-
-            case Node.TEXT_NODE: {
-                normalizeAndPrint(node.getNodeValue());
-                fOut.flush();
-                break;
-            }
-
-            case Node.PROCESSING_INSTRUCTION_NODE: {
-                fOut.print("<?");
-                fOut.print(node.getNodeName());
-                String data = node.getNodeValue();
-                if (data != null && data.length() > 0) {
-                    fOut.print(' ');
-                    fOut.print(data);
-                }
-                fOut.println("?>");
-                fOut.flush();
-                break;
-            }
-        }
-
-        if (type == Node.ELEMENT_NODE) {
-            fOut.print("</");
-            fOut.print(node.getNodeName());
-            fOut.print('>');
-            fOut.flush();
-        }
-
-    } // write(Node)
-
-    /** Returns a sorted list of attributes. */
-    protected Attr[] sortAttributes(NamedNodeMap attrs) {
-
-        int len = (attrs != null) ? attrs.getLength() : 0;
-        Attr array[] = new Attr[len];
-        for (int i = 0; i < len; i++) {
-            array[i] = (Attr)attrs.item(i);
-        }
-        for (int i = 0; i < len - 1; i++) {
-            String name = array[i].getNodeName();
-            int index = i;
-            for (int j = i + 1; j < len; j++) {
-                String curName = array[j].getNodeName();
-                if (curName.compareTo(name) < 0) {
-                    name = curName;
-                    index = j;
-                }
-            }
-            if (index != i) {
-                Attr temp = array[i];
-                array[i] = array[index];
-                array[index] = temp;
-            }
-        }
-
-        return array;
-
-    } // sortAttributes(NamedNodeMap):Attr[]
-
-    //
-    // Protected methods
-    //
-
-    /** Normalizes and prints the given string. */
-    protected void normalizeAndPrint(String s) {
-
-        int len = (s != null) ? s.length() : 0;
-        for (int i = 0; i < len; i++) {
-            char c = s.charAt(i);
-            normalizeAndPrint(c);
-        }
-
-    } // normalizeAndPrint(String)
-
-    /** Normalizes and print the given character. */
-    protected void normalizeAndPrint(char c) {
-
-        switch (c) {
-            case '<': {
-                fOut.print("&lt;");
-                break;
-            }
-            case '>': {
-                fOut.print("&gt;");
-                break;
-            }
-            case '&': {
-                fOut.print("&amp;");
-                break;
-            }
-            case '"': {
-                fOut.print("&quot;");
-                break;
-            }
-            case '\r':
-            case '\n': {
-                if (fCanonical) {
-                    fOut.print("&#");
-                    fOut.print(Integer.toString(c));
-                    fOut.print(';');
-                    break;
-                }
-                // else, default print char
-            }
-            default: {
-                fOut.print(c);
-            }
-        }
-
-    } // normalizeAndPrint(char)
-
-    //
-    // Main
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        Writer writer = null;
-        ParserWrapper parser = null;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-        boolean canonical = DEFAULT_CANONICAL;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parser = (ParserWrapper)Class.forName(parserName).newInstance();
-                    }
-                    catch (Exception e) {
-                        parser = null;
-                        System.err.println("error: Unable to instantiate parser ("+parserName+")");
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("c")) {
-                    canonical = option.equals("c");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parser == null) {
-
-                // create parser
-                try {
-                    parser = (ParserWrapper)Class.forName(DEFAULT_PARSER_NAME).newInstance();
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            try {
-                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-            }
-
-            // setup writer
-            if (writer == null) {
-                writer = new Writer();
-                try {
-                    writer.setOutput(System.out, "UTF8");
-                }
-                catch (UnsupportedEncodingException e) {
-                    System.err.println("error: Unable to set output. Exiting.");
-                    System.exit(1);
-                }
-            }
-
-            // parse file
-            writer.setCanonical(canonical);
-            try {
-                Document document = parser.parse(arg);
-                writer.write(document);
-            }
-            catch (SAXParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof SAXException) {
-                    e = ((SAXException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java dom.Writer (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name  Select parser by name.");
-        System.err.println("  -n | -N  Turn on/off namespace processing.");
-        System.err.println("  -v | -V  Turn on/off validation.");
-        System.err.println("  -s | -S  Turn on/off Schema validation support.");
-        System.err.println("           NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F Turn on/off Schema full checking.");
-        System.err.println("           NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -c | -C  Turn on/off Canonical XML output.");
-        System.err.println("           NOTE: This is not W3C canonical output.");
-        System.err.println("  -h       This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.err.println("  Parser:     "+DEFAULT_PARSER_NAME);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-        System.err.print("  Canonical:  ");
-        System.err.println(DEFAULT_CANONICAL ? "on" : "off");
-
-    } // printUsage()
-
-}  // class Writer
diff --git a/samples/dom/traversal/IteratorView.java b/samples/dom/traversal/IteratorView.java
deleted file mode 100644
index 4748328..0000000
--- a/samples/dom/traversal/IteratorView.java
+++ /dev/null
@@ -1,564 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package dom.traversal;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import javax.swing.*;
-import javax.swing.tree.*;
-import javax.swing.event.*;
-import org.apache.xerces.parsers.*;
-import org.w3c.dom.*;
-import org.w3c.dom.traversal.*;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import ui.DOMTreeFull;
-
-/** This class shows a DOM Document in a JTree, and presents controls
- *  which allow the user to create and view the progress of a NodeIterator
- *  in the DOM tree.
- */
-public class IteratorView 
-    extends JFrame 
-    implements ActionListener {
-
-    Document document;
-    TreeNode lastSelected;
-    DOMParser parser;
-    JTextArea messageText;
-    JScrollPane messageScroll;
-    DOMTreeFull jtree;
-    NodeIterator iterator;
-    NameNodeFilter nameNodeFilter;
-    
-    JButton nextButton;
-    JButton prevButton;
-    JButton removeButton;
-    JButton addButton;
-    JTextField addText;
-    JButton newIterator;
-    JList whatToShow;
-    JCheckBox match;
-    JTextField nameFilter;
-    String whatArray[] = new String [] { 
-            "ALL",
-            "ELEMENT",
-            "ATTRIBUTE",
-            "TEXT",
-            "CDATA_SECTION",
-            "ENTITY_REFERENCE",
-            "ENTITY",
-            "PROCESSING_INSTRUCTION", 
-            "COMMENT", 
-            "DOCUMENT", 
-            "DOCUMENT_TYPE",
-            "DOCUMENT_FRAGMENT",
-            "NOTATION" 
-            };
-    JCheckBox expandERs;
-    
-    Hashtable treeNodeMap = new Hashtable();
-    
-    
-    /** main */
-    public static void main (String args[]) {
-
-        if (args.length > 0) {
-            String filename = args[0];
-            try {
-                IteratorView frame = new IteratorView(filename) ;
-                frame.addWindowListener(new java.awt.event.WindowAdapter() {
-                 public void windowClosing(java.awt.event.WindowEvent e) {
-                     System.exit(0);
-                 }
-                });
-                frame.setSize(640, 480);
-                frame.setVisible(true);
-                } catch (Exception e) {
-                    e.printStackTrace(System.err);
-                }
-        }
-    }
-    
-    /** Constructor */
-    public IteratorView (String filename) {
-        super("IteratorView: "+filename);
-        try {
-            parser = new DOMParser();
-            parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", true);
-            parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);
-            Errors errors = new Errors();
-            parser.setErrorHandler(errors);
-            parser.parse(filename);
-            document = parser.getDocument();
-            
-            if (!document.isSupported("Traversal", "2.0")) {
-                // This cannot happen with ou DOMParser...
-                throw new RuntimeException("This DOM Document does not support Traversal");
-            }
-
-            // jtree  UI setup
-            jtree = new DOMTreeFull((Node)document);
-            jtree.getSelectionModel().setSelectionMode
-                (TreeSelectionModel.SINGLE_TREE_SELECTION);
-            jtree.setRootVisible(false);
-
-            // Listen for when the selection changes, call nodeSelected(node)
-            jtree.addTreeSelectionListener(
-                new TreeSelectionListener() {
-                    public void valueChanged(TreeSelectionEvent e) {
-                        TreePath path = (TreePath)e.getPath(); 
-                        TreeNode treeNode = (TreeNode)path.getLastPathComponent();
-                        if(jtree.getSelectionModel().isPathSelected(path))
-                                nodeSelected(treeNode);
-                    }
-                }
-            );
-            
-            
-            //expandTree();
-            
-                        
-            // controls
-            
-            //iterate panel
-            JPanel iteratePanel = new JPanel();
-            iteratePanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Iterate"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            
-            prevButton = new JButton("Previous");
-            iteratePanel.add(prevButton);
-            prevButton.addActionListener(this);
-            
-            nextButton = new JButton("Next");
-            iteratePanel.add(nextButton);
-            nextButton.addActionListener(this);
-        
-            //DOM tree panel
-            JPanel domPanel = new JPanel();
-            domPanel.setLayout(new BorderLayout());
-            domPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Selected Node"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            
-            removeButton = new JButton("Remove Selected Node");
-            domPanel.add(removeButton, BorderLayout.NORTH);
-            removeButton.addActionListener(this);
-            
-            addButton = new JButton("Add Text Node");
-            addText = new JTextField(10);
-            domPanel.add(addButton, BorderLayout.CENTER);
-            domPanel.add(addText, BorderLayout.SOUTH);
-            addButton.addActionListener(this);
-         
-            // iterator settings
-            JPanel settingsPanel = new JPanel();
-            settingsPanel.setLayout(new BorderLayout());
-            settingsPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Iterator Settings"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            JPanel iteratorPanel = new JPanel();
-            newIterator = new JButton("createNodeIterator");
-            expandERs = new JCheckBox("expandEntityReferences");
-            iteratorPanel.add(newIterator);
-            expandERs.setSelected(true);
-            iteratorPanel.add(expandERs);
-            settingsPanel.add(iteratorPanel, BorderLayout.NORTH);
-            newIterator.addActionListener(this);
-    
-            JPanel whatPanel = new JPanel();
-            whatPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("whatToShow"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            whatToShow = new JList(DOMTreeFull.whatArray);
-            JScrollPane whatScroll = 
-            new JScrollPane(whatToShow) {
-                    public Dimension getPreferredSize(){
-                        return new Dimension(200, 75 );
-                    }
-                };
-            
-            whatPanel.add(whatScroll);
-            
-            
-            JPanel filterPanel = new JPanel();
-            filterPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("NodeNameFilter"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            filterPanel.setLayout(new BorderLayout());
-            match = new JCheckBox("match/ignore node name", true);
-            nameFilter = new JTextField(10);
-            filterPanel.add(match, BorderLayout.NORTH);
-            filterPanel.add(nameFilter, BorderLayout.SOUTH);
-            
-            settingsPanel.add(whatPanel, BorderLayout.WEST);
-            settingsPanel.add(filterPanel, BorderLayout.EAST);
-            
-
-            // Listen for when the selection changes, call nodeSelected(node)
-            whatToShow.addListSelectionListener(
-                new ListSelectionListener() {
-                    public void valueChanged(ListSelectionEvent e) {
-                        // do nothing on selection...
-                    }
-                }
-            );
-            
-            
-            JPanel controlsPanel = new JPanel(new BorderLayout());
-            JPanel buttonsPanel = new JPanel(new BorderLayout());
-            buttonsPanel.add(iteratePanel, BorderLayout.NORTH);
-            buttonsPanel.add(domPanel, BorderLayout.SOUTH);
-            controlsPanel.add(buttonsPanel, BorderLayout.WEST);
-            controlsPanel.add(settingsPanel, BorderLayout.CENTER);
-            
-            controlsPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Controls"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-                
-                
-            // tree panel    
-            JPanel treePanel = new JPanel(new BorderLayout());
-                
-            JScrollPane treeScroll = new JScrollPane(jtree) ;
-            treeScroll.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Tree View"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-
-            // message text UI setup
-            messageText = new JTextArea(3,5);
-
-            JPanel messagePanel = new JPanel(new BorderLayout());
-            messageScroll = new JScrollPane(messageText);
-            messagePanel.add(messageScroll);
-            messagePanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Messages"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            
-            JPanel mainPanel = new JPanel();
-            mainPanel.setLayout(new BorderLayout());
-            mainPanel.add(controlsPanel, BorderLayout.NORTH);
-            mainPanel.add(treeScroll, BorderLayout.CENTER);
-            mainPanel.add(messagePanel, BorderLayout.SOUTH);
-            getContentPane().add(mainPanel);
-            
-            Hashtable errorNodes = errors.getErrorNodes();
-            Enumeration elements = errorNodes.elements();
-            while (elements.hasMoreElements()) {
-                //*** append errors to messageText
-                messageText.append( (String)elements.nextElement());
-            }    
-            
-            // This cast must work, because we have tested above
-            // with document.isSupported("Traversal")
-            iterator = ((DocumentTraversal)document).
-                createNodeIterator(
-                    document, 
-                    NodeFilter.SHOW_ALL, 
-                    new NameNodeFilter(),
-                    true);
-            
-        } catch (Exception e) {
-            e.printStackTrace(System.err);
-        }
-    }
-    
-    public void actionPerformed(ActionEvent e) {
-        
-        if (e.getSource() == newIterator) {
-            Node node = document;
-            
-            // whatToShow section
-            int  [] indices = whatToShow.getSelectedIndices();
-            int mask = 0x0;
-            for (int i = 0; i < indices.length; i++) {
-                if (indices[i] == 0) {
-                    mask = 0xFFFF;
-                    break;
-                } else {
-                    mask = mask | 1<<indices[i]-1;
-                }
-            }
-            // filter section
-            String nameText = nameFilter.getText();
-            boolean matched = match.isSelected();
-            if (nameNodeFilter==null) {
-                nameNodeFilter = new NameNodeFilter();
-            }
-            if (nameText.equals("")) {
-                setMessage("NodeNameFilter name is \"\". Assuming null.");
-                nameText = null;
-            }
-            nameNodeFilter.setName(nameText);
-            nameNodeFilter.setMatch(matched);
-            
-            if (iterator !=null) iterator.detach();
-            boolean expand = expandERs.isSelected();
-            iterator = ((DocumentTraversal)document).
-                createNodeIterator(
-                    node, 
-                    (short)mask, 
-                    nameNodeFilter,
-                    expand);
-            setMessage("doc.createNodeIterator("+ 
-                        " root="+node+
-                        ", whatToShow="+mask+
-                        ", match="+matched+
-                        ", name="+nameText+")"
-                        );
-            return;
-            
-        } 
-        
-        if (e.getSource() == addButton) {
-            
-            String text = addText.getText();
-            
-            if (text==null) return;
-            
-            TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent();
-            if (treeNode == null) {
-                messageText.append("Must select a tree component to add a child to it.");
-                return;
-            }
-            TreePath path = new TreePath(
-                    ((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
-            if (path == null) {
-                setMessage("Could not create a path.");
-                return;
-            }
-            if(!jtree.getSelectionModel().isPathSelected(path))
-                return;
-            Node node = jtree.getNode(treeNode);
-            Node textNode = document.createTextNode(text);
-            try {
-                node.appendChild(textNode);
-            } catch (DOMException dome) {
-                setMessage("DOMException:"+dome.code+", "+dome);
-                return;
-            }
-            ((DOMTreeFull.Model)jtree.getModel()).insertNode(textNode, (MutableTreeNode)treeNode);
-            
-            return;
-        }
-        if (e.getSource() == nextButton) {          
-            Node node = iterator.nextNode();
-            if (node==null) {
-                setMessage("iterator.nextNode() == null");
-                return;
-            } 
-            
-            setMessage("iterator.nextNode() == "+node);
-
-            TreeNode treeNode = jtree.getTreeNode(node);
-            if (treeNode == null) {
-                setMessage("No JTree TreeNode for Node name:" + node.getNodeName());
-                return;
-            }
-            
-            TreePath path = new TreePath(
-                    ((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
-            jtree.requestFocus();
-            jtree.setSelectionPath(path);
-            jtree.scrollPathToVisible(path);
-            return;
-        } 
-        
-        if (e.getSource() == prevButton) {          
-            Node node = iterator.previousNode();
-            if (node==null) {
-                setMessage("iterator.previousNode() == null");
-                return;
-            } 
-            
-            setMessage("iterator.previousNode() == "+node);
-
-            TreeNode treeNode = jtree.getTreeNode(node);
-            if (treeNode == null) {
-                setMessage("No JTree TreeNode for Node name:" + node.getNodeName());
-                return;
-            }
-            
-            TreePath path = new TreePath(
-                    ((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
-            jtree.requestFocus();
-            jtree.setSelectionPath(path);
-            jtree.scrollPathToVisible(path);
-            return;
-        }
-        if (e.getSource() == removeButton) {
-            
-            /** If the node is not selected don't remove. */
-            TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent();
-            if (treeNode == null) {
-                messageText.append("Must select a tree component to remove it.");
-                return;
-            }
-            TreePath path = new TreePath(
-                    ((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
-            if (path == null) {
-                setMessage("Could not create a path.");
-                return;
-            }
-            if(!jtree.getSelectionModel().isPathSelected(path))
-                return;
-            Node node = jtree.getNode(treeNode);
-            if (node == null) return;
-            Node parent = node.getParentNode();
-            if (parent == null) return;
-            
-            parent.removeChild(node);
-    
-            ((DefaultTreeModel)jtree.getModel()).removeNodeFromParent((MutableTreeNode)treeNode);
-            return;
-        } 
-        
-    }
-    
-    /** Helper function to set messages */
-    void setMessage(String string) {
-        messageText.selectAll();
-        messageText.cut();
-        messageText.append(string);
-        messageText.setCaretPosition(0);
-    }
-        
-    /** called when our JTree's nodes are selected.
-     */
-    void nodeSelected(TreeNode treeNode) {
-
-        lastSelected = treeNode;
-        Node node = jtree.getNode(treeNode);
-        
-        System.out.println("nodeSelected.node="+node);
-        if (node == null) return;
-                            
-        setMessage(DOMTreeFull.toString(node));
-    }
-    
-    /** Utility function to expand the jtree */
-    void expandTree() {
-        for (int i = 0; i < jtree.getRowCount(); i++) {
-            jtree.expandRow(i);
-        }
-    }
-    
-    class Errors implements ErrorHandler {
-
-        Hashtable errorNodes = new Hashtable();
-
-        public void warning(SAXParseException ex) {
-            store(ex, "[Warning]");
-        }
-
-        public void error(SAXParseException ex) {
-            store(ex, "[Error]");
-        }
-
-        public void fatalError(SAXParseException ex) throws SAXException {
-            store(ex, "[Fatal Error]");
-        }
-
-        public Hashtable getErrorNodes() {
-            return errorNodes;
-        }
-
-        public Object getError(Node node) {
-            return errorNodes.get(node);
-        }
-
-        public void clearErrors() {
-            errorNodes.clear();
-        }
-
-        void store(SAXParseException ex, String type) {
-
-            // build error text
-            String errorString= type+" at line number, "+ex.getLineNumber()
-                +": "+ex.getMessage()+"\n";
-            Node currentNode = null;
-            try {
-                currentNode = (Node)parser.getProperty("http://apache.org/xml/properties/dom-node");
-            } catch (SAXException se) {
-                System.err.println(se.getMessage());
-                return;
-            }
-            if (currentNode == null) return;
-
-            // accumulate any multiple errors per node in the Hashtable.
-            String previous = (String) errorNodes.get(currentNode);
-            if (previous != null)
-                errorNodes.put(currentNode, previous +errorString);
-            else
-                errorNodes.put(currentNode, errorString);
-        }
-    }
-    
-}
diff --git a/samples/dom/traversal/NameNodeFilter.java b/samples/dom/traversal/NameNodeFilter.java
deleted file mode 100644
index 4de1096..0000000
--- a/samples/dom/traversal/NameNodeFilter.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package dom.traversal;
-
-
-import org.w3c.dom.traversal.*;
-import org.w3c.dom.Node;
-import org.w3c.dom.Element;
-
- /** An example filter which enables the client to set a <b>name</b> value 
-  *  accept those node names which <b>match</b> (or explicitly <b>not match</b>) 
-  *  the set name value.
-  */
- public class NameNodeFilter implements NodeFilter {
-    
-    String fName;
-    boolean fMatch = true;
-            
-        /** The name to compare with the node name. If null, all node names  
-         *  are successfully matched. 
-         */
-        public void setName(String name) {
-            this.fName = name;
-        }
-        
-        /** Return the name to compare with node name. If null, all node names  
-         *  are successfully matched. */
-        public String getName() {
-            return this.fName;
-        }
-        
-        /** 
-         *  Controls whether the node name is accepted when it <b>does</b> match 
-         *  the setName value, or when it <b>does not</b> match the setName value. 
-         *  If the setName value is null this match value does not matter, and
-         *  all names will match.
-         *  If match is true, the node name is accepted when it matches. 
-         *  If match is false, the node name is accepted when does not match. 
-         */
-        public void setMatch(boolean match) {
-            this.fMatch = match;
-        }
-        
-        /** Return match value. */
-        public boolean getMatch() {
-            return this.fMatch;
-        }
-        
-        /** acceptNode determines if this filter accepts a node name or not. */ 
-        public short acceptNode(Node n) {
-
-            if (fName == null || fMatch && n.getNodeName().equals(fName) 
-            ||  !fMatch && !n.getNodeName().equals(fName))
-                return FILTER_ACCEPT;
-            else 
-                return FILTER_REJECT;
-        }
-    }
diff --git a/samples/dom/traversal/TreeWalkerView.java b/samples/dom/traversal/TreeWalkerView.java
deleted file mode 100644
index 29cc302..0000000
--- a/samples/dom/traversal/TreeWalkerView.java
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package dom.traversal;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.util.Hashtable;
-import java.util.Enumeration;
-import javax.swing.*;
-import javax.swing.tree.*;
-import javax.swing.event.*;
-import org.apache.xerces.parsers.*;
-import org.w3c.dom.*;
-import org.w3c.dom.traversal.*;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import ui.DOMTreeFull;
-
-/** This class shows a DOM Document in a JTree, and presents controls
- *  which allow the user to create and view the progress of a TreeWalker
- *  in the DOM tree.
- */
-public class TreeWalkerView 
-    extends JFrame 
-    implements ActionListener {
-
-    Document document;
-    TreeNode lastSelected;
-    DOMParser parser;
-    JTextArea messageText;
-    JScrollPane messageScroll;
-    DOMTreeFull jtree;
-    TreeWalker treeWalker;
-    NameNodeFilter nameNodeFilter;
-    
-    JButton nextButton;
-    JButton prevButton;
-    JButton removeButton;
-    JButton addButton;
-    JTextField addText;
-    JButton newIterator;
-    JList whatToShow;
-    JCheckBox match;
-    JTextField nameFilter;
-   
-    // treeWalker specific buttons    
-    JButton parentButton;
-    JButton nextSiblingButton;
-    JButton previousSiblingButton;
-    JButton firstChildButton;
-    JButton lastChildButton;
-    JButton currentButton;
-    
-    String whatArray[] = new String [] { 
-            "ALL",
-            "ELEMENT",
-            "ATTRIBUTE",
-            "TEXT",
-            "CDATA_SECTION",
-            "ENTITY_REFERENCE",
-            "ENTITY",
-            "PROCESSING_INSTRUCTION", 
-            "COMMENT", 
-            "DOCUMENT", 
-            "DOCUMENT_TYPE",
-            "DOCUMENT_FRAGMENT",
-            "NOTATION" 
-            };
-    JCheckBox expandERs;
-    
-    
-    /** main */
-    public static void main (String args[]) {
-
-        if (args.length > 0) {
-            String filename = args[0];
-            try {
-                TreeWalkerView frame = new TreeWalkerView(filename) ;
-                frame.addWindowListener(new java.awt.event.WindowAdapter() {
-                 public void windowClosing(java.awt.event.WindowEvent e) {
-                     System.exit(0);
-                 }
-                });
-                frame.setSize(640, 700);
-                frame.setVisible(true);
-                } catch (Exception e) {
-                    e.printStackTrace(System.err);
-                }
-        }
-    }
-    
-    Hashtable treeNodeMap = new Hashtable();
-
-    /** Constructor */
-    public TreeWalkerView (String filename) {
-        super("TreeWalkerView: "+filename);
-        try {
-            parser = new DOMParser();
-            parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", true);
-            parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);
-            Errors errors = new Errors();
-            parser.setErrorHandler(errors);
-            parser.parse(filename);
-            document = parser.getDocument();
-            
-            if (!document.isSupported("Traversal", "2.0")) {
-                // This cannot happen with the DOMParser...
-                throw new RuntimeException("This DOM Document does not support Traversal");
-            
-            }
-
-            // jtree  UI setup
-            jtree = new DOMTreeFull((Node)document);
-            jtree.getSelectionModel().setSelectionMode
-                (TreeSelectionModel.SINGLE_TREE_SELECTION);
-
-            // Listen for when the selection changes, call nodeSelected(node)
-            jtree.addTreeSelectionListener(
-                new TreeSelectionListener() {
-                    public void valueChanged(TreeSelectionEvent e) {
-                        TreePath path = (TreePath)e.getPath(); 
-                        TreeNode treeNode = (TreeNode)path.getLastPathComponent();
-                        if(jtree.getSelectionModel().isPathSelected(path))
-                                nodeSelected(treeNode);
-                    }
-                }
-            );
-            
-            //            
-            // controls
-            //
-            
-            BorderLayout borderLayout = new BorderLayout();
-            
-            //iterate panel
-            JPanel iteratePanel = new JPanel();
-            iteratePanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Document Order Traversal"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            
-            prevButton = new JButton("Previous");
-            iteratePanel.add(prevButton);
-            prevButton.addActionListener(this);
-            
-            nextButton = new JButton("Next");
-            iteratePanel.add(nextButton);
-            nextButton.addActionListener(this);
-        
-            //walkerPanel
-            JPanel walkerPanel = new JPanel();
-            walkerPanel.setLayout(new BorderLayout());
-            walkerPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Walk"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            
-            parentButton = new JButton("Parent");
-            walkerPanel.add(parentButton, BorderLayout.NORTH);
-            parentButton.addActionListener(this);
-           
-            
-            JPanel childPanel = new JPanel();
-            firstChildButton = new JButton("First Child");
-            childPanel.add(firstChildButton);
-            firstChildButton.addActionListener(this);
-   
-            lastChildButton = new JButton("Last Child");
-            childPanel.add(lastChildButton);
-            lastChildButton.addActionListener(this);
-            walkerPanel.add(childPanel, BorderLayout.SOUTH);
-            
-            nextSiblingButton = new JButton("Next Sibling");
-            walkerPanel.add(nextSiblingButton, BorderLayout.EAST);
-            nextSiblingButton.addActionListener(this);
-            
-            previousSiblingButton = new JButton("Previous Sibling");
-            walkerPanel.add(previousSiblingButton, BorderLayout.WEST);
-            previousSiblingButton.addActionListener(this);
-            
-            //DOM tree panel
-            JPanel domPanel = new JPanel();
-            domPanel.setLayout(new BorderLayout());
-            domPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Selected Node"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            
-            JPanel buttonPanel = new JPanel();
-            currentButton = new JButton("Current");
-            buttonPanel.add(currentButton);
-            currentButton.addActionListener(this);
-   
-            removeButton = new JButton("Remove");
-            buttonPanel.add(removeButton);
-            removeButton.addActionListener(this);
-            
-            addButton = new JButton("Append Text");
-            addText = new JTextField(10);
-            buttonPanel.add(addButton);
-            domPanel.add(buttonPanel, BorderLayout.NORTH);
-            domPanel.add(addText, BorderLayout.CENTER);
-            addButton.addActionListener(this);
-         
-            // treeWalker settings
-            JPanel settingsPanel = new JPanel();
-            settingsPanel.setLayout(new BorderLayout());
-            settingsPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Filter Settings"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            JPanel treeWalkerPanel = new JPanel();
-            treeWalkerPanel.setLayout(new BorderLayout());
-            
-            newIterator = new JButton("createTreeWalker");
-            treeWalkerPanel.add(newIterator, BorderLayout.NORTH);
-            expandERs = new JCheckBox("expandEntityReferences");
-            expandERs.setSelected(true);
-            treeWalkerPanel.add(expandERs, BorderLayout.SOUTH);
-            settingsPanel.add(treeWalkerPanel, BorderLayout.NORTH);
-            newIterator.addActionListener(this);
-    
-            JPanel whatPanel = new JPanel();
-            whatPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("whatToShow"),
-                BorderFactory.createEmptyBorder(0, 0, 0, 0)
-                ));
-            whatToShow = new JList(whatArray);
-            JScrollPane whatScroll = 
-            new JScrollPane(whatToShow) {
-                    public Dimension getPreferredSize(){
-                        return new Dimension(200, 65 );
-                    }
-                };
-            
-            whatPanel.add(whatScroll);
-            
-            
-            JPanel filterPanel = new JPanel();
-            filterPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("NodeNameFilter"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            filterPanel.setLayout(new BorderLayout());
-            match = new JCheckBox("match/ignore node name", true);
-            nameFilter = new JTextField(10);
-            filterPanel.add(match, BorderLayout.NORTH);
-            filterPanel.add(nameFilter, BorderLayout.SOUTH);
-            
-            settingsPanel.add(treeWalkerPanel, BorderLayout.NORTH);
-            settingsPanel.add(whatPanel, BorderLayout.CENTER);
-            settingsPanel.add(filterPanel, BorderLayout.SOUTH);
-            
-
-            // Listen for when the selection changes, call nodeSelected(node)
-            whatToShow.addListSelectionListener(
-                new ListSelectionListener() {
-                    public void valueChanged(ListSelectionEvent e) {
-                        // do nothing on selection...
-                    }
-                }
-            );
-            
-            
-            JPanel controlsPanel = new JPanel(new BorderLayout());
-            controlsPanel.setFont(new Font("Dialog", Font.PLAIN, 8));
-            JPanel buttonsPanel = new JPanel(new BorderLayout());
-            buttonsPanel.add(iteratePanel, BorderLayout.NORTH);
-            buttonsPanel.add(walkerPanel, BorderLayout.CENTER);
-            buttonsPanel.add(domPanel, BorderLayout.SOUTH);
-            controlsPanel.add(buttonsPanel, BorderLayout.NORTH);
-            controlsPanel.add(settingsPanel, BorderLayout.CENTER);
-            
-            controlsPanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Controls"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-                
-                
-            // tree panel    
-            JPanel treePanel = new JPanel(new BorderLayout());
-                
-            JScrollPane treeScroll = new JScrollPane(jtree) ;
-            treeScroll.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Tree View"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-
-            // message text UI setup
-            messageText = new JTextArea(3,5);
-
-            JPanel messagePanel = new JPanel(new BorderLayout());
-            messageScroll = new JScrollPane(messageText);
-            messagePanel.add(messageScroll);
-            messagePanel.setBorder(BorderFactory.createCompoundBorder(
-                BorderFactory.createTitledBorder("Messages"),
-                BorderFactory.createEmptyBorder(4, 4, 4, 4)
-                ));
-            
-            JPanel mainPanel = new JPanel();
-            mainPanel.setLayout(new BorderLayout());
-            mainPanel.add(controlsPanel, BorderLayout.EAST);
-            mainPanel.add(treeScroll, BorderLayout.CENTER);
-            mainPanel.add(messagePanel, BorderLayout.SOUTH);
-            getContentPane().add(mainPanel);
-            
-            Hashtable errorNodes = errors.getErrorNodes();
-            Enumeration elements = errorNodes.elements();
-            while (elements.hasMoreElements()) {
-                //*** append errors to messageText
-                messageText.append( (String)elements.nextElement());
-            }    
-            
-            boolean expand = expandERs.isSelected();
-            treeWalker = ((DocumentTraversal)document).
-                createTreeWalker(
-                    document, 
-                    NodeFilter.SHOW_ALL, 
-                    new NameNodeFilter(),
-                    expand);
-            
-        } catch (Exception e) {
-            e.printStackTrace(System.err);
-        }
-    }
-               
-    public void actionPerformed(ActionEvent e) {
-        
-        if (e.getSource() == newIterator) {
-            
-            TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent();
-            if (treeNode == null) {
-                messageText.append("Must select a tree component.");
-                return;
-            }
-            
-            Node node = jtree.getNode(treeNode);
-            if (node == null) {
-                setMessage("No current Node in TreeNode: "+node);
-            }
-            
-            // whatToShow section
-            int  [] indices = whatToShow.getSelectedIndices();
-            int mask = 0x0;
-            for (int i = 0; i < indices.length; i++) {
-                if (indices[i] == 0) {
-                    mask = 0xFFFF;
-                    break;
-                } else {
-                    mask = mask | 1<<indices[i]-1;
-                }
-            }
-            
-            // filter section
-            String nameText = nameFilter.getText();
-            boolean matched = match.isSelected();
-            if (nameNodeFilter==null) {
-                nameNodeFilter = new NameNodeFilter();
-            }
-            if (nameText.equals("")) {
-                setMessage("NodeNameFilter name is \"\". Assuming null.");
-                nameText = null;
-            }
-            nameNodeFilter.setName(nameText);
-            nameNodeFilter.setMatch(matched);
-            
-            // expand Entity References?
-            boolean expand = expandERs.isSelected();
-            
-            treeWalker = ((DocumentTraversal)document).
-                createTreeWalker(
-                    node, 
-                    mask, 
-                    nameNodeFilter,
-                    expand);
-            setMessage("createTreeWalker:"+ 
-                        " root="+node+
-                        ", whatToShow="+mask+
-                        ", match="+matched+
-                        ", name="+nameText
-                        );
-            return;
-            
-        } 
-        
-        if (e.getSource() == currentButton) {
-            
-            TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent();
-            if (treeNode == null) {
-                messageText.append("Must select a tree component.");
-                return;
-            }
-            
-            Node node = jtree.getNode(treeNode);
-            if (node == null) {
-                setMessage("No current Node in TreeNode: "+node);
-            }
-            treeWalker.setCurrentNode(node);
-            return;
-            
-        }
-        if (e.getSource() == addButton) {
-            
-            String text = addText.getText();
-            
-            if (text==null) return;
-            
-            TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent();
-            if (treeNode == null) {
-                messageText.append("Must select a tree component to add a child to it.");
-                return;
-            }
-            TreePath path = new TreePath(
-                    ((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
-            if (path == null) {
-                setMessage("Could not create a path.");
-                return;
-            }
-            if(!jtree.getSelectionModel().isPathSelected(path))
-                return;
-            Node node = jtree.getNode(treeNode);
-            Node textNode = document.createTextNode(text);
-            try {
-                node.appendChild(textNode);
-            } catch (DOMException dome) {
-                setMessage("DOMException:"+dome.code+", "+dome);
-                return;
-            }
-            ((DOMTreeFull.Model)jtree.getModel()).insertNode(textNode, (MutableTreeNode)treeNode);
-            
-            return;
-        }
-        
-        if (e.getSource() == removeButton) {
-
-            /** If the node is not selected don't remove. */
-            TreeNode treeNode = (TreeNode)jtree.getLastSelectedPathComponent();
-            if (treeNode == null) {
-                messageText.append("Must select a tree component to remove it.");
-                return;
-            }
-            TreePath path = new TreePath(
-                    ((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
-            if (path == null) {
-                setMessage("Could not create a path.");
-                return;
-            }
-            if(!jtree.getSelectionModel().isPathSelected(path))
-                return;
-            Node node = jtree.getNode(treeNode);
-            if (node == null) return;
-            Node parent = node.getParentNode();
-            if (parent == null) return;
-
-            parent.removeChild(node);
-    
-            ((DefaultTreeModel)jtree.getModel()).removeNodeFromParent((MutableTreeNode)treeNode);
-            return;
-        } 
-        
-        if (e.getSource() == previousSiblingButton) {          
-            Node node = treeWalker.previousSibling();
-            handleButton(node, "previousSibling()");
-            return;
-        } 
-        
-        if (e.getSource() == firstChildButton) {          
-            Node node = treeWalker.firstChild();
-            handleButton(node, "firstChild()");
-            return;
-        } 
-        
-        if (e.getSource() == lastChildButton) {          
-            Node node = treeWalker.lastChild();
-            handleButton(node, "lastChild()");
-            return;
-        } 
-        
-        if (e.getSource() == nextSiblingButton) {          
-            Node node = treeWalker.nextSibling();
-            handleButton(node, "nextSibling()");
-            return;
-        } 
-        
-        if (e.getSource() == parentButton) {          
-            Node node = treeWalker.parentNode();
-            handleButton(node, "parentNode()");
-            return;
-        } 
-        
-        if (e.getSource() == nextButton) {          
-            Node node = treeWalker.nextNode();
-            handleButton(node, "nextNode()");
-            return;
-        } 
-        
-        if (e.getSource() == prevButton) {          
-            Node node = treeWalker.previousNode();
-            handleButton(node, "previousNode()");
-            return;
-        }
-        
-    }
-    
-    /** handle a button press: output messages and select node. */
-    void handleButton( Node node, String function) {
-        
-        setMessage("treeWalker."+function+" == "+node);
-   
-        if (node==null) return;
-
-        TreeNode treeNode = jtree.getTreeNode(node);
-        if (treeNode == null) {
-            setMessage("No JTree TreeNode for Node name:" + node.getNodeName());
-            return;
-        }
-            
-        TreePath path = new TreePath(
-                ((DefaultTreeModel)jtree.getModel()).getPathToRoot(treeNode));
-        jtree.requestFocus();
-        jtree.setSelectionPath(path);
-        jtree.scrollPathToVisible(path);
-    }
-    
-    /** Helper function to set messages */
-    void setMessage(String string) {
-        messageText.selectAll();
-        messageText.cut();
-        messageText.append(string);
-        messageText.setCaretPosition(0);
-    }
-        
-    /** called when our JTree's nodes are selected.
-     */
-    void nodeSelected(TreeNode treeNode) {
-
-        lastSelected = treeNode;
-        Node node = jtree.getNode(treeNode);
-        
-        if (node == null) return;
-                            
-        setMessage(DOMTreeFull.toString(node));
-    }
-    
-    /** Utility function to expand the jtree */
-    void expandTree() {
-        for (int i = 0; i < jtree.getRowCount(); i++) {
-            jtree.expandRow(i);
-        }
-    }
-    
-    class Errors implements ErrorHandler {
-
-        Hashtable errorNodes = new Hashtable();
-
-        public void warning(SAXParseException ex) {
-            store(ex, "[Warning]");
-        }
-
-        public void error(SAXParseException ex) {
-            store(ex, "[Error]");
-        }
-
-        public void fatalError(SAXParseException ex) throws SAXException {
-            store(ex, "[Fatal Error]");
-        }
-
-        public Hashtable getErrorNodes() {
-            return errorNodes;
-        }
-
-        public Object getError(Node node) {
-            return errorNodes.get(node);
-        }
-
-        public void clearErrors() {
-            errorNodes.clear();
-        }
-
-        void store(SAXParseException ex, String type) {
-
-            // build error text
-            String errorString= type+" at line number, "+ex.getLineNumber()
-                +": "+ex.getMessage()+"\n";
-
-            Node currentNode = null;
-            try {
-                currentNode = (Node)parser.getProperty("http://apache.org/xml/properties/dom-node");
-            } catch (SAXException se) {
-                System.err.println(se.getMessage());
-                return;
-            }
-            if (currentNode == null) return;
-
-            // accumulate any multiple errors per node in the Hashtable.
-            String previous = (String) errorNodes.get(currentNode);
-            if (previous != null)
-                errorNodes.put(currentNode, previous +errorString);
-            else
-                errorNodes.put(currentNode, errorString);
-        }
-    }
-    
-}
diff --git a/samples/dom/wrappers/Xerces.java b/samples/dom/wrappers/Xerces.java
deleted file mode 100644
index 8f34279..0000000
--- a/samples/dom/wrappers/Xerces.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom.wrappers;
-
-import dom.ParserWrapper;
-
-import org.apache.xerces.dom.TextImpl;
-import org.apache.xerces.parsers.DOMParser;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Text;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-/**
- * Wraps the Xerces DOM parser.
- *
- * @version  $Id$
- */
-public class Xerces 
-    implements ParserWrapper, ParserWrapper.DocumentInfo, ErrorHandler {
-
-    //
-    // Data
-    //
-
-    /** Parser. */
-    protected DOMParser parser = new DOMParser();
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public Xerces() {
-        parser.setErrorHandler(this);
-    } // <init>()
-
-    //
-    // ParserWrapper methods
-    //
-
-    /** Parses the specified URI and returns the document. */
-    public Document parse(String uri) throws Exception {
-        parser.parse(uri);
-        return parser.getDocument();
-    } // parse(String):Document
-
-    /** Sets a feature. */
-    public void setFeature(String featureId, boolean state)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-        parser.setFeature(featureId, state);
-    } // setFeature(String,boolean)
-
-    /** Returns the document information. */
-    public ParserWrapper.DocumentInfo getDocumentInfo() {
-        return this;
-    } // getDocumentInfo():DocumentInfo
-
-    //
-    // DocumentInfo methods
-    //
-
-    /** 
-     * Returns true if the specified text node is ignorable whitespace. 
-     */
-    public boolean isIgnorableWhitespace(Text text) {
-        return ((TextImpl)text).isIgnorableWhitespace();
-    }
-
-    //
-    // ErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(SAXParseException ex) throws SAXException {
-        printError("Warning", ex);
-    } // warning(SAXParseException)
-
-    /** Error. */
-    public void error(SAXParseException ex) throws SAXException {
-        printError("Error", ex);
-    } // error(SAXParseException)
-
-    /** Fatal error. */
-    public void fatalError(SAXParseException ex) throws SAXException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(SAXParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Prints the error message. */
-    protected void printError(String type, SAXParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,SAXParseException)
-
-} // class Xerces
diff --git a/samples/sax/Counter.java b/samples/sax/Counter.java
deleted file mode 100644
index 3d43085..0000000
--- a/samples/sax/Counter.java
+++ /dev/null
@@ -1,640 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package sax;
-
-import java.io.PrintWriter;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.ParserAdapter;
-import org.xml.sax.helpers.ParserFactory;
-
-/**
- * A sample SAX2 counter. This sample program illustrates how to
- * register a SAX2 ContentHandler and receive the callbacks in
- * order to print information about the document. The output of
- * this program shows the time and count of elements, attributes,
- * ignorable whitespaces, and characters appearing in the document.
- * <p>
- * This class is useful as a "poor-man's" performance tester to
- * compare the speed and accuracy of various SAX parsers. However,
- * it is important to note that the first parse time of a parser
- * will include both VM class load time and parser initialization
- * that would not be present in subsequent parses with the same
- * file.
- * <p>
- * <strong>Note:</strong> The results produced by this program
- * should never be accepted as true performance measurements.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class Counter
-    extends DefaultHandler {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Namespace prefixes feature id (http://xml.org/sax/features/namespace-prefixes). */
-    protected static final String NAMESPACE_PREFIXES_FEATURE_ID = "http://xml.org/sax/features/namespace-prefixes";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    /** Dynamic validation feature id (http://apache.org/xml/features/validation/dynamic). */
-    protected static final String DYNAMIC_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/dynamic";
-
-    // default settings
-
-    /** Default parser name. */
-    protected static final String DEFAULT_PARSER_NAME = "org.apache.xerces.parsers.SAXParser";
-
-    /** Default repetition (1). */
-    protected static final int DEFAULT_REPETITION = 1;
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default namespace prefixes (false). */
-    protected static final boolean DEFAULT_NAMESPACE_PREFIXES = false;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    /** Default dynamic validation support (false). */
-    protected static final boolean DEFAULT_DYNAMIC_VALIDATION = false;
-
-    /** Default memory usage report (false). */
-    protected static final boolean DEFAULT_MEMORY_USAGE = false;
-
-    /** Default "tagginess" report (false). */
-    protected static final boolean DEFAULT_TAGGINESS = false;
-
-    //
-    // Data
-    //
-
-    /** Number of elements. */
-    protected long fElements;
-
-    /** Number of attributes. */
-    protected long fAttributes;
-
-    /** Number of characters. */
-    protected long fCharacters;
-
-    /** Number of ignorable whitespace characters. */
-    protected long fIgnorableWhitespace;
-
-    /** Number of characters of tags. */
-    protected long fTagCharacters;
-
-    /** Number of other content characters for the "tagginess" calculation. */
-    protected long fOtherCharacters;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public Counter() {
-    } // <init>()
-
-    //
-    // Public methods
-    //
-
-    /** Prints the results. */
-    public void printResults(PrintWriter out, String uri, long time,
-                             long memory, boolean tagginess,
-                             int repetition) {
-
-        // filename.xml: 631 ms (4 elems, 0 attrs, 78 spaces, 0 chars)
-        out.print(uri);
-        out.print(": ");
-        if (repetition == 1) {
-            out.print(time);
-        }
-        else {
-            out.print(time);
-            out.print('/');
-            out.print(repetition);
-            out.print('=');
-            out.print(time/repetition);
-        }
-        out.print(" ms");
-        if (memory != Long.MIN_VALUE) {
-            out.print(", ");
-            out.print(memory);
-            out.print(" bytes");
-        }
-        out.print(" (");
-        out.print(fElements);
-        out.print(" elems, ");
-        out.print(fAttributes);
-        out.print(" attrs, ");
-        out.print(fIgnorableWhitespace);
-        out.print(" spaces, ");
-        out.print(fCharacters);
-        out.print(" chars)");
-        if (tagginess) {
-            out.print(' ');
-            long totalCharacters = fTagCharacters + fOtherCharacters
-                                 + fCharacters + fIgnorableWhitespace;
-            long tagValue = fTagCharacters * 100 / totalCharacters;
-            out.print(tagValue);
-            out.print("% tagginess");
-        }
-        out.println();
-        out.flush();
-
-    } // printResults(PrintWriter,String,long)
-
-    //
-    // ContentHandler methods
-    //
-
-    /** Start document. */
-    public void startDocument() throws SAXException {
-
-        fElements            = 0;
-        fAttributes          = 0;
-        fCharacters          = 0;
-        fIgnorableWhitespace = 0;
-        fTagCharacters       = 0;
-
-    } // startDocument()
-
-    /** Start element. */
-    public void startElement(String uri, String local, String raw,
-                             Attributes attrs) throws SAXException {
-
-        fElements++;
-        fTagCharacters++; // open angle bracket
-        fTagCharacters += raw.length();
-        if (attrs != null) {
-            int attrCount = attrs.getLength();
-            fAttributes += attrCount;
-            for (int i = 0; i < attrCount; i++) {
-                fTagCharacters++; // space
-                fTagCharacters += attrs.getQName(i).length();
-                fTagCharacters++; // '='
-                fTagCharacters++; // open quote
-                fOtherCharacters += attrs.getValue(i).length();
-                fTagCharacters++; // close quote
-            }
-        }
-        fTagCharacters++; // close angle bracket
-
-    } // startElement(String,String,StringAttributes)
-
-    /** Characters. */
-    public void characters(char ch[], int start, int length)
-        throws SAXException {
-
-        fCharacters += length;
-
-    } // characters(char[],int,int);
-
-    /** Ignorable whitespace. */
-    public void ignorableWhitespace(char ch[], int start, int length)
-        throws SAXException {
-
-        fIgnorableWhitespace += length;
-
-    } // ignorableWhitespace(char[],int,int);
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, String data)
-        throws SAXException {
-        fTagCharacters += 2; // "<?"
-        fTagCharacters += target.length();
-        if (data != null && data.length() > 0) {
-            fTagCharacters++; // space
-            fOtherCharacters += data.length();
-        }
-        fTagCharacters += 2; // "?>"
-    } // processingInstruction(String,String)
-
-    //
-    // ErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(SAXParseException ex) throws SAXException {
-        printError("Warning", ex);
-    } // warning(SAXParseException)
-
-    /** Error. */
-    public void error(SAXParseException ex) throws SAXException {
-        printError("Error", ex);
-    } // error(SAXParseException)
-
-    /** Fatal error. */
-    public void fatalError(SAXParseException ex) throws SAXException {
-        printError("Fatal Error", ex);
-        //throw ex;
-    } // fatalError(SAXParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Prints the error message. */
-    protected void printError(String type, SAXParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        if (ex== null) {
-            System.out.println("!!!");
-        }
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,SAXParseException)
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        Counter counter = new Counter();
-        PrintWriter out = new PrintWriter(System.out);
-        XMLReader parser = null;
-        int repetition = DEFAULT_REPETITION;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean namespacePrefixes = DEFAULT_NAMESPACE_PREFIXES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-        boolean dynamicValidation = DEFAULT_DYNAMIC_VALIDATION;
-        boolean memoryUsage = DEFAULT_MEMORY_USAGE;
-        boolean tagginess = DEFAULT_TAGGINESS;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                        continue;
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parser = XMLReaderFactory.createXMLReader(parserName);
-                    }
-                    catch (Exception e) {
-                        try {
-                            Parser sax1Parser = ParserFactory.makeParser(parserName);
-                            parser = new ParserAdapter(sax1Parser);
-                            System.err.println("warning: Features and properties not supported on SAX1 parsers.");
-                        }
-                        catch (Exception ex) {
-                            parser = null;
-                            System.err.println("error: Unable to instantiate parser ("+parserName+")");
-                        }
-                    }
-                    continue;
-                }
-                if (option.equals("x")) {
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -x option.");
-                        continue;
-                    }
-                    String number = argv[i];
-                    try {
-                        int value = Integer.parseInt(number);
-                        if (value < 1) {
-                            System.err.println("error: Repetition must be at least 1.");
-                            continue;
-                        }
-                        repetition = value;
-                    }
-                    catch (NumberFormatException e) {
-                        System.err.println("error: invalid number ("+number+").");
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("np")) {
-                    namespacePrefixes = option.equals("np");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("dv")) {
-                    dynamicValidation = option.equals("dv");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("m")) {
-                    memoryUsage = option.equals("m");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("t")) {
-                    tagginess = option.equals("t");
-                    continue;
-                }
-                if (option.equals("-rem")) {
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -# option.");
-                        continue;
-                    }
-                    System.out.print("# ");
-                    System.out.println(argv[i]);
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-                System.err.println("error: unknown option ("+option+").");
-                continue;
-            }
-
-            // use default parser?
-            if (parser == null) {
-
-                // create parser
-                try {
-                    parser = XMLReaderFactory.createXMLReader(DEFAULT_PARSER_NAME);
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            try {
-                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(NAMESPACE_PREFIXES_FEATURE_ID, namespacePrefixes);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACE_PREFIXES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (SAXNotRecognizedException e) {
-                // ignore
-            }
-            catch (SAXNotSupportedException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (SAXNotRecognizedException e) {
-                // ignore
-            }
-            catch (SAXNotSupportedException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(DYNAMIC_VALIDATION_FEATURE_ID, dynamicValidation);
-            }
-            catch (SAXNotRecognizedException e) {
-                // ignore
-            }
-            catch (SAXNotSupportedException e) {
-                System.err.println("warning: Parser does not support feature ("+DYNAMIC_VALIDATION_FEATURE_ID+")");
-            }
-
-            // parse file
-            parser.setContentHandler(counter);
-            parser.setErrorHandler(counter);
-            try {
-                long timeBefore = System.currentTimeMillis();
-                long memoryBefore = Runtime.getRuntime().freeMemory();
-                for (int j = 0; j < repetition; j++) {
-                    parser.parse(arg);
-                }
-                long memoryAfter = Runtime.getRuntime().freeMemory();
-                long timeAfter = System.currentTimeMillis();
-
-                long time = timeAfter - timeBefore;
-                long memory = memoryUsage
-                            ? memoryBefore - memoryAfter : Long.MIN_VALUE;
-                counter.printResults(out, arg, time, memory, tagginess,
-                                     repetition);
-            }
-            catch (SAXParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                Exception se = e;
-                if (e instanceof SAXException) {
-                    se = ((SAXException)e).getException();
-                }
-                if (se != null)
-                  se.printStackTrace(System.err);
-                else
-                  e.printStackTrace(System.err);
-
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java sax.Counter (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name     Select parser by name.");
-        System.err.println("  -x number   Select number of repetitions.");
-        System.err.println("  -n  | -N    Turn on/off namespace processing.");
-        System.err.println("  -np | -NP   Turn on/off namespace prefixes.");
-        System.err.println("              NOTE: Requires use of -n.");
-        System.err.println("  -v  | -V    Turn on/off validation.");
-        System.err.println("  -s  | -S    Turn on/off Schema validation support.");
-        System.err.println("              NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F    Turn on/off Schema full checking.");
-        System.err.println("              NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -dv | -DV   Turn on/off dynamic validation.");
-        System.err.println("              NOTE: Requires use of -v and not supported by all parsers.");
-        System.err.println("  -m  | -M    Turn on/off memory usage report");
-        System.err.println("  -t  | -T    Turn on/off \"tagginess\" report.");
-        System.err.println("  --rem text  Output user defined comment before next parse.");
-        System.err.println("  -h          This help screen.");
-
-        System.err.println();
-        System.err.println("defaults:");
-        System.err.println("  Parser:     "+DEFAULT_PARSER_NAME);
-        System.err.println("  Repetition: "+DEFAULT_REPETITION);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Prefixes:   ");
-        System.err.println(DEFAULT_NAMESPACE_PREFIXES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-        System.err.print("  Dynamic:    ");
-        System.err.println(DEFAULT_DYNAMIC_VALIDATION ? "on" : "off");
-        System.err.print("  Memory:     ");
-        System.err.println(DEFAULT_MEMORY_USAGE ? "on" : "off");
-        System.err.print("  Tagginess:  ");
-        System.err.println(DEFAULT_TAGGINESS ? "on" : "off");
-
-        System.err.println();
-        System.err.println("notes:");
-        System.err.println("  The speed and memory results from this program should NOT be used as the");
-        System.err.println("  basis of parser performance comparison! Real analytical methods should be");
-        System.err.println("  used. For better results, perform multiple document parses within the same");
-        System.err.println("  virtual machine to remove class loading from parse time and memory usage.");
-        System.err.println();
-        System.err.println("  The \"tagginess\" measurement gives a rough estimate of the percentage of");
-        System.err.println("  markup versus content in the XML document. The percent tagginess of a ");
-        System.err.println("  document is equal to the minimum amount of tag characters required for ");
-        System.err.println("  elements, attributes, and processing instructions divided by the total");
-        System.err.println("  amount of characters (characters, ignorable whitespace, and tag characters)");
-        System.err.println("  in the document.");
-        System.err.println();
-        System.err.println("  Not all features are supported by different parsers.");
-
-    } // printUsage()
-
-} // class Counter
diff --git a/samples/sax/DocumentTracer.java b/samples/sax/DocumentTracer.java
deleted file mode 100644
index 0d26f37..0000000
--- a/samples/sax/DocumentTracer.java
+++ /dev/null
@@ -1,971 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package sax;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.ParserAdapter;
-import org.xml.sax.helpers.ParserFactory;
-import org.xml.sax.helpers.XMLReaderFactory;
-import org.xml.sax.ext.DeclHandler;
-import org.xml.sax.ext.LexicalHandler;
-
-/**
- * Provides a complete trace of SAX2 events for files parsed. This is
- * useful for making sure that a SAX parser implementation faithfully
- * communicates all information in the document to the SAX handlers.
- *
- * @author Andy Clark, IBM
- * @author Arnaud Le Hors, IBM
- *
- * @version $Id$
- */
-public class DocumentTracer
-    extends DefaultHandler
-    implements ContentHandler, DTDHandler, ErrorHandler, // SAX2
-               DeclHandler, LexicalHandler, // SAX2 extensions
-               DocumentHandler // deprecated in SAX2
-    {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // property ids
-
-    /** Lexical handler property id (http://xml.org/sax/properties/lexical-handler). */
-    protected static final String LEXICAL_HANDLER_PROPERTY_ID = "http://xml.org/sax/properties/lexical-handler";
-
-    // default settings
-
-    /** Default parser name. */
-    protected static final String DEFAULT_PARSER_NAME = "org.apache.xerces.parsers.SAXParser";
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    //
-    // Data
-    //
-
-    /** Print writer. */
-    protected PrintWriter fOut;
-
-    /** Indent level. */
-    protected int fIndent;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public DocumentTracer() {
-        setOutput(new PrintWriter(System.out));
-    } // <init>()
-
-    //
-    // Public methods
-    //
-
-    /** Sets the output stream for printing. */
-    public void setOutput(OutputStream stream, String encoding)
-        throws UnsupportedEncodingException {
-
-        if (encoding == null) {
-            encoding = "UTF8";
-        }
-
-        Writer writer = new OutputStreamWriter(stream, encoding);
-        fOut = new PrintWriter(writer);
-
-    } // setOutput(OutputStream,String)
-
-    /** Sets the output writer. */
-    public void setOutput(Writer writer) {
-
-        fOut = writer instanceof PrintWriter
-             ? (PrintWriter)writer : new PrintWriter(writer);
-
-    } // setOutput(Writer)
-
-    //
-    // ContentHandler and DocumentHandler methods
-    //
-
-    /** Set document locator. */
-    public void setDocumentLocator(Locator locator) {
-
-        printIndent();
-        fOut.print("setDocumentLocator(");
-        fOut.print("locator=");
-        fOut.print(locator);
-        fOut.println(')');
-        fOut.flush();
-
-    } // setDocumentLocator(Locator)
-
-    /** Start document. */
-    public void startDocument() throws SAXException {
-
-        fIndent = 0;
-        printIndent();
-        fOut.println("startDocument()");
-        fOut.flush();
-        fIndent++;
-
-    } // startDocument()
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, String data)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("processingInstruction(");
-        fOut.print("target=");
-        printQuotedString(target);
-        fOut.print(',');
-        fOut.print("data=");
-        printQuotedString(data);
-        fOut.println(')');
-        fOut.flush();
-
-    } // processingInstruction(String,String)
-
-    /** Characters. */
-    public void characters(char[] ch, int offset, int length)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("characters(");
-        fOut.print("text=");
-        printQuotedString(ch, offset, length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // characters(char[],int,int)
-
-    /** Ignorable whitespace. */
-    public void ignorableWhitespace(char[] ch, int offset, int length)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("ignorableWhitespace(");
-        fOut.print("text=");
-        printQuotedString(ch, offset, length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // ignorableWhitespace(char[],int,int)
-
-    /** End document. */
-    public void endDocument() throws SAXException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endDocument()");
-        fOut.flush();
-
-    } // endDocument()
-
-    //
-    // ContentHandler methods
-    //
-
-    /** Start prefix mapping. */
-    public void startPrefixMapping(String prefix, String uri)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("startPrefixMapping(");
-        fOut.print("prefix=");
-        printQuotedString(prefix);
-        fOut.print(',');
-        fOut.print("uri=");
-        printQuotedString(uri);
-        fOut.println(')');
-        fOut.flush();
-
-    } // startPrefixMapping(String,String)
-
-    /** Start element. */
-    public void startElement(String uri, String localName, String qname,
-                             Attributes attributes) throws SAXException {
-
-        printIndent();
-        fOut.print("startElement(");
-        fOut.print("uri=");
-        printQuotedString(uri);
-        fOut.print(',');
-        fOut.print("localName=");
-        printQuotedString(localName);
-        fOut.print(',');
-        fOut.print("qname=");
-        printQuotedString(qname);
-        fOut.print(',');
-        fOut.print("attributes=");
-        if (attributes == null) {
-            fOut.println("null");
-        }
-        else {
-            fOut.print('{');
-            int length = attributes.getLength();
-            for (int i = 0; i < length; i++) {
-                if (i > 0) {
-                    fOut.print(',');
-                }
-                String attrLocalName = attributes.getLocalName(i);
-                String attrQName = attributes.getQName(i);
-                String attrURI = attributes.getURI(i);
-                String attrType = attributes.getType(i);
-                String attrValue = attributes.getValue(i);
-                fOut.print('{');
-                fOut.print("uri=");
-                printQuotedString(attrURI);
-                fOut.print(',');
-                fOut.print("localName=");
-                printQuotedString(attrLocalName);
-                fOut.print(',');
-                fOut.print("qname=");
-                printQuotedString(attrQName);
-                fOut.print(',');
-                fOut.print("type=");
-                printQuotedString(attrType);
-                fOut.print(',');
-                fOut.print("value=");
-                printQuotedString(attrValue);
-                fOut.print('}');
-            }
-            fOut.print('}');
-        }
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startElement(String,String,String,Attributes)
-
-    /** End element. */
-    public void endElement(String uri, String localName, String qname)
-        throws SAXException {
-
-        fIndent--;
-        printIndent();
-        fOut.print("endElement(");
-        fOut.print("uri=");
-        printQuotedString(uri);
-        fOut.print(',');
-        fOut.print("localName=");
-        printQuotedString(localName);
-        fOut.print(',');
-        fOut.print("qname=");
-        printQuotedString(qname);
-        fOut.println(')');
-        fOut.flush();
-
-    } // endElement(String,String,String)
-
-    /** End prefix mapping. */
-    public void endPrefixMapping(String prefix) throws SAXException {
-
-        printIndent();
-        fOut.print("endPrefixMapping(");
-        fOut.print("prefix=");
-        printQuotedString(prefix);
-        fOut.println(')');
-        fOut.flush();
-
-    } // endPrefixMapping(String)
-
-    /** Skipped entity. */
-    public void skippedEntity(String name) throws SAXException {
-
-        printIndent();
-        fOut.print("skippedEntity(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.println(')');
-        fOut.flush();
-
-    } // skippedEntity(String)
-
-    //
-    // DocumentHandler methods
-    //
-
-    /** Start element. */
-    public void startElement(String name, AttributeList attributes)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("startElement(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("attributes=");
-        if (attributes == null) {
-            fOut.println("null");
-        }
-        else {
-            fOut.print('{');
-            int length = attributes.getLength();
-            for (int i = 0; i < length; i++) {
-                if (i > 0) {
-                    System.out.print(',');
-                }
-                String attrName = attributes.getName(i);
-                String attrType = attributes.getType(i);
-                String attrValue = attributes.getValue(i);
-                fOut.print('{');
-                fOut.print("name=");
-                printQuotedString(attrName);
-                fOut.print(',');
-                fOut.print("type=");
-                printQuotedString(attrType);
-                fOut.print(',');
-                fOut.print("value=");
-                printQuotedString(attrValue);
-                fOut.print('}');
-            }
-            fOut.print('}');
-        }
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startElement(String,AttributeList)
-
-    /** End element. */
-    public void endElement(String name) throws SAXException {
-
-        fIndent--;
-        printIndent();
-        fOut.print("endElement(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.println(')');
-        fOut.flush();
-
-    } // endElement(String)
-
-    //
-    // DTDHandler methods
-    //
-
-    /** Notation declaration. */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("notationDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.println(')');
-        fOut.flush();
-
-    } // notationDecl(String,String,String)
-
-    /** Unparsed entity declaration. */
-    public void unparsedEntityDecl(String name,
-                                   String publicId, String systemId,
-                                   String notationName) throws SAXException {
-        printIndent();
-        fOut.print("unparsedEntityDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.print(',');
-        fOut.print("notationName=");
-        printQuotedString(notationName);
-        fOut.println(')');
-        fOut.flush();
-
-    } // unparsedEntityDecl(String,String,String,String)
-
-    //
-    // LexicalHandler methods
-    //
-
-    /** Start DTD. */
-    public void startDTD(String name, String publicId, String systemId)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("startDTD(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startDTD(String,String,String)
-
-    /** Start entity. */
-    public void startEntity(String name) throws SAXException {
-
-        printIndent();
-        fOut.print("startEntity(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startEntity(String)
-
-    /** Start CDATA section. */
-    public void startCDATA() throws SAXException {
-
-        printIndent();
-        fOut.println("startCDATA()");
-        fOut.flush();
-        fIndent++;
-
-    } // startCDATA()
-
-    /** End CDATA section. */
-    public void endCDATA() throws SAXException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endCDATA()");
-        fOut.flush();
-
-    } // endCDATA()
-
-    /** Comment. */
-    public void comment(char[] ch, int offset, int length)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("comment(");
-        fOut.print("text=");
-        printQuotedString(ch, offset, length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // comment(char[],int,int)
-
-    /** End entity. */
-    public void endEntity(String name) throws SAXException {
-
-        fIndent--;
-        printIndent();
-        fOut.print("endEntity(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.println(')');
-
-    } // endEntity(String)
-
-    /** End DTD. */
-    public void endDTD() throws SAXException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endDTD()");
-        fOut.flush();
-
-    } // endDTD()
-
-    //
-    // DeclHandler methods
-    //
-
-    /** Element declaration. */
-    public void elementDecl(String name, String contentModel)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("elementDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("contentModel=");
-        printQuotedString(contentModel);
-        fOut.println(')');
-        fOut.flush();
-
-    } // elementDecl(String,String)
-
-    /** Attribute declaration. */
-    public void attributeDecl(String elementName, String attributeName,
-                              String type, String valueDefault,
-                              String value) throws SAXException {
-
-        printIndent();
-        fOut.print("attributeDecl(");
-        fOut.print("elementName=");
-        printQuotedString(elementName);
-        fOut.print(',');
-        fOut.print("attributeName=");
-        printQuotedString(attributeName);
-        fOut.print(',');
-        fOut.print("type=");
-        printQuotedString(type);
-        fOut.print(',');
-        fOut.print("valueDefault=");
-        printQuotedString(valueDefault);
-        fOut.print(',');
-        fOut.print("value=");
-        printQuotedString(value);
-        fOut.println(')');
-        fOut.flush();
-
-    } // attributeDecl(String,String,String,String,String)
-
-    /** Internal entity declaration. */
-    public void internalEntityDecl(String name, String text)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("internalEntityDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("text=");
-        printQuotedString(text);
-        fOut.println(')');
-        fOut.flush();
-
-    } // internalEntityDecl(String,String)
-
-    /** External entity declaration. */
-    public void externalEntityDecl(String name,
-                                   String publicId, String systemId)
-        throws SAXException {
-
-        printIndent();
-        fOut.print("externalEntityDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.println(')');
-        fOut.flush();
-
-    } // externalEntityDecl(String,String,String)
-
-    //
-    // ErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(SAXParseException ex) throws SAXException {
-        printError("Warning", ex);
-    } // warning(SAXParseException)
-
-    /** Error. */
-    public void error(SAXParseException ex) throws SAXException {
-        printError("Error", ex);
-    } // error(SAXParseException)
-
-    /** Fatal error. */
-    public void fatalError(SAXParseException ex) throws SAXException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(SAXParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Print quoted string. */
-    protected void printQuotedString(String s) {
-
-        if (s == null) {
-            fOut.print("null");
-            return;
-        }
-
-        fOut.print('"');
-        int length = s.length();
-        for (int i = 0; i < length; i++) {
-            char c = s.charAt(i);
-            normalizeAndPrint(c);
-        }
-        fOut.print('"');
-
-    } // printQuotedString(String)
-
-    /** Print quoted string. */
-    protected void printQuotedString(char[] ch, int offset, int length) {
-
-        fOut.print('"');
-        for (int i = 0; i < length; i++) {
-            normalizeAndPrint(ch[offset + i]);
-        }
-        fOut.print('"');
-
-    } // printQuotedString(char[],int,int)
-
-    /** Normalize and print. */
-    protected void normalizeAndPrint(char c) {
-
-        switch (c) {
-            case '\n': {
-                fOut.print("\\n");
-                break;
-            }
-            case '\r': {
-                fOut.print("\\r");
-                break;
-            }
-            case '\t': {
-                fOut.print("\\t");
-                break;
-            }
-            case '\\': {
-                fOut.print("\\\\");
-                break;
-            }
-            case '"': {
-                fOut.print("\\\"");
-                break;
-            }
-            default: {
-                fOut.print(c);
-            }
-        }
-
-    } // normalizeAndPrint(char)
-
-    /** Prints the error message. */
-    protected void printError(String type, SAXParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,SAXParseException)
-
-    /** Prints the indent. */
-    protected void printIndent() {
-        for (int i = 0; i < fIndent; i++) {
-            fOut.print(' ');
-        }
-    }
-
-    //
-    // MAIN
-    //
-
-    /** Main. */
-    public static void main(String[] argv) throws Exception {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        DocumentTracer tracer = new DocumentTracer();
-        PrintWriter out = new PrintWriter(System.out);
-        XMLReader parser = null;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parser = XMLReaderFactory.createXMLReader(parserName);
-                    }
-                    catch (Exception e) {
-                        try {
-                            Parser sax1Parser = ParserFactory.makeParser(parserName);
-                            parser = new ParserAdapter(sax1Parser);
-                            System.err.println("warning: Features and properties not supported on SAX1 parsers.");
-                        }
-                        catch (Exception ex) {
-                            parser = null;
-                            System.err.println("error: Unable to instantiate parser ("+parserName+")");
-                        }
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parser == null) {
-
-                // create parser
-                try {
-                    parser = XMLReaderFactory.createXMLReader(DEFAULT_PARSER_NAME);
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            try {
-                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (SAXNotRecognizedException e) {
-                // ignore
-            }
-            catch (SAXNotSupportedException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (SAXNotRecognizedException e) {
-                // ignore
-            }
-            catch (SAXNotSupportedException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-            }
-
-            // set handlers
-            parser.setDTDHandler(tracer);
-            parser.setErrorHandler(tracer);
-            if (parser instanceof XMLReader) {
-                parser.setContentHandler(tracer);
-                try {
-                    parser.setProperty("http://xml.org/sax/properties/declaration-handler", tracer);
-                }
-                catch (SAXException e) {
-                    e.printStackTrace(System.err);
-                }
-                try {
-                    parser.setProperty("http://xml.org/sax/properties/lexical-handler", tracer);
-                }
-                catch (SAXException e) {
-                    e.printStackTrace(System.err);
-                }
-            }
-            else {
-                ((Parser)parser).setDocumentHandler(tracer);
-            }
-
-            // parse file
-            try {
-                parser.parse(arg);
-            }
-            catch (SAXParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof SAXException) {
-                    e = ((SAXException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java sax.DocumentTracer (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name  Select parser by name.");
-        System.err.println("  -n | -N  Turn on/off namespace processing.");
-        System.err.println("  -v | -V  Turn on/off validation.");
-        System.err.println("  -s | -S  Turn on/off Schema validation support.");
-        System.err.println("           NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F Turn on/off Schema full checking.");
-        System.err.println("           NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -h       This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.err.println("  Parser:     "+DEFAULT_PARSER_NAME);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-
-    } // printUsage()
-
-} // class DocumentTracer
diff --git a/samples/sax/Writer.java b/samples/sax/Writer.java
deleted file mode 100644
index 845e34f..0000000
--- a/samples/sax/Writer.java
+++ /dev/null
@@ -1,640 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package sax;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-
-import sax.helpers.AttributesImpl;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.ParserAdapter;
-import org.xml.sax.helpers.ParserFactory;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-/**
- * A sample SAX2 writer. This sample program illustrates how to
- * register a SAX2 ContentHandler and receive the callbacks in
- * order to print a document that is parsed.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class Writer
-    extends DefaultHandler
-    implements LexicalHandler {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // property ids
-
-    /** Lexical handler property id (http://xml.org/sax/properties/lexical-handler). */
-    protected static final String LEXICAL_HANDLER_PROPERTY_ID = "http://xml.org/sax/properties/lexical-handler";
-
-    // default settings
-
-    /** Default parser name. */
-    protected static final String DEFAULT_PARSER_NAME = "org.apache.xerces.parsers.SAXParser";
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    /** Default canonical output (false). */
-    protected static final boolean DEFAULT_CANONICAL = false;
-
-    //
-    // Data
-    //
-
-    /** Print writer. */
-    protected PrintWriter fOut;
-
-    /** Canonical output. */
-    protected boolean fCanonical;
-
-    /** Element depth. */
-    protected int fElementDepth;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public Writer() {
-    } // <init>()
-
-    //
-    // Public methods
-    //
-
-    /** Sets whether output is canonical. */
-    public void setCanonical(boolean canonical) {
-        fCanonical = canonical;
-    } // setCanonical(boolean)
-
-    /** Sets the output stream for printing. */
-    public void setOutput(OutputStream stream, String encoding)
-        throws UnsupportedEncodingException {
-
-        if (encoding == null) {
-            encoding = "UTF8";
-        }
-
-        java.io.Writer writer = new OutputStreamWriter(stream, encoding);
-        fOut = new PrintWriter(writer);
-
-    } // setOutput(OutputStream,String)
-
-    /** Sets the output writer. */
-    public void setOutput(java.io.Writer writer) {
-
-        fOut = writer instanceof PrintWriter
-             ? (PrintWriter)writer : new PrintWriter(writer);
-
-    } // setOutput(java.io.Writer)
-
-    //
-    // ContentHandler methods
-    //
-
-    /** Start document. */
-    public void startDocument() throws SAXException {
-
-        fElementDepth = 0;
-
-        if (!fCanonical) {
-            fOut.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
-            fOut.flush();
-        }
-
-    } // startDocument()
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, String data)
-        throws SAXException {
-
-        if (fElementDepth > 0) {
-            fOut.print("<?");
-            fOut.print(target);
-            if (data != null && data.length() > 0) {
-                fOut.print(' ');
-                fOut.print(data);
-            }
-            fOut.print("?>");
-            fOut.flush();
-        }
-
-    } // processingInstruction(String,String)
-
-    /** Start element. */
-    public void startElement(String uri, String local, String raw,
-                             Attributes attrs) throws SAXException {
-
-        fElementDepth++;
-        fOut.print('<');
-        fOut.print(raw);
-        if (attrs != null) {
-            attrs = sortAttributes(attrs);
-            int len = attrs.getLength();
-            for (int i = 0; i < len; i++) {
-                fOut.print(' ');
-                fOut.print(attrs.getQName(i));
-                fOut.print("=\"");
-                normalizeAndPrint(attrs.getValue(i));
-                fOut.print('"');
-            }
-        }
-        fOut.print('>');
-        fOut.flush();
-
-    } // startElement(String,String,String,Attributes)
-
-    /** Characters. */
-    public void characters(char ch[], int start, int length)
-        throws SAXException {
-
-        normalizeAndPrint(ch, start, length);
-        fOut.flush();
-
-    } // characters(char[],int,int);
-
-    /** Ignorable whitespace. */
-    public void ignorableWhitespace(char ch[], int start, int length)
-        throws SAXException {
-
-        characters(ch, start, length);
-        fOut.flush();
-
-    } // ignorableWhitespace(char[],int,int);
-
-    /** End element. */
-    public void endElement(String uri, String local, String raw)
-        throws SAXException {
-
-        fElementDepth--;
-        fOut.print("</");
-        fOut.print(raw);
-        fOut.print('>');
-        fOut.flush();
-
-    } // endElement(String)
-
-    //
-    // ErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(SAXParseException ex) throws SAXException {
-        printError("Warning", ex);
-    } // warning(SAXParseException)
-
-    /** Error. */
-    public void error(SAXParseException ex) throws SAXException {
-        printError("Error", ex);
-    } // error(SAXParseException)
-
-    /** Fatal error. */
-    public void fatalError(SAXParseException ex) throws SAXException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(SAXParseException)
-
-    //
-    // LexicalHandler methods
-    //
-
-    /** Start DTD. */
-    public void startDTD(String name, String publicId, String systemId)
-        throws SAXException {
-    } // startDTD(String,String,String)
-
-    /** End DTD. */
-    public void endDTD() throws SAXException {
-    } // endDTD()
-
-    /** Start entity. */
-    public void startEntity(String name) throws SAXException {
-    } // startEntity(String)
-
-    /** End entity. */
-    public void endEntity(String name) throws SAXException {
-    } // endEntity(String)
-
-    /** Start CDATA section. */
-    public void startCDATA() throws SAXException {
-    } // startCDATA()
-
-    /** End CDATA section. */
-    public void endCDATA() throws SAXException {
-    } // endCDATA()
-
-    /** Comment. */
-    public void comment(char ch[], int start, int length) throws SAXException {
-        if (!fCanonical && fElementDepth > 0) {
-            fOut.print("<!--");
-            normalizeAndPrint(ch, start, length);
-            fOut.print("-->");
-            fOut.flush();
-        }
-    } // comment(char[],int,int)
-
-    //
-    // Protected methods
-    //
-
-    /** Returns a sorted list of attributes. */
-    protected Attributes sortAttributes(Attributes attrs) {
-
-        AttributesImpl attributes = new AttributesImpl();
-
-        int len = (attrs != null) ? attrs.getLength() : 0;
-        for (int i = 0; i < len; i++) {
-            String name = attrs.getQName(i);
-            int count = attributes.getLength();
-            int j = 0;
-            while (j < count) {
-                if (name.compareTo(attributes.getQName(j)) < 0) {
-                    break;
-                }
-                j++;
-            }
-            attributes.insertAttributeAt(j, name, attrs.getType(i),
-                                         attrs.getValue(i));
-        }
-
-        return attributes;
-
-    } // sortAttributes(AttributeList):AttributeList
-
-    /** Normalizes and prints the given string. */
-    protected void normalizeAndPrint(String s) {
-
-        int len = (s != null) ? s.length() : 0;
-        for (int i = 0; i < len; i++) {
-            char c = s.charAt(i);
-            normalizeAndPrint(c);
-        }
-
-    } // normalizeAndPrint(String)
-
-    /** Normalizes and prints the given array of characters. */
-    protected void normalizeAndPrint(char[] ch, int offset, int length) {
-        for (int i = 0; i < length; i++) {
-            normalizeAndPrint(ch[offset + i]);
-        }
-    } // normalizeAndPrint(char[],int,int)
-
-    /** Normalizes and print the given character. */
-    protected void normalizeAndPrint(char c) {
-
-        switch (c) {
-            case '<': {
-                fOut.print("&lt;");
-                break;
-            }
-            case '>': {
-                fOut.print("&gt;");
-                break;
-            }
-            case '&': {
-                fOut.print("&amp;");
-                break;
-            }
-            case '"': {
-                fOut.print("&quot;");
-                break;
-            }
-            case '\r':
-            case '\n': {
-                if (fCanonical) {
-                    fOut.print("&#");
-                    fOut.print(Integer.toString(c));
-                    fOut.print(';');
-                    break;
-                }
-                // else, default print char
-            }
-            default: {
-                fOut.print(c);
-            }
-        }
-
-    } // normalizeAndPrint(char)
-
-    /** Prints the error message. */
-    protected void printError(String type, SAXParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,SAXParseException)
-
-    //
-    // Main
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        Writer writer = null;
-        XMLReader parser = null;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-        boolean canonical = DEFAULT_CANONICAL;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parser = XMLReaderFactory.createXMLReader(parserName);
-                    }
-                    catch (Exception e) {
-                        try {
-                            Parser sax1Parser = ParserFactory.makeParser(parserName);
-                            parser = new ParserAdapter(sax1Parser);
-                            System.err.println("warning: Features and properties not supported on SAX1 parsers.");
-                        }
-                        catch (Exception ex) {
-                            parser = null;
-                            System.err.println("error: Unable to instantiate parser ("+parserName+")");
-                        }
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("c")) {
-                    canonical = option.equals("c");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parser == null) {
-
-                // create parser
-                try {
-                    parser = XMLReaderFactory.createXMLReader(DEFAULT_PARSER_NAME);
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            try {
-                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (SAXNotRecognizedException e) {
-                // ignore
-            }
-            catch (SAXNotSupportedException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (SAXNotRecognizedException e) {
-                // ignore
-            }
-            catch (SAXNotSupportedException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-            }
-
-            // setup writer
-            if (writer == null) {
-                writer = new Writer();
-                try {
-                    writer.setOutput(System.out, "UTF8");
-                }
-                catch (UnsupportedEncodingException e) {
-                    System.err.println("error: Unable to set output. Exiting.");
-                    System.exit(1);
-                }
-            }
-
-            // set parser
-            parser.setContentHandler(writer);
-            parser.setErrorHandler(writer);
-            try {
-                parser.setProperty(LEXICAL_HANDLER_PROPERTY_ID, writer);
-            }
-            catch (SAXException e) {
-                // ignore
-            }
-
-            // parse file
-            writer.setCanonical(canonical);
-            try {
-                parser.parse(arg);
-            }
-            catch (SAXParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof SAXException) {
-                    e = ((SAXException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java sax.Writer (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name  Select parser by name.");
-        System.err.println("  -n | -N  Turn on/off namespace processing.");
-        System.err.println("  -v | -V  Turn on/off validation.");
-        System.err.println("  -s | -S  Turn on/off Schema validation support.");
-        System.err.println("           NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F Turn on/off Schema full checking.");
-        System.err.println("           NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -c | -C  Turn on/off Canonical XML output.");
-        System.err.println("           NOTE: This is not W3C canonical output.");
-        System.err.println("  -h       This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.err.println("  Parser:     "+DEFAULT_PARSER_NAME);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-        System.err.print("  Canonical:  ");
-        System.err.println(DEFAULT_CANONICAL ? "on" : "off");
-
-    } // printUsage()
-
-} // class Writer
diff --git a/samples/sax/helpers/AttributesImpl.java b/samples/sax/helpers/AttributesImpl.java
deleted file mode 100644
index 02af25a..0000000
--- a/samples/sax/helpers/AttributesImpl.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package sax.helpers;
-                    
-import org.xml.sax.Attributes;
-
-/**
- * An Attributes implementation that can perform more operations
- * than the attribute list helper supplied with the standard SAX2
- * distribution.
- */
-public class AttributesImpl
-    implements Attributes {
-
-    //
-    // Data
-    //
-
-    /** Head node. */
-    private ListNode head;
-
-    /** Tail node. */
-    private ListNode tail;
-
-    /** Length. */
-    private int length;
-
-    //
-    // Attributes methods
-    //
-
-    /** Returns the number of attributes. */
-    public int getLength() {
-        return length;
-    }
-
-    /** Returns the index of the specified attribute. */
-    public int getIndex(String raw) {
-        ListNode place = head;
-        int index = 0;
-        while (place != null) {
-            if (place.raw.equals(raw)) {
-                return index;
-            }
-            index++;
-            place = place.next;
-        }
-        return -1;
-    }
-
-    /** Returns the index of the specified attribute. */
-    public int getIndex(String uri, String local) {
-        ListNode place = head;
-        int index = 0;
-        while (place != null) {
-            if (place.uri.equals(uri) && place.local.equals(local)) {
-                return index;
-            }
-            index++;
-            place = place.next;
-        }
-        return -1;
-    }
-
-    /** Returns the attribute URI by index. */
-    public String getURI(int index) {
-
-        ListNode node = getListNodeAt(index);
-        return node != null ? node.uri : null;
-
-    } // getURI(int):String
-
-    /** Returns the attribute local name by index. */
-    public String getLocalName(int index) {
-
-        ListNode node = getListNodeAt(index);
-        return node != null ? node.local : null;
-
-    } // getLocalName(int):String
-
-    /** Returns the attribute raw name by index. */
-    public String getQName(int index) {
-
-        ListNode node = getListNodeAt(index);
-        return node != null ? node.raw : null;
-
-    } // getQName(int):String
-
-    /** Returns the attribute type by index. */
-    public String getType(int index) {
-
-        ListNode node = getListNodeAt(index);
-        return (node != null) ? node.type : null;
-
-    } // getType(int):String
-
-    /** Returns the attribute type by uri and local. */
-    public String getType(String uri, String local) {
-
-        ListNode node = getListNode(uri, local);
-        return (node != null) ? node.type : null;
-
-    } // getType(String,String):String
-
-    /** Returns the attribute type by raw name. */
-    public String getType(String raw) {
-
-        ListNode node = getListNode(raw);
-        return (node != null) ? node.type : null;
-
-    } // getType(String):String
-
-    /** Returns the attribute value by index. */
-    public String getValue(int index) {
-
-        ListNode node = getListNodeAt(index);
-        return (node != null) ? node.value : null;
-
-    } // getType(int):String
-
-    /** Returns the attribute value by uri and local. */
-    public String getValue(String uri, String local) {
-
-        ListNode node = getListNode(uri, local);
-        return (node != null) ? node.value : null;
-
-    } // getType(String):String
-
-    /** Returns the attribute value by raw name. */
-    public String getValue(String raw) {
-
-        ListNode node = getListNode(raw);
-        return (node != null) ? node.value : null;
-
-    } // getType(String):String
-
-    //
-    // Public methods
-    //
-
-    /** Adds an attribute. */
-    public void addAttribute(String raw, String type, String value) {
-        addAttribute(null, null, raw, type, value);
-    }
-
-    /** Adds an attribute. */
-    public void addAttribute(String uri, String local, String raw, 
-                             String type, String value) {
-
-        ListNode node = new ListNode(uri, local, raw, type, value);
-        if (length == 0) {
-            head = node;
-        }
-        else {
-            tail.next = node;
-        }
-        tail = node;
-        length++;
-
-    } // addAttribute(String,StringString,String,String)
-
-    /** Inserts an attribute. */
-    public void insertAttributeAt(int index, 
-                                  String raw, String type, String value) {
-        insertAttributeAt(index, null, null, raw, type, value);
-    }
-
-    /** Inserts an attribute. */
-    public void insertAttributeAt(int index, 
-                                  String uri, String local, String raw, 
-                                  String type, String value) {
-
-        // if list is empty, add attribute
-        if (length == 0 || index >= length) {
-            addAttribute(uri, local, raw, type, value);
-            return;
-        }
-
-        // insert at beginning of list
-        ListNode node = new ListNode(uri, local, raw, type, value);
-        if (index < 1) {
-            node.next = head;
-            head = node;
-        }
-        else {
-            ListNode prev = getListNodeAt(index - 1);
-            node.next = prev.next;
-            prev.next = node;
-        }
-        length++;
-
-    } // insertAttributeAt(int,String,String,String,String,String)
-
-    /** Removes an attribute. */
-    public void removeAttributeAt(int index) {
-
-        if (length == 0) {
-            return;
-        }
-
-        if (index == 0) {
-            head = head.next;
-            if (head == null) {
-                tail = null;
-            }
-            length--;
-        }
-        else {
-            ListNode prev = getListNodeAt(index - 1);
-            ListNode node = getListNodeAt(index);
-            if (node != null) {
-                prev.next = node.next;
-                if (node == tail) {
-                    tail = prev;
-                }
-                length--;
-            }
-        }
-
-    } // removeAttributeAt(int)
-
-    /** Removes the specified attribute. */
-    public void removeAttribute(String raw) {
-        removeAttributeAt(getIndex(raw));
-    }
-
-    /** Removes the specified attribute. */
-    public void removeAttribute(String uri, String local) {
-        removeAttributeAt(getIndex(uri, local));
-    }
-
-    //
-    // Private methods
-    //
-
-    /** Returns the node at the specified index. */
-    private ListNode getListNodeAt(int i) {
-
-        for (ListNode place = head; place != null; place = place.next) {
-            if (--i == -1) {
-                return place;
-            }
-        }
-
-        return null;
-
-    } // getListNodeAt(int):ListNode
-
-    /** Returns the first node with the specified uri and local. */
-    public ListNode getListNode(String uri, String local) {
-
-        if (uri != null && local != null) {
-            ListNode place = head;
-            while (place != null) {
-                if (place.uri != null && place.local != null &&
-                    place.uri.equals(uri) && place.local.equals(local)) {
-                    return place;
-                }
-                place = place.next;
-            }
-        }
-        return null;
-
-    } // getListNode(String,String):ListNode
-    
-    /** Returns the first node with the specified raw name. */
-    private ListNode getListNode(String raw) {
-
-        if (raw != null) {
-            for (ListNode place = head; place != null; place = place.next) {
-                if (place.raw != null && place.raw.equals(raw)) {
-                    return place;
-                }
-            }
-        }
-
-        return null;
-
-    } // getListNode(String):ListNode
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-        StringBuffer str = new StringBuffer();
-
-        str.append('[');
-        str.append("len=");
-        str.append(length);
-        str.append(", {");
-        for (ListNode place = head; place != null; place = place.next) {
-            str.append(place.toString());
-            if (place.next != null) {
-                str.append(", ");
-            }
-        }
-        str.append("}]");
-
-        return str.toString();
-
-    } // toString():String
-
-    //
-    // Classes
-    //
-
-    /**
-     * An attribute node.
-     */
-    static class ListNode {
-
-        //
-        // Data
-        //
-
-        /** Attribute uri. */
-        public String uri;
-
-        /** Attribute local. */
-        public String local;
-
-        /** Attribute raw. */
-        public String raw;
-
-        /** Attribute type. */
-        public String type;
-
-        /** Attribute value. */
-        public String value;
-
-        /** Next node. */
-        public ListNode next;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a list node. */
-        public ListNode(String uri, String local, String raw, 
-                        String type, String value) {
-
-            this.uri   = uri;
-            this.local = local;
-            this.raw   = raw;
-            this.type  = type;
-            this.value = value;
-
-        } // <init>(String,String,String,String,String)
-
-        //
-        // Object methods
-        //
-
-        /** Returns string representation of this object. */
-        public String toString() {
-            return raw != null ? raw : local;
-        }
-
-    } // class ListNode
-
-} // class AttributesImpl
diff --git a/samples/socket/DelayedInput.java b/samples/socket/DelayedInput.java
deleted file mode 100644
index 1c57532..0000000
--- a/samples/socket/DelayedInput.java
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package socket;
-
-import java.io.FileInputStream;
-import java.io.FilterInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Random;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.ParserAdapter;
-import org.xml.sax.helpers.ParserFactory;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-/**
- * This sample delays the input to the SAX parser to simulate reading data
- * from a socket where data is not always immediately available. An XML
- * parser should be able to parse the input and perform the necessary
- * callbacks as data becomes available. So this is a good way to test
- * any parser that implements the SAX2 <code>XMLReader</code> interface
- * to see if it can parse data as it arrives.
- * <p>
- * <strong>Note:</strong> This sample uses NSGMLS-like output of elements
- * and attributes interspersed with information about how many bytes are
- * being read at a time.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class DelayedInput
-    extends DefaultHandler {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // default settings
-
-    /** Default parser name. */
-    protected static final String DEFAULT_PARSER_NAME = "org.apache.xerces.parsers.SAXParser";
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    //
-    // Data
-    //
-
-    /** Print writer. */
-    protected PrintWriter fOut;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public DelayedInput() {
-    } // <init>()
-
-    //
-    // ContentHandler methods
-    //
-
-    /** Start element. */
-    public void startElement(String uri, String localpart, String rawname,
-                             Attributes attrs) throws SAXException {
-
-        System.out.println("("+rawname);
-        int length = attrs != null ? attrs.getLength() : 0;
-        for (int i = 0; i < length; i++) {
-            System.out.println("A"+attrs.getQName(i)+' '+attrs.getValue(i));
-        }
-
-    } // startElement(String,String,String,Attributes)
-
-    /** End element. */
-    public void endElement(String uri, String localpart, String rawname)
-        throws SAXException {
-        System.out.println(")"+rawname);
-    } // endElement(String,String,String)
-
-    //
-    // ErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(SAXParseException ex) throws SAXException {
-        printError("Warning", ex);
-    } // warning(SAXParseException)
-
-    /** Error. */
-    public void error(SAXParseException ex) throws SAXException {
-        printError("Error", ex);
-    } // error(SAXParseException)
-
-    /** Fatal error. */
-    public void fatalError(SAXParseException ex) throws SAXException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(SAXParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Prints the error message. */
-    protected void printError(String type, SAXParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,SAXParseException)
-
-    //
-    // Classes
-    //
-
-    /**
-     * Delayed input stream filter. This class will limit block reads to a small
-     * number of bytes (suitable for display on a standard 80 column terminal)
-     * pausing in small increments, randomly. This lets you can verify that the
-     * parser can parse the input and make the appropriate callbacks as the
-     * data arrives.
-     *
-     * @author Andy Clark, IBM
-     */
-    static class DelayedInputStream
-        extends FilterInputStream {
-
-        //
-        // Data
-        //
-
-        /** Random number generator. */
-        private Random fRandom = new Random(System.currentTimeMillis());
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a delayed input stream from the specified input stream. */
-        public DelayedInputStream(InputStream in) {
-            super(in);
-        } // <init>(InputStream)
-
-        //
-        // InputStream methods
-        //
-
-        /** Performs a delayed block read. */
-        public int read(byte[] buffer, int offset, int length) throws IOException {
-
-            // keep read small enough for display
-            if (length > 48) {
-                length = 48;
-            }
-            int count = 0;
-
-            // read bytes and pause
-            long before = System.currentTimeMillis();
-            count = in.read(buffer, offset, length);
-            try {
-                Thread.currentThread().sleep(Math.abs(fRandom.nextInt()) % 2000);
-            }
-            catch (InterruptedException e) {
-                e.printStackTrace(System.err);
-            }
-            long after = System.currentTimeMillis();
-
-            // print output
-            System.out.print("read "+count+" bytes in "+(after-before)+" ms: ");
-            printBuffer(buffer, offset, count);
-            System.out.println();
-
-            // return number of characters read
-            return count;
-
-        } // read(byte[],int,int):int
-
-        //
-        // Private methods
-        //
-
-        /** Prints the specified buffer. */
-        private void printBuffer(byte[] buffer, int offset, int length) {
-
-            // is there anything to do?
-            if (length <= 0) {
-                System.out.print("no data read");
-                return;
-            }
-
-            // print buffer
-            System.out.print('[');
-            for (int i = 0; i < length; i++) {
-                switch ((char)buffer[offset + i]) {
-                    case '\r': {
-                        System.out.print("\\r");
-                        break;
-                    }
-                    case '\n': {
-                        System.out.print("\\n");
-                        break;
-                    }
-                    default: {
-                        System.out.print((char)buffer[offset + i]);
-                    }
-                }
-            }
-            System.out.print(']');
-
-        } // printBuffer(byte[],int,int)
-
-    } // class DelayedInputStream
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        DefaultHandler handler = new DelayedInput();
-        PrintWriter out = new PrintWriter(System.out);
-        XMLReader parser = null;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parser = XMLReaderFactory.createXMLReader(parserName);
-                    }
-                    catch (Exception e) {
-                        try {
-                            Parser sax1Parser = ParserFactory.makeParser(parserName);
-                            parser = new ParserAdapter(sax1Parser);
-                            System.err.println("warning: Features and properties not supported on SAX1 parsers.");
-                        }
-                        catch (Exception ex) {
-                            parser = null;
-                            System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                        }
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parser == null) {
-
-                // create parser
-                try {
-                    parser = XMLReaderFactory.createXMLReader(DEFAULT_PARSER_NAME);
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser ("+DEFAULT_PARSER_NAME+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            try {
-                parser.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parser.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (SAXException e) {
-                System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-            }
-
-            // parse file
-            parser.setContentHandler(handler);
-            parser.setErrorHandler(handler);
-            try {
-                System.out.println("# filename: "+arg);
-                InputStream stream = new DelayedInputStream(new FileInputStream(arg));
-                InputSource source = new InputSource(stream);
-                source.setSystemId(arg);
-                parser.parse(source);
-            }
-            catch (SAXParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof SAXException) {
-                    e = ((SAXException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java socket.DelayedInput (options) filename ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name  Select parser by name.");
-        System.err.println("  -n | -N  Turn on/off namespace processing.");
-        System.err.println("  -v | -V  Turn on/off validation.");
-        System.err.println("  -s | -S  Turn on/off Schema validation support.");
-        System.err.println("           NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F Turn on/off Schema full checking.");
-        System.err.println("           NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -h       This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.err.println("  Parser:     "+DEFAULT_PARSER_NAME);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-
-    } // printUsage()
-
-} // class DelayedInput
diff --git a/samples/socket/KeepSocketOpen.java b/samples/socket/KeepSocketOpen.java
deleted file mode 100644
index 92d6d57..0000000
--- a/samples/socket/KeepSocketOpen.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package socket;
-
-import java.io.EOFException;
-import java.io.FileInputStream;
-import java.io.FilterInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.Random;
-
-import socket.io.WrappedInputStream;
-import socket.io.WrappedOutputStream;
-
-import org.apache.xerces.parsers.SAXParser;
-
-import org.xml.sax.AttributeList;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.HandlerBase;
-import org.xml.sax.InputSource;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * This sample provides a solution to the problem of 1) sending multiple
- * XML documents over a single socket connection or 2) sending other types
- * of data after the XML document without closing the socket connection.
- * <p>
- * The first situation is a problem because the XML specification does
- * not allow a document to contain multiple root elements. Therefore a
- * document stream must end (or at least appear to end) for the XML
- * parser to accept it as the end of the document.
- * <p>
- * The second situation is a problem because the XML parser buffers the
- * input stream in specified block sizes for performance reasons. This
- * could cause the parser to accidentally read additional bytes of data
- * beyond the end of the document. This actually relates to the first
- * problem if the documents are encoding in two different international
- * encodings.
- * <p>
- * The solution that this sample introduces wraps both the input and
- * output stream on both ends of the socket. The stream wrappers 
- * introduce a protocol that allows arbitrary length data to be sent
- * as separate, localized input streams. While the socket stream
- * remains open, a separate input stream is created to "wrap" an
- * incoming document and make it appear as if it were a standalone
- * input stream.
- * <p>
- * To use this sample, enter any number of filenames of XML documents
- * as parameters to the program. For example:
- * <pre>
- * java socket.KeepSocketOpen doc1.xml doc2.xml doc3.xml
- * </pre>
- * <p>
- * This program will create a server and client thread that communicate
- * on a specified port number on the "localhost" address. When the client
- * connects to the server, the server sends each XML document specified
- * on the command line to the client in sequence, wrapping each document
- * in a WrappedOutputStream. The client uses a WrappedInputStream to
- * read the data and pass it to the parser.
- * <p>
- * <strong>Note:</strong> Do not send any XML documents with associated
- * grammars to the client. In other words, don't send any documents
- * that contain a DOCTYPE line that references an external DTD because
- * the client will not be able to resolve the location of the DTD and 
- * an error will be issued by the client.
- *
- * @see socket.io.WrappedInputStream
- * @see socket.io.WrappedOutputStream
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class KeepSocketOpen {
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry. */
-    public static void main(String[] argv) throws Exception {
-
-        // constants
-        final int port = 6789;
-
-        // check args
-        if (argv.length == 0) {
-            System.out.println("usage: java socket.KeepSocketOpen file(s)");
-            System.exit(1);
-        }
-
-        // create server and client
-        Server server = new Server(port, argv);
-        Client client = new Client("localhost", port);
-
-        // start it running
-        new Thread(server).start();
-        new Thread(client).start();
-
-    } // main(String[])
-
-    //
-    // Classes
-    //
-
-    /** 
-     * Server. 
-     *
-     * @author Andy Clark, IBM
-     */
-    public static final class Server 
-        extends ServerSocket 
-        implements Runnable {
-
-        //
-        // Data
-        //
-
-        /** Files to send. */
-        private String[] fFilenames;
-
-        /** Verbose mode. */
-        private boolean fVerbose;
-
-        /** Buffer. */
-        private byte[] fBuffer;
-
-        //
-        // Constructors
-        //
-
-        /** 
-         * Constructs a server on the specified port and with the given
-         * file list in terse mode. 
-         */
-        public Server(int port, String[] filenames) throws IOException {
-            this(port, filenames, false);
-        }
-
-        /** 
-         * Constructs a server on the specified port and with the given
-         * file list and verbosity.
-         */
-        public Server(int port, String[] filenames, boolean verbose) 
-            throws IOException {
-            super(port);
-            System.out.println("Server: Created.");
-            fFilenames = filenames;
-            fVerbose = verbose;
-            //fBuffer = new byte[1024];
-            fBuffer = new byte[4096<<2];
-        } // <init>(int,String[])
-
-        //
-        // Runnable methods
-        //
-
-        /** Runs the server. */
-        public void run() {
-
-            System.out.println("Server: Running.");
-            final Random random = new Random(System.currentTimeMillis());
-            try {
-
-                // accept connection
-                if (fVerbose) System.out.println("Server: Waiting for Client connection...");
-                final Socket clientSocket = accept();
-                final OutputStream clientStream = clientSocket.getOutputStream();
-                System.out.println("Server: Client connected.");
-
-                // send files, one at a time
-                for (int i = 0; i < fFilenames.length; i++) {
-
-                    // open file
-                    String filename = fFilenames[i];
-                    System.out.println("Server: Opening file \""+filename+'"');
-                    FileInputStream fileIn = new FileInputStream(filename);
-                    
-                    // wrap stream
-                    if (fVerbose) System.out.println("Server: Wrapping output stream.");
-                    WrappedOutputStream wrappedOut = new WrappedOutputStream(clientStream);
-                    
-                    // read file, writing to output
-                    int total = 0;
-                    while (true) {
-
-                        // read random amount
-                        //int length = (Math.abs(random.nextInt()) % fBuffer.length) + 1;
-                        int length = fBuffer.length;
-                        if (fVerbose) System.out.println("Server: Attempting to read "+length+" byte(s).");
-                        int count = fileIn.read(fBuffer, 0, length);
-                        if (count == -1) {
-                            if (fVerbose) System.out.println("Server: EOF.");
-                            break;
-                        }
-                        if (fVerbose) System.out.println("Server: Writing "+count+" byte(s) to wrapped output stream.");
-                        wrappedOut.write(fBuffer, 0, count);
-                        total += count;
-                    }
-                    System.out.println("Server: Wrote "+total+" byte(s) total.");
-
-                    // close stream
-                    if (fVerbose) System.out.println("Server: Closing output stream.");
-                    wrappedOut.close();
-                    
-                    // close file
-                    if (fVerbose) System.out.println("Server: Closing file.");
-                    fileIn.close();
-                }
-
-                // close connection to client
-                if (fVerbose) System.out.println("Server: Closing socket.");
-                clientSocket.close();
-
-            }
-            catch (IOException e) {
-                System.out.println("Server ERROR: "+e.getMessage());
-            }
-            System.out.println("Server: Exiting.");
-
-        } // run()
-
-    } // class Server
-
-    /**
-     * Client.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static final class Client
-        extends HandlerBase
-        implements Runnable {
-
-        //
-        // Data
-        //
-
-        /** Socket. */
-        private Socket fServerSocket;
-
-        /** Wrapped input stream. */
-        private WrappedInputStream fWrappedInputStream;
-
-        /** Verbose mode. */
-        private boolean fVerbose;
-
-        /** Buffer. */
-        private byte[] fBuffer;
-
-        /** Parser. */
-        private SAXParser fParser;
-
-        // parse data
-
-        /** Number of elements. */
-        private int fElementCount;
-
-        /** Number of attributes. */
-        private int fAttributeCount;
-
-        /** Number of ignorable whitespace. */
-        private int fIgnorableWhitespaceCount;
-
-        /** Number of characters. */
-        private int fCharactersCount;
-
-        /** Time at start of parse. */
-        private long fTimeBefore;
-
-        //
-        // Constructors
-        //
-
-        /** 
-         * Constructs a Client that connects to the given port in terse
-         * output mode. 
-         */
-        public Client(String address, int port) throws IOException {
-            this(address, port, false);
-            fParser = new SAXParser();
-            fParser.setDocumentHandler(this);
-            fParser.setErrorHandler(this);
-        }
-
-        /** 
-         * Constructs a Client that connects to the given address:port and
-         * with the specified verbosity. 
-         */
-        public Client(String address, int port, boolean verbose) 
-            throws IOException {
-            System.out.println("Client: Created.");
-            fServerSocket = new Socket(address, port);
-            fVerbose = verbose;
-            fBuffer = new byte[1024];
-        } // <init>(String,int)
-
-        //
-        // Runnable methods
-        //
-
-        /** Runs the client. */
-        public void run() {
-
-            System.out.println("Client: Running.");
-            try {
-                // get input stream
-                final InputStream serverStream = fServerSocket.getInputStream();
-
-                // read files from server
-                while (!Thread.interrupted()) {
-                    // wrap input stream
-                    if (fVerbose) System.out.println("Client: Wrapping input stream.");
-                    fWrappedInputStream = new WrappedInputStream(serverStream);
-                    InputStream in = new InputStreamReporter(fWrappedInputStream);
-
-                    // parse file
-                    if (fVerbose) System.out.println("Client: Parsing XML document.");
-                    InputSource source = new InputSource(in);
-                    fParser.parse(source);
-                    fWrappedInputStream = null;
-
-                    // close stream
-                    if (fVerbose) System.out.println("Client: Closing input stream.");
-                    in.close();
-
-                }
-
-                // close socket
-                if (fVerbose) System.out.println("Client: Closing socket.");
-                fServerSocket.close();
-
-            }
-            catch (EOFException e) {
-                // server closed connection; ignore
-            }
-            catch (Exception e) {
-                System.out.println("Client ERROR: "+e.getMessage());
-            }
-            System.out.println("Client: Exiting.");
-
-        } // run()
-
-        //
-        // DocumentHandler methods
-        //
-
-        /** Start document. */
-        public void startDocument() {
-            fElementCount = 0;
-            fAttributeCount = 0;
-            fIgnorableWhitespaceCount = 0;
-            fCharactersCount = 0;
-            fTimeBefore = System.currentTimeMillis();
-        } // startDocument()
-
-        /** Start element. */
-        public void startElement(String name, AttributeList attrs) {
-            fElementCount++;
-            fAttributeCount += attrs != null ? attrs.getLength() : 0;
-        } // startElement(String,AttributeList)
-
-        /** Ignorable whitespace. */
-        public void ignorableWhitespace(char[] ch, int offset, int length) {
-            fIgnorableWhitespaceCount += length;
-        } // ignorableWhitespace(char[],int,int)
-
-        /** Characters. */
-        public void characters(char[] ch, int offset, int length) {
-            fCharactersCount += length;
-        } // characters(char[],int,int)
-
-        /** End document. */
-        public void endDocument() {
-            long timeAfter = System.currentTimeMillis();
-            System.out.print("Client: ");
-            System.out.print(timeAfter - fTimeBefore);
-            System.out.print(" ms (");
-            System.out.print(fElementCount);
-            System.out.print(" elems, ");
-            System.out.print(fAttributeCount);
-            System.out.print(" attrs, ");
-            System.out.print(fIgnorableWhitespaceCount);
-            System.out.print(" spaces, ");
-            System.out.print(fCharactersCount);
-            System.out.print(" chars)");
-            System.out.println();
-        } // endDocument()
-
-        //
-        // ErrorHandler methods
-        //
-
-        /** Warning. */
-        public void warning(SAXParseException e) throws SAXException {
-            System.out.println("Client: [warning] "+e.getMessage());
-        } // warning(SAXParseException)
-
-        /** Error. */
-        public void error(SAXParseException e) throws SAXException {
-            System.out.println("Client: [error] "+e.getMessage());
-        } // error(SAXParseException)
-
-        /** Fatal error. */
-        public void fatalError(SAXParseException e) throws SAXException {
-            System.out.println("Client: [fatal error] "+e.getMessage());
-            // on fatal error, skip to end of stream and end parse
-            try {
-                fWrappedInputStream.close();
-            }
-            catch (IOException ioe) {
-                // ignore
-            }
-            throw e;
-        } // fatalError(SAXParseException)
-
-        //
-        // Classes
-        //
-
-        /**
-         * This class reports the actual number of bytes read at the
-         * end of "stream".
-         *
-         * @author Andy Clark, IBM
-         */
-        class InputStreamReporter
-            extends FilterInputStream {
-
-            //
-            // Data
-            //
-
-            /** Total bytes read. */
-            private long fTotal;
-
-            //
-            // Constructors
-            //
-
-            /** Constructs a reporter from the specified input stream. */
-            public InputStreamReporter(InputStream stream) {
-                super(stream);
-            } // <init>(InputStream)
-
-            //
-            // InputStream methods
-            //
-
-            /** Reads a single byte. */
-            public int read() throws IOException {
-                int b = super.in.read();
-                if (b == -1) {
-                    System.out.println("Client: Read "+fTotal+" byte(s) total.");
-                    return -1;
-                }
-                fTotal++;
-                return b;
-            } // read():int
-
-            /** Reads a block of bytes. */
-            public int read(byte[] b, int offset, int length) 
-                throws IOException {
-                int count = super.in.read(b, offset, length);
-                if (count == -1) {
-                    System.out.println("Client: Read "+fTotal+" byte(s) total.");
-                    return -1;
-                }
-                fTotal += count;
-                if (Client.this.fVerbose) System.out.println("Client: Actually read "+count+" byte(s).");
-                return count;
-            } // read(byte[],int,int):int
-
-        } // class InputStreamReporter
-
-    } // class Client
-
-} // class KeepSocketOpen
diff --git a/samples/socket/io/WrappedInputStream.java b/samples/socket/io/WrappedInputStream.java
deleted file mode 100644
index bdf3294..0000000
--- a/samples/socket/io/WrappedInputStream.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package socket.io;
-
-import java.io.DataInputStream;
-import java.io.FilterInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * This input stream works in conjunction with the WrappedOutputStream
- * to introduce a protocol for reading arbitrary length data in a
- * uniform way.
- * <p>
- * <strong>Note:</strong> See the javadoc for WrappedOutputStream for
- * more information.
- *
- * @see WrappedOutputStream
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class WrappedInputStream
-    extends FilterInputStream {
-
-    //
-    // Data
-    //
-
-    /** Bytes left on input stream for current packet. */
-    protected int fPacketCount;
-
-    /** 
-     * Data input stream. This stream is used to input the block sizes
-     * from the data stream that are written by the WrappedOutputStream.
-     * <p>
-     * <strong>Note:</strong> The data input stream is only used for
-     * reading the byte count for performance reasons. We avoid the
-     * method indirection for reading the byte data.
-     */
-    protected DataInputStream fDataInputStream;
-
-    /** To mark that the stream is "closed". */
-    protected boolean fClosed;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a wrapper for the given an input stream. */
-    public WrappedInputStream(InputStream stream) {
-        super(stream);
-        fDataInputStream = new DataInputStream(stream);
-    } // <init>(InputStream)
-
-    //
-    // InputStream methods
-    //
-
-    /** Reads a single byte. */
-    public int read() throws IOException {
-
-        // ignore, if already closed
-        if (fClosed) {
-            return -1;
-        }
-
-        // read packet header
-        if (fPacketCount == 0) {
-            fPacketCount = fDataInputStream.readShort() & 0x0000FFFF;
-            if (fPacketCount == 0) {
-                fClosed = true;
-                return -1;
-            }
-        }
-
-        // read a byte from the packet
-        fPacketCount--;
-        return super.in.read();
-
-    } // read():int
-
-    /** 
-     * Reads a block of bytes and returns the total number of bytes read. 
-     */
-    public int read(byte[] b, int offset, int length) throws IOException {
-
-        // ignore, if already closed
-        if (fClosed) {
-            return -1;
-        }
-
-        // read packet header
-        if (fPacketCount == 0) {
-            fPacketCount = fDataInputStream.readShort() & 0x0000FFFF;
-            if (fPacketCount == 0) {
-                fClosed = true;
-                return -1;
-            }
-        }
-
-        // read bytes from packet
-        if (length > fPacketCount) {
-            length = fPacketCount;
-        }
-        int count = super.in.read(b, offset, length);
-        if (count == -1) {
-            // NOTE: This condition should not happen. The end of 
-            //       the stream should always be designated by a 
-            //       byte count header of 0. -Ac
-            fClosed = true;
-            return -1;
-        }
-        fPacketCount -= count;
-
-        // return total bytes read
-        return count;
-
-    } // read(byte[],int,int):int
-
-    /** Skips the specified number of bytes from the input stream. */
-    public long skip(long n) throws IOException {
-        if (!fClosed) {
-            // NOTE: This should be rewritten to be more efficient. -Ac
-            for (long i = 0; i < n; i++) {
-                int b = read();
-                if (b == -1) {
-                    return i + 1;
-                }
-            }
-            return n;
-        }
-        return 0;
-    } // skip(long):long
-
-    /** 
-     * Closes the input stream. This method will search for the end of
-     * the wrapped input, positioning the stream at after the end packet.
-     * <p>
-     * <strong>Note:</strong> This method does not close the underlying
-     * input stream.
-     */
-    public void close() throws IOException {
-        if (!fClosed) {
-            fClosed = true;
-            do {
-                super.in.skip(fPacketCount);
-                fPacketCount = fDataInputStream.readShort() & 0x0000FFFF;
-            } while (fPacketCount > 0);
-        }
-    } // close()
-
-} // class WrappedInputStream
diff --git a/samples/socket/io/WrappedOutputStream.java b/samples/socket/io/WrappedOutputStream.java
deleted file mode 100644
index f5ef885..0000000
--- a/samples/socket/io/WrappedOutputStream.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package socket.io;
-
-import java.io.DataOutputStream;
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * This output stream works in conjunction with the WrappedInputStream
- * to introduce a protocol for sending arbitrary length data in a
- * uniform way. This output stream allows variable length data to be
- * inserted into an existing output stream so that it can be read by
- * an input stream without reading too many bytes (in case of buffering
- * by the input stream).
- * <p>
- * This output stream is used like any normal output stream. The protocol
- * is introduced by the WrappedOutputStream and does not need to be known
- * by the user of this class. However, for those that are interested, the
- * method is described below.
- * <p>
- * The output stream writes the requested bytes as packets of binary
- * information. The packet consists of a header and payload. The header
- * is two bytes of a single unsigned short (written in network order) 
- * that specifies the length of bytes in the payload. A header value of
- * 0 indicates that the stream is "closed".
- * <p>
- * <strong>Note:</strong> For this wrapped output stream to be used,
- * the application <strong>must</strong> call <code>close()</code>
- * to end the output.
- *
- * @see WrappedInputStream
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class WrappedOutputStream
-    extends FilterOutputStream {
-
-    //
-    // Constants
-    //
-
-    /** Default buffer size (1024). */
-    public static final int DEFAULT_BUFFER_SIZE = 1024;
-
-    //
-    // Data
-    //
-
-    /** Buffer. */
-    protected byte[] fBuffer;
-
-    /** Buffer position. */
-    protected int fPosition;
-
-    /** 
-     * Data output stream. This stream is used to output the block sizes
-     * into the data stream that are read by the WrappedInputStream.
-     * <p>
-     * <strong>Note:</strong> The data output stream is only used for
-     * writing the byte count for performance reasons. We avoid the
-     * method indirection for writing the byte data.
-     */
-    protected DataOutputStream fDataOutputStream;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a wrapper for the given output stream. */
-    public WrappedOutputStream(OutputStream stream) {
-        this(stream, DEFAULT_BUFFER_SIZE);
-    } // <init>(OutputStream)
-
-    /** 
-     * Constructs a wrapper for the given output stream with the
-     * given buffer size.
-     */
-    public WrappedOutputStream(OutputStream stream, int bufferSize) {
-        super(stream);
-        fBuffer = new byte[bufferSize];
-        fDataOutputStream = new DataOutputStream(stream);
-    } // <init>(OutputStream)
-
-    //
-    // OutputStream methods
-    //
-
-    /** 
-     * Writes a single byte to the output. 
-     * <p>
-     * <strong>Note:</strong> Single bytes written to the output stream
-     * will be buffered
-     */
-    public void write(int b) throws IOException {
-        fBuffer[fPosition++] = (byte)b;
-        if (fPosition == fBuffer.length) {
-            fPosition = 0;
-            fDataOutputStream.writeShort(fBuffer.length);
-            write(fBuffer, 0, fBuffer.length);
-        }
-    } // write(int)
-
-    /** Writes an array of bytes to the output. */
-    public void write(byte[] b, int offset, int length) 
-        throws IOException {
-
-        // flush existing buffer
-        if (fPosition > 0) {
-            flush0();
-        }
-
-        // write header followed by actual bytes
-        fDataOutputStream.writeShort(length);
-        super.out.write(b, offset, length);
-
-    } // write(byte[])
-
-    /** 
-     * Flushes the output buffer, writing all bytes currently in
-     * the buffer to the output.
-     */
-    public void flush() throws IOException {
-        flush0();
-        super.out.flush();
-    } // flush()
-
-    /** 
-     * Closes the output stream. This method <strong>must</strong> be
-     * called when done writing all data to the output stream.
-     * <p>
-     * <strong>Note:</strong> This method does <em>not</em> close the
-     * actual output stream, only makes the input stream see the stream
-     * closed. Do not write bytes after closing the output stream.
-     */
-    public void close() throws IOException {
-        flush0();
-        fDataOutputStream.writeShort(0);
-        super.out.flush();
-    } // close()
-
-    //
-    // Protected methods
-    //
-
-    /** 
-     * Flushes the output buffer, writing all bytes currently in
-     * the buffer to the output. This method does not call the
-     * flush() method of the output stream; it merely writes the
-     * remaining bytes in the buffer.
-     */
-    public void flush0() throws IOException {
-        int length = fPosition;
-        fPosition = 0;
-        if (length > 0) {
-            fDataOutputStream.writeShort(length);
-            super.out.write(fBuffer, 0, length);
-        }
-    } // flush0()
-
-} // class WrappedOutputStream
diff --git a/samples/ui/DOMParserSaveEncoding.java b/samples/ui/DOMParserSaveEncoding.java
deleted file mode 100644
index 54e73f8..0000000
--- a/samples/ui/DOMParserSaveEncoding.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package ui;
-import org.xml.sax.InputSource;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.apache.xerces.util.EncodingMap;
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.xni.XNIException;
-
-/**
- *  The DOMParserSaveEncoding class extends DOMParser. It also provides
- *  the Java Encoding of the XML document by overriding the startDocument method 
- *  and providing a way to capture the MIME encoding from the XML document which
- *  in turn is converted to the Java Encoding by the internal MIME2Java class.
- *   
- */
-
-
-public class DOMParserSaveEncoding extends DOMParser {
-    String _mimeEncoding = "UTF8";//Default  MIME so we check the file.encoding
-    private void setMimeEncoding( String encoding ) {
-        _mimeEncoding = encoding;
-    }
-    private String getMimeEncoding() {
-        return(_mimeEncoding);
-    }
-    public String getJavaEncoding() {
-        String javaEncoding = null;
-        String mimeEncoding = getMimeEncoding();
-
-        if (mimeEncoding != null) {
-            if (mimeEncoding.equals( "DEFAULT" ))
-                javaEncoding =  "UTF8";
-            else if (mimeEncoding.equalsIgnoreCase( "UTF-16" ))
-                javaEncoding = "Unicode";
-            else
-                javaEncoding = EncodingMap.getIANA2JavaMapping( mimeEncoding );    
-        } else   // Should never return null
-            javaEncoding = "UTF8";
-        return(javaEncoding);
-    }
-    public void startEntity(String name, 
-                            String publicId, String systemId, 
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-        if( encoding != null){
-            setMimeEncoding( encoding);
-        }
-        super.startEntity(name, publicId, systemId, baseSystemId, encoding);
-    }
-
-}
-
diff --git a/samples/ui/DOMTree.java b/samples/ui/DOMTree.java
deleted file mode 100644
index f0bda83..0000000
--- a/samples/ui/DOMTree.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package ui;
-
-import java.io.Serializable;
-import javax.swing.JTree;
-import javax.swing.event.TreeModelEvent;
-import javax.swing.event.TreeModelListener;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.MutableTreeNode;
-import javax.swing.tree.TreeNode;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import java.util.Hashtable;
-
-/**
- * Displays a DOM document in a tree control.
- *
- * @author  Andy Clark, IBM
- * @version
- */
-public class DOMTree
-    extends JTree 
-    {
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public DOMTree() {
-        this(null);
-        }
-
-    /** Constructs a tree with the specified document. */
-    public DOMTree(Document document) {
-        super(new Model());
-
-        // set tree properties
-        setRootVisible(false);
-
-        // set properties
-        setDocument(document);
-
-        } // <init>()
-
-    //
-    // Public methods
-    //
-
-    /** Sets the document. */
-    public void setDocument(Document document) {
-        ((Model)getModel()).setDocument(document);
-        expandRow(0);
-        }
-
-    /** Returns the document. */
-    public Document getDocument() {
-        return ((Model)getModel()).getDocument();
-        }
-
-    /** get the org.w3c.Node for a MutableTreeNode. */
-    public Node getNode(Object treeNode) {
-        return ((Model)getModel()).getNode(treeNode);
-    }
-
-    //
-    // Classes
-    //
-
-    /**
-     * DOM tree model.
-     *
-     * @author  Andy Clark, IBM
-     * @version
-     */
-    static class Model 
-        extends DefaultTreeModel
-        implements Serializable
-        {
-
-        //
-        // Data
-        //
-
-        /** Document. */
-        private Document document;
-        /** Node Map. */
-        private Hashtable nodeMap = new Hashtable();
-        
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public Model() {
-            this(null);
-            }
-
-        /** Constructs a model from the specified document. */
-        public Model(Document document) {
-            super(new DefaultMutableTreeNode());
-            setDocument(document);
-            }
-
-        //
-        // Public methods
-        //
-
-        /** Sets the document. */
-        public synchronized void setDocument(Document document) {
-
-            // save document
-            this.document = document;
-
-            // clear tree and re-populate
-            ((DefaultMutableTreeNode)getRoot()).removeAllChildren();
-            nodeMap.clear();
-            buildTree();
-            fireTreeStructureChanged(this, new Object[] { getRoot() }, new int[0], new Object[0]);
-
-            } // setDocument(Document)
-
-        /** Returns the document. */
-        public Document getDocument() {
-            return document;
-            }
-
-        /** get the org.w3c.Node for a MutableTreeNode. */
-        public Node getNode(Object treeNode) {
-            return (Node)nodeMap.get(treeNode);
-        }
-
-        //
-        // Private methods
-        //
-
-        /** Builds the tree. */
-        private void buildTree() {
-            
-            // is there anything to do?
-            if (document == null) { return; }
-
-            // iterate over children of this node
-            NodeList nodes = document.getChildNodes();
-            int len = (nodes != null) ? nodes.getLength() : 0;
-            MutableTreeNode root = (MutableTreeNode)getRoot();
-            for (int i = 0; i < len; i++) {
-                Node node = nodes.item(i);
-                switch (node.getNodeType()) {
-                    case Node.DOCUMENT_NODE: {
-                        root = insertDocumentNode(node, root);
-                        break;
-                        }
-
-                    case Node.ELEMENT_NODE: {
-                        insertElementNode(node, root);
-                        break;
-                        }
-
-                    default: // ignore
-
-                    } // switch
-
-                } // for 
-
-            } // buildTree()
-
-        /** Inserts a node and returns a reference to the new node. */
-        private MutableTreeNode insertNode(String what, MutableTreeNode where) {
-
-            MutableTreeNode node = new DefaultMutableTreeNode(what);
-            insertNodeInto(node, where, where.getChildCount());
-            return node;
-
-            } // insertNode(Node,MutableTreeNode):MutableTreeNode
-            
-        /** Inserts the document node. */
-        private MutableTreeNode insertDocumentNode(Node what, MutableTreeNode where) {
-            MutableTreeNode treeNode = insertNode("<"+what.getNodeName()+'>', where);
-            nodeMap.put(treeNode, what);
-            return treeNode;
-            }
-
-        /** Inserts an element node. */
-        private MutableTreeNode insertElementNode(Node what, MutableTreeNode where) {
-
-            // build up name
-            StringBuffer name = new StringBuffer();
-            name.append('<');
-            name.append(what.getNodeName());
-            NamedNodeMap attrs = what.getAttributes();
-            int attrCount = (attrs != null) ? attrs.getLength() : 0;
-            for (int i = 0; i < attrCount; i++) {
-                Node attr = attrs.item(i);
-                name.append(' ');
-                name.append(attr.getNodeName());
-                name.append("=\"");
-                name.append(attr.getNodeValue());
-                name.append('"');
-                }
-            name.append('>');
-
-            // insert element node
-            
-            MutableTreeNode element = insertNode(name.toString(), where);
-            nodeMap.put(element, what);
-            
-            // gather up attributes and children nodes
-            NodeList children = what.getChildNodes();
-            int len = (children != null) ? children.getLength() : 0;
-            for (int i = 0; i < len; i++) {
-                Node node = children.item(i);
-                switch (node.getNodeType()) {
-                    case Node.CDATA_SECTION_NODE: { 
-                       insertCDataSectionNode( node, element ); //Add a Section Node
-                       break;
-                      }
-                    case Node.TEXT_NODE: {
-                        insertTextNode(node, element);
-                        break;
-                        }
-                    case Node.ELEMENT_NODE: {
-                        insertElementNode(node, element);
-                        break;
-                        }
-                    }
-                }
-
-            return element;
-
-            } // insertElementNode(Node,MutableTreeNode):MutableTreeNode
-
-        /** Inserts a text node. */
-        private MutableTreeNode insertTextNode(Node what, MutableTreeNode where) {
-            String value = what.getNodeValue().trim();
-            if (value.length() > 0) {
-                MutableTreeNode treeNode = insertNode(value, where);
-                nodeMap.put(treeNode, what);            
-                return treeNode;
-                }
-            return null;
-            }
-
-        
-      /** Inserts a CData Section Node. */
-      private MutableTreeNode insertCDataSectionNode(Node what, MutableTreeNode where) {
-         StringBuffer CSectionBfr = new StringBuffer();         
-         //--- optional --- CSectionBfr.append( "<![CDATA[" );
-         CSectionBfr.append( what.getNodeValue() );
-         //--- optional --- CSectionBfr.append( "]]>" );
-         if (CSectionBfr.length() > 0) {
-            MutableTreeNode treeNode = insertNode(CSectionBfr.toString(), where);
-            nodeMap.put(treeNode, what);            
-            return treeNode;
-            }
-         return null;
-         }
-
-
-      } // class Model
-
-
-
-    } // class DOMTree
diff --git a/samples/ui/DOMTreeFull.java b/samples/ui/DOMTreeFull.java
deleted file mode 100644
index bca6867..0000000
--- a/samples/ui/DOMTreeFull.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package ui;
-
-
-import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
-import javax.swing.JTree;
-import javax.swing.event.TreeModelEvent;
-import javax.swing.event.TreeModelListener;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.MutableTreeNode;
-import javax.swing.tree.TreeNode;
-
-import org.w3c.dom.*;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-/**
- *  DOMTree class to enter every DOM node into a Swing JTree tree.
- *  The forward and backward mappings between Nodes to TreeNodes are kept.
- *
- */
-public class DOMTreeFull
-    extends JTree 
-    {
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public DOMTreeFull() {
-        this(null);
-        }
-
-    /** Constructs a tree with the specified document. */
-    public DOMTreeFull(Node root) {
-        super(new Model());
-
-        // set tree properties
-        setRootVisible(false);
-
-        // set properties
-        setRootNode(root);
-
-        } // <init>()
-
-    //
-    // Public methods
-    //
-
-    /** Sets the root. */
-    public void setRootNode(Node root) {
-        ((Model)getModel()).setRootNode(root);
-        expandRow(0);
-        }
-
-    /** Returns the root. */
-    public Node getRootNode() {
-        return ((Model)getModel()).getRootNode();
-        }
-
-    /** get the org.w3c.Node for a MutableTreeNode. */
-    public Node getNode(Object treeNode) {
-        return ((Model)getModel()).getNode(treeNode);
-    }
-
-    /** get the TreeNode for the org.w3c.Node */
-    public TreeNode getTreeNode(Object node) {
-        return ((Model)getModel()).getTreeNode(node);
-    }
-
-    //
-    // Classes
-    //
-
-    /**
-     * DOM tree model.
-     *
-     */
-    public static class Model 
-        extends DefaultTreeModel
-        implements Serializable
-        {
-
-        //
-        // Data
-        //
-
-        /** Root. */
-        private Node root;
-        /** Node Map. */
-        private Hashtable nodeMap = new Hashtable();
-        /** Tree Node Map. */
-        private Hashtable treeNodeMap = new Hashtable();        
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public Model() {
-            this(null);
-            }
-
-        /** Constructs a model from the specified root. */
-        public Model(Node node) {
-            super(new DefaultMutableTreeNode());
-            if (node!=null)
-            setRootNode(node);
-            }
-
-        //
-        // Public methods
-        //
-
-        /** Sets the root. */
-        public synchronized void setRootNode(Node root) {
-            
-            // save root
-            this.root = root;
-
-            // clear tree and re-populate
-            DefaultMutableTreeNode where = (DefaultMutableTreeNode)getRoot();
-            where.removeAllChildren();
-            nodeMap.clear();
-            treeNodeMap.clear();
-
-            buildTree(root, where);
-            
-            fireTreeStructureChanged(this, new Object[] { getRoot() }, new int[0], new Object[0]);
-
-            } // setRootNode(Node)
-
-        /** Returns the root. */
-        public Node getRootNode() {
-            return root;
-            }
-
-        /** get the org.w3c.Node for a MutableTreeNode. */
-        public Node getNode(Object treeNode) {
-            return (Node)nodeMap.get(treeNode);
-        }
-        public Hashtable getAllNodes() {
-            return nodeMap;
-        }
-        /** get the org.w3c.Node for a MutableTreeNode. */
-        public TreeNode getTreeNode(Object node) {
-            Object object = treeNodeMap.get(node);
-            return (TreeNode)object;
-        }
-
-        //
-        // Private methods
-        //
-
-        /** Builds the tree. */
-        private void buildTree(Node node, MutableTreeNode where) {
-            
-            // is there anything to do?
-            if (node == null) { return; }
-
-            MutableTreeNode treeNode = insertNode(node, where);
-
-            // iterate over children of this node
-            NodeList nodes = node.getChildNodes();
-            int len = (nodes != null) ? nodes.getLength() : 0;
-            for (int i = 0; i < len; i++) {
-                Node child = nodes.item(i);
-                buildTree(child, treeNode);
-
-            }
-
-
-        } // buildTree()
-
-        /** Inserts a node and returns a reference to the new node. */
-        private MutableTreeNode insertNode(String what, MutableTreeNode where) {
-
-            MutableTreeNode node = new DefaultMutableTreeNode(what);
-            insertNodeInto(node, where, where.getChildCount());
-            return node;
-
-            } // insertNode(Node,MutableTreeNode):MutableTreeNode
-            
-
-        /** Inserts a text node. */
-        public MutableTreeNode insertNode(Node what, MutableTreeNode where) {
-                MutableTreeNode treeNode = insertNode(DOMTreeFull.toString(what), where);
-                nodeMap.put(treeNode, what); 
-                treeNodeMap.put(what, treeNode);
-                return treeNode;
-            }
-        } // class Model
-        
-        public static String whatArray[] = new String [] { 
-                "ALL",
-                "ELEMENT",
-                "ATTRIBUTE",
-                "TEXT",
-                "CDATA_SECTION",
-                "ENTITY_REFERENCE",
-                "ENTITY",
-                "PROCESSING_INSTRUCTION", 
-                "COMMENT", 
-                "DOCUMENT", 
-                "DOCUMENT_TYPE",
-                "DOCUMENT_FRAGMENT",
-                "NOTATION" 
-                };
-        //
-        // Public methods
-        //
-                
-        public static String toString(Node node) {
-            StringBuffer sb = new StringBuffer();
-                
-            // is there anything to do?
-            if (node == null) {
-                return "";
-            }
-
-            int type = node.getNodeType();
-            sb.append(whatArray[type]);
-            sb.append(" : ");
-            sb.append(node.getNodeName());
-            String value = node.getNodeValue();
-            if (value != null) {
-                sb.append(" Value: \"");
-                sb.append(value);
-                sb.append("\"");
-            }
-                    
-            switch (type) {
-                    
-                // document
-                case Node.DOCUMENT_NODE: {
-                    break;
-                }
-
-                // element with attributes
-                case Node.ELEMENT_NODE: {
-                    Attr attrs[] = sortAttributes(node.getAttributes());
-                    if (attrs.length > 0)
-                        sb.append(" ATTRS:");
-                    for (int i = 0; i < attrs.length; i++) {
-                        Attr attr = attrs[i];
-                            
-                        sb.append(' ');
-                        sb.append(attr.getNodeName());
-                        sb.append("=\"");
-                        sb.append(normalize(attr.getNodeValue()));
-                        sb.append('"');
-                    }
-                    sb.append('>');
-                    break;
-                }
-
-                // handle entity reference nodes
-                case Node.ENTITY_REFERENCE_NODE: {
-                    break;
-                }
-
-                // cdata sections
-                case Node.CDATA_SECTION_NODE: {
-                    break;
-                }
-
-                // text
-                case Node.TEXT_NODE: {
-                    break;
-                }
-
-                // processing instruction
-                case Node.PROCESSING_INSTRUCTION_NODE: {
-                    break;
-                }
-                    
-                // comment node 
-                case Node.COMMENT_NODE: {
-                    break;
-                }
-                // DOCTYPE node
-                case Node.DOCUMENT_TYPE_NODE: {
-                    break;
-                }
-                // Notation node
-                case Node.NOTATION_NODE: {
-                        sb.append("public:");
-                        String id = ((Notation)node).getPublicId();
-                        if (id == null) {
-                            sb.append("PUBLIC ");
-                            sb.append(id);
-                            sb.append(" ");
-                        }
-                        id = ((Notation)node).getSystemId();
-                        if (id == null) {
-                            sb.append("system: ");
-                            sb.append(id);
-                            sb.append(" ");
-                        }
-                    break;
-                }
-            }
-            return sb.toString();
-        }
-            
-        /** Normalizes the given string. */
-        static protected String normalize(String s) {
-            StringBuffer str = new StringBuffer();
-
-            int len = (s != null) ? s.length() : 0;
-            for (int i = 0; i < len; i++) {
-                char ch = s.charAt(i);
-                switch (ch) {
-                    case '<': {
-                        str.append("&lt;");
-                        break;
-                    }
-                    case '>': {
-                        str.append("&gt;");
-                        break;
-                    }
-                    case '&': {
-                        str.append("&amp;");
-                        break;
-                    }
-                    case '"': {
-                        str.append("&quot;");
-                        break;
-                    }
-                    case '\r':
-                    case '\n': 
-                    default: {
-                        str.append(ch);
-                    }
-                }
-            }
-
-            return str.toString();
-
-        } // normalize(String):String
-
-        /** Returns a sorted list of attributes. */
-        static protected Attr[] sortAttributes(NamedNodeMap attrs) {
-
-            int len = (attrs != null) ? attrs.getLength() : 0;
-            Attr array[] = new Attr[len];
-            for (int i = 0; i < len; i++) {
-                array[i] = (Attr)attrs.item(i);
-            }
-            for (int i = 0; i < len - 1; i++) {
-                String name  = array[i].getNodeName();
-                int    index = i;
-                for (int j = i + 1; j < len; j++) {
-                    String curName = array[j].getNodeName();
-                    if (curName.compareTo(name) < 0) {
-                        name  = curName;
-                        index = j;
-                    }
-                }
-                if (index != i) {
-                    Attr temp    = array[i];
-                    array[i]     = array[index];
-                    array[index] = temp;
-                }
-            }
-
-            return array;
-
-        } // sortAttributes(NamedNodeMap):Attr[]        
-
-    } // class DOMTreeFull
-
diff --git a/samples/ui/DefaultImages.java b/samples/ui/DefaultImages.java
deleted file mode 100644
index 8a436e3..0000000
--- a/samples/ui/DefaultImages.java
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package ui;
-
-import java.awt.*;
-
-public class DefaultImages {
-
-    public static java.awt.Image createOpenFolderImage() {
-        byte data[] = {
-            (byte) 71, (byte) 73, (byte) 70, (byte) 56, (byte) 57, (byte) 97,
-            (byte) 18, (byte)  0, (byte) 15, (byte)  0, (byte)247, (byte)  0,
-            (byte)  0, (byte) 74, (byte) 99, (byte)123, (byte) 99, (byte) 99,
-            (byte) 99, (byte)156, (byte)156, (byte) 99, (byte)206, (byte)206,
-            (byte) 99, (byte)206, (byte)206, (byte)156, (byte)239, (byte)231,
-            (byte)115, (byte)247, (byte)239, (byte)132, (byte)247, (byte)247,
-            (byte)247, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte) 33, (byte)249, (byte)  4, (byte)  1, (byte)  0,
-            (byte)  0, (byte)  8, (byte)  0, (byte) 44, (byte)  0, (byte)  0,
-            (byte)  0, (byte)  0, (byte) 18, (byte)  0, (byte) 15, (byte)  0,
-            (byte) 64, (byte)  8, (byte)106, (byte)  0, (byte) 17, (byte)  8,
-            (byte) 28, (byte) 72, (byte)176, (byte) 32, (byte)193, (byte)  1,
-            (byte)  7, (byte) 12, (byte) 40, (byte) 92, (byte)200, (byte)112,
-            (byte) 64, (byte)  0, (byte)  1, (byte)  1, (byte)  6, (byte) 14,
-            (byte) 40, (byte) 64, (byte)177, (byte)162, (byte) 69, (byte)138,
-            (byte) 16, (byte) 15, (byte) 14, (byte)216, (byte)200, (byte)177,
-            (byte)227, (byte)198, (byte)136, (byte) 18, (byte) 45, (byte) 14,
-            (byte) 16, (byte) 96, (byte) 80, (byte)226, (byte)129, (byte)147,
-            (byte) 40, (byte) 83, (byte) 58, (byte) 20, (byte)144, (byte) 81,
-            (byte) 32, (byte) 66, (byte)134, (byte) 48, (byte) 13, (byte) 56,
-            (byte)  4, (byte) 89, (byte)178, (byte)166, (byte)193, (byte)142,
-            (byte) 36, (byte)109, (byte) 34, (byte)152, (byte)120, (byte)209,
-            (byte)227, (byte)200, (byte)131, (byte)  4, (byte)130, (byte) 10,
-            (byte) 29, (byte) 42, (byte)160, (byte) 64, (byte)203, (byte)151,
-            (byte) 49, (byte) 21, (byte)174, (byte)108, (byte)185, (byte) 51,
-            (byte) 97, (byte) 82, (byte)153, (byte) 15, (byte)105, (byte) 54,
-            (byte)125, (byte) 10, (byte) 85, (byte) 42, (byte)130, (byte)  0,
-            (byte) 88, (byte)179, (byte)106, (byte)205, (byte)138, (byte) 32,
-            (byte) 32, (byte)  0, (byte) 59
-            };
-
-        return java.awt.Toolkit.getDefaultToolkit().createImage(data);
-        }
-    public static java.awt.Image createClosedFolderImage() {
-        byte data[] = {
-            (byte) 71, (byte) 73, (byte) 70, (byte) 56, (byte) 57, (byte) 97,
-            (byte) 18, (byte)  0, (byte) 15, (byte)  0, (byte)247, (byte)  0,
-            (byte)  0, (byte) 99, (byte) 99, (byte) 99, (byte)156, (byte)156,
-            (byte) 99, (byte)206, (byte)206, (byte) 99, (byte)239, (byte)231,
-            (byte)115, (byte)247, (byte)239, (byte)132, (byte)247, (byte)247,
-            (byte)247, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte)255, (byte)255, (byte)255, (byte)255, (byte)255,
-            (byte)255, (byte) 33, (byte)249, (byte)  4, (byte)  1, (byte)  0,
-            (byte)  0, (byte)  6, (byte)  0, (byte) 44, (byte)  0, (byte)  0,
-            (byte)  0, (byte)  0, (byte) 18, (byte)  0, (byte) 15, (byte)  0,
-            (byte) 64, (byte)  8, (byte) 91, (byte)  0, (byte) 13, (byte)  8,
-            (byte) 28, (byte) 72, (byte)176, (byte) 32, (byte) 65, (byte)  1,
-            (byte)  5, (byte)  8, (byte) 40, (byte) 92, (byte)200, (byte) 80,
-            (byte) 97, (byte)  0, (byte)  0, (byte)  2, (byte) 17, (byte) 22,
-            (byte)152, (byte) 72, (byte)177, (byte)226, (byte)196, (byte)135,
-            (byte) 17, (byte)  5, (byte)104, (byte)220, (byte)200, (byte)113,
-            (byte) 35, (byte)198, (byte)136, (byte)  3, (byte) 66, (byte) 14,
-            (byte) 16, (byte) 16, (byte)192, (byte)224, (byte)193, (byte)132,
-            (byte) 13, (byte) 83, (byte)126, (byte) 68, (byte)152, (byte) 82,
-            (byte) 37, (byte) 68, (byte)147, (byte) 48, (byte) 13, (byte)114,
-            (byte) 44, (byte) 25, (byte)211, (byte) 64, (byte)199, (byte)155,
-            (byte) 30, (byte)  7, (byte)178, (byte)108, (byte)201, (byte)112,
-            (byte) 37, (byte) 74, (byte)158, (byte) 14, (byte) 95, (byte)238,
-            (byte)  4, (byte) 74, (byte)192, (byte) 39, (byte)209, (byte)160,
-            (byte)  2, (byte)  1, (byte) 40, (byte) 93, (byte)202, (byte)180,
-            (byte) 41, (byte)196, (byte)128, (byte)  0, (byte)  0, (byte) 59
-            };
-
-        return java.awt.Toolkit.getDefaultToolkit().createImage(data);
-        }
-    public static java.awt.Image createLeafImage() {
-        byte data[] = {
-            (byte) 71, (byte) 73, (byte) 70, (byte) 56, (byte) 57, (byte) 97,
-            (byte) 14, (byte)  0, (byte) 15, (byte)  0, (byte)247, (byte)  0,
-            (byte)  0, (byte)  0, (byte)  0, (byte)  0, (byte)  1, (byte)  1,
-            (byte)  1, (byte)  2, (byte)  2, (byte)  2, (byte)  3, (byte)  3,
-            (byte)  3, (byte)  4, (byte)  4, (byte)  4, (byte)  5, (byte)  5,
-            (byte)  5, (byte)  6, (byte)  6, (byte)  6, (byte)  7, (byte)  7,
-            (byte)  7, (byte)  8, (byte)  8, (byte)  8, (byte)  9, (byte)  9,
-            (byte)  9, (byte) 10, (byte) 10, (byte) 10, (byte) 11, (byte) 11,
-            (byte) 11, (byte) 12, (byte) 12, (byte) 12, (byte) 13, (byte) 13,
-            (byte) 13, (byte) 14, (byte) 14, (byte) 14, (byte) 15, (byte) 15,
-            (byte) 15, (byte) 16, (byte) 16, (byte) 16, (byte) 17, (byte) 17,
-            (byte) 17, (byte) 18, (byte) 18, (byte) 18, (byte) 19, (byte) 19,
-            (byte) 19, (byte) 20, (byte) 20, (byte) 20, (byte) 21, (byte) 21,
-            (byte) 21, (byte) 22, (byte) 22, (byte) 22, (byte) 23, (byte) 23,
-            (byte) 23, (byte) 24, (byte) 24, (byte) 24, (byte) 25, (byte) 25,
-            (byte) 25, (byte) 26, (byte) 26, (byte) 26, (byte) 27, (byte) 27,
-            (byte) 27, (byte) 28, (byte) 28, (byte) 28, (byte) 29, (byte) 29,
-            (byte) 29, (byte) 30, (byte) 30, (byte) 30, (byte) 31, (byte) 31,
-            (byte) 31, (byte) 32, (byte) 32, (byte) 32, (byte) 33, (byte) 33,
-            (byte) 33, (byte) 34, (byte) 34, (byte) 34, (byte) 35, (byte) 35,
-            (byte) 35, (byte) 36, (byte) 36, (byte) 36, (byte) 37, (byte) 37,
-            (byte) 37, (byte) 38, (byte) 38, (byte) 38, (byte) 39, (byte) 39,
-            (byte) 39, (byte) 40, (byte) 40, (byte) 40, (byte) 41, (byte) 41,
-            (byte) 41, (byte) 42, (byte) 42, (byte) 42, (byte) 43, (byte) 43,
-            (byte) 43, (byte) 44, (byte) 44, (byte) 44, (byte) 45, (byte) 45,
-            (byte) 45, (byte) 46, (byte) 46, (byte) 46, (byte) 47, (byte) 47,
-            (byte) 47, (byte) 48, (byte) 48, (byte) 48, (byte) 49, (byte) 49,
-            (byte) 49, (byte) 50, (byte) 50, (byte) 50, (byte) 51, (byte) 51,
-            (byte) 51, (byte) 52, (byte) 52, (byte) 52, (byte) 53, (byte) 53,
-            (byte) 53, (byte) 54, (byte) 54, (byte) 54, (byte) 55, (byte) 55,
-            (byte) 55, (byte) 56, (byte) 56, (byte) 56, (byte) 57, (byte) 57,
-            (byte) 57, (byte) 58, (byte) 58, (byte) 58, (byte) 59, (byte) 59,
-            (byte) 59, (byte) 60, (byte) 60, (byte) 60, (byte) 61, (byte) 61,
-            (byte) 61, (byte) 62, (byte) 62, (byte) 62, (byte) 63, (byte) 63,
-            (byte) 63, (byte) 64, (byte) 64, (byte) 64, (byte) 65, (byte) 65,
-            (byte) 65, (byte) 66, (byte) 66, (byte) 66, (byte) 67, (byte) 67,
-            (byte) 67, (byte) 68, (byte) 68, (byte) 68, (byte) 69, (byte) 69,
-            (byte) 69, (byte) 70, (byte) 70, (byte) 70, (byte) 71, (byte) 71,
-            (byte) 71, (byte) 72, (byte) 72, (byte) 72, (byte) 73, (byte) 73,
-            (byte) 73, (byte) 74, (byte) 74, (byte) 74, (byte) 75, (byte) 75,
-            (byte) 75, (byte) 76, (byte) 76, (byte) 76, (byte) 77, (byte) 77,
-            (byte) 77, (byte) 78, (byte) 78, (byte) 78, (byte) 79, (byte) 79,
-            (byte) 79, (byte) 80, (byte) 80, (byte) 80, (byte) 81, (byte) 81,
-            (byte) 81, (byte) 82, (byte) 82, (byte) 82, (byte) 83, (byte) 83,
-            (byte) 83, (byte) 84, (byte) 84, (byte) 84, (byte) 85, (byte) 85,
-            (byte) 85, (byte) 86, (byte) 86, (byte) 86, (byte) 87, (byte) 87,
-            (byte) 87, (byte) 88, (byte) 88, (byte) 88, (byte) 89, (byte) 89,
-            (byte) 89, (byte) 90, (byte) 90, (byte) 90, (byte) 91, (byte) 91,
-            (byte) 91, (byte) 92, (byte) 92, (byte) 92, (byte) 93, (byte) 93,
-            (byte) 93, (byte) 94, (byte) 94, (byte) 94, (byte) 95, (byte) 95,
-            (byte) 95, (byte) 96, (byte) 96, (byte) 96, (byte) 97, (byte) 97,
-            (byte) 97, (byte) 98, (byte) 98, (byte) 98, (byte) 99, (byte) 99,
-            (byte) 99, (byte)100, (byte)100, (byte)100, (byte)101, (byte)101,
-            (byte)101, (byte)102, (byte)102, (byte)102, (byte)103, (byte)103,
-            (byte)103, (byte)104, (byte)104, (byte)104, (byte)105, (byte)105,
-            (byte)105, (byte)106, (byte)106, (byte)106, (byte)107, (byte)107,
-            (byte)107, (byte)108, (byte)108, (byte)108, (byte)109, (byte)109,
-            (byte)109, (byte)110, (byte)110, (byte)110, (byte)111, (byte)111,
-            (byte)111, (byte)112, (byte)112, (byte)112, (byte)113, (byte)113,
-            (byte)113, (byte)114, (byte)114, (byte)114, (byte)115, (byte)115,
-            (byte)115, (byte)116, (byte)116, (byte)116, (byte)117, (byte)117,
-            (byte)117, (byte)118, (byte)118, (byte)118, (byte)119, (byte)119,
-            (byte)119, (byte)120, (byte)120, (byte)120, (byte)121, (byte)121,
-            (byte)121, (byte)122, (byte)122, (byte)122, (byte)123, (byte)123,
-            (byte)123, (byte)124, (byte)124, (byte)124, (byte)125, (byte)125,
-            (byte)125, (byte)126, (byte)126, (byte)126, (byte)127, (byte)127,
-            (byte)127, (byte)128, (byte)128, (byte)128, (byte)129, (byte)129,
-            (byte)129, (byte)130, (byte)130, (byte)130, (byte)131, (byte)131,
-            (byte)131, (byte)132, (byte)132, (byte)132, (byte)133, (byte)133,
-            (byte)133, (byte)134, (byte)134, (byte)134, (byte)135, (byte)135,
-            (byte)135, (byte)136, (byte)136, (byte)136, (byte)137, (byte)137,
-            (byte)137, (byte)138, (byte)138, (byte)138, (byte)139, (byte)139,
-            (byte)139, (byte)140, (byte)140, (byte)140, (byte)141, (byte)141,
-            (byte)141, (byte)142, (byte)142, (byte)142, (byte)143, (byte)143,
-            (byte)143, (byte)144, (byte)144, (byte)144, (byte)145, (byte)145,
-            (byte)145, (byte)146, (byte)146, (byte)146, (byte)147, (byte)147,
-            (byte)147, (byte)148, (byte)148, (byte)148, (byte)149, (byte)149,
-            (byte)149, (byte)150, (byte)150, (byte)150, (byte)151, (byte)151,
-            (byte)151, (byte)152, (byte)152, (byte)152, (byte)153, (byte)153,
-            (byte)153, (byte)154, (byte)154, (byte)154, (byte)155, (byte)155,
-            (byte)155, (byte)156, (byte)156, (byte)156, (byte)157, (byte)157,
-            (byte)157, (byte)158, (byte)158, (byte)158, (byte)159, (byte)159,
-            (byte)159, (byte)160, (byte)160, (byte)160, (byte)161, (byte)161,
-            (byte)161, (byte)162, (byte)162, (byte)162, (byte)163, (byte)163,
-            (byte)163, (byte)164, (byte)164, (byte)164, (byte)165, (byte)165,
-            (byte)165, (byte)166, (byte)166, (byte)166, (byte)167, (byte)167,
-            (byte)167, (byte)168, (byte)168, (byte)168, (byte)169, (byte)169,
-            (byte)169, (byte)170, (byte)170, (byte)170, (byte)171, (byte)171,
-            (byte)171, (byte)172, (byte)172, (byte)172, (byte)173, (byte)173,
-            (byte)173, (byte)174, (byte)174, (byte)174, (byte)175, (byte)175,
-            (byte)175, (byte)176, (byte)176, (byte)176, (byte)177, (byte)177,
-            (byte)177, (byte)178, (byte)178, (byte)178, (byte)179, (byte)179,
-            (byte)179, (byte)180, (byte)180, (byte)180, (byte)181, (byte)181,
-            (byte)181, (byte)182, (byte)182, (byte)182, (byte)183, (byte)183,
-            (byte)183, (byte)184, (byte)184, (byte)184, (byte)185, (byte)185,
-            (byte)185, (byte)186, (byte)186, (byte)186, (byte)187, (byte)187,
-            (byte)187, (byte)188, (byte)188, (byte)188, (byte)189, (byte)189,
-            (byte)189, (byte)190, (byte)190, (byte)190, (byte)191, (byte)191,
-            (byte)191, (byte)192, (byte)192, (byte)192, (byte)193, (byte)193,
-            (byte)193, (byte)194, (byte)194, (byte)194, (byte)195, (byte)195,
-            (byte)195, (byte)196, (byte)196, (byte)196, (byte)197, (byte)197,
-            (byte)197, (byte)198, (byte)198, (byte)198, (byte)199, (byte)199,
-            (byte)199, (byte)200, (byte)200, (byte)200, (byte)201, (byte)201,
-            (byte)201, (byte)202, (byte)202, (byte)202, (byte)203, (byte)203,
-            (byte)203, (byte)204, (byte)204, (byte)204, (byte)205, (byte)205,
-            (byte)205, (byte)206, (byte)206, (byte)206, (byte)207, (byte)207,
-            (byte)207, (byte)208, (byte)208, (byte)208, (byte)209, (byte)209,
-            (byte)209, (byte)210, (byte)210, (byte)210, (byte)211, (byte)211,
-            (byte)211, (byte)212, (byte)212, (byte)212, (byte)213, (byte)213,
-            (byte)213, (byte)214, (byte)214, (byte)214, (byte)215, (byte)215,
-            (byte)215, (byte)216, (byte)216, (byte)216, (byte)217, (byte)217,
-            (byte)217, (byte)218, (byte)218, (byte)218, (byte)219, (byte)219,
-            (byte)219, (byte)220, (byte)220, (byte)220, (byte)221, (byte)221,
-            (byte)221, (byte)222, (byte)222, (byte)222, (byte)223, (byte)223,
-            (byte)223, (byte)224, (byte)224, (byte)224, (byte)225, (byte)225,
-            (byte)225, (byte)226, (byte)226, (byte)226, (byte)227, (byte)227,
-            (byte)227, (byte)228, (byte)228, (byte)228, (byte)229, (byte)229,
-            (byte)229, (byte)230, (byte)230, (byte)230, (byte)231, (byte)231,
-            (byte)231, (byte)232, (byte)232, (byte)232, (byte)233, (byte)233,
-            (byte)233, (byte)234, (byte)234, (byte)234, (byte)235, (byte)235,
-            (byte)235, (byte)236, (byte)236, (byte)236, (byte)237, (byte)237,
-            (byte)237, (byte)238, (byte)238, (byte)238, (byte)239, (byte)239,
-            (byte)239, (byte)240, (byte)240, (byte)240, (byte)241, (byte)241,
-            (byte)241, (byte)242, (byte)242, (byte)242, (byte)243, (byte)243,
-            (byte)243, (byte)244, (byte)244, (byte)244, (byte)245, (byte)245,
-            (byte)245, (byte)246, (byte)246, (byte)246, (byte)247, (byte)247,
-            (byte)247, (byte)248, (byte)248, (byte)248, (byte)249, (byte)249,
-            (byte)249, (byte)250, (byte)250, (byte)250, (byte)251, (byte)251,
-            (byte)251, (byte)252, (byte)252, (byte)252, (byte)253, (byte)253,
-            (byte)253, (byte)254, (byte)254, (byte)254, (byte)255, (byte)255,
-            (byte)255, (byte) 33, (byte)249, (byte)  4, (byte)  1, (byte)  0,
-            (byte)  0, (byte) 87, (byte)  0, (byte) 44, (byte)  0, (byte)  0,
-            (byte)  0, (byte)  0, (byte) 14, (byte)  0, (byte) 15, (byte)  0,
-            (byte) 64, (byte)  8, (byte) 72, (byte)  0, (byte)  1, (byte)  8,
-            (byte) 28, (byte) 72, (byte) 16, (byte)192, (byte)149, (byte)131,
-            (byte)  0, (byte)254, (byte) 41, (byte) 92, (byte)200, (byte) 80,
-            (byte)161, (byte)192, (byte)134, (byte) 16, (byte)255, (byte) 61,
-            (byte)140, (byte)200, (byte)112, (byte) 98, (byte) 68, (byte)  0,
-            (byte)231, (byte)  8, (byte) 93, (byte) 73, (byte) 72, (byte)113,
-            (byte)161, (byte)197, (byte)142, (byte)  5, (byte) 67, (byte) 22,
-            (byte)  4, (byte)169, (byte)113, (byte)163, (byte) 66, (byte) 66,
-            (byte) 40, (byte) 81, (byte) 58, (byte) 36, (byte)120, (byte) 50,
-            (byte)165, (byte)203, (byte)149, (byte) 45, (byte) 93, (byte)170,
-            (byte)148, (byte)200, (byte) 81, (byte)102, (byte) 74, (byte)152,
-            (byte)255, (byte)108, (byte)206, (byte)252, (byte) 72, (byte) 17,
-            (byte) 64, (byte) 64, (byte)  0, (byte)  0, (byte) 59
-            };
-
-        return java.awt.Toolkit.getDefaultToolkit().createImage(data);
-        }
-
-}
diff --git a/samples/ui/TreeView.java b/samples/ui/TreeView.java
deleted file mode 100644
index a08bbd6..0000000
--- a/samples/ui/TreeView.java
+++ /dev/null
@@ -1,948 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package ui;                    
-                    
-
-import java.awt.*;
-import java.awt.event.*;
-import java.util.*;
-import java.io.*;
-import javax.swing.*;
-import javax.swing.tree.*;
-import javax.swing.event.*;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Element;
-import org.w3c.dom.Text;
-import org.xml.sax.InputSource;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.apache.xerces.parsers.DOMParser;
-import ui.DOMParserSaveEncoding;
-
-
-
-/**
- * A sample DOM Tree Viewer. This sample program illustrates how to
- * traverse a DOM tree and display it in a Swing JTree View.
- *
- * @version
- */
-public class TreeView extends JFrame implements ActionListener, TextListener {
-
-    //
-    // Constants
-    //
-
-    static final boolean DEBUG = true;
-  
-    /** Default parser name. */
-    static final String 
-        DEFAULT_PARSER_NAME = "org.apache.xerces.parsers.DOMParser";
-    static int WARNING = 0;
-    static int ERROR=1;
-    static int FATAL_ERROR=2;
-        
-
-    static final String title = "TreeViewer";
-    static final String openString = "Open";
-    static final String quitString = "Quit";
-    static final String reloadString = "Reload current XML file";
-    static final String expandString = "Expand Tree";
-    static final String collapseString = "Collapse Tree";
-
-    //
-    // Data
-    //
-
-    ErrorStorer ef;
-    String fname;
-    DOMTree m_tree;
-    JTextArea sourceText, messageText;
-    Vector textLine;
-    FileNameInput fni;
-    DOMParserSaveEncoding parser;
-    Image openFolder;
-    Image closedFolder;
-    Image leafImage;
-
-    /**
-     *  Constructor
-     */
-    public TreeView() {
-        this(null);
-    }
-
-    /**
-     *  Constructor
-     */
-    public TreeView(String uri) {
-        super(uri);
-        openFolder = DefaultImages.createOpenFolderImage();
-        closedFolder = DefaultImages.createClosedFolderImage();
-        leafImage = DefaultImages.createLeafImage();
-        parser = new DOMParserSaveEncoding();
-        ef = new ErrorStorer();
-        fname = uri;
-        JMenuBar jmb = new JMenuBar();
-        JMenu fileMenu = new JMenu("File");
-        JMenuItem item;
-
-        item = new JMenuItem(openString);
-        fileMenu.add(item);
-        item.addActionListener(this);
-
-        item = new JMenuItem(quitString);
-        fileMenu.add(item);
-        item.addActionListener(this);
-
-        JMenu shortcutMenu = new JMenu("Shortcuts");
-
-        item = new JMenuItem(expandString);
-        shortcutMenu.add(item);
-        item.addActionListener(this);
-
-        item = new JMenuItem(collapseString);
-        shortcutMenu.add(item);
-        item.addActionListener(this);
-
-        item = new JMenuItem(reloadString);
-        shortcutMenu.add(item);
-        item.addActionListener(this);
-
-        jmb.add(fileMenu);
-        jmb.add(shortcutMenu);
-        setJMenuBar(jmb);
-
-        getContentPane().add(createUI(fname));
-        
-    }
-
-    /** create and return the entire UI from the root TreeNode
-     */
-    JComponent createUI(String filename) {
-        if (DEBUG) System.out.println("START createUI:"+filename);
-
-        // create the message panel first so we can send messages to it...
-        messageText = new JTextArea(3,40);
-        messageText.setFont(new Font("dialog", Font.PLAIN, 12));
-        JPanel messagePanel = new JPanel(new BorderLayout());
-        messagePanel.add(new JScrollPane(messageText) {
-            public Dimension getPreferredSize(){
-                Dimension size = TreeView.this.getSize();
-                return new Dimension(size.width, size.height / 4);
-                }
-            public Dimension getMinimumSize(){
-                return new Dimension(100, 100);
-                }
-            },
-            BorderLayout.CENTER);
-        messagePanel.setBorder(BorderFactory.createCompoundBorder(
-            BorderFactory.createTitledBorder("Messages"),
-            BorderFactory.createEmptyBorder(4, 4, 4, 4)
-            ));
-
-        // create the TextArea for XML source
-        sourceText = new JTextArea();
-        sourceText.setFont(new Font("monospaced", Font.PLAIN, 12));
-        sourceText.setBackground(Color.white);
-        sourceText.setForeground(Color.black);
-        sourceText.setSelectedTextColor(Color.black);
-        sourceText.setSelectionColor(Color.red);
-        sourceText.setEditable(false);
-        JPanel sourcePanel = new JPanel(new BorderLayout());
-        sourcePanel.add(new JScrollPane(sourceText){
-            public Dimension getPreferredSize(){
-                Dimension size = TreeView.this.getSize();
-                return new Dimension(size.width / 2, size.height * 3 / 5);
-                }
-            public Dimension getMinimumSize(){
-                return new Dimension(100, 100);
-                }
-            },
-            BorderLayout.CENTER);
-        sourcePanel.setBorder(BorderFactory.createCompoundBorder(
-            BorderFactory.createTitledBorder("Source View"),
-            BorderFactory.createEmptyBorder(4, 4, 4, 4)
-            ));
-
-        // create the JTree and scroll pane.
-        JPanel treePanel = new JPanel(new BorderLayout());
-        m_tree = new DOMTree();
-        m_tree.setCellRenderer(new XMLTreeCellRenderer());
-        m_tree.getSelectionModel().setSelectionMode
-            (TreeSelectionModel.SINGLE_TREE_SELECTION);
-
-        // Listen for when the selection changes, call nodeSelected(node)
-        m_tree.addTreeSelectionListener(
-            new TreeSelectionListener() {
-                public void valueChanged(TreeSelectionEvent e) {
-                    TreeNode node = (TreeNode)
-                        (e.getPath().getLastPathComponent());
-
-                    nodeSelected(node);
-                }
-            }
-        );
-        m_tree.setRowHeight(18);
-        m_tree.setFont(new Font("dialog", Font.PLAIN, 12));
-
-        treePanel.add(new JScrollPane(m_tree) {
-            public Dimension getPreferredSize(){
-                Dimension size = TreeView.this.getSize();
-                return new Dimension(size.width / 2, size.height * 3 / 5);
-                }
-            public Dimension getMinimumSize(){
-                return new Dimension(100, 100);
-                }
-            },
-            BorderLayout.CENTER);
-
-        treePanel.setBorder(BorderFactory.createCompoundBorder(
-            BorderFactory.createTitledBorder("Tree View"),
-            BorderFactory.createEmptyBorder(4, 4, 4, 4)
-            ));
-
-        // refreshUI loads everthything!
-        refreshUI(filename);
-
-        // use the new JSplitPane to dynamically resize...
-        JComponent split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
-            true, treePanel, sourcePanel);
-
-        JComponent mainSplitPane =
-            new JSplitPane(JSplitPane.VERTICAL_SPLIT,
-                           true, split, messagePanel);
-
-        if (DEBUG) System.out.println("END createUI:"+filename);
-        return mainSplitPane;
-    }
-
-    /** refreshUI is called when we have a new filename to parse.
-     */
-    void refreshUI(String filename) {
-        if (DEBUG) System.out.println("START refreshUI:"+filename);
-
-        messageText.selectAll();
-        messageText.cut();
-
-        if (filename == null || filename.equals("")) {
-            messageText.setForeground(Color.red);
-            messageText.append("No input XML filename specified:"+filename+"\n");
-            return;
-        }
-
-        fname = filename;
-        Document newRoot = getRoot(filename);
-        if (newRoot == null) {
-            messageText.setForeground(Color.red);
-            messageText.append("Unable to get new DOM Tree for:"+filename+"\n");
-            return;
-        }
-        m_tree.setDocument(newRoot);
-
-        // new Source
-        sourceText.selectAll();
-        sourceText.cut();
-        readXMLFile(fname, sourceText);
-
-        setTitle(title+": "+filename);
-
-        if (m_tree!= null)
-            expandTree();
-
-
-        if (ef != null && ef.getErrorNodes()!=null       
-                    && ef.getErrorNodes().size() > 0 ) {
-            messageText.setForeground(Color.red);
-            messageText.append("XML source, "+fname+" has errors.\n");
-            messageText.append("Please click on red Tree View items for details.\n");
-            /***/
-            Hashtable errors = ef.getErrorNodes();
-            Enumeration keys = errors.keys();
-            while (keys.hasMoreElements()) {
-                Node node = (Node)keys.nextElement();
-                messageText.append("node="+node.getNodeName()
-                +", error="+((ParseError)errors.get(node)).getMsg()+"\n");
-            }
-        }
-        if (DEBUG) System.out.println("END refreshUI:"+filename);
-    }
-
-    /**
-     *  Invoke the Parser on fname and return the root TreeNode.
-     */
-    public Document getRoot(String filename) {
-        if (DEBUG) System.out.println("START getRoot:"+filename);
-
-        if (filename == null || filename.equals(""))
-        return null;
-
-        try {
-            //
-            // Reset the Error Storage and handling
-            //
-     
-            ef.resetErrors();
-            parser.setErrorHandler(ef);
-            parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false); // otherwise parser.getCurrentNode() == null
-            parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", true);
-            parser.setFeature("http://apache.org/xml/features/allow-java-encodings", true);
-            parser.parse(filename);
-            Document document = parser.getDocument();
-            /***/
-            return document;
-        } catch (Exception e) {
-             System.err.println( "Error: Invalid XML document could not get ROOT" );
-             System.exit( 1 );
-            //e.printStackTrace(System.err);
-        }
-        return null;
-    }
-
-    /** read the xml file from filename and append it to the JTextArea
-     */
-    synchronized void readXMLFile(String filename, JTextArea ta) {
-
-        if (DEBUG) System.out.println("START readXMLFile"+filename);
-        if (filename == null || filename.equals(""))
-            return;
-        InputStream fis = null;
-        BufferedReader dis = null;
-        try {
-            java.net.URL file = createURL(filename);
-            fis = file.openStream();
-
-            String javaEncoding = parser.getJavaEncoding(); // get saved java encoding
-            try
-            {
-            dis = new BufferedReader(new InputStreamReader(fis, javaEncoding ));
-            }
-            catch( UnsupportedEncodingException ex )
-            {
-            dis = new BufferedReader(new InputStreamReader(fis ));
-            }
-        } catch (Exception ex) {
-            System.err.println("ERROR: Xerces.readXMLFile: "+ex);
-            return;
-        }
-
-        String line;
-        int i = 0;
-
-        int len = 0;
-        textLine = new Vector();
-        String nl = "\n";
-        int nllen = nl.length();
-        StringBuffer sb = new StringBuffer();
-
-        try{
-            readline: while ((line = dis.readLine()) != null) {
-                sb.append(line+nl);
-                textLine.addElement(new Integer(len));
-                len += line.length()+nllen;
-            }
-            ta.append(sb.toString());
-        } catch (IOException io) {
-            System.err.println(io);
-            return;
-        }
-
-        // relayout because contents have changed
-        //ta.revalidate();
-
-        if (DEBUG) System.out.println("END readXMLFile"+filename);
-        return;
-
-    }
-
-    /** called when our JTree's nodes are selected.
-     */
-    void nodeSelected(TreeNode treeNode) {
-
-        Node node = m_tree.getNode(treeNode);
-
-        if( node == null )     // It is possible to get a null node
-            return;
-
-        StringBuffer sb = new StringBuffer();
-        messageText.selectAll();
-        messageText.cut();
-
-
-        //fix
-
-       //JTextArea sourceText = sourceText;
-       Object errorObject = ef == null ? null : ef.getError(node);
-       if (errorObject != null) {
-           // There *is* an error in this node.
-           messageText.setForeground(Color.red);
-           ParseError eip = (ParseError)errorObject;
-           sb.append("Error: "+eip.getMsg()+"\n");
-           int lineNo = eip.getLineNo();
-           int pos  = 0;
-           int next = 0;                       
-           int sizeOfTextLine = textLine.size();
-
-           if( lineNo < sizeOfTextLine )
-              {
-              pos = ((Integer)textLine.elementAt(lineNo-1)).intValue();
-              next = (lineNo == sizeOfTextLine ) ?
-               pos :
-               (((Integer)textLine.elementAt(lineNo)).intValue());
-              }
-           else
-              {
-              pos  = (( Integer) textLine.elementAt( sizeOfTextLine - 1 )).intValue();
-              next = pos + 2;
-              }
-
-           sourceText.select(pos, next );
-           //m_textScrollPane.repaint();
-       } else {
-           messageText.setForeground(Color.black);
-           sourceText.select(0, 0 );
-       }
-        
-        //fix
-
-        
-        if (node.getNodeType() == Node.ELEMENT_NODE
-                    || node.getNodeType() == Node.TEXT_NODE 
-                || node.getNodeType() == Node.CDATA_SECTION_NODE )
-                 {
-                    sb.append(node.toString());
-            }
-       
-        messageText.append(sb.toString());
-    }
-
-    /** called when a the text value has changed in the FileNameInput.
-     *  read in new XML file.
-     */
-    public void textValueChanged(TextEvent e) {
-        try {
-            if (fni != null)
-                fni.setVisible(false);
-            fname = ((JTextField)e.getSource()).getText();
-            if (DEBUG) System.out.println("textValueChanged:"+fname);
-            refreshUI(fname);
-
-        } catch (Exception ex) {
-           System.err.println( "Error: while trying to refresh gui" );
-           System.exit( 1 );
-        //    ex.printStackTrace();
-        }
-    }
-
-    /** called to handle menu actions.
-     */
-    public void actionPerformed(java.awt.event.ActionEvent e) {
-        if (DEBUG) System.err.println("ACTION: "+e.getActionCommand()+", "+e.paramString());
-
-        if (e.getActionCommand().equals(quitString)) {
-          System.exit(0);
-        }
-        else if (e.getActionCommand().equals(openString)) {
-
-            fni = new FileNameInput("Open File");
-            fni.addTextListener(this);
-            fni.setVisible(true);
-        }
-        else if (e.getActionCommand().equals(expandString)) {
-            expandTree();
-        }
-        else if (e.getActionCommand().equals(collapseString)) {
-            int rows = m_tree.getRowCount();
-            for (int i = 0; i < rows; i++) {
-                m_tree.collapseRow(i);
-            }
-        }
-        else
-        //if (e.getActionCommand().equals(reloadString)) {
-            refreshUI(fname);
-        //}
-    }
-
-    void expandTree() {
-        int rows = 0;
-        for (int levels=0; levels <= 4; levels++) {
-            rows=m_tree.getRowCount();
-            for (int i = 0; i < rows; i++) {
-                m_tree.expandRow(i);
-            }
-        }
-    }
-
-    /*
-     * The XMLTreeCellRenderer is an inner class which enables the
-     * highlighting of errors in the tree and shows the gender values
-     * as different icons.
-     */
-    class XMLTreeCellRenderer extends DefaultTreeCellRenderer
-    {
-
-        public Component getTreeCellRendererComponent(JTree tree, Object value,
-                          boolean selected, boolean expanded,
-                          boolean leaf, int row,
-                              boolean hasFocus)
-        {
-            Node node = ((DOMTree)tree).getNode(value);
-            Component comp = super.getTreeCellRendererComponent(tree, value,
-                           selected,  expanded, leaf,  row, hasFocus);
-            if (selected) {
-                comp.setBackground(Color.blue);
-            }
-            if (ef != null
-            && ef.getErrorNodes() != null
-            && value != null
-            && node != null
-            && ef.getErrorNodes().containsKey( node )) {
-                comp.setForeground(Color.red);
-            }
-
-            if (node != null) {
-                if (leaf) {
-                    setIcon(new ImageIcon(leafImage));
-                } else if (expanded) {
-                    setIcon(new ImageIcon(openFolder));
-                } else {
-                    setIcon(new ImageIcon(closedFolder));
-                }
-            }
-            if (node != null && node instanceof Element) {
-                
-                Element txNode = (Element)node;
-                Attr txAtt = (Attr)txNode.getAttributeNode("gender");
-                if (txAtt != null) {
-                    if (txAtt.getValue().equals("male")) {
-                        setIcon(new ImageIcon("male.gif"));
-                    } else
-                    if (txAtt.getValue().equals("female")) {
-                        setIcon(new ImageIcon("female.gif"));
-                    }
-                }
-            }
-
-            return comp;
-        }
-    }
-
-    /*
-     * The FileNameInput is an inner class which allows the user
-     * to enter a filename. It exists due to a Swing bug which
-     * has problems with the real file input panel.
-     */
-    class FileNameInput extends JFrame implements ActionListener {
-
-
-        JLabel fileLabel;
-        JTextField textField;
-        JButton ok;
-        JButton cancel;
-        Vector textListeners;
-
-        public FileNameInput() {
-            this("");
-        }
-
-        public FileNameInput(String title) {
-
-            super(title);
-
-            fileLabel = new JLabel("Enter XML file name:");
-            textField = new JTextField();
-            textField.addActionListener(this);
-            ok = new JButton("ok");
-            cancel = new JButton("cancel");
-            JPanel buttonPanel = new JPanel();
-            buttonPanel.add(ok);
-            buttonPanel.add(cancel);
-            ok.addActionListener(this);
-            cancel.addActionListener(this);
-            getContentPane().add(fileLabel, BorderLayout.NORTH);
-            getContentPane().add(textField, BorderLayout.CENTER);
-            getContentPane().add(buttonPanel, BorderLayout.SOUTH);
-            setSize(400,100);
-        }
-
-        public void actionPerformed(ActionEvent e) {
-
-            if (e.getSource() == ok || e.getSource() == textField) {
-                System.out.println("FileNameInput: pressed OK");
-                    TextEvent event = new TextEvent(textField, TextEvent.TEXT_VALUE_CHANGED);
-                    deliverEvent(event);
-                    setVisible(false);
-            } else
-            if (e.getSource() == cancel) {
-                System.out.println("FileNameInput: pressed cancel");
-                    setVisible(false);
-            }
-        }
-
-        /**
-         * Adds a TextListener event listener.
-         *
-         * @param listener  The listener to add.
-         *
-         * @see #removeTextListener
-         */
-        public void addTextListener(TextListener listener) {
-
-            // is there anything to do?
-            if (listener == null)
-                return;
-
-            if (textListeners == null)
-               textListeners = new Vector();
-
-            // add listener
-            textListeners.addElement(listener);
-            }
-
-        /**
-         * Removes a TextListener event listener.
-         *
-         * @param listener  The listener to remove.
-         *
-         * @see #addTextListener
-         */
-        public void removeTextListener(TextListener listener) {
-
-            // is there anything to do?
-            if (listener == null || textListeners == null)
-                return;
-
-            // add listener
-            textListeners.removeElement(listener);
-            }
-
-
-        /**
-         * This function delivers TextListener events, when the ok
-         * button is clicked.
-         *
-         * @param evt The event to deliver.
-         */
-        protected void deliverEvent(EventObject evt) {
-
-            if (evt instanceof TextEvent) {
-                TextEvent event = (TextEvent)evt;
-
-                Vector l;
-                synchronized (textListeners) { l = (Vector)textListeners.clone(); }
-
-                int size = l.size();
-                for (int i = 0; i < size; i++)
-                    ((TextListener)l.elementAt(i)).textValueChanged(event);
-                }
-            }
-    }
-
-    //
-    // Create a URL object from either a URL string or a plain file name.
-    //
-    static URL createURL(String name) throws Exception {
-        try {
-                URL u = new URL(name);
-                return u;
-        } catch (MalformedURLException ex) {
-        }
-        URL u = new URL("file:" + new File(name).getAbsolutePath());
-        return u;
-    }    
-    
-    /**
-     * The ErrorStorer maps Nodes to errors. It receives a reference
-     * to the ErrorTreeFactory in the Constructor.
-     *
-     * When error is called, it asks the
-     * ErrorTreeFactory for the current node, and uses this as the
-     * "key" of a Hashtable, with the error as a value. The error
-     * value is wrapped up nicely in an ParseError object.
-     *
-     * It is used in the XML Tutorial to illustrate how to implement
-     * the ErrorListener to provide error storage for later reference.
-     *
-     */
-    class ErrorStorer 
-        implements ErrorHandler
-        
-    {
-
-        //
-        // Data
-        //
-        Hashtable errorNodes = null;
-        
-        /**
-         * Constructor
-         */
-        public ErrorStorer() {
-        }
-
-        /**
-         * The client is is allowed to get a reference to the Hashtable,
-         * and so could corrupt it, or add to it...
-         */
-        public Hashtable getErrorNodes() {
-            return errorNodes;
-        }
-
-        /**
-         * The ParseError object for the node key is returned.
-         * If the node doesn't have errors, null is returned.
-         */
-        public Object getError(Node node) {
-            if (errorNodes == null)
-                return null;
-            return errorNodes.get(node);
-        }
-        
-        /**
-         * Reset the error storage.
-         */
-        public void resetErrors() {
-            if (errorNodes != null)
-            errorNodes.clear();
-        }
-        
-        /***/
-        public void warning(SAXParseException ex) {
-            handleError(ex, WARNING);
-        }
-
-        public void error(SAXParseException ex) {
-            handleError(ex, ERROR);
-        }
-
-        public void fatalError(SAXParseException ex) throws SAXException {
-            handleError(ex, FATAL_ERROR);
-        }
-        
-        private void handleError(SAXParseException ex, int type) {
-            System.out.println("!!! handleError: "+ex.getMessage());
-
-            StringBuffer errorString = new StringBuffer();
-            errorString.append("at line number, ");
-            errorString.append(ex.getLineNumber());
-            errorString.append(": ");
-            errorString.append(ex.getMessage());
-
-            // Node current = parser.getCurrentNode();
-
-            Node current = null ;
-
-            try
-              {
-              current = ( Node ) parser.getProperty( "http://apache.org/xml/properties/dom/current-element-node" );
-              
-              }
-            catch( SAXException exception  )
-              {
-               ;
-              }
-
-            if (current == null) {
-                System.err.println("Error in handleError. getCurrentNode()==null!");
-                return;
-            }
-            
-            if (errorNodes == null)
-                errorNodes = new Hashtable();
-            ParseError previous = (ParseError) errorNodes.get(current);
-            ParseError eip  = null;
-            // if a Node already has an error, we accumulate the text here...
-            if (previous != null) {
-                eip = previous;
-                errorString = new StringBuffer(previous.getMsg()+"\n"+errorString.toString());
-                eip.setMsg(errorString.toString());
-            } else {
-                eip = new
-                    ParseError(
-                        ex.getSystemId(), 
-                        ex.getLineNumber(), 
-                        ex.getColumnNumber(),
-                        "",  
-                        errorString.toString());
-            }
-
-            // put it in the Hashtable.
-            errorNodes.put(current, eip);
-        }
-        
-    }
-    
-    /**
-     * The ParseError class wraps up all the error info from
-     * the ErrorStorer's error method.
-     *
-     * @see ErrorStorer
-     */
-    class ParseError extends Object {
-
-        //
-        // Data
-        //
-
-        String fileName;
-        int lineNo;
-        int charOffset;
-        Object key;
-        String msg;
-
-        /**
-         * Constructor
-         */
-        public ParseError(String fileName, int lineNo, int charOffset,
-                           Object key, 
-                           String msg)
-        {
-            this. fileName=fileName;
-            this. lineNo=lineNo;
-            this. charOffset=charOffset;
-            this. key=key;
-            this. msg=msg;
-        }
-
-        //
-        // Getters...
-        //
-        public String getFileName() { return fileName; }
-        public int getLineNo() { return lineNo; }
-        public int getCharOffset() { return charOffset;}
-        public Object getKey() { return key; }
-        public String getMsg() { return msg; }
-        public void setMsg(String s) { msg = s; }
-    }
-
-
-    //
-    // Main
-    //
-    
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-        
-        // vars
-        int parserNameIndex = -1;
-        String parserName = DEFAULT_PARSER_NAME;
-
-        // check parameters
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-
-            // options
-            if (arg.startsWith("-")) {
-                if (arg.equals("-p")) {
-                    if (i == argv.length - 1) {
-                        System.err.println("error: missing parser class");
-                        System.exit(1);
-                    }
-                    parserName = argv[++i];
-                    parserNameIndex = i;
-                    continue;
-                }
-
-                if (arg.equals("-h")) {
-                    printUsage();
-                    System.exit(1);
-                }
-            }
-
-            // print uri
-            System.err.println(arg+':');
-   
-            JFrame frame = null;
-            if (parserNameIndex == argv.length-1) {
-                // null behaviour is blank screen - eg no JTree, or file dispalyed
-                frame = new TreeView("");
-            } else {
-                frame = new TreeView(arg);
-            }
-            frame.addWindowListener(new java.awt.event.WindowAdapter() {
-             public void windowClosing(java.awt.event.WindowEvent e) {
-                 System.exit(0);
-             }
-            });
-            frame.setSize(790, 590);
-            frame.setVisible(true);
-        }
-    } // main(String[])
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java ui.TreeViewer (options) uri ...");
-        System.err.println();
-        System.err.println("options:");
-        System.err.println("  -p name  Specify DOM parser class by name.");
-        System.err.println("           Default parser: "+DEFAULT_PARSER_NAME);
-        System.err.println("  -h       This help screen.");
-
-    } // printUsage()
-
-} // class TreeViewer
diff --git a/samples/ui/TreeViewer.java b/samples/ui/TreeViewer.java
deleted file mode 100644
index 1430c77..0000000
--- a/samples/ui/TreeViewer.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package ui;
-
-/*
- *
- * command line invocation wrapper for TreeViewer
- *
- * @version
- */
-
-public class TreeViewer {
-
-    public TreeViewer() {
-        System.out.println("TreeViewer is no longer an instantiable class.  Please use XMLTreeView instead.");
-        throw new RuntimeException();
-    }
-
-    public TreeViewer(String title, String filename) {
-        System.out.println("TreeViewer is no longer an instantiable class.  Please use XMLTreeView instead.");
-        throw new RuntimeException();
-    }
-
-    public static void main(String[] argv) {
-        try {
-            Class.forName("javax.swing.JFrame");
-        } catch (ClassNotFoundException cnfe) {
-            System.out.println("Couldn't load class javax.swing.JFrame.");
-            System.out.println("This sample now uses Swing version 1.1.  Couldn't find the Swing 1.1 classes, please check your CLASSPATH settings.");
-            System.exit(1);
-        }
-
-        TreeView.main(argv);
-    }
-
-}
-
diff --git a/samples/xni/Counter.java b/samples/xni/Counter.java
deleted file mode 100644
index 05c46e7..0000000
--- a/samples/xni/Counter.java
+++ /dev/null
@@ -1,637 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni;
-
-import java.io.PrintWriter;
-
-import org.apache.xerces.parsers.XMLDocumentParser;
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParseException;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-/**
- * A sample XNI counter. The output of this program shows the time
- * and count of elements, attributes, ignorable whitespaces, and
- * characters appearing in the document.
- * <p>
- * This class is useful as a "poor-man's" performance tester to
- * compare the speed and accuracy of various parser configurations.
- * However, it is important to note that the first parse time of a
- * parser will include both VM class load time and parser
- * initialization that would not be present in subsequent parses
- * with the same file.
- * <p>
- * <strong>Note:</strong> The results produced by this program
- * should never be accepted as true performance measurements.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class Counter
-    extends XMLDocumentParser
-    implements XMLErrorHandler {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID =
-        "http://xml.org/sax/features/namespaces";
-
-    /** Namespace prefixes feature id (http://xml.org/sax/features/namespace-prefixes). */
-    protected static final String NAMESPACE_PREFIXES_FEATURE_ID =
-        "http://xml.org/sax/features/namespace-prefixes";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID =
-        "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID =
-        "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID =
-        "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // default settings
-
-    /** Default parser configuration (org.apache.xerces.parsers.StandardParserConfiguration). */
-    protected static final String DEFAULT_PARSER_CONFIG =
-        "org.apache.xerces.parsers.StandardParserConfiguration";
-
-    /** Default repetition (1). */
-    protected static final int DEFAULT_REPETITION = 1;
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default namespace prefixes (false). */
-    protected static final boolean DEFAULT_NAMESPACE_PREFIXES = false;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    /** Default memory usage report (false). */
-    protected static final boolean DEFAULT_MEMORY_USAGE = false;
-
-    /** Default "tagginess" report (false). */
-    protected static final boolean DEFAULT_TAGGINESS = false;
-
-    //
-    // Data
-    //
-
-    /** Number of elements. */
-    protected long fElements;
-
-    /** Number of attributes. */
-    protected long fAttributes;
-
-    /** Number of characters. */
-    protected long fCharacters;
-
-    /** Number of ignorable whitespace characters. */
-    protected long fIgnorableWhitespace;
-
-    /** Number of characters of tags. */
-    protected long fTagCharacters;
-
-    /** Number of other content characters for the "tagginess" calculation. */
-    protected long fOtherCharacters;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public Counter(XMLParserConfiguration configuration) {
-        super(configuration);
-        fConfiguration.setErrorHandler(this);
-    } // <init>(XMLParserConfiguration)
-
-    //
-    // Public methods
-    //
-
-    /** Prints the results. */
-    public void printResults(PrintWriter out, String uri, long time,
-                             long memory, boolean tagginess,
-                             int repetition) {
-
-        // filename.xml: 631 ms (4 elems, 0 attrs, 78 spaces, 0 chars)
-        out.print(uri);
-        out.print(": ");
-        if (repetition == 1) {
-            out.print(time);
-        }
-        else {
-            out.print(time);
-            out.print('/');
-            out.print(repetition);
-            out.print('=');
-            out.print(time/repetition);
-        }
-        out.print(" ms");
-        if (memory != Long.MIN_VALUE) {
-            out.print(", ");
-            out.print(memory);
-            out.print(" bytes");
-        }
-        out.print(" (");
-        out.print(fElements);
-        out.print(" elems, ");
-        out.print(fAttributes);
-        out.print(" attrs, ");
-        out.print(fIgnorableWhitespace);
-        out.print(" spaces, ");
-        out.print(fCharacters);
-        out.print(" chars)");
-        if (tagginess) {
-            out.print(' ');
-            long totalCharacters = fTagCharacters + fOtherCharacters
-                                 + fCharacters + fIgnorableWhitespace;
-            long tagValue = fTagCharacters * 100 / totalCharacters;
-            out.print(tagValue);
-            out.print("% tagginess");
-        }
-        out.println();
-        out.flush();
-
-    } // printResults(PrintWriter,String,long)
-
-    //
-    // ContentHandler methods
-    //
-
-    /** Start document. */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-        throws XNIException {
-
-        fElements            = 0;
-        fAttributes          = 0;
-        fCharacters          = 0;
-        fIgnorableWhitespace = 0;
-        fTagCharacters       = 0;
-        fOtherCharacters     = 0;
-
-    } // startDocument(XMLLocator,String)
-
-    /** Start element. */
-    public void startElement(QName element, XMLAttributes attrs, Augmentations augs)
-        throws XNIException {
-
-        fElements++;
-        fTagCharacters++; // open angle bracket
-        fTagCharacters += element.rawname.length();
-        if (attrs != null) {
-            int attrCount = attrs.getLength();
-            fAttributes += attrCount;
-            for (int i = 0; i < attrCount; i++) {
-                fTagCharacters++; // space
-                fTagCharacters += attrs.getQName(i).length();
-                fTagCharacters++; // '='
-                fTagCharacters++; // open quote
-                fOtherCharacters += attrs.getValue(i).length();
-                fTagCharacters++; // close quote
-            }
-        }
-        fTagCharacters++; // close angle bracket
-
-    } // startElement(QName,XMLAttributes)
-
-    /** Empty element. */
-    public void emptyElement(QName element, XMLAttributes attrs, Augmentations augs)
-        throws XNIException {
-
-        fElements++;
-        fTagCharacters++; // open angle bracket
-        fTagCharacters += element.rawname.length();
-        if (attrs != null) {
-            int attrCount = attrs.getLength();
-            fAttributes += attrCount;
-            for (int i = 0; i < attrCount; i++) {
-                fTagCharacters++; // space
-                fTagCharacters += attrs.getQName(i).length();
-                fTagCharacters++; // '='
-                fTagCharacters++; // open quote
-                fOtherCharacters += attrs.getValue(i).length();
-                fTagCharacters++; // close quote
-            }
-        }
-        fTagCharacters++; // forward slash
-        fTagCharacters++; // close angle bracket
-
-    } // startElement(QName,XMLAttributes)
-
-    /** Characters. */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-
-        fCharacters += text.length;
-
-    } // characters(XMLString);
-
-    /** Ignorable whitespace. */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-
-        fIgnorableWhitespace += text.length;
-
-    } // ignorableWhitespace(XMLString);
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException {
-        fTagCharacters += 2; // "<?"
-        fTagCharacters += target.length();
-        if (data.length > 0) {
-            fTagCharacters++; // space
-            fOtherCharacters += data.length;
-        }
-        fTagCharacters += 2; // "?>"
-    } // processingInstruction(String,XMLString)
-
-    //
-    // XMLErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Warning", ex);
-    } // warning(String,String,XMLParseException)
-
-    /** Error. */
-    public void error(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Error", ex);
-    } // error(String,String,XMLParseException)
-
-    /** Fatal error. */
-    public void fatalError(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(String,String,XMLParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Prints the error message. */
-    protected void printError(String type, XMLParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,XMLParseException)
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        PrintWriter out = new PrintWriter(System.out);
-        XMLDocumentParser parser = null;
-        XMLParserConfiguration parserConfig = null;
-        int repetition = DEFAULT_REPETITION;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean namespacePrefixes = DEFAULT_NAMESPACE_PREFIXES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-        boolean memoryUsage = DEFAULT_MEMORY_USAGE;
-        boolean tagginess = DEFAULT_TAGGINESS;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                        continue;
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parserConfig = (XMLParserConfiguration)Class.forName(parserName).newInstance();
-                        parserConfig.addRecognizedFeatures(new String[] {
-                            NAMESPACE_PREFIXES_FEATURE_ID,
-                        });
-                        parser = null;
-                    }
-                    catch (Exception e) {
-                        parserConfig = null;
-                        System.err.println("error: Unable to instantiate parser configuration ("+parserName+")");
-                    }
-                    continue;
-                }
-                if (option.equals("x")) {
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -x option.");
-                        continue;
-                    }
-                    String number = argv[i];
-                    try {
-                        int value = Integer.parseInt(number);
-                        if (value < 1) {
-                            System.err.println("error: Repetition must be at least 1.");
-                            continue;
-                        }
-                        repetition = value;
-                    }
-                    catch (NumberFormatException e) {
-                        System.err.println("error: invalid number ("+number+").");
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("np")) {
-                    namespacePrefixes = option.equals("np");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("m")) {
-                    memoryUsage = option.equals("m");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("t")) {
-                    tagginess = option.equals("t");
-                    continue;
-                }
-                if (option.equals("-rem")) {
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -# option.");
-                        continue;
-                    }
-                    System.out.print("# ");
-                    System.out.println(argv[i]);
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-                System.err.println("error: unknown option ("+option+").");
-                continue;
-            }
-
-            // use default parser?
-            if (parserConfig == null) {
-
-                // create parser
-                try {
-                    parserConfig = (XMLParserConfiguration)Class.forName(DEFAULT_PARSER_CONFIG).newInstance();
-                    parserConfig.addRecognizedFeatures(new String[] {
-                        NAMESPACE_PREFIXES_FEATURE_ID,
-                    });
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser configuration ("+DEFAULT_PARSER_CONFIG+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            if (parser == null) {
-                parser = new Counter(parserConfig);
-            }
-            try {
-                parserConfig.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (XMLConfigurationException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parserConfig.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (XMLConfigurationException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parserConfig.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (XMLConfigurationException e) {
-                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
-                    System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-                }
-            }
-            try {
-                parserConfig.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (XMLConfigurationException e) {
-                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
-                    System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-                }
-            }
-
-            // parse file
-            try {
-                long timeBefore = System.currentTimeMillis();
-                long memoryBefore = Runtime.getRuntime().freeMemory();
-                for (int j = 0; j < repetition; j++) {
-                    parser.parse(new XMLInputSource(null, arg, null));
-                }
-                long memoryAfter = Runtime.getRuntime().freeMemory();
-                long timeAfter = System.currentTimeMillis();
-
-                long time = timeAfter - timeBefore;
-                long memory = memoryUsage
-                            ? memoryBefore - memoryAfter : Long.MIN_VALUE;
-                ((Counter)parser).printResults(out, arg, time,
-                                               memory, tagginess,
-                                               repetition);
-            }
-            catch (XMLParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof XNIException) {
-                    e = ((XNIException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java xni.Counter (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name     Select parser configuration by name.");
-        System.err.println("  -x number   Select number of repetitions.");
-        System.err.println("  -n  | -N    Turn on/off namespace processing.");
-        System.err.println("  -np | -NP   Turn on/off namespace prefixes.");
-        System.err.println("              NOTE: Requires use of -n.");
-        System.err.println("  -v  | -V    Turn on/off validation.");
-        System.err.println("  -s  | -S    Turn on/off Schema validation support.");
-        System.err.println("              NOTE: Not supported by all parser configurations.");
-        System.err.println("  -f  | -F    Turn on/off Schema full checking.");
-        System.err.println("              NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -m  | -M    Turn on/off memory usage report.");
-        System.err.println("  -t  | -T    Turn on/off \"tagginess\" report.");
-        System.err.println("  --rem text  Output user defined comment before next parse.");
-        System.err.println("  -h          This help screen.");
-
-        System.err.println();
-        System.err.println("defaults:");
-        System.err.println("  Config:     "+DEFAULT_PARSER_CONFIG);
-        System.err.println("  Repetition: "+DEFAULT_REPETITION);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Prefixes:   ");
-        System.err.println(DEFAULT_NAMESPACE_PREFIXES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-        System.err.print("  Memory:     ");
-        System.err.println(DEFAULT_MEMORY_USAGE ? "on" : "off");
-        System.err.print("  Tagginess:  ");
-        System.err.println(DEFAULT_TAGGINESS ? "on" : "off");
-
-        System.err.println();
-        System.err.println("notes:");
-        System.err.println("  The speed and memory results from this program should NOT be used as the");
-        System.err.println("  basis of parser performance comparison! Real analytical methods should be");
-        System.err.println("  used. For better results, perform multiple document parses within the same");
-        System.err.println("  virtual machine to remove class loading from parse time and memory usage.");
-        System.err.println();
-        System.err.println("  The \"tagginess\" measurement gives a rough estimate of the percentage of");
-        System.err.println("  markup versus content in the XML document. The percent tagginess of a ");
-        System.err.println("  document is equal to the minimum amount of tag characters required for ");
-        System.err.println("  elements, attributes, and processing instructions divided by the total");
-        System.err.println("  amount of characters (characters, ignorable whitespace, and tag characters)");
-        System.err.println("  in the document.");
-        System.err.println();
-        System.err.println("  Not all features are supported by different parser configurations.");
-
-    } // printUsage()
-
-} // class Counter
diff --git a/samples/xni/DocumentTracer.java b/samples/xni/DocumentTracer.java
deleted file mode 100644
index 1b66335..0000000
--- a/samples/xni/DocumentTracer.java
+++ /dev/null
@@ -1,1366 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.apache.xerces.parsers.XMLDocumentParser;
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParseException;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-/**
- * Provides a complete trace of XNI document and DTD events for
- * files parsed.
- *
- * @author Andy Clark, IBM
- * @author Arnaud Le Hors, IBM
- *
- * @version $Id$
- */
-public class DocumentTracer
-    extends XMLDocumentParser
-    implements XMLErrorHandler {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID =
-        "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID =
-        "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID =
-        "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID =
-        "http://apache.org/xml/features/validation/schema-full-checking";
-
-    /** Character ref notification feature id (http://apache.org/xml/features/scanner/notify-char-refs). */
-    protected static final String NOTIFY_CHAR_REFS_FEATURE_ID =
-        "http://apache.org/xml/features/scanner/notify-char-refs";
-
-    // default settings
-
-    /** Default parser configuration (org.apache.xerces.parsers.StandardParserConfiguration). */
-    protected static final String DEFAULT_PARSER_CONFIG =
-        "org.apache.xerces.parsers.StandardParserConfiguration";
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    /** Default character notifications (false). */
-    protected static final boolean DEFAULT_NOTIFY_CHAR_REFS = false;
-
-    //
-    // Data
-    //
-
-    /** Temporary QName. */
-    private QName fQName = new QName();
-
-    /** Print writer. */
-    protected PrintWriter fOut;
-
-    /** Indent level. */
-    protected int fIndent;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public DocumentTracer() {
-        this(null);
-    } // <init>()
-
-    /** Default constructor. */
-    public DocumentTracer(XMLParserConfiguration config) {
-        super(config);
-        setOutput(new PrintWriter(System.out));
-        fConfiguration.setErrorHandler(this);
-    } // <init>(XMLParserConfiguration)
-
-    //
-    // Public methods
-    //
-
-    /** Sets the output stream for printing. */
-    public void setOutput(OutputStream stream, String encoding)
-        throws UnsupportedEncodingException {
-
-        if (encoding == null) {
-            encoding = "UTF8";
-        }
-
-        Writer writer = new OutputStreamWriter(stream, encoding);
-        fOut = new PrintWriter(writer);
-
-    } // setOutput(OutputStream,String)
-
-    /** Sets the output writer. */
-    public void setOutput(Writer writer) {
-
-        fOut = writer instanceof PrintWriter
-             ? (PrintWriter)writer : new PrintWriter(writer);
-
-    } // setOutput(Writer)
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * The start of the document.
-     *
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-        throws XNIException {
-
-        fIndent = 0;
-        printIndent();
-        fOut.print("startDocument(");
-        fOut.print("locator=");
-        if (locator == null) {
-            fOut.print("null");
-        }
-        else {
-            fOut.print('{');
-            fOut.print("publicId=");
-            printQuotedString(locator.getPublicId());
-            fOut.print(',');
-            fOut.print("systemId=");
-            printQuotedString(locator.getSystemId());
-            fOut.print(',');
-            fOut.print("baseSystemId=");
-            printQuotedString(locator.getBaseSystemId());
-            fOut.print(',');
-            fOut.print("lineNumber=");
-            fOut.print(locator.getLineNumber());
-            fOut.print(',');
-            fOut.print("columnNumber=");
-            fOut.print(locator.getColumnNumber());
-            fOut.print('}');
-        }
-        fOut.print(',');
-        fOut.print("encoding=");
-        printQuotedString(encoding);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // XMLLocator()
-
-    /** XML Declaration. */
-    public void xmlDecl(String version, String encoding,
-                        String standalone, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("xmlDecl(");
-        fOut.print("version=");
-        printQuotedString(version);
-        fOut.print(',');
-        fOut.print("encoding=");
-        printQuotedString(encoding);
-        fOut.print(',');
-        fOut.print("standalone=");
-        printQuotedString(standalone);
-        fOut.println(')');
-
-    } // xmlDecl(String,String,String,String)
-
-    /** Doctype declaration. */
-    public void doctypeDecl(String rootElement, String publicId,
-                            String systemId, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("doctypeDecl(");
-        fOut.print("rootElement=");
-        printQuotedString(rootElement);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.println(')');
-        fOut.flush();
-
-    } // doctypeDecl(String,String,String)
-
-    /** Start prefix mapping. */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("startPrefixMapping(");
-        fOut.print("prefix=");
-        printQuotedString(prefix);
-        fOut.print(',');
-        fOut.print("uri=");
-        printQuotedString(uri);
-        fOut.println(')');
-        fOut.flush();
-
-    } // startPrefixMapping(String,String)
-
-    /** Start element. */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("startElement(");
-        printElement(element, attributes);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startElement(QName,XMLAttributes)
-
-    /** Empty element. */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("emptyElement(");
-        printElement(element, attributes);
-        fOut.println(')');
-        fOut.flush();
-
-    } // emptyElement(QName,XMLAttributes)
-
-
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("characters(");
-        fOut.print("text=");
-        printQuotedString(text.ch, text.offset, text.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // characters(XMLString)
-
-
-
-    /** Ignorable whitespace. */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("ignorableWhitespace(");
-        fOut.print("text=");
-        printQuotedString(text.ch, text.offset, text.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // ignorableWhitespace(XMLString)
-
-    /** End element. */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.print("endElement(");
-        fOut.print("element=");
-        fOut.print('{');
-        fOut.print("prefix=");
-        printQuotedString(element.prefix);
-        fOut.print(',');
-        fOut.print("localpart=");
-        printQuotedString(element.localpart);
-        fOut.print(',');
-        fOut.print("rawname=");
-        printQuotedString(element.rawname);
-        fOut.print(',');
-        fOut.print("uri=");
-        printQuotedString(element.uri);
-        fOut.print('}');
-        fOut.println(')');
-        fOut.flush();
-
-    } // endElement(QName)
-
-    /** End prefix mapping. */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("endPrefixMapping(");
-        fOut.print("prefix=");
-        printQuotedString(prefix);
-        fOut.println(')');
-        fOut.flush();
-
-    } // endPrefixMapping(String)
-
-    /** Start CDATA section. */
-    public void startCDATA(Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.println("startCDATA()");
-        fOut.flush();
-        fIndent++;
-
-    } // startCDATA()
-
-    /** End CDATA section. */
-    public void endCDATA(Augmentations augs) throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endCDATA()");
-        fOut.flush();
-
-    } //  endCDATA()
-
-     /** Start entity. */
-    public void startEntity(String name,
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("startEntity(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.print(',');
-        fOut.print("baseSystemId=");
-        printQuotedString(baseSystemId);
-        fOut.print(',');
-        fOut.print("encoding=");
-        printQuotedString(encoding);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startEntity(String,String,String,String)
-
-    /** Text declaration. */
-    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("textDecl(");
-        fOut.print("version=");
-        printQuotedString(version);
-        fOut.print(',');
-        fOut.print("encoding=");
-        printQuotedString(encoding);
-        fOut.println(')');
-        fOut.flush();
-
-    } // textDecl(String,String)
-
-    /** Comment. */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-
-        printIndent();
-        fOut.print("comment(");
-        fOut.print("text=");
-        printQuotedString(text.ch, text.offset, text.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // comment(XMLText)
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("processingInstruction(");
-        fOut.print("target=");
-        printQuotedString(target);
-        fOut.print(',');
-        fOut.print("data=");
-        printQuotedString(data.ch, data.offset, data.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // processingInstruction(String,XMLString)
-
-    /** End entity. */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.print("endEntity(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.println(')');
-        fOut.flush();
-
-    } // endEntity(String)
-
-
-
-
-    /** End document. */
-    public void endDocument(Augmentations augs) throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endDocument()");
-        fOut.flush();
-
-    } // endDocument();
-
-    //
-    // XMLDTDHandler
-    //
-    /** Start DTD. */
-    public void startDTD(XMLLocator locator) throws XNIException {
-
-        printIndent();
-        fOut.print("startDTD(");
-        fOut.print("locator=");
-        if (locator == null) {
-            fOut.print("null");
-        }
-        else {
-            fOut.print('{');
-            fOut.print("publicId=");
-            printQuotedString(locator.getPublicId());
-            fOut.print(',');
-            fOut.print("systemId=");
-            printQuotedString(locator.getSystemId());
-            fOut.print(',');
-            fOut.print("baseSystemId=");
-            printQuotedString(locator.getBaseSystemId());
-            fOut.print(',');
-            fOut.print("lineNumber=");
-            fOut.print(locator.getLineNumber());
-            fOut.print(',');
-            fOut.print("columnNumber=");
-            fOut.print(locator.getColumnNumber());
-            fOut.print('}');
-        }
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startDTD(XMLLocator)
-
-
-
-    /** Characters.*/
-    public void characters(XMLString text) throws XNIException {
-
-        printIndent();
-        fOut.print("characters(");
-        fOut.print("text=");
-        printQuotedString(text.ch, text.offset, text.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // characters(XMLString)
-    /** Start entity. */
-    public void startEntity(String name,
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-
-        printIndent();
-        fOut.print("startEntity(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.print(',');
-        fOut.print("baseSystemId=");
-        printQuotedString(baseSystemId);
-        fOut.print(',');
-        fOut.print("encoding=");
-        printQuotedString(encoding);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startEntity(String,String,String,String)
-
-    /** Text declaration. */
-    public void textDecl(String version, String encoding) throws XNIException {
-
-        printIndent();
-        fOut.print("textDecl(");
-        fOut.print("version=");
-        printQuotedString(version);
-        fOut.print(',');
-        fOut.print("encoding=");
-        printQuotedString(encoding);
-        fOut.println(')');
-        fOut.flush();
-
-    } // textDecl(String,String)
-
-    /** Comment. */
-    public void comment(XMLString text) throws XNIException {
-
-        printIndent();
-        fOut.print("comment(");
-        fOut.print("text=");
-        printQuotedString(text.ch, text.offset, text.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // comment(XMLText)
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, XMLString data)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("processingInstruction(");
-        fOut.print("target=");
-        printQuotedString(target);
-        fOut.print(',');
-        fOut.print("data=");
-        printQuotedString(data.ch, data.offset, data.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // processingInstruction(String,XMLString)
-
-    /** End entity. */
-    public void endEntity(String name) throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.print("endEntity(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.println(')');
-        fOut.flush();
-
-    } // endEntity(String)
-
-        /** Element declaration. */
-    public void elementDecl(String name, String contentModel)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("elementDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("contentModel=");
-        printQuotedString(contentModel);
-        fOut.println(')');
-        fOut.flush();
-
-    } // elementDecl(String,String)
-
-    /** Start attribute list. */
-    public void startAttlist(String elementName) throws XNIException {
-
-        printIndent();
-        fOut.print("startAttlist(");
-        fOut.print("elementName=");
-        printQuotedString(elementName);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startAttlist(String)
-
-    /** Attribute declaration. */
-    public void attributeDecl(String elementName, String attributeName,
-                              String type, String[] enumeration,
-                              String defaultType, XMLString defaultValue)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("attributeDecl(");
-        fOut.print("elementName=");
-        printQuotedString(elementName);
-        fOut.print(',');
-        fOut.print("attributeName=");
-        printQuotedString(attributeName);
-        fOut.print(',');
-        fOut.print("type=");
-        printQuotedString(type);
-        fOut.print(',');
-        fOut.print("enumeration=");
-        if (enumeration == null) {
-            fOut.print("null");
-        }
-        else {
-            fOut.print('{');
-            for (int i = 0; i < enumeration.length; i++) {
-                printQuotedString(enumeration[i]);
-                if (i < enumeration.length - 1) {
-                    fOut.print(',');
-                }
-            }
-            fOut.print('}');
-        }
-        fOut.print(',');
-        fOut.print("defaultType=");
-        printQuotedString(defaultType);
-        fOut.print(',');
-        fOut.print("defaultValue=");
-        if (defaultValue == null) {
-            fOut.print("null");
-        }
-        else {
-            printQuotedString(defaultValue.ch, defaultValue.offset,
-                              defaultValue.length);
-        }
-        fOut.println(')');
-        fOut.flush();
-
-    } // attributeDecl(String,String,String,String[],String,XMLString)
-
-    /** End attribute list. */
-    public void endAttlist() throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endAttlist()");
-        fOut.flush();
-
-    } // endAttlist()
-
-    /** Internal entity declaration. */
-    public void internalEntityDecl(String name, XMLString text,
-                                   XMLString nonNormalizedText)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("internalEntityDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("text=");
-        printQuotedString(text.ch, text.offset, text.length);
-        fOut.print(',');
-        fOut.print("nonNormalizedText=");
-        printQuotedString(nonNormalizedText.ch, nonNormalizedText.offset,
-                          nonNormalizedText.length);
-        fOut.println(')');
-        fOut.flush();
-
-    } // internalEntityDecl(String,XMLString)
-
-    /** External entity declaration. */
-    public void externalEntityDecl(String name,
-                                   String publicId, String systemId,
-                                   String baseSystemId) throws XNIException {
-
-        printIndent();
-        fOut.print("externalEntityDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.print(',');
-        fOut.print("baseSystemId=");
-        printQuotedString(baseSystemId);
-        fOut.println(')');
-        fOut.flush();
-
-    } // externalEntityDecl(String,String,String)
-
-    /** Unparsed entity declaration. */
-    public void unparsedEntityDecl(String name, String publicId,
-                                   String systemId, String notation)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("externalEntityDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.print(',');
-        fOut.print("notation=");
-        printQuotedString(notation);
-        fOut.println(')');
-        fOut.flush();
-
-    } // unparsedEntityDecl(String,String,String,String)
-
-    /** Notation declaration. */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws XNIException {
-
-        printIndent();
-        fOut.print("notationDecl(");
-        fOut.print("name=");
-        printQuotedString(name);
-        fOut.print(',');
-        fOut.print("publicId=");
-        printQuotedString(publicId);
-        fOut.print(',');
-        fOut.print("systemId=");
-        printQuotedString(systemId);
-        fOut.println(')');
-        fOut.flush();
-
-    } // notationDecl(String,String,String)
-
-    /** Start conditional section. */
-    public void startConditional(short type) throws XNIException {
-
-        printIndent();
-        fOut.print("startConditional(");
-        fOut.print("type=");
-        switch (type) {
-            case XMLDTDHandler.CONDITIONAL_IGNORE: {
-                fOut.print("CONDITIONAL_IGNORE");
-                break;
-            }
-            case XMLDTDHandler.CONDITIONAL_INCLUDE: {
-                fOut.print("CONDITIONAL_INCLUDE");
-                break;
-            }
-            default: {
-                fOut.print("??? ("+type+')');
-            }
-        }
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startConditional(short)
-
-    /** End conditional section. */
-    public void endConditional() throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endConditional()");
-        fOut.flush();
-
-    } // endConditional()
-
-    /** End DTD. */
-    public void endDTD() throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endDTD()");
-        fOut.flush();
-
-    } // endDTD()
-
-    //
-    // XMLDTDContentModelHandler methods
-    //
-
-    /** Start content model. */
-    public void startContentModel(String elementName) throws XNIException {
-
-        printIndent();
-        fOut.print("startContentModel(");
-        fOut.print("elementName=");
-        printQuotedString(elementName);
-        fOut.println(')');
-        fOut.flush();
-        fIndent++;
-
-    } // startContentModel(String)
-
-    /** Any. */
-    public void any() throws XNIException {
-
-        printIndent();
-        fOut.println("any()");
-        fOut.flush();
-
-    } // any()
-
-    /** Empty. */
-    public void empty() throws XNIException {
-
-        printIndent();
-        fOut.println("empty()");
-        fOut.flush();
-
-    } // empty()
-
-    /** Start group. */
-    public void startGroup() throws XNIException {
-
-        printIndent();
-        fOut.println("startGroup()");
-        fOut.flush();
-        fIndent++;
-
-    } // childrenStartGroup()
-
-    /** #PCDATA. */
-    public void pcdata() throws XNIException {
-
-        printIndent();
-        fOut.println("pcdata()");
-        fOut.flush();
-
-    } // pcdata()
-
-    /** Element. */
-    public void element(String elementName) throws XNIException {
-
-        printIndent();
-        fOut.print("element(");
-        fOut.print("elementName=");
-        printQuotedString(elementName);
-        fOut.println(')');
-        fOut.flush();
-
-    } // element(String)
-
-    /** separator. */
-    public void separator(short separator) throws XNIException {
-
-        printIndent();
-        fOut.print("separator(");
-        fOut.print("separator=");
-        switch (separator) {
-            case XMLDTDContentModelHandler.SEPARATOR_CHOICE: {
-                fOut.print("SEPARATOR_CHOICE");
-                break;
-            }
-            case XMLDTDContentModelHandler.SEPARATOR_SEQUENCE: {
-                fOut.print("SEPARATOR_SEQUENCE");
-                break;
-            }
-            default: {
-                fOut.print("??? ("+separator+')');
-            }
-        }
-        fOut.println(')');
-        fOut.flush();
-
-    } // separator(short)
-
-    /** Occurrence. */
-    public void occurrence(short occurrence) throws XNIException {
-
-        printIndent();
-        fOut.print("occurrence(");
-        fOut.print("occurrence=");
-        switch (occurrence) {
-            case XMLDTDContentModelHandler.OCCURS_ONE_OR_MORE: {
-                fOut.print("OCCURS_ONE_OR_MORE");
-                break;
-            }
-            case XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE: {
-                fOut.print("OCCURS_ZERO_OR_MORE");
-                break;
-            }
-            case XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE: {
-                fOut.print("OCCURS_ZERO_OR_ONE");
-                break;
-            }
-            default: {
-                fOut.print("??? ("+occurrence+')');
-            }
-        }
-        fOut.println(')');
-        fOut.flush();
-
-    } // occurrence(short)
-
-    /** End group. */
-    public void endGroup() throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endGroup()");
-        fOut.flush();
-
-    } // childrenEndGroup()
-
-    /** End content model. */
-    public void endContentModel() throws XNIException {
-
-        fIndent--;
-        printIndent();
-        fOut.println("endContentModel()");
-        fOut.flush();
-
-    } // endContentModel()
-
-    //
-    // XMLErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Warning", ex);
-    } // warning(String,String,XMLParseException)
-
-    /** Error. */
-    public void error(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Error", ex);
-    } // error(String,String,XMLParseException)
-
-    /** Fatal error. */
-    public void fatalError(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(String,String,XMLParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Prints an element. */
-    protected void printElement(QName element, XMLAttributes attributes) {
-
-        fOut.print("element=");
-        fOut.print('{');
-        fOut.print("prefix=");
-        printQuotedString(element.prefix);
-        fOut.print(',');
-        fOut.print("localpart=");
-        printQuotedString(element.localpart);
-        fOut.print(',');
-        fOut.print("rawname=");
-        printQuotedString(element.rawname);
-        fOut.print(',');
-        fOut.print("uri=");
-        printQuotedString(element.uri);
-        fOut.print('}');
-        fOut.print(',');
-        fOut.print("attributes=");
-        if (attributes == null) {
-            fOut.println("null");
-        }
-        else {
-            fOut.print('{');
-            int length = attributes.getLength();
-            for (int i = 0; i < length; i++) {
-                if (i > 0) {
-                    fOut.print(',');
-                }
-                attributes.getName(i, fQName);
-                String attrType = attributes.getType(i);
-                String attrValue = attributes.getValue(i);
-                String attrNonNormalizedValue = attributes.getNonNormalizedValue(i);
-                fOut.print("name=");
-                fOut.print('{');
-                fOut.print("prefix=");
-                printQuotedString(fQName.prefix);
-                fOut.print(',');
-                fOut.print("localpart=");
-                printQuotedString(fQName.localpart);
-                fOut.print(',');
-                fOut.print("rawname=");
-                printQuotedString(fQName.rawname);
-                fOut.print(',');
-                fOut.print("uri=");
-                printQuotedString(fQName.uri);
-                fOut.print('}');
-                fOut.print(',');
-                fOut.print("type=");
-                printQuotedString(attrType);
-                fOut.print(',');
-                fOut.print("value=");
-                printQuotedString(attrValue);
-                fOut.print(',');
-                fOut.print("nonNormalizedValue=");
-                printQuotedString(attrNonNormalizedValue);
-                if (attributes.isSpecified(i) == false ) {
-                   fOut.print("(default)");
-                }
-                fOut.print('}');
-            }
-            fOut.print('}');
-        }
-
-    } // printElement(QName,XMLAttributes)
-
-    /** Print quoted string. */
-    protected void printQuotedString(String s) {
-
-        if (s == null) {
-            fOut.print("null");
-            return;
-        }
-
-        fOut.print('"');
-        int length = s.length();
-        for (int i = 0; i < length; i++) {
-            char c = s.charAt(i);
-            normalizeAndPrint(c);
-        }
-        fOut.print('"');
-
-    } // printQuotedString(String)
-
-    /** Print quoted string. */
-    protected void printQuotedString(char[] ch, int offset, int length) {
-
-        fOut.print('"');
-        for (int i = 0; i < length; i++) {
-            normalizeAndPrint(ch[offset + i]);
-        }
-        fOut.print('"');
-
-    } // printQuotedString(char[],int,int)
-
-    /** Normalize and print. */
-    protected void normalizeAndPrint(char c) {
-
-        switch (c) {
-            case '\n': {
-                fOut.print("\\n");
-                break;
-            }
-            case '\r': {
-                fOut.print("\\r");
-                break;
-            }
-            case '\t': {
-                fOut.print("\\t");
-                break;
-            }
-            case '\\': {
-                fOut.print("\\\\");
-                break;
-            }
-            case '"': {
-                fOut.print("\\\"");
-                break;
-            }
-            default: {
-                fOut.print(c);
-            }
-        }
-
-    } // normalizeAndPrint(char)
-
-    /** Prints the error message. */
-    protected void printError(String type, XMLParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,XMLParseException)
-
-    /** Prints the indent. */
-    protected void printIndent() {
-
-        for (int i = 0; i < fIndent; i++) {
-            fOut.print(' ');
-        }
-
-    } // printIndent()
-
-    //
-    // MAIN
-    //
-
-    /** Main. */
-    public static void main(String[] argv) throws Exception {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        XMLDocumentParser parser = null;
-        XMLParserConfiguration parserConfig = null;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-        boolean notifyCharRefs = DEFAULT_NOTIFY_CHAR_REFS;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                        continue;
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parserConfig = (XMLParserConfiguration)Class.forName(parserName).newInstance();
-                        parser = null;
-                    }
-                    catch (Exception e) {
-                        parserConfig = null;
-                        System.err.println("error: Unable to instantiate parser configuration ("+parserName+")");
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("c")) {
-                    notifyCharRefs = option.equals("c");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parserConfig == null) {
-
-                // create parser
-                try {
-                    parserConfig = (XMLParserConfiguration)Class.forName(DEFAULT_PARSER_CONFIG).newInstance();
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser configuration ("+DEFAULT_PARSER_CONFIG+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            if (parser == null) {
-                parser = new DocumentTracer(parserConfig);
-            }
-            try {
-                parserConfig.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (XMLConfigurationException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parserConfig.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (XMLConfigurationException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parserConfig.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (XMLConfigurationException e) {
-                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
-                    System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-                }
-            }
-            try {
-                parserConfig.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (XMLConfigurationException e) {
-                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
-                    System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-                }
-            }
-            try {
-                parserConfig.setFeature(NOTIFY_CHAR_REFS_FEATURE_ID, notifyCharRefs);
-            }
-            catch (XMLConfigurationException e) {
-                if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                    e.printStackTrace();
-                }
-                else {
-                    System.err.println("warning: Parser does not support feature ("+NOTIFY_CHAR_REFS_FEATURE_ID+")");
-                }
-            }
-
-            // parse file
-            try {
-                parser.parse(new XMLInputSource(null, arg, null));
-            }
-            catch (XMLParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof XNIException) {
-                    e = ((XNIException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java xni.DocumentTracer (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.out.println("  -p name  Specify parser configuration by name.");
-        System.err.println("  -n | -N  Turn on/off namespace processing.");
-        System.err.println("  -v | -V  Turn on/off validation.");
-        System.err.println("  -s | -S  Turn on/off Schema validation support.");
-        System.err.println("           NOTE: Not supported by all parser configurations.");
-        System.err.println("  -f  | -F Turn on/off Schema full checking.");
-        System.err.println("           NOTE: Requires use of -s and not supported by all parsers.");
-        System.err.println("  -c | -C  Turn on/off character notifications");
-        System.err.println("  -h       This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.out.println("  Config:     "+DEFAULT_PARSER_CONFIG);
-        System.out.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.out.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.out.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-        System.out.print("  Char refs:  ");
-        System.err.println(DEFAULT_NOTIFY_CHAR_REFS ? "on" : "off" );
-
-    } // printUsage()
-
-} // class DocumentTracer
diff --git a/samples/xni/PSVIWriter.java b/samples/xni/PSVIWriter.java
deleted file mode 100644
index bd834f4..0000000
--- a/samples/xni/PSVIWriter.java
+++ /dev/null
@@ -1,1182 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni;
-
-
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.XMLNamespaceBinder;
-
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.DefaultErrorHandler;
-import org.apache.xerces.util.MessageFormatter;
-import org.apache.xerces.util.XMLAttributesImpl;
-
-//for testing
-import org.apache.xerces.impl.xs.XSTypeDecl;
-import org.apache.xerces.impl.xs.ElementPSVImpl;
-import org.apache.xerces.impl.xs.AttributePSVImpl;
-
-import org.apache.xml.serialize.IndentPrinter;
-import org.apache.xml.serialize.EncodingInfo;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.Printer;
-import org.apache.xml.serialize.LineSeparator;
-
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.NamespaceContext;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.XMLDocumentHandler;
-
-import org.apache.xerces.xni.psvi.ItemPSVI;
-import org.apache.xerces.xni.psvi.ElementPSVI;
-import org.apache.xerces.xni.psvi.AttributePSVI;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLDocumentFilter;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParseException;
-
-import java.io.*;
-import java.util.*;
-
-
-/**
- * This class is a intersepts XNI events and serialized
- * XML infoset and Post Schema Validation Infoset.
- * 
- * @author Arun  Yadav,Sun Miscrosystem.
- * @version $Id$
- */
-public class PSVIWriter
-implements XMLComponent, XMLDocumentFilter {
-
-
-    public static final String XERCES_PSVI_NS = "http://apache.org/xml/2001/PSVInfosetExtension";
-
-    /** Property identifier: Namespace Binder  */
-    protected static final String NAMESPACE_BINDER =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_BINDER_PROPERTY;
-
-    /** Property identifier: symbol table. */
-    protected static final String SYMBOL_TABLE =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-
-    /** Feature id: include ignorable whitespace. */
-    protected static final String INCLUDE_IGNORABLE_WHITESPACE =
-    "http://apache.org/xml/features/dom/include-ignorable-whitespace";
-
-    protected static final String PSVI_OUTPUT ="psvi_output.xml";
-
-    /** Include ignorable whitespace. */
-    protected boolean fIncludeIgnorableWhitespace;
-
-    /** Recognized features. */
-    protected static final String[] RECOGNIZED_FEATURES = {
-        NAMESPACE_BINDER,
-        INCLUDE_IGNORABLE_WHITESPACE,
-        //  PSVINFOSET,
-    };
-    /** Recognized properties. */
-    protected static final String[] RECOGNIZED_PROPERTIES={
-        SYMBOL_TABLE,
-    };
-
-    /** PSVInfoset */
-    protected boolean fPSVInfoset;
-
-    /** Symbol: "". */
-    private String fEmptySymbol;
-
-    /** Symbol: "xml". */
-    private String fXmlSymbol;
-
-    /** Symbol: "xmlns". */
-    private String fXmlnsSymbol;
-
-    /** XMLNS namespace: XML-Infoset */
-    public static final String XMLNS_URI ="http://www.w3.org/2000/xmlns/";
-
-    /** Document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    /** NamespaceBinder*/
-    protected XMLNamespaceBinder fNamespaceBinder;
-
-    /** Attribute QName. */
-    private QName fAttrQName = new QName();
-
-    /** Attributes and Element Info  is  cached in stack */
-    private Stack  _elementState =new Stack();
-
-    /** The output stream. */
-    private OutputStream    _output;
-
-    /** The underlying writer. */
-    private java.io.Writer _writer;
-
-    private EncodingInfo    _encodingInfo;
-
-    private final StringBuffer fErrorBuffer = new StringBuffer();
-
-    /** The printer used for printing text parts. */
-    protected Printer       _printer;
-
-
-    public PSVIWriter() {
-        System.out.println("Generating Schema Information Set Contribution (PSVI) \n"
-                           + "which follow as a consequence of validation and/or assessment.");
-
-        System.out.println("NOTE: Requires use of -s and -v");
-        System.out.println("Output: generated in "+PSVI_OUTPUT);
-
-    } // <init>()
-
-    //REVISIT
-    // 1. where to output the PSVI info to user( output console or file)?
-    // 2. Is there any other  better way to format the output.
-    public void reset(XMLComponentManager componentManager)
-    throws XNIException {
-
-        // Feature's name for PSVIWriter is not yet decided.
-/*      try {
-            fPSVInfoset = componentManager.getFeature(PSVINFOSET);
-        }
-        catch (XMLConfigurationException e) {
-            fPSVInfoset = false;
-        }*/
-        /**For Testing */
-        fPSVInfoset = true;
-
-        fNamespaceBinder = (XMLNamespaceBinder)componentManager.getProperty(NAMESPACE_BINDER);
-        fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
-        fIncludeIgnorableWhitespace = componentManager.getFeature(INCLUDE_IGNORABLE_WHITESPACE);
-
-        // save built-in entity names
-        fEmptySymbol = fSymbolTable.addSymbol("");
-        fXmlSymbol = fSymbolTable.addSymbol("xml");
-        fXmlnsSymbol = fSymbolTable.addSymbol("xmlns");
-        fErrorBuffer.setLength(0);
-        try {
-            OutputFormat outputFormat = new OutputFormat();
-            outputFormat.setIndenting(true);
-            outputFormat.setLineSeparator(LineSeparator.Windows);
-            outputFormat.setLineWidth(150);
-            outputFormat.setOmitComments(false);
-            outputFormat.setOmitDocumentType(false);
-            outputFormat.setOmitXMLDeclaration(false);
-
-            FileOutputStream fos = new FileOutputStream(PSVI_OUTPUT);
-            _output = new BufferedOutputStream(fos);
-
-            _encodingInfo = outputFormat.getEncodingInfo();
-            _writer = _encodingInfo.getWriter(_output);
-
-            _printer = new IndentPrinter( _writer, outputFormat );
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     *
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-    throws XMLConfigurationException {
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     *
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setProperty(String propertyId, Object value)
-    throws XMLConfigurationException {
-
-    } // setProperty(String,Object)
-
-    //
-    // XMLDocumentSource methods
-    //
-
-    /**
-     * Sets the document handler to receive information about the document.
-     *
-     * @param documentHandler The document handler.
-     * @param augs   Additional information that may include infoset augmentations
-     */
-    public void setDocumentHandler(XMLDocumentHandler documentHandler) {
-        fDocumentHandler = documentHandler;
-    } // setDocumentHandler(XMLDocumentHandler)
-
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * This method notifies the start of an entity. General entities are just
-     * specified by their name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name,
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding, Augmentations augs)
-    throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startEntity(name, publicId, systemId,
-                                         baseSystemId, encoding, augs);
-        }
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs)
-    throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.textDecl(version, encoding, augs);
-        }
-    } // textDecl(String,String)
-
-    /**
-     * The start of the document.
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset) {
-            printIndentTag("<document"+
-                           " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
-                           " xmlns:psv='"+ XERCES_PSVI_NS+"'"+
-                           " xmlns='http://www.w3.org/2001/05/XMLInfoset'>");
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startDocument(locator, encoding, augs);
-        }
-    } // startDocument(XMLLocator,String)
-
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     *
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset) {
-            printElement("characterEncodingScheme",encoding);
-            printElement("standalone",standalone);
-            printElement("version",version);
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
-        }
-    } // xmlDecl(String,String,String)
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     *
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     *                    otherwise.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement,
-                            String publicId, String systemId, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset) {
-            checkForChildren();
-            printIndentTag("<docTypeDeclaration>");
-            if (publicId != null)
-                printElement("publicIdentifier", publicId);
-            if (systemId != null)
-                printElement("systemIdentifier", systemId);
-            printUnIndentTag("</docTypeDeclaration>");
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
-        }
-    } // doctypeDecl(String,String,String)
-
-    /**
-     * A comment.
-     *
-     * @param text The text in the comment.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-        if (fPSVInfoset) {
-            checkForChildren();
-            printIndentTag("<comment>");
-            printElement("content", text.toString());
-            printUnIndentTag("</comment>");
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.comment(text, augs);
-        }
-    } // comment(XMLString)
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     *
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target,
-                                      XMLString data, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset) {
-            checkForChildren();
-            printIndentTag("<processingInstruction>");
-            printElement("target",target);
-            printElement("content",data.toString());
-            printUnIndentTag("</processingInstruction>");
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.processingInstruction(target, data, augs);
-        }
-    } // processingInstruction(String,XMLString)
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-    throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
-        }
-    } // startPrefixMapping(String,String)
-
-    /**
-     * Binds the namespaces. This method will handle calling the
-     * document handler to start the prefix mappings.
-     * <p>
-     * <strong>Note:</strong> This method makes use of the
-     * fAttributeQName variable. Any contents of the variable will
-     * be destroyed. Caller should copy the values out of this
-     * temporary variable before calling this method.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element,
-                             XMLAttributes attributes, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset) {
-            checkForChildren();
-
-            _elementState.push(new ElementState(true));
-
-            printIndentTag("<element>");
-            printElement("namespaceName" , element.uri);
-            printElement("localName" , element.localpart);
-            printElement("prefix" , element.prefix);
-            printAttributes(attributes);
-            printPSVIStartElement(augs);
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(element, attributes, augs);
-        }
-
-    } // startElement(QName,XMLAttributes)
-
-    /**
-     * An empty element.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset) {
-            printIndentTag("<element>");
-            printElement("namespaceName" , element.uri);
-            printElement("localName" , element.localpart);
-            printElement("prefix" , element.prefix);
-            printAttributes(attributes);
-            printTag("<children/>");
-            printPSVIStartElement(augs);
-            printPSVIEndElement(augs);
-            printUnIndentTag("</element>");
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.emptyElement(element, attributes, augs);
-        }
-
-    } // emptyElement(QName,XMLAttributes)
-
-    /**
-     * Character content.
-     *
-     * @param text The content.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs)
-    throws XNIException {
-        // REVISIT: 2.6. Character Information Items requires character property for 
-        //          each character. However, it also says:
-        // "Each character is a logically separate information item, 
-        //  but XML applications are free to chunk characters into larger 
-        //  groups as necessary or desirable"
-        //  XSV outputs each character separately.
-        
-        checkForChildren();
-        printIndentTag("<character>");
-        printElement("characterCode", text.toString());
-        printElement("elementContentWhitespace", "false");
-        printUnIndentTag("</character>");
-
-        if (fDocumentHandler != null) {
-            fDocumentHandler.characters(text,augs);
-        }
-    } // characters(XMLString)
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     *
-     * @param text The ignorable whitespace.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset && fIncludeIgnorableWhitespace) {
-            int textLength = text.length;
-            checkForChildren();
-            // REVISIT: see characters()
-            printIndentTag("<character>");
-            printElement("characterCode", text.toString());
-            printElement("elementContentWhitespace", "true");
-            printUnIndentTag("</character>");
-
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.ignorableWhitespace(text, augs);
-        }
-    } // ignorableWhitespace(XMLString)
-
-    /**
-     * The end of an element.
-     *
-     * @param element The name of the element.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs)
-    throws XNIException {
-        if (fPSVInfoset) {
-            ElementState fElementState =(ElementState)_elementState.peek();
-            if (fElementState.isEmpty) {
-                printTag("<children/>");
-            }
-            else {
-                printUnIndentTag("</children>");
-            }
-            _elementState.pop();
-            printinScopeNamespaces();
-            printPSVIEndElement(augs);
-            printUnIndentTag("</element>");
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endElement(element, augs);
-        }
-    } // endElement(QName)
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs)
-    throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endPrefixMapping(prefix, augs);
-        }
-
-    } // endPrefixMapping(String)
-
-    /**
-     * The start of a CDATA section.
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startCDATA(augs);
-        }
-    } // startCDATA()
-
-    /**
-     * The end of a CDATA section.
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA( Augmentations augs ) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endCDATA(augs);
-        }
-    } // endCDATA()
-
-    /**
-     * The end of the document.
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument( Augmentations augs ) throws XNIException {
-        if (fPSVInfoset) {
-            try {
-                printUnIndentTag("</children>");
-                printElement("documentElement","");
-                //REVISIT : needs to implement the XMLDTDHandler
-                printTag("<notations/>");
-                printTag("<unparsedEntities/>");
-
-                // REVISIT: how can we find out what is the baseURI?
-                printElement("baseURI","");
-                
-                //REVISIT:
-                printElement("allDeclarationsProcessed","true");
-                printUnIndentTag("</document>");
-                _printer.flush();
-            }
-            catch (IOException ex) {
-                ex.printStackTrace();
-            }
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endDocument(augs);
-        }
-    } // endDocument()
-
-    /**
-     * This method notifies the end of an entity. General entities are just
-     * specified by their name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name The name of the entity.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endEntity(name, augs);
-        }
-    } // endEntity(String)
-
-    
-    /* The following information will be available at the startElement call:
-    * name, namespace, type, notation, validation context
-    *
-    * The following information will be available at the endElement call:
-    * nil, specified, normalized value, member type, validity, error codes,
-    * default
-    */
-    public void printPSVIStartElement(Augmentations augs) {
-        ElementPSVI elemPSVI =(ElementPSVI)augs.getItem("ELEM_PSVI");
-        if (elemPSVI != null) {
-
-            // REVISIT: Should we store the values till end element call?
-            printElement("psv:validationContext",elemPSVI.getValidationContext());
-
-
-            short definationType = elemPSVI.getTypeDefinitionType();
-            if (definationType == XSTypeDecl.SIMPLE_TYPE) {
-                printElement("psv:typeDefinitionType","simple");
-            }
-            else if (definationType == XSTypeDecl.COMPLEX_TYPE) {
-                printElement("psv:typeDefinitionType","complex");
-            }
-            printElement("psv:typeDefinitionNamespace ",elemPSVI.getTypeNamespace());
-            printElement("psv:typeDefinitionAnonymous",String.valueOf(elemPSVI.isTypeAnonymous()));
-
-            printElement("psv:typeDefinitionName",(elemPSVI.isTypeAnonymous())?null:elemPSVI.getTypeName());
-            printElement("psv:memberTypeDefinitionAnonymous",String.valueOf(elemPSVI.isMemberTypeAnonymous()));
-            printElement("psv:memberTypeDefinitionName",(elemPSVI.isMemberTypeAnonymous())?null:elemPSVI.getMemberTypeName());
-            printElement("psv:memberTypeDefinitionNamespace",elemPSVI.getMemberTypeNamespace());
-            printElement("psv:notationSystem",elemPSVI.getNotationSystemId());
-            printElement("psv:notationPublic",elemPSVI.getNotationPublicId());
-        }
-    }
-
-    /* The following information will be available at the startElement call:
-    * name, namespace, type, notation, validation context
-    *
-    * The following information will be available at the endElement call:
-    * nil, specified, normalized value, member type, validity, error codes,
-    * default
-    */
-    public void printPSVIEndElement(Augmentations augs) {
-        ElementPSVI elemPSVI = (ElementPSVI)augs.getItem("ELEM_PSVI");
-        if (elemPSVI != null) {
-
-
-            short validation = elemPSVI.getValidationAttempted();
-            if (validation == ItemPSVI.NO_VALIDATION) {
-                printElement("psv:validationAttempted","none");
-            }
-            else if (validation == ItemPSVI.PARTIAL_VALIDATION) {
-                printElement("psv:validationAttempted","partial");
-            }
-            else if (validation == ItemPSVI.FULL_VALIDATION) {
-                printElement("psv:validationAttempted","full");
-            }
-
-
-            short validity = elemPSVI.getValidity();
-            if (validity == ItemPSVI.UNKNOWN_VALIDITY) {
-                printElement("psv:validity","unknown");
-            }
-            else if (validity == ItemPSVI.VALID_VALIDITY) {
-                printElement("psv:validity","valid");
-            }
-            else if (validity == ItemPSVI.INVALID_VALIDITY) {
-                printElement("psv:validity","invalid");
-            }
-            //revisit
-            String [] errorCode = elemPSVI.getErrorCodes();
-            if (errorCode != null) {
-                int  errorCount = errorCode.length;
-                
-                for (int i=0;i< errorCount; i++) {
-                    fErrorBuffer.append(errorCode[i]);
-                    fErrorBuffer.append(" ");
-                }
-                printElement("psv:schemaErrorCode",fErrorBuffer.toString());
-                fErrorBuffer.setLength(0);
-            }
-            else {
-                printElement("psv:schemaErrorCode","");
-            }
-            printElement("psv:nil", String.valueOf(elemPSVI.isNil()));
-            printElement("psv:schemaNormalizedValue",elemPSVI.schemaNormalizedValue());
-            printElement("psv:schemaSpecified",String.valueOf(elemPSVI.schemaSpecified()));
-
-        }
-    }
-
-    public void printPSVIAttribute(Augmentations augs) {
-        AttributePSVI attrPSVI =(AttributePSVI)augs.getItem("ATTR_PSVI");
-        if (attrPSVI !=null) {
-
-            short validation = attrPSVI.getValidationAttempted();
-            if (validation == ItemPSVI.NO_VALIDATION) {
-                printElement("psv:validationAttempted","none");
-            }
-            else if (validation == ItemPSVI.FULL_VALIDATION) {
-                printElement("psv:validationAttempted","full");
-            }
-
-            printElement("psv:validationContext",attrPSVI.getValidationContext());
-
-            short validity = attrPSVI.getValidity();
-            if (validity == ItemPSVI.UNKNOWN_VALIDITY) {
-                printElement("psv:validity","unknown");
-            }
-            else if (validity == ItemPSVI.VALID_VALIDITY) {
-                printElement("psv:validity","valid");
-            }
-            else if (validity == ItemPSVI.INVALID_VALIDITY) {
-                printElement("psv:validity","invalid");
-            }
-
-            //REVISIT
-            String [] errorCode = attrPSVI.getErrorCodes();
-            int  errorCount = errorCode.length;
-            if (errorCount == 0) {
-                printElement("psv:schemaErrorCode","");
-            }
-            else {
-                for (int i=errorCount-1;i< errorCount; ++i) {
-                    fErrorBuffer.append(errorCode[i]);
-                    fErrorBuffer.append(" ");
-                }
-                printElement("psv:schemaErrorCode",fErrorBuffer.toString());
-                fErrorBuffer.setLength(0);
-
-            }
-
-            printElement("psv:schemaNormalizedValue",attrPSVI.schemaNormalizedValue());
-            printElement("psv:schemaSpecified", (attrPSVI.schemaSpecified())?"infoset":"schema");
-
-            short definationType = attrPSVI.getTypeDefinitionType();
-            if (definationType == XSTypeDecl.SIMPLE_TYPE) {
-                printElement("psv:typeDefinitionType","simple");
-            }
-
-            printElement("psv:typeDefinitionNamespace",attrPSVI.getTypeNamespace());
-            printElement("psv:typeDefinitionAnonymous",String.valueOf(attrPSVI.isTypeAnonymous()));
-            printElement("psv:typeDefinitionName",(attrPSVI.isTypeAnonymous())?null:attrPSVI.getTypeName());
-            printElement("psv:memberTypeDefinitionAnonymous",String.valueOf(attrPSVI.isMemberTypeAnonymous()));
-            printElement("psv:memberTypeDefinitionName",(attrPSVI.isMemberTypeAnonymous())?null:attrPSVI.getMemberTypeName());
-            printElement("psv:memberTypeDefinitionNamespace",attrPSVI.getMemberTypeNamespace());
-
-        }
-    }
-    /**
-     * This method write the element at the currrnt indent  level.
-     *
-     * @param tagname The name of the Element.
-     *
-     * @throws IOEXception
-     */
-    private void printTag(String tagname) {
-        try {
-            _printer.printText(tagname);
-            _printer.breakLine();
-        }
-        catch (IOException ex) {
-            ex.printStackTrace();
-        }
-    }//printTag
-    /**
-     * This method write the element at the current indent level and increase
-     * the one level of indentation.
-     *
-     * @param The name of the Element.
-     *
-     * @throws IOException
-     */
-    private void printIndentTag(String tagname) {
-        try {
-            _printer.indent();
-            _printer.printText(tagname);
-            _printer.breakLine();
-        }
-        catch (IOException ex) {
-            ex.printStackTrace();
-        }
-    }//printIndentTag
-    /**
-     * This method write the element at the current indent level and decrease
-     * one level of indentation.
-     *
-     * @param the name of the Element.
-     *
-     */
-    private void printUnIndentTag(String tagName) {
-        try {
-            _printer.unindent();
-            _printer.printText(tagName);
-            _printer.breakLine();
-        }
-        catch (IOException ex) {
-            ex.printStackTrace();
-        }
-    }//printUnIndentTag
-
-    /**
-     * Write the Element Information Item for each element appearing in the XML
-     * document. One of the element information items is the value of the
-     * [document element] property of the document information item, corresponding
-     * to the root of the element tree, and all other element information items
-     * are accessible by recursively following its [children] property.
-     *
-     * @elementName  Name of the elment.
-     * @elemmentValue  Value of the element
-     */
-    private void printElement(String elementName, String elementValue) {
-        try {
-
-            if (elementValue == null || elementValue == "") {
-                _printer.printText("<"+elementName+" xsi:nil='true'/>");
-                _printer.breakLine();
-                return;
-            }
-            _printer.printText("<"+elementName+">");
-            _printer.printText(elementValue);
-            _printer.printText("</"+elementName+">");
-            _printer.breakLine();
-        }
-        catch (IOException ex) {
-            ex.printStackTrace();
-        }
-    }//printElement
-
-    /**
-     * Write an unordered set of attribute information items, one for each of
-     * the attributes (specified or defaulted from the DTD) of this element.
-     * Namespace declarations do not appear in this set. If the element has no
-     * attributes, this set has no members.
-     */
-    private void printAttributes(XMLAttributes attributes) {
-        boolean namespaceAttribute = false;
-        boolean attrElement = false;
-
-        int attrCount = attributes.getLength();
-
-        if (attrCount == 0) {
-            printTag("<attributes/>");
-            printTag("<namespaceAttributes/>");
-            return;
-        }
-
-        for (int i = 0; i < attrCount; i++) {
-            String localpart = attributes.getLocalName(i);
-            String prefix = attributes.getPrefix(i);
-            if (prefix == fXmlnsSymbol || localpart == fXmlnsSymbol) {
-                namespaceAttribute=true;
-                continue;
-            }
-            if (!attrElement)
-                printIndentTag("<attributes>");
-            
-            boolean psviAvailable =  (attributes.getAugmentations(i).getItem("ATTR_PSVI")!=null);
-
-            // REVISIT: in XSV attributes that are defaulted from XML Schema 
-            // still appear as an item from XML Infoset and has the same properties
-            // It looks  wrong.
-            //
-            printIndentTag("<attribute>");
-            printElement("namespaceName",attributes.getURI(i));
-            printElement("localName",attributes.getLocalName(i));
-            printElement("prefix",attributes.getPrefix(i));
-            printElement("normalizedValue",attributes.getValue(i));
-            if (!psviAvailable) {
-                // REVISIT: this attribute was defaulted from XML Schema
-                // The following properties become unavailable/ not specified.
-                printElement("specified",String.valueOf(attributes.isSpecified(i)));
-                printElement("attributeType", attributes.getType(i));
-            }  else{
-                printElement("attributeType", null);
-            }
-            
-            // REVISIT: how do we populate this property?
-            printElement("references","");
-            
-            printPSVIAttribute(attributes.getAugmentations(i));
-            printUnIndentTag("</attribute>");
-            attrElement = true;
-        }
-        if (attrElement) {
-            printUnIndentTag("</attributes>");
-        }
-        else {
-            printTag("<attributes/>");
-        }
-
-        if (namespaceAttribute) {
-            printNamespaceAttributes(attributes);
-        }
-        else {
-            printTag("<namespaceAttributes/>");
-        }
-    }//printAttributes
-
-
-        /**
-     * Write an unordered set of attribute information items, one for each of
-     * the namespace declarations (specified or defaulted from the DTD) of this
-     * element. A declaration of the form xmlns="", which undeclares the default
-     * namespace, counts as a namespace declaration. By definition, all
-     * namespace attributes (including those named xmlns, whose [prefix]
-     * property has no value) have a namespace URI of
-     * http://www.w3.org/2000/xmlns/. If the element has no namespace
-     * declarations, this set has no members
-     */
-    private void printNamespaceAttributes(XMLAttributes attributes) {
-        
-        int attrCount = attributes.getLength();
-
-        printIndentTag("<namespaceAttributes>");
-        for (int i = 0; i < attrCount; i++) {
-            String localpart = attributes.getLocalName(i);
-            String prefix = attributes.getPrefix(i);
-            if (!(prefix == fXmlnsSymbol || localpart == fXmlnsSymbol))
-                continue;
-            printIndentTag("<attribute>");
-            printElement("namespaceName",XMLNS_URI);
-            printElement("localName",localpart);
-            printElement("prefix",prefix);
-            printElement("normalizedValue",attributes.getValue(i));
-            printElement("specified",String.valueOf(attributes.isSpecified(i)));
-            printElement("attributeType",attributes.getType(i));
-            // REVISIT: how do we populate this property?
-            printElement("references","");
-            printPSVIAttribute(attributes.getAugmentations(i));
-            printUnIndentTag("</attribute>");
-        }
-        printUnIndentTag("</namespaceAttributes>");
-        
-         
-    }//printNamespacesAttributes()
-
-
-    /**
-     * Write an unordered set of namespace information items, one for each of the
-     * namespaces in effect for this element. This set always contains an item
-     * with the prefix xml which is implicitly bound to the namespace name
-     * http://www.w3.org/XML/1998/namespace. It does not contain an item with the
-     * prefix xmlns (used for declaring namespaces), since an application can
-     * never encounter an element or attribute with that prefix. The set will
-     * include namespace items corresponding to all of the members of
-     * [namespace attributes], except for any representing a declaration of the
-     * form xmlns="", which does not declare a namespace but rather undeclares
-     * the default namespace
-     */
-    private void printinScopeNamespaces() {
-        NamespaceContext namespaceContext = fNamespaceBinder.getNamespaceContext();
-        NamespaceContext temp;
-        String prefix;
-
-        printIndentTag("<inScopeNamespaces>");
-        while (namespaceContext!=null) {
-            temp = namespaceContext.getParentContext();
-            if (temp == null) {
-                int prefixCount = namespaceContext.getDeclaredPrefixCount();
-                for (int i=0;i<prefixCount;i++) {
-                    printIndentTag("<namespace>");
-                    prefix=namespaceContext.getDeclaredPrefixAt(i);
-                    printElement("prefix",prefix);
-                    printElement("namespaceName",namespaceContext.getURI(prefix));
-                    printUnIndentTag("</namespace>");
-                }
-            }
-            namespaceContext = temp;
-        }
-        printUnIndentTag("</inScopeNamespaces>");
-    }//printinScopeNamespaces()
-
-    /**
-     *  Check whether the calling event is  first in children list ,
-     * if yes print the <children>.
-     */
-    private  void checkForChildren() {
-        if (!_elementState.empty()) {
-            ElementState fElementState =(ElementState) _elementState.peek();
-            if (fElementState.isEmpty == true) {
-                printIndentTag("<children>");
-                fElementState.isEmpty = false;
-            }
-        }
-        else {
-            printIndentTag("<children>");
-            _elementState.push(new ElementState(false));
-        }
-    }//checkForChildren
-
-
-
-    class ElementState {
-
-        public boolean isEmpty;
-        XMLAttributes fAttributes;
-
-        public ElementState(XMLAttributes attributes) {
-            fAttributes = attributes;
-            isEmpty=true;
-        }
-        public ElementState(boolean value) {
-            isEmpty=value;
-        }
-        public XMLAttributes getAttributes() {
-            return fAttributes;
-        }
-        public void isEmpty(boolean value) {
-            isEmpty = value;
-        }
-    }//class ElementState
-
-
-} // class PSVIWriter
diff --git a/samples/xni/PassThroughFilter.java b/samples/xni/PassThroughFilter.java
deleted file mode 100644
index 081eaf3..0000000
--- a/samples/xni/PassThroughFilter.java
+++ /dev/null
@@ -1,414 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-
-/**
- * This sample demonstrates how to implement a simple pass-through
- * filter for the document "streaming" information set using XNI.
- * This filter could be used in a pipeline of XNI parser components
- * that communicate document events.
- * <p>
- * <strong>Note:</strong> This sample does not contain a 
- * <code>main</code> method and cannot be run. It is only for
- * demonstration purposes.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class PassThroughFilter
-    implements XMLDocumentHandler {
-    
-    //
-    // Data
-    //
-    
-    /** The document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-    
-    //
-    // Public methods
-    //
-   
-    /** 
-     * Sets the document handler. 
-     *
-     * @param handler The new document handler.
-     */
-    public void setDocumentHandler(XMLDocumentHandler handler) {
-        fDocumentHandler = handler;
-    } // setDocumentHandler(XMLDocumentHandler)
-    
-    //
-    // XMLDocumentHandler methods
-    //
-    
-    /**
-     * The start of the document.
-     *
-     * @param locator  The document locator, or null if the document
-     *                 location cannot be reported during the parsing 
-     *                 of this document. However, it is <em>strongly</em>
-     *                 recommended that a locator be supplied that can 
-     *                 at least report the system identifier of the
-     *                 document.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *     
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startDocument(locator, encoding, augs);
-	    }
-    } // startDocument(XMLLocator,String)
-    
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     * 
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, 
-                        String standalone, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
-	    }
-    } // xmlDecl(String,String,String
-    
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     * 
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     *                    otherwise.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement, String publicId, 
-                            String systemId, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
-        }
-    } // doctypeDecl(String,String,String)
-    
-    /**
-     * A comment.
-     * 
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.comment(text, augs);
-        }
-    } // comment(XMLString)
-    
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.processingInstruction(target, data, augs);
-        }
-    } // processingInstruction(String,XMLString)
-    
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
-        }
-    } // startPrefixMapping(String,String)
-    
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endPrefixMapping(prefix, augs);
-        }
-    } // endPrefixMapping(String)
-    
-    /**
-     * The start of an element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(element, attributes, augs);
-        }
-    } // startElement(QName,XMLAttributes)
-    
-    /**
-     * An empty element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.emptyElement(element, attributes, augs);
-        }
-    } // emptyElement(QName,XMLAttributes)
-    
-    /**
-     * The end of an element.
-     * 
-     * @param element The name of the element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endElement(element, augs);
-        }
-    } // endElement(QName)
-    
-    /**
-     * This method notifies the start of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, String publicId, 
-                            String systemId, String baseSystemId,
-                            String encoding, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startEntity(name, publicId, 
-                                         systemId, baseSystemId,
-                                         encoding, augs);
-        }
-    } // startEntity(String,String,String,String,String)
-    
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.textDecl(version, encoding, augs);
-        }
-    } // textDecl(String,String)
-    
-    /**
-     * This method notifies the end of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endEntity(name, augs);
-        }
-    } // endEntity(String)
-    
-    /**
-     * Character content.
-     * 
-     * @param text The content.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.characters(text, augs);
-        }
-    } // characters(XMLString)
-    
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     * 
-     * @param text The ignorable whitespace.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.ignorableWhitespace(text, augs);
-        }
-    } // ignorableWhitespace(XMLString)
-    
-    /** 
-     * The start of a CDATA section. 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startCDATA(augs);
-        }
-    } // startCDATA()
-    
-    /**
-     * The end of a CDATA section. 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endCDATA(augs);
-        }
-    } // endCDATA()
-    
-    /**
-     * The end of the document.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endDocument(augs);
-        }
-    } // endDocument()
-    
-} // class PassThroughFilter
diff --git a/samples/xni/UpperCaseFilter.java b/samples/xni/UpperCaseFilter.java
deleted file mode 100644
index f595eb0..0000000
--- a/samples/xni/UpperCaseFilter.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XNIException;
- 
-/**
- * This sample demonstrates how to create a filter for the document
- * "streaming" information set that turns element names into upper
- * case.
- * <p>
- * <strong>Note:</strong> This sample does not contain a 
- * <code>main</code> method and cannot be run. It is only for
- * demonstration purposes.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class UpperCaseFilter
-    extends PassThroughFilter {
-    
-    //
-    // Data
-    //
-    
-    /** 
-     * Temporary QName structure used by the <code>toUpperCase</code>
-     * method. It should not be used anywhere else.
-     *
-     * @see #toUpperCase
-     */
-    private final QName fQName = new QName();
-
-    //
-    // XMLDocumentHandler methods
-    //
-    
-    /**
-     * The start of an element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-        super.startElement(toUpperCase(element), attributes, augs);
-    } // startElement(QName,XMLAttributes)
-    
-    /**
-     * An empty element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-        super.emptyElement(toUpperCase(element), attributes, augs);
-    } // emptyElement(QName,XMLAttributes)
-    
-    /**
-     * The end of an element.
-     * 
-     * @param element The name of the element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs)
-        throws XNIException {
-        super.endElement(toUpperCase(element), augs);
-    } // endElement(QName)
-    
-    //
-    // Protected methods
-    //
-    
-    /**
-     * This method upper-cases the prefix, localpart, and rawname
-     * fields in the specified QName and returns a different
-     * QName object containing the upper-cased string values.
-     *
-     * @param qname The QName to upper-case.
-     */
-    protected QName toUpperCase(QName qname) {
-        String prefix = qname.prefix != null
-                      ? qname.prefix.toUpperCase() : null;
-        String localpart = qname.localpart != null
-                         ? qname.localpart.toUpperCase() : null;
-        String rawname = qname.rawname != null
-                       ? qname.rawname.toUpperCase() : null;
-        String uri = qname.uri;
-        fQName.setValues(prefix, localpart, rawname, uri);
-        return fQName;
-    } // toUpperCase(QName):QName
-
-} // class UpperCaseFilter
diff --git a/samples/xni/Writer.java b/samples/xni/Writer.java
deleted file mode 100644
index 528ebbe..0000000
--- a/samples/xni/Writer.java
+++ /dev/null
@@ -1,725 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-
-import org.apache.xerces.parsers.XMLDocumentParser;
-import org.apache.xerces.util.XMLAttributesImpl;
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParseException;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-import org.apache.xerces.xni.parser.XMLPullParserConfiguration;
-
-/**
- * A sample XNI writer. This sample program illustrates how to
- * use the XNI XMLDocumentHandler callbacks in order to print a
- * document that is parsed.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class Writer
-    extends XMLDocumentParser
-    implements XMLErrorHandler {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Namespaces feature id (http://xml.org/sax/features/namespaces). */
-    protected static final String NAMESPACES_FEATURE_ID =
-        "http://xml.org/sax/features/namespaces";
-
-    /** Validation feature id (http://xml.org/sax/features/validation). */
-    protected static final String VALIDATION_FEATURE_ID =
-        "http://xml.org/sax/features/validation";
-
-    /** Schema validation feature id (http://apache.org/xml/features/validation/schema). */
-    protected static final String SCHEMA_VALIDATION_FEATURE_ID =
-        "http://apache.org/xml/features/validation/schema";
-
-    /** Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). */
-    protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID =
-        "http://apache.org/xml/features/validation/schema-full-checking";
-
-    // default settings
-
-    /** Default parser configuration (org.apache.xerces.parsers.StandardParserConfiguration). */
-    protected static final String DEFAULT_PARSER_CONFIG =
-        "org.apache.xerces.parsers.StandardParserConfiguration";
-
-    /** Default namespaces support (true). */
-    protected static final boolean DEFAULT_NAMESPACES = true;
-
-    /** Default validation support (false). */
-    protected static final boolean DEFAULT_VALIDATION = false;
-
-    /** Default Schema validation support (false). */
-    protected static final boolean DEFAULT_SCHEMA_VALIDATION = false;
-
-    /** Default Schema full checking support (false). */
-    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING = false;
-
-    /** Default canonical output (false). */
-    protected static final boolean DEFAULT_CANONICAL = false;
-
-    /** Default incremental mode (false). */
-    protected static final boolean DEFAULT_INCREMENTAL = false;
-
-    //
-    // Data
-    //
-
-    /** Print writer. */
-    protected PrintWriter fOut;
-
-    /** Canonical output. */
-    protected boolean fCanonical;
-
-    /** Element depth. */
-    protected int fElementDepth;
-
-    /** Seen root element. */
-    protected boolean fSeenRootElement;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public Writer(XMLParserConfiguration configuration) {
-        super(configuration);
-        fConfiguration.setErrorHandler(this);
-    } // <init>(XMLParserConfiguration)
-
-    //
-    // Public methods
-    //
-
-    /** Sets whether output is canonical. */
-    public void setCanonical(boolean canonical) {
-        fCanonical = canonical;
-    } // setCanonical(boolean)
-
-    /** Sets the output stream for printing. */
-    public void setOutput(OutputStream stream, String encoding)
-        throws UnsupportedEncodingException {
-
-        if (encoding == null) {
-            encoding = "UTF8";
-        }
-
-        java.io.Writer writer = new OutputStreamWriter(stream, encoding);
-        fOut = new PrintWriter(writer);
-
-    } // setOutput(OutputStream,String)
-
-    /** Sets the output writer. */
-    public void setOutput(java.io.Writer writer) {
-
-        fOut = writer instanceof PrintWriter
-             ? (PrintWriter)writer : new PrintWriter(writer);
-
-    } // setOutput(java.io.Writer)
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /** Start document. */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-        throws XNIException {
-
-        fSeenRootElement = false;
-        fElementDepth = 0;
-
-        if (!fCanonical) {
-            fOut.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
-            fOut.flush();
-        }
-
-    } // startDocument(XMLLocator,String,Augmentations)
-
-    /** Start element. */
-    public void startElement(QName element, XMLAttributes attrs, Augmentations augs)
-        throws XNIException {
-
-        fSeenRootElement = true;
-        fElementDepth++;
-        fOut.print('<');
-        fOut.print(element.rawname);
-        if (attrs != null) {
-            /***
-            attrs = sortAttributes(attrs);
-            /***/
-            int len = attrs.getLength();
-            for (int i = 0; i < len; i++) {
-                fOut.print(' ');
-                fOut.print(attrs.getQName(i));
-                fOut.print("=\"");
-                normalizeAndPrint(attrs.getValue(i));
-                fOut.print('"');
-            }
-        }
-        fOut.print('>');
-        fOut.flush();
-
-    } // startElement(QName,XMLAttributes,Augmentations)
-
-    /** Empty element. */
-    public void emptyElement(QName element, XMLAttributes attrs, Augmentations augs)
-        throws XNIException {
-
-        fSeenRootElement = true;
-        fElementDepth++;
-        fOut.print('<');
-        fOut.print(element.rawname);
-        if (attrs != null) {
-            /***
-            attrs = sortAttributes(attrs);
-            /***/
-            int len = attrs.getLength();
-            for (int i = 0; i < len; i++) {
-                fOut.print(' ');
-                fOut.print(attrs.getQName(i));
-                fOut.print("=\"");
-                normalizeAndPrint(attrs.getValue(i));
-                fOut.print('"');
-            }
-        }
-        fOut.print("/>");
-        fOut.flush();
-
-    } // emptyElement(QName,XMLAttributes,Augmentations)
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException {
-
-        if (fSeenRootElement) {
-            fOut.print('\n');
-        }
-        fOut.print("<?");
-        fOut.print(target);
-        if (data != null && data.length > 0) {
-            fOut.print(' ');
-            fOut.print(data.toString());
-        }
-        fOut.print("?>");
-        if (!fSeenRootElement) {
-            fOut.print('\n');
-        }
-        fOut.flush();
-
-    } // processingInstruction(String,XMLString,Augmentations)
-
-    /** Comment. */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-        if (!fCanonical) {
-            if (fSeenRootElement && fElementDepth == 0) {
-                fOut.print('\n');
-            }
-            fOut.print("<!--");
-            normalizeAndPrint(text);
-            fOut.print("-->");
-            if (!fSeenRootElement) {
-                fOut.print('\n');
-            }
-            fOut.flush();
-        }
-    } // comment(XMLString,Augmentations)
-
-    /** Characters. */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-
-        normalizeAndPrint(text);
-        fOut.flush();
-
-    } // characters(XMLString,Augmentations)
-
-    /** Ignorable whitespace. */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-
-        characters(text, augs);
-        fOut.flush();
-
-    } // ignorableWhitespace(XMLString,Augmentations)
-
-    /** End element. */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-
-        fElementDepth--;
-        fOut.print("</");
-        fOut.print(element.rawname);
-        fOut.print('>');
-        fOut.flush();
-
-    } // endElement(QName,Augmentations)
-
-    /** Start CDATA section. */
-    public void startCDATA(Augmentations augs) throws XNIException {
-    } // startCDATA(Augmentations)
-
-    /** End CDATA section. */
-    public void endCDATA(Augmentations augs) throws XNIException {
-    } // endCDATA(Augmentations)
-
-    //
-    // XMLDTDHandler methods
-    //
-
-    /** Processing instruction. */
-    public void processingInstruction(String target, XMLString data)
-        throws XNIException {
-
-        if (fSeenRootElement) {
-            fOut.print('\n');
-        }
-        fOut.print("<?");
-        fOut.print(target);
-        if (data != null && data.length > 0) {
-            fOut.print(' ');
-            fOut.print(data.toString());
-        }
-        fOut.print("?>");
-        if (!fSeenRootElement) {
-            fOut.print('\n');
-        }
-        fOut.flush();
-
-    } // processingInstruction(String,XMLString)
-
-    /** Comment. */
-    public void comment(XMLString text) throws XNIException {
-        if (!fCanonical) {
-            if (fSeenRootElement) {
-                fOut.print('\n');
-            }
-            fOut.print("<!--");
-            normalizeAndPrint(text);
-            fOut.print("-->");
-            if (!fSeenRootElement) {
-                fOut.print('\n');
-            }
-            fOut.flush();
-        }
-    } // comment(XMLString)
-
-    //
-    // XMLErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Warning", ex);
-    } // warning(String,String,XMLParseException)
-
-    /** Error. */
-    public void error(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Error", ex);
-    } // error(String,String,XMLParseException)
-
-    /** Fatal error. */
-    public void fatalError(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(String,String,XMLParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Returns a sorted list of attributes. */
-    /***
-    protected XMLAttributes sortAttributes(XMLAttributes attrs) {
-
-        XMLAttributesImpl attributes = new XMLAttributesImpl();
-
-        int len = (attrs != null) ? attrs.getLength() : 0;
-        for (int i = 0; i < len; i++) {
-            String name = attrs.getQName(i);
-            int count = attributes.getLength();
-            int j = 0;
-            while (j < count) {
-                if (name.compareTo(attributes.getQName(j)) < 0) {
-                    break;
-                }
-                j++;
-            }
-            attributes.insertAttributeAt(j, name, attrs.getType(i),
-                                         attrs.getValue(i));
-        }
-
-        return attributes;
-
-    } // sortAttributes(XMLAttributeList):XMLAttributeList
-    /***/
-
-    /** Normalizes and prints the given string. */
-    protected void normalizeAndPrint(String s) {
-
-        int len = (s != null) ? s.length() : 0;
-        for (int i = 0; i < len; i++) {
-            char c = s.charAt(i);
-            normalizeAndPrint(c);
-        }
-
-    } // normalizeAndPrint(String)
-
-    /** Normalizes and prints the given array of characters. */
-    protected void normalizeAndPrint(XMLString text) {
-        for (int i = 0; i < text.length; i++) {
-            normalizeAndPrint(text.ch[text.offset + i]);
-        }
-    } // normalizeAndPrint(XMLString)
-
-    /** Normalizes and print the given character. */
-    protected void normalizeAndPrint(char c) {
-
-        switch (c) {
-            case '<': {
-                fOut.print("&lt;");
-                break;
-            }
-            case '>': {
-                fOut.print("&gt;");
-                break;
-            }
-            case '&': {
-                fOut.print("&amp;");
-                break;
-            }
-            case '"': {
-                fOut.print("&quot;");
-                break;
-            }
-            case '\r':
-            case '\n': {
-                if (fCanonical) {
-                    fOut.print("&#");
-                    fOut.print(Integer.toString(c));
-                    fOut.print(';');
-                    break;
-                }
-                // else, default print char
-            }
-            default: {
-                fOut.print(c);
-            }
-        }
-
-    } // normalizeAndPrint(char)
-
-    /** Prints the error message. */
-    protected void printError(String type, XMLParseException ex) {
-
-        System.err.print("[");
-        System.err.print(type);
-        System.err.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            System.err.print(systemId);
-        }
-        System.err.print(':');
-        System.err.print(ex.getLineNumber());
-        System.err.print(':');
-        System.err.print(ex.getColumnNumber());
-        System.err.print(": ");
-        System.err.print(ex.getMessage());
-        System.err.println();
-        System.err.flush();
-
-    } // printError(String,XMLParseException)
-
-    //
-    // Main
-    //
-
-    /** Main program entry point. */
-    public static void main(String argv[]) {
-
-        // is there anything to do?
-        if (argv.length == 0) {
-            printUsage();
-            System.exit(1);
-        }
-
-        // variables
-        Writer writer = null;
-        XMLParserConfiguration parserConfig = null;
-        boolean namespaces = DEFAULT_NAMESPACES;
-        boolean validation = DEFAULT_VALIDATION;
-        boolean schemaValidation = DEFAULT_SCHEMA_VALIDATION;
-        boolean schemaFullChecking = DEFAULT_SCHEMA_FULL_CHECKING;
-        boolean canonical = DEFAULT_CANONICAL;
-        boolean incremental = DEFAULT_INCREMENTAL;
-
-        // process arguments
-        for (int i = 0; i < argv.length; i++) {
-            String arg = argv[i];
-            if (arg.startsWith("-")) {
-                String option = arg.substring(1);
-                if (option.equals("p")) {
-                    // get parser name
-                    if (++i == argv.length) {
-                        System.err.println("error: Missing argument to -p option.");
-                    }
-                    String parserName = argv[i];
-
-                    // create parser
-                    try {
-                        parserConfig = (XMLParserConfiguration)Class.forName(parserName).newInstance();
-                        /***
-                        parserConfig.addRecognizedFeatures(new String[] {
-                            NAMESPACE_PREFIXES_FEATURE_ID,
-                        });
-                        /***/
-                        writer = null;
-                    }
-                    catch (Exception e) {
-                        parserConfig = null;
-                        System.err.println("error: Unable to instantiate parser configuration ("+parserName+")");
-                    }
-                    continue;
-                }
-                if (option.equalsIgnoreCase("n")) {
-                    namespaces = option.equals("n");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("v")) {
-                    validation = option.equals("v");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("s")) {
-                    schemaValidation = option.equals("s");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("f")) {
-                    schemaFullChecking = option.equals("f");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("c")) {
-                    canonical = option.equals("c");
-                    continue;
-                }
-                if (option.equalsIgnoreCase("i")) {
-                    incremental = option.equals("i");
-                    continue;
-                }
-                if (option.equals("h")) {
-                    printUsage();
-                    continue;
-                }
-            }
-
-            // use default parser?
-            if (parserConfig == null) {
-
-                // create parser
-                try {
-                    parserConfig = (XMLParserConfiguration)Class.forName(DEFAULT_PARSER_CONFIG).newInstance();
-                    /***
-                    parserConfig.addRecognizedFeatures(new String[] {
-                        NAMESPACE_PREFIXES_FEATURE_ID,
-                    });
-                    /***/
-                }
-                catch (Exception e) {
-                    System.err.println("error: Unable to instantiate parser configuration ("+DEFAULT_PARSER_CONFIG+")");
-                    continue;
-                }
-            }
-
-            // set parser features
-            if (writer == null) {
-                writer = new Writer(parserConfig);
-            }
-            try {
-                parserConfig.setFeature(NAMESPACES_FEATURE_ID, namespaces);
-            }
-            catch (XMLConfigurationException e) {
-                System.err.println("warning: Parser does not support feature ("+NAMESPACES_FEATURE_ID+")");
-            }
-            try {
-                parserConfig.setFeature(VALIDATION_FEATURE_ID, validation);
-            }
-            catch (XMLConfigurationException e) {
-                System.err.println("warning: Parser does not support feature ("+VALIDATION_FEATURE_ID+")");
-            }
-            try {
-                parserConfig.setFeature(SCHEMA_VALIDATION_FEATURE_ID, schemaValidation);
-            }
-            catch (XMLConfigurationException e) {
-                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
-                    System.err.println("warning: Parser does not support feature ("+SCHEMA_VALIDATION_FEATURE_ID+")");
-                }
-            }
-            try {
-                parserConfig.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
-            }
-            catch (XMLConfigurationException e) {
-                if (e.getType() == XMLConfigurationException.NOT_SUPPORTED) {
-                    System.err.println("warning: Parser does not support feature ("+SCHEMA_FULL_CHECKING_FEATURE_ID+")");
-                }
-            }
-
-            // parse file
-            try {
-                writer.setOutput(System.out, "UTF8");
-            }
-            catch (UnsupportedEncodingException e) {
-                System.err.println("error: Unable to set output. Exiting.");
-                System.exit(1);
-            }
-            writer.setCanonical(canonical);
-            try {
-                if (incremental && parserConfig instanceof XMLPullParserConfiguration) {
-                    XMLPullParserConfiguration pullParserConfig = (XMLPullParserConfiguration)parserConfig;
-                    pullParserConfig.setInputSource(new XMLInputSource(null, arg, null));
-                    int step = 1;
-                    do {
-                        //System.err.println("# step "+step++);
-                    } while (pullParserConfig.parse(false));
-                }
-                else {
-                    writer.parse(new XMLInputSource(null, arg, null));
-                }
-            }
-            catch (XMLParseException e) {
-                // ignore
-            }
-            catch (Exception e) {
-                System.err.println("error: Parse error occurred - "+e.getMessage());
-                if (e instanceof XNIException) {
-                    e = ((XNIException)e).getException();
-                }
-                e.printStackTrace(System.err);
-            }
-        }
-
-    } // main(String[])
-
-    //
-    // Private static methods
-    //
-
-    /** Prints the usage. */
-    private static void printUsage() {
-
-        System.err.println("usage: java sax.Writer (options) uri ...");
-        System.err.println();
-
-        System.err.println("options:");
-        System.err.println("  -p name  Select parser configuration by name.");
-        System.err.println("  -n | -N  Turn on/off namespace processing.");
-        System.err.println("  -v | -V  Turn on/off validation.");
-        System.err.println("  -s | -S  Turn on/off Schema validation support.");
-        System.err.println("           NOTE: Not supported by all parsers.");
-        System.err.println("  -f  | -F Turn on/off Schema full checking.");
-        System.err.println("           NOTE: Requires use of -s and not supported by all parsers.");
-        /***
-        System.err.println("  -c | -C  Turn on/off Canonical XML output.");
-        System.err.println("           NOTE: This is not W3C canonical output.");
-        /***/
-        System.err.println("  -i | -I  Incremental mode.");
-        System.err.println("           NOTE: This feature only works if the configuration used");
-        System.err.println("                 implements XMLPullParserConfiguration.");
-        System.err.println("  -h       This help screen.");
-        System.err.println();
-
-        System.err.println("defaults:");
-        System.err.println("  Config:     "+DEFAULT_PARSER_CONFIG);
-        System.err.print("  Namespaces: ");
-        System.err.println(DEFAULT_NAMESPACES ? "on" : "off");
-        System.err.print("  Validation: ");
-        System.err.println(DEFAULT_VALIDATION ? "on" : "off");
-        System.err.print("  Schema:     ");
-        System.err.println(DEFAULT_SCHEMA_VALIDATION ? "on" : "off");
-        System.err.print("  Schema full checking:     ");
-        System.err.println(DEFAULT_SCHEMA_FULL_CHECKING ? "on" : "off");
-        /***
-        System.err.print("  Canonical:  ");
-        System.err.println(DEFAULT_CANONICAL ? "on" : "off");
-        /***/
-        System.err.print("  Incremental:  ");
-        System.err.println(DEFAULT_INCREMENTAL ? "on" : "off");
-
-    } // printUsage()
-
-} // class Writer
diff --git a/samples/xni/parser/AbstractConfiguration.java b/samples/xni/parser/AbstractConfiguration.java
deleted file mode 100644
index 3770cf6..0000000
--- a/samples/xni/parser/AbstractConfiguration.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni.parser;
-
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.Vector;
-
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XNIException;
-
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-/**
- * This abstract parser configuration simply helps manage components, 
- * features and properties, and other tasks common to all parser
- * configurations. In order to subclass this configuration and use
- * it effectively, the subclass is required to do the following:
- * <ul>
- * <li>
- *  Add all configurable components using the <code>addComponent</code>
- *  method,</li>
- * <li>Implement the <code>parse</code> method, and</li>
- * <li>Call the <code>resetComponents</code> before parsing.</li>
- * </ul>
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public abstract class AbstractConfiguration 
-    implements XMLParserConfiguration {
-
-    //
-    // Data
-    //
-
-    // features and properties
-
-    /** Recognized features. */
-    protected final Vector fRecognizedFeatures = new Vector();
-
-    /** Recognized properties. */
-    protected final Vector fRecognizedProperties = new Vector();
-
-    /** Features. */
-    protected final Hashtable fFeatures = new Hashtable();
-
-    /** Properties. */
-    protected final Hashtable fProperties = new Hashtable();
-
-    // other parser configuration fields
-
-    /** The registered entity resolver. */
-    protected XMLEntityResolver fEntityResolver;
-
-    /** The registered error handler. */
-    protected XMLErrorHandler fErrorHandler;
-
-    /** The registered document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-
-    /** The registered DTD handler. */
-    protected XMLDTDHandler fDTDHandler;
-
-    /** The registered DTD content model handler. */
-    protected XMLDTDContentModelHandler fDTDContentModelHandler;
-    
-    /** Locale for error messages. */
-    protected Locale fLocale;
-
-    // components
-
-    /** List of configurable components. */
-    protected final Vector fComponents = new Vector();
-
-    //
-    // XMLParserConfiguration methods
-    //
-
-    /**
-     * Allows a parser to add parser specific features to be recognized
-     * and managed by the parser configuration.
-     *
-     * @param featureIds An array of the additional feature identifiers 
-     *                   to be recognized.
-     */
-    public void addRecognizedFeatures(String[] featureIds) {
-        int length = featureIds != null ? featureIds.length : 0;
-        for (int i = 0; i < length; i++) {
-            String featureId = featureIds[i];
-            if (!fRecognizedFeatures.contains(featureId)) {
-                fRecognizedFeatures.addElement(featureId);
-            }
-        }
-    } // addRecognizedFeatures(String[])
-    
-    /**
-     * Sets the state of a feature. This method is called by the parser
-     * and gets propagated to components in this parser configuration.
-     * 
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-        if (!fRecognizedFeatures.contains(featureId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, featureId);
-        }
-        fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE);
-        int length = fComponents.size();
-        for (int i = 0; i < length; i++) {
-            XMLComponent component = (XMLComponent)fComponents.elementAt(i);
-            component.setFeature(featureId, state);
-        }
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns the state of a feature.
-     * 
-     * @param featureId The feature identifier.
-     * 
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public boolean getFeature(String featureId) 
-        throws XMLConfigurationException {
-        if (!fRecognizedFeatures.contains(featureId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, featureId);
-        }
-        Boolean state = (Boolean)fFeatures.get(featureId);
-        return state != null ? state.booleanValue() : false;
-    } // getFeature(String):boolean
-    
-    /**
-     * Allows a parser to add parser specific properties to be recognized
-     * and managed by the parser configuration.
-     *
-     * @param propertyIds An array of the additional property identifiers 
-     *                    to be recognized.
-     */
-    public void addRecognizedProperties(String[] propertyIds) {
-        int length = propertyIds != null ? propertyIds.length : 0;
-        for (int i = 0; i < length; i++) {
-            String propertyId = propertyIds[i];
-            if (!fRecognizedProperties.contains(propertyId)) {
-                fRecognizedProperties.addElement(propertyId);
-            }
-        }
-    } // addRecognizedProperties(String[])
-
-    /**
-     * Sets the value of a property. This method is called by the parser
-     * and gets propagated to components in this parser configuration.
-     * 
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public void setProperty(String propertyId, Object value) 
-        throws XMLConfigurationException {
-        if (!fRecognizedProperties.contains(propertyId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, propertyId);
-        }
-        if (value != null) {
-            fProperties.put(propertyId, value);
-        }
-        else {
-            fProperties.remove(propertyId);
-        }
-        int length = fComponents.size();
-        for (int i = 0; i < length; i++) {
-            XMLComponent component = (XMLComponent)fComponents.elementAt(i);
-            component.setProperty(propertyId, value);
-        }
-    } // setProperty(String,Object)
-
-    /**
-     * Returns the value of a property.
-     * 
-     * @param propertyId The property identifier.
-     * 
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public Object getProperty(String propertyId) 
-        throws XMLConfigurationException {
-        if (!fRecognizedProperties.contains(propertyId)) {
-            short type = XMLConfigurationException.NOT_RECOGNIZED;
-            throw new XMLConfigurationException(type, propertyId);
-        }
-        Object value = fProperties.get(propertyId);
-        return value;
-    } // getProperty(String):Object
-
-    /**
-     * Sets the entity resolver.
-     *
-     * @param resolver The new entity resolver.
-     */
-    public void setEntityResolver(XMLEntityResolver resolver) {
-        fEntityResolver = resolver;
-    } // setEntityResolver(XMLEntityResolver)
-
-    /** Returns the registered entity resolver. */
-    public XMLEntityResolver getEntityResolver() {
-        return fEntityResolver;
-    } // getEntityResolver():XMLEntityResolver
-
-    /**
-     * Sets the error handler.
-     *
-     * @param handler The error resolver.
-     */
-    public void setErrorHandler(XMLErrorHandler handler) {
-        fErrorHandler = handler;
-    } // setErrorHandler(XMLErrorHandler)
-
-    /** Returns the registered error handler. */
-    public XMLErrorHandler getErrorHandler() {
-        return fErrorHandler;
-    } // getErrorHandler():XMLErrorHandler
-
-    /**
-     * Sets the document handler to receive information about the document.
-     * 
-     * @param handler The document handler.
-     */
-    public void setDocumentHandler(XMLDocumentHandler handler) {
-        fDocumentHandler = handler;
-    } // setDocumentHandler(XMLDocumentHandler)
-
-    /** Returns the registered document handler. */
-    public XMLDocumentHandler getDocumentHandler() {
-        return fDocumentHandler;
-    } // getDocumentHandler():XMLDocumentHandler
-
-    /**
-     * Sets the DTD handler.
-     * 
-     * @param handler The DTD handler.
-     */
-    public void setDTDHandler(XMLDTDHandler handler) {
-        fDTDHandler = handler;
-    } // setDTDHandler(XMLDTDHandler)
-
-    /** Returns the registered DTD handler. */
-    public XMLDTDHandler getDTDHandler() {
-        return fDTDHandler;
-    } // getDTDHandler():XMLDTDHandler
-
-    /**
-     * Sets the DTD content model handler.
-     * 
-     * @param handler The DTD content model handler.
-     */
-    public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
-        fDTDContentModelHandler = handler;
-    } // setDTDContentModelHandler(XMLDTDContentModelHandler)
-
-    /** Returns the registered DTD content model handler. */
-    public XMLDTDContentModelHandler getDTDContentModelHandler() {
-        return fDTDContentModelHandler;
-    } // getDTDContentModelHandler():XMLDTDContentModelHandler 
-
-    /**
-     * Parse an XML document.
-     * <p>
-     * The parser can use this method to instruct this configuration
-     * to begin parsing an XML document from any valid input source
-     * (a character stream, a byte stream, or a URI).
-     * <p>
-     * Parsers may not invoke this method while a parse is in progress.
-     * Once a parse is complete, the parser may then parse another XML
-     * document.
-     * <p>
-     * This method is synchronous: it will not return until parsing
-     * has ended.  If a client application wants to terminate 
-     * parsing early, it should throw an exception.
-     * <p>
-     * <strong>Note:</strong> This method needs to be implemented
-     * by the subclass.
-     *
-     * @param source The input source for the top-level of the
-     *               XML document.
-     *
-     * @exception XNIException Any XNI exception, possibly wrapping 
-     *                         another exception.
-     * @exception IOException  An IO exception from the parser, possibly
-     *                         from a byte stream or character stream
-     *                         supplied by the parser.
-     */
-    public abstract void parse(XMLInputSource inputSource) 
-        throws IOException, XNIException;
-    
-    /**
-     * Set the locale to use for messages.
-     *
-     * @param locale The locale object to use for localization of messages.
-     *
-     * @exception XNIException Thrown if the parser does not support the
-     *                         specified locale.
-     */
-    public void setLocale(Locale locale) {
-        fLocale = locale;
-    } // setLocale(Locale)
-
-
-    /** Returns the locale. */
-    public Locale getLocale() {
-        return fLocale;
-    } // getLocale():Locale
-
-    //
-    // Protected methods
-    //
-
-    /** 
-     * Adds a component to list of configurable components. If the
-     * same component is added multiple times, the component is
-     * added only the first time. 
-     * <p>
-     * This method helps manage the components in the configuration.
-     * Therefore, all subclasses should call this method to add the
-     * components specific to the configuration.
-     *
-     * @param component The component to add.
-     *
-     * @see #resetComponents
-     */
-    protected void addComponent(XMLComponent component) {
-        if (!fComponents.contains(component)) {
-            fComponents.addElement(component);
-            addRecognizedFeatures(component.getRecognizedFeatures());
-            addRecognizedProperties(component.getRecognizedProperties());
-        }
-    } // addComponent(XMLComponent)
-
-    /**
-     * Resets all of the registered components. Before the subclassed
-     * configuration begins parsing, it should call this method to
-     * reset the components.
-     *
-     * @see #addComponent
-     */
-    protected void resetComponents() 
-        throws XMLConfigurationException {
-        int length = fComponents.size();
-        for (int i = 0; i < length; i++) {
-            XMLComponent component = (XMLComponent)fComponents.elementAt(i);
-            component.reset(this);
-        }
-    } // resetComponents()
-
-    /**
-     * This method tries to open the necessary stream for the given
-     * XMLInputSource. If the input source already has a character
-     * stream (java.io.Reader) or a byte stream (java.io.InputStream)
-     * set, this method returns immediately. However, if no character
-     * or byte stream is already open, this method attempts to open
-     * an input stream using the source's system identifier.
-     *
-     * @param source The input source to open.
-     */
-    protected void openInputSourceStream(XMLInputSource source)
-        throws IOException {
-        if (source.getCharacterStream() != null) {
-            return;
-        }
-        InputStream stream = source.getByteStream();
-        if (stream == null) {
-            String systemId = source.getSystemId();
-            try {
-                URL url = new URL(systemId);
-                stream = url.openStream();
-            }
-            catch (MalformedURLException e) {
-                stream = new FileInputStream(systemId);
-            }
-            source.setByteStream(stream);
-        }
-    } // openInputSourceStream(XMLInputSource)
-
-} // class AbstractConfiguration
diff --git a/samples/xni/parser/CSVConfiguration.java b/samples/xni/parser/CSVConfiguration.java
deleted file mode 100644
index 560f410..0000000
--- a/samples/xni/parser/CSVConfiguration.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni.parser;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.StringTokenizer;
-
-import org.apache.xerces.util.AugmentationsImpl;
-import org.apache.xerces.util.XMLAttributesImpl;
-import org.apache.xerces.util.XMLStringBuffer;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-/**
- * This example is a very simple parser configuration that can 
- * parse files with comma-separated values (CSV) to generate XML
- * events. For example, the following CSV document:
- * <pre>
- * Andy Clark,16 Jan 1973,Cincinnati
- * </pre>
- * produces the following XML "document" as represented by the 
- * XNI streaming document information: 
- * <pre>
- * &lt;?xml version='1.0' encoding='UTF-8' standalone='true'?&gt;
- * &lt;!DOCTYPE csv [
- * &lt;!ELEMENT csv (row)*&gt;
- * &lt;!ELEMENT row (col)*&gt;
- * &lt;!ELEMENT col (#PCDATA)&gt;
- * ]&gt;
- * &lt;csv&gt;
- *  &lt;row&gt;
- *   &lt;col&gt;Andy Clark&lt;/col&gt;
- *   &lt;col&gt;16 Jan 1973&lt;/col&gt;
- *   &lt;col&gt;Cincinnati&lt;/col&gt;
- *  &lt;/row&gt;
- * &lt;/csv&gt;
- * </pre>
- * 
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class CSVConfiguration
-    extends AbstractConfiguration {
-
-    //
-    // Constants
-    //
-
-    /** A QName for the &lt;csv&gt; element name. */
-    protected static final QName CSV = new QName(null, null, "csv", null);
-
-    /** A QName for the &lt;row&gt; element name. */
-    protected static final QName ROW = new QName(null, null, "row", null);
-
-    /** A QName for the &lt;col&gt; element name. */
-    protected static final QName COL = new QName(null, null, "col", null);
-    
-    /** An empty list of attributes. */
-    protected static final XMLAttributes EMPTY_ATTRS = new XMLAttributesImpl();
-
-    /** An empty list of augmentations. */
-    protected final Augmentations fAugmentations = new AugmentationsImpl();
-
-    /** A newline XMLString. */
-    private final XMLString NEWLINE = new XMLStringBuffer("\n");
-
-    /** A newline + one space XMLString. */
-    private final XMLString NEWLINE_ONE_SPACE = new XMLStringBuffer("\n ");
-
-    /** A newline + two spaces XMLString. */
-    private final XMLString NEWLINE_TWO_SPACES = new XMLStringBuffer("\n  ");
-
-    //
-    // Data
-    //
-
-    /** 
-     * A string buffer for use in copying string into an XMLString
-     * object for passing to the characters method.
-     */
-    private final XMLStringBuffer fStringBuffer = new XMLStringBuffer();
-
-    //
-    // XMLParserConfiguration methods
-    //
-
-    /**
-     * Parse an XML document.
-     * <p>
-     * The parser can use this method to instruct this configuration
-     * to begin parsing an XML document from any valid input source
-     * (a character stream, a byte stream, or a URI).
-     * <p>
-     * Parsers may not invoke this method while a parse is in progress.
-     * Once a parse is complete, the parser may then parse another XML
-     * document.
-     * <p>
-     * This method is synchronous: it will not return until parsing
-     * has ended.  If a client application wants to terminate 
-     * parsing early, it should throw an exception.
-     *
-     * @param source The input source for the top-level of the
-     *               XML document.
-     *
-     * @exception XNIException Any XNI exception, possibly wrapping 
-     *                         another exception.
-     * @exception IOException  An IO exception from the parser, possibly
-     *                         from a byte stream or character stream
-     *                         supplied by the parser.
-     */
-    public void parse(XMLInputSource source) 
-        throws IOException, XNIException {
-
-        // get reader
-        openInputSourceStream(source);
-        Reader reader = source.getCharacterStream();
-        if (reader == null) {
-            InputStream stream = source.getByteStream();
-            reader = new InputStreamReader(stream);
-        }
-        BufferedReader bufferedReader = new BufferedReader(reader);
-
-        // start document
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startDocument(null, "UTF-8", fAugmentations);
-            fDocumentHandler.xmlDecl("1.0", "UTF-8", "true", fAugmentations);
-            fDocumentHandler.doctypeDecl("csv", null, null, fAugmentations);
-        }
-        if (fDTDHandler != null) {
-            fDTDHandler.startDTD(null);
-            fDTDHandler.elementDecl("csv", "(row)*");
-            fDTDHandler.elementDecl("row", "(col)*");
-            fDTDHandler.elementDecl("col", "(#PCDATA)");
-        }
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.startContentModel("csv");
-            fDTDContentModelHandler.startGroup();
-            fDTDContentModelHandler.element("row");
-            fDTDContentModelHandler.endGroup();
-            short csvOccurs = XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE;
-            fDTDContentModelHandler.occurrence(csvOccurs);
-            fDTDContentModelHandler.endContentModel();
-            
-            fDTDContentModelHandler.startContentModel("row");
-            fDTDContentModelHandler.startGroup();
-            fDTDContentModelHandler.element("col");
-            fDTDContentModelHandler.endGroup();
-            short rowOccurs = XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE;
-            fDTDContentModelHandler.occurrence(rowOccurs);
-            fDTDContentModelHandler.endContentModel();
-        
-            fDTDContentModelHandler.startContentModel("col");
-            fDTDContentModelHandler.startGroup();
-            fDTDContentModelHandler.pcdata();
-            fDTDContentModelHandler.endGroup();
-            fDTDContentModelHandler.endContentModel();
-        }
-        if (fDTDHandler != null) {
-            fDTDHandler.endDTD();
-        }
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(CSV, EMPTY_ATTRS, fAugmentations);
-        }
-
-        // read lines
-        String line;
-        while ((line = bufferedReader.readLine()) != null) {
-            if (fDocumentHandler != null) {
-                fDocumentHandler.ignorableWhitespace(NEWLINE_ONE_SPACE, fAugmentations);
-                fDocumentHandler.startElement(ROW, EMPTY_ATTRS, fAugmentations);
-                StringTokenizer tokenizer = new StringTokenizer(line, ",");
-                while (tokenizer.hasMoreTokens()) {
-                    fDocumentHandler.ignorableWhitespace(NEWLINE_TWO_SPACES, fAugmentations);
-                    fDocumentHandler.startElement(COL, EMPTY_ATTRS, fAugmentations);
-                    String token = tokenizer.nextToken();
-                    fStringBuffer.clear();
-                    fStringBuffer.append(token);
-                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
-                    fDocumentHandler.endElement(COL, fAugmentations);
-                }
-                fDocumentHandler.ignorableWhitespace(NEWLINE_ONE_SPACE, fAugmentations);
-                fDocumentHandler.endElement(ROW, fAugmentations);
-            }
-        }
-        bufferedReader.close();
-
-        // end document
-        if (fDocumentHandler != null) {
-            fDocumentHandler.ignorableWhitespace(NEWLINE, fAugmentations);
-            fDocumentHandler.endElement(CSV, fAugmentations);
-            fDocumentHandler.endDocument(fAugmentations);
-        }
-
-    } // parse(XMLInputSource)
-    
-    // NOTE: The following methods are overloaded to ignore setting
-    //       of parser state so that this configuration does not
-    //       throw configuration exceptions for features and properties
-    //       that it doesn't care about.
-
-    public void setFeature(String featureId, boolean state) {}
-    public boolean getFeature(String featureId) { return false; }
-    public void setProperty(String propertyId, Object value) {}
-    public Object getProperty(String propertyId) { return null; }
-
-} // class CSVConfiguration
diff --git a/samples/xni/parser/CSVParser.java b/samples/xni/parser/CSVParser.java
deleted file mode 100644
index 459922e..0000000
--- a/samples/xni/parser/CSVParser.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni.parser;
-
-import org.apache.xerces.parsers.AbstractSAXParser;
-
-/**
- * This parser class implements a SAX parser that can parse simple
- * comma-separated value (CSV) files.
- * 
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class CSVParser
-    extends AbstractSAXParser {
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a SAX like parser using the CSV configuration. */
-    public CSVParser() {
-        super(new CSVConfiguration());
-    } // <init>()
-
-} // class CSVParser
diff --git a/samples/xni/parser/NonValidatingParserConfiguration.java b/samples/xni/parser/NonValidatingParserConfiguration.java
deleted file mode 100644
index 0e1a5d7..0000000
--- a/samples/xni/parser/NonValidatingParserConfiguration.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni.parser;
-
-import org.apache.xerces.impl.dtd.XMLDTDValidator;
-import org.apache.xerces.impl.XMLNamespaceBinder;
-import org.apache.xerces.parsers.StandardParserConfiguration;
-import org.apache.xerces.util.SymbolTable;
-
-/**
- * Non-validating parser configuration.
- *
- * @see XMLComponent
- * @see XMLParserConfiguration
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class NonValidatingParserConfiguration 
-    extends StandardParserConfiguration {
-
-    //
-    // Data
-    //
-
-    // components (configurable)
-
-    /** Namespace binder. */
-    protected XMLNamespaceBinder fNamespaceBinder;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a document parser using the default symbol table and grammar
-     * pool or the ones specified by the application (through the properties).
-     */
-    public NonValidatingParserConfiguration() {
-
-        // create and register missing components
-        fNamespaceBinder = new XMLNamespaceBinder();
-        addComponent(fNamespaceBinder);
-
-    } // <init>()
-
-    //
-    // Protected methods
-    //
-    
-    /** Configures the pipeline. */
-    protected void configurePipeline() {
-
-        // REVISIT: This should be better designed. In other words, we
-        //          need to figure out what is the best way for people to
-        //          re-use *most* of the standard configuration but do 
-        //          common things such as remove a component (e.g.the
-        //          validator), insert a new component (e.g. XInclude), 
-        //          etc... -Ac
-
-        // setup document pipeline
-        fScanner.setDocumentHandler(fNamespaceBinder);
-        fNamespaceBinder.setDocumentHandler(fDocumentHandler);
-
-    } // configurePipeline()
-
-    // factory methods
-
-    /** Create a null validator. */
-    protected XMLDTDValidator createDTDValidator() {
-        return null;
-    } // createDTDValidator():XMLDTDValidator
-
-} // class NonValidatingParserConfiguration
diff --git a/samples/xni/parser/PSVIConfiguration.java b/samples/xni/parser/PSVIConfiguration.java
deleted file mode 100644
index 7059e22..0000000
--- a/samples/xni/parser/PSVIConfiguration.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni.parser;
-
-
-import xni.PSVIWriter;
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.parsers.DTDXSParserConfiguration;
-import org.apache.xerces.util.SymbolTable;
-
-import org.apache.xerces.xni.parser.XMLComponentManager;
-
-/**
- * This is the DTD/ XML Schema parser configuration that includes PSVIWriter component.
- * The document will be fully assessed and will produce PSVI as required by XML Schema specification
- * configuration including XML Schema Validator in the pipeline.
- * 
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public class PSVIConfiguration extends DTDXSParserConfiguration {
-
-
-     /** PSVI Writer */
-    protected PSVIWriter fPSVIWriter;
-    
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a document parser using the default symbol table and grammar
-     * pool or the ones specified by the application (through the properties).
-     */
-    public PSVIConfiguration() {
-        this(null, null);
-    } // <init>()
-
-    /**
-     * Constructs a document parser using the specified symbol table.
-     *
-     * @param symbolTable    The symbol table to use.
-     */
-    public PSVIConfiguration(SymbolTable symbolTable) {
-        this(symbolTable, null);
-    } // <init>(SymbolTable)
-
-    /**
-     * Constructs a document parser using the specified symbol table and
-     * grammar pool.
-     * <p>
-     * <strong>REVISIT:</strong>
-     * Grammar pool will be updated when the new validation engine is
-     * implemented.
-     *
-     * @param symbolTable    The symbol table to use.
-     * @param grammarPool    The grammar pool to use.
-     */
-    public PSVIConfiguration(SymbolTable symbolTable,
-                                     GrammarPool grammarPool) {
-        this(symbolTable, grammarPool, null);
-    } // <init>(SymbolTable,GrammarPool)
-
-    /**
-     * Constructs a parser configuration using the specified symbol table,
-     * grammar pool, and parent settings.
-     * <p>
-     * <strong>REVISIT:</strong>
-     * Grammar pool will be updated when the new validation engine is
-     * implemented.
-     *
-     * @param symbolTable    The symbol table to use.
-     * @param grammarPool    The grammar pool to use.
-     * @param parentSettings The parent settings.
-     */
-    public PSVIConfiguration(SymbolTable symbolTable,
-                                    GrammarPool grammarPool,
-                                    XMLComponentManager parentSettings) {
-        super(symbolTable, grammarPool, parentSettings);
-
-        fPSVIWriter = createPSVIWriter();
-        if (fPSVIWriter != null) {
-            addComponent(fPSVIWriter);
-        }
-
-    } // <init>(SymbolTable,GrammarPool)
-
-
-    /** Configures the pipeline. */
-    protected void configurePipeline() {
-
-        super.configurePipeline();
-        if (fSchemaValidator != null) {
-            fSchemaValidator.setDocumentHandler(fPSVIWriter);
-            fPSVIWriter.setDocumentHandler(fDocumentHandler);
-        }
-
-    } // configurePipeline()
-
-
-    /** Create a PSVIWriter */
-    protected PSVIWriter createPSVIWriter(){
-        return new PSVIWriter();
-    }
-
-} // class StandardParserConfiguration
diff --git a/samples/xni/parser/PSVIParser.java b/samples/xni/parser/PSVIParser.java
deleted file mode 100644
index 82eba25..0000000
--- a/samples/xni/parser/PSVIParser.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package xni.parser;
-
-import org.apache.xerces.parsers.AbstractSAXParser;
-
-/**
- * This parser class implements a SAX parser that includes DTDValidator, NamespaceBinder
- * XMLSchemaValidator and PSVI writer in the pipeline. The parser generates output in
- * psvi_output.xml file.
- * <strong>Note:</strong> PSVI follow as a consequence of validation and/or assessment, thus 
- * the following features must be turned on:
- * <ul>
- * <li>http://xml.org/sax/features/namespaces</li>
- * <li>http://xml.org/sax/features/validation</li>
- * <li>http://apache.org/xml/features/validation/schema</li>
- * </ul>
- *
- * @author Elena Litani,IBM 
- * @version $Id$
- */
-public class PSVIParser
-    extends AbstractSAXParser {
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a SAX like parser using the PSVI configuration. */
-    public PSVIParser() {
-        super(new PSVIConfiguration());
-    } // <init>()
-
-} // class CSVParser
diff --git a/src/javax/xml/parsers/DocumentBuilder.java b/src/javax/xml/parsers/DocumentBuilder.java
deleted file mode 100644
index 5143053..0000000
--- a/src/javax/xml/parsers/DocumentBuilder.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "Apache Software Foundation" must not be used to endorse or
- *    promote products derived from this software without prior written
- *    permission. For written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, Sun Microsystems,
- * Inc., http://www.sun.com.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-package javax.xml.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.File;
-
-import org.xml.sax.Parser;
-import org.xml.sax.HandlerBase;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.DOMImplementation;
-
-/**
- * Defines the API to obtain DOM Document instances from an XML
- * document. Using this class, an application programmer can obtain a
- * {@link org.w3c.dom.Document} from XML.<p>
- *
- * An instance of this class can be obtained from the
- * {@link javax.xml.parsers.DocumentBuilderFactory#newDocumentBuilder()
- * DocumentBuilderFactory.newDocumentBuilder} method. Once
- * an instance of this class is obtained, XML can be parsed from a
- * variety of input sources. These input sources are InputStreams,
- * Files, URLs, and SAX InputSources.<p>
- *
- * Note that this class reuses several classes from the SAX API. This
- * does not require that the implementor of the underlying DOM
- * implementation use a SAX parser to parse XML document into a
- * <code>Document</code>. It merely requires that the implementation
- * communicate with the application using these existing APIs. <p>
- *
- * An implementation of <code>DocumentBuilder</code> is <em>NOT</em> 
- * guaranteed to behave as per the specification if it is used concurrently by 
- * two or more threads. It is recommended to have one instance of the
- * <code>DocumentBuilder</code> per thread or it is upto the application to 
- * make sure about the use of <code>DocumentBuilder</code> from more than one
- * thread.
- *
- * @since JAXP 1.0
- * @version 1.0
- */
-
-public abstract class DocumentBuilder {
-
-    protected DocumentBuilder () {
-    }
-
-    /**
-     * Parse the content of the given <code>InputStream</code> as an XML 
-     * document and return a new DOM {@link org.w3c.dom.Document} object.
-     *
-     * @param is InputStream containing the content to be parsed.
-     * @exception IOException If any IO errors occur.
-     * @exception SAXException If any parse errors occur.
-     * @exception IllegalArgumentException If the InputStream is null
-     * @see org.xml.sax.DocumentHandler
-     */
-    
-    public Document parse(InputStream is)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputStream cannot be null");
-        }
-        
-        InputSource in = new InputSource(is);
-        return parse(in);
-    }
-
-    /**
-     * Parse the content of the given <code>InputStream</code> as an XML 
-     * document and return a new DOM {@link org.w3c.dom.Document} object.
-     *
-     * @param is InputStream containing the content to be parsed.
-     * @param systemId Provide a base for resolving relative URIs.
-     * @exception IOException If any IO errors occur.
-     * @exception SAXException If any parse errors occur.
-     * @exception IllegalArgumentException If the InputStream is null.
-     * @see org.xml.sax.DocumentHandler
-     * @return A new DOM Document object.
-     */
-    
-    public Document parse(InputStream is, String systemId)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputStream cannot be null");
-        }
-        
-        InputSource in = new InputSource(is);
-    in.setSystemId(systemId);
-        return parse(in);
-    }
-
-    /**
-     * Parse the content of the given URI as an XML document
-     * and return a new DOM {@link org.w3c.dom.Document} object.
-     *
-     * @param uri The location of the content to be parsed.
-     * @exception IOException If any IO errors occur.
-     * @exception SAXException If any parse errors occur.
-     * @exception IllegalArgumentException If the URI is null.
-     * @see org.xml.sax.DocumentHandler
-     * @return A new DOM Document object.
-     */
-    
-    public Document parse(String uri)
-        throws SAXException, IOException
-    {
-        if (uri == null) {
-            throw new IllegalArgumentException("URI cannot be null");
-        }
-        
-        InputSource in = new InputSource(uri);
-        return parse(in);
-    }
-
-    /**
-     * Parse the content of the given file as an XML document
-     * and return a new DOM {@link org.w3c.dom.Document} object.
-     *
-     * @param f The file containing the XML to parse.
-     * @exception IOException If any IO errors occur.
-     * @exception SAXException If any parse errors occur.
-     * @exception IllegalArgumentException If the file is null.
-     * @see org.xml.sax.DocumentHandler
-     * @return A new DOM Document object.
-     */
-    
-    public Document parse(File f)
-       throws SAXException, IOException
-    {
-        if (f == null) {
-            throw new IllegalArgumentException("File cannot be null");
-        }
-        
-        String uri = "file:" + f.getAbsolutePath();
-    if (File.separatorChar == '\\') {
-        uri = uri.replace('\\', '/');
-    }
-        InputSource in = new InputSource(uri);
-        return parse(in);
-    }
-
-    /**
-     * Parse the content of the given input source as an XML document
-     * and return a new DOM {@link org.w3c.dom.Document} object.
-     *
-     * @param is InputSource containing the content to be parsed.
-     * @exception IOException If any IO errors occur.
-     * @exception SAXException If any parse errors occur.
-     * @exception IllegalArgumentException If the InputSource is null.
-     * @see org.xml.sax.DocumentHandler
-     * @return A new DOM Document object.
-     */
-    
-    public abstract Document parse(InputSource is)
-        throws  SAXException, IOException;
-
-    
-    /**
-     * Indicates whether or not this parser is configured to
-     * understand namespaces.
-     *
-     * @return true if this parser is configured to understand
-     *         namespaces; false otherwise.
-     */
-
-    public abstract boolean isNamespaceAware();
-
-    /**
-     * Indicates whether or not this parser is configured to
-     * validate XML documents.
-     *
-     * @return true if this parser is configured to validate
-     *         XML documents; false otherwise.
-     */
-    
-    public abstract boolean isValidating();
-
-    /**
-     * Specify the {@link org.xml.sax.EntityResolver} to be used to resolve
-     * entities present in the XML document to be parsed. Setting
-     * this to <code>null</code> will result in the underlying
-     * implementation using it's own default implementation and
-     * behavior.
-     *
-     * @param er The <code>EntityResolver</code> to be used to resolve entities
-     *           present in the XML document to be parsed.
-     */
-
-    public abstract void setEntityResolver(org.xml.sax.EntityResolver er);
-
-    /**
-     * Specify the {@link org.xml.sax.ErrorHandler} to be used to report 
-     * errors present in the XML document to be parsed. Setting
-     * this to <code>null</code> will result in the underlying
-     * implementation using it's own default implementation and
-     * behavior.
-     *
-     * @param eh The <code>ErrorHandler</code> to be used to report errors
-     *           present in the XML document to be parsed.
-     */
-
-    public abstract void setErrorHandler(org.xml.sax.ErrorHandler eh);
-
-    /**
-     * Obtain a new instance of a DOM {@link org.w3c.dom.Document} object
-     * to build a DOM tree with.  An alternative way to create a DOM
-     * Document object is to use the
-     * {@link #getDOMImplementation() getDOMImplementation}
-     * method to get a DOM Level 2 DOMImplementation object and then use
-     * DOM Level 2 methods on that object to create a DOM Document object.
-     *
-     * @return A new instance of a DOM Document object.
-     */
-    
-    public abstract Document newDocument();
-
-    /**
-     * Obtain an instance of a {@link org.w3c.dom.DOMImplementation} object.
-     *
-     * @return A new instance of a <code>DOMImplementation</code>.
-     */
-
-    public abstract DOMImplementation getDOMImplementation();
-}
diff --git a/src/javax/xml/parsers/DocumentBuilderFactory.java b/src/javax/xml/parsers/DocumentBuilderFactory.java
deleted file mode 100644
index 7568198..0000000
--- a/src/javax/xml/parsers/DocumentBuilderFactory.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "Apache Software Foundation" must not be used to endorse or
- *    promote products derived from this software without prior written
- *    permission. For written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, Sun Microsystems,
- * Inc., http://www.sun.com.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package javax.xml.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.File;
-import java.io.FileInputStream;
-
-import java.util.Properties;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-/**
- * Defines a factory API that enables applications to obtain a
- * parser that produces DOM object trees from XML documents.
- *
- * An implementation of the <code>DocumentBuilderFactory</code> class is
- * <em>NOT</em> guaranteed to be thread safe. It is up to the user application 
- * to make sure about the use of the <code>DocumentBuilderFactory</code> from 
- * more than one thread. Alternatively the application can have one instance 
- * of the <code>DocumentBuilderFactory</code> per thread.
- * An application can use the same instance of the factory to obtain one or 
- * more instances of the <code>DocumentBuilder</code> provided the instance
- * of the factory isn't being used in more than one thread at a time.
- *
- * @since JAXP 1.0
- * @version 1.0
- */
-
-public abstract class DocumentBuilderFactory {
-    private boolean validating = false;
-    private boolean namespaceAware = false;
-    private boolean whitespace = false;
-    private boolean expandEntityRef = true;
-    private boolean ignoreComments = false;
-    private boolean coalescing = false;
-    
-    protected DocumentBuilderFactory () {
-    
-    }
-
-    /**
-     * Obtain a new instance of a
-     * <code>DocumentBuilderFactory</code>. This static method creates
-     * a new factory instance.
-     * This method uses the following ordered lookup procedure to determine
-     * the <code>DocumentBuilderFactory</code> implementation class to
-     * load:
-     * <ul>
-     * <li>
-     * Use the <code>javax.xml.parsers.DocumentBuilderFactory</code> system
-     * property.
-     * </li>
-     * <li>
-     * Use the properties file "lib/jaxp.properties" in the JRE directory.
-     * This configuration file is in standard <code>java.util.Properties
-     * </code> format and contains the fully qualified name of the
-     * implementation class with the key being the system property defined
-     * above.
-     * </li>
-     * <li>
-     * Use the Services API (as detailed in the JAR specification), if
-     * available, to determine the classname. The Services API will look
-     * for a classname in the file
-     * <code>META-INF/services/javax.xml.parsers.DocumentBuilderFactory</code>
-     * in jars available to the runtime.
-     * </li>
-     * <li>
-     * Platform default <code>DocumentBuilderFactory</code> instance.
-     * </li>
-     * </ul>
-     *
-     * Once an application has obtained a reference to a
-     * <code>DocumentBuilderFactory</code> it can use the factory to
-     * configure and obtain parser instances.
-     *
-     * @exception FactoryConfigurationError if the implementation is not
-     * available or cannot be instantiated.
-     */
-    
-    public static DocumentBuilderFactory newInstance()
-        throws FactoryConfigurationError
-    {
-        try {
-            return (DocumentBuilderFactory) FactoryFinder.find(
-                /* The default property name according to the JAXP spec */
-                "javax.xml.parsers.DocumentBuilderFactory",
-                /* The fallback implementation class name */
-                "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
-        } catch (FactoryFinder.ConfigurationError e) {
-            throw new FactoryConfigurationError(e.getException(),
-                                                e.getMessage());
-        }
-    }
-    
-    /**
-     * Creates a new instance of a {@link javax.xml.parsers.DocumentBuilder}
-     * using the currently configured parameters.
-     *
-     * @exception ParserConfigurationException if a DocumentBuilder
-     * cannot be created which satisfies the configuration requested.
-     * @return A new instance of a DocumentBuilder.
-     */
-    
-    public abstract DocumentBuilder newDocumentBuilder()
-        throws ParserConfigurationException;
-    
-    
-    /**
-     * Specifies that the parser produced by this code will
-     * provide support for XML namespaces. By default the value of this is set
-     * to <code>false</code>
-     *
-     * @param awareness true if the parser produced will provide support
-     *                  for XML namespaces; false otherwise.
-     */
-    
-    public void setNamespaceAware(boolean awareness) {
-        this.namespaceAware = awareness;
-    }
-
-    /**
-     * Specifies that the parser produced by this code will
-     * validate documents as they are parsed. By default the value of this
-     * is set to <code>false</code>.
-     *
-     * @param validating true if the parser produced will validate documents
-     *                   as they are parsed; false otherwise.
-     */
-    
-    public void setValidating(boolean validating) {
-        this.validating = validating;
-    }
-
-    /**
-     * Specifies that the parsers created by this  factory must eliminate
-     * whitespace in element content (sometimes known loosely as
-     * 'ignorable whitespace') when parsing XML documents (see XML Rec
-     * 2.10). Note that only whitespace which is directly contained within
-     * element content that has an element only content model (see XML
-     * Rec 3.2.1) will be eliminated. Due to reliance on the content model
-     * this setting requires the parser to be in validating mode. By default
-     * the value of this is set to <code>false</code>.
-     *
-     * @param whitespace true if the parser created must eliminate whitespace
-     *                   in the element content when parsing XML documents;
-     *                   false otherwise.
-     */
-
-    public void setIgnoringElementContentWhitespace(boolean whitespace) {
-        this.whitespace = whitespace;
-    }
-
-    /**
-     * Specifies that the parser produced by this code will
-     * expand entity reference nodes. By default the value of this is set to
-     * <code>true</code>
-     *
-     * @param expandEntityRef true if the parser produced will expand entity
-     *                        reference nodes; false otherwise.
-     */
-    
-    public void setExpandEntityReferences(boolean expandEntityRef) {
-        this.expandEntityRef = expandEntityRef;
-    }
-
-    /**
-     * Specifies that the parser produced by this code will
-     * ignore comments. By default the value of this is set to <code>false
-     * </code>
-     */
-    
-    public void setIgnoringComments(boolean ignoreComments) {
-        this.ignoreComments = ignoreComments;
-    }
-
-    /**
-     * Specifies that the parser produced by this code will
-     * convert CDATA nodes to Text nodes and append it to the
-     * adjacent (if any) text node. By default the value of this is set to
-     * <code>false</code>
-     *
-     * @param coalescing  true if the parser produced will convert CDATA nodes
-     *                    to Text nodes and append it to the adjacent (if any)
-     *                    text node; false otherwise.
-     */
-    
-    public void setCoalescing(boolean coalescing) {
-        this.coalescing = coalescing;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which are namespace aware.
-     *
-     * @return  true if the factory is configured to produce parsers which
-     *          are namespace aware; false otherwise.
-     */
-    
-    public boolean isNamespaceAware() {
-        return namespaceAware;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which validate the XML content during parse.
-     *
-     * @return  true if the factory is configured to produce parsers
-     *          which validate the XML content during parse; false otherwise.
-     */
-    
-    public boolean isValidating() {
-        return validating;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which ignore ignorable whitespace in element content.
-     *
-     * @return  true if the factory is configured to produce parsers
-     *          which ignore ignorable whitespace in element content;
-     *          false otherwise.
-     */
-    
-    public boolean isIgnoringElementContentWhitespace() {
-        return whitespace;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which expand entity reference nodes.
-     *
-     * @return  true if the factory is configured to produce parsers
-     *          which expand entity reference nodes; false otherwise.
-     */
-    
-    public boolean isExpandEntityReferences() {
-        return expandEntityRef;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which ignores comments.
-     *
-     * @return  true if the factory is configured to produce parsers
-     *          which ignores comments; false otherwise.
-     */
-    
-    public boolean isIgnoringComments() {
-        return ignoreComments;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which converts CDATA nodes to Text nodes and appends it to
-     * the adjacent (if any) Text node.
-     *
-     * @return  true if the factory is configured to produce parsers
-     *          which converts CDATA nodes to Text nodes and appends it to
-     *          the adjacent (if any) Text node; false otherwise.
-     */
-    
-    public boolean isCoalescing() {
-        return coalescing;
-    }
-
-    /**
-     * Allows the user to set specific attributes on the underlying
-     * implementation.
-     * @param name The name of the attribute.
-     * @param value The value of the attribute.
-     * @exception IllegalArgumentException thrown if the underlying
-     * implementation doesn't recognize the attribute.
-     */
-    public abstract void setAttribute(String name, Object value)
-                throws IllegalArgumentException;
-
-    /**
-     * Allows the user to retrieve specific attributes on the underlying
-     * implementation.
-     * @param name The name of the attribute.
-     * @return value The value of the attribute.
-     * @exception IllegalArgumentException thrown if the underlying
-     * implementation doesn't recognize the attribute.
-     */
-    public abstract Object getAttribute(String name)
-                throws IllegalArgumentException;
-}
diff --git a/src/javax/xml/parsers/FactoryConfigurationError.java b/src/javax/xml/parsers/FactoryConfigurationError.java
deleted file mode 100644
index ba3b1ae..0000000
--- a/src/javax/xml/parsers/FactoryConfigurationError.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "Apache Software Foundation" must not be used to endorse or
- *    promote products derived from this software without prior written
- *    permission. For written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, Sun Microsystems,
- * Inc., http://www.sun.com.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package javax.xml.parsers;
-
-/**
- * Thrown when a problem with configuration with the Parser Factories
- * exists. This error will typically be thrown when the class of a
- * parser factory specified in the system properties cannot be found
- * or instantiated.
- *
- * @since JAXP 1.0
- * @version 1.0
- */
-
-public class FactoryConfigurationError extends Error {
-
-    private Exception exception;
-
-    /**
-     * Create a new <code>FactoryConfigurationError</code> with no
-     * detail mesage.
-     */
-
-     public FactoryConfigurationError() {
-         super();
-    	 this.exception = null; 
-     }
-
-    /**
-     * Create a new <code>FactoryConfigurationError</code> with
-     * the <code>String </code> specified as an error message.
-     *
-     * @param msg The error message for the exception.
-     */
-    
-    public FactoryConfigurationError(String msg) {
-        super(msg);
-        this.exception = null;
-    }
-
-
-    /**
-     * Create a new <code>FactoryConfigurationError</code> with a
-     * given <code>Exception</code> base cause of the error.
-     *
-     * @param e The exception to be encapsulated in a
-     * FactoryConfigurationError.
-     */
-    
-    public FactoryConfigurationError(Exception e) {
-        super(e.toString());
-        this.exception = e;
-    }
-
-    /**
-     * Create a new <code>FactoryConfigurationError</code> with the
-     * given <code>Exception</code> base cause and detail message.
-     *
-     * @param e The exception to be encapsulated in a
-     * FactoryConfigurationError
-     * @param msg The detail message.
-     * @param e The exception to be wrapped in a FactoryConfigurationError
-     */
-    
-    public FactoryConfigurationError(Exception e, String msg) {
-        super(msg);
-        this.exception = e;
-    }
-
-
-    /**
-     * Return the message (if any) for this error . If there is no
-     * message for the exception and there is an encapsulated
-     * exception then the message of that exception, if it exists will be 
-     * returned. Else the name of the encapsulated exception will be
-     * returned.
-     *
-     * @return The error message.
-     */
-    
-    public String getMessage () {
-        String message = super.getMessage ();
-  
-        if (message == null && exception != null) {
-            return exception.getMessage();
-        }
-
-        return message;
-    }
-  
-    /**
-     * Return the actual exception (if any) that caused this exception to
-     * be raised.
-     *
-     * @return The encapsulated exception, or null if there is none.
-     */
-    
-    public Exception getException () {
-        return exception;
-    }
-}
-
-
-
-
-
-
-
diff --git a/src/javax/xml/parsers/FactoryFinder.java b/src/javax/xml/parsers/FactoryFinder.java
deleted file mode 100644
index 0157924..0000000
--- a/src/javax/xml/parsers/FactoryFinder.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "Apache Software Foundation" must not be used to endorse or
- *    promote products derived from this software without prior written
- *    permission. For written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, Sun Microsystems,
- * Inc., http://www.sun.com.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package javax.xml.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.File;
-import java.io.FileInputStream;
-
-import java.util.Properties;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-
-/**
- * This class is duplicated for each JAXP subpackage so keep it in sync.
- * It is package private and therefore is not exposed as part of the JAXP
- * API.
- *
- * This code is designed to implement the JAXP 1.1 spec pluggability
- * feature and is designed to both compile and run on JDK version 1.1 and
- * later.  The code also runs both as part of an unbundled jar file and
- * when bundled as part of the JDK.
- */
-class FactoryFinder {
-    /** Set to true for debugging */
-    private static final boolean debug = false;
-
-    private static void debugPrintln(String msg) {
-        if (debug) {
-            System.err.println("JAXP: " + msg);
-        }
-    }
-
-    /**
-     * Figure out which ClassLoader to use.  For JDK 1.2 and later use
-     * the context ClassLoader.
-     */           
-    private static ClassLoader findClassLoader()
-        throws ConfigurationError
-    {
-        Method m = null;
-
-        try {
-            m = Thread.class.getMethod("getContextClassLoader", null);
-        } catch (NoSuchMethodException e) {
-            // Assume that we are running JDK 1.1, use the current ClassLoader
-            debugPrintln("assuming JDK 1.1");
-            return FactoryFinder.class.getClassLoader();
-        }
-
-        try {
-            return (ClassLoader) m.invoke(Thread.currentThread(), null);
-        } catch (IllegalAccessException e) {
-            // assert(false)
-            throw new ConfigurationError("Unexpected IllegalAccessException",
-                                         e);
-        } catch (InvocationTargetException e) {
-            // assert(e.getTargetException() instanceof SecurityException)
-            throw new ConfigurationError("Unexpected InvocationTargetException",
-                                         e);
-        }
-    }
-
-    /**
-     * Create an instance of a class using the specified ClassLoader
-     */
-    private static Object newInstance(String className,
-                                      ClassLoader classLoader)
-        throws ConfigurationError
-    {
-        try {
-            Class spiClass;
-            if (classLoader == null) {
-                spiClass = Class.forName(className);
-            } else {
-                spiClass = classLoader.loadClass(className);
-            }
-            return spiClass.newInstance();
-        } catch (ClassNotFoundException x) {
-            throw new ConfigurationError(
-                "Provider " + className + " not found", x);
-        } catch (Exception x) {
-            throw new ConfigurationError(
-                "Provider " + className + " could not be instantiated: " + x,
-                x);
-        }
-    }
-
-    /**
-     * Finds the implementation Class object in the specified order.  Main
-     * entry point.
-     * @return Class object of factory, never null
-     *
-     * @param factoryId             Name of the factory to find, same as
-     *                              a property name
-     * @param fallbackClassName     Implementation class name, if nothing else
-     *                              is found.  Use null to mean no fallback.
-     *
-     * @exception FactoryFinder.ConfigurationError
-     *
-     * Package private so this code can be shared.
-     */
-    static Object find(String factoryId, String fallbackClassName)
-        throws ConfigurationError
-    {
-        debugPrintln("debug is on");
-
-        ClassLoader classLoader = findClassLoader();
-
-        // Use the system property first
-        try {
-            String systemProp =
-                System.getProperty( factoryId );
-            if( systemProp!=null) {
-                debugPrintln("found system property " + systemProp);
-                return newInstance(systemProp, classLoader);
-            }
-        } catch (SecurityException se) {
-        }
-
-        // try to read from $java.home/lib/xml.properties
-        try {
-            String javah=System.getProperty( "java.home" );
-            String configFile = javah + File.separator +
-                "lib" + File.separator + "jaxp.properties";
-            File f=new File( configFile );
-            if( f.exists()) {
-                Properties props=new Properties();
-                props.load( new FileInputStream(f));
-                String factoryClassName = props.getProperty(factoryId);
-                debugPrintln("found java.home property " + factoryClassName);
-                return newInstance(factoryClassName, classLoader);
-            }
-        } catch(Exception ex ) {
-            if( debug ) ex.printStackTrace();
-        }
-
-        String serviceId = "META-INF/services/" + factoryId;
-        // try to find services in CLASSPATH
-        try {
-            InputStream is=null;
-            if (classLoader == null) {
-                is=ClassLoader.getSystemResourceAsStream( serviceId );
-            } else {
-                is=classLoader.getResourceAsStream( serviceId );
-            }
-        
-            if( is!=null ) {
-                debugPrintln("found " + serviceId);
-
-                // Read the service provider name in UTF-8 as specified in
-                // the jar spec.  Unfortunately this fails in Microsoft
-                // VJ++, which does not implement the UTF-8
-                // encoding. Theoretically, we should simply let it fail in
-                // that case, since the JVM is obviously broken if it
-                // doesn't support such a basic standard.  But since there
-                // are still some users attempting to use VJ++ for
-                // development, we have dropped in a fallback which makes a
-                // second attempt using the platform's default encoding. In
-                // VJ++ this is apparently ASCII, which is a subset of
-                // UTF-8... and since the strings we'll be reading here are
-                // also primarily limited to the 7-bit ASCII range (at
-                // least, in English versions), this should work well
-                // enough to keep us on the air until we're ready to
-                // officially decommit from VJ++. [Edited comment from
-                // jkesselm]
-                BufferedReader rd;
-                try {
-                    rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-                } catch (java.io.UnsupportedEncodingException e) {
-                    rd = new BufferedReader(new InputStreamReader(is));
-                }
-        
-                String factoryClassName = rd.readLine();
-                rd.close();
-
-                if (factoryClassName != null &&
-                    ! "".equals(factoryClassName)) {
-                    debugPrintln("loaded from services: " + factoryClassName);
-                    return newInstance(factoryClassName, classLoader);
-                }
-            }
-        } catch( Exception ex ) {
-            if( debug ) ex.printStackTrace();
-        }
-
-        if (fallbackClassName == null) {
-            throw new ConfigurationError(
-                "Provider for " + factoryId + " cannot be found", null);
-        }
-
-        debugPrintln("loaded from fallback value: " + fallbackClassName);
-        return newInstance(fallbackClassName, classLoader);
-    }
-
-    static class ConfigurationError extends Error {
-        private Exception exception;
-
-        /**
-         * Construct a new instance with the specified detail string and
-         * exception.
-         */
-        ConfigurationError(String msg, Exception x) {
-            super(msg);
-            this.exception = x;
-        }
-
-        Exception getException() {
-            return exception;
-        }
-    }
-}
diff --git a/src/javax/xml/parsers/ParserConfigurationException.java b/src/javax/xml/parsers/ParserConfigurationException.java
deleted file mode 100644
index 3389d5b..0000000
--- a/src/javax/xml/parsers/ParserConfigurationException.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "Apache Software Foundation" must not be used to endorse or
- *    promote products derived from this software without prior written
- *    permission. For written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, Sun Microsystems,
- * Inc., http://www.sun.com.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package javax.xml.parsers;
-
-/**
- * Indicates a serious configuration error.
- *
- * @since JAXP 1.0
- * @version 1.0
- */
-
-public class ParserConfigurationException extends Exception {
-
-    /**
-     * Create a new <code>ParserConfigurationException</code> with no
-     * detail mesage.
-     */
-
-    public ParserConfigurationException() {
-        super();
-    }
-
-    /**
-     * Create a new <code>ParserConfigurationException</code> with
-     * the <code>String</code> specified as an error message.
-     *
-     * @param msg The error message for the exception.
-     */
-    
-    public ParserConfigurationException(String msg) {
-        super(msg);
-    }
-
-}
-
diff --git a/src/javax/xml/parsers/SAXParser.java b/src/javax/xml/parsers/SAXParser.java
deleted file mode 100644
index 1dd38e6..0000000
--- a/src/javax/xml/parsers/SAXParser.java
+++ /dev/null
@@ -1,476 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "Apache Software Foundation" must not be used to endorse or
- *    promote products derived from this software without prior written
- *    permission. For written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, Sun Microsystems,
- * Inc., http://www.sun.com.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-
-
-package javax.xml.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.File;
-
-import org.xml.sax.Parser;
-import org.xml.sax.XMLReader;
-import org.xml.sax.HandlerBase;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-
-/**
- * Defines the API that wraps an {@link org.xml.sax.XMLReader}
- * implementation class. In JAXP 1.0, this class wrapped the
- * {@link org.xml.sax.Parser} interface, however this interface was
- * replaced by the {@link org.xml.sax.XMLReader}. For ease
- * of transition, this class continues to support the same name
- * and interface as well as supporting new methods.
- *
- * An instance of this class can be obtained from the
- * {@link javax.xml.parsers.SAXParserFactory#newSAXParser()} method.
- * Once an instance of this class is obtained, XML can be parsed from
- * a variety of input sources. These input sources are InputStreams,
- * Files, URLs, and SAX InputSources.<p>
- *
- *
- * As the content is parsed by the underlying parser, methods of the
- * given {@link org.xml.sax.HandlerBase} or the
- * {@link org.xml.sax.helpers.DefaultHandler} are called.<p>
- *
- * Implementors of this class which wrap an underlying implementation
- * can consider using the {@link org.xml.sax.helpers.ParserAdapter}
- * class to initially adapt their SAX1 impelemntation to work under
- * this revised class.<p>
- *
- * An implementation of <code>SAXParser</code> is <em>NOT</em> 
- * guaranteed to behave as per the specification if it is used concurrently by 
- * two or more threads. It is recommended to have one instance of the
- * <code>SAXParser</code> per thread or it is upto the application to 
- * make sure about the use of <code>SAXParser</code> from more than one
- * thread.
- *
- * @since JAXP 1.0
- * @version 1.0
- */
-
-public abstract class SAXParser {
-
-    protected SAXParser () {
-    
-    }
-
-    /**
-     * Parse the content of the given {@link java.io.InputStream}
-     * instance as XML using the specified {@link org.xml.sax.HandlerBase}.
-     * <i> Use of the DefaultHandler version of this method is recommended as
-     * the HandlerBase class has been deprecated in SAX 2.0</i>
-     *
-     * @param is InputStream containing the content to be parsed.
-     * @param hb The SAX HandlerBase to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the given InputStream is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     */
-    
-    public void parse(InputStream is, HandlerBase hb)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputStream cannot be null");
-        }
-        
-        InputSource input = new InputSource(is);
-        this.parse(input, hb);
-    }
-
-    /**
-     * Parse the content of the given {@link java.io.InputStream}
-     * instance as XML using the specified {@link org.xml.sax.HandlerBase}.
-     * <i> Use of the DefaultHandler version of this method is recommended as
-     * the HandlerBase class has been deprecated in SAX 2.0</i>
-     *
-     * @param is InputStream containing the content to be parsed.
-     * @param hb The SAX HandlerBase to use.
-     * @param systemId The systemId which is needed for resolving relative URIs.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the given InputStream is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     * version of this method instead.
-     */
-    
-    public void parse(InputStream is, HandlerBase hb, String systemId)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputStream cannot be null");
-        }
-        
-        InputSource input = new InputSource(is);
-        input.setSystemId(systemId);
-        this.parse(input, hb);
-    }
-   
-    /**
-     * Parse the content of the given {@link java.io.InputStream}
-     * instance as XML using the specified
-     * {@link org.xml.sax.helpers.DefaultHandler}.
-     *
-     * @param is InputStream containing the content to be parsed.
-     * @param dh The SAX DefaultHandler to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the given InputStream is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     */
-    
-    public void parse(InputStream is, DefaultHandler dh)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputStream cannot be null");
-        }
-        
-        InputSource input = new InputSource(is);
-        this.parse(input, dh);
-    }
-
-    /**
-     * Parse the content of the given {@link java.io.InputStream}
-     * instance as XML using the specified
-     * {@link org.xml.sax.helpers.DefaultHandler}.
-     *
-     * @param is InputStream containing the content to be parsed.
-     * @param dh The SAX DefaultHandler to use.
-     * @param systemId The systemId which is needed for resolving relative URIs.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the given InputStream is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     * version of this method instead.
-     */
-    
-    public void parse(InputStream is, DefaultHandler dh, String systemId)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputStream cannot be null");
-        }
-        
-        InputSource input = new InputSource(is);
-        input.setSystemId(systemId);
-        this.parse(input, dh);
-    }
-
-    /**
-     * Parse the content described by the giving Uniform Resource
-     * Identifier (URI) as XML using the specified
-     * {@link org.xml.sax.HandlerBase}.
-     * <i> Use of the DefaultHandler version of this method is recommended as
-     * the <code>HandlerBase</code> class has been deprecated in SAX 2.0</i>
-     *
-     * @param uri The location of the content to be parsed.
-     * @param hb The SAX HandlerBase to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the uri is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     */
-    
-    public void parse(String uri, HandlerBase hb)
-        throws SAXException, IOException
-    {
-        if (uri == null) {
-            throw new IllegalArgumentException("uri cannot be null");
-        }
-        
-        InputSource input = new InputSource(uri);
-        this.parse(input, hb);
-    }
-  
-    /**
-     * Parse the content described by the giving Uniform Resource
-     * Identifier (URI) as XML using the specified
-     * {@link org.xml.sax.helpers.DefaultHandler}.
-     *
-     * @param uri The location of the content to be parsed.
-     * @param dh The SAX DefaultHandler to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the uri is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     */
-    
-    public void parse(String uri, DefaultHandler dh)
-        throws SAXException, IOException
-    {
-        if (uri == null) {
-            throw new IllegalArgumentException("uri cannot be null");
-        }
-        
-        InputSource input = new InputSource(uri);
-        this.parse(input, dh);
-    }
-    
-    /**
-     * Parse the content of the file specified as XML using the
-     * specified {@link org.xml.sax.HandlerBase}.
-     * <i> Use of the DefaultHandler version of this method is recommended as
-     * the HandlerBase class has been deprecated in SAX 2.0</i>
-     *
-     * @param f The file containing the XML to parse
-     * @param hb The SAX HandlerBase to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the File object is null.
-     * @see org.xml.sax.DocumentHandler
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     */
-
-    public void parse(File f, HandlerBase hb)
-        throws SAXException, IOException
-    {
-        if (f == null) {
-            throw new IllegalArgumentException("File cannot be null");
-        }
-        
-        String uri = "file:" + f.getAbsolutePath();
-        if (File.separatorChar == '\\') {
-            uri = uri.replace('\\', '/');
-        }
-        InputSource input = new InputSource(uri);
-        this.parse(input, hb);
-    }
-    
-    /**
-     * Parse the content of the file specified as XML using the
-     * specified {@link org.xml.sax.helpers.DefaultHandler}.
-     *
-     * @param f The file containing the XML to parse
-     * @param dh The SAX DefaultHandler to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the File object is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     */
-
-    public void parse(File f, DefaultHandler dh)
-        throws SAXException, IOException
-    {
-        if (f == null) {
-            throw new IllegalArgumentException("File cannot be null");
-        }
-        
-        String uri = "file:" + f.getAbsolutePath();
-        if (File.separatorChar == '\\') {
-            uri = uri.replace('\\', '/');
-        }
-        InputSource input = new InputSource(uri);
-        this.parse(input, dh);
-    }
-    
-    /**
-     * Parse the content given {@link org.xml.sax.InputSource}
-     * as XML using the specified
-     * {@link org.xml.sax.HandlerBase}.
-     * <i> Use of the DefaultHandler version of this method is recommended as
-     * the HandlerBase class has been deprecated in SAX 2.0</i>
-     *
-     * @param is The InputSource containing the content to be parsed.
-     * @param hb The SAX HandlerBase to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the InputSource is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     */
-    
-    public void parse(InputSource is, HandlerBase hb)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputSource cannot be null");
-        }
-        
-        Parser parser = this.getParser();
-
-        if (hb != null) {
-            parser.setDocumentHandler(hb);
-            parser.setEntityResolver(hb);
-            parser.setErrorHandler(hb);
-            parser.setDTDHandler(hb);
-        }
-        parser.parse(is);
-    }
-    
-    /**
-     * Parse the content given {@link org.xml.sax.InputSource}
-     * as XML using the specified
-     * {@link org.xml.sax.helpers.DefaultHandler}.
-     *
-     * @param is The InputSource containing the content to be parsed.
-     * @param dh The SAX DefaultHandler to use.
-     * @exception IOException If any IO errors occur.
-     * @exception IllegalArgumentException If the InputSource is null.
-     * @exception SAXException If the underlying parser throws a
-     * SAXException while parsing.
-     * @see org.xml.sax.DocumentHandler
-     */
-    
-    public void parse(InputSource is, DefaultHandler dh)
-        throws SAXException, IOException
-    {
-        if (is == null) {
-            throw new IllegalArgumentException("InputSource cannot be null");
-        }
-        
-        XMLReader reader = this.getXMLReader();
-        if (dh != null) {
-            reader.setContentHandler(dh);
-            reader.setEntityResolver(dh);
-            reader.setErrorHandler(dh);
-            reader.setDTDHandler(dh);
-        }
-        reader.parse(is);
-    }
-    
-    /**
-     * Returns the SAX parser that is encapsultated by the
-     * implementation of this class.
-     *
-     * @return The SAX parser that is encapsultated by the
-     *         implementation of this class.
-     */
-    
-    public abstract org.xml.sax.Parser getParser() throws SAXException;
-
-    /**
-     * Returns the {@link org.xml.sax.XMLReader} that is encapsulated by the
-     * implementation of this class.
-     *
-     * @return The XMLReader that is encapsulated by the
-     *         implementation of this class.
-     */
-
-    public abstract org.xml.sax.XMLReader getXMLReader() throws SAXException;
-    
-    /**
-     * Indicates whether or not this parser is configured to
-     * understand namespaces.
-     *
-     * @return true if this parser is configured to
-     *         understand namespaces; false otherwise.
-     */
-    
-    public abstract boolean isNamespaceAware();
-
-    /**
-     * Indicates whether or not this parser is configured to
-     * validate XML documents.
-     *
-     * @return true if this parser is configured to
-     *         validate XML documents; false otherwise.
-     */
-    
-    public abstract boolean isValidating();
-
-    /**
-     * Sets the particular property in the underlying implementation of
-     * {@link org.xml.sax.XMLReader}.
-     * A list of the core features and properties can be found at
-     * <a href="http://www.megginson.com/SAX/Java/features.html"> http://www.megginson.com/SAX/Java/features.html </a>
-     *
-     * @param name The name of the property to be set.
-     * @param value The value of the property to be set.
-     * @exception SAXNotRecognizedException When the underlying XMLReader does
-     *            not recognize the property name.
-     *
-     * @exception SAXNotSupportedException When the underlying XMLReader
-     *            recognizes the property name but doesn't support the
-     *            property.
-     *
-     * @see org.xml.sax.XMLReader#setProperty
-     */
-    public abstract void setProperty(String name, Object value)
-        throws SAXNotRecognizedException, SAXNotSupportedException;
-
-    /**
-     *
-     * Returns the particular property requested for in the underlying
-     * implementation of {@link org.xml.sax.XMLReader}.
-     *
-     * @param name The name of the property to be retrieved.
-     * @return Value of the requested property.
-     *
-     * @exception SAXNotRecognizedException When the underlying XMLReader does
-     *            not recognize the property name.
-     *
-     * @exception SAXNotSupportedException When the underlying XMLReader
-     *            recognizes the property name but doesn't support the
-     *            property.
-     *
-     * @see org.xml.sax.XMLReader#getProperty
-     */
-    public abstract Object getProperty(String name)
-        throws SAXNotRecognizedException, SAXNotSupportedException;
-}
diff --git a/src/javax/xml/parsers/SAXParserFactory.java b/src/javax/xml/parsers/SAXParserFactory.java
deleted file mode 100644
index 29fb8f0..0000000
--- a/src/javax/xml/parsers/SAXParserFactory.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The name "Apache Software Foundation" must not be used to endorse or
- *    promote products derived from this software without prior written
- *    permission. For written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999-2001, Sun Microsystems,
- * Inc., http://www.sun.com.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package javax.xml.parsers;
-
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-/**
- * Defines a factory API that enables applications to configure and
- * obtain a SAX based parser to parse XML documents.<p>
- * An implementation of the <code>SAXParserFactory</code> class is
- * <em>NOT</em> guaranteed to be thread safe. It is up to the user application 
- * to make sure about the use of the <code>SAXParserFactory</code> from 
- * more than one thread. Alternatively the application can have one instance 
- * of the <code>SAXParserFactory</code> per thread.
- * An application can use the same instance of the factory to obtain one or 
- * more instances of the <code>SAXParser</code> provided the instance
- * of the factory isn't being used in more than one thread at a time.
- * <p>
- *
- * The static <code>newInstance</code> method returns a new concrete 
- * implementation of this class.
- *
- * @since JAXP 1.0
- * @version 1.0
- */
-
-public abstract class SAXParserFactory {
-    private boolean validating = false;
-    private boolean namespaceAware= false;
-    
-    protected SAXParserFactory () {
-    
-    }
-
-    /**
-     * Obtain a new instance of a <code>SAXParserFactory</code>. This
-     * static method creates a new factory instance
-     * This method uses the following ordered lookup procedure to determine
-     * the <code>SAXParserFactory</code> implementation class to
-     * load:
-     * <ul>
-     * <li>
-     * Use the <code>javax.xml.parsers.SAXParserFactory</code> system
-     * property.
-     * </li>
-     * <li>
-     * Use the properties file "lib/jaxp.properties" in the JRE directory.
-     * This configuration file is in standard <code>java.util.Properties
-     * </code> format and contains the fully qualified name of the
-     * implementation class with the key being the system property defined
-     * above.
-     * </li>
-     * <li>
-     * Use the Services API (as detailed in the JAR specification), if
-     * available, to determine the classname. The Services API will look
-     * for a classname in the file
-     * <code>META-INF/services/javax.xml.parsers.SAXParserFactory</code>
-     * in jars available to the runtime.
-     * </li>
-     * <li>
-     * Platform default <code>SAXParserFactory</code> instance.
-     * </li>
-     * </ul>
-     *
-     * Once an application has obtained a reference to a
-     * <code>SAXParserFactory</code> it can use the factory to
-     * configure and obtain parser instances.
-     *
-     * @return A new instance of a SAXParserFactory.
-     *
-     * @exception FactoryConfigurationError if the implementation is
-     * not available or cannot be instantiated.
-     */
-
-    public static SAXParserFactory newInstance()
-        throws FactoryConfigurationError
-    {
-        try {
-            return (SAXParserFactory) FactoryFinder.find(
-                /* The default property name according to the JAXP spec */
-                "javax.xml.parsers.SAXParserFactory",
-                /* The fallback implementation class name */
-                "org.apache.xerces.jaxp.SAXParserFactoryImpl");
-        } catch (FactoryFinder.ConfigurationError e) {
-            throw new FactoryConfigurationError(e.getException(),
-                                                e.getMessage());
-        }
-    }
-    
-    /**
-     * Creates a new instance of a SAXParser using the currently
-     * configured factory parameters.
-     *
-     * @return A new instance of a SAXParser.
-     *
-     * @exception ParserConfigurationException if a parser cannot
-     * be created which satisfies the requested configuration.
-     */
-    
-    public abstract SAXParser newSAXParser()
-        throws ParserConfigurationException, SAXException;
-
-    
-    /**
-     * Specifies that the parser produced by this code will
-     * provide support for XML namespaces. By default the value of this is set
-     * to <code>false</code>.
-     *
-     * @param awareness true if the parser produced by this code will
-     *                  provide support for XML namespaces; false otherwise.
-     */
-    
-    public void setNamespaceAware(boolean awareness)
-    {
-        this.namespaceAware = awareness;
-    }
-
-    /**
-     * Specifies that the parser produced by this code will
-     * validate documents as they are parsed. By default the value of this is
-     * set to <code>false</code>.
-     *
-     * @param validating true if the parser produced by this code will
-     *                   validate documents as they are parsed; false otherwise.
-     */
-    
-    public void setValidating(boolean validating)
-    {
-        this.validating = validating;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which are namespace aware.
-     *
-     * @return true if the factory is configured to produce
-     *         parsers which are namespace aware; false otherwise.
-     */
-    
-    public boolean isNamespaceAware() {
-        return namespaceAware;
-    }
-
-    /**
-     * Indicates whether or not the factory is configured to produce
-     * parsers which validate the XML content during parse.
-     *
-     * @return true if the factory is configured to produce parsers which validate
-     *         the XML content during parse; false otherwise.
-     */
-    
-    public boolean isValidating() {
-        return validating;
-    }
-
-    /**
-     *
-     * Sets the particular feature in the underlying implementation of
-     * org.xml.sax.XMLReader.
-     * A list of the core features and properties can be found at
-     * <a href="http://www.megginson.com/SAX/Java/features.html"> http://www.megginson.com/SAX/Java/features.html </a>
-     *
-     * @param name The name of the feature to be set.
-     * @param value The value of the feature to be set.
-     * @exception SAXNotRecognizedException When the underlying XMLReader does
-     *            not recognize the property name.
-     *
-     * @exception SAXNotSupportedException When the underlying XMLReader
-     *            recognizes the property name but doesn't support the
-     *            property.
-     *
-     * @see org.xml.sax.XMLReader#setFeature
-     */
-    public abstract void setFeature(String name, boolean value)
-        throws ParserConfigurationException, SAXNotRecognizedException,
-                SAXNotSupportedException;
-
-    /**
-     *
-     * Returns the particular property requested for in the underlying
-     * implementation of org.xml.sax.XMLReader.
-     *
-     * @param name The name of the property to be retrieved.
-     * @return Value of the requested property.
-     *
-     * @exception SAXNotRecognizedException When the underlying XMLReader does
-     *            not recognize the property name.
-     *
-     * @exception SAXNotSupportedException When the underlying XMLReader
-     *            recognizes the property name but doesn't support the
-     *            property.
-     *
-     * @see org.xml.sax.XMLReader#getProperty
-     */
-    public abstract boolean getFeature(String name)
-        throws ParserConfigurationException, SAXNotRecognizedException,
-                SAXNotSupportedException;
-}
diff --git a/src/javax/xml/parsers/package.html b/src/javax/xml/parsers/package.html
deleted file mode 100644
index 54a16bb..0000000
--- a/src/javax/xml/parsers/package.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<HTML><HEAD>
-
-</HEAD><BODY>
-
-Provides classes allowing the processing of XML documents. Two types
-of plugable parsers are supported:
-<ul>
-<li>SAX (Simple API for XML)
-<li>DOM (Document Object Model)
-</ul>
-
-
-
-</BODY></HTML>
diff --git a/src/org/apache/html/dom/HTMLAnchorElementImpl.java b/src/org/apache/html/dom/HTMLAnchorElementImpl.java
deleted file mode 100755
index 96410d7..0000000
--- a/src/org/apache/html/dom/HTMLAnchorElementImpl.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLAnchorElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLAnchorElementImpl
-    extends HTMLElementImpl
-    implements HTMLAnchorElement
-{
-    
-    
-    public String getAccessKey()
-    {
-        String    accessKey;
-        
-        // Make sure that the access key is a single character.
-        accessKey = getAttribute( "accesskey" );
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        return accessKey;
-    }
-    
-    
-    public void setAccessKey( String accessKey )
-    {
-        // Make sure that the access key is a single character.
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        setAttribute( "accesskey", accessKey );
-    }
-
-    
-    public String getCharset()
-    {
-        return getAttribute( "charset" );
-    }
-    
-    
-    public void setCharset( String charset )
-    {
-        setAttribute( "charset", charset );
-    }
-    
-    
-    public String getCoords()
-    {
-        return getAttribute( "coords" );
-    }
-    
-    
-    public void setCoords( String coords )
-    {
-        setAttribute( "coords", coords );
-    }
-  
-  
-    public String getHref()
-    {
-        return getAttribute( "href" );
-    }
-    
-    
-    public void setHref( String href )
-    {
-        setAttribute( "href", href );
-    }
-    
-    
-    public String getHreflang()
-    {
-        return getAttribute( "hreflang" );
-    }
-    
-    
-    public void setHreflang( String hreflang )
-    {
-        setAttribute( "hreflang", hreflang );
-    }
-  
-  
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-    
-    
-    public String getRel()
-    {
-        return getAttribute( "rel" );
-    }
-    
-    
-    public void setRel( String rel )
-    {
-        setAttribute( "rel", rel );
-    }
-
-    
-    public String getRev()
-    {
-        return getAttribute( "rev" );
-    }
-    
-    
-    public void setRev( String rev )
-    {
-        setAttribute( "rev", rev );
-    }
-
-
-    public String getShape()
-    {
-        return capitalize( getAttribute( "shape" ) );
-    }
-    
-    
-    public void setShape( String shape )
-    {
-        setAttribute( "shape", shape );
-    }
-  
-
-    public int getTabIndex()
-    {
-        return this.getInteger( getAttribute( "tabindex" ) );
-    }
-    
-    
-    public void setTabIndex( int tabIndex )
-    {
-        setAttribute( "tabindex", String.valueOf( tabIndex ) );
-    }
-
-  
-    public String getTarget()
-    {
-        return getAttribute( "target" );
-    }
-    
-    
-    public void setTarget( String target )
-    {
-        setAttribute( "target", target );
-    }
-    
-    
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-
-    
-    public void blur()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-    
-    public void focus()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-  
-  
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLAnchorElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLAppletElementImpl.java b/src/org/apache/html/dom/HTMLAppletElementImpl.java
deleted file mode 100755
index 5d3a6e7..0000000
--- a/src/org/apache/html/dom/HTMLAppletElementImpl.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLAppletElement
- * @see HTMLElementImpl
- */
-public class HTMLAppletElementImpl
-    extends HTMLElementImpl
-    implements HTMLAppletElement
-{
-
-    
-    public String getAlign()
-    {
-        return getAttribute( "align" );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-  
-    public String getAlt()
-    {
-        return getAttribute( "alt" );
-    }
-    
-    
-    public void setAlt( String alt )
-    {
-        setAttribute( "alt", alt );
-    }
-
-    
-    public String getArchive()
-    {
-        return getAttribute( "archive" );
-    }
-    
-    
-    public void setArchive( String archive )
-    {
-        setAttribute( "archive", archive );
-    }
-
-
-    public String getCode()
-    {
-        return getAttribute( "code" );
-    }
-    
-    
-    public void setCode( String code )
-    {
-        setAttribute( "code", code );
-    }
-
-
-    public String getCodeBase()
-    {
-        return getAttribute( "codebase" );
-    }
-    
-    
-    public void setCodeBase( String codeBase )
-    {
-        setAttribute( "codebase", codeBase );
-    }
-
-
-    public String getHeight()
-    {
-        return getAttribute( "height" );
-    }
-    
-    
-    public void setHeight( String height )
-    {
-        setAttribute( "height", height );
-    }
-
-
-    public String getHspace()
-    {
-        return getAttribute( "height" );
-    }
-    
-    
-    public void setHspace( String height )
-    {
-        setAttribute( "height", height );
-    }
-
-
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-
-    public String getObject()
-    {
-        return getAttribute( "object" );
-    }
-    
-    
-    public void setObject( String object )
-    {
-        setAttribute( "object", object );
-    }
-
-
-    public String getVspace()
-    {
-        return getAttribute( "vspace" );
-    }
-    
-    
-    public void setVspace( String vspace )
-    {
-        setAttribute( "vspace", vspace );
-    }
-
-
-    public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-
-
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLAppletElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-    
-}
-
diff --git a/src/org/apache/html/dom/HTMLAreaElementImpl.java b/src/org/apache/html/dom/HTMLAreaElementImpl.java
deleted file mode 100755
index 3f60c42..0000000
--- a/src/org/apache/html/dom/HTMLAreaElementImpl.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLAreaElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLAreaElementImpl
-    extends HTMLElementImpl
-    implements HTMLAreaElement
-{
-    
-    
-    public String getAccessKey()
-    {
-        String    accessKey;
-        
-        // Make sure that the access key is a single character.
-        accessKey = getAttribute( "accesskey" );
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        return accessKey;
-    }
-    
-    
-    public void setAccessKey( String accessKey )
-    {
-        // Make sure that the access key is a single character.
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        setAttribute( "accesskey", accessKey );
-    }
-
-    
-    public String getAlt()
-    {
-        return getAttribute( "alt" );
-    }
-    
-    
-    public void setAlt( String alt )
-    {
-        setAttribute( "alt", alt );
-    }
-    
-    public String getCoords()
-    {
-        return getAttribute( "coords" );
-    }
-    
-    
-    public void setCoords( String coords )
-    {
-        setAttribute( "coords", coords );
-    }
-  
-  
-    public String getHref()
-    {
-        return getAttribute( "href" );
-    }
-    
-    
-    public void setHref( String href )
-    {
-        setAttribute( "href", href );
-    }
-
-    
-    public boolean getNoHref()
-    {
-        return getBinary( "href" );
-    }
-    
-    
-    public void setNoHref( boolean noHref )
-    {
-        setAttribute( "nohref", noHref );
-    }
-    
-    
-    public String getShape()
-    {
-        return capitalize( getAttribute( "shape" ) );
-    }
-    
-    
-    public void setShape( String shape )
-    {
-        setAttribute( "shape", shape );
-    }
-
-    
-    public int getTabIndex()
-    {
-        return getInteger( getAttribute( "tabindex" ) );
-    }
-    
-    
-    public void setTabIndex( int tabIndex )
-    {
-        setAttribute( "tabindex", String.valueOf( tabIndex ) );
-    }
-
-    
-    public String getTarget()
-    {
-        return getAttribute( "target" );
-    }
-    
-    
-    public void setTarget( String target )
-    {
-        setAttribute( "target", target );
-    }
-    
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLAreaElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-    
-}
-
diff --git a/src/org/apache/html/dom/HTMLBRElementImpl.java b/src/org/apache/html/dom/HTMLBRElementImpl.java
deleted file mode 100755
index eee6019..0000000
--- a/src/org/apache/html/dom/HTMLBRElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLBRElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLBRElementImpl
-    extends HTMLElementImpl
-    implements HTMLBRElement
-{
-
-    
-    public String getClear()
-    {
-        return capitalize( getAttribute( "clear" ) );
-    }
-    
-    
-    public void setClear( String clear )
-    {
-        setAttribute( "clear", clear );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLBRElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLBaseElementImpl.java b/src/org/apache/html/dom/HTMLBaseElementImpl.java
deleted file mode 100755
index 790948f..0000000
--- a/src/org/apache/html/dom/HTMLBaseElementImpl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLBaseElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLBaseElementImpl
-    extends HTMLElementImpl
-    implements HTMLBaseElement
-{
-
-    
-    public String getHref()
-    {
-        return getAttribute( "href" );
-    }
-    
-    
-    public void setHref( String href )
-    {
-        setAttribute( "href", href );
-    }
-    
-    public String getTarget()
-    {
-        return getAttribute( "target" );
-    }
-    
-    
-    public void setTarget( String target )
-    {
-        setAttribute( "target", target );
-    }
-
-
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLBaseElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLBaseFontElementImpl.java b/src/org/apache/html/dom/HTMLBaseFontElementImpl.java
deleted file mode 100755
index 0c1d5c9..0000000
--- a/src/org/apache/html/dom/HTMLBaseFontElementImpl.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLBaseFontElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLBaseFontElementImpl
-    extends HTMLElementImpl
-    implements HTMLBaseFontElement
-{
-    
-    
-    public String getColor()
-    {
-        return capitalize( getAttribute( "color" ) );
-    }
-    
-    
-    public void setColor( String color )
-    {
-        setAttribute( "color", color );
-    }
-    
-    
-    public String getFace()
-    {
-        return capitalize( getAttribute( "face" ) );
-    }
-    
-    
-    public void setFace( String face )
-    {
-        setAttribute( "face", face );
-    }
-    
-    
-    public String getSize()
-    {
-        return getAttribute( "size" );
-    }
-    
-    
-    public void setSize( String size )
-    {
-        setAttribute( "size", size );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLBaseFontElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLBodyElementImpl.java b/src/org/apache/html/dom/HTMLBodyElementImpl.java
deleted file mode 100755
index a3c1f6f..0000000
--- a/src/org/apache/html/dom/HTMLBodyElementImpl.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLBodyElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLBodyElementImpl
-    extends HTMLElementImpl
-    implements HTMLBodyElement
-{
-    
-    public String getALink()
-    {
-        return getAttribute( "alink" );
-    }
-
-    
-    public void setALink(String aLink)
-    {
-        setAttribute( "alink", aLink );
-    }
-    
-  
-    public String getBackground()
-    {
-        return getAttribute( "background" );
-    }
-    
-  
-    public void setBackground( String background )
-    {
-        setAttribute( "background", background );
-    }
-    
-  
-    public String getBgColor()
-    {
-        return getAttribute( "bgcolor" );
-    }
-    
-    
-    public void setBgColor(String bgColor)
-    {
-        setAttribute( "bgcolor", bgColor );
-    }
-    
-  
-    public String getLink()
-    {
-        return getAttribute( "link" );
-    }
-  
-    
-    public void setLink(String link)
-    {
-        setAttribute( "link", link );
-    }
-    
-  
-    public String getText()
-    {
-        return getAttribute( "text" );
-    }
-    
-  
-    public void setText(String text)
-    {
-        setAttribute( "text", text );
-    }
-    
-  
-    public String getVLink()
-    {
-        return getAttribute( "vlink" );
-    }
-  
-    
-    public void  setVLink(String vLink)
-    {
-        setAttribute( "vlink", vLink );
-    }
-  
-    
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLBodyElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLBuilder.java b/src/org/apache/html/dom/HTMLBuilder.java
deleted file mode 100755
index 6985758..0000000
--- a/src/org/apache/html/dom/HTMLBuilder.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import java.util.Vector;
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-import org.xml.sax.*;
-import org.apache.xerces.dom.TextImpl;
-import org.apache.xerces.dom.ElementImpl;
-import org.apache.xerces.dom.ProcessingInstructionImpl;
-
-
-/**
- * This is a SAX document handler that is used to build an HTML document.
- * It can build a document from any SAX parser, but is specifically tuned
- * for working with the OpenXML HTML parser.
- * 
- * 
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@openxml.org">Assaf Arkin</a>
- */
-public class HTMLBuilder
-    implements DocumentHandler
-{
-
-
-    /**
-     * The document that is being built.
-     */
-    protected HTMLDocumentImpl    _document;
-    
-    
-    /**
-     * The current node in the document into which elements, text and
-     * other nodes will be inserted. This starts as the document iself
-     * and reflects each element that is currently being parsed.
-     */
-    protected ElementImpl        _current;
-    
-    /**
-     * A reference to the current locator, this is generally the parser
-     * itself. The locator is used to locate errors and identify the
-     * source locations of elements.
-     */
-    private Locator         _locator;
-
-
-    /**
-     * Applies only to whitespace appearing between element tags in element content,
-     * as per the SAX definition, and true by default.
-     */
-    private boolean         _ignoreWhitespace = true;
-
-
-    /**
-     * Indicates whether finished building a document. If so, can start building
-     * another document. Must be initially true to get the first document processed.
-     */
-    private boolean         _done = true;
-
-
-    /**    
-     * The document is only created the same time as the document element, however, certain
-     * nodes may precede the document element (comment and PI), and they are accumulated
-     * in this vector.
-     */
-    protected Vector         _preRootNodes;
-
-    
-    public void startDocument()
-        throws SAXException
-    {
-        if ( ! _done )
-	    throw new SAXException( "HTM001 State error: startDocument fired twice on one builder." );
-	_document = null;
-	_done = false;
-    }
-
-
-    public void endDocument()
-        throws SAXException
-    {
-        if ( _document == null )
-            throw new SAXException( "HTM002 State error: document never started or missing document element." );
-	if ( _current != null )
-	    throw new SAXException( "HTM003 State error: document ended before end of document element." );
-        _current = null;
-	_done = true;
-    }
-
-
-    public synchronized void startElement( String tagName, AttributeList attrList )
-        throws SAXException
-    {
-        ElementImpl elem;
-        int         i;
-        
-	if ( tagName == null )
-	    throw new SAXException( "HTM004 Argument 'tagName' is null." );
-
-	// If this is the root element, this is the time to create a new document,
-	// because only know we know the document element name and namespace URI.
-	if ( _document == null )
-	{
-	    // No need to create the element explicitly.
-	    _document = new HTMLDocumentImpl();
-	    elem = (ElementImpl) _document.getDocumentElement();
-	    _current = elem;
-	    if ( _current == null )
-		throw new SAXException( "HTM005 State error: Document.getDocumentElement returns null." );
-
-	    // Insert nodes (comment and PI) that appear before the root element.
-	    if ( _preRootNodes != null )
-	    {
-		for ( i = _preRootNodes.size() ; i-- > 0 ; )
-		    _document.insertBefore( (Node) _preRootNodes.elementAt( i ), elem );
-		_preRootNodes = null;
-	    }
-	     
-	}
-	else
-	{
-	    // This is a state error, indicates that document has been parsed in full,
-	    // or that there are two root elements.
-	    if ( _current == null )
-		throw new SAXException( "HTM006 State error: startElement called after end of document element." );
-	    elem = (ElementImpl) _document.createElement( tagName );
-	    _current.appendChild( elem );
-	    _current = elem;
-	}
-
-	// Add the attributes (specified and not-specified) to this element.
-        if ( attrList != null )
-        {
-            for ( i = 0 ; i < attrList.getLength() ; ++ i )
-                elem.setAttribute( attrList.getName( i ), attrList.getValue( i ) );
-        }
-    }
-
-    
-    public void endElement( String tagName )
-        throws SAXException
-    {
-
-        if ( _current == null )
-            throw new SAXException( "HTM007 State error: endElement called with no current node." );
-	if ( ! _current.getNodeName().equals( tagName ) )
-	    throw new SAXException( "HTM008 State error: mismatch in closing tag name " + tagName + "\n" + tagName);
-
-	// Move up to the parent element. When you reach the top (closing the root element).
-	// the parent is document and current is null.
-	if ( _current.getParentNode() == _current.getOwnerDocument() )
-	    _current = null;
-	else
-	    _current = (ElementImpl) _current.getParentNode();
-    }
-
-
-    public void characters( String text )
-        throws SAXException
-    {
-	if ( _current == null )
-            throw new SAXException( "HTM009 State error: character data found outside of root element." );
-	_current.appendChild( new TextImpl( _document, text ) );
-    }
-
-    
-    public void characters( char[] text, int start, int length )
-        throws SAXException
-    {
-	if ( _current == null )
-            throw new SAXException( "HTM010 State error: character data found outside of root element." );
-	_current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
-    }
-    
-    
-    public void ignorableWhitespace( char[] text, int start, int length )
-        throws SAXException
-    {
-        Node    node;
-        
-        if ( ! _ignoreWhitespace )
-	    _current.appendChild( new TextImpl( _document, new String( text, start, length ) ) );
-     }
-    
-    
-    public void processingInstruction( String target, String instruction )
-        throws SAXException
-    {
-        Node    node;
-        
-	// Processing instruction may appear before the document element (in fact, before the
-	// document has been created, or after the document element has been closed.
-        if ( _current == null && _document == null )
-	{
-	    if ( _preRootNodes == null )
-		_preRootNodes = new Vector();
-	    _preRootNodes.addElement( new ProcessingInstructionImpl( null, target, instruction ) );
-	}
-	else
-        if ( _current == null && _document != null )
-	    _document.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
-	else
-	    _current.appendChild( new ProcessingInstructionImpl( _document, target, instruction ) );
-    }
-    
-    
-    public HTMLDocument getHTMLDocument()
-    {
-        return (HTMLDocument) _document;
-    }
-
-    
-    public void setDocumentLocator( Locator locator )
-    {
-        _locator = locator;
-    }
-
-
-}
diff --git a/src/org/apache/html/dom/HTMLButtonElementImpl.java b/src/org/apache/html/dom/HTMLButtonElementImpl.java
deleted file mode 100755
index 668620b..0000000
--- a/src/org/apache/html/dom/HTMLButtonElementImpl.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLButtonElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLButtonElementImpl
-    extends HTMLElementImpl
-    implements HTMLButtonElement, HTMLFormControl
-{
-
-    
-      public String getAccessKey()
-    {
-        String    accessKey;
-        
-        // Make sure that the access key is a single character.
-        accessKey = getAttribute( "accesskey" );
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        return accessKey;
-    }
-    
-    
-    public void setAccessKey( String accessKey )
-    {
-        // Make sure that the access key is a single character.
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        setAttribute( "accesskey", accessKey );
-    }
-
-    
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-
-
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public int getTabIndex()
-    {
-        try
-        {
-            return Integer.parseInt( getAttribute( "tabindex" ) );
-        }
-        catch ( NumberFormatException except )
-        {
-            return 0;
-        }
-    }
-    
-    
-    public void setTabIndex( int tabIndex )
-    {
-        setAttribute( "tabindex", String.valueOf( tabIndex ) );
-    }
-
-    
-    public String getType()
-    {
-        return capitalize( getAttribute( "type" ) );
-    }
-
-    
-      public String getValue()
-    {
-        return getAttribute( "value" );
-    }
-    
-    
-    public void setValue( String value )
-    {
-        setAttribute( "value", value );
-    }
-    
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLButtonElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-  
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLCollectionImpl.java b/src/org/apache/html/dom/HTMLCollectionImpl.java
deleted file mode 100755
index f545722..0000000
--- a/src/org/apache/html/dom/HTMLCollectionImpl.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * Implements {@link org.w3c.dom.html.HTMLCollection} to traverse any named
- * elements on a {@link org.w3c.dom.html.HTMLDocument}. The elements type to
- * look for is identified in the constructor by code. This collection is not
- * optimized for traversing large trees.
- * <p>
- * The collection has to meet two requirements: it has to be live, and it has
- * to traverse depth first and always return results in that order. As such,
- * using an object container (such as {@link java.util.Vector}) is expensive on
- * insert/remove operations. Instead, the collection has been implemented using
- * three traversing functions. As a result, operations on large documents will
- * result in traversal of the entire document tree and consume a considerable
- * amount of time.
- * <p>
- * Note that synchronization on the traversed document cannot be achieved.
- * The document itself cannot be locked, and locking each traversed node is
- * likely to lead to a dead lock condition. Therefore, there is a chance of the
- * document being changed as results are fetched; in all likelihood, the results
- * might be out dated, but not erroneous.
- * 
- * 
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLCollection
- */
-class HTMLCollectionImpl
-    implements HTMLCollection
-{
-    
-
-    /**
-     * Request collection of all anchors in document: &lt;A&gt; elements that
-     * have a <code>name</code> attribute.
-     */
-    static final short        ANCHOR = 1;
-    
-    
-    /**
-     * Request collection of all forms in document: &lt;FORM&gt; elements.
-     */
-    static final short        FORM = 2;
-    
-    
-    /**
-     * Request collection of all images in document: &lt;IMAGE&gt; elements.
-     */
-    static final short        IMAGE = 3;
-    
-    
-    /**
-     * Request collection of all Applets in document: &lt;APPLET&gt; and
-     * &lt;OBJECT&gt; elements (&lt;OBJECT&gt; must contain an Applet).
-     */
-    static final short        APPLET = 4;
-    
-    
-    /**
-     * Request collection of all links in document: &lt;A&gt; and &lt;AREA&gt;
-     * elements (must have a <code>href</code> attribute).
-     */
-    static final short        LINK = 5;
-    
-    
-    /**
-     * Request collection of all options in selection: &lt;OPTION&gt; elments in
-     * &lt;SELECT&gt; or &lt;OPTGROUP&gt;.
-     */
-    static final short        OPTION = 6;
-    
-    
-    /**
-     * Request collection of all rows in table: &lt;TR&gt; elements in table or
-     * table section.
-     */
-    static final short        ROW = 7;
-
-    
-    /**
-     * Request collection of all form elements: &lt;INPUT&gt;, &lt;BUTTON&gt;,
-     * &lt;SELECT&gt;, &lt;TEXT&gt; and &lt;TEXTAREA&gt; elements inside form
-     * &lt;FORM&gt;.
-     */
-    static final short        ELEMENT = 8;
-    
-    
-    /**
-     * Request collection of all areas in map: &lt;AREA&gt; element in &lt;MAP&gt;
-     * (non recursive).
-     */
-    static final short        AREA = -1;
-    
-
-    /**
-     * Request collection of all table bodies in table: &lt;TBODY&gt; element in
-     * table &lt;TABLE&gt; (non recursive).
-     */
-    static final short        TBODY = -2;
-
-    
-    /**
-     * Request collection of all cells in row: &lt;TD&gt; elements in &lt;TR&gt;
-     * (non recursive).
-     */
-    static final short        CELL = -3;
-
-    
-    /**
-     * Indicates what this collection is looking for. Holds one of the enumerated
-     * values and used by {@link #collectionMatch}. Set by the constructor and
-     * determine the collection's use for its life time.
-     */
-    private short            _lookingFor;
-    
-    
-    /**
-     * This is the top level element underneath which the collection exists.
-     */
-    private Element            _topLevel;
-
-
-    /**
-     * Construct a new collection that retrieves element of the specific type
-     * (<code>lookingFor</code>) from the specific document portion
-     * (<code>topLevel</code>).
-     * 
-     * @param topLevel The element underneath which the collection exists
-     * @param lookingFor Code indicating what elements to look for
-     */
-    HTMLCollectionImpl( HTMLElement topLevel, short lookingFor )
-    {
-        if ( topLevel == null )
-            throw new NullPointerException( "HTM011 Argument 'topLevel' is null." );
-        _topLevel = topLevel;
-       _lookingFor = lookingFor;
-    }
-  
-  
-    /**
-     * Returns the length of the collection. This method might traverse the
-     * entire document tree.
-     * 
-     * @return Length of the collection
-     */
-    public final int getLength()
-    {
-        // Call recursive function on top-level element.
-        return getLength( _topLevel );
-    }
-
-
-    /**
-     * Retrieves the indexed node from the collection. Nodes are numbered in
-     * tree order - depth-first traversal order. This method might traverse
-     * the entire document tree.
-     * 
-     * @param index The index of the node to return
-     * @return The specified node or null if no such node found
-     */
-    public final Node item( int index )
-    {
-        if ( index < 0 )
-            throw new IllegalArgumentException( "HTM012 Argument 'index' is negative." );
-        // Call recursive function on top-level element.
-        return item( _topLevel, new CollectionIndex( index ) );
-    }
-    
-    
-    /**
-     * Retrieves the named node from the collection. The name is matched case
-     * sensitive against the <TT>id</TT> attribute of each element in the
-     * collection, returning the first match. The tree is traversed in
-     * depth-first order. This method might traverse the entire document tree.
-     * 
-     * @param name The name of the node to return
-     * @return The specified node or null if no such node found
-     */
-    public final Node namedItem( String name )
-    {
-        if ( name == null )
-            throw new NullPointerException( "HTM013 Argument 'name' is null." );
-        // Call recursive function on top-level element.
-        return namedItem( _topLevel, name );
-    }
-    
-    
-    /**
-     * Recursive function returns the number of elements of a particular type
-     * that exist under the top level element. This is a recursive function
-     * and the top level element is passed along.
-     * 
-     * @param topLevel Top level element from which to scan
-     * @return Number of elements
-     */
-    private int getLength( Element topLevel )
-    {
-        int        length;
-        Node    node;
-    
-        synchronized ( topLevel )
-        {
-            // Always count from zero and traverse all the childs of the
-            // current element in the order they appear.
-            length = 0;
-            node = topLevel.getFirstChild();
-            while ( node != null )
-            {
-                // If a particular node is an element (could be HTML or XML),
-		// do two things: if it's the one we're looking for, count
-		// another matched element; at any rate, traverse it's
-		// children as well.
-                if ( node instanceof Element )
-                {
-                    if ( collectionMatch( (Element) node, null ) )
-                        ++ length;
-                    else if ( recurse() )
-                        length += getLength( (Element) node );
-                }
-                node = node.getNextSibling(); 
-            }
-        }
-        return length;
-    }
-    
-        
-    /**
-     * Recursive function returns the numbered element of a particular type
-     * that exist under the top level element. This is a recursive function
-     * and the top level element is passed along.
-     * <p>
-     * Note that this function must call itself with an index and get back both
-     * the element (if one was found) and the new index which is decremeneted
-     * for any like element found. Since integers are only passed by value,
-     * this function makes use of a separate class ({@link CollectionIndex})
-     * to hold that index.
-     * 
-     * @param topLevel Top level element from which to scan
-     * @param index The index of the item to retreive
-     * @return Number of elements
-     * @see CollectionIndex
-     */
-    private Node item( Element topLevel, CollectionIndex index )
-    {
-        Node    node;
-        Node    result;
-
-        synchronized ( topLevel )
-        {
-            // Traverse all the childs of the current element in the order
-	    // they appear. Count from the index backwards until you reach
-	    // matching element with an index of zero. Return that element.
-            node = topLevel.getFirstChild();
-            while ( node != null )
-            {
-                // If a particular node is an element (could be HTML or XML),
-		// do two things: if it's the one we're looking for, decrease
-		// the index and if zero, return this node; at any rate,
-		// traverse it's children as well.
-                if ( node instanceof Element )
-                {
-                    if ( collectionMatch( (Element) node, null ) )
-                    {
-                        if ( index.isZero() )
-                            return node;
-                        index.decrement();
-                    } else if ( recurse() )
-                    {
-                        result = item( (Element) node, index );
-                        if ( result != null )
-                            return result;
-                    }
-                }
-                node = node.getNextSibling(); 
-            }
-        }
-        return null;
-    }
-    
-    
-    /**
-     * Recursive function returns an element of a particular type with the
-     * specified name (<TT>id</TT> attribute).
-     * 
-     * @param topLevel Top level element from which to scan
-     * @param name The named element to look for
-     * @return The first named element found
-     */
-    private  Node namedItem( Element topLevel, String name )
-    {
-        Node    node;
-        Node    result;
-
-        synchronized ( topLevel )
-        {
-            // Traverse all the childs of the current element in the order
-	    // they appear.
-            node = topLevel.getFirstChild();
-            while ( node != null )
-            {
-                // If a particular node is an element (could be HTML or XML),
-                // do two things: if it's the one we're looking for, and the
-		// name (id attribute) attribute is the one we're looking for,
-		// return this element; otherwise, traverse it's children.
-                if ( node instanceof Element )
-                {
-                    if ( collectionMatch( (Element) node, name ) )
-                        return node;
-                    else if ( recurse() )
-                    {
-                        result = namedItem( (Element) node, name );
-                        if ( result != null )
-                            return result;
-                    }
-                }
-                node = node.getNextSibling(); 
-            }
-            return node;
-        }
-    }
-    
-    
-    /**
-     * Returns true if scanning methods should iterate through the collection.
-     * When looking for elements in the document, recursing is needed to traverse
-     * the full document tree. When looking inside a specific element (e.g. for a
-     * cell inside a row), recursing can lead to erroneous results.
-     * 
-     * @return True if methods should recurse to traverse entire tree
-     */
-    protected boolean recurse()
-    {
-        return _lookingFor > 0;
-    }
-    
-
-    /**
-     * Determines if current element matches based on what we're looking for.
-     * The element is passed along with an optional identifier name. If the
-     * element is the one we're looking for, return true. If the name is also
-     * specified, the name must match the <code>id</code> attribute
-     * (match <code>name</code> first for anchors).
-     * 
-     * @param elem The current element
-     * @param name The identifier name or null
-     * @return The element matches what we're looking for
-     */
-    protected boolean collectionMatch( Element elem, String name )
-    {
-        boolean    match;
-        
-        synchronized ( elem )
-        {
-            // Begin with no matching. Depending on what we're looking for,
-            // attempt to match based on the element type. This is the quickest
-            // way to match involving only a cast. Do the expensive string
-            // comparison later on.
-            match = false;
-            switch ( _lookingFor )
-            {
-            case ANCHOR:
-                // Anchor is an <A> element with a 'name' attribute. Otherwise, it's
-                // just a link.
-                match = ( elem instanceof HTMLAnchorElement ) &&
-                        elem.getAttribute( "name" ).length() > 0;
-                break;
-            case FORM:
-                // Any <FORM> element.
-                match = ( elem instanceof HTMLFormElement );
-                break;
-            case IMAGE:
-                // Any <IMG> element. <OBJECT> elements with images are not returned.
-                match = ( elem instanceof HTMLImageElement );
-                break;
-            case APPLET:
-                // Any <APPLET> element, and any <OBJECT> element which represents an
-                // Applet. This is determined by 'codetype' attribute being
-                // 'application/java' or 'classid' attribute starting with 'java:'.
-                match = ( elem instanceof HTMLAppletElement ) ||
-                        ( elem instanceof HTMLObjectElement &&
-                          ( "application/java".equals( elem.getAttribute( "codetype" ) ) ||
-                            elem.getAttribute( "classid" ).startsWith( "java:" ) ) );
-                break;
-            case ELEMENT:
-                // All form elements implement HTMLFormControl for easy identification.
-                match = ( elem instanceof HTMLFormControl );
-                break;
-            case LINK:
-                // Any <A> element, and any <AREA> elements with an 'href' attribute.
-                match = ( ( elem instanceof HTMLAnchorElement ||
-                            elem instanceof HTMLAreaElement ) &&
-                          elem.getAttribute( "href" ).length() > 0 );
-                break;
-            case AREA:
-                // Any <AREA> element.
-                match = ( elem instanceof HTMLAreaElement );
-                break;
-            case OPTION:
-                // Any <OPTION> element.
-                match = ( elem instanceof HTMLOptionElement );
-                break;
-            case ROW:
-                // Any <TR> element.
-                match = ( elem instanceof HTMLTableRowElement );
-                break;
-            case TBODY:
-                // Any <TBODY> element (one of three table section types).
-                match = ( elem instanceof HTMLTableSectionElement &&
-                          elem.getTagName().equals( "tbody" ) );
-                break;
-            case CELL:
-                // Any <TD> element.
-                match = ( elem instanceof HTMLTableCellElement );
-                break;
-            }
-        
-            // If element type was matched and a name was specified, must also match
-            // the name against either the 'id' or the 'name' attribute. The 'name'
-            // attribute is relevant only for <A> elements for backward compatibility.
-            if ( match && name != null )
-            {
-                // If an anchor and 'name' attribute matches, return true. Otherwise,
-                // try 'id' attribute.
-                if ( elem instanceof HTMLAnchorElement &&
-                     name.equals( elem.getAttribute( "name" ) ) )
-                    return true;
-                match = name.equals( elem.getAttribute( "id" ) );
-            }
-        }
-        return match;
-    }
-
-    
-}
-
-
-/**
- * {@link CollectionImpl#item} must traverse down the tree and decrement the
- * index until it matches an element who's index is zero. Since integers are
- * passed by value, this class servers to pass the index into each recursion
- * by reference. It encompasses all the operations that need be performed on
- * the index, although direct access is possible.
- * 
- * @see CollectionImpl#item
- */
-class CollectionIndex
-{
-    
-    
-    /**
-     * Returns the current index.
-     * 
-     * @return Current index
-     */
-    int getIndex()
-    {
-        return _index;
-    }
-    
-    
-    /**
-     * Decrements the index by one.
-     */
-    void decrement()
-    {
-        -- _index;
-    }
-    
-    
-    /**
-     * Returns true if index is zero (or negative).
-     * 
-     * @return True if index is zero
-     */
-    boolean isZero()
-    {
-        return _index <= 0;
-    }
-    
-    
-    /**
-     * Constructs a new index with the specified initial value. The index will
-     * then be decremeneted until it reaches zero.
-     * 
-     * @param index The initial value
-     */
-    CollectionIndex( int index )
-    {
-        _index = index;
-    }
-    
-    
-    /**
-     * Holds the actual value that is passed by reference using this class.
-     */
-    private int        _index;
-    
-
-}
diff --git a/src/org/apache/html/dom/HTMLDListElementImpl.java b/src/org/apache/html/dom/HTMLDListElementImpl.java
deleted file mode 100755
index 9bde59c..0000000
--- a/src/org/apache/html/dom/HTMLDListElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLDListElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLDListElementImpl
-    extends HTMLElementImpl
-    implements HTMLDListElement
-{
-    
-    
-    public boolean getCompact()
-    {
-        return getBinary( "compact" );
-    }
-    
-    
-    public void setCompact( boolean compact )
-    {
-        setAttribute( "compact", compact );
-    }
-  
-    
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLDListElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-    
-}
-
diff --git a/src/org/apache/html/dom/HTMLDOMImplementationImpl.java b/src/org/apache/html/dom/HTMLDOMImplementationImpl.java
deleted file mode 100644
index 35183e1..0000000
--- a/src/org/apache/html/dom/HTMLDOMImplementationImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-    
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.html.*;
-import org.apache.xerces.dom.DOMImplementationImpl;
-
-
-/**
- * Provides number of methods for performing operations that are independent
- * of any particular instance of the document object model. This class is
- * unconstructable, the only way to obtain an instance of a DOM implementation
- * is by calling the static method {@link #getDOMImplementation}.
- * 
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.DOMImplementation
- */
-public class HTMLDOMImplementationImpl
-    extends DOMImplementationImpl
-    implements HTMLDOMImplementation
-{
-
-
-    /**
-     * Holds a reference to the single instance of the DOM implementation.
-     * Only one instance is required since this class is multiple entry.
-     */
-    private static HTMLDOMImplementation _instance = new HTMLDOMImplementationImpl();
-
-
-    /**
-     * Private constructor assures that an object of this class cannot
-     * be created. The only way to obtain an object is by calling {@link
-     * #getDOMImplementation}.
-     */
-    private HTMLDOMImplementationImpl()
-    {
-    }
-
-
-    /**
-     * Create a new HTML document of the specified <TT>TITLE</TT> text.
-     *
-     * @param title The document title text
-     * @return New HTML document
-     */
-    public final HTMLDocument createHTMLDocument( String title )
-        throws DOMException
-    {
-	HTMLDocument doc;
-
-	if ( title == null )
-	    throw new NullPointerException( "HTM014 Argument 'title' is null." );
-	doc = new HTMLDocumentImpl();
-	doc.setTitle( title );
-	return doc;
-    }
-
-
-    /**
-     * Returns an instance of a {@link HTMLDOMImplementation} that can be
-     * used to perform operations that are not specific to a particular
-     * document instance, e.g. to create a new document.
-     *
-     * @return Reference to a valid DOM implementation
-     */
-    public static HTMLDOMImplementation getHTMLDOMImplementation()
-    {
-	return _instance;
-    }
-
-
-}
diff --git a/src/org/apache/html/dom/HTMLDirectoryElementImpl.java b/src/org/apache/html/dom/HTMLDirectoryElementImpl.java
deleted file mode 100755
index 0a42581..0000000
--- a/src/org/apache/html/dom/HTMLDirectoryElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLDirectoryElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLDirectoryElementImpl
-    extends HTMLElementImpl
-    implements HTMLDirectoryElement
-{
-    
-    
-    public boolean getCompact()
-    {
-        return getBinary( "compact" );
-    }
-    
-    
-    public void setCompact( boolean compact )
-    {
-        setAttribute( "compact", compact );
-    }
-  
-
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLDirectoryElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLDivElementImpl.java b/src/org/apache/html/dom/HTMLDivElementImpl.java
deleted file mode 100755
index 50821f5..0000000
--- a/src/org/apache/html/dom/HTMLDivElementImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLDivElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLDivElementImpl
-    extends HTMLElementImpl
-    implements HTMLDivElement
-{
-    
-    
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLDivElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-    
-}
diff --git a/src/org/apache/html/dom/HTMLDocumentImpl.java b/src/org/apache/html/dom/HTMLDocumentImpl.java
deleted file mode 100755
index 10d17b1..0000000
--- a/src/org/apache/html/dom/HTMLDocumentImpl.java
+++ /dev/null
@@ -1,767 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import java.io.*;
-import java.util.*;
-import java.lang.reflect.*;
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.dom.NodeImpl;
-import org.apache.xerces.dom.AttrImpl;
-import org.w3c.dom.DOMException;
-
-
-/**
- * Implements an HTML document. Provides access to the top level element in the
- * document, its body and title.
- * <P>
- * Several methods create new nodes of all basic types (comment, text, element,
- * etc.). These methods create new nodes but do not place them in the document
- * tree. The nodes may be placed in the document tree using {@link
- * org.w3c.dom.Node#appendChild} or {@link org.w3c.dom.Node#insertBefore}, or
- * they may be placed in some other document tree.
- * <P>
- * Note: &lt;FRAMESET&gt; documents are not supported at the moment, neither
- * are direct document writing ({@link #open}, {@link #write}) and HTTP attribute
- * methods ({@link #getURL}, {@link #getCookie}).
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLDocument
- */
-public class HTMLDocumentImpl
-    extends DocumentImpl
-    implements HTMLDocument
-{
-
-
-    /**
-     * Holds {@link HTMLCollectionImpl} object with live collection of all
-     * anchors in document. This reference is on demand only once.
-     */
-    private HTMLCollectionImpl    _anchors;
-
-
-    /**
-     * Holds {@link HTMLCollectionImpl} object with live collection of all
-     * forms in document. This reference is on demand only once.
-     */
-    private HTMLCollectionImpl    _forms;
-
-
-    /**
-     * Holds {@link HTMLCollectionImpl} object with live collection of all
-     * images in document. This reference is on demand only once.
-     */
-    private HTMLCollectionImpl    _images;
-
-
-    /**
-     * Holds {@link HTMLCollectionImpl} object with live collection of all
-     * links in document. This reference is on demand only once.
-     */
-    private HTMLCollectionImpl    _links;
-
-
-    /**
-     * Holds {@link HTMLCollectionImpl} object with live collection of all
-     * applets in document. This reference is on demand only once.
-     */
-    private HTMLCollectionImpl    _applets;
-
-
-    /**
-     * Holds string writer used by direct manipulation operation ({@link #open}.
-     * {@link #write}, etc) to write new contents into the document and parse
-     * that text into a document tree.
-     */
-    private StringWriter        _writer;
-
-
-    /**
-     * Holds names and classes of HTML element types. When an element with a
-     * particular tag name is created, the matching {@link java.lang.Class}
-     * is used to create the element object. For example, &lt;A&gt; matches
-     * {@link HTMLAnchorElementImpl}. This static table is shared across all
-     * HTML documents.
-     *
-     * @see #createElement
-     */
-    private static Hashtable        _elementTypesHTML;
-
-
-    /**
-     * Signature used to locate constructor of HTML element classes. This
-     * static array is shared across all HTML documents.
-     *
-     * @see #createElement
-     */
-    private static final Class[]    _elemClassSigHTML =
-                new Class[] { HTMLDocumentImpl.class, String.class };
-
-
-    /**
-     */
-    public HTMLDocumentImpl()
-    {
-        super();
-        populateElementTypes();
-    }
-
-
-    public synchronized Element getDocumentElement()
-    {
-        Node    html;
-        Node    child;
-        Node    next;
-
-        // The document element is the top-level HTML element of the HTML
-        // document. Only this element should exist at the top level.
-        // If the HTML element is found, all other elements that might
-        // precede it are placed inside the HTML element.
-        html = getFirstChild();
-        while ( html != null )
-        {
-            if ( html instanceof HTMLHtmlElement )
-            {
-                synchronized ( html )
-                {
-                    child = getFirstChild();
-                    while ( child != null && child != html )
-                    {
-                        next = child.getNextSibling();
-                        html.appendChild( child );
-                        child = next;
-                    }
-                }
-                return (HTMLElement) html;
-            }
-            html = html.getNextSibling();
-        }
-
-        // HTML element must exist. Create a new element and dump the
-        // entire contents of the document into it in the same order as
-        // they appear now.
-        html = new HTMLHtmlElementImpl( this, "HTML" );
-        child = getFirstChild();
-        while ( child != null )
-        {
-            next = child.getNextSibling();
-            html.appendChild( child );
-            child = next;
-        }
-        appendChild( html );
-        return (HTMLElement) html;
-    }
-
-
-    /**
-     * Obtains the &lt;HEAD&gt; element in the document, creating one if does
-     * not exist before. The &lt;HEAD&gt; element is the first element in the
-     * &lt;HTML&gt; in the document. The &lt;HTML&gt; element is obtained by
-     * calling {@link #getDocumentElement}. If the element does not exist, one
-     * is created.
-     * <P>
-     * Called by {@link #getTitle}, {@link #setTitle}, {@link #getBody} and
-     * {@link #setBody} to assure the document has the &lt;HEAD&gt; element
-     * correctly placed.
-     *
-     * @return The &lt;HEAD&gt; element
-     */
-    public synchronized HTMLElement getHead()
-    {
-        Node    head;
-        Node    html;
-        Node    child;
-        Node    next;
-
-        // Call getDocumentElement() to get the HTML element that is also the
-        // top-level element in the document. Get the first element in the
-        // document that is called HEAD. Work with that.
-        html = getDocumentElement();
-        synchronized ( html )
-        {
-            head = html.getFirstChild();
-            while ( head != null && ! ( head instanceof HTMLHeadElement ) )
-                head = head.getNextSibling();
-            // HEAD exists but might not be first element in HTML: make sure
-            // it is and return it.
-            if ( head != null )
-            {
-                synchronized ( head )
-                {
-                    child = html.getFirstChild();
-                    while ( child != null && child != head )
-                    {
-                        next = child.getNextSibling();
-                        head.insertBefore( child, head.getFirstChild() );
-                        child = next;
-                    }
-                }
-                return (HTMLElement) head;
-            }
-
-            // Head does not exist, create a new one, place it at the top of the
-            // HTML element and return it.
-            head = new HTMLHeadElementImpl( this, "HEAD" );
-            html.insertBefore( head, html.getFirstChild() );
-        }
-        return (HTMLElement) head;
-    }
-
-
-    public synchronized String getTitle()
-    {
-        HTMLElement head;
-        NodeList    list;
-        Node        title;
-
-        // Get the HEAD element and look for the TITLE element within.
-        // When found, make sure the TITLE is a direct child of HEAD,
-        // and return the title's text (the Text node contained within).
-        head = getHead();
-        title = head.getElementsByTagName( "TITLE" ).item( 0 );
-        list = head.getElementsByTagName( "TITLE" );
-        if ( list.getLength() > 0 ) {
-            title = list.item( 0 );
-            return ( (HTMLTitleElement) title ).getText();
-        }
-        // No TITLE found, return an empty string.
-        return "";
-    }
-
-
-    public synchronized void setTitle( String newTitle )
-    {
-        HTMLElement head;
-        NodeList    list;
-        Node        title;
-
-        // Get the HEAD element and look for the TITLE element within.
-        // When found, make sure the TITLE is a direct child of HEAD,
-        // and set the title's text (the Text node contained within).
-        head = getHead();
-        list = head.getElementsByTagName( "TITLE" );
-        if ( list.getLength() > 0 ) {
-            title = list.item( 0 );
-            if ( title.getParentNode() != head )
-                head.appendChild( title );
-            ( (HTMLTitleElement) title ).setText( newTitle );
-        }
-        else
-        {
-            // No TITLE found, create a new element and place it at the end
-            // of the HEAD element.
-            title = new HTMLTitleElementImpl( this, "TITLE" );
-            ( (HTMLTitleElement) title ).setText( newTitle );
-            head.appendChild( title );
-        }
-    }
-
-
-    public synchronized HTMLElement getBody()
-    {
-        Node    html;
-        Node    head;
-        Node    body;
-        Node    child;
-        Node    next;
-
-        // Call getDocumentElement() to get the HTML element that is also the
-        // top-level element in the document. Get the first element in the
-        // document that is called BODY. Work with that.
-        html = getDocumentElement();
-        head = getHead();
-        synchronized ( html )
-        {
-            body = head.getNextSibling();
-            while ( body != null && ! ( body instanceof HTMLBodyElement )
-                    && ! ( body instanceof HTMLFrameSetElement ) )
-                body = body.getNextSibling();
-
-            // BODY/FRAMESET exists but might not be second element in HTML
-            // (after HEAD): make sure it is and return it.
-            if ( body != null )
-            {
-                synchronized ( body )
-                {
-                    child = head.getNextSibling();
-                    while ( child != null && child != body )
-                    {
-                        next = child.getNextSibling();
-                        body.insertBefore( child, body.getFirstChild() );
-                        child = next;
-                    }
-                }
-                return (HTMLElement) body;
-            }
-
-            // BODY does not exist, create a new one, place it in the HTML element
-            // right after the HEAD and return it.
-            body = new HTMLBodyElementImpl( this, "BODY" );
-            html.appendChild( body );
-        }
-        return (HTMLElement) body;
-    }
-
-
-    public synchronized void setBody( HTMLElement newBody )
-    {
-        Node    html;
-        Node    body;
-        Node    head;
-        Node    child;
-        NodeList list;
-
-        synchronized ( newBody )
-        {
-            // Call getDocumentElement() to get the HTML element that is also the
-            // top-level element in the document. Get the first element in the
-            // document that is called BODY. Work with that.
-            html = getDocumentElement();
-            head = getHead();
-            synchronized ( html )
-            {
-                list = this.getElementsByTagName( "BODY" );
-                if ( list.getLength() > 0 ) {
-                    // BODY exists but might not follow HEAD in HTML. If not,
-                    // make it so and replce it. Start with the HEAD and make
-                    // sure the BODY is the first element after the HEAD.
-                    body = list.item( 0 );
-                    synchronized ( body )
-                    {
-                        child = head;
-                        while ( child != null )
-                        {
-                            if ( child instanceof Element )
-                            {
-                                if ( child != body )
-                                    html.insertBefore( newBody, child );
-                                else
-                                    html.replaceChild( newBody, body );
-                                return;
-                            }
-                            child = child.getNextSibling();
-                        }
-                        html.appendChild( newBody );
-                    }
-                    return;
-                }
-                // BODY does not exist, place it in the HTML element
-                // right after the HEAD.
-                html.appendChild( newBody );
-            }
-        }
-    }
-
-
-    public synchronized Element getElementById( String elementId )
-    {
-        return getElementById( elementId, this );
-    }
-
-
-    public NodeList getElementsByName( String elementName )
-    {
-        return new NameNodeListImpl( this, elementName );
-    }
-
-
-    public final NodeList getElementsByTagName( String tagName )
-    {
-        return super.getElementsByTagName( tagName.toUpperCase() );
-    }
-
-
-    public final NodeList getElementsByTagNameNS( String namespaceURI,
-                                                  String localName )
-    {
-        if ( namespaceURI != null && namespaceURI.length() > 0 )
-            return super.getElementsByTagNameNS( namespaceURI, localName.toUpperCase() );
-        else
-            return super.getElementsByTagName( localName.toUpperCase() );
-    } 
-
-
-    public Element createElementNS( String namespaceURI, String qualifiedName )
-    {
-        if ( namespaceURI == null || namespaceURI.length() == 0 )
-            return createElement( qualifiedName );
-        else
-            return super.createElementNS( namespaceURI, qualifiedName );
-    }
-
-
-    public Element createElement( String tagName )
-        throws DOMException
-    {
-        Class        elemClass;
-        Constructor    cnst;
-
-        // First, make sure tag name is all upper case, next get the associated
-        // element class. If no class is found, generate a generic HTML element.
-        // Do so also if an unexpected exception occurs.
-        tagName = tagName.toUpperCase();
-        elemClass = (Class) _elementTypesHTML.get( tagName );
-        if ( elemClass != null )
-        {
-            // Get the constructor for the element. The signature specifies an
-            // owner document and a tag name. Use the constructor to instantiate
-            // a new object and return it.
-            try
-            {
-                cnst = elemClass.getConstructor( _elemClassSigHTML );
-                return (Element) cnst.newInstance( new Object[] { this, tagName } );
-            }
-            catch ( Exception except )
-            {
-                Throwable thrw;
-
-                if ( except instanceof java.lang.reflect.InvocationTargetException )
-                    thrw = ( (java.lang.reflect.InvocationTargetException) except ).getTargetException();
-                else
-                    thrw = except;
-//                System.out.println( "Exception " + thrw.getClass().getName() );
-//                System.out.println( thrw.getMessage() );
-
-                throw new IllegalStateException( "HTM15 Tag '" + tagName + "' associated with an Element class that failed to construct.\n" + tagName);
-            }
-        }
-        return new HTMLElementImpl( this, tagName );
-    }
-
-
-    /**
-     * Creates an Attribute having this Document as its OwnerDoc.
-     * Overrides {@link DocumentImpl#createAttribute} and returns
-     * and attribute whose name is lower case.
-     *
-     * @param name The name of the attribute
-     * @return An attribute whose name is all lower case
-     * @throws DOMException(INVALID_NAME_ERR) if the attribute name
-     *   is not acceptable
-     */
-    public Attr createAttribute( String name )
-        throws DOMException
-    {
-        return super.createAttribute( name.toLowerCase() );
-    }
-
-
-    public String getReferrer()
-    {
-        // Information not available on server side.
-        return null;
-    }
-
-
-    public String getDomain()
-    {
-        // Information not available on server side.
-        return null;
-    }
-
-
-    public String getURL()
-    {
-        // Information not available on server side.
-        return null;
-    }
-
-
-    public String getCookie()
-    {
-        // Information not available on server side.
-        return null;
-    }
-
-
-    public void setCookie( String cookie )
-    {
-        // Information not available on server side.
-    }
-
-
-    public HTMLCollection getImages()
-    {
-        // For more information see HTMLCollection#collectionMatch
-        if ( _images == null )
-            _images = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.IMAGE );
-        return _images;
-    }
-
-
-    public HTMLCollection getApplets()
-    {
-        // For more information see HTMLCollection#collectionMatch
-        if ( _applets == null )
-            _applets = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.APPLET );
-        return _applets;
-    }
-
-
-    public HTMLCollection getLinks()
-    {
-        // For more information see HTMLCollection#collectionMatch
-        if ( _links == null )
-            _links = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.LINK );
-        return _links;
-    }
-
-
-    public HTMLCollection getForms()
-    {
-        // For more information see HTMLCollection#collectionMatch
-        if ( _forms == null )
-            _forms = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.FORM );
-        return _forms;
-    }
-
-
-    public HTMLCollection getAnchors()
-    {
-        // For more information see HTMLCollection#collectionMatch
-        if ( _anchors == null )
-            _anchors = new HTMLCollectionImpl( getBody(), HTMLCollectionImpl.ANCHOR );
-        return _anchors;
-    }
-
-
-    public void open()
-    {
-        // When called an in-memory is prepared. The document tree is still
-        // accessible the old way, until this writer is closed.
-        if ( _writer == null )
-            _writer = new StringWriter();
-    }
-
-
-    public void close()
-    {
-        // ! NOT IMPLEMENTED, REQUIRES PARSER !
-        if ( _writer != null )
-        {
-            _writer = null;
-        }
-    }
-
-
-    public void write( String text )
-    {
-        // Write a string into the in-memory writer.
-        if ( _writer != null )
-            _writer.write( text );
-    }
-
-
-    public void writeln( String text )
-    {
-        // Write a line into the in-memory writer.
-        if ( _writer != null )
-            _writer.write( text + "\n" );
-    }
-
-
-    public Node cloneNode( boolean deep )
-    {
-        HTMLDocumentImpl    clone;
-        NodeImpl            node;
-        
-        clone = new HTMLDocumentImpl();
-        if ( deep ) {
-            node = (NodeImpl) getFirstChild();
-            while ( node != null ) {
-                clone.appendChild( clone.importNode( node, true ) );
-                node = (NodeImpl) node.getNextSibling();
-            }
-        }
-        return clone;
-    }
-
-
-    /**
-     * Recursive method retreives an element by its <code>id</code> attribute.
-     * Called by {@link #getElementById(String)}.
-     *
-     * @param elementId The <code>id</code> value to look for
-     * @return The node in which to look for
-     */
-    private Element getElementById( String elementId, Node node )
-    {
-        Node    child;
-        Element    result;
-
-        child = node.getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof Element )
-            {
-                if ( elementId.equals( ( (Element) child ).getAttribute( "id" ) ) )
-                    return (Element) child;
-                result = getElementById( elementId, child );
-                if ( result != null )
-                    return result;
-            }
-            child = child.getNextSibling();
-        }
-        return null;
-    }
-
-
-    /**
-     * Called by the constructor to populate the element types list (see {@link
-     * #_elementTypesHTML}). Will be called multiple times but populate the list
-     * only the first time. Replacement for static constructor.
-     */
-    private static void populateElementTypes()
-    {
-        // This class looks like it is due to some strange
-        // (read: inconsistent) JVM bugs.
-        // Initially all this code was placed in the static constructor,
-        // but that caused some early JVMs (1.1) to go mad, and if a
-        // class could not be found (as happened during development),
-        // the JVM would die.
-        // Bertrand Delacretaz <bdelacretaz@worldcom.ch> pointed out
-        // several configurations where HTMLAnchorElementImpl.class
-        // failed, forcing me to revert back to Class.forName().
-        
-        if ( _elementTypesHTML != null )
-            return;
-        _elementTypesHTML = new Hashtable( 63 );
-        populateElementType( "A", "HTMLAnchorElementImpl" );
-        populateElementType( "APPLET", "HTMLAppletElementImpl" );
-        populateElementType( "AREA", "HTMLAreaElementImpl" );
-        populateElementType( "BASE",  "HTMLBaseElementImpl" );
-        populateElementType( "BASEFONT", "HTMLBaseFontElementImpl" );
-        populateElementType( "BLOCKQUOTE", "HTMLQuoteElementImpl" );
-        populateElementType( "BODY", "HTMLBodyElementImpl" );
-        populateElementType( "BR", "HTMLBRElementImpl" );
-        populateElementType( "BUTTON", "HTMLButtonElementImpl" );
-        populateElementType( "DEL", "HTMLModElementImpl" );
-        populateElementType( "DIR", "HTMLDirectoryElementImpl" );
-        populateElementType( "DIV",  "HTMLDivElementImpl" );
-        populateElementType( "DL", "HTMLDListElementImpl" );
-        populateElementType( "FIELDSET", "HTMLFieldSetElementImpl" );
-        populateElementType( "FONT", "HTMLFontElementImpl" );
-        populateElementType( "FORM", "HTMLFormElementImpl" );
-        populateElementType( "FRAME","HTMLFrameElementImpl" );
-        populateElementType( "FRAMESET", "HTMLFrameSetElementImpl" );
-        populateElementType( "HEAD", "HTMLHeadElementImpl" );
-        populateElementType( "H1", "HTMLHeadingElementImpl" );
-        populateElementType( "H2", "HTMLHeadingElementImpl" );
-        populateElementType( "H3", "HTMLHeadingElementImpl" );
-        populateElementType( "H4", "HTMLHeadingElementImpl" );
-        populateElementType( "H5", "HTMLHeadingElementImpl" );
-        populateElementType( "H6", "HTMLHeadingElementImpl" );
-        populateElementType( "HR", "HTMLHRElementImpl" );
-        populateElementType( "HTML", "HTMLHtmlElementImpl" );
-        populateElementType( "IFRAME", "HTMLIFrameElementImpl" );
-        populateElementType( "IMG", "HTMLImageElementImpl" );
-        populateElementType( "INPUT", "HTMLInputElementImpl" );
-        populateElementType( "INS", "HTMLModElementImpl" );
-        populateElementType( "ISINDEX", "HTMLIsIndexElementImpl" );
-        populateElementType( "LABEL", "HTMLLabelElementImpl" );
-        populateElementType( "LEGEND", "HTMLLegendElementImpl" );
-        populateElementType( "LI", "HTMLLIElementImpl" );
-        populateElementType( "LINK", "HTMLLinkElementImpl" );
-        populateElementType( "MAP", "HTMLMapElementImpl" );
-        populateElementType( "MENU", "HTMLMenuElementImpl" );
-        populateElementType( "META", "HTMLMetaElementImpl" );
-        populateElementType( "OBJECT", "HTMLObjectElementImpl" );
-        populateElementType( "OL", "HTMLOListElementImpl" );
-        populateElementType( "OPTGROUP", "HTMLOptGroupElementImpl" );
-        populateElementType( "OPTION", "HTMLOptionElementImpl" );
-        populateElementType( "P", "HTMLParagraphElementImpl" );
-        populateElementType( "PARAM", "HTMLParamElementImpl" );
-        populateElementType( "PRE", "HTMLPreElementImpl" );
-        populateElementType( "Q", "HTMLQuoteElementImpl" );
-        populateElementType( "SCRIPT", "HTMLScriptElementImpl" );
-        populateElementType( "SELECT", "HTMLSelectElementImpl" );
-        populateElementType( "STYLE", "HTMLStyleElementImpl" );
-        populateElementType( "TABLE", "HTMLTableElementImpl" );
-        populateElementType( "CAPTION", "HTMLTableCaptionElementImpl" );
-        populateElementType( "TD", "HTMLTableCellElementImpl" );
-        populateElementType( "TH", "HTMLTableCellElementImpl" );
-        populateElementType( "COL", "HTMLTableColElementImpl" );
-        populateElementType( "COLGROUP", "HTMLTableColElementImpl" );
-        populateElementType( "TR", "HTMLTableRowElementImpl" );
-        populateElementType( "TBODY", "HTMLTableSectionElementImpl" );
-        populateElementType( "THEAD", "HTMLTableSectionElementImpl" );
-        populateElementType( "TFOOT", "HTMLTableSectionElementImpl" );
-        populateElementType( "TEXTAREA", "HTMLTextAreaElementImpl" );
-        populateElementType( "TITLE", "HTMLTitleElementImpl" );
-        populateElementType( "UL", "HTMLUListElementImpl" );
-    }
-    
-    
-    private static void populateElementType( String tagName, String className )
-    {
-        try {
-            _elementTypesHTML.put( tagName, Class.forName( "org.apache.html.dom." + className ) );
-        } catch ( ClassNotFoundException except ) {
-            new RuntimeException( "HTM019 OpenXML Error: Could not find class " + className + " implementing HTML element " + tagName
-                                  + "\n" + className + "\t" + tagName);
-        }
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLElementImpl.java b/src/org/apache/html/dom/HTMLElementImpl.java
deleted file mode 100755
index d347a15..0000000
--- a/src/org/apache/html/dom/HTMLElementImpl.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-import org.apache.xerces.dom.ElementImpl;
-
-
-/**
- * Implements an HTML-specific element, an {@link org.w3c.dom.Element} that
- * will only appear inside HTML documents. This element extends {@link
- * org.apache.xerces.dom.ElementImpl} by adding methods for directly
- * manipulating HTML-specific attributes. All HTML elements gain access to
- * the <code>id</code>, <code>title</code>, <code>lang</code>,
- * <code>dir</code> and <code>class</code> attributes. Other elements
- * add their own specific attributes.
- * 
- * 
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLElement
- */
-public class HTMLElementImpl
-    extends ElementImpl
-    implements HTMLElement
-{
-
-
-    /**
-     * Constructor required owner document and element tag name. Will be called
-     * by the constructor of specific element types but with a known tag name.
-     * Assures that the owner document is an HTML element.
-     * 
-     * @param owner The owner HTML document
-     * @param tagName The element's tag name
-     */
-    HTMLElementImpl( HTMLDocumentImpl owner, String tagName )
-    {
-        super( owner, tagName.toUpperCase() );
-    }
-    
-    
-    public String getId()
-    {
-        return getAttribute( "id" );
-    }
-    
-    
-    public void setId( String id )
-    {
-        setAttribute( "id", id );
-    }
-    
-    
-    public String getTitle()
-    {
-        return getAttribute( "title" );
-    }
-    
-    
-    public void setTitle( String title )
-    {
-        setAttribute( "title", title );
-    }
-    
-    
-    public String getLang()
-    {
-        return getAttribute( "lang" );
-    }
-    
-    
-    public void setLang( String lang )
-    {
-        setAttribute( "lang", lang );
-    }
-    
-    
-    public String getDir()
-    {
-        return getAttribute( "dir" );
-    }
-    
-    
-    public void setDir( String dir )
-    {
-        setAttribute( "dir", dir );
-    }
-
-    
-    public String getClassName()
-    {
-        return getAttribute( "class" );
-    }
-
-    
-    public void setClassName( String className )
-    {
-        setAttribute( "class", className );
-    }
-    
-    
-    /**
-     * Convenience method used to translate an attribute value into an integer
-     * value. Returns the integer value or zero if the attribute is not a
-     * valid numeric string.
-     * 
-     * @param value The value of the attribute
-     * @return The integer value, or zero if not a valid numeric string
-     */
-    int getInteger( String value )
-    {
-        try
-        {
-            return Integer.parseInt( value );
-        }
-        catch ( NumberFormatException except )
-        {
-            return 0;
-        }
-    }
-    
-    
-    /**
-     * Convenience method used to translate an attribute value into a boolean
-     * value. If the attribute has an associated value (even an empty string),
-     * it is set and true is returned. If the attribute does not exist, false
-     * is returend.
-     * 
-     * @param value The value of the attribute
-     * @return True or false depending on whether the attribute has been set
-     */
-    boolean getBinary( String name )
-    {
-        return ( getAttributeNode( name ) != null );
-    }
-    
-    
-    /**
-     * Convenience method used to set a boolean attribute. If the value is true,
-     * the attribute is set to an empty string. If the value is false, the attribute
-     * is removed. HTML 4.0 understands empty strings as set attributes.
-     * 
-     * @param name The name of the attribute
-     * @param value The value of the attribute
-     */
-    void setAttribute( String name, boolean value )
-    {
-        if ( value )
-            setAttribute( name, name );
-        else
-            removeAttribute( name );
-    }
-
-
-    public Attr getAttributeNode( String attrName )
-    {
-	return super.getAttributeNode( attrName.toLowerCase() );
-    }
-
-
-    public Attr getAttributeNodeNS( String namespaceURI,
-				    String localName )
-    {
-	if ( namespaceURI != null && namespaceURI.length() > 0 )
-	    return super.getAttributeNodeNS( namespaceURI, localName );
-	else
-	    return super.getAttributeNode( localName.toLowerCase() );
-    }
-    
-    
-    public String getAttribute( String attrName )
-    {
-	return super.getAttribute( attrName.toLowerCase() );
-    }
-
-
-    public String getAttributeNS( String namespaceURI,
-				  String localName )
-    {
-	if ( namespaceURI != null && namespaceURI.length() > 0 )
-	    return super.getAttributeNS( namespaceURI, localName );
-	else
-	    return super.getAttribute( localName.toLowerCase() );
-    }
-
-
-    public final NodeList getElementsByTagName( String tagName )
-    {
-	return super.getElementsByTagName( tagName.toUpperCase() );
-    }
-
-
-    public final NodeList getElementsByTagNameNS( String namespaceURI,
-					          String localName )
-    {
-	if ( namespaceURI != null && namespaceURI.length() > 0 )
-	    return super.getElementsByTagNameNS( namespaceURI, localName.toUpperCase() );
-	else
-	    return super.getElementsByTagName( localName.toUpperCase() );
-    } 
-
-
-    /**
-     * Convenience method used to capitalize a one-off attribute value before it
-     * is returned. For example, the align values "LEFT" and "left" will both
-     * return as "Left".
-     * 
-     * @param value The value of the attribute
-     * @return The capitalized value
-     */
-    String capitalize( String value )
-    {
-        char[]    chars;
-        int        i;
-        
-        // Convert string to charactares. Convert the first one to upper case,
-        // the other characters to lower case, and return the converted string.
-        chars = value.toCharArray();
-        if ( chars.length > 0 )
-        {
-            chars[ 0 ] = Character.toUpperCase( chars[ 0 ] );
-            for ( i = 1 ; i < chars.length ; ++i )
-                chars[ i ] = Character.toLowerCase( chars[ i ] );
-            return String.valueOf( chars );
-        }
-        return value;
-    }
-    
-
-    /**
-     * Convenience method used to capitalize a one-off attribute value before it
-     * is returned. For example, the align values "LEFT" and "left" will both
-     * return as "Left".
-     * 
-     * @param name The name of the attribute
-     * @return The capitalized value
-     */
-    String getCapitalized( String name )
-    {
-        String    value;
-        char[]    chars;
-        int        i;
-        
-        value = getAttribute( name );
-        if ( value != null )
-        {
-            // Convert string to charactares. Convert the first one to upper case,
-            // the other characters to lower case, and return the converted string.
-            chars = value.toCharArray();
-            if ( chars.length > 0 )
-            {
-                chars[ 0 ] = Character.toUpperCase( chars[ 0 ] );
-                for ( i = 1 ; i < chars.length ; ++i )
-                    chars[ i ] = Character.toLowerCase( chars[ i ] );
-                return String.valueOf( chars );
-            }
-        }
-        return value;
-    }
-
-    
-    /**
-     * Convenience method returns the form in which this form element is contained.
-     * This method is exposed for form elements through the DOM API, but other
-     * elements have no access to it through the API.
-     */
-    public HTMLFormElement getForm()
-    {
-        Node    parent;
-        
-        parent = getParentNode(); 
-        while ( parent != null )
-        {
-            if ( parent instanceof HTMLFormElement )
-                return (HTMLFormElement) parent;
-            parent = parent.getParentNode();
-        }
-        return null;
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLFieldSetElementImpl.java b/src/org/apache/html/dom/HTMLFieldSetElementImpl.java
deleted file mode 100755
index 86d7be0..0000000
--- a/src/org/apache/html/dom/HTMLFieldSetElementImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLFieldSetElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLFieldSetElementImpl
-    extends HTMLElementImpl
-    implements HTMLFieldSetElement, HTMLFormControl
-{
-
-
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLFieldSetElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-  
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLFontElementImpl.java b/src/org/apache/html/dom/HTMLFontElementImpl.java
deleted file mode 100755
index 91fced1..0000000
--- a/src/org/apache/html/dom/HTMLFontElementImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLFontElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLFontElementImpl
-    extends HTMLElementImpl
-    implements HTMLFontElement
-{
-
-    
-    public String getColor()
-    {
-        return capitalize( getAttribute( "color" ) );
-    }
-    
-    
-    public void setColor( String color )
-    {
-        setAttribute( "color", color );
-    }
-    
-    
-    public String getFace()
-    {
-        return capitalize( getAttribute( "face" ) );
-    }
-    
-    
-    public void setFace( String face )
-    {
-        setAttribute( "face", face );
-    }
-    
-    
-    public String getSize()
-    {
-        return getAttribute( "size" );
-    }
-    
-    
-    public void setSize( String size )
-    {
-        setAttribute( "size", size );
-    }
-
-    
-    public HTMLFontElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-  
-
-}
diff --git a/src/org/apache/html/dom/HTMLFormControl.java b/src/org/apache/html/dom/HTMLFormControl.java
deleted file mode 100755
index 43b62d4..0000000
--- a/src/org/apache/html/dom/HTMLFormControl.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-/**
- * Identifies control in a form, so they may be collected in a form elements
- * collection. All form control elements implement this empty interface.
- * 
- * 
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- */
-public interface HTMLFormControl
-{
-}
diff --git a/src/org/apache/html/dom/HTMLFormElementImpl.java b/src/org/apache/html/dom/HTMLFormElementImpl.java
deleted file mode 100755
index 214235c..0000000
--- a/src/org/apache/html/dom/HTMLFormElementImpl.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLFormElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLFormElementImpl
-    extends HTMLElementImpl
-    implements HTMLFormElement
-{
-
-    
-    public HTMLCollection getElements()
-    {
-        if ( _elements == null )
-            _elements = new HTMLCollectionImpl( this, HTMLCollectionImpl.ELEMENT );
-        return _elements;
-    }
-  
-
-    public int getLength()
-    {
-        return getElements().getLength();
-    }
-  
-  
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public String getAcceptCharset()
-    {
-        return getAttribute( "accept-charset" );
-    }
-    
-    
-    public void setAcceptCharset( String acceptCharset )
-    {
-        setAttribute( "accept-charset", acceptCharset );
-    }
-
-  
-      public String getAction()
-    {
-        return getAttribute( "action" );
-    }
-    
-    
-    public void setAction( String action )
-    {
-        setAttribute( "action", action );
-    }
-  
-  
-      public String getEnctype()
-    {
-        return getAttribute( "enctype" );
-    }
-    
-    
-    public void setEnctype( String enctype )
-    {
-        setAttribute( "enctype", enctype );
-    }
-
-    
-      public String getMethod()
-    {
-        return capitalize( getAttribute( "method" ) );
-    }
-    
-    
-    public void setMethod( String method )
-    {
-        setAttribute( "method", method );
-    }
-  
-  
-    public String getTarget()
-    {
-        return getAttribute( "target" );
-    }
-    
-    
-    public void setTarget( String target )
-    {
-        setAttribute( "target", target );
-    }
-
-    
-    public void submit()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-
-    
-    public void reset()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-
-    /*
-     * Explicit implementation of getChildNodes() to avoid problems with
-     * overriding the getLength() method hidden in the super class.
-     */
-    public NodeList getChildNodes() {
-        return getChildNodesUnoptimized();
-    }
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLFormElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-  
-    
-    /**
-     * Collection of all elements contained in this FORM.
-     */
-    private HTMLCollectionImpl    _elements;
-    
-}
-
diff --git a/src/org/apache/html/dom/HTMLFrameElementImpl.java b/src/org/apache/html/dom/HTMLFrameElementImpl.java
deleted file mode 100755
index 36968fc..0000000
--- a/src/org/apache/html/dom/HTMLFrameElementImpl.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLFrameElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLFrameElementImpl
-    extends HTMLElementImpl
-    implements HTMLFrameElement
-{
-
-    
-    public String getFrameBorder()
-    {
-        return getAttribute( "frameborder" );
-    }
-    
-    
-    public void setFrameBorder( String frameBorder )
-    {
-        setAttribute( "frameborder", frameBorder );
-    }
-  
-  
-    public String getLongDesc()
-    {
-        return getAttribute( "longdesc" );
-    }
-    
-    
-    public void setLongDesc( String longDesc )
-    {
-        setAttribute( "longdesc", longDesc );
-    }
-  
-  
-    public String getMarginHeight()
-    {
-        return getAttribute( "marginheight" );
-    }
-    
-    
-    public void setMarginHeight( String marginHeight )
-    {
-        setAttribute( "marginheight", marginHeight );
-    }
-  
-  
-    public String getMarginWidth()
-    {
-        return getAttribute( "marginwidth" );
-    }
-    
-    
-    public void setMarginWidth( String marginWidth )
-    {
-        setAttribute( "marginwidth", marginWidth );
-    }
-  
-  
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public boolean getNoResize()
-    {
-        return getBinary( "noresize" );
-    }
-    
-    
-    public void setNoResize( boolean noResize )
-    {
-        setAttribute( "noresize", noResize );
-    }
-
-    
-    public String getScrolling()
-    {
-        return capitalize( getAttribute( "scrolling" ) );
-    }
-    
-    
-    public void setScrolling( String scrolling )
-    {
-        setAttribute( "scrolling", scrolling );
-    }
-  
-  
-    public String getSrc()
-    {
-        return getAttribute( "src" );
-    }
-    
-    
-    public void setSrc( String src )
-    {
-        setAttribute( "src", src );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLFrameElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-  
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLFrameSetElementImpl.java b/src/org/apache/html/dom/HTMLFrameSetElementImpl.java
deleted file mode 100755
index 073c8ae..0000000
--- a/src/org/apache/html/dom/HTMLFrameSetElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLFrameSetElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLFrameSetElementImpl
-    extends HTMLElementImpl
-    implements HTMLFrameSetElement
-{
-
-    
-    public String getCols()
-    {
-        return getAttribute( "cols" );
-    }
-    
-    
-    public void setCols( String cols )
-    {
-        setAttribute( "cols", cols );
-    }
-
-    
-    public String getRows()
-    {
-        return getAttribute( "rows" );
-    }
-    
-    
-    public void setRows( String rows )
-    {
-        setAttribute( "rows", rows );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLFrameSetElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-  
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLHRElementImpl.java b/src/org/apache/html/dom/HTMLHRElementImpl.java
deleted file mode 100755
index 9b478a5..0000000
--- a/src/org/apache/html/dom/HTMLHRElementImpl.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLHRElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLHRElementImpl
-    extends HTMLElementImpl
-    implements HTMLHRElement
-{
-
-    
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    public boolean getNoShade()
-    {
-        return getBinary( "noshade" );
-    }
-    
-    
-    public void setNoShade( boolean noShade )
-    {
-        setAttribute( "noshade", noShade );
-    }
-
-    
-    public String getSize()
-    {
-        return getAttribute( "size" );
-    }
-    
-    
-    public void setSize( String size )
-    {
-        setAttribute( "size", size );
-    }
-  
-  
-      public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-    
-
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLHRElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLHeadElementImpl.java b/src/org/apache/html/dom/HTMLHeadElementImpl.java
deleted file mode 100755
index cd73d42..0000000
--- a/src/org/apache/html/dom/HTMLHeadElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLHeadElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLHeadElementImpl
-    extends HTMLElementImpl
-    implements HTMLHeadElement
-{
-
-    
-    public String getProfile()
-    {
-        return getAttribute( "profile" );
-    }
-    
-    
-    public void setProfile( String profile )
-    {
-        setAttribute( "profile", profile );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLHeadElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLHeadingElementImpl.java b/src/org/apache/html/dom/HTMLHeadingElementImpl.java
deleted file mode 100755
index 5ffcb06..0000000
--- a/src/org/apache/html/dom/HTMLHeadingElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLHeadingElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLHeadingElementImpl
-    extends HTMLElementImpl
-    implements HTMLHeadingElement
-{
-
-    
-    public String getAlign()
-    {
-        return getCapitalized( "align" );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLHeadingElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLHtmlElementImpl.java b/src/org/apache/html/dom/HTMLHtmlElementImpl.java
deleted file mode 100755
index 7455feb..0000000
--- a/src/org/apache/html/dom/HTMLHtmlElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLHtmlElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLHtmlElementImpl
-    extends HTMLElementImpl
-    implements HTMLHtmlElement
-{
-
-    
-    public String getVersion()
-    {
-        return capitalize( getAttribute( "version" ) );
-    }
-    
-    
-    public void setVersion( String version )
-    {
-        setAttribute( "version", version );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLHtmlElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLIFrameElementImpl.java b/src/org/apache/html/dom/HTMLIFrameElementImpl.java
deleted file mode 100755
index 9ac472d..0000000
--- a/src/org/apache/html/dom/HTMLIFrameElementImpl.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLIFrameElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLIFrameElementImpl
-    extends HTMLElementImpl
-    implements HTMLIFrameElement
-{
-
-    
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    public String getFrameBorder()
-    {
-        return getAttribute( "frameborder" );
-    }
-    
-    
-    public void setFrameBorder( String frameBorder )
-    {
-        setAttribute( "frameborder", frameBorder );
-    }
-
-    
-    public String getHeight()
-    {
-        return getAttribute( "height" );
-    }
-    
-    
-    public void setHeight( String height )
-    {
-        setAttribute( "height", height );
-    }
-  
-    public String getLongDesc()
-    {
-        return getAttribute( "longdesc" );
-    }
-    
-    
-    public void setLongDesc( String longDesc )
-    {
-        setAttribute( "longdesc", longDesc );
-    }
-  
-  
-    public String getMarginHeight()
-    {
-        return getAttribute( "marginheight" );
-    }
-    
-    
-    public void setMarginHeight( String marginHeight )
-    {
-        setAttribute( "marginheight", marginHeight );
-    }
-  
-  
-    public String getMarginWidth()
-    {
-        return getAttribute( "marginwidth" );
-    }
-    
-    
-    public void setMarginWidth( String marginWidth )
-    {
-        setAttribute( "marginwidth", marginWidth );
-    }
-
-  
-      public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public String getScrolling()
-    {
-        return capitalize( getAttribute( "scrolling" ) );
-    }
-    
-    
-    public void setScrolling( String scrolling )
-    {
-        setAttribute( "scrolling", scrolling );
-    }
-    
-  
-       public String getSrc()
-    {
-        return getAttribute( "src" );
-    }
-    
-    
-    public void setSrc( String src )
-    {
-        setAttribute( "src", src );
-    }
-
-
-      public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLIFrameElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLImageElementImpl.java b/src/org/apache/html/dom/HTMLImageElementImpl.java
deleted file mode 100755
index d5b39bc..0000000
--- a/src/org/apache/html/dom/HTMLImageElementImpl.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLImageElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLImageElementImpl
-    extends HTMLElementImpl
-    implements HTMLImageElement
-{
-
-    
-       public String getLowSrc()
-    {
-        return getAttribute( "lowsrc" );
-    }
-    
-    
-    public void setLowSrc( String lowSrc )
-    {
-        setAttribute( "lowsrc", lowSrc );
-    }
-
-  
-       public String getSrc()
-    {
-        return getAttribute( "src" );
-    }
-    
-    
-    public void setSrc( String src )
-    {
-        setAttribute( "src", src );
-    }
-
-    
-      public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    public String getAlt()
-    {
-        return getAttribute( "alt" );
-    }
-    
-    
-    public void setAlt( String alt )
-    {
-        setAttribute( "alt", alt );
-    }
-
-    
-    public String getBorder()
-    {
-        return getAttribute( "border" );
-    }
-    
-    
-    public void setBorder( String border )
-    {
-        setAttribute( "border", border );
-    }
-
-  
-      public String getHeight()
-    {
-        return getAttribute( "height" );
-    }
-    
-    
-    public void setHeight( String height )
-    {
-        setAttribute( "height", height );
-    }
-
-    
-    public String getHspace()
-    {
-        return getAttribute( "hspace" );
-    }
-    
-    
-    public void setHspace( String hspace )
-    {
-        setAttribute( "hspace", hspace );
-    }
-    
-  
-    public boolean getIsMap()
-    {
-        return getBinary( "ismap" );
-    }
-    
-    
-    public void setIsMap( boolean isMap )
-    {
-        setAttribute( "ismap", isMap );
-    }
-
-    
-    public String getLongDesc()
-    {
-        return getAttribute( "longdesc" );
-    }
-    
-    
-    public void setLongDesc( String longDesc )
-    {
-        setAttribute( "longdesc", longDesc );
-    }
-    
-  
-    public String getUseMap()
-    {
-        return getAttribute( "useMap" );
-    }
-    
-    
-    public void setUseMap( String useMap )
-    {
-        setAttribute( "useMap", useMap );
-    }
-    
-
-    public String getVspace()
-    {
-        return getAttribute( "vspace" );
-    }
-    
-    
-    public void setVspace( String vspace )
-    {
-        setAttribute( "vspace", vspace );
-    }
-
-  
-      public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLImageElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLInputElementImpl.java b/src/org/apache/html/dom/HTMLInputElementImpl.java
deleted file mode 100755
index dee755e..0000000
--- a/src/org/apache/html/dom/HTMLInputElementImpl.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLInputElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLInputElementImpl
-    extends HTMLElementImpl
-    implements HTMLInputElement, HTMLFormControl
-{
-    
-    
-    public String getDefaultValue()
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        return getAttribute( "defaultValue" );
-    }
-    
-    
-    public void setDefaultValue( String defaultValue )
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        setAttribute( "defaultValue", defaultValue );
-    }
-    
-    
-    public boolean getDefaultChecked()
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        return getBinary( "defaultChecked" );
-    }
-    
-    
-    public void setDefaultChecked( boolean defaultChecked )
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        setAttribute( "defaultChecked", defaultChecked );
-    }
-  
-    
-    public String getAccept()
-    {
-        return getAttribute( "accept" );
-    }
-    
-    
-    public void setAccept( String accept )
-    {
-        setAttribute( "accept", accept );
-    }   
-    
-    
-    public String getAccessKey()
-    {
-        String    accessKey;
-        
-        // Make sure that the access key is a single character.
-        accessKey = getAttribute( "accesskey" );
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        return accessKey;
-    }
-    
-    
-    public void setAccessKey( String accessKey )
-    {
-        // Make sure that the access key is a single character.    
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        setAttribute( "accesskey", accessKey );
-    }
-    
-    
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-    
-    
-    public String getAlt()
-    {
-        return getAttribute( "alt" );
-    }
-    
-    
-    public void setAlt( String alt )
-    {
-        setAttribute( "alt", alt );
-    }
-    
-    
-    public boolean getChecked()
-    {
-        return getBinary( "checked" );
-    }
-    
-    
-    public void setChecked( boolean checked )
-    {
-        setAttribute( "checked", checked );
-    }
-  
-    
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-    
-    
-    public int getMaxLength()
-    {
-        return getInteger( getAttribute( "maxlength" ) );
-    }
-    
-    
-    public void setMaxLength( int maxLength )
-    {
-        setAttribute( "maxlength", String.valueOf( maxLength ) );
-    }
-    
-    
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-    
-    
-    public boolean getReadOnly()
-    {
-        return getBinary( "readonly" );
-    }
-    
-    
-    public void setReadOnly( boolean readOnly )
-    {
-        setAttribute( "readonly", readOnly );
-    }
-    
-    
-    public String getSize()
-    {
-        return getAttribute( "size" );
-    }
-    
-    
-    public void setSize( String size )
-    {
-        setAttribute( "size", size );
-    }
-    
-    
-    public String getSrc()
-    {
-        return getAttribute( "src" );
-    }
-    
-    
-    public void setSrc( String src )
-    {
-        setAttribute( "src", src );
-    }
-    
-    
-      public int getTabIndex()
-    {
-        try
-        {
-            return Integer.parseInt( getAttribute( "tabindex" ) );
-        }
-        catch ( NumberFormatException except )
-        {
-            return 0;
-        }
-    }
-    
-    
-    public void setTabIndex( int tabIndex )
-    {
-        setAttribute( "tabindex", String.valueOf( tabIndex ) );
-    }
-
-  
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public String getUseMap()
-    {
-        return getAttribute( "useMap" );
-    }
-    
-    
-    public void setUseMap( String useMap )
-    {
-        setAttribute( "useMap", useMap );
-    }
-    
-    
-    public String getValue()
-    {
-        return getAttribute( "value" );
-    }
-    
-    
-    public void setValue( String value )
-    {
-        setAttribute( "value", value );
-    }
-    
-    
-    public void blur()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-    
-    
-    public void focus()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-    
-    
-    public void select()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-    
-    
-    public void click()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-
-  
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLInputElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
-
diff --git a/src/org/apache/html/dom/HTMLIsIndexElementImpl.java b/src/org/apache/html/dom/HTMLIsIndexElementImpl.java
deleted file mode 100755
index 51b8fa1..0000000
--- a/src/org/apache/html/dom/HTMLIsIndexElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLIsIndexElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLIsIndexElementImpl
-    extends HTMLElementImpl
-    implements HTMLIsIndexElement
-{
-
-    
-    public String getPrompt()
-    {
-        return getAttribute( "prompt" );
-    }
-    
-    
-    public void setPrompt( String prompt )
-    {
-        setAttribute( "prompt", prompt );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLIsIndexElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLLIElementImpl.java b/src/org/apache/html/dom/HTMLLIElementImpl.java
deleted file mode 100755
index 8c9d97f..0000000
--- a/src/org/apache/html/dom/HTMLLIElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLLIElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLLIElementImpl
-    extends HTMLElementImpl
-	    implements HTMLLIElement
-{
-
-    
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-        
-
-    public int getValue()
-    {
-        return getInteger( getAttribute( "value" ) );
-    }
-
-    
-    public void setValue( int value )
-    {
-        setAttribute( "value", String.valueOf( value ) );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLLIElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLLabelElementImpl.java b/src/org/apache/html/dom/HTMLLabelElementImpl.java
deleted file mode 100755
index 3c85d5d..0000000
--- a/src/org/apache/html/dom/HTMLLabelElementImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLLabelElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLLabelElementImpl
-    extends HTMLElementImpl
-    implements HTMLLabelElement, HTMLFormControl
-{
-
-    
-    public String getAccessKey()
-    {
-        String    accessKey;
-        
-        // Make sure that the access key is a single character.
-        accessKey = getAttribute( "accesskey" );
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        return accessKey;
-    }
-    
-    
-    public void setAccessKey( String accessKey )
-    {
-        // Make sure that the access key is a single character.
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        setAttribute( "accesskey", accessKey );
-    }
-
-    
-       public String getHtmlFor()
-    {
-        return getAttribute( "for" );
-    }
-    
-    
-    public void setHtmlFor( String htmlFor )
-    {
-        setAttribute( "for", htmlFor );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLLabelElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLLegendElementImpl.java b/src/org/apache/html/dom/HTMLLegendElementImpl.java
deleted file mode 100755
index a0e9478..0000000
--- a/src/org/apache/html/dom/HTMLLegendElementImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLLegendElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLLegendElementImpl
-    extends HTMLElementImpl
-    implements HTMLLegendElement
-{
-
-    
-    public String getAccessKey()
-    {
-        String    accessKey;
-        
-        // Make sure that the access key is a single character.
-        accessKey = getAttribute( "accesskey" );
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        return accessKey;
-    }
-    
-    
-    public void setAccessKey( String accessKey )
-    {
-        // Make sure that the access key is a single character.
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        setAttribute( "accesskey", accessKey );
-    }
-
-    
-    public String getAlign()
-    {
-        return getAttribute( "align" );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLLegendElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLLinkElementImpl.java b/src/org/apache/html/dom/HTMLLinkElementImpl.java
deleted file mode 100755
index c66f23b..0000000
--- a/src/org/apache/html/dom/HTMLLinkElementImpl.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLLinkElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLLinkElementImpl
-    extends HTMLElementImpl
-    implements HTMLLinkElement
-{
-
-    
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-
-    
-    public String getCharset()
-    {
-        return getAttribute( "charset" );
-    }
-    
-    
-    public void setCharset( String charset )
-    {
-        setAttribute( "charset", charset );
-    }
-    
-    
-    public String getHref()
-    {
-        return getAttribute( "href" );
-    }
-    
-    
-    public void setHref( String href )
-    {
-        setAttribute( "href", href );
-    }
-    
-    
-    public String getHreflang()
-    {
-        return getAttribute( "hreflang" );
-    }
-    
-    
-    public void setHreflang( String hreflang )
-    {
-        setAttribute( "hreflang", hreflang );
-    }
-
-    
-    public String getMedia()
-    {
-        return getAttribute( "media" );
-    }
-    
-    
-    public void setMedia( String media )
-    {
-        setAttribute( "media", media );
-    }
-
-  
-    public String getRel()
-    {
-        return getAttribute( "rel" );
-    }
-    
-    
-    public void setRel( String rel )
-    {
-        setAttribute( "rel", rel );
-    }
-    
-    
-    public String getRev()
-    {
-        return getAttribute( "rev" );
-    }
-    
-    
-    public void setRev( String rev )
-    {
-        setAttribute( "rev", rev );
-    }
-
-    
-    public String getTarget()
-    {
-        return getAttribute( "target" );
-    }
-    
-    
-    public void setTarget( String target )
-    {
-        setAttribute( "target", target );
-    }
-  
-  
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-    
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLLinkElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLMapElementImpl.java b/src/org/apache/html/dom/HTMLMapElementImpl.java
deleted file mode 100755
index d676fac..0000000
--- a/src/org/apache/html/dom/HTMLMapElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLMapElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLMapElementImpl
-    extends HTMLElementImpl
-    implements HTMLMapElement
-{
-
-    
-    
-    public HTMLCollection getAreas()
-    {
-        if ( _areas == null )
-            _areas = new HTMLCollectionImpl( this, HTMLCollectionImpl.AREA );
-        return _areas;
-    }
-    
-  
-      public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLMapElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-    
-    
-    private HTMLCollection    _areas;
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLMenuElementImpl.java b/src/org/apache/html/dom/HTMLMenuElementImpl.java
deleted file mode 100755
index 9d32395..0000000
--- a/src/org/apache/html/dom/HTMLMenuElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLMenuElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLMenuElementImpl
-    extends HTMLElementImpl
-    implements HTMLMenuElement
-{
-
-    
-    public boolean getCompact()
-    {
-        return getBinary( "compact" );
-    }
-    
-    
-    public void setCompact( boolean compact )
-    {
-        setAttribute( "compact", compact );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLMenuElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLMetaElementImpl.java b/src/org/apache/html/dom/HTMLMetaElementImpl.java
deleted file mode 100755
index 0a79aa6..0000000
--- a/src/org/apache/html/dom/HTMLMetaElementImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLMetaElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLMetaElementImpl
-    extends HTMLElementImpl
-    implements HTMLMetaElement
-{
-
-    
-    public String getContent()
-    {
-        return getAttribute( "content" );
-    }
-    
-    
-    public void setContent( String content )
-    {
-        setAttribute( "content", content );
-    }
-
-    
-    
-      public String getHttpEquiv()
-    {
-        return getAttribute( "http-equiv" );
-    }
-    
-    
-    public void setHttpEquiv( String httpEquiv )
-    {
-        setAttribute( "http-equiv", httpEquiv );
-    }
-
-  
-      public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-      public String getScheme()
-    {
-        return getAttribute( "scheme" );
-    }
-    
-    
-    public void setScheme( String scheme )
-    {
-        setAttribute( "scheme", scheme );
-    }
-    
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLMetaElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLModElementImpl.java b/src/org/apache/html/dom/HTMLModElementImpl.java
deleted file mode 100755
index 529479d..0000000
--- a/src/org/apache/html/dom/HTMLModElementImpl.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLModElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLModElementImpl
-    extends HTMLElementImpl
-    implements HTMLModElement
-{
-
-    
-    
-    public String getCite()
-    {
-        return getAttribute( "cite" );
-    }
-    
-    
-    public void setCite( String cite )
-    {
-        setAttribute( "cite", cite );
-    }
-    
-    
-      public String getDateTime()
-    {
-        return getAttribute( "datetime" );
-    }
-    
-    
-    public void setDateTime( String dateTime )
-    {
-        setAttribute( "datetime", dateTime );
-    }
-    
-
-    /**
-     * Constructor requires owner document and tag name.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLModElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLOListElementImpl.java b/src/org/apache/html/dom/HTMLOListElementImpl.java
deleted file mode 100755
index 5450746..0000000
--- a/src/org/apache/html/dom/HTMLOListElementImpl.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLOListElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLOListElementImpl
-    extends HTMLElementImpl
-    implements HTMLOListElement
-{
-
-    
-    public boolean getCompact()
-    {
-        return getBinary( "compact" );
-    }
-    
-    
-    public void setCompact( boolean compact )
-    {
-        setAttribute( "compact", compact );
-    }
-    
-    
-      public int getStart()
-    {
-        return getInteger( getAttribute( "start" ) );
-    }
-    
-    
-    public void setStart( int start )
-    {
-        setAttribute( "start", String.valueOf( start ) );
-    }
-  
-  
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-        
-        
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLOListElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLObjectElementImpl.java b/src/org/apache/html/dom/HTMLObjectElementImpl.java
deleted file mode 100755
index 496d88a..0000000
--- a/src/org/apache/html/dom/HTMLObjectElementImpl.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLObjectElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLObjectElementImpl
-    extends HTMLElementImpl
-    implements HTMLObjectElement, HTMLFormControl
-{
-    
-    
-
-    public String getCode()
-    {
-        return getAttribute( "code" );
-    }
-    
-    
-    public void setCode( String code )
-    {
-        setAttribute( "code", code );
-    }
-
-  
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    public String getArchive()
-    {
-        return getAttribute( "archive" );
-    }
-    
-    
-    public void setArchive( String archive )
-    {
-        setAttribute( "archive", archive );
-    }
-    
-    public String getBorder()
-    {
-        return getAttribute( "border" );
-    }
-    
-    
-    public void setBorder( String border )
-    {
-        setAttribute( "border", border );
-    }
-
-    
-    public String getCodeBase()
-    {
-        return getAttribute( "codebase" );
-    }
-    
-    
-    public void setCodeBase( String codeBase )
-    {
-        setAttribute( "codebase", codeBase );
-    }
-
-    
-    public String getCodeType()
-    {
-        return getAttribute( "codetype" );
-    }
-    
-    
-    public void setCodeType( String codeType )
-    {
-        setAttribute( "codetype", codeType );
-    }
-
-    
-    public String getData()
-    {
-        return getAttribute( "data" );
-    }
-    
-    
-    public void setData( String data )
-    {
-        setAttribute( "data", data );
-    }
-
-  
-      public boolean getDeclare()
-    {
-        return getBinary( "declare" );
-    }
-    
-    
-    public void setDeclare( boolean declare )
-    {
-        setAttribute( "declare", declare );
-    }
-
-    
-    public String getHeight()
-    {
-        return getAttribute( "height" );
-    }
-    
-    
-    public void setHeight( String height )
-    {
-        setAttribute( "height", height );
-    }
-
-    
-    public String getHspace()
-    {
-        return getAttribute( "hspace" );
-    }
-    
-    
-    public void setHspace( String hspace )
-    {
-        setAttribute( "hspace", hspace );
-    }
-  
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public String getStandby()
-    {
-        return getAttribute( "standby" );
-    }
-    
-    
-    public void setStandby( String standby )
-    {
-        setAttribute( "standby", standby );
-    }
-  
-      public int getTabIndex()
-    {
-        try
-        {
-            return Integer.parseInt( getAttribute( "tabindex" ) );
-        }
-        catch ( NumberFormatException except )
-        {
-            return 0;
-        }
-    }
-    
-    
-    public void setTabIndex( int tabIndex )
-    {
-        setAttribute( "tabindex", String.valueOf( tabIndex ) );
-    }
-
-    
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-    
-    
-    public String getUseMap()
-    {
-        return getAttribute( "useMap" );
-    }
-    
-    
-    public void setUseMap( String useMap )
-    {
-        setAttribute( "useMap", useMap );
-    }
-    
-    
-    public String getVspace()
-    {
-        return getAttribute( "vspace" );
-    }
-    
-    
-    public void setVspace( String vspace )
-    {
-        setAttribute( "vspace", vspace );
-    }
-
-  
-    public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLObjectElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLOptGroupElementImpl.java b/src/org/apache/html/dom/HTMLOptGroupElementImpl.java
deleted file mode 100755
index 51f1c15..0000000
--- a/src/org/apache/html/dom/HTMLOptGroupElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLOptGroupElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLOptGroupElementImpl
-    extends HTMLElementImpl
-    implements HTMLOptGroupElement
-{
-
-        
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-
-    
-      public String getLabel()
-    {
-        return capitalize( getAttribute( "label" ) );
-    }
-    
-    
-    public void setLabel( String label )
-    {
-        setAttribute( "label", label );
-    }
-
-    
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLOptGroupElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLOptionElementImpl.java b/src/org/apache/html/dom/HTMLOptionElementImpl.java
deleted file mode 100755
index 5dde850..0000000
--- a/src/org/apache/html/dom/HTMLOptionElementImpl.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@openxml.org">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLOptionElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLOptionElementImpl
-    extends HTMLElementImpl
-    implements HTMLOptionElement
-{
-
-    
-
-    public boolean getDefaultSelected()
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        return getBinary( "default-selected" );
-    }
-    
-    
-    public void setDefaultSelected( boolean defaultSelected )
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        setAttribute( "default-selected", defaultSelected );
-    }
-
-  
-    public String getText()
-    {
-        Node    child;
-        String    text;
-        
-        // Find the Text nodes contained within this element and return their
-        // concatenated value. Required to go around comments, entities, etc.
-        child = getFirstChild();
-        text = "";
-        while ( child != null )
-        {
-            if ( child instanceof Text )
-                text = text + ( (Text) child ).getData();
-            child = child.getNextSibling();
-        }
-        return text;
-    }
-    
-    
-    public void setText( String text )
-    {
-        Node    child;
-        Node    next;
-        
-        // Delete all the nodes and replace them with a single Text node.
-        // This is the only approach that can handle comments and other nodes.
-        child = getFirstChild();
-        while ( child != null )
-        {
-            next = child.getNextSibling();
-            removeChild( child );
-            child = next;
-        }
-        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
-    }
-    
-    
-    public int getIndex()
-    {
-        Node        parent;
-        NodeList    options;
-        int            i;
-        
-        // Locate the parent SELECT. Note that this OPTION might be inside a
-        // OPTGROUP inside the SELECT. Or it might not have a parent SELECT.
-        // Everything is possible. If no parent is found, return -1.
-        parent = getParentNode();
-        while ( parent != null && ! ( parent instanceof HTMLSelectElement ) )
-            parent = parent.getParentNode();
-        if ( parent != null )
-        {
-            // Use getElementsByTagName() which creates a snapshot of all the
-            // OPTION elements under the SELECT. Access to the returned NodeList
-            // is very fast and the snapshot solves many synchronization problems.
-            options = ( (HTMLElement) parent ).getElementsByTagName( "OPTION" );
-            for ( i = 0 ; i < options.getLength() ; ++i )
-                if ( options.item( i ) == this )
-                    return i;
-        }
-        return -1;
-    }
-    
-    
-    public void setIndex( int index )
-    {
-        Node        parent;
-        NodeList    options;
-        Node        item;
-        
-        // Locate the parent SELECT. Note that this OPTION might be inside a
-        // OPTGROUP inside the SELECT. Or it might not have a parent SELECT.
-        // Everything is possible. If no parent is found, just return.
-        parent = getParentNode();
-        while ( parent != null && ! ( parent instanceof HTMLSelectElement ) )
-            parent = parent.getParentNode();
-        if ( parent != null )
-        {
-            // Use getElementsByTagName() which creates a snapshot of all the
-            // OPTION elements under the SELECT. Access to the returned NodeList
-            // is very fast and the snapshot solves many synchronization problems.
-            // Make sure this OPTION is not replacing itself.
-            options = ( (HTMLElement) parent ).getElementsByTagName( "OPTION" );
-            if ( options.item( index ) != this )
-            {
-                // Remove this OPTION from its parent. Place this OPTION right
-                // before indexed OPTION underneath it's direct parent (might
-                // be an OPTGROUP).
-                getParentNode().removeChild( this );
-                item = options.item( index );
-                item.getParentNode().insertBefore( this, item );
-            }
-        }
-    }
-  
-  
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-
-    
-      public String getLabel()
-    {
-        return capitalize( getAttribute( "label" ) );
-    }
-    
-    
-    public void setLabel( String label )
-    {
-        setAttribute( "label", label );
-    }
-
-    
-    public boolean getSelected()
-    {
-        return getBinary( "selected" );
-    }
-  
-  
-    public void setSelected( boolean selected )
-    {
-        setAttribute( "selected", selected );
-    }
-    
-        
-    public String getValue()
-    {
-        return getAttribute( "value" );
-    }
-    
-    
-    public void setValue( String value )
-    {
-        setAttribute( "value", value );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLOptionElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLParagraphElementImpl.java b/src/org/apache/html/dom/HTMLParagraphElementImpl.java
deleted file mode 100755
index ca0674a..0000000
--- a/src/org/apache/html/dom/HTMLParagraphElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLParagraphElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLParagraphElementImpl
-    extends HTMLElementImpl
-    implements HTMLParagraphElement
-{
-    
-    
-    public String getAlign()
-    {
-        return getAttribute( "align" );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLParagraphElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLParamElementImpl.java b/src/org/apache/html/dom/HTMLParamElementImpl.java
deleted file mode 100755
index 8f2b7ed..0000000
--- a/src/org/apache/html/dom/HTMLParamElementImpl.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLParamElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLParamElementImpl
-    extends HTMLElementImpl
-    implements HTMLParamElement
-{
-    
-    
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-  
-  
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-    
-    
-      public String getValue()
-    {
-        return getAttribute( "value" );
-    }
-    
-    
-    public void setValue( String value )
-    {
-        setAttribute( "value", value );
-    }
-
-    
-      public String getValueType()
-    {
-        return capitalize( getAttribute( "valuetype" ) );
-    }
-    
-    
-    public void setValueType( String valueType )
-    {
-        setAttribute( "valuetype", valueType );
-    }
-
-
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLParamElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLPreElementImpl.java b/src/org/apache/html/dom/HTMLPreElementImpl.java
deleted file mode 100755
index 134fdab..0000000
--- a/src/org/apache/html/dom/HTMLPreElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLPreElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLPreElementImpl
-    extends HTMLElementImpl
-    implements HTMLPreElement
-{
-    
-    
-      public int getWidth()
-    {
-        return getInteger( getAttribute( "width" ) );
-    }
-    
-    
-    public void setWidth( int width )
-    {
-        setAttribute( "width", String.valueOf( width ) );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLPreElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLQuoteElementImpl.java b/src/org/apache/html/dom/HTMLQuoteElementImpl.java
deleted file mode 100755
index 24d55ec..0000000
--- a/src/org/apache/html/dom/HTMLQuoteElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLQuoteElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLQuoteElementImpl
-    extends HTMLElementImpl
-    implements HTMLQuoteElement
-{
-    
-    
-    public String getCite()
-    {
-        return getAttribute( "cite" );
-    }
-    
-    
-    public void setCite( String cite )
-    {
-        setAttribute( "cite", cite );
-    }
-    
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLQuoteElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLScriptElementImpl.java b/src/org/apache/html/dom/HTMLScriptElementImpl.java
deleted file mode 100755
index 86b7a4a..0000000
--- a/src/org/apache/html/dom/HTMLScriptElementImpl.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLScriptElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLScriptElementImpl
-    extends HTMLElementImpl
-    implements HTMLScriptElement
-{
-    
-    
-    public String getText()
-    {
-        Node    child;
-        String    text;
-        
-        // Find the Text nodes contained within this element and return their
-        // concatenated value. Required to go around comments, entities, etc.
-        child = getFirstChild();
-        text = "";
-        while ( child != null )
-        {
-            if ( child instanceof Text )
-                text = text + ( (Text) child ).getData();
-            child = child.getNextSibling();
-        }
-        return text;
-    }
-    
-    
-    public void setText( String text )
-    {
-        Node    child;
-        Node    next;
-        
-        // Delete all the nodes and replace them with a single Text node.
-        // This is the only approach that can handle comments and other nodes.
-        child = getFirstChild();
-        while ( child != null )
-        {
-            next = child.getNextSibling();
-            removeChild( child );
-            child = next;
-        }
-        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
-    }
-
-    
-       public String getHtmlFor()
-    {
-        return getAttribute( "for" );
-    }
-    
-    
-    public void setHtmlFor( String htmlFor )
-    {
-        setAttribute( "for", htmlFor );
-    }
-
-    
-       public String getEvent()
-    {
-        return getAttribute( "event" );
-    }
-    
-    
-    public void setEvent( String event )
-    {
-        setAttribute( "event", event );
-    }
-    
-       public String getCharset()
-    {
-        return getAttribute( "charset" );
-    }
-    
-    
-    public void setCharset( String charset )
-    {
-        setAttribute( "charset", charset );
-    }
-
-    
-    public boolean getDefer()
-    {
-        return getBinary( "defer" );
-    }
-    
-    
-    public void setDefer( boolean defer )
-    {
-        setAttribute( "defer", defer );
-    }
-
-  
-       public String getSrc()
-    {
-        return getAttribute( "src" );
-    }
-    
-    
-    public void setSrc( String src )
-    {
-        setAttribute( "src", src );
-    }
-
-  
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-    
-    
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLScriptElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLSelectElementImpl.java b/src/org/apache/html/dom/HTMLSelectElementImpl.java
deleted file mode 100755
index 641fe09..0000000
--- a/src/org/apache/html/dom/HTMLSelectElementImpl.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLSelectElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLSelectElementImpl
-    extends HTMLElementImpl
-    implements HTMLSelectElement, HTMLFormControl
-{
-    
-    
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-
-    
-      public String getValue()
-    {
-        return getAttribute( "value" );
-    }
-    
-    
-    public void setValue( String value )
-    {
-        setAttribute( "value", value );
-    }
-
-    
-    public int getSelectedIndex()
-    {
-        NodeList    options;
-        int            i;
-        
-        // Use getElementsByTagName() which creates a snapshot of all the
-        // OPTION elements under this SELECT. Access to the returned NodeList
-        // is very fast and the snapshot solves many synchronization problems.
-        // Locate the first selected OPTION and return its index. Note that
-        // the OPTION might be under an OPTGROUP.
-        options = getElementsByTagName( "OPTION" );
-        for ( i = 0 ; i < options.getLength() ; ++i )
-            if ( ( (HTMLOptionElement) options.item( i ) ).getSelected() )
-                return i;
-        return -1;
-    }
-    
-    
-    public void setSelectedIndex( int selectedIndex )
-    {
-        NodeList    options;
-        int            i;
-        
-        // Use getElementsByTagName() which creates a snapshot of all the
-        // OPTION elements under this SELECT. Access to the returned NodeList
-        // is very fast and the snapshot solves many synchronization problems.
-        // Change the select so all OPTIONs are off, except for the
-        // selectIndex-th one.
-        options = getElementsByTagName( "OPTION" );
-        for ( i = 0 ; i < options.getLength() ; ++i )
-            ( (HTMLOptionElementImpl) options.item( i ) ).setSelected( i == selectedIndex );
-    }
-
-  
-    public HTMLCollection getOptions()
-    {
-        if ( _options == null )
-            _options = new HTMLCollectionImpl( this, HTMLCollectionImpl.OPTION );
-        return _options;
-    }
-    
-
-    public int getLength()
-    {
-        return getOptions().getLength();
-    }
-    
-    
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-
-    
-      public boolean getMultiple()
-    {
-        return getBinary( "multiple" );
-    }
-    
-    
-    public void setMultiple( boolean multiple )
-    {
-        setAttribute( "multiple", multiple );
-    }
-
-  
-      public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public int getSize()
-    {
-        return getInteger( getAttribute( "size" ) );
-    }
-    
-    
-    public void setSize( int size )
-    {
-        setAttribute( "size", String.valueOf( size ) );
-    }
-
-  
-    public int getTabIndex()
-    {
-        return getInteger( getAttribute( "tabindex" ) );
-    }
-    
-    
-    public void setTabIndex( int tabIndex )
-    {
-        setAttribute( "tabindex", String.valueOf( tabIndex ) );
-    }
-
-    
-    public void add( HTMLElement element, HTMLElement before )
-    {
-        insertBefore( element, before );
-    }
-  
-  
-    public void remove( int index )
-    {
-        NodeList    options;
-        Node        removed;
-        
-        // Use getElementsByTagName() which creates a snapshot of all the
-        // OPTION elements under this SELECT. Access to the returned NodeList
-        // is very fast and the snapshot solves many synchronization problems.
-        // Remove the indexed OPTION from it's parent, this might be this
-        // SELECT or an OPTGROUP.
-        options = getElementsByTagName( "OPTION" );
-        removed = options.item( index );
-        if ( removed != null )
-            removed.getParentNode().removeChild ( removed );
-    }
-
-  
-    public void               blur()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-      
-      
-    public void               focus()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-
-    /*
-     * Explicit implementation of getChildNodes() to avoid problems with
-     * overriding the getLength() method hidden in the super class.
-     */
-    public NodeList getChildNodes() {
-        return getChildNodesUnoptimized();
-    }
-  
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLSelectElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-
-    private HTMLCollection    _options;
-  
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLStyleElementImpl.java b/src/org/apache/html/dom/HTMLStyleElementImpl.java
deleted file mode 100755
index 94bf268..0000000
--- a/src/org/apache/html/dom/HTMLStyleElementImpl.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLStyleElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLStyleElementImpl
-    extends HTMLElementImpl
-    implements HTMLStyleElement
-{
-    
-    
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-
-    
-    public String getMedia()
-    {
-        return getAttribute( "media" );
-    }
-    
-    
-    public void setMedia( String media )
-    {
-        setAttribute( "media", media );
-    }
-  
-  
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-    
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLStyleElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLTableCaptionElementImpl.java b/src/org/apache/html/dom/HTMLTableCaptionElementImpl.java
deleted file mode 100755
index ad48fe7..0000000
--- a/src/org/apache/html/dom/HTMLTableCaptionElementImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLTableCaptionElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTableCaptionElementImpl
-    extends HTMLElementImpl
-    implements HTMLTableCaptionElement
-{
-    
-    
-    public String getAlign()
-    {
-        return getAttribute( "align" );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTableCaptionElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLTableCellElementImpl.java b/src/org/apache/html/dom/HTMLTableCellElementImpl.java
deleted file mode 100755
index e0a041b..0000000
--- a/src/org/apache/html/dom/HTMLTableCellElementImpl.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLTableCellElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTableCellElementImpl
-    extends HTMLElementImpl
-    implements HTMLTableCellElement
-{
-    
-
-    public int getCellIndex()
-    {
-        Node    parent;
-        Node    child;
-        int        index;
-        
-        parent = getParentNode();
-        index = 0;
-        if ( parent instanceof HTMLTableRowElement )
-        {
-            child = parent.getFirstChild();
-            while ( child != null )
-            {
-                if ( child instanceof HTMLTableCellElement )
-                {
-                    if ( child == this )
-                        return index;
-                    ++ index;
-                }
-                child = child.getNextSibling();
-            }
-        }
-        return -1;
-    }
-    
-    
-    public void setCellIndex( int cellIndex )
-    {
-        Node    parent;
-        Node    child;
-        int        index;
-        
-        parent = getParentNode();
-        if ( parent instanceof HTMLTableRowElement )
-        {
-            child = parent.getFirstChild();
-            while ( child != null )
-            {
-                if ( child instanceof HTMLTableCellElement )
-                {
-                    if ( cellIndex == 0 )
-                    {
-                        if ( this != child )
-                            parent.insertBefore( this, child );
-                        return;
-                    }
-                    -- cellIndex;
-                }
-                child = child.getNextSibling();
-            }
-        }
-        parent.appendChild( this );
-    }
-
-  
-    public String getAbbr()
-    {
-        return getAttribute( "abbr" );
-    }
-    
-    
-    public void setAbbr( String abbr )
-    {
-        setAttribute( "abbr", abbr );
-    }
-
-  
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    public String getAxis()
-    {
-        return getAttribute( "axis" );
-    }
-    
-    
-    public void setAxis( String axis )
-    {
-        setAttribute( "axis", axis );
-    }
-    
-    public String getBgColor()
-    {
-        return getAttribute( "bgcolor" );
-    }
-    
-    
-    public void setBgColor( String bgColor )
-    {
-        setAttribute( "bgcolor", bgColor );
-    }
-
-  
-    public String getCh()
-    {
-        String    ch;
-        
-        // Make sure that the access key is a single character.
-        ch = getAttribute( "char" );
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        return ch;
-    }
-    
-    
-    public void setCh( String ch )
-    {
-        // Make sure that the access key is a single character.
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        setAttribute( "char", ch );
-    }
-
-    
-    public String getChOff()
-    {
-        return getAttribute( "charoff" );
-    }
-    
-    
-    public void setChOff( String chOff )
-    {
-        setAttribute( "charoff", chOff );
-    }
-  
-  
-    public int getColSpan()
-    {
-        return getInteger( getAttribute( "colspan" ) );
-    }
-    
-    
-    public void setColSpan( int colspan )
-    {
-        setAttribute( "colspan", String.valueOf( colspan ) );
-    }
-    
-    
-    public String getHeaders()
-    {
-        return getAttribute( "headers" );
-    }
-    
-    
-    public void setHeaders( String headers )
-    {
-        setAttribute( "headers", headers );
-    }
-  
-  
-    public String getHeight()
-    {
-        return getAttribute( "height" );
-    }
-    
-    
-    public void setHeight( String height )
-    {
-        setAttribute( "height", height );
-    }
-
-  
-      public boolean getNoWrap()
-    {
-        return getBinary( "nowrap" );
-    }
-    
-    
-    public void setNoWrap( boolean noWrap )
-    {
-        setAttribute( "nowrap", noWrap );
-    }
-
-    public int getRowSpan()
-    {
-        return getInteger( getAttribute( "rowspan" ) );
-    }
-    
-    
-    public void setRowSpan( int rowspan )
-    {
-        setAttribute( "rowspan", String.valueOf( rowspan ) );
-    }
-  
-    
-    public String getScope()
-    {
-        return getAttribute( "scope" );
-    }
-    
-    
-    public void setScope( String scope )
-    {
-        setAttribute( "scope", scope );
-    }
-  
-  
-    public String getVAlign()
-    {
-        return capitalize( getAttribute( "valign" ) );
-    }
-    
-    
-    public void setVAlign( String vAlign )
-    {
-        setAttribute( "valign", vAlign );
-    }
-
-  
-      public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTableCellElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLTableColElementImpl.java b/src/org/apache/html/dom/HTMLTableColElementImpl.java
deleted file mode 100755
index de34b21..0000000
--- a/src/org/apache/html/dom/HTMLTableColElementImpl.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLTableColElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTableColElementImpl
-    extends HTMLElementImpl
-    implements HTMLTableColElement
-{
-    
-    
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    public String getCh()
-    {
-        String    ch;
-        
-        // Make sure that the access key is a single character.
-        ch = getAttribute( "char" );
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        return ch;
-    }
-    
-    
-    public void setCh( String ch )
-    {
-        // Make sure that the access key is a single character.
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        setAttribute( "char", ch );
-    }
-
-
-    public String getChOff()
-    {
-        return getAttribute( "charoff" );
-    }
-    
-    
-    public void setChOff( String chOff )
-    {
-        setAttribute( "charoff", chOff );
-    }
-  
-  
-    public int getSpan()
-    {
-        return getInteger( getAttribute( "span" ) );
-    }
-    
-    
-    public void setSpan( int span )
-    {
-        setAttribute( "span", String.valueOf( span ) );
-    }
-
-    
-    public String getVAlign()
-    {
-        return capitalize( getAttribute( "valign" ) );
-    }
-    
-    
-    public void setVAlign( String vAlign )
-    {
-        setAttribute( "valign", vAlign );
-    }
-    
-    public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTableColElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLTableElementImpl.java b/src/org/apache/html/dom/HTMLTableElementImpl.java
deleted file mode 100755
index 13f793f..0000000
--- a/src/org/apache/html/dom/HTMLTableElementImpl.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLAnchorElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTableElementImpl
-    extends HTMLElementImpl
-    implements HTMLTableElement
-{
-    
-    
-    public synchronized HTMLTableCaptionElement getCaption()
-    {
-        Node    child;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableCaptionElement &&
-                 child.getNodeName().equals( "CAPTION" ) )
-                return (HTMLTableCaptionElement) child;
-            child = child.getNextSibling();
-        }
-        return null;
-    }
-    
-    
-    public synchronized void setCaption( HTMLTableCaptionElement caption )
-    {
-        if ( caption != null && ! caption.getTagName().equals( "CAPTION" ) )
-            throw new IllegalArgumentException( "HTM016 Argument 'caption' is not an element of type <CAPTION>." );
-        deleteCaption();
-        if ( caption != null )
-            appendChild( caption );
-    }
-    
-    
-    public synchronized HTMLElement createCaption()
-    {
-        HTMLElement    section;
-        
-        section = getCaption();
-        if ( section != null )
-            return section;
-        section = new HTMLTableCaptionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "CAPTION" );
-        appendChild( section );
-        return section;
-    }
-
-  
-    public synchronized void deleteCaption()
-    {
-        Node    old;
-        
-        old = getCaption();
-        if ( old != null )
-            removeChild ( old );
-    }
-    
-    public synchronized HTMLTableSectionElement getTHead()
-    {
-        Node    child;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableSectionElement &&
-                 child.getNodeName().equals( "THEAD" ) )
-                return (HTMLTableSectionElement) child;
-            child = child.getNextSibling();
-        }
-        return null;
-    }
-    
-    
-    public synchronized void setTHead( HTMLTableSectionElement tHead )
-    {
-        if ( tHead != null && ! tHead.getTagName().equals( "THEAD" ) )
-            throw new IllegalArgumentException( "HTM017 Argument 'tHead' is not an element of type <THEAD>." );
-        deleteTHead();
-        if ( tHead != null )
-            appendChild( tHead );
-    }
-    
-    
-    public synchronized HTMLElement createTHead()
-    {
-        HTMLElement    section;
-        
-        section = getTHead();
-        if ( section != null )
-            return section;
-        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "THEAD" );
-        appendChild( section );
-        return section;
-    }
-
-    
-    public synchronized void deleteTHead()
-    {
-        Node    old;
-        
-        old = getTHead();
-        if ( old != null )
-            removeChild ( old );
-    }
-    
-    public synchronized HTMLTableSectionElement getTFoot()
-    {
-        Node    child;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableSectionElement &&
-                 child.getNodeName().equals( "TFOOT" ) )
-                return (HTMLTableSectionElement) child;
-            child = child.getNextSibling();
-        }
-        return null;
-    }
-    
-    
-    public synchronized void setTFoot( HTMLTableSectionElement tFoot )
-    {
-        if ( tFoot != null && ! tFoot.getTagName().equals( "TFOOT" ) )
-            throw new IllegalArgumentException( "HTM018 Argument 'tFoot' is not an element of type <TFOOT>." );
-        deleteTFoot();
-        if ( tFoot != null )
-            appendChild( tFoot );
-    }
-    
-    
-    public synchronized HTMLElement createTFoot()
-    {
-        HTMLElement    section;
-        
-        section = getTFoot();
-        if ( section != null )
-            return section;
-        section = new HTMLTableSectionElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TFOOT" );
-        appendChild( section );
-        return section;
-    }
-
-    
-    public synchronized void deleteTFoot()
-    {
-        Node    old;
-        
-        old = getTFoot();
-        if ( old != null )
-            removeChild ( old );
-    }
-    
-    public HTMLCollection getRows()
-    {
-        if ( _rows == null )
-            _rows = new HTMLCollectionImpl( this, HTMLCollectionImpl.ROW );
-        return _rows;
-    }
-    
-
-    public HTMLCollection getTBodies()
-    {
-        if ( _bodies == null )
-            _bodies = new HTMLCollectionImpl( this, HTMLCollectionImpl.TBODY );
-        return _bodies;
-    }
-  
-  
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-  
-    
-    public String getBgColor()
-    {
-        return getAttribute( "bgcolor" );
-    }
-    
-    
-    public void setBgColor( String bgColor )
-    {
-        setAttribute( "bgcolor", bgColor );
-    }
-  
-  
-    public String getBorder()
-    {
-        return getAttribute( "border" );
-    }
-    
-    
-    public void setBorder( String border )
-    {
-        setAttribute( "border", border );
-    }
-
-    
-    public String getCellPadding()
-    {
-        return getAttribute( "cellpadding" );
-    }
-    
-    
-    public void setCellPadding( String cellPadding )
-    {
-        setAttribute( "cellpadding", cellPadding );
-    }
-    
-    
-    public String getCellSpacing()
-    {
-        return getAttribute( "cellspacing" );
-    }
-    
-    
-    public void setCellSpacing( String cellSpacing )
-    {
-        setAttribute( "cellspacing", cellSpacing );
-    }
-    
-    
-    public String getFrame()
-    {
-        return capitalize( getAttribute( "frame" ) );
-    }
-    
-    
-    public void setFrame( String frame )
-    {
-        setAttribute( "frame", frame );
-    }
-    
-    
-    public String getRules()
-    {
-        return capitalize( getAttribute( "rules" ) );
-    }
-    
-    
-    public void setRules( String rules )
-    {
-        setAttribute( "rules", rules );
-    }
-    
-    
-    public String getSummary()
-    {
-        return getAttribute( "summary" );
-    }
-    
-    
-    public void setSummary( String summary )
-    {
-        setAttribute( "summary", summary );
-    }
-
-  
-      public String getWidth()
-    {
-        return getAttribute( "width" );
-    }
-    
-    
-    public void setWidth( String width )
-    {
-        setAttribute( "width", width );
-    }
-
-    
-    public HTMLElement insertRow( int index )
-    {
-        HTMLTableRowElementImpl    newRow;
-
-        newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" );
-        //newRow.insertCell( 0 );
-        insertRowX( index, newRow );
-        return newRow;
-    }
-        
-        
-    void insertRowX( int index, HTMLTableRowElementImpl newRow )
-    {
-        Node    child;
-        Node    lastSection = null;
-                
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableRowElement )
-            {
-                if ( index == 0 )
-                {
-                    insertBefore( newRow, child );
-                    return;
-                }
-            }
-            else
-            if ( child instanceof HTMLTableSectionElementImpl )
-            {
-                lastSection = child;
-                index = ( (HTMLTableSectionElementImpl) child ).insertRowX( index, newRow );
-                if ( index < 0 )
-                    return;
-            }
-            child = child.getNextSibling();
-        }
-        if ( lastSection != null )
-            lastSection.appendChild( newRow );
-        else
-            appendChild( newRow );
-    }
-    
-    
-    public synchronized void deleteRow( int index )
-    {
-        Node    child;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableRowElement )
-            {
-                if ( index == 0 )
-                {
-                    removeChild ( child );
-                    return;
-                }
-            }
-            else
-            if ( child instanceof HTMLTableSectionElementImpl )
-            {
-                index = ( (HTMLTableSectionElementImpl) child ).deleteRowX( index );
-                if ( index < 0 )
-                    return;
-            }
-            child = child.getNextSibling();
-        }
-    }
-
-  
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTableElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-    
-  
-    private HTMLCollectionImpl    _rows;
-    
-    
-    private HTMLCollectionImpl    _bodies;
-  
-    
-}
-
diff --git a/src/org/apache/html/dom/HTMLTableRowElementImpl.java b/src/org/apache/html/dom/HTMLTableRowElementImpl.java
deleted file mode 100755
index b62d5a8..0000000
--- a/src/org/apache/html/dom/HTMLTableRowElementImpl.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLTableRowElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTableRowElementImpl
-    extends HTMLElementImpl
-    implements HTMLTableRowElement
-{
-
-    
-    public int getRowIndex()
-    {
-        Node    parent;
-        
-        parent = getParentNode();
-        if ( parent instanceof HTMLTableSectionElement )
-            parent = parent.getParentNode();
-        if ( parent instanceof HTMLTableElement )
-            return getRowIndex( parent );;
-        return -1;
-    }
-    
-    
-    public void setRowIndex( int rowIndex )
-    {
-        Node    parent;
-        
-        parent = getParentNode();
-        if ( parent instanceof HTMLTableSectionElement )
-            parent = parent.getParentNode();
-        if ( parent instanceof HTMLTableElement )
-            ( (HTMLTableElementImpl) parent ).insertRowX( rowIndex, this );
-    }
-
-  
-    public int getSectionRowIndex()
-    {
-        Node    parent;
-        
-        parent = getParentNode();
-        if ( parent instanceof HTMLTableSectionElement )
-            return getRowIndex( parent );
-        else
-            return -1;
-    }
-    
-    
-    public void setSectionRowIndex( int sectionRowIndex )
-    {
-        Node    parent;
-        
-        parent = getParentNode();
-        if ( parent instanceof HTMLTableSectionElement )
-            ( (HTMLTableSectionElementImpl) parent ).insertRowX( sectionRowIndex, this );
-    }
-  
-  
-    int getRowIndex( Node parent )
-    {
-        NodeList    rows;
-        int            i;
-        
-        // Use getElementsByTagName() which creates a snapshot of all the
-        // TR elements under the TABLE/section. Access to the returned NodeList
-        // is very fast and the snapshot solves many synchronization problems.
-        rows = ( (HTMLElement) parent ).getElementsByTagName( "TR" );
-        for ( i = 0 ; i < rows.getLength() ; ++i )
-            if ( rows.item( i ) == this )
-                return i;
-        return -1;
-    }
-
-  
-    public HTMLCollection  getCells()
-    {
-        if ( _cells == null )
-            _cells = new HTMLCollectionImpl( this, HTMLCollectionImpl.CELL );
-        return _cells;
-    }
-    
-    
-    public void setCells( HTMLCollection cells )
-    {
-        Node    child;
-        int        i;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            removeChild( child );
-            child = child.getNextSibling();
-        }
-        i = 0;
-        child = cells.item( i );
-        while ( child != null )
-        {
-            appendChild ( child );
-            ++i;
-            child = cells.item( i );
-        }
-    }
-
-  
-    public HTMLElement insertCell( int index )
-    {
-        Node        child;
-        HTMLElement    newCell;
-        
-        newCell = new HTMLTableCellElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TD" );
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableCellElement )
-            {
-                if ( index == 0 )
-                {
-                    insertBefore( newCell, child );
-                    return newCell;
-                }
-                --index;
-            }
-            child = child.getNextSibling();
-        }
-        appendChild( newCell );
-        return newCell;
-    }
-    
-    
-    public void deleteCell( int index )
-    {
-        Node    child;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableCellElement )
-            {
-                if ( index == 0 )
-                {
-                    removeChild ( child );
-                    return;
-                }
-                --index;
-            }
-            child = child.getNextSibling();
-        }
-    }
-
-  
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-
-    
-    public String getBgColor()
-    {
-        return getAttribute( "bgcolor" );
-    }
-    
-    
-    public void setBgColor( String bgColor )
-    {
-        setAttribute( "bgcolor", bgColor );
-    }
-
-  
-    public String getCh()
-    {
-        String    ch;
-        
-        // Make sure that the access key is a single character.
-        ch = getAttribute( "char" );
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        return ch;
-    }
-    
-    
-    public void setCh( String ch )
-    {
-        // Make sure that the access key is a single character.
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        setAttribute( "char", ch );
-    }
-
-    
-    public String getChOff()
-    {
-        return getAttribute( "charoff" );
-    }
-    
-    
-    public void setChOff( String chOff )
-    {
-        setAttribute( "charoff", chOff );
-    }
-  
-  
-    public String getVAlign()
-    {
-        return capitalize( getAttribute( "valign" ) );
-    }
-    
-    
-    public void setVAlign( String vAlign )
-    {
-        setAttribute( "valign", vAlign );
-    }
-
-    
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTableRowElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-  
-  
-    HTMLCollection    _cells;
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLTableSectionElementImpl.java b/src/org/apache/html/dom/HTMLTableSectionElementImpl.java
deleted file mode 100755
index 9e4a9c8..0000000
--- a/src/org/apache/html/dom/HTMLTableSectionElementImpl.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLTableSectionElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTableSectionElementImpl
-    extends HTMLElementImpl
-    implements HTMLTableSectionElement
-{    
-    
-    
-    public String getAlign()
-    {
-        return capitalize( getAttribute( "align" ) );
-    }
-    
-    
-    public void setAlign( String align )
-    {
-        setAttribute( "align", align );
-    }
-      
-    
-    public String getCh()
-    {
-        String    ch;
-        
-        // Make sure that the access key is a single character.
-        ch = getAttribute( "char" );
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        return ch;
-    }
-    
-    
-    public void setCh( String ch )
-    {
-        // Make sure that the access key is a single character.
-        if ( ch != null && ch.length() > 1 )
-            ch = ch.substring( 0, 1 );
-        setAttribute( "char", ch );
-    }
-
-    
-    public String getChOff()
-    {
-        return getAttribute( "charoff" );
-    }
-    
-    
-    public void setChOff( String chOff )
-    {
-        setAttribute( "charoff", chOff );
-    }
-  
-  
-    public String getVAlign()
-    {
-        return capitalize( getAttribute( "valign" ) );
-    }
-    
-    
-    public void setVAlign( String vAlign )
-    {
-        setAttribute( "valign", vAlign );
-    }
-
-    
-    public HTMLCollection getRows()
-    {
-        if ( _rows == null )
-            _rows = new HTMLCollectionImpl( this, HTMLCollectionImpl.ROW );
-        return _rows;
-    }
-    
-    
-    public HTMLElement insertRow( int index )
-    {
-        HTMLTableRowElementImpl    newRow;
-        
-        newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" );
-        newRow.insertCell( 0 );
-        if ( insertRowX( index, newRow ) >= 0 )
-            appendChild( newRow );
-        return newRow;
-    }
-    
-    
-    int insertRowX( int index, HTMLTableRowElementImpl newRow )
-    {
-        Node    child;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableRowElement )
-            {
-                if ( index == 0 )
-                {
-                    insertBefore( newRow, child );
-                    return -1;
-                }
-                --index;
-            }
-            child = child.getNextSibling();
-        }
-        return index;
-    }
-
-    
-    public void deleteRow( int index )
-    {
-        deleteRowX( index );
-    }
-
-    
-    int deleteRowX( int index )
-    {
-        Node    child;
-        
-        child = getFirstChild();
-        while ( child != null )
-        {
-            if ( child instanceof HTMLTableRowElement )
-            {
-                if ( index == 0 )
-                {
-                    removeChild ( child );
-                    return -1;
-                }
-                --index;
-            }
-            child = child.getNextSibling();
-        }
-        return index;
-    }
-
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTableSectionElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-    private HTMLCollectionImpl    _rows;
-
-
-}
-
diff --git a/src/org/apache/html/dom/HTMLTextAreaElementImpl.java b/src/org/apache/html/dom/HTMLTextAreaElementImpl.java
deleted file mode 100755
index 6d8ac4f..0000000
--- a/src/org/apache/html/dom/HTMLTextAreaElementImpl.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLTextAreaElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTextAreaElementImpl
-    extends HTMLElementImpl
-    implements HTMLTextAreaElement, HTMLFormControl
-{
-    
-    
-    public String getDefaultValue()
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        return getAttribute( "default-value" );
-    }
-    
-    
-    public void setDefaultValue( String defaultValue )
-    {
-        // ! NOT FULLY IMPLEMENTED !
-        setAttribute( "default-value", defaultValue );
-    }
-  
-  
-
-    public String getAccessKey()
-    {
-        String    accessKey;
-        
-        // Make sure that the access key is a single character.
-        accessKey = getAttribute( "accesskey" );
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        return accessKey;
-    }
-    
-    
-    public void setAccessKey( String accessKey )
-    {
-        // Make sure that the access key is a single character.
-        if ( accessKey != null && accessKey.length() > 1 )
-            accessKey = accessKey.substring( 0, 1 );
-        setAttribute( "accesskey", accessKey );
-    }
-
-    
-    public int getCols()
-    {
-        return getInteger( getAttribute( "cols" ) );
-    }
-    
-    
-    public void setCols( int cols )
-    {
-        setAttribute( "cols", String.valueOf( cols ) );
-    }
-  
-  
-    public boolean getDisabled()
-    {
-        return getBinary( "disabled" );
-    }
-    
-    
-    public void setDisabled( boolean disabled )
-    {
-        setAttribute( "disabled", disabled );
-    }
-
-    
-    public String getName()
-    {
-        return getAttribute( "name" );
-    }
-    
-    
-    public void setName( String name )
-    {
-        setAttribute( "name", name );
-    }
-
-    
-    public boolean getReadOnly()
-    {
-        return getBinary( "readonly" );
-    }
-    
-    
-    public void setReadOnly( boolean readOnly )
-    {
-        setAttribute( "readonly", readOnly );
-    }
-
-    
-       public int getRows()
-    {
-        return getInteger( getAttribute( "rows" ) );
-    }
-    
-    
-    public void setRows( int rows )
-    {
-        setAttribute( "rows", String.valueOf( rows ) );
-    }
-
-  
-       public int getTabIndex()
-    {
-        return getInteger( getAttribute( "tabindex" ) );
-    }
-    
-    
-    public void setTabIndex( int tabIndex )
-    {
-        setAttribute( "tabindex", String.valueOf( tabIndex ) );
-    }
-
-  
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-
-    
-      public String getValue()
-    {
-        return getAttribute( "value" );
-    }
-    
-    
-    public void setValue( String value )
-    {
-        setAttribute( "value", value );
-    }
-
-    
-    public void blur()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-    
-    
-    public void focus()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-    
-    
-    public void select()
-    {
-        // No scripting in server-side DOM. This method is moot.
-    }
-    
-      
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTextAreaElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLTitleElementImpl.java b/src/org/apache/html/dom/HTMLTitleElementImpl.java
deleted file mode 100755
index 3261df3..0000000
--- a/src/org/apache/html/dom/HTMLTitleElementImpl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLTitleElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLTitleElementImpl
-    extends HTMLElementImpl
-    implements HTMLTitleElement
-{
- 
-    
-    public String getText()
-    {
-        Node    child;
-        String    text;
-        
-        // Find the Text nodes contained within this element and return their
-        // concatenated value. Required to go around comments, entities, etc.
-        child = getFirstChild();
-        text = "";
-        while ( child != null )
-        {
-            if ( child instanceof Text )
-                text = text + ( (Text) child ).getData();
-            child = child.getNextSibling();
-        }
-        return text;
-    }
-    
-    
-    public void setText( String text )
-    {
-        Node    child;
-        Node    next;
-        
-        // Delete all the nodes and replace them with a single Text node.
-        // This is the only approach that can handle comments and other nodes.
-        child = getFirstChild();
-        while ( child != null )
-        {
-            next = child.getNextSibling();
-            removeChild( child );
-            child = next;
-        }
-        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
-    }
-
-        
-      /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLTitleElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/HTMLUListElementImpl.java b/src/org/apache/html/dom/HTMLUListElementImpl.java
deleted file mode 100755
index 7a4b556..0000000
--- a/src/org/apache/html/dom/HTMLUListElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.html.dom;
-
-
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@exoffice.com">Assaf Arkin</a>
- * @see org.w3c.dom.html.HTMLUListElement
- * @see org.apache.xerces.dom.ElementImpl
- */
-public class HTMLUListElementImpl
-    extends HTMLElementImpl
-    implements HTMLUListElement
-{
-    
-    
-    public boolean getCompact()
-    {
-        return getBinary( "compact" );
-    }
-    
-    
-    public void setCompact( boolean compact )
-    {
-        setAttribute( "compact", compact );
-    }
-    
-    
-    public String getType()
-    {
-        return getAttribute( "type" );
-    }
-    
-    
-    public void setType( String type )
-    {
-        setAttribute( "type", type );
-    }
-    
-    
-    /**
-     * Constructor requires owner document.
-     * 
-     * @param owner The owner HTML document
-     */
-    public HTMLUListElementImpl( HTMLDocumentImpl owner, String name )
-    {
-        super( owner, name );
-    }
-
-  
-}
-
diff --git a/src/org/apache/html/dom/NameNodeListImpl.java b/src/org/apache/html/dom/NameNodeListImpl.java
deleted file mode 100644
index 94a6d37..0000000
--- a/src/org/apache/html/dom/NameNodeListImpl.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.html.dom;
-
-import org.w3c.dom.*;
-import java.util.Vector;
-import org.apache.xerces.dom.NodeImpl;
-import org.apache.xerces.dom.ElementImpl;
-import org.apache.xerces.dom.DeepNodeListImpl;
-
-/**
- * This class implements the DOM's NodeList behavior for
- * HTMLDocuemnt.getElementsByName().
- *
- * @version
- * @since  PR-DOM-Level-1-19980818.
- * @see DeepNodeListImpl
- */
-public class NameNodeListImpl 
-    extends DeepNodeListImpl
-    implements NodeList {
-    
-    
-    /** Constructor. */
-    public NameNodeListImpl(NodeImpl rootNode, String tagName) {
-	super( rootNode, tagName );
-    }  
-    
-
-    /** 
-     * Iterative tree-walker. When you have a Parent link, there's often no
-     * need to resort to recursion. NOTE THAT only Element nodes are matched
-     * since we're specifically supporting getElementsByTagName().
-     */
-    protected Node nextMatchingElementAfter(Node current) {
-        
-        Node next;
-        while (current != null) {
-            // Look down to first child.
-            if (current.hasChildNodes()) {
-                current = (current.getFirstChild());
-            }
-            
-            // Look right to sibling (but not from root!)
-            else if (current != rootNode && null != (next = current.getNextSibling())) {
-                current = next;
-            }
-            
-            // Look up and right (but not past root!)
-            else {
-                next = null;
-                for (; current != rootNode; // Stop when we return to starting point
-                     current = current.getParentNode()) {
-                    
-                    next = current.getNextSibling();
-                    if (next != null)
-                        break;
-                }
-                current = next;
-            }
-            
-            // Have we found an Element with the right tagName?
-            // ("*" matches anything.)
-            if (current != rootNode && current != null
-                && current.getNodeType() ==  Node.ELEMENT_NODE  ) {
-                String name = ((ElementImpl) current).getAttribute( "name" );
-                if ( name.equals("*") || name.equals(tagName))
-                    return current;
-            }
-            
-            // Otherwise continue walking the tree
-        }
-        
-        // Fell out of tree-walk; no more instances found
-        return null;
-        
-    } // nextMatchingElementAfter(int):Node
-    
-} // class NameNodeListImpl
diff --git a/src/org/apache/wml/WMLAElement.java b/src/org/apache/wml/WMLAElement.java
deleted file mode 100644
index 9b9c0d6..0000000
--- a/src/org/apache/wml/WMLAElement.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLAElement extends WMLElement {
-
-    public void setHref(String newValue);
-    public String getHref();
-
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    public void setId(String newValue);
-    public String getId();
-
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLAccessElement.java b/src/org/apache/wml/WMLAccessElement.java
deleted file mode 100644
index 8ce55c2..0000000
--- a/src/org/apache/wml/WMLAccessElement.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'access' element specifics the access control for the entire deck
- * (Section 11.3.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLAccessElement extends WMLElement {
-
-    /**
-     * A deck's domain and path attributes specify which deck may
-     * access it.  
-     *
-     * domain attribute is suffix-matched against the domain name
-     * portion of the referring URI 
-     */
-    public void setDomain(String newValue);
-    public String getDomain();
-
-    /**
-     * path attribute is prefix-matched against the path portion of
-     * the referring URI 
-     */
-    public void setPath(String newValue);
-    public String getPath();
-}
diff --git a/src/org/apache/wml/WMLAnchorElement.java b/src/org/apache/wml/WMLAnchorElement.java
deleted file mode 100644
index f8d0e19..0000000
--- a/src/org/apache/wml/WMLAnchorElement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLAnchorElement extends WMLElement {
-
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLBElement.java b/src/org/apache/wml/WMLBElement.java
deleted file mode 100644
index 0a1d152..0000000
--- a/src/org/apache/wml/WMLBElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'b' element boldface the text
- * (Section 11.8.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLBElement extends WMLElement {
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLBigElement.java b/src/org/apache/wml/WMLBigElement.java
deleted file mode 100644
index e7197a2..0000000
--- a/src/org/apache/wml/WMLBigElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'big' element renders the text with big font
- * (Section 11.8.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLBigElement extends WMLElement {
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLBrElement.java b/src/org/apache/wml/WMLBrElement.java
deleted file mode 100644
index 0660125..0000000
--- a/src/org/apache/wml/WMLBrElement.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'br' element starts a new line</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLBrElement extends WMLElement {
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLCardElement.java b/src/org/apache/wml/WMLCardElement.java
deleted file mode 100644
index 599bda6..0000000
--- a/src/org/apache/wml/WMLCardElement.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'card' element is the basic display unit of WML. A WML decks
- * contains a collection of cards.
- * (Section 11.5, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLCardElement extends WMLElement {
-
-    /**
-     * 'onenterbackward' specifies the event to occur when a user
-     * agent into a card using a 'go' task
-     * (Section 11.5.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setOnEnterBackward(String href);
-    public String getOnEnterBackward();
-
-    /**
-     * 'onenterforward' specifies the event to occur when a user
-     * agent into a card using a 'prev' task
-     * (Section 11.5.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setOnEnterForward(String href);
-    public String getOnEnterForward();
-
-    /**
-     * 'onenterbackward' specifies the event to occur when a timer expires
-     * (Section 11.5.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setOnTimer(String href);
-    public String getOnTimer();
-
-    /**
-     * 'title' specifies a advisory info about the card
-     * (Section 11.5.2, WAP WML Version 16-Jun-1999)
-     */
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * 'newcontext' specifies whether a browser context should be
-     * re-initialized upon entering the card. Default to be false.
-     * (Section 11.5.2, WAP WML Version 16-Jun-1999)
-     */
-    public void setNewContext(boolean newValue);
-    public boolean getNewContext();
-    
-    /**
-     *  'ordered' attribute specifies a hit to user agent about the
-     *  organization of the card's content 
-     * (Section 11.5.2, WAP WML Version 16-Jun-1999)
-     */
-    public void setOrdered(boolean newValue);
-    public boolean getOrdered();
-
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLDOMImplementation.java b/src/org/apache/wml/WMLDOMImplementation.java
deleted file mode 100644
index 491ffa0..0000000
--- a/src/org/apache/wml/WMLDOMImplementation.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-import org.w3c.dom.*;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public interface WMLDOMImplementation extends DOMImplementation {
-}
diff --git a/src/org/apache/wml/WMLDoElement.java b/src/org/apache/wml/WMLDoElement.java
deleted file mode 100644
index c5dfd8f..0000000
--- a/src/org/apache/wml/WMLDoElement.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLDoElement extends WMLElement {
-
-    public void setOptional(String newValue);
-    public String getOptional();
-
-    public void setLabel(String newValue);
-    public String getLabel();
-
-    public void setType(String newValue);
-    public String getType();
-
-    public void setName(String newValue);
-    public String getName();
-
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLDocument.java b/src/org/apache/wml/WMLDocument.java
deleted file mode 100644
index 892e907..0000000
--- a/src/org/apache/wml/WMLDocument.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-import org.w3c.dom.*;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLDocument extends Document {
-}
diff --git a/src/org/apache/wml/WMLElement.java b/src/org/apache/wml/WMLElement.java
deleted file mode 100644
index 96b7b3b..0000000
--- a/src/org/apache/wml/WMLElement.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-import org.w3c.dom.Element;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>All WML Elements are derived from this class that contains two
- * core attributes defined in the DTD.</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLElement extends Element {
-
-    /**
-     * The element's identifier which is unique in a single deck. 
-     * (Section 8.9, WAP WML Version 16-Jun-1999)
-     */
-    public void setId(String newValue);
-    public String getId();
-
-    /**
-     * The 'class' attribute of a element that affiliates an elements
-     * with one or more elements.
-     * (Section 8.9, WAP WML Version 16-Jun-1999)
-     */
-    public void setClassName(String newValue);
-    public String getClassName();
-}
diff --git a/src/org/apache/wml/WMLEmElement.java b/src/org/apache/wml/WMLEmElement.java
deleted file mode 100644
index 92304ba..0000000
--- a/src/org/apache/wml/WMLEmElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'em' element emphasis the text
- * (Section 11.8.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLEmElement extends WMLElement {
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLFieldsetElement.java b/src/org/apache/wml/WMLFieldsetElement.java
deleted file mode 100644
index 20ed9c5..0000000
--- a/src/org/apache/wml/WMLFieldsetElement.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'fieldset' element groups related fields and tet 
- * (Section 11.6.4, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public interface WMLFieldsetElement extends WMLElement {
-
-    /**
-     * 'title' specifies a title for this element
-     */
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLGoElement.java b/src/org/apache/wml/WMLGoElement.java
deleted file mode 100644
index ef37e8f..0000000
--- a/src/org/apache/wml/WMLGoElement.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLGoElement extends WMLElement {
-
-  public void setSendreferer(String newValue);
-
-  public String getSendreferer();
-
-  public void setAcceptCharset(String newValue);
-
-  public String getAcceptCharset();
-
-  public void setHref(String newValue);
-
-  public String getHref();
-
-  public void setMethod(String newValue);
-
-  public String getMethod();
-
-}
diff --git a/src/org/apache/wml/WMLHeadElement.java b/src/org/apache/wml/WMLHeadElement.java
deleted file mode 100644
index 14f0d7e..0000000
--- a/src/org/apache/wml/WMLHeadElement.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>The head element contains information about a deck.
- * (Section 11.3, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLHeadElement extends WMLElement {
-}
diff --git a/src/org/apache/wml/WMLIElement.java b/src/org/apache/wml/WMLIElement.java
deleted file mode 100644
index 787cdc6..0000000
--- a/src/org/apache/wml/WMLIElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'i' italic the text
- * (Section 11.8.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLIElement extends WMLElement {
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLImgElement.java b/src/org/apache/wml/WMLImgElement.java
deleted file mode 100644
index b0773a6..0000000
--- a/src/org/apache/wml/WMLImgElement.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'img' specifies an image in a text flow
- * (Section 11.9, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public interface WMLImgElement extends WMLElement {
-
-    /**
-     * 'alt' specifies an alternative text for the image
-     * (Section 11.9, WAP WML Version 16-Jun-1999)
-     */
-    public void setAlt(String newValue);
-    public String getAlt();
-
-    /**
-     * 'src' specifies URI for the source images
-     * (Section 11.9, WAP WML Version 16-Jun-1999)
-     */
-    public void setSrc(String newValue);
-    public String getSrc();
-
-    /**
-     * 'localsrc' specifies an alternative internal representation of
-     * the image.
-     * (Section 11.9, WAP WML Version 16-Jun-1999) 
-     */
-    public void setLocalSrc(String newValue);
-    public String getLocalSrc();
-
-    /**
-     * 'vspace' specifies the abount of white space to be inserted
-     * above and below
-     * (Section 11.9, WAP WML Version 16-Jun-1999) 
-     */
-    public void setVspace(String newValue);
-    public String getVspace();
-
-    /**
-     * 'hspace' specifies the abount of white space to be inserted
-     * left and right
-     * (Section 11.9, WAP WML Version 16-Jun-1999) 
-     */
-    public void setHspace(String newValue);
-    public String getHspace();
-
-    /**
-     * 'align' specifies the alignment of the image within the text
-     * flow.
-     * (Section 11.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setAlign(String newValue);
-    public String getAlign();
-
-    /**
-     * 'width' specifies the width of an image.
-     * (Section 11.9, WAP WML Version 16-Jun-1999)
-     */
-    public void setWidth(String newValue);
-    public String getWidth();
-
-    /**
-     * 'height' specifies the height of an image.
-     * (Section 11.9, WAP WML Version 16-Jun-1999)
-     */
-    public void setHeight(String newValue);
-    public String getHeight();
-
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLInputElement.java b/src/org/apache/wml/WMLInputElement.java
deleted file mode 100644
index 8bff3a5..0000000
--- a/src/org/apache/wml/WMLInputElement.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'input' element specifies a text entry object.
- * (Section 11.6.3, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLInputElement extends WMLElement {
-
-    /**
-     * 'name' specifies the name of a variable after the user enters the text.
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setName(String newValue);
-    public String getName();
-
-    /**
-     * 'value' specifies the default value of the variable in 'name' attribute
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setValue(String newValue);
-    public String getValue();
-
-    /**
-     * 'type' specifies the type of text input area. 
-     * Two values are allowed: 'text' and 'password' and default is 'text'
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setType(String newValue);
-    public String getType();
-
-    /**
-     * 'format' specifies the input mask for user input.
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setFormat(String newValue);
-    public String getFormat();
-
-    /**
-     * 'emptyok' specifies whether a empty input is allowed when a
-     * non-empty 'format' is specified. Default to be 'false'
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setEmptyOk(boolean newValue);
-    public boolean getEmptyOk();
-
-    /**
-     * 'size' specifies the width of the input in characters
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setSize(int newValue);
-    public int getSize();
-
-    /**
-     * 'maxlength' specifies the maximum number of characters to be
-     * enter.
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999) 
-     */
-    public void setMaxLength(int newValue);
-    public int getMaxLength();
-
-    /**
-     * 'title' specifies a title for this element
-     * (Section 11.6.3, WAP WML Version 16-Jun-1999) 
-     */
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * 'tabindex' specifies the tabbing position of the element
-     * (Section 11.6.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setTabIndex(int newValue);
-    public int getTabIndex();
-
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLMetaElement.java b/src/org/apache/wml/WMLMetaElement.java
deleted file mode 100644
index bdda8a9..0000000
--- a/src/org/apache/wml/WMLMetaElement.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>The meta element contains meta-info of an WML deck
- * (Section 11.3.2, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public interface WMLMetaElement extends WMLElement {
-
-    /**
-     * 'name' attribute specific the property name
-     */
-    public void setName(String newValue);
-    public String getName();
-
-    /**
-     * 'http-equiv' attribute indicates the property should be
-     * interpret as HTTP header.
-     */
-    public void setHttpEquiv(String newValue);
-    public String getHttpEquiv();
-
-    /**
-     * 'forua' attribute specifies whether a intermediate agent should
-     * remove this meta element. A value of false means the
-     * intermediate agent must remove the element.
-     */
-    public void setForua(boolean newValue);
-    public boolean getForua();
-
-    /**
-     * 'scheme' attribute specifies a form that may be used to
-     * interpret the property value 
-     */
-    public void setScheme(String newValue);
-    public String getScheme();
-
-    /**
-     * 'content' attribute specifies the property value 
-     */
-    public void setContent(String newValue);
-    public String getContent();
-}
diff --git a/src/org/apache/wml/WMLNoopElement.java b/src/org/apache/wml/WMLNoopElement.java
deleted file mode 100644
index b37dad8..0000000
--- a/src/org/apache/wml/WMLNoopElement.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public interface WMLNoopElement extends WMLElement {
-}
diff --git a/src/org/apache/wml/WMLOneventElement.java b/src/org/apache/wml/WMLOneventElement.java
deleted file mode 100644
index 7ca4c18..0000000
--- a/src/org/apache/wml/WMLOneventElement.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLOneventElement extends WMLElement {
-
-  public void setType(String newValue);
-
-  public String getType();
-
-}
diff --git a/src/org/apache/wml/WMLOptgroupElement.java b/src/org/apache/wml/WMLOptgroupElement.java
deleted file mode 100644
index fac2ca0..0000000
--- a/src/org/apache/wml/WMLOptgroupElement.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'optgroup' element groups related 'option' elements into a
- * hierarchy. (Section 11.6.2.2, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLOptgroupElement extends WMLElement {
-
-    /**
-     * 'title' specifies the title of this element
-     * (Section 11.6.2.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLOptionElement.java b/src/org/apache/wml/WMLOptionElement.java
deleted file mode 100644
index 67d20cc..0000000
--- a/src/org/apache/wml/WMLOptionElement.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'option' element specifies a choice in a 'select' element</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLOptionElement extends WMLElement {
-
-    /**
-     * 'value' specifies the value to used to set the 'name' variable
-     * (Section 11.6.2.2, WAP WML Version 16-Jun-1999)
-     */
-    public void setValue(String newValue);
-    public String getValue();
-
-    /**
-     * 'title' specifies a title for this element.
-     * (Section 11.6.2.2, WAP WML Version 16-Jun-1999)
-     */
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * 'onpick' specifies a event to occur when a user select and
-     * disselect this choice.
-     * (Section 11.6.2.2, WAP WML Version 16-Jun-1999) */
-    public void setOnPick(String href);
-    public String getOnPick();
-
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLPElement.java b/src/org/apache/wml/WMLPElement.java
deleted file mode 100644
index a4de57d..0000000
--- a/src/org/apache/wml/WMLPElement.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'p' element specifies a paragraph
- * (Section 11.8.3, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLPElement extends WMLElement {
-
-    /**
-     * 'mode' specifies the wrapping mode of the paragraph.
-     * The legal values are 'wrap' and 'nowrap'
-     * (Section 11.8.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setMode(String newValue);
-    public String getMode();
-
-    /**
-     * 'align' specifies the align of teh paragraph
-     * The legal values are 'left,' 'center,' and 'right'
-     * (Section 11.8.3, WAP WML Version 16-Jun-1999)
-     */
-    public void setAlign(String newValue);
-    public String getAlign();
-
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLPostfieldElement.java b/src/org/apache/wml/WMLPostfieldElement.java
deleted file mode 100644
index 60654c0..0000000
--- a/src/org/apache/wml/WMLPostfieldElement.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLPostfieldElement extends WMLElement {
-
-  public void setValue(String newValue);
-
-  public String getValue();
-
-  public void setName(String newValue);
-
-  public String getName();
-
-}
diff --git a/src/org/apache/wml/WMLPrevElement.java b/src/org/apache/wml/WMLPrevElement.java
deleted file mode 100644
index d359c47..0000000
--- a/src/org/apache/wml/WMLPrevElement.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLPrevElement extends WMLElement {
-}
diff --git a/src/org/apache/wml/WMLRefreshElement.java b/src/org/apache/wml/WMLRefreshElement.java
deleted file mode 100644
index 4ddb775..0000000
--- a/src/org/apache/wml/WMLRefreshElement.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLRefreshElement extends WMLElement {
-}
diff --git a/src/org/apache/wml/WMLSelectElement.java b/src/org/apache/wml/WMLSelectElement.java
deleted file mode 100644
index 7f65d7a..0000000
--- a/src/org/apache/wml/WMLSelectElement.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'select' element lets user pick from a list of options.
- * (Section 11.6.2.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public interface WMLSelectElement extends WMLElement {
-    
-    /**
-     * 'tabindex' specifies the tabbing position of the element
-     * (Section 11.6.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setTabIndex(int newValue);
-    public int getTabIndex();
-
-    /**
-     * 'multiple' indicates whether a list accept multiple selection
-     * (Section 11.6.2.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setMultiple(boolean newValue);
-    public boolean getMultiple();
-
-    /**
-     * 'name' specifies the name of variable to be set.
-     * (Section 11.6.2.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setName(String newValue);
-    public String getName();
-
-    /**
-     * 'value' specifics the default value of the variable of 'name'
-     * (Section 11.6.2.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setValue(String newValue);
-    public String getValue();
-
-    /**
-     * 'title' specifies a title for this element
-     * (Section 11.6.2.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * 'iname' specifies name of variable to be set with the index
-     * result of selection.  
-     * (Section 11.6.2.1, WAP WML Version 16-Jun-1999)
-     */
-    public void setIName(String newValue);
-    public String getIName();
-
-    /**
-     * 'ivalue' specifies the default of the variable 'iname'
-     */
-    public void setIValue(String newValue);
-    public String getIValue();
-
-    /**
-     * 'xml:lang' specifics the natural or formal language in which
-     * the document is written.  
-     * (Section 8.8, WAP WML Version 16-Jun-1999) 
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLSetvarElement.java b/src/org/apache/wml/WMLSetvarElement.java
deleted file mode 100644
index d3f39ad..0000000
--- a/src/org/apache/wml/WMLSetvarElement.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLSetvarElement extends WMLElement {
-
-  public void setValue(String newValue);
-
-  public String getValue();
-
-  public void setName(String newValue);
-
-  public String getName();
-
-}
diff --git a/src/org/apache/wml/WMLSmallElement.java b/src/org/apache/wml/WMLSmallElement.java
deleted file mode 100644
index 8211284..0000000
--- a/src/org/apache/wml/WMLSmallElement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-/**
- * 'small' render the text with small font
- * (Section 11.8.1, WAP WML Version 16-Jun-1999)
- */
-public interface WMLSmallElement extends WMLElement {
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLStrongElement.java b/src/org/apache/wml/WMLStrongElement.java
deleted file mode 100644
index cc48123..0000000
--- a/src/org/apache/wml/WMLStrongElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'strong' strongly emphasis the text
- * (Section 11.8.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLStrongElement extends WMLElement {
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLTableElement.java b/src/org/apache/wml/WMLTableElement.java
deleted file mode 100644
index 8afd7f2..0000000
--- a/src/org/apache/wml/WMLTableElement.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'table' create a set of aligned columns of text and images.
- * (Section 11.8.5, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLTableElement extends WMLElement {
-
-    /**
-     * 'title' specifies a title for the table
-     * (Section 11.8.5, WAP WML Version 16-Jun-1999)
-     */
-    public void setTitle(String newValue);
-    public String getTitle();
-
-    /**
-     * 'align' set the align of the table
-     * (Section 11.8.5, WAP WML Version 16-Jun-1999)
-     */
-    public void setAlign(String newValue);
-    public String getAlign();
-
-    /**
-     * 'columns' specifies the number of columns
-     * (Section 11.8.5, WAP WML Version 16-Jun-1999)
-     */
-    public void setColumns(int newValue);
-    public int getColumns();
-
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLTdElement.java b/src/org/apache/wml/WMLTdElement.java
deleted file mode 100644
index 118f3fe..0000000
--- a/src/org/apache/wml/WMLTdElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'td' specifies a single table cell with in a row
- * (Section 11.8.6, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLTdElement extends WMLElement {
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLTemplateElement.java b/src/org/apache/wml/WMLTemplateElement.java
deleted file mode 100644
index 166145d..0000000
--- a/src/org/apache/wml/WMLTemplateElement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>The 'template' element declares a template for the cards in the deck.</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLTemplateElement extends WMLElement {
-
-    public void setOnTimer(String newValue);
-    public String getOnTimer();
-
-    public void setOnEnterBackward(String newValue);
-    public String getOnEnterBackward();
-
-    public void setOnEnterForward(String newValue);
-    public String getOnEnterForward();
-}
diff --git a/src/org/apache/wml/WMLTimerElement.java b/src/org/apache/wml/WMLTimerElement.java
deleted file mode 100644
index 44b0017..0000000
--- a/src/org/apache/wml/WMLTimerElement.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'timer' elements declares a card timer.
- * (Section 11.6.7, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLTimerElement extends WMLElement {
-    /**
-     * 'name' specifies the name of variable ot be set with the value
-     * of the timer.
-     * (Section 11.6.7, WAP WML Version 16-Jun-1999)
-     */
-    public void setName(String newValue);
-    public String getName();
-
-    /**
-     * 'value' indicates teh default of the variable 'name'
-     * (Section 11.6.7, WAP WML Version 16-Jun-1999)
-     */
-    public void setValue(String newValue);
-    public String getValue();
-}
diff --git a/src/org/apache/wml/WMLTrElement.java b/src/org/apache/wml/WMLTrElement.java
deleted file mode 100644
index df83b39..0000000
--- a/src/org/apache/wml/WMLTrElement.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'tr' specifies a single row
- * (Section 11.8.6, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLTrElement extends WMLElement {
-}
diff --git a/src/org/apache/wml/WMLUElement.java b/src/org/apache/wml/WMLUElement.java
deleted file mode 100644
index b2716e5..0000000
--- a/src/org/apache/wml/WMLUElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'u' underline the text
- * (Section 11.8.1, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLUElement extends WMLElement {
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/WMLWmlElement.java b/src/org/apache/wml/WMLWmlElement.java
deleted file mode 100644
index 1eee436..0000000
--- a/src/org/apache/wml/WMLWmlElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml;
-
-/**
- * <p>The interface is modeled after DOM1 Spec for HTML from W3C.
- * The DTD used in this DOM model is from 
- * <a href="http://www.wapforum.org/DTD/wml_1.1.xml">
- * http://www.wapforum.org/DTD/wml_1.1.xml</a></p>
- *
- * <p>'wml' is the root oot of a WML document.
- * (Section 11.2, WAP WML Version 16-Jun-1999)</p>
- *
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public interface WMLWmlElement extends WMLElement {
-    /**
-     * The xml:lang that specifics the natural or formal language in
-     * which the document is written.
-     * (Section 8.8, WAP WML Version 16-Jun-1999)
-     */
-    public void setXmlLang(String newValue);
-    public String getXmlLang();
-}
diff --git a/src/org/apache/wml/dom/WMLAElementImpl.java b/src/org/apache/wml/dom/WMLAElementImpl.java
deleted file mode 100644
index c7965d8..0000000
--- a/src/org/apache/wml/dom/WMLAElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLAElementImpl extends WMLElementImpl implements WMLAElement {
-
-  public WMLAElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setHref(String newValue) {
-    setAttribute("href", newValue);
-  }
-
-  public String getHref() {
-    return getAttribute("href");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setTitle(String newValue) {
-    setAttribute("title", newValue);
-  }
-
-  public String getTitle() {
-    return getAttribute("title");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLAccessElementImpl.java b/src/org/apache/wml/dom/WMLAccessElementImpl.java
deleted file mode 100644
index 12bea44..0000000
--- a/src/org/apache/wml/dom/WMLAccessElementImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLAccessElementImpl extends WMLElementImpl implements WMLAccessElement {
-
-  public WMLAccessElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setDomain(String newValue) {
-    setAttribute("domain", newValue);
-  }
-
-  public String getDomain() {
-    return getAttribute("domain");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setPath(String newValue) {
-    setAttribute("path", newValue);
-  }
-
-  public String getPath() {
-    return getAttribute("path");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLAnchorElementImpl.java b/src/org/apache/wml/dom/WMLAnchorElementImpl.java
deleted file mode 100644
index df87ed9..0000000
--- a/src/org/apache/wml/dom/WMLAnchorElementImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLAnchorElementImpl extends WMLElementImpl implements WMLAnchorElement {
-
-  public WMLAnchorElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setTitle(String newValue) {
-    setAttribute("title", newValue);
-  }
-
-  public String getTitle() {
-    return getAttribute("title");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLBElementImpl.java b/src/org/apache/wml/dom/WMLBElementImpl.java
deleted file mode 100644
index 79dbaa1..0000000
--- a/src/org/apache/wml/dom/WMLBElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLBElementImpl extends WMLElementImpl implements WMLBElement {
-
-  public WMLBElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLBigElementImpl.java b/src/org/apache/wml/dom/WMLBigElementImpl.java
deleted file mode 100644
index 621117f..0000000
--- a/src/org/apache/wml/dom/WMLBigElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLBigElementImpl extends WMLElementImpl implements WMLBigElement {
-
-  public WMLBigElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLBrElementImpl.java b/src/org/apache/wml/dom/WMLBrElementImpl.java
deleted file mode 100644
index bbcdd97..0000000
--- a/src/org/apache/wml/dom/WMLBrElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLBrElementImpl extends WMLElementImpl implements WMLBrElement {
-
-  public WMLBrElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLCardElementImpl.java b/src/org/apache/wml/dom/WMLCardElementImpl.java
deleted file mode 100644
index 55150fe..0000000
--- a/src/org/apache/wml/dom/WMLCardElementImpl.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLCardElementImpl extends WMLElementImpl implements WMLCardElement {
-
-    public WMLCardElementImpl (WMLDocumentImpl owner, String tagName) {
-	super( owner, tagName);
-    }
-
-    public void setOnTimer(String newValue) {
-	setAttribute("ontimer", newValue);
-    }
-
-    public String getOnTimer() {
-	return getAttribute("ontimer");
-    }
-
-    public void setOrdered(boolean newValue) {
-	setAttribute("ordered", newValue);
-    }
-
-    public boolean getOrdered() {
-	return getAttribute("ordered", true);
-    }
-
-    public void setOnEnterBackward(String newValue) {
-	setAttribute("onenterbackward", newValue);
-    }
-
-    public String getOnEnterBackward() {
-	return getAttribute("onenterbackward");
-    }
-
-    public void setClassName(String newValue) {
-	setAttribute("class", newValue);
-    }
-
-    public String getClassName() {
-	return getAttribute("class");
-    }
-
-    public void setXmlLang(String newValue) {
-	setAttribute("xml:lang", newValue);
-    }
-
-    public String getXmlLang() {
-	return getAttribute("xml:lang");
-    }
-
-    public void setTitle(String newValue) {
-	setAttribute("title", newValue);
-    }
-
-    public String getTitle() {
-	return getAttribute("title");
-    }
-
-    public void setNewContext(boolean newValue) {
-	setAttribute("newcontext", newValue);
-    }
-
-    public boolean getNewContext() {
-	return getAttribute("newcontext", false);
-    }
-
-    public void setId(String newValue) {
-	setAttribute("id", newValue);
-    }
-
-    public String getId() {
-	return getAttribute("id");
-    }
-
-    public void setOnEnterForward(String newValue) {
-	setAttribute("onenterforward", newValue);
-    }
-
-    public String getOnEnterForward() {
-	return getAttribute("onenterforward");
-    }
-
-}
diff --git a/src/org/apache/wml/dom/WMLDOMImplementationImpl.java b/src/org/apache/wml/dom/WMLDOMImplementationImpl.java
deleted file mode 100644
index 31b8db5..0000000
--- a/src/org/apache/wml/dom/WMLDOMImplementationImpl.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-import org.w3c.dom.*;
-import org.apache.xerces.dom.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLDOMImplementationImpl extends DOMImplementationImpl implements WMLDOMImplementation {
-
-    static DOMImplementationImpl singleton = new WMLDOMImplementationImpl();
-
-    /** NON-DOM: Obtain and return the single shared object */
-    public static DOMImplementation getDOMImplementation() {
-        return singleton;
-    }  
-
-    /**
-     * @see org.w3c.dom.DOMImplementation
-     */
-    public Document createDocument(String namespaceURI, 
-				   String qualifiedName, 
-				   DocumentType doctype) throws DOMException {
-        DocumentImpl doc = new WMLDocumentImpl(doctype);
-        //((DocumentTypeImpl)doctype).ownerDocument = doc;
-        Element e = doc.createElementNS( namespaceURI, qualifiedName);
-        doc.appendChild(e);
-        return doc;
-    }
-}
-
diff --git a/src/org/apache/wml/dom/WMLDoElementImpl.java b/src/org/apache/wml/dom/WMLDoElementImpl.java
deleted file mode 100644
index eb3596d..0000000
--- a/src/org/apache/wml/dom/WMLDoElementImpl.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLDoElementImpl extends WMLElementImpl implements WMLDoElement {
-
-  public WMLDoElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setOptional(String newValue) {
-    setAttribute("optional", newValue);
-  }
-
-  public String getOptional() {
-    return getAttribute("optional");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setLabel(String newValue) {
-    setAttribute("label", newValue);
-  }
-
-  public String getLabel() {
-    return getAttribute("label");
-  }
-
-  public void setType(String newValue) {
-    setAttribute("type", newValue);
-  }
-
-  public String getType() {
-    return getAttribute("type");
-  }
-
-  public void setName(String newValue) {
-    setAttribute("name", newValue);
-  }
-
-  public String getName() {
-    return getAttribute("name");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLDocumentImpl.java b/src/org/apache/wml/dom/WMLDocumentImpl.java
deleted file mode 100644
index 5d18dd7..0000000
--- a/src/org/apache/wml/dom/WMLDocumentImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import java.io.*;
-import java.util.*;
-import java.lang.reflect.*;
-import org.w3c.dom.*;
-import org.w3c.dom.html.*;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.dom.NodeImpl;
-import org.apache.xerces.dom.AttrImpl;
-import org.w3c.dom.DOMException;
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLDocumentImpl extends DocumentImpl implements WMLDocument {
-
-    private static Hashtable        _elementTypesWML;
-    private static final Class[]    _elemClassSigWML =
-	new Class[] { WMLDocumentImpl.class, String.class };
-
-    public Element createElement( String tagName ) throws DOMException
-    {
-        Class        elemClass;
-        Constructor    cnst;
-
-        elemClass = (Class) _elementTypesWML.get( tagName );
-        if ( elemClass != null ) {
-            try	{
-                cnst = elemClass.getConstructor( _elemClassSigWML );
-                return (Element) cnst.newInstance( new Object[] { this, tagName } );
-            } catch ( Exception except ) {
-                Throwable thrw;
-
-                if ( except instanceof java.lang.reflect.InvocationTargetException )
-                    thrw = ( (java.lang.reflect.InvocationTargetException) except ).getTargetException();
-                else
-                    thrw = except;
-
-                System.out.println( "Exception " + thrw.getClass().getName() );
-                System.out.println( thrw.getMessage() );
-
-                throw new IllegalStateException( "Tag '" + tagName + "' associated with an Element class that failed to construct." );
-            }
-        }
-        return new WMLElementImpl( this, tagName );
-    }
-
-    static {
-	_elementTypesWML = new Hashtable();
-	_elementTypesWML.put("b", WMLBElementImpl.class);
-	_elementTypesWML.put("noop", WMLNoopElementImpl.class);
-	_elementTypesWML.put("a", WMLAElementImpl.class);
-	_elementTypesWML.put("setvar", WMLSetvarElementImpl.class);
-	_elementTypesWML.put("access", WMLAccessElementImpl.class);
-	_elementTypesWML.put("strong", WMLStrongElementImpl.class);
-	_elementTypesWML.put("postfield", WMLPostfieldElementImpl.class);
-	_elementTypesWML.put("do", WMLDoElementImpl.class);
-	_elementTypesWML.put("wml", WMLWmlElementImpl.class);
-	_elementTypesWML.put("tr", WMLTrElementImpl.class);
-	_elementTypesWML.put("go", WMLGoElementImpl.class);
-	_elementTypesWML.put("big", WMLBigElementImpl.class);
-	_elementTypesWML.put("anchor", WMLAnchorElementImpl.class);
-	_elementTypesWML.put("timer", WMLTimerElementImpl.class);
-	_elementTypesWML.put("small", WMLSmallElementImpl.class);
-	_elementTypesWML.put("optgroup", WMLOptgroupElementImpl.class);
-	_elementTypesWML.put("head", WMLHeadElementImpl.class);
-	_elementTypesWML.put("td", WMLTdElementImpl.class);
-	_elementTypesWML.put("fieldset", WMLFieldsetElementImpl.class);
-	_elementTypesWML.put("img", WMLImgElementImpl.class);
-	_elementTypesWML.put("refresh", WMLRefreshElementImpl.class);
-	_elementTypesWML.put("onevent", WMLOneventElementImpl.class);
-	_elementTypesWML.put("input", WMLInputElementImpl.class);
-	_elementTypesWML.put("prev", WMLPrevElementImpl.class);
-	_elementTypesWML.put("table", WMLTableElementImpl.class);
-	_elementTypesWML.put("meta", WMLMetaElementImpl.class);
-	_elementTypesWML.put("template", WMLTemplateElementImpl.class);
-	_elementTypesWML.put("br", WMLBrElementImpl.class);
-	_elementTypesWML.put("option", WMLOptionElementImpl.class);
-	_elementTypesWML.put("u", WMLUElementImpl.class);
-	_elementTypesWML.put("p", WMLPElementImpl.class);
-	_elementTypesWML.put("select", WMLSelectElementImpl.class);
-	_elementTypesWML.put("em", WMLEmElementImpl.class);
-	_elementTypesWML.put("i", WMLIElementImpl.class);
-	_elementTypesWML.put("card", WMLCardElementImpl.class);       
-    }
-
-    
-    /* DOM level 2 */
-    public WMLDocumentImpl(DocumentType doctype) {
-        super(doctype, false);
-    }
-}
diff --git a/src/org/apache/wml/dom/WMLElementImpl.java b/src/org/apache/wml/dom/WMLElementImpl.java
deleted file mode 100644
index 24a3cda..0000000
--- a/src/org/apache/wml/dom/WMLElementImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.xerces.dom.ElementImpl;
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public class WMLElementImpl extends ElementImpl implements WMLElement {
-
-    public WMLElementImpl (WMLDocumentImpl owner, String tagName) {
-	super(owner, tagName);
-    }
-
-    public void setClassName(String newValue) {
-	setAttribute("class", newValue);
-    }
-
-    public String getClassName() {
-	return getAttribute("class");
-    }
-
-    public void setXmlLang(String newValue) {
-	setAttribute("xml:lang", newValue);
-    }
-
-    public String getXmlLang() {
-	return getAttribute("xml:lang");
-    }
-
-    public void setId(String newValue) {
-	setAttribute("id", newValue);
-    }
-    
-    public String getId() {
-	return getAttribute("id");
-    }
-
-    void setAttribute(String attr, boolean value) {
-	setAttribute(attr, value ? "true" : "false");
-    }
-
-    boolean getAttribute(String attr, boolean defaultValue) {
-	boolean ret = defaultValue;
-	String value;
-	if (((value = getAttribute("emptyok")) != null) 
-	    && value.equals("true"))
-	    ret = true;
-	return ret;
-    }
-
-    void setAttribute(String attr, int value) {
-	setAttribute(attr, value + "");
-    }
-
-    int getAttribute(String attr, int defaultValue) {
-	int ret = defaultValue;
-	String value;
-	if ((value = getAttribute("emptyok")) != null)
-	    ret = Integer.parseInt(value);
-	return ret;
-    }
-}
diff --git a/src/org/apache/wml/dom/WMLEmElementImpl.java b/src/org/apache/wml/dom/WMLEmElementImpl.java
deleted file mode 100644
index c2d573d..0000000
--- a/src/org/apache/wml/dom/WMLEmElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLEmElementImpl extends WMLElementImpl implements WMLEmElement {
-
-  public WMLEmElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLFieldsetElementImpl.java b/src/org/apache/wml/dom/WMLFieldsetElementImpl.java
deleted file mode 100644
index 2e09b07..0000000
--- a/src/org/apache/wml/dom/WMLFieldsetElementImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLFieldsetElementImpl extends WMLElementImpl implements WMLFieldsetElement {
-
-  public WMLFieldsetElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setTitle(String newValue) {
-    setAttribute("title", newValue);
-  }
-
-  public String getTitle() {
-    return getAttribute("title");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLGoElementImpl.java b/src/org/apache/wml/dom/WMLGoElementImpl.java
deleted file mode 100644
index 8883565..0000000
--- a/src/org/apache/wml/dom/WMLGoElementImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLGoElementImpl extends WMLElementImpl implements WMLGoElement {
-
-  public WMLGoElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setSendreferer(String newValue) {
-    setAttribute("sendreferer", newValue);
-  }
-
-  public String getSendreferer() {
-    return getAttribute("sendreferer");
-  }
-
-  public void setAcceptCharset(String newValue) {
-    setAttribute("accept-charset", newValue);
-  }
-
-  public String getAcceptCharset() {
-    return getAttribute("accept-charset");
-  }
-
-  public void setHref(String newValue) {
-    setAttribute("href", newValue);
-  }
-
-  public String getHref() {
-    return getAttribute("href");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setMethod(String newValue) {
-    setAttribute("method", newValue);
-  }
-
-  public String getMethod() {
-    return getAttribute("method");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLHeadElementImpl.java b/src/org/apache/wml/dom/WMLHeadElementImpl.java
deleted file mode 100644
index d8a24e1..0000000
--- a/src/org/apache/wml/dom/WMLHeadElementImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLHeadElementImpl extends WMLElementImpl implements WMLHeadElement {
-
-  public WMLHeadElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLIElementImpl.java b/src/org/apache/wml/dom/WMLIElementImpl.java
deleted file mode 100644
index fbcb2c6..0000000
--- a/src/org/apache/wml/dom/WMLIElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLIElementImpl extends WMLElementImpl implements WMLIElement {
-
-  public WMLIElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLImgElementImpl.java b/src/org/apache/wml/dom/WMLImgElementImpl.java
deleted file mode 100644
index 6fe6039..0000000
--- a/src/org/apache/wml/dom/WMLImgElementImpl.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLImgElementImpl extends WMLElementImpl implements WMLImgElement {
-
-  public WMLImgElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setWidth(String newValue) {
-    setAttribute("width", newValue);
-  }
-
-  public String getWidth() {
-    return getAttribute("width");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setLocalSrc(String newValue) {
-    setAttribute("localsrc", newValue);
-  }
-
-  public String getLocalSrc() {
-    return getAttribute("localsrc");
-  }
-
-  public void setHeight(String newValue) {
-    setAttribute("height", newValue);
-  }
-
-  public String getHeight() {
-    return getAttribute("height");
-  }
-
-  public void setAlign(String newValue) {
-    setAttribute("align", newValue);
-  }
-
-  public String getAlign() {
-    return getAttribute("align");
-  }
-
-  public void setVspace(String newValue) {
-    setAttribute("vspace", newValue);
-  }
-
-  public String getVspace() {
-    return getAttribute("vspace");
-  }
-
-  public void setAlt(String newValue) {
-    setAttribute("alt", newValue);
-  }
-
-  public String getAlt() {
-    return getAttribute("alt");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setHspace(String newValue) {
-    setAttribute("hspace", newValue);
-  }
-
-  public String getHspace() {
-    return getAttribute("hspace");
-  }
-
-  public void setSrc(String newValue) {
-    setAttribute("src", newValue);
-  }
-
-  public String getSrc() {
-    return getAttribute("src");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLInputElementImpl.java b/src/org/apache/wml/dom/WMLInputElementImpl.java
deleted file mode 100644
index 4c52e52..0000000
--- a/src/org/apache/wml/dom/WMLInputElementImpl.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLInputElementImpl extends WMLElementImpl implements WMLInputElement {
-
-    public WMLInputElementImpl (WMLDocumentImpl owner, String tagName) {
-	super( owner, tagName);
-    }
-
-    public void setSize(int newValue) {
-	setAttribute("size", newValue);
-    }
-
-    public int getSize() {
-	return getAttribute("size", 0);
-    }
-
-    public void setFormat(String newValue) {
-	setAttribute("format", newValue);
-    }
-
-    public String getFormat() {
-	return getAttribute("format");
-    }
-
-    public void setValue(String newValue) {
-	setAttribute("value", newValue);
-    }
-
-    public String getValue() {
-	return getAttribute("value");
-    }
-
-    public void setMaxLength(int newValue) {
-	setAttribute("maxlength", newValue);
-    }
-
-    public int getMaxLength() {
-	return getAttribute("maxlength", 0);
-    }
-
-    public void setTabIndex(int newValue) {
-	setAttribute("tabindex", newValue);
-    }
-
-    public int getTabIndex() {
-	return getAttribute("tabindex", 0);
-    }
-
-    public void setClassName(String newValue) {
-	setAttribute("class", newValue);
-    }
-
-    public String getClassName() {
-	return getAttribute("class");
-    }
-
-    public void setXmlLang(String newValue) {
-	setAttribute("xml:lang", newValue);
-    }
-
-    public String getXmlLang() {
-	return getAttribute("xml:lang");
-    }
-
-    public void setEmptyOk(boolean newValue) {
-	setAttribute("emptyok", newValue);
-    }
-
-    public boolean getEmptyOk() {
-	return getAttribute("emptyok", false);
-    }
-
-    public void setTitle(String newValue) {
-	setAttribute("title", newValue);
-    }
-
-    public String getTitle() {
-	return getAttribute("title");
-    }
-
-    public void setId(String newValue) {
-	setAttribute("id", newValue);
-    }
-
-    public String getId() {
-	return getAttribute("id");
-    }
-
-    public void setType(String newValue) {
-	setAttribute("type", newValue);
-    }
-
-    public String getType() {
-	return getAttribute("type");
-    }
-
-    public void setName(String newValue) {
-	setAttribute("name", newValue);
-    }
-
-    public String getName() {
-	return getAttribute("name");
-    }
-
-}
diff --git a/src/org/apache/wml/dom/WMLMetaElementImpl.java b/src/org/apache/wml/dom/WMLMetaElementImpl.java
deleted file mode 100644
index b594788..0000000
--- a/src/org/apache/wml/dom/WMLMetaElementImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public class WMLMetaElementImpl extends WMLElementImpl implements WMLMetaElement {
-
-    public WMLMetaElementImpl (WMLDocumentImpl owner, String tagName) {
-	super( owner, tagName);
-    }
-
-    public void setForua(boolean newValue) {
-	setAttribute("forua", newValue);
-    }
-
-    public boolean getForua() {
-	return getAttribute("forua", false);
-    }
-
-    public void setScheme(String newValue) {
-	setAttribute("scheme", newValue);
-    }
-
-    public String getScheme() {
-	return getAttribute("scheme");
-    }
-
-    public void setClassName(String newValue) {
-	setAttribute("class", newValue);
-    }
-
-    public String getClassName() {
-	return getAttribute("class");
-    }
-
-    public void setHttpEquiv(String newValue) {
-	setAttribute("http-equiv", newValue);
-    }
-
-    public String getHttpEquiv() {
-	return getAttribute("http-equiv");
-    }
-
-    public void setId(String newValue) {
-	setAttribute("id", newValue);
-    }
-
-    public String getId() {
-	return getAttribute("id");
-    }
-
-    public void setContent(String newValue) {
-	setAttribute("content", newValue);
-    }
-
-    public String getContent() {
-	return getAttribute("content");
-    }
-
-    public void setName(String newValue) {
-	setAttribute("name", newValue);
-    }
-
-    public String getName() {
-	return getAttribute("name");
-    }
-}
diff --git a/src/org/apache/wml/dom/WMLNoopElementImpl.java b/src/org/apache/wml/dom/WMLNoopElementImpl.java
deleted file mode 100644
index f30fc52..0000000
--- a/src/org/apache/wml/dom/WMLNoopElementImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-public class WMLNoopElementImpl extends WMLElementImpl implements WMLNoopElement {
-
-  public WMLNoopElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLOneventElementImpl.java b/src/org/apache/wml/dom/WMLOneventElementImpl.java
deleted file mode 100644
index 7907a73..0000000
--- a/src/org/apache/wml/dom/WMLOneventElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLOneventElementImpl extends WMLElementImpl implements WMLOneventElement {
-
-  public WMLOneventElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setType(String newValue) {
-    setAttribute("type", newValue);
-  }
-
-  public String getType() {
-    return getAttribute("type");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLOptgroupElementImpl.java b/src/org/apache/wml/dom/WMLOptgroupElementImpl.java
deleted file mode 100644
index a02fb76..0000000
--- a/src/org/apache/wml/dom/WMLOptgroupElementImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLOptgroupElementImpl extends WMLElementImpl implements WMLOptgroupElement {
-
-  public WMLOptgroupElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setTitle(String newValue) {
-    setAttribute("title", newValue);
-  }
-
-  public String getTitle() {
-    return getAttribute("title");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLOptionElementImpl.java b/src/org/apache/wml/dom/WMLOptionElementImpl.java
deleted file mode 100644
index 656a86e..0000000
--- a/src/org/apache/wml/dom/WMLOptionElementImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLOptionElementImpl extends WMLElementImpl implements WMLOptionElement {
-
-  public WMLOptionElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setValue(String newValue) {
-    setAttribute("value", newValue);
-  }
-
-  public String getValue() {
-    return getAttribute("value");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setTitle(String newValue) {
-    setAttribute("title", newValue);
-  }
-
-  public String getTitle() {
-    return getAttribute("title");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setOnPick(String newValue) {
-    setAttribute("onpick", newValue);
-  }
-
-  public String getOnPick() {
-    return getAttribute("onpick");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLPElementImpl.java b/src/org/apache/wml/dom/WMLPElementImpl.java
deleted file mode 100644
index 9010fa7..0000000
--- a/src/org/apache/wml/dom/WMLPElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLPElementImpl extends WMLElementImpl implements WMLPElement {
-
-  public WMLPElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setMode(String newValue) {
-    setAttribute("mode", newValue);
-  }
-
-  public String getMode() {
-    return getAttribute("mode");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setAlign(String newValue) {
-    setAttribute("align", newValue);
-  }
-
-  public String getAlign() {
-    return getAttribute("align");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLPostfieldElementImpl.java b/src/org/apache/wml/dom/WMLPostfieldElementImpl.java
deleted file mode 100644
index c2c1183..0000000
--- a/src/org/apache/wml/dom/WMLPostfieldElementImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLPostfieldElementImpl extends WMLElementImpl implements WMLPostfieldElement {
-
-  public WMLPostfieldElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setValue(String newValue) {
-    setAttribute("value", newValue);
-  }
-
-  public String getValue() {
-    return getAttribute("value");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setName(String newValue) {
-    setAttribute("name", newValue);
-  }
-
-  public String getName() {
-    return getAttribute("name");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLPrevElementImpl.java b/src/org/apache/wml/dom/WMLPrevElementImpl.java
deleted file mode 100644
index a5020b7..0000000
--- a/src/org/apache/wml/dom/WMLPrevElementImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLPrevElementImpl extends WMLElementImpl implements WMLPrevElement {
-
-  public WMLPrevElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLRefreshElementImpl.java b/src/org/apache/wml/dom/WMLRefreshElementImpl.java
deleted file mode 100644
index 3a13c20..0000000
--- a/src/org/apache/wml/dom/WMLRefreshElementImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLRefreshElementImpl extends WMLElementImpl implements WMLRefreshElement {
-
-  public WMLRefreshElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLSelectElementImpl.java b/src/org/apache/wml/dom/WMLSelectElementImpl.java
deleted file mode 100644
index 5b7ea4d..0000000
--- a/src/org/apache/wml/dom/WMLSelectElementImpl.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLSelectElementImpl extends WMLElementImpl implements WMLSelectElement {
-
-    public WMLSelectElementImpl (WMLDocumentImpl owner, String tagName) {
-	super( owner, tagName);
-    }
-
-    public void setMultiple(boolean newValue) {
-	setAttribute("multiple", newValue);
-    }
-
-    public boolean getMultiple() {
-	return getAttribute("multiple", false);
-    }
-
-    public void setValue(String newValue) {
-	setAttribute("value", newValue);
-    }
-
-    public String getValue() {
-	return getAttribute("value");
-    }
-
-    public void setTabIndex(int newValue) {
-	setAttribute("tabindex", newValue);
-    }
-
-    public int getTabIndex() {
-	return getAttribute("tabindex", 0);
-    }
-
-    public void setClassName(String newValue) {
-	setAttribute("class", newValue);
-    }
-
-    public String getClassName() {
-	return getAttribute("class");
-    }
-
-    public void setXmlLang(String newValue) {
-	setAttribute("xml:lang", newValue);
-    }
-
-    public String getXmlLang() {
-	return getAttribute("xml:lang");
-    }
-
-    public void setTitle(String newValue) {
-	setAttribute("title", newValue);
-    }
-
-    public String getTitle() {
-	return getAttribute("title");
-    }
-
-    public void setIValue(String newValue) {
-	setAttribute("ivalue", newValue);
-    }
-
-    public String getIValue() {
-	return getAttribute("ivalue");
-    }
-
-    public void setId(String newValue) {
-	setAttribute("id", newValue);
-    }
-
-    public String getId() {
-	return getAttribute("id");
-    }
-
-    public void setIName(String newValue) {
-	setAttribute("iname", newValue);
-    }
-
-    public String getIName() {
-	return getAttribute("iname");
-    }
-
-    public void setName(String newValue) {
-	setAttribute("name", newValue);
-    }
-
-    public String getName() {
-	return getAttribute("name");
-    }
-}
diff --git a/src/org/apache/wml/dom/WMLSetvarElementImpl.java b/src/org/apache/wml/dom/WMLSetvarElementImpl.java
deleted file mode 100644
index 78f0894..0000000
--- a/src/org/apache/wml/dom/WMLSetvarElementImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLSetvarElementImpl extends WMLElementImpl implements WMLSetvarElement {
-
-  public WMLSetvarElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setValue(String newValue) {
-    setAttribute("value", newValue);
-  }
-
-  public String getValue() {
-    return getAttribute("value");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setName(String newValue) {
-    setAttribute("name", newValue);
-  }
-
-  public String getName() {
-    return getAttribute("name");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLSmallElementImpl.java b/src/org/apache/wml/dom/WMLSmallElementImpl.java
deleted file mode 100644
index 5eb9408..0000000
--- a/src/org/apache/wml/dom/WMLSmallElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLSmallElementImpl extends WMLElementImpl implements WMLSmallElement {
-
-  public WMLSmallElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLStrongElementImpl.java b/src/org/apache/wml/dom/WMLStrongElementImpl.java
deleted file mode 100644
index 7ec5a50..0000000
--- a/src/org/apache/wml/dom/WMLStrongElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLStrongElementImpl extends WMLElementImpl implements WMLStrongElement {
-
-  public WMLStrongElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLTableElementImpl.java b/src/org/apache/wml/dom/WMLTableElementImpl.java
deleted file mode 100644
index 4bf9104..0000000
--- a/src/org/apache/wml/dom/WMLTableElementImpl.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLTableElementImpl extends WMLElementImpl implements WMLTableElement {
-
-  public WMLTableElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setColumns(int newValue) {
-    setAttribute("columns", newValue);
-  }
-
-  public int getColumns() {
-    return getAttribute("columns", 0);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setAlign(String newValue) {
-    setAttribute("align", newValue);
-  }
-
-  public String getAlign() {
-    return getAttribute("align");
-  }
-
-  public void setTitle(String newValue) {
-    setAttribute("title", newValue);
-  }
-
-  public String getTitle() {
-    return getAttribute("title");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLTdElementImpl.java b/src/org/apache/wml/dom/WMLTdElementImpl.java
deleted file mode 100644
index 4b5ac74..0000000
--- a/src/org/apache/wml/dom/WMLTdElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLTdElementImpl extends WMLElementImpl implements WMLTdElement {
-
-  public WMLTdElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLTemplateElementImpl.java b/src/org/apache/wml/dom/WMLTemplateElementImpl.java
deleted file mode 100644
index f714c18..0000000
--- a/src/org/apache/wml/dom/WMLTemplateElementImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLTemplateElementImpl extends WMLElementImpl implements WMLTemplateElement {
-
-  public WMLTemplateElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setOnTimer(String newValue) {
-    setAttribute("ontimer", newValue);
-  }
-
-  public String getOnTimer() {
-    return getAttribute("ontimer");
-  }
-
-  public void setOnEnterBackward(String newValue) {
-    setAttribute("onenterbackward", newValue);
-  }
-
-  public String getOnEnterBackward() {
-    return getAttribute("onenterbackward");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setOnEnterForward(String newValue) {
-    setAttribute("onenterforward", newValue);
-  }
-
-  public String getOnEnterForward() {
-    return getAttribute("onenterforward");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLTimerElementImpl.java b/src/org/apache/wml/dom/WMLTimerElementImpl.java
deleted file mode 100644
index 63fb392..0000000
--- a/src/org/apache/wml/dom/WMLTimerElementImpl.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLTimerElementImpl extends WMLElementImpl implements WMLTimerElement {
-
-  public WMLTimerElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setValue(String newValue) {
-    setAttribute("value", newValue);
-  }
-
-  public String getValue() {
-    return getAttribute("value");
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-  public void setName(String newValue) {
-    setAttribute("name", newValue);
-  }
-
-  public String getName() {
-    return getAttribute("name");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLTrElementImpl.java b/src/org/apache/wml/dom/WMLTrElementImpl.java
deleted file mode 100644
index adb9324..0000000
--- a/src/org/apache/wml/dom/WMLTrElementImpl.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLTrElementImpl extends WMLElementImpl implements WMLTrElement {
-
-  public WMLTrElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLUElementImpl.java b/src/org/apache/wml/dom/WMLUElementImpl.java
deleted file mode 100644
index f8d0c87..0000000
--- a/src/org/apache/wml/dom/WMLUElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLUElementImpl extends WMLElementImpl implements WMLUElement {
-
-  public WMLUElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/wml/dom/WMLWmlElementImpl.java b/src/org/apache/wml/dom/WMLWmlElementImpl.java
deleted file mode 100644
index 09c15a7..0000000
--- a/src/org/apache/wml/dom/WMLWmlElementImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.wml.dom;
-
-import org.apache.wml.*;
-
-/**
- * @version $Id$
- * @author <a href="mailto:david@topware.com.tw">David Li</a>
- */
-
-public class WMLWmlElementImpl extends WMLElementImpl implements WMLWmlElement {
-
-  public WMLWmlElementImpl (WMLDocumentImpl owner, String tagName) {
-    super( owner, tagName);
-  }
-
-  public void setClassName(String newValue) {
-    setAttribute("class", newValue);
-  }
-
-  public String getClassName() {
-    return getAttribute("class");
-  }
-
-  public void setXmlLang(String newValue) {
-    setAttribute("xml:lang", newValue);
-  }
-
-  public String getXmlLang() {
-    return getAttribute("xml:lang");
-  }
-
-  public void setId(String newValue) {
-    setAttribute("id", newValue);
-  }
-
-  public String getId() {
-    return getAttribute("id");
-  }
-
-}
diff --git a/src/org/apache/xerces/dom/ASModelImpl.java b/src/org/apache/xerces/dom/ASModelImpl.java
deleted file mode 100644
index fb74853..0000000
--- a/src/org/apache/xerces/dom/ASModelImpl.java
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.apache.xerces.dom3.as.*;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-
-/**
- *  To begin with, an abstract schema is a generic structure that could 
- * contain both internal and external subsets. An <code>ASModel</code> is an 
- * abstract object that could map to a DTD , an XML Schema , a database 
- * schema, etc. An <code>ASModel</code> could represent either an internal 
- * or an external subset; hence an abstract schema could be composed of an 
- * <code>ASModel</code> representing the internal subset and an 
- * <code>ASModel</code> representing the external subset. Note that the 
- * <code>ASModel</code> representing the external subset could consult the 
- * <code>ASModel</code> representing the internal subset. Furthermore, the 
- * <code>ASModel</code> representing the internal subset could be set to 
- * null by the <code>setInternalAS</code> method as a mechanism for 
- * "removal". In addition, only one <code>ASModel</code> representing the 
- * external subset can be specified as "active" and it is possible that none 
- * are "active". Finally, the <code>ASModel</code> contains the factory 
- * methods needed to create a various types of ASObjects like 
- * <code>ASElementDeclaration</code>, <code>ASAttributeDeclaration</code>, 
- * etc. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>
- * Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification</a>.
- *
- * @author Pavani Mukthipudi
- * @author Neil Graham
- * @version $Id$
- */
-public class ASModelImpl implements ASModel {
-
-    //
-    // Data
-    //
-    boolean fNamespaceAware = true;
-
-    // conceptually, an ASModel may contain grammar information and/or
-    // other ASModels.  These two fields divide that function.
-    protected Vector fASModels;
-    protected SchemaGrammar fGrammar = null;
-    
-    //
-    // Constructors
-    //
-    
-    public ASModelImpl() {
-    	fASModels = new Vector();
-    }
-
-    public ASModelImpl(boolean isNamespaceAware) {
-    	fASModels = new Vector();
-        fNamespaceAware = isNamespaceAware;
-    }
-    
-    //
-    // ASObject methods
-    //
-    
-    /**
-     * A code representing the underlying object as defined above.
-     */
-    public short getAsNodeType() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-
-    /**
-     * The <code>ASModel</code> object associated with this 
-     * <code>ASObject</code>. For a node of type <code>AS_MODEL</code>, this 
-     * is <code>null</code>. 
-     */
-    public ASModel getOwnerASModel() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-    /**
-     * The <code>ASModel</code> object associated with this 
-     * <code>ASObject</code>. For a node of type <code>AS_MODEL</code>, this 
-     * is <code>null</code>. 
-     */
-    public void setOwnerASModel(ASModel ownerASModel) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-
-    /**
-     * The <code>name</code> of this <code>ASObject</code> depending on the 
-     * <code>ASObject</code> type.
-     */
-    public String getNodeName() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-    /**
-     * The <code>name</code> of this <code>ASObject</code> depending on the 
-     * <code>ASObject</code> type.
-     */
-    public void setNodeName(String nodeName) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-
-    /**
-     * The namespace prefix of this node, or <code>null</code> if it is 
-     * unspecified.
-     */
-    public String getPrefix() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-    /**
-     * The namespace prefix of this node, or <code>null</code> if it is 
-     * unspecified.
-     */
-    public void setPrefix(String prefix) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-
-    /**
-     * Returns the local part of the qualified name of this 
-     * <code>ASObject</code>.
-     */
-    public String getLocalName() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-    /**
-     * Returns the local part of the qualified name of this 
-     * <code>ASObject</code>.
-     */
-    public void setLocalName(String localName) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-
-    /**
-     * The namespace URI of this node, or <code>null</code> if it is 
-     * unspecified.  defines how a namespace URI is attached to schema 
-     * components.
-     */
-    public String getNamespaceURI() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-    /**
-     * The namespace URI of this node, or <code>null</code> if it is 
-     * unspecified.  defines how a namespace URI is attached to schema 
-     * components.
-     */
-    public void setNamespaceURI(String namespaceURI) {
-   	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-
-    /**
-     * Creates a copy of this <code>ASObject</code>. See text for 
-     * <code>cloneNode</code> off of <code>Node</code> but substitute AS 
-     * functionality.
-     * @param deep Setting the <code>deep</code> flag on, causes the whole 
-     *   subtree to be duplicated. Setting it to <code>false</code> only 
-     *   duplicates its immediate child nodes.
-     * @return Cloned <code>ASObject</code>.
-     */
-    public ASObject cloneASObject(boolean deep) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-    //
-    // ASModel methods
-    //
-    
-    /**
-     * <code>true</code> if this <code>ASModel</code> defines the document 
-     * structure in terms of namespaces and local names ; <code>false</code> 
-     * if the document structure is defined only in terms of 
-     * <code>QNames</code>.
-     */
-    public boolean getIsNamespaceAware() {
-    	return fNamespaceAware;
-    }
-
-    /**
-     *  0 if used internally, 1 if used externally, 2 if not all. An exception 
-     * will be raised if it is incompatibly shared or in use as an internal 
-     * subset. 
-     */
-    public short getUsageLocation() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     *  The URI reference. 
-     */
-    public String getAsLocation() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-    
-    /**
-     *  The URI reference. 
-     */
-    public void setAsLocation(String asLocation) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     *  The hint to locating an ASModel. 
-     */
-    public String getAsHint() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-    
-    /**
-     *  The hint to locating an ASModel. 
-     */
-    public void setAsHint(String asHint) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-    
-    /**
-     * If <code>usage</code> is EXTERNAL_SUBSET or NOT_USED, and the 
-     * <code>ASModel</code> is simply a container of other ASModels. 
-     */
-    public boolean getContainer() {
-    	return (fGrammar != null);
-    }
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * element declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getElementDeclarations() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * attribute declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getAttributeDeclarations() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * notation declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getNotationDeclarations() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * entity declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getEntityDeclarations() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global 
-     * content model declarations. If one attempts to add, set, or remove a 
-     * node type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getContentModelDeclarations() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * This method will allow the nesting or "importation" of ASModels. 
-     * @param abstractSchema ASModel to be set. Subsequent calls will nest 
-     *   the ASModels within the specified <code>ownerASModel</code>. 
-     */
-    public void addASModel(ASModel abstractSchema) {
-    	fASModels.addElement(abstractSchema);
-    }
-
-    /**
-     * To retrieve a list of nested ASModels without reference to names. 
-     * @return A list of ASModels. 
-     */
-    public ASObjectList getASModels() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Removes only the specified <code>ASModel</code> from the list of 
-     * <code>ASModel</code>s.
-     * @param as AS to be removed.
-     */
-    public void removeAS(ASModel as) {
-    	fASModels.removeElement(as);
-    }
-
-    /**
-     * Determines if an <code>ASModel</code> itself is valid, i.e., confirming 
-     * that it's well-formed and valid per its own formal grammar. 
-     * @return <code>true</code> if the <code>ASModel</code> is valid, 
-     *   <code>false</code> otherwise.
-     */
-    public boolean validate() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Imports <code>ASObject</code> into ASModel. 
-     * @param asobject  <code>ASObject</code> to be imported. 
-     */
-    public void importASObject(ASObject asobject) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Inserts <code>ASObject</code> into ASModel. 
-     * @param asobject  <code>ASObject</code> to be inserted. 
-     */
-    public void insertASObject(ASObject asobject) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-    
-    /**
-     * Creates an element declaration for the element type specified.
-     * @param namespaceURI The <code>namespace URI</code> of the element type 
-     *   being declared. 
-     * @param name The name of the element. The format of the name could be 
-     *   an NCName as defined by XML Namespaces or a Name as defined by XML 
-     *   1.0; it's ASModel-dependent. 
-     * @return A new <code>ASElementDeclaration</code> object with 
-     *   <code>name</code> attribute set to <code>tagname</code> and 
-     *   <code>namespaceURI</code> set to <code>systemId</code>. Other 
-     *   attributes of the element declaration are set through 
-     *   <code>ASElementDeclaration</code> interface methods.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public ASElementDeclaration createASElementDeclaration(String namespaceURI, 
-                                                           String name)
-                                                           throws DOMException {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Creates an attribute declaration.
-     * @param namespaceURI The namespace URI of the attribute being declared.
-     * @param name The name of the attribute. The format of the name could be 
-     *   an NCName as defined by XML Namespaces or a Name as defined by XML 
-     *   1.0; it's ASModel-dependent. 
-     * @return A new <code>ASAttributeDeclaration</code> object with 
-     *   appropriate attributes set by input parameters.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the input <code>name</code> 
-     *   parameter contains an illegal character.
-     */
-    public ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI, 
-                                                               String name)
-                                                               throws DOMException {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Creates a new notation declaration. 
-     * @param namespaceURI The namespace URI of the notation being declared.
-     * @param name The name of the notation. The format of the name could be 
-     *   an NCName as defined by XML Namespaces or a Name as defined by XML 
-     *   1.0; it's ASModel-dependent. 
-     * @param systemId The system identifier for the notation declaration.
-     * @param publicId The public identifier for the notation declaration.
-     * @return A new <code>ASNotationDeclaration</code> object with 
-     *   <code>notationName</code> attribute set to <code>name</code> and 
-     *   <code>publicId</code> and <code>systemId</code> set to the 
-     *   corresponding fields.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public ASNotationDeclaration createASNotationDeclaration(String namespaceURI, String name, 
-                                                             String systemId, String publicId)
-                                                             throws DOMException {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-    
-    /**
-     * Creates an ASEntityDeclaration. 
-     * @param name The name of the entity being declared.
-     * @return A new <code>ASEntityDeclaration</code> object with 
-     *   <code>entityName</code> attribute set to name.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public ASEntityDeclaration createASEntityDeclaration(String name)
-                                                         throws DOMException {
-	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-    /**
-     * Creates an object which describes part of an 
-     * <code>ASElementDeclaration</code>'s content model. 
-     * @param minOccurs The minimum occurrence for the subModels of this 
-     *   <code>ASContentModel</code>.
-     * @param maxOccurs The maximum occurrence for the subModels of this 
-     *   <code>ASContentModel</code>.
-     * @param operator operator of type <code>AS_CHOICE</code>, 
-     *   <code>AS_SEQUENCE</code>, <code>AS_ALL</code> or 
-     *   <code>AS_NONE</code>.
-     * @return A new <code>ASContentModel</code> object.
-     * @exception DOMASException
-     *   A DOMASException, e.g., <code>minOccurs &gt; maxOccurs</code>.
-     */
-    public ASContentModel createASContentModel(int minOccurs, int maxOccurs, 
-                                               short operator) throws DOMASException {
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not Supported");
-    }
-
-
-    // convenience methods
-    public SchemaGrammar getGrammar() {
-        return fGrammar;
-    }
-    public void setGrammar(SchemaGrammar grammar) {
-        fGrammar = grammar;
-    }
-
-    public Vector getInternalASModels() {
-        return fASModels;
-    }
-
-}
diff --git a/src/org/apache/xerces/dom/AttrImpl.java b/src/org/apache/xerces/dom/AttrImpl.java
deleted file mode 100644
index b5acad1..0000000
--- a/src/org/apache/xerces/dom/AttrImpl.java
+++ /dev/null
@@ -1,1133 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/**
- * Attribute represents an XML-style attribute of an
- * Element. Typically, the allowable values are controlled by its
- * declaration in the Document Type Definition (DTD) governing this
- * kind of document.
- * <P>
- * If the attribute has not been explicitly assigned a value, but has
- * been declared in the DTD, it will exist and have that default. Only
- * if neither the document nor the DTD specifies a value will the
- * Attribute really be considered absent and have no value; in that
- * case, querying the attribute will return null.
- * <P>
- * Attributes may have multiple children that contain their data. (XML
- * allows attributes to contain entity references, and tokenized
- * attribute types such as NMTOKENS may have a child for each token.)
- * For convenience, the Attribute object's getValue() method returns
- * the string version of the attribute's value.
- * <P>
- * Attributes are not children of the Elements they belong to, in the
- * usual sense, and have no valid Parent reference. However, the spec
- * says they _do_ belong to a specific Element, and an INUSE exception
- * is to be thrown if the user attempts to explicitly share them
- * between elements.
- * <P>
- * Note that Elements do not permit attributes to appear to be shared
- * (see the INUSE exception), so this object's mutability is
- * officially not an issue.
- * <p>
- * Note: The ownerNode attribute is used to store the Element the Attr
- * node is associated with. Attr nodes do not have parent nodes.
- * Besides, the getOwnerElement() method can be used to get the element node
- * this attribute is associated with.
- * <P>
- * AttrImpl does not support Namespaces. AttrNSImpl, which inherits from
- * it, does.
- *
- * <p>AttrImpl used to inherit from ParentNode. It now directly inherits from
- * NodeImpl and provide its own implementation of the ParentNode's behavior.
- * The reason is that we now try and avoid to always create a Text node to
- * hold the value of an attribute. The DOM spec requires it, so we still have
- * to do it in case getFirstChild() is called for instance. The reason
- * attribute values are stored as a list of nodes is so that they can carry
- * more than a simple string. They can also contain EntityReference nodes.
- * However, most of the times people only have a single string that they only
- * set and get through Element.set/getAttribute or Attr.set/getValue. In this
- * new version, the Attr node has a value pointer which can either be the
- * String directly or a pointer to the first ChildNode. A flag tells which one
- * it currently is. Note that while we try to stick with the direct String as
- * much as possible once we've switched to a node there is no going back. This
- * is because we have no way to know whether the application keeps referring to
- * the node we once returned.
- * <p> The gain in memory varies on the density of attributes in the document.
- * But in the tests I've run I've seen up to 12% of memory gain. And the good
- * thing is that it also leads to a slight gain in speed because we allocate
- * fewer objects! I mean, that's until we have to actually create the node...
- * <p>
- * To avoid too much duplicated code, I got rid of ParentNode and renamed
- * ChildAndParentNode, which I never really liked, to ParentNode for
- * simplicity, this doesn't make much of a difference in memory usage because
- * there are only very few objects that are only a Parent. This is only true
- * now because AttrImpl now inherits directly from NodeImpl and has its own
- * implementation of the ParentNode's node behavior. So there is still some
- * duplicated code there.
- * <p>
- * This class doesn't directly support mutation events, however, it notifies
- * the document when mutations are performed so that the document class do so.
- *
- * <p><b>WARNING</b>: Some of the code here is partially duplicated in
- * ParentNode, be careful to keep these two classes in sync!
- *
- * @see AttrNSImpl
- *
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @author Andy Clark, IBM
- * @version $Id$
- * @since PR-DOM-Level-1-19980818.
- *
- */
-public class AttrImpl
-    extends NodeImpl
-    implements Attr {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 7277707688218972102L;
-
-    //
-    // Data
-    //
-
-    /** This can either be a String or the first child node. */
-    protected Object value = null;
-
-    /** Attribute name. */
-    protected String name;
-
-    protected static TextImpl textNode = null;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Attribute has no public constructor. Please use the factory
-     * method in the Document class.
-     */
-    protected AttrImpl(CoreDocumentImpl ownerDocument, String name) {
-    	super(ownerDocument);
-        this.name = name;
-        /** False for default attributes. */
-        isSpecified(true);
-        hasStringValue(true);
-    }
-
-    // for AttrNSImpl
-    protected AttrImpl() {}
-
-    // create a real text node as child if we don't have one yet
-    protected void makeChildNode() {
-        if (hasStringValue()) {
-            if (value != null) {
-                TextImpl text =
-                    (TextImpl) ownerDocument().createTextNode((String) value);
-                value = text;
-                text.isFirstChild(true);
-                text.previousSibling = text;
-                text.ownerNode = this;
-                text.isOwned(true);
-            }
-            hasStringValue(false);
-        }
-    }
-
-    /**
-     * NON-DOM
-     * set the ownerDocument of this node and its children
-     */
-    void setOwnerDocument(CoreDocumentImpl doc) {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        super.setOwnerDocument(doc);
-        if (!hasStringValue()) {
-            for (ChildNode child = (ChildNode) value;
-                 child != null; child = child.nextSibling) {
-                child.setOwnerDocument(doc);
-            }
-        }
-    }
-
-    //
-    // Node methods
-    //
-    
-    public Node cloneNode(boolean deep) {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        AttrImpl clone = (AttrImpl) super.cloneNode(deep);
-
-        // take care of case where there are kids
-    	if (!clone.hasStringValue()) {
-
-            // Need to break the association w/ original kids
-            clone.value = null;
-
-            // Then, if deep, clone the kids too.
-            if (deep) {
-                for (Node child = (Node) value; child != null;
-                     child = child.getNextSibling()) {
-                    clone.appendChild(child.cloneNode(true));
-                }
-            }
-        }
-        clone.isSpecified(true);
-        return clone;
-    }
-
-    /**
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.ATTRIBUTE_NODE;
-    }
-
-    /**
-     * Returns the attribute name
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return name;
-    }
-
-    /**
-     * Implicit in the rerouting of getNodeValue to getValue is the
-     * need to redefine setNodeValue, for symmetry's sake.  Note that
-     * since we're explicitly providing a value, Specified should be set
-     * true.... even if that value equals the default.
-     */
-    public void setNodeValue(String value) throws DOMException {
-    	setValue(value);
-    }
-
-    /**
-     * In Attribute objects, NodeValue is considered a synonym for
-     * Value.
-     *
-     * @see #getValue()
-     */
-    public String getNodeValue() {
-    	return getValue();
-    }
-
-    //
-    // Attr methods
-    //
-
-    /**
-     * In Attributes, NodeName is considered a synonym for the
-     * attribute's Name
-     */
-    public String getName() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	return name;
-
-    } // getName():String
-
-    /**
-     * The DOM doesn't clearly define what setValue(null) means. I've taken it
-     * as "remove all children", which from outside should appear
-     * similar to setting it to the empty string.
-     */
-    public void setValue(String newvalue) {
-
-    	if (isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                   "DOM001 Modification not allowed");
-        }
-        CoreDocumentImpl ownerDocument = ownerDocument();
-        String oldvalue = "";
-        if (ownerDocument.getMutationEvents()) {
-            // Can no longer just discard the kids; they may have
-            // event listeners waiting for them to disconnect.
-            if (needsSyncChildren()) {
-                synchronizeChildren();
-            }
-            if (value != null) {
-                if (hasStringValue()) {
-                    oldvalue = (String) value;
-                    // create an actual text node as our child so
-                    // that we can use it in the event
-                    if (textNode == null) {
-                        textNode = (TextImpl)
-                            ownerDocument.createTextNode((String) value);
-                    }
-                    else {
-                        textNode.data = (String) value;
-                    }
-                    value = textNode;
-                    textNode.isFirstChild(true);
-                    textNode.previousSibling = textNode;
-                    textNode.ownerNode = this;
-                    textNode.isOwned(true);
-                    hasStringValue(false);
-                    internalRemoveChild(textNode, true);
-                }
-                else {
-                    oldvalue = getValue();
-                    while (value != null) {
-                        internalRemoveChild((Node) value, true);
-                    }
-                }
-            }
-        }
-        else
-        {
-            // simply discard children if any
-            if (!hasStringValue() && value != null) {
-                // remove ref from first child to last child
-                ChildNode firstChild = (ChildNode) value;
-                firstChild.previousSibling = null;
-                firstChild.isFirstChild(false);
-                firstChild.ownerNode = ownerDocument;
-            }
-            // then remove ref to current value
-            value = null;
-            needsSyncChildren(false);
-        }
-
-        // Create and add the new one, generating only non-aggregate events
-        // (There are no listeners on the new Text, but there may be
-        // capture/bubble listeners on the Attr.
-        // Note that aggregate events are NOT dispatched here,
-        // since we need to combine the remove and insert.
-    	isSpecified(true);
-        if (ownerDocument.getMutationEvents()) {
-            // if there are any event handlers create a real node
-            internalInsertBefore(ownerDocument.createTextNode(newvalue),
-                                 null, true);
-            hasStringValue(false);
-            // notify document
-            ownerDocument.modifiedAttrValue(this, oldvalue);
-        } else {
-            // directly store the string
-            value = newvalue;
-            hasStringValue(true);
-            changed();
-        }
-
-    } // setValue(String)
-
-    /**
-     * The "string value" of an Attribute is its text representation,
-     * which in turn is a concatenation of the string values of its children.
-     */
-    public String getValue() {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        if (value == null) {
-            return "";
-        }
-        if (hasStringValue()) {
-            return (String) value;
-        }
-        ChildNode firstChild = ((ChildNode) value);
-        ChildNode node = firstChild.nextSibling;
-        if (node == null) {
-            return firstChild.getNodeValue();
-        }
-    	StringBuffer value = new StringBuffer(firstChild.getNodeValue());
-    	while (node != null) {
-            value.append(node.getNodeValue());
-            node = node.nextSibling;
-    	}
-    	return value.toString();
-
-    } // getValue():String
-
-    /**
-     * The "specified" flag is true if and only if this attribute's
-     * value was explicitly specified in the original document. Note that
-     * the implementation, not the user, is in charge of this
-     * property. If the user asserts an Attribute value (even if it ends
-     * up having the same value as the default), it is considered a
-     * specified attribute. If you really want to revert to the default,
-     * delete the attribute from the Element, and the Implementation will
-     * re-assert the default (if any) in its place, with the appropriate
-     * specified=false setting.
-     */
-    public boolean getSpecified() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	return isSpecified();
-
-    } // getSpecified():boolean
-
-    //
-    // Attr2 methods
-    //
-
-    /**
-     * Returns the element node that this attribute is associated with,
-     * or null if the attribute has not been added to an element.
-     *
-     * @see #getOwnerElement
-     *
-     * @deprecated Previous working draft of DOM Level 2. New method
-     *             is <tt>getOwnerElement()</tt>.
-     */
-    public Element getElement() {
-        // if we have an owner, ownerNode is our ownerElement, otherwise it's
-        // our ownerDocument and we don't have an ownerElement
-        return (Element) (isOwned() ? ownerNode : null);
-    }
-
-    /**
-     * Returns the element node that this attribute is associated with,
-     * or null if the attribute has not been added to an element.
-     *
-     * @since WD-DOM-Level-2-19990719
-     */
-    public Element getOwnerElement() {
-        // if we have an owner, ownerNode is our ownerElement, otherwise it's
-        // our ownerDocument and we don't have an ownerElement
-        return (Element) (isOwned() ? ownerNode : null);
-    }
-    
-    public void normalize() {
-
-        // No need to normalize if already normalized or
-        // if value is kept as a String.
-        if (isNormalized() || hasStringValue())
-            return;
-
-        Node kid, next;
-        ChildNode firstChild = (ChildNode)value;
-        for (kid = firstChild; kid != null; kid = next) {
-            next = kid.getNextSibling();
-
-            // If kid is a text node, we need to check for one of two
-            // conditions:
-            //   1) There is an adjacent text node
-            //   2) There is no adjacent text node, but kid is
-            //      an empty text node.
-            if ( kid.getNodeType() == Node.TEXT_NODE )
-            {
-                // If an adjacent text node, merge it with kid
-                if ( next!=null && next.getNodeType() == Node.TEXT_NODE )
-                {
-                    ((Text)kid).appendData(next.getNodeValue());
-                    removeChild( next );
-                    next = kid; // Don't advance; there might be another.
-                }
-                else
-                {
-                    // If kid is empty, remove it
-                    if ( kid.getNodeValue().length()==0 )
-                        removeChild( kid );
-                }
-            }
-        }
-
-        isNormalized(true);
-    } // normalize()
-
-    //
-    // Public methods
-    //
-
-    /** NON-DOM, for use by parser */
-    public void setSpecified(boolean arg) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	isSpecified(arg);
-
-    } // setSpecified(boolean)
-
-    //
-    // Object methods
-    //
-
-    /** NON-DOM method for debugging convenience */
-    public String toString() {
-    	return getName() + "=" + "\"" + getValue() + "\"";
-    }
-
-    /**
-     * Test whether this node has any children. Convenience shorthand
-     * for (Node.getFirstChild()!=null)
-     */
-    public boolean hasChildNodes() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return value != null;
-    }
-
-    /**
-     * Obtain a NodeList enumerating all children of this node. If there
-     * are none, an (initially) empty NodeList is returned.
-     * <p>
-     * NodeLists are "live"; as children are added/removed the NodeList
-     * will immediately reflect those changes. Also, the NodeList refers
-     * to the actual nodes, so changes to those nodes made via the DOM tree
-     * will be reflected in the NodeList and vice versa.
-     * <p>
-     * In this implementation, Nodes implement the NodeList interface and
-     * provide their own getChildNodes() support. Other DOMs may solve this
-     * differently.
-     */
-    public NodeList getChildNodes() {
-        // JKESS: KNOWN ISSUE HERE 
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return this;
-
-    } // getChildNodes():NodeList
-
-    /** The first child of this Node, or null if none. */
-    public Node getFirstChild() {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        makeChildNode();
-    	return (Node) value;
-
-    }   // getFirstChild():Node
-
-    /** The last child of this Node, or null if none. */
-    public Node getLastChild() {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return lastChild();
-
-    } // getLastChild():Node
-
-    final ChildNode lastChild() {
-        // last child is stored as the previous sibling of first child
-        makeChildNode();
-        return value != null ? ((ChildNode) value).previousSibling : null;
-    }
-
-    final void lastChild(ChildNode node) {
-        // store lastChild as previous sibling of first child
-        if (value != null) {
-            ((ChildNode) value).previousSibling = node;
-        }
-    }
-
-    /**
-     * Move one or more node(s) to our list of children. Note that this
-     * implicitly removes them from their previous parent.
-     *
-     * @param newChild The Node to be moved to our subtree. As a
-     * convenience feature, inserting a DocumentNode will instead insert
-     * all its children.
-     *
-     * @param refChild Current child which newChild should be placed
-     * immediately before. If refChild is null, the insertion occurs
-     * after all existing Nodes, like appendChild().
-     *
-     * @returns newChild, in its new state (relocated, or emptied in the
-     * case of DocumentNode.)
-     *
-     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
-     * type that shouldn't be a child of this node, or if newChild is an
-     * ancestor of this node.
-     *
-     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
-     * different owner document than we do.
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if refChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node insertBefore(Node newChild, Node refChild) 
-        throws DOMException {
-        // Tail-call; optimizer should be able to do good things with.
-        return internalInsertBefore(newChild, refChild, false);
-    } // insertBefore(Node,Node):Node
-     
-    /** NON-DOM INTERNAL: Within DOM actions,we sometimes need to be able
-     * to control which mutation events are spawned. This version of the
-     * insertBefore operation allows us to do so. It is not intended
-     * for use by application programs.
-     */
-    Node internalInsertBefore(Node newChild, Node refChild, boolean replace) 
-        throws DOMException {
-
-        CoreDocumentImpl ownerDocument = ownerDocument();
-        boolean errorChecking = ownerDocument.errorChecking;
-
-        if (newChild.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) {
-            // SLOW BUT SAFE: We could insert the whole subtree without
-            // juggling so many next/previous pointers. (Wipe out the
-            // parent's child-list, patch the parent pointers, set the
-            // ends of the list.) But we know some subclasses have special-
-            // case behavior they add to insertBefore(), so we don't risk it.
-            // This approch also takes fewer bytecodes.
-
-            // NOTE: If one of the children is not a legal child of this
-            // node, throw HIERARCHY_REQUEST_ERR before _any_ of the children
-            // have been transferred. (Alternative behaviors would be to
-            // reparent up to the first failure point or reparent all those
-            // which are acceptable to the target node, neither of which is
-            // as robust. PR-DOM-0818 isn't entirely clear on which it
-            // recommends?????
-
-            // No need to check kids for right-document; if they weren't,
-            // they wouldn't be kids of that DocFrag.
-            if (errorChecking) {
-                for (Node kid = newChild.getFirstChild(); // Prescan
-                     kid != null; kid = kid.getNextSibling()) {
-
-                    if (!ownerDocument.isKidOK(this, kid)) {
-                        throw new DOMException(
-                                           DOMException.HIERARCHY_REQUEST_ERR, 
-                                           "DOM006 Hierarchy request error");
-                    }
-                }
-            }
-
-            while (newChild.hasChildNodes()) {
-                insertBefore(newChild.getFirstChild(), refChild);
-            }
-            return newChild;
-        }
-
-        if (newChild == refChild) {
-            // stupid case that must be handled as a no-op triggering events...
-            refChild = refChild.getNextSibling();
-            removeChild(newChild);
-            insertBefore(newChild, refChild);
-            return newChild;
-        }
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-
-        if (errorChecking) {
-            if (isReadOnly()) {
-                throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                       "DOM001 Modification not allowed");
-            }
-            if (newChild.getOwnerDocument() != ownerDocument) {
-                throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
-                                       "DOM005 Wrong document");
-            }
-            if (!ownerDocument.isKidOK(this, newChild)) {
-                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-                                       "DOM006 Hierarchy request error");
-            }
-            // refChild must be a child of this node (or null)
-            if (refChild != null && refChild.getParentNode() != this) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR,
-                                       "DOM008 Not found");
-            }
-
-            // Prevent cycles in the tree
-            // newChild cannot be ancestor of this Node,
-            // and actually cannot be this
-            boolean treeSafe = true;
-            for (NodeImpl a = this; treeSafe && a != null; a = a.parentNode())
-            {
-                treeSafe = newChild != a;
-            }
-            if (!treeSafe) {
-                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-                                       "DOM006 Hierarchy request error");
-            }
-        }
-
-        makeChildNode(); // make sure we have a node and not a string
-
-        // notify document
-        ownerDocument.insertingNode(this, replace);
-
-        // Convert to internal type, to avoid repeated casting
-        ChildNode newInternal = (ChildNode)newChild;
-
-        Node oldparent = newInternal.parentNode();
-        if (oldparent != null) {
-            oldparent.removeChild(newInternal);
-        }
-
-        // Convert to internal type, to avoid repeated casting
-        ChildNode refInternal = (ChildNode) refChild;
-
-        // Attach up
-        newInternal.ownerNode = this;
-        newInternal.isOwned(true);
-
-        // Attach before and after
-        // Note: firstChild.previousSibling == lastChild!!
-        ChildNode firstChild = (ChildNode) value;
-        if (firstChild == null) {
-            // this our first and only child
-            value = newInternal; // firstchild = newInternal;
-            newInternal.isFirstChild(true);
-            newInternal.previousSibling = newInternal;
-        }
-        else {
-            if (refInternal == null) {
-                // this is an append
-                ChildNode lastChild = firstChild.previousSibling;
-                lastChild.nextSibling = newInternal;
-                newInternal.previousSibling = lastChild;
-                firstChild.previousSibling = newInternal;
-            }
-            else {
-                // this is an insert
-                if (refChild == firstChild) {
-                    // at the head of the list
-                    firstChild.isFirstChild(false);
-                    newInternal.nextSibling = firstChild;
-                    newInternal.previousSibling = firstChild.previousSibling;
-                    firstChild.previousSibling = newInternal;
-                    value = newInternal; // firstChild = newInternal;
-                    newInternal.isFirstChild(true);
-                }
-                else {
-                    // somewhere in the middle
-                    ChildNode prev = refInternal.previousSibling;
-                    newInternal.nextSibling = refInternal;
-                    prev.nextSibling = newInternal;
-                    refInternal.previousSibling = newInternal;
-                    newInternal.previousSibling = prev;
-                }
-            }
-        }
-
-        changed();
-
-        // notify document
-        ownerDocument.insertedNode(this, newInternal, replace);
-
-        checkNormalizationAfterInsert(newInternal);
-
-        return newChild;
-
-    } // internalInsertBefore(Node,Node,int):Node
-
-    /**
-     * Remove a child from this Node. The removed child's subtree
-     * remains intact so it may be re-inserted elsewhere.
-     *
-     * @return oldChild, in its new state (removed).
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node removeChild(Node oldChild) 
-        throws DOMException {
-        // Tail-call, should be optimizable
-        if (hasStringValue()) {
-            // we don't have any child per say so it can't be one of them!
-            throw new DOMException(DOMException.NOT_FOUND_ERR, 
-                                   "DOM008 Not found");
-        }
-        return internalRemoveChild(oldChild, false);
-    } // removeChild(Node) :Node
-     
-    /** NON-DOM INTERNAL: Within DOM actions,we sometimes need to be able
-     * to control which mutation events are spawned. This version of the
-     * removeChild operation allows us to do so. It is not intended
-     * for use by application programs.
-     */
-    Node internalRemoveChild(Node oldChild, boolean replace)
-        throws DOMException {
-
-        CoreDocumentImpl ownerDocument = ownerDocument();
-        if (ownerDocument.errorChecking) {
-            if (isReadOnly()) {
-                throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                     "DOM001 Modification not allowed");
-            }
-            if (oldChild != null && oldChild.getParentNode() != this) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR, 
-                                       "DOM008 Not found");
-            }
-        }
-
-        ChildNode oldInternal = (ChildNode) oldChild;
-
-        // notify document
-        ownerDocument.removingNode(this, oldInternal, replace);
-
-        // Patch linked list around oldChild
-        // Note: lastChild == firstChild.previousSibling
-        if (oldInternal == value) { // oldInternal == firstChild
-            // removing first child
-            oldInternal.isFirstChild(false);
-            // next line is: firstChild = oldInternal.nextSibling
-            value = oldInternal.nextSibling;
-            ChildNode firstChild = (ChildNode) value;
-            if (firstChild != null) {
-                firstChild.isFirstChild(true);
-                firstChild.previousSibling = oldInternal.previousSibling;
-            }
-        } else {
-            ChildNode prev = oldInternal.previousSibling;
-            ChildNode next = oldInternal.nextSibling;
-            prev.nextSibling = next;
-            if (next == null) {
-                // removing last child
-                ChildNode firstChild = (ChildNode) value;
-                firstChild.previousSibling = prev;
-            } else {
-                // removing some other child in the middle
-                next.previousSibling = prev;
-            }
-        }
-
-        // Save previous sibling for normalization checking.
-        ChildNode oldPreviousSibling = oldInternal.previousSibling();
-
-        // Remove oldInternal's references to tree
-        oldInternal.ownerNode       = ownerDocument;
-        oldInternal.isOwned(false);
-        oldInternal.nextSibling     = null;
-        oldInternal.previousSibling = null;
-
-        changed();
-
-        // notify document
-        ownerDocument.removedNode(this, replace);
-
-        checkNormalizationAfterRemove(oldPreviousSibling);
-
-        return oldInternal;
-
-    } // internalRemoveChild(Node,int):Node
-
-    /**
-     * Make newChild occupy the location that oldChild used to
-     * have. Note that newChild will first be removed from its previous
-     * parent, if any. Equivalent to inserting newChild before oldChild,
-     * then removing oldChild.
-     *
-     * @returns oldChild, in its new state (removed).
-     *
-     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
-     * type that shouldn't be a child of this node, or if newChild is
-     * one of our ancestors.
-     *
-     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
-     * different owner document than we do.
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node replaceChild(Node newChild, Node oldChild)
-        throws DOMException {
-
-        makeChildNode();
-
-        // If Mutation Events are being generated, this operation might
-        // throw aggregate events twice when modifying an Attr -- once 
-        // on insertion and once on removal. DOM Level 2 does not specify 
-        // this as either desirable or undesirable, but hints that
-        // aggregations should be issued only once per user request.
-
-        // notify document
-        CoreDocumentImpl ownerDocument = ownerDocument();
-        ownerDocument.replacingNode(this);
-
-        internalInsertBefore(newChild, oldChild, true);
-        if (newChild != oldChild) {
-            internalRemoveChild(oldChild, true);
-        }
-
-        // notify document
-        ownerDocument.replacedNode(this);
-
-        return oldChild;
-    }
-
-    //
-    // NodeList methods
-    //
-
-    /**
-     * NodeList method: Count the immediate children of this node
-     * @return int
-     */
-    public int getLength() {
-
-        if (hasStringValue()) {
-            return 1;
-        }
-        ChildNode node = (ChildNode) value;
-        int length = 0;
-        for (; node != null; node = node.nextSibling) {
-            length++;
-        }
-        return length;
-
-    } // getLength():int
-
-    /**
-     * NodeList method: Return the Nth immediate child of this node, or
-     * null if the index is out of bounds.
-     * @return org.w3c.dom.Node
-     * @param Index int
-     */
-    public Node item(int index) {
-
-        if (hasStringValue()) {
-            if (index != 0 || value == null) {
-                return null;
-            }
-            else {
-                makeChildNode();
-                return (Node) value;
-            }
-        }
-        ChildNode node = (ChildNode) value;
-        for (int i = 0; i < index && node != null; i++) {
-            node = node.nextSibling;
-        }
-        return node;
-
-    } // item(int):Node
-
-    //
-    // DOM2: methods, getters, setters
-    //
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Override default behavior so that if deep is true, children are also
-     * toggled.
-     * @see Node
-     * <P>
-     * Note: this will not change the state of an EntityReference or its
-     * children, which are always read-only.
-     */
-    public void setReadOnly(boolean readOnly, boolean deep) {
-
-        super.setReadOnly(readOnly, deep);
-
-        if (deep) {
-
-            if (needsSyncChildren()) {
-                synchronizeChildren();
-            }
-
-            if (hasStringValue()) {
-                return;
-            }
-            // Recursively set kids
-            for (ChildNode mykid = (ChildNode) value;
-                 mykid != null;
-                 mykid = mykid.nextSibling) {
-                if (mykid.getNodeType() != Node.ENTITY_REFERENCE_NODE) {
-                    mykid.setReadOnly(readOnly,true);
-                }
-            }
-        }
-    } // setReadOnly(boolean,boolean)
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Override this method in subclass to hook in efficient
-     * internal data structure.
-     */
-    protected void synchronizeChildren() {
-        // By default just change the flag to avoid calling this method again
-        needsSyncChildren(false);
-    }
-
-    /**
-     * Checks the normalized state of this node after inserting a child.
-     * If the inserted child causes this node to be unnormalized, then this
-     * node is flagged accordingly.
-     * The conditions for changing the normalized state are:
-     * <ul>
-     * <li>The inserted child is a text node and one of its adjacent siblings
-     * is also a text node.
-     * <li>The inserted child is is itself unnormalized.
-     * </ul>
-     *
-     * @param insertedChild the child node that was inserted into this node
-     *
-     * @throws NullPointerException if the inserted child is <code>null</code>
-     */
-    void checkNormalizationAfterInsert(ChildNode insertedChild) {
-        // See if insertion caused this node to be unnormalized.
-        if (insertedChild.getNodeType() == Node.TEXT_NODE) {
-            ChildNode prev = insertedChild.previousSibling();
-            ChildNode next = insertedChild.nextSibling;
-            // If an adjacent sibling of the new child is a text node,
-            // flag this node as unnormalized.
-            if ((prev != null && prev.getNodeType() == Node.TEXT_NODE) ||
-                (next != null && next.getNodeType() == Node.TEXT_NODE)) {
-                isNormalized(false);
-            }
-        }
-        else {
-            // If the new child is not normalized,
-            // then this node is inherently not normalized.
-            if (!insertedChild.isNormalized()) {
-                isNormalized(false);
-            }
-        }
-    } // checkNormalizationAfterInsert(ChildNode)
-
-    /**
-     * Checks the normalized of this node after removing a child.
-     * If the removed child causes this node to be unnormalized, then this
-     * node is flagged accordingly.
-     * The conditions for changing the normalized state are:
-     * <ul>
-     * <li>The removed child had two adjacent siblings that were text nodes.
-     * </ul>
-     *
-     * @param previousSibling the previous sibling of the removed child, or
-     * <code>null</code>
-     */
-    void checkNormalizationAfterRemove(ChildNode previousSibling) {
-        // See if removal caused this node to be unnormalized.
-        // If the adjacent siblings of the removed child were both text nodes,
-        // flag this node as unnormalized.
-        if (previousSibling != null &&
-            previousSibling.getNodeType() == Node.TEXT_NODE) {
-
-            ChildNode next = previousSibling.nextSibling;
-            if (next != null && next.getNodeType() == Node.TEXT_NODE) {
-                isNormalized(false);
-            }
-        }
-    } // checkNormalizationAfterRemove(ChildNode)
-
-    //
-    // Serialization methods
-    //
-
-    /** Serialize object. */
-    private void writeObject(ObjectOutputStream out) throws IOException {
-
-        // synchronize chilren
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        // write object
-        out.defaultWriteObject();
-
-    } // writeObject(ObjectOutputStream)
-
-    /** Deserialize object. */
-    private void readObject(ObjectInputStream ois)
-        throws ClassNotFoundException, IOException {
-
-        // perform default deseralization
-        ois.defaultReadObject();
-
-        // hardset synchildren - so we don't try to sync -
-        // it does not make any sense to try to synchildren when we just
-        // deserialize object.
-        needsSyncChildren(false);
-
-    } // readObject(ObjectInputStream)
-
-} // class AttrImpl
diff --git a/src/org/apache/xerces/dom/AttrNSImpl.java b/src/org/apache/xerces/dom/AttrNSImpl.java
deleted file mode 100644
index a1fc6bc..0000000
--- a/src/org/apache/xerces/dom/AttrNSImpl.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-
-/**
- * AttrNSImpl inherits from AttrImpl and adds namespace support. 
- * <P>
- * The qualified name is the node name, and we store localName which is also
- * used in all queries. On the other hand we recompute the prefix when
- * necessary.
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- * @author Ralf Pfeiffer, IBM
- */
-public class AttrNSImpl
-    extends AttrImpl {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -781906615369795414L;
-    static final String xmlnsURI = "http://www.w3.org/2000/xmlns/";
-    static final String xmlURI = "http://www.w3.org/XML/1998/namespace";
-
-    //
-    // Data
-    //
-
-    /** DOM2: Namespace URI. */
-    protected String namespaceURI;
-  
-    /** DOM2: localName. */
-    protected String localName;
-    /**
-     * DOM2: Constructor for Namespace implementation.
-     */
-    protected AttrNSImpl(CoreDocumentImpl ownerDocument, 
-			 String namespaceURI, 
-			 String qualifiedName) {
-
-    	super(ownerDocument, qualifiedName);
-
-        int index = qualifiedName.indexOf(':');
-        String prefix;
-        if (index < 0) {
-            prefix = null;
-            localName = qualifiedName;
-
-            if (ownerDocument.errorChecking &&
-                qualifiedName.equals("xmlns") &&
-                (namespaceURI == null || !namespaceURI.equals(xmlnsURI))) {
-
-                throw new DOMException(DOMException.NAMESPACE_ERR, 
-				       "DOM003 Namespace error");
-            }
-        }
-        else {
-            prefix = qualifiedName.substring(0, index); 
-            localName = qualifiedName.substring(index+1);
-        
-            if (ownerDocument.errorChecking) {
-                if (namespaceURI == null
-                    || (localName.length() == 0)
-                    || (localName.indexOf(':') >= 0)) {
-                    throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                           "DOM003 Namespace error");
-                } else if (prefix.equals("xml")) {
-                    if (!namespaceURI.equals(xmlURI)) {
-                        throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                               "DOM003 Namespace error");
-                    }
-                } else if (prefix.equals("xmlns")) {
-                    if (!namespaceURI.equals(xmlnsURI)) {
-                        throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                               "DOM003 Namespace error");
-                    }
-                } else if (index == 0) {
-                    throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                           "DOM003 Namespace error");
-                }
-            }
-        }
-	this.namespaceURI = namespaceURI;
-    } 
-
-    // for DeferredAttrImpl
-    protected AttrNSImpl(CoreDocumentImpl ownerDocument, 
-			 String value) {
-	super(ownerDocument, value);
-    }
-
-    //
-    // DOM2: Namespace methods
-    //
-
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * The namespace URI of this node, or null if it is unspecified.<p>
-     *
-     * This is not a computed value that is the result of a namespace lookup
-     * based on an examination of the namespace declarations in scope. It is
-     * merely the namespace URI given at creation time.<p>
-     *
-     * For nodes created with a DOM Level 1 method, such as createElement
-     * from the Document interface, this is null.     
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getNamespaceURI()
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        // REVIST: This code could/should be done at a lower-level, such that
-        // the namespaceURI is set properly upon creation. However, there still
-        // seems to be some DOM spec interpretation grey-area.
-	return namespaceURI;
-    }
-    
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * The namespace prefix of this node, or null if it is unspecified. <p>
-     *
-     * For nodes created with a DOM Level 1 method, such as createElement
-     * from the Document interface, this is null. <p>
-     *
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getPrefix()
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        int index = name.indexOf(':');
-        return index < 0 ? null : name.substring(0, index); 
-    }
-    
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * Note that setting this attribute changes the nodeName attribute, which
-     * holds the qualified name, as well as the tagName and name attributes of
-     * the Element and Attr interfaces, when applicable.<p>
-     *
-     * @throws INVALID_CHARACTER_ERR Raised if the specified
-     * prefix contains an invalid character.     
-     *
-     * @since WD-DOM-Level-2-19990923
-     */
-    public void setPrefix(String prefix)
-        throws DOMException
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-	if (ownerDocument().errorChecking) {
-            if (isReadOnly()) {
-                throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                     "DOM001 Modification not allowed");
-            }
-            if (!CoreDocumentImpl.isXMLName(prefix)) {
-                throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
-    	                               "DOM002 Illegal character");
-            }
-            if (namespaceURI == null || prefix.indexOf(':') >=0) {
-                throw new DOMException(DOMException.NAMESPACE_ERR, 
-				       "DOM003 Namespace error");
-            } else if (prefix != null) {
-                if (prefix.equals("xmlns")) {
-                    if (!namespaceURI.equals(xmlnsURI)){
-                        throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                               "DOM003 Namespace error");
-                    }
-                } else if (prefix.equals("xml")) {
-                    if (!namespaceURI.equals(xmlURI)) {
-                        throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                               "DOM003 Namespace error");
-                    }
-                }else if (name.equals("xmlns")) {
-                        throw new DOMException(DOMException.NAMESPACE_ERR,
-                               "DOM003 Namespace error");
-                }
-            }
-        }
-        // update node name with new qualifiedName
-	name = prefix + ":" + localName;
-    }
-                                        
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * Returns the local part of the qualified name of this node.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getLocalName()
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return localName;
-    }
-}
diff --git a/src/org/apache/xerces/dom/AttributeMap.java b/src/org/apache/xerces/dom/AttributeMap.java
deleted file mode 100644
index cf407a1..0000000
--- a/src/org/apache/xerces/dom/AttributeMap.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-
-
-/**
- * AttributeMap inherits from NamedNodeMapImpl and extends it to deal with the
- * specifics of storing attributes. These are:
- * <ul>
- *  <li>managing ownership of attribute nodes
- *  <li>managing default attributes
- *  <li>firing mutation events
- * </ul>
- * <p>
- * This class doesn't directly support mutation events, however, it notifies
- * the document when mutations are performed so that the document class do so.
- *
- */
-public class AttributeMap extends NamedNodeMapImpl {
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a named node map. */
-    protected AttributeMap(ElementImpl ownerNode, NamedNodeMapImpl defaults) {
-        super(ownerNode);
-        if (defaults != null) {
-            // initialize map with the defaults
-            cloneContent(defaults);
-            if (nodes != null) {
-                hasDefaults(true);
-            }
-        }
-    }
-
-    /**
-     * Adds an attribute using its nodeName attribute.
-     * @see org.w3c.dom.NamedNodeMap#setNamedItem
-     * @return If the new Node replaces an existing node the replaced Node is
-     *      returned, otherwise null is returned. 
-     * @param arg 
-     *      An Attr node to store in this map.
-     * @exception org.w3c.dom.DOMException The exception description.
-     */
-    public Node setNamedItem(Node arg)
-        throws DOMException {
-
-    	if (isReadOnly()) {
-            throw
-                new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                     "DOM001 Modification not allowed");
-        }
-    	if(arg.getOwnerDocument() != ownerNode.ownerDocument()) {
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,
-                                       "DOM005 Wrong document");
-        }
-        if (arg.getNodeType() != arg.ATTRIBUTE_NODE) {
-            throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-                                   "DOM006 Hierarchy request error");
-        }
-
-        AttrImpl argn = (AttrImpl)arg;
-
-    	if (argn.isOwned()) {
-            throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
-                                       "DOM009 Attribute already in use");
-        }
-
-        // set owner
-        argn.ownerNode = ownerNode;
-        argn.isOwned(true);
-
-   	int i = findNamePoint(arg.getNodeName(),0);
-    	AttrImpl previous = null;
-    	if (i >= 0) {
-            previous = (AttrImpl) nodes.elementAt(i);
-            nodes.setElementAt(arg,i);
-            previous.ownerNode = ownerNode.ownerDocument();
-            previous.isOwned(false);
-            // make sure it won't be mistaken with defaults in case it's reused
-            previous.isSpecified(true);
-    	} else {
-            i = -1 - i; // Insert point (may be end of list)
-            if (null == nodes) {
-                nodes = new Vector(5, 10);
-            }
-            nodes.insertElementAt(arg, i);
-        }
-
-        // notify document
-        ownerNode.ownerDocument().setAttrNode(argn, previous);
-
-        // If the new attribute is not normalized,
-        // the owning element is inherently not normalized.
-        if (!argn.isNormalized()) {
-            ownerNode.isNormalized(false);
-        }
-        return previous;
-
-    } // setNamedItem(Node):Node
-
-    /**
-     * Adds an attribute using its namespaceURI and localName.
-     * @see org.w3c.dom.NamedNodeMap#setNamedItem
-     * @return If the new Node replaces an existing node the replaced Node is
-     *      returned, otherwise null is returned. 
-     * @param arg A node to store in a named node map.
-     */
-    public Node setNamedItemNS(Node arg)
-        throws DOMException {
-
-    	if (isReadOnly()) {
-            throw
-                new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                     "DOM001 Modification not allowed");
-        }
-    
-    	if(arg.getOwnerDocument() != ownerNode.ownerDocument()) {
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,
-                                       "DOM005 Wrong document");
-        }
-
-        if (arg.getNodeType() != arg.ATTRIBUTE_NODE) {
-            throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-                                   "DOM006 Hierarchy request error");
-        }
-        AttrImpl argn = (AttrImpl)arg;
-    	if (argn.isOwned()) {
-            throw new DOMException(DOMException.INUSE_ATTRIBUTE_ERR,
-                                       "DOM009 Attribute already in use");
-        }
-
-        // set owner
-        argn.ownerNode = ownerNode;
-        argn.isOwned(true);
-
-    	int i = findNamePoint(argn.getNamespaceURI(), argn.getLocalName());
-    	AttrImpl previous = null;
-    	if (i >= 0) {
-            previous = (AttrImpl) nodes.elementAt(i);
-            nodes.setElementAt(arg,i);
-            previous.ownerNode = ownerNode.ownerDocument();
-            previous.isOwned(false);
-            // make sure it won't be mistaken with defaults in case it's reused
-            previous.isSpecified(true);
-    	} else {
-    	    // If we can't find by namespaceURI, localName, then we find by
-    	    // nodeName so we know where to insert.
-    	    i = findNamePoint(arg.getNodeName(),0);
-            if (i >=0) {
-                previous = (AttrImpl) nodes.elementAt(i);
-                nodes.insertElementAt(arg,i);
-            } else {
-                i = -1 - i; // Insert point (may be end of list)
-                if (null == nodes) {
-                    nodes = new Vector(5, 10);
-                }
-                nodes.insertElementAt(arg, i);
-            }
-        }
-        //    	changed(true);
-
-        // notify document
-        ownerNode.ownerDocument().setAttrNode(argn, previous);
-
-        // If the new attribute is not normalized,
-        // the owning element is inherently not normalized.
-        if (!argn.isNormalized()) {
-            ownerNode.isNormalized(false);
-        }
-        return previous;
-
-    } // setNamedItemNS(Node):Node
-   
-    /**
-     * Removes an attribute specified by name.
-     * @param name
-     *      The name of a node to remove. 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.
-     * @return The node removed from the map if a node with such a name exists.
-     * @throws              NOT_FOUND_ERR: Raised if there is no node named
-     *                      name in the map.
-     */
-    /***/
-    public Node removeNamedItem(String name)
-        throws DOMException {
-        return internalRemoveNamedItem(name, true);
-    }
-
-    /**
-     * Same as removeNamedItem except that it simply returns null if the
-     * specified name is not found.
-     */
-    Node safeRemoveNamedItem(String name) {
-        return internalRemoveNamedItem(name, false);
-    }
-
-    /**
-     * Internal removeNamedItem method allowing to specify whether an exception
-     * must be thrown if the specified name is not found.
-     */
-    final protected Node internalRemoveNamedItem(String name, boolean raiseEx){
-    	if (isReadOnly()) {
-            throw
-                new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                     "DOM001 Modification not allowed");
-        }
-    	int i = findNamePoint(name,0);
-    	if (i < 0) {
-            if (raiseEx) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR,
-                                           "DOM008 Not found");
-            } else {
-                return null;
-            }
-        }
-
-        AttrImpl n = (AttrImpl)nodes.elementAt(i);
-        CoreDocumentImpl ownerDocument = ownerNode.ownerDocument();
-
-        // If there's a default, add it instead
-        if (hasDefaults()) {
-            NamedNodeMapImpl defaults =
-                ((ElementImpl) ownerNode).getDefaultAttributes();
-            Node d;
-            if (defaults != null && (d = defaults.getNamedItem(name)) != null
-                && findNamePoint(name, i+1) < 0) {
-
-                NodeImpl clone = (NodeImpl)d.cloneNode(true);
-                clone.ownerNode = ownerNode;
-                clone.isOwned(true);
-                clone.isSpecified(false);
-                nodes.setElementAt(clone, i);
-            } else {
-                nodes.removeElementAt(i);
-            }
-        } else {
-            nodes.removeElementAt(i);
-        }
-
-        //        changed(true);
-
-        // remove reference to owner
-        n.ownerNode = ownerDocument;
-        n.isOwned(false);
-        // make sure it won't be mistaken with defaults in case it's reused
-        n.isSpecified(true);
-
-        // notify document
-        ownerDocument.removedAttrNode(n, ownerNode, name);
-
-        return n;
-
-    } // internalRemoveNamedItem(String,boolean):Node
-    
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Removes an attribute specified by local name and namespace URI.
-     * @param namespaceURI
-     *                      The namespace URI of the node to remove.
-     *                      When it is null or an empty string, this
-     *                      method behaves like removeNamedItem.
-     * @param               The local name of the node to remove. If the
-     *                      removed attribute is known to have a default
-     *                      value, an attribute immediately appears
-     *                      containing the default value.
-     * @return Node         The node removed from the map if a node with such
-     *                      a local name and namespace URI exists.
-     * @throws              NOT_FOUND_ERR: Raised if there is no node named
-     *                      name in the map.
-     */
-    public Node removeNamedItemNS(String namespaceURI, String name)
-        throws DOMException {
-        return internalRemoveNamedItemNS(namespaceURI, name, true);
-    }
-
-    /**
-     * Same as removeNamedItem except that it simply returns null if the
-     * specified local name and namespace URI is not found.
-     */
-    Node safeRemoveNamedItemNS(String namespaceURI, String name) {
-        return internalRemoveNamedItemNS(namespaceURI, name, false);
-    }
-
-    /**
-     * Internal removeNamedItemNS method allowing to specify whether an
-     * exception must be thrown if the specified local name and namespace URI
-     * is not found.
-     */
-    final protected Node internalRemoveNamedItemNS(String namespaceURI,
-                                                   String name,
-                                                   boolean raiseEx) {
-    	if (isReadOnly()) {
-            throw
-                new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                     "DOM001 Modification not allowed");
-        }
-    	int i = findNamePoint(namespaceURI, name);
-    	if (i < 0) {
-            if (raiseEx) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR,
-                                           "DOM008 Not found");
-            } else {
-                return null;
-            }
-        }
-
-        AttrImpl n = (AttrImpl)nodes.elementAt(i);
-        CoreDocumentImpl ownerDocument = ownerNode.ownerDocument();
-
-        // If there's a default, add it instead
-        String nodeName = n.getNodeName();
-        if (hasDefaults()) {
-            NamedNodeMapImpl defaults =
-                ((ElementImpl) ownerNode).getDefaultAttributes();
-            Node d;
-            if (defaults != null
-                && (d = defaults.getNamedItem(nodeName)) != null)
-                {
-                    int j = findNamePoint(nodeName,0);
-                    if (j>=0 && findNamePoint(nodeName, j+1) < 0) {
-                        NodeImpl clone = (NodeImpl)d.cloneNode(true);
-                        clone.ownerNode = ownerNode;
-                        // REVISIT: can we assume that if we reach here it is 
-                        // always attrNSImpl
-                        if (clone instanceof AttrNSImpl) {
-                            // we must rely on the name to find a default attribute
-                            // ("test:attr"), but while copying it from the DOCTYPE
-                            // we should not loose namespace URI that was assigned
-                            // to the attribute in the instance document.
-                            ((AttrNSImpl)clone).namespaceURI = namespaceURI;
-                        }
-                        clone.isOwned(true);
-                        clone.isSpecified(false);
-                        nodes.setElementAt(clone, i);
-                    } else {
-                        nodes.removeElementAt(i);
-                    }
-                } else {
-                    nodes.removeElementAt(i);
-                }
-        } else {
-            nodes.removeElementAt(i);
-        }
-
-        //        changed(true);
-
-        // remove reference to owner
-        n.ownerNode = ownerDocument;
-        n.isOwned(false);
-        // make sure it won't be mistaken with defaults in case it's reused
-        n.isSpecified(true);
-
-        // notify document
-        ownerDocument.removedAttrNode(n, ownerNode, name);
-
-        return n;
-
-    } // internalRemoveNamedItemNS(String,String,boolean):Node
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Cloning a NamedNodeMap is a DEEP OPERATION; it always clones
-     * all the nodes contained in the map.
-     */
-     
-    public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) {
-    	AttributeMap newmap =
-            new AttributeMap((ElementImpl) ownerNode, null);
-        newmap.hasDefaults(hasDefaults());
-        newmap.cloneContent(this);
-    	return newmap;
-    } // cloneMap():AttributeMap
-
-    /**
-     * Override parent's method to set the ownerNode correctly
-     */
-    protected void cloneContent(NamedNodeMapImpl srcmap) {
-    	if (srcmap.nodes != null) {
-            if (nodes == null) {
-                nodes = new Vector(srcmap.nodes.size());
-            }
-            else {
-                nodes.setSize(srcmap.nodes.size());
-            }
-            for (int i = 0; i < srcmap.nodes.size(); ++i) {
-                NodeImpl n = (NodeImpl) srcmap.nodes.elementAt(i);
-                NodeImpl clone = (NodeImpl) n.cloneNode(true);
-                clone.isSpecified(n.isSpecified());
-                nodes.insertElementAt(clone, i);
-                clone.ownerNode = ownerNode;
-                clone.isOwned(true);
-            }
-        }
-    } // cloneContent():AttributeMap
-
-
-    /**
-     * Get this AttributeMap in sync with the given "defaults" map.
-     * @param defaults The default attributes map to sync with.
-     */
-    protected void reconcileDefaults(NamedNodeMapImpl defaults) {
-        
-        // remove any existing default
-        int nsize = (nodes != null) ? nodes.size() : 0;
-        for (int i = nsize - 1; i >= 0; i--) {
-            AttrImpl attr = (AttrImpl) nodes.elementAt(i);
-            if (!attr.isSpecified()) {
-                // remove owning element
-                attr.ownerNode = ownerNode.ownerDocument();
-                attr.isOwned(false);
-                // make sure it won't be mistaken in case it's reused
-                attr.isSpecified(true);
-                nodes.removeElementAt(i);
-            }
-        }
-        // add the new defaults
-    	if (defaults == null) {
-            return;
-        }
-        if (nodes == null || nodes.size() == 0) {
-            cloneContent(defaults);
-        }
-        else {
-            int dsize = defaults.nodes.size();
-            for (int n = 0; n < dsize; n++) {
-                AttrImpl d = (AttrImpl) defaults.nodes.elementAt(n);
-                int i = findNamePoint(d.getNodeName(), 0);
-                if (i < 0) {
-                    NodeImpl clone = (NodeImpl) d.cloneNode(true);
-                    clone.ownerNode = ownerNode;
-                    clone.isOwned(true);
-                    clone.isSpecified(false);
-                    nodes.setElementAt(clone, i);
-                }
-            }
-        }
-
-    } // reconcileDefaults()
-
-} // class AttributeMap
diff --git a/src/org/apache/xerces/dom/CDATASectionImpl.java b/src/org/apache/xerces/dom/CDATASectionImpl.java
deleted file mode 100644
index 7d99777..0000000
--- a/src/org/apache/xerces/dom/CDATASectionImpl.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Node;
-
-/**
- * XML provides the CDATA markup to allow a region of text in which
- * most of the XML delimiter recognition does not take place. This is
- * intended to ease the task of quoting XML fragments and other
- * programmatic information in a document's text without needing to
- * escape these special characters. It's primarily a convenience feature
- * for those who are hand-editing XML.
- * <P>
- * CDATASection is an Extended DOM feature, and is not used in HTML 
- * contexts.
- * <P>
- * Within the DOM, CDATASections are treated essentially as Text
- * blocks. Their distinct type is retained in order to allow us to
- * properly recreate the XML syntax when we write them out.
- * <P>
- * Reminder: CDATA IS NOT A COMPLETELY GENERAL SOLUTION; it can't
- * quote its own end-of-block marking. If you need to write out a
- * CDATA that contains the ]]> sequence, it's your responsibility to
- * split that string over two successive CDATAs at that time.
- * <P>
- * CDATA does not participate in Element.normalize() processing.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class CDATASectionImpl 
-    extends TextImpl 
-    implements CDATASection {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 2372071297878177780L;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor for creating a CDATA section. */
-    public CDATASectionImpl(CoreDocumentImpl ownerDoc, String data) {
-        super(ownerDoc, data);
-    }  
-    
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.CDATA_SECTION_NODE;
-    }
-  
-    /** Returns the node name. */
-    public String getNodeName() {
-        return "#cdata-section";
-    }
-
-} // class CDATASectionImpl
diff --git a/src/org/apache/xerces/dom/CharacterDataImpl.java b/src/org/apache/xerces/dom/CharacterDataImpl.java
deleted file mode 100644
index fe315ca..0000000
--- a/src/org/apache/xerces/dom/CharacterDataImpl.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/**
- * CharacterData is an abstract Node that can carry character data as its
- * Value.  It provides shared behavior for Text, CData, and
- * possibly other node types. All offsets are 0-based.
- * <p>
- * Since ProcessingInstructionImpl inherits from this class to reuse the
- * setNodeValue method, this class isn't declared as implementing the interface
- * CharacterData. This is done by relevant subclasses (TexImpl, CommentImpl).
- * <p>
- * This class doesn't directly support mutation events, however, it notifies
- * the document when mutations are performed so that the document class do so.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public abstract class CharacterDataImpl
-    extends ChildNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 7931170150428474230L;
-
-    //
-    // Data
-    //
-
-    protected String data;
-
-    /** Empty child nodes. */
-    private static transient NodeList singletonNodeList = new NodeList() {
-        public Node item(int index) { return null; }
-        public int getLength() { return 0; }
-    };
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    protected CharacterDataImpl(CoreDocumentImpl ownerDocument, String data) {
-        super(ownerDocument);
-        this.data = data;
-    }
-
-    //
-    // Node methods
-    //
-
-    /** Returns an empty node list. */
-    public NodeList getChildNodes() {
-        return singletonNodeList;
-    }
-
-    /*
-     * returns the content of this node
-     */
-    public String getNodeValue() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return data;
-    }
-
-    /** This function added so that we can distinguish whether
-     *  setNodeValue has been called from some other DOM functions.
-     *  or by the client.<p>
-     *  This is important, because we do one type of Range fix-up, 
-     *  from the high-level functions in CharacterData, and another
-     *  type if the client simply calls setNodeValue(value).
-     */
-    protected void setNodeValueInternal(String value) {
-    	if (isReadOnly())
-    		throw new DOMException(
-    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-    			"DOM001 Modification not allowed");
-        // revisit: may want to set the value in ownerDocument.
-    	// Default behavior, overridden in some subclasses
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        // keep old value for document notification
-        String oldvalue = this.data;
-
-        CoreDocumentImpl ownerDocument = ownerDocument();
-
-        // notify document
-        ownerDocument.modifyingCharacterData(this);
-
-    	this.data = value;
-
-        // notify document
-        ownerDocument.modifiedCharacterData(this, oldvalue, value);
-    }
-
-    /**
-     * Sets the content, possibly firing related events,
-     * and updating ranges (via notification to the document)
-     */
-    public void setNodeValue(String value) {
-
-        setNodeValueInternal(value);
-
-        // notify document
-        ownerDocument().replacedText(this);
-    }
-
-    //
-    // CharacterData methods
-    //
-
-    /**
-     * Retrieve character data currently stored in this node.
-     * 
-     * @throws DOMExcpetion(DOMSTRING_SIZE_ERR) In some implementations,
-     * the stored data may exceed the permitted length of strings. If so,
-     * getData() will throw this DOMException advising the user to
-     * instead retrieve the data in chunks via the substring() operation.  
-     */
-    public String getData() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return data;
-    }
-
-    /** 
-     * Report number of characters currently stored in this node's
-     * data. It may be 0, meaning that the value is an empty string. 
-     */
-    public int getLength() {   
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return data.length();
-    }  
-
-    /** 
-     * Concatenate additional characters onto the end of the data
-     * stored in this node. Note that this, and insert(), are the paths
-     * by which a DOM could wind up accumulating more data than the
-     * language's strings can easily handle. (See above discussion.)
-     * 
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is readonly.
-     */
-    public void appendData(String data) {
-
-        if (isReadOnly()) {
-        	throw new DOMException(
-        		DOMException.NO_MODIFICATION_ALLOWED_ERR,
-        		"DOM001 Modification not allowed");
-        }
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        
-        setNodeValue(this.data + data);
-
-    } // appendData(String)
-
-    /**
-     * Remove a range of characters from the node's value. Throws a
-     * DOMException if the offset is beyond the end of the
-     * string. However, a deletion _count_ that exceeds the available
-     * data is accepted as a delete-to-end request.
-     * 
-     * @throws DOMException(INDEX_SIZE_ERR) if offset is negative or
-     * greater than length, or if count is negative.
-     * 
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is
-     * readonly.  
-     */
-    public void deleteData(int offset, int count) 
-        throws DOMException {
-
-        if (isReadOnly()) {
-        	throw new DOMException(
-        		DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-        		"DOM001 Modification not allowed");
-        }
-
-        if (count < 0) {
-        	throw new DOMException(DOMException.INDEX_SIZE_ERR, 
-        	                           "DOM004 Index out of bounds");
-        }
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        int tailLength = Math.max(data.length() - count - offset, 0);
-        try {
-            String value = data.substring(0, offset) +
-                (tailLength > 0
-                 ? data.substring(offset + count, offset + count + tailLength) 
-                 : "");
-
-            setNodeValueInternal(value);
-
-            // notify document
-            ownerDocument().deletedText(this, offset, count);
-        }
-        catch (StringIndexOutOfBoundsException e) {
-        	throw new DOMException(DOMException.INDEX_SIZE_ERR, 
-        	                           "DOM004 Index out of bounds");
-        }
-
-    } // deleteData(int,int)
-
-    /**
-     * Insert additional characters into the data stored in this node,
-     * at the offset specified.
-     *
-     * @throws DOMException(INDEX_SIZE_ERR) if offset is negative or
-     * greater than length.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is readonly.  
-     */
-    public void insertData(int offset, String data) 
-        throws DOMException {
-
-        if (isReadOnly()) {
-        	throw new DOMException(
-        		DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-        		"DOM001 Modification not allowed");
-        }
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        try {
-            String value =
-                new StringBuffer(this.data).insert(offset, data).toString();
-
-            setNodeValueInternal(value);
-
-            // notify document
-            ownerDocument().insertedText(this, offset, data.length());
-        }
-        catch (StringIndexOutOfBoundsException e) {
-        	throw new DOMException(DOMException.INDEX_SIZE_ERR, 
-        	                           "DOM004 Index out of bounds");
-        }
-
-    } // insertData(int,int)
-
-    /**
-     * Replace a series of characters at the specified (zero-based)
-     * offset with a new string, NOT necessarily of the same
-     * length. Convenience method, equivalent to a delete followed by an
-     * insert. Throws a DOMException if the specified offset is beyond
-     * the end of the existing data.
-     * 
-     * @param offset       The offset at which to begin replacing.
-     * 
-     * @param count        The number of characters to remove, 
-     * interpreted as in the delete() method.
-     * 
-     * @param data         The new string to be inserted at offset in place of
-     * the removed data. Note that the entire string will
-     * be inserted -- the count parameter does not affect
-     * insertion, and the new data may be longer or shorter
-     * than the substring it replaces.
-     * 
-     * @throws DOMException(INDEX_SIZE_ERR) if offset is negative or
-     * greater than length, or if count is negative.
-     * 
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is
-     * readonly.  
-     */
-    public void replaceData(int offset, int count, String data) 
-        throws DOMException {
-
-        // The read-only check is done by deleteData()
-        // ***** This could be more efficient w/r/t Mutation Events,
-        // specifically by aggregating DOMAttrModified and
-        // DOMSubtreeModified. But mutation events are 
-        // underspecified; I don't feel compelled
-        // to deal with it right now.
-        deleteData(offset, count);
-        insertData(offset, data);
-
-    } // replaceData(int,int,String)
-
-    /**
-     * Store character data into this node.
-     * 
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is readonly.
-     */
-    public void setData(String value) 
-        throws DOMException {
-        setNodeValue(value);
-    }
-
-    /** 
-     * Substring is more than a convenience function. In some
-     * implementations of the DOM, where the stored data may exceed the
-     * length that can be returned in a single string, the only way to
-     * read it all is to extract it in chunks via this method.
-     *
-     * @param offset        Zero-based offset of first character to retrieve.
-     * @param count Number of characters to retrieve. 
-     *
-     * If the sum of offset and count exceeds the length, all characters
-     * to end of data are returned.
-     *
-     * @throws DOMException(INDEX_SIZE_ERR) if offset is negative or
-     * greater than length, or if count is negative.
-     *
-     * @throws DOMException(WSTRING_SIZE_ERR) In some implementations,
-     * count may exceed the permitted length of strings. If so,
-     * substring() will throw this DOMException advising the user to
-     * instead retrieve the data in smaller chunks.  
-     */
-    public String substringData(int offset, int count) 
-        throws DOMException {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        
-        int length = data.length();
-        if (count < 0 || offset < 0 || offset > length - 1) {
-            throw new DOMException(DOMException.INDEX_SIZE_ERR, 
-                                       "DOM004 Index out of bounds");
-        }
-
-        int tailIndex = Math.min(offset + count, length);
-
-        return data.substring(offset, tailIndex);
-
-    } // substringData(int,int):String
-
-} // class CharacterDataImpl
diff --git a/src/org/apache/xerces/dom/ChildNode.java b/src/org/apache/xerces/dom/ChildNode.java
deleted file mode 100644
index 07ed802..0000000
--- a/src/org/apache/xerces/dom/ChildNode.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Node;
-
-/**
- * ChildNode inherits from NodeImpl and adds the capability of being a child by
- * having references to its previous and next siblings.
- */
-public abstract class ChildNode
-    extends NodeImpl {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -6112455738802414002L;
-
-    // public
-
-    //
-    // Data
-    //
-
-    /** Previous sibling. */
-    protected ChildNode previousSibling;
-
-    /** Next sibling. */
-    protected ChildNode nextSibling;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * No public constructor; only subclasses of Node should be
-     * instantiated, and those normally via a Document's factory methods
-     * <p>
-     * Every Node knows what Document it belongs to.
-     */
-    protected ChildNode(CoreDocumentImpl ownerDocument) {
-        super(ownerDocument);
-    } // <init>(CoreDocumentImpl)
-
-    /** Constructor for serialization. */
-    public ChildNode() {}
-
-    //
-    // Node methods
-    //
-
-    /**
-     * Returns a duplicate of a given node. You can consider this a
-     * generic "copy constructor" for nodes. The newly returned object should
-     * be completely independent of the source object's subtree, so changes
-     * in one after the clone has been made will not affect the other.
-     * <P>
-     * Note: since we never have any children deep is meaningless here,
-     * ParentNode overrides this behavior.
-     * @see ParentNode
-     *
-     * <p>
-     * Example: Cloning a Text node will copy both the node and the text it
-     * contains.
-     * <p>
-     * Example: Cloning something that has children -- Element or Attr, for
-     * example -- will _not_ clone those children unless a "deep clone"
-     * has been requested. A shallow clone of an Attr node will yield an
-     * empty Attr of the same name.
-     * <p>
-     * NOTE: Clones will always be read/write, even if the node being cloned
-     * is read-only, to permit applications using only the DOM API to obtain
-     * editable copies of locked portions of the tree.
-     */
-    public Node cloneNode(boolean deep) {
-
-    	ChildNode newnode = (ChildNode) super.cloneNode(deep);
-    	
-        // Need to break the association w/ original kids
-    	newnode.previousSibling = null;
-        newnode.nextSibling     = null;
-        newnode.isFirstChild(false);
-
-    	return newnode;
-
-    } // cloneNode(boolean):Node
-
-    /**
-     * Returns the parent node of this node
-     */
-    public Node getParentNode() {
-        // if we have an owner, ownerNode is our parent, otherwise it's
-        // our ownerDocument and we don't have a parent
-        return isOwned() ? ownerNode : null;
-    }
-
-    /*
-     * same as above but returns internal type
-     */
-    final NodeImpl parentNode() {
-        // if we have an owner, ownerNode is our parent, otherwise it's
-        // our ownerDocument and we don't have a parent
-        return isOwned() ? ownerNode : null;
-    }
-
-    /** The next child of this node's parent, or null if none */
-    public Node getNextSibling() {
-        return nextSibling;
-    }
-
-    /** The previous child of this node's parent, or null if none */
-    public Node getPreviousSibling() {
-        // if we are the firstChild, previousSibling actually refers to our
-        // parent's lastChild, but we hide that
-        return isFirstChild() ? null : previousSibling;
-    }
-
-    /*
-     * same as above but returns internal type
-     */
-    final ChildNode previousSibling() {
-        // if we are the firstChild, previousSibling actually refers to our
-        // parent's lastChild, but we hide that
-        return isFirstChild() ? null : previousSibling;
-    }
-
-} // class ChildNode
diff --git a/src/org/apache/xerces/dom/CommentImpl.java b/src/org/apache/xerces/dom/CommentImpl.java
deleted file mode 100644
index 0d6fedf..0000000
--- a/src/org/apache/xerces/dom/CommentImpl.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.Comment;
-import org.w3c.dom.Node;
-
-/**
- * Represents an XML (or HTML) comment.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class CommentImpl 
-    extends CharacterDataImpl 
-    implements CharacterData, Comment {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -2685736833408134044L;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public CommentImpl(CoreDocumentImpl ownerDoc, String data) {
-    	super(ownerDoc, data);
-    }
-    
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.COMMENT_NODE;
-    }
-
-    /** Returns the node name. */
-    public String getNodeName() {
-        return "#comment";
-    }
-
-} // class CommentImpl
diff --git a/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java b/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java
deleted file mode 100644
index 6ebab6a..0000000
--- a/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-
-/**
- * The DOMImplementation class is description of a particular
- * implementation of the Document Object Model. As such its data is
- * static, shared by all instances of this implementation.
- * <P>
- * The DOM API requires that it be a real object rather than static
- * methods. However, there's nothing that says it can't be a singleton,
- * so that's how I've implemented it.
- * <P>
- * This particular class, along with CoreDocumentImpl, only supports the DOM
- * Core. Optional modules are supported by the more complete DOMImplementation
- * class along with DocumentImpl.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class CoreDOMImplementationImpl  
-    implements DOMImplementation {
-
-    //
-    // Data
-    //
-
-    // static
-
-    /** Dom implementation singleton. */
-    static CoreDOMImplementationImpl singleton =
-        new CoreDOMImplementationImpl();
-
-    //
-    // DOMImplementation methods
-    //
-
-    /** 
-     * Test if the DOM implementation supports a specific "feature" --
-     * currently meaning language and level thereof.
-     * 
-     * @param feature      The package name of the feature to test.
-     * In Level 1, supported values are "HTML" and "XML" (case-insensitive).
-     * At this writing, org.apache.xerces.dom supports only XML.
-     *
-     * @param version      The version number of the feature being tested.
-     * This is interpreted as "Version of the DOM API supported for the
-     * specified Feature", and in Level 1 should be "1.0"
-     *
-     * @returns    true iff this implementation is compatable with the
-     * specified feature and version.
-     */
-    public boolean hasFeature(String feature, String version) {
-
-        // Currently, we support only XML Level 1 version 1.0
-        boolean anyVersion = version == null || version.length() == 0;
-        return 
-            (feature.equalsIgnoreCase("Core") 
-            && (anyVersion
-		|| version.equals("1.0")
-		|| version.equals("2.0")))
-         || (feature.equalsIgnoreCase("XML") 
-            && (anyVersion
-		|| version.equals("1.0")
-		|| version.equals("2.0")))
-            ;
-
-    } // hasFeature(String,String):boolean
-
-    //
-    // Public methods
-    //
-
-    /** NON-DOM: Obtain and return the single shared object */
-    public static DOMImplementation getDOMImplementation() {
-        return singleton;
-    }  
-    
-    /**
-     * Introduced in DOM Level 2. <p>
-     * 
-     * Creates an empty DocumentType node.
-     *
-     * @param qualifiedName The qualified name of the document type to be created. 
-     * @param publicID The document type public identifier.
-     * @param systemID The document type system identifier.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public DocumentType       createDocumentType(String qualifiedName, 
-                                                 String publicID, 
-                                                 String systemID)
-    {
-    	if (!CoreDocumentImpl.isXMLName(qualifiedName)) {
-    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
-    		                           "DOM002 Illegal character");
-        }
-        int index = qualifiedName.indexOf(':');
-        int lastIndex = qualifiedName.lastIndexOf(':');
-        // it is an error for NCName to have more than one ':'
-        if (index == 0 || index == qualifiedName.length() - 1 || lastIndex!=index) {
-	    throw new DOMException(DOMException.NAMESPACE_ERR, 
-				       "DOM003 Namespace error");
-	}
-    	return new DocumentTypeImpl(null, qualifiedName, publicID, systemID);
-    }
-    /**
-     * Introduced in DOM Level 2. <p>
-     * 
-     * Creates an XML Document object of the specified type with its document
-     * element.
-     *
-     * @param namespaceURI     The namespace URI of the document
-     *                         element to create, or null. 
-     * @param qualifiedName    The qualified name of the document
-     *                         element to create. 
-     * @param doctype          The type of document to be created or null.<p>
-     *
-     *                         When doctype is not null, its
-     *                         Node.ownerDocument attribute is set to
-     *                         the document being created.
-     * @return Document        A new Document object.
-     * @throws DOMException    WRONG_DOCUMENT_ERR: Raised if doctype has
-     *                         already been used with a different document.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public Document           createDocument(String namespaceURI, 
-                                             String qualifiedName, 
-                                             DocumentType doctype)
-                                             throws DOMException
-    {
-    	if (doctype != null && doctype.getOwnerDocument() != null) {
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
-                                   "DOM005 Wrong document");
-        }
-        CoreDocumentImpl doc = new CoreDocumentImpl(doctype);
-        Element e = doc.createElementNS( namespaceURI, qualifiedName);
-        doc.appendChild(e);
-        return doc;
-    }
-
-} // class DOMImplementationImpl
diff --git a/src/org/apache/xerces/dom/CoreDocumentImpl.java b/src/org/apache/xerces/dom/CoreDocumentImpl.java
deleted file mode 100644
index d5623c3..0000000
--- a/src/org/apache/xerces/dom/CoreDocumentImpl.java
+++ /dev/null
@@ -1,1795 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Comment;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Entity;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Notation;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventListener;
-import org.w3c.dom.events.EventTarget;
-
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.dom3.UserDataHandler;
-
-
-/**
- * The Document interface represents the entire HTML or XML document.
- * Conceptually, it is the root of the document tree, and provides the
- * primary access to the document's data.
- * <P>
- * Since elements, text nodes, comments, processing instructions,
- * etc. cannot exist outside the context of a Document, the Document
- * interface also contains the factory methods needed to create these
- * objects. The Node objects created have a ownerDocument attribute
- * which associates them with the Document within whose context they
- * were created.
- * <p>
- * The CoreDocumentImpl class only implements the DOM Core. Additional modules
- * are supported by the more complete DocumentImpl subclass.
- * <p>
- * <b>Note:</b> When any node in the document is serialized, the
- * entire document is serialized along with it.
- *
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @author Andy Clark, IBM
- * @author Ralf Pfeiffer, IBM
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class CoreDocumentImpl
-    extends ParentNode implements Document {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 0;
-
-    //
-    // Data
-    //
-
-    // document information
-
-    /** Document type. */
-    protected DocumentTypeImpl docType;
-
-    /** Document element. */
-    protected ElementImpl docElement;
-
-    /** NodeListCache free list */
-    NodeListCache fFreeNLCache;
-
-    /**Experimental DOM Level 3 feature: Document encoding */
-    protected String encoding;
-
-    /**Experimental DOM Level 3 feature: Document encoding */
-    protected String actualEncoding;
-
-    /**Experimental DOM Level 3 feature: Document version */
-    protected String version;
-
-    /**Experimental DOM Level 3 feature: Document standalone */
-    protected boolean standalone;
-
-    /** Table for user data attached to this document nodes. */
-    protected Hashtable userData;
-
-    /** Identifiers. */
-    protected Hashtable identifiers;
-
-    /** Table for quick check of child insertion. */
-    protected static int[] kidOK;
-
-    /**
-     * Number of alterations made to this document since its creation.
-     * Serves as a "dirty bit" so that live objects such as NodeList can
-     * recognize when an alteration has been made and discard its cached
-     * state information.
-     * <p>
-     * Any method that alters the tree structure MUST cause or be
-     * accompanied by a call to changed(), to inform it that any outstanding
-     * NodeLists may have to be updated.
-     * <p>
-     * (Required because NodeList is simultaneously "live" and integer-
-     * indexed -- a bad decision in the DOM's design.)
-     * <p>
-     * Note that changes which do not affect the tree's structure -- changing
-     * the node's name, for example -- do _not_ have to call changed().
-     * <p>
-     * Alternative implementation would be to use a cryptographic
-     * Digest value rather than a count. This would have the advantage that
-     * "harmless" changes (those producing equal() trees) would not force
-     * NodeList to resynchronize. Disadvantage is that it's slightly more prone
-     * to "false negatives", though that's the difference between "wildly
-     * unlikely" and "absurdly unlikely". IF we start maintaining digests,
-     * we should consider taking advantage of them.
-     *
-     * Note: This used to be done a node basis, so that we knew what
-     * subtree changed. But since only DeepNodeList really use this today,
-     * the gain appears to be really small compared to the cost of having
-     * an int on every (parent) node plus having to walk up the tree all the
-     * way to the root to mark the branch as changed everytime a node is
-     * changed.
-     * So we now have a single counter global to the document. It means that
-     * some objects may flush their cache more often than necessary, but this
-     * makes nodes smaller and only the document needs to be marked as changed.
-     */
-    protected int changes = 0;
-
-    // experimental
-
-    /** Allow grammar access. */
-    protected boolean allowGrammarAccess;
-
-    /** Bypass error checking. */
-    protected boolean errorChecking = true;
-
-    //
-    // Static initialization
-    //
-
-    static {
-
-        kidOK = new int[13];
-
-        kidOK[DOCUMENT_NODE] =
-            1 << ELEMENT_NODE | 1 << PROCESSING_INSTRUCTION_NODE |
-            1 << COMMENT_NODE | 1 << DOCUMENT_TYPE_NODE;
-
-        kidOK[DOCUMENT_FRAGMENT_NODE] =
-        kidOK[ENTITY_NODE] =
-        kidOK[ENTITY_REFERENCE_NODE] =
-        kidOK[ELEMENT_NODE] =
-            1 << ELEMENT_NODE | 1 << PROCESSING_INSTRUCTION_NODE |
-            1 << COMMENT_NODE | 1 << TEXT_NODE |
-            1 << CDATA_SECTION_NODE | 1 << ENTITY_REFERENCE_NODE ;
-
-
-        kidOK[ATTRIBUTE_NODE] =
-            1 << TEXT_NODE | 1 << ENTITY_REFERENCE_NODE;
-
-        kidOK[DOCUMENT_TYPE_NODE] =
-        kidOK[PROCESSING_INSTRUCTION_NODE] =
-        kidOK[COMMENT_NODE] =
-        kidOK[TEXT_NODE] =
-        kidOK[CDATA_SECTION_NODE] =
-        kidOK[NOTATION_NODE] =
-            0;
-
-    } // static
-
-    //
-    // Constructors
-    //
-
-    /**
-     * NON-DOM: Actually creating a Document is outside the DOM's spec,
-     * since it has to operate in terms of a particular implementation.
-     */
-    public CoreDocumentImpl() {
-        this(false);
-    }
-
-    /** Constructor. */
-    public CoreDocumentImpl(boolean grammarAccess) {
-        super(null);
-        ownerDocument = this;
-        allowGrammarAccess = grammarAccess;
-    }
-
-    /**
-     * For DOM2 support.
-     * The createDocument factory method is in DOMImplementation.
-     */
-    public CoreDocumentImpl(DocumentType doctype)
-    {
-        this(doctype, false);
-    }
-
-    /** For DOM2 support. */
-    public CoreDocumentImpl(DocumentType doctype, boolean grammarAccess) {
-        this(grammarAccess);
-        if (doctype != null) {
-            DocumentTypeImpl doctypeImpl;
-            try {
-                doctypeImpl = (DocumentTypeImpl) doctype;
-            } catch (ClassCastException e) {
-                throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,
-                                       "DOM005 Wrong document");
-            }
-            doctypeImpl.ownerDocument = this;
-            appendChild(doctype);
-        }
-    }
-
-    //
-    // Node methods
-    //
-
-    // even though ownerDocument refers to this in this implementation
-    // the DOM Level 2 spec says it must be null, so make it appear so
-    final public Document getOwnerDocument() {
-        return null;
-    }
-
-    /** Returns the node type. */
-    public short getNodeType() {
-        return Node.DOCUMENT_NODE;
-    }
-
-    /** Returns the node name. */
-    public String getNodeName() {
-        return "#document";
-    }
-
-    /**
-     * Deep-clone a document, including fixing ownerDoc for the cloned
-     * children. Note that this requires bypassing the WRONG_DOCUMENT_ERR
-     * protection. I've chosen to implement it by calling importNode
-     * which is DOM Level 2.
-     *
-     * @return org.w3c.dom.Node
-     * @param deep boolean, iff true replicate children
-     */
-    public Node cloneNode(boolean deep) {
-
-        CoreDocumentImpl newdoc = new CoreDocumentImpl();
-        callUserDataHandlers(this, newdoc, UserDataHandler.NODE_CLONED);
-        cloneNode(newdoc, deep);
-
-    	return newdoc;
-
-    } // cloneNode(boolean):Node
-
-
-    /**
-     * internal method to share code with subclass
-     **/
-    protected void cloneNode(CoreDocumentImpl newdoc, boolean deep) {
-
-        // clone the children by importing them
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-
-        if (deep) {
-            Hashtable reversedIdentifiers = null;
-
-            if (identifiers != null) {
-                // Build a reverse mapping from element to identifier.
-                reversedIdentifiers = new Hashtable();
-                Enumeration elementIds = identifiers.keys();
-                while (elementIds.hasMoreElements()) {
-                    Object elementId = elementIds.nextElement();
-                    reversedIdentifiers.put(identifiers.get(elementId),
-                                            elementId);
-                }
-            }
-
-            // Copy children into new document.
-            for (ChildNode kid = firstChild; kid != null;
-                 kid = kid.nextSibling) {
-                newdoc.appendChild(newdoc.importNode(kid, true, true,
-                                                     reversedIdentifiers));
-            }
-        }
-
-        // experimental
-        newdoc.allowGrammarAccess = allowGrammarAccess;
-        newdoc.errorChecking = errorChecking;
-
-    } // cloneNode(CoreDocumentImpl,boolean):void
-
-    /**
-     * Since a Document may contain at most one top-level Element child,
-     * and at most one DocumentType declaraction, we need to subclass our
-     * add-children methods to implement this constraint.
-     * Since appendChild() is implemented as insertBefore(,null),
-     * altering the latter fixes both.
-     * <p>
-     * While I'm doing so, I've taken advantage of the opportunity to
-     * cache documentElement and docType so we don't have to
-     * search for them.
-     *
-     * REVISIT: According to the spec it is not allowed to alter neither the
-     * document element nor the document type in any way
-     */
-    public Node insertBefore(Node newChild, Node refChild)
-        throws DOMException {
-
-    	// Only one such child permitted
-        int type = newChild.getNodeType();
-        if (errorChecking) {
-            if((type == Node.ELEMENT_NODE && docElement != null) ||
-               (type == Node.DOCUMENT_TYPE_NODE && docType != null)) {
-                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
-                                           "DOM006 Hierarchy request error");
-            }
-        }
-
-    	super.insertBefore(newChild,refChild);
-
-    	// If insert succeeded, cache the kid appropriately
-        if (type == Node.ELEMENT_NODE) {
-    	    docElement = (ElementImpl)newChild;
-        }
-        else if (type == Node.DOCUMENT_TYPE_NODE) {
-    	    docType=(DocumentTypeImpl)newChild;
-        }
-
-    	return newChild;
-
-    } // insertBefore(Node,Node):Node
-
-    /**
-     * Since insertBefore caches the docElement (and, currently, docType),
-     * removeChild has to know how to undo the cache
-     *
-     * REVISIT: According to the spec it is not allowed to alter neither the
-     * document element nor the document type in any way
-     */
-    public Node removeChild(Node oldChild)
-        throws DOMException {
-        super.removeChild(oldChild);
-
-    	// If remove succeeded, un-cache the kid appropriately
-        int type = oldChild.getNodeType();
-        if(type == Node.ELEMENT_NODE) {
-    	    docElement = null;
-        }
-        else if (type == Node.DOCUMENT_TYPE_NODE) {
-    	    docType=null;
-        }
-
-    	return oldChild;
-
-    }   // removeChild(Node):Node
-
-    /**
-     * Since we cache the docElement (and, currently, docType),
-     * replaceChild has to update the cache
-     *
-     * REVISIT: According to the spec it is not allowed to alter neither the
-     * document element nor the document type in any way
-     */
-    public Node replaceChild(Node newChild, Node oldChild)
-        throws DOMException {
-
-        super.replaceChild(newChild, oldChild);
-
-        int type = oldChild.getNodeType();
-        if(type == Node.ELEMENT_NODE) {
-    	    docElement = (ElementImpl)newChild;
-        }
-        else if (type == Node.DOCUMENT_TYPE_NODE) {
-    	    docType = (DocumentTypeImpl)newChild;
-        }
-        return oldChild;
-    }   // replaceChild(Node,Node):Node
-
-    /* 
-     * Get Node text content
-     * @since DOM Level 3
-     */
-    public String getTextContent() throws DOMException {
-        return null;
-    }
-
-    /*
-     * Set Node text content
-     * @since DOM Level 3
-     */
-    public void setTextContent(String textContent)
-        throws DOMException {
-        // no-op
-    }
-
-    //
-    // Document methods
-    //
-
-    // factory methods
-
-    /**
-     * Factory method; creates an Attribute having this Document as its
-     * OwnerDoc.
-     *
-     * @param name The name of the attribute. Note that the attribute's value
-     * is _not_ established at the factory; remember to set it!
-     *
-     * @throws DOMException(INVALID_NAME_ERR) if the attribute name is not
-     * acceptable.
-     */
-    public Attr createAttribute(String name)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(name)) {
-            throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-                                   "DOM002 Illegal character");
-        }
-    	return new AttrImpl(this, name);
-
-    } // createAttribute(String):Attr
-
-    /**
-     * Factory method; creates a CDATASection having this Document as
-     * its OwnerDoc.
-     *
-     * @param data The initial contents of the CDATA
-     *
-     * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents. (HTML
-     * not yet implemented.)
-     */
-    public CDATASection createCDATASection(String data)
-        throws DOMException {
-        return new CDATASectionImpl(this, data);
-    }
-
-    /**
-     * Factory method; creates a Comment having this Document as its
-     * OwnerDoc.
-     *
-     * @param data The initial contents of the Comment. */
-    public Comment createComment(String data) {
-        return new CommentImpl(this, data);
-    }
-
-    /**
-     * Factory method; creates a DocumentFragment having this Document
-     * as its OwnerDoc.
-     */
-    public DocumentFragment createDocumentFragment() {
-        return new DocumentFragmentImpl(this);
-    }
-
-    /**
-     * Factory method; creates an Element having this Document
-     * as its OwnerDoc.
-     *
-     * @param tagName The name of the element type to instantiate. For
-     * XML, this is case-sensitive. For HTML, the tagName parameter may
-     * be provided in any case, but it must be mapped to the canonical
-     * uppercase form by the DOM implementation.
-     *
-     * @throws DOMException(INVALID_NAME_ERR) if the tag name is not
-     * acceptable.
-     */
-    public Element createElement(String tagName)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(tagName)) {
-            throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-                                   "DOM002 Illegal character");
-        }
-    	return new ElementImpl(this, tagName);
-
-    } // createElement(String):Element
-
-    /**
-     * Factory method; creates an EntityReference having this Document
-     * as its OwnerDoc.
-     *
-     * @param name The name of the Entity we wish to refer to
-     *
-     * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
-     * nonstandard entities are not permitted. (HTML not yet
-     * implemented.)
-     */
-    public EntityReference createEntityReference(String name)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(name)) {
-            throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-                                   "DOM002 Illegal character");
-        }
-    	return new EntityReferenceImpl(this, name);
-
-    } // createEntityReference(String):EntityReference
-
-    /**
-     * Factory method; creates a ProcessingInstruction having this Document
-     * as its OwnerDoc.
-     *
-     * @param target The target "processor channel"
-     * @param data Parameter string to be passed to the target.
-     *
-     * @throws DOMException(INVALID_NAME_ERR) if the target name is not
-     * acceptable.
-     *
-     * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents. (HTML
-     * not yet implemented.)
-     */
-    public ProcessingInstruction createProcessingInstruction(String target,
-                                                             String data)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(target)) {
-            throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-                                   "DOM002 Illegal character");
-        }
-    	return new ProcessingInstructionImpl(this, target, data);
-
-    } // createProcessingInstruction(String,String):ProcessingInstruction
-
-    /**
-     * Factory method; creates a Text node having this Document as its
-     * OwnerDoc.
-     *
-     * @param data The initial contents of the Text.
-     */
-    public Text createTextNode(String data) {
-        return new TextImpl(this, data);
-    }
-
-    // other document methods
-
-    /**
-     * For XML, this provides access to the Document Type Definition.
-     * For HTML documents, and XML documents which don't specify a DTD,
-     * it will be null.
-     */
-    public DocumentType getDoctype() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return docType;
-    }
-
-
-    /**
-     * Convenience method, allowing direct access to the child node
-     * which is considered the root of the actual document content. For
-     * HTML, where it is legal to have more than one Element at the top
-     * level of the document, we pick the one with the tagName
-     * "HTML". For XML there should be only one top-level
-     *
-     * (HTML not yet supported.)
-     */
-    public Element getDocumentElement() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return docElement;
-    }
-
-    /**
-     * Return a <em>live</em> collection of all descendent Elements (not just
-     * immediate children) having the specified tag name.
-     *
-     * @param tagname The type of Element we want to gather. "*" will be
-     * taken as a wildcard, meaning "all elements in the document."
-     *
-     * @see DeepNodeListImpl
-     */
-    public NodeList getElementsByTagName(String tagname) {
-        return new DeepNodeListImpl(this,tagname);
-    }
-
-    /**
-     * Retrieve information describing the abilities of this particular
-     * DOM implementation. Intended to support applications that may be
-     * using DOMs retrieved from several different sources, potentially
-     * with different underlying representations.
-     */
-    public DOMImplementation getImplementation() {
-        // Currently implemented as a singleton, since it's hardcoded
-        // information anyway.
-        return CoreDOMImplementationImpl.getDOMImplementation();
-    }
-
-    //
-    // Public methods
-    //
-
-    // properties
-
-    /**
-     * Sets whether the DOM implementation performs error checking
-     * upon operations. Turning off error checking only affects
-     * the following DOM checks:
-     * <ul>
-     * <li>Checking strings to make sure that all characters are
-     *     legal XML characters
-     * <li>Hierarchy checking such as allowed children, checks for
-     *     cycles, etc.
-     * </ul>
-     * <p>
-     * Turning off error checking does <em>not</em> turn off the
-     * following checks:
-     * <ul>
-     * <li>Read only checks
-     * <li>Checks related to DOM events
-     * </ul>
-     */
-
-    public void setErrorChecking(boolean check) {
-        errorChecking = check;
-    }
-
-    /*
-     * DOM Level 3 WD - Experimental.
-     */
-    public void setStrictErrorChecking(boolean check) {
-        errorChecking = check;
-    }
-
-    /**
-     * Returns true if the DOM implementation performs error checking.
-     */
-    public boolean getErrorChecking() {
-        return errorChecking;
-    }
-
-    /*
-     * DOM Level 3 WD - Experimental.
-     */
-    public boolean getStrictErrorChecking() {
-        return errorChecking;
-    }
-
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * An attribute specifying the actual encoding of this document. This is
-     * <code>null</code> otherwise.
-     * <br> This attribute represents the property [character encoding scheme]
-     * defined in .
-     * @since DOM Level 3
-     */
-    public String getActualEncoding() {
-        return actualEncoding;
-    }
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * An attribute specifying the actual encoding of this document. This is
-     * <code>null</code> otherwise.
-     * <br> This attribute represents the property [character encoding scheme]
-     * defined in .
-     * @since DOM Level 3
-     */
-    public void setActualEncoding(String value) {
-        actualEncoding = value;
-    }
-
-    /**
-      * DOM Level 3 WD - Experimental.
-      * An attribute specifying, as part of the XML declaration,
-      * the encoding of this document. This is null when unspecified.
-      */
-    public void setEncoding(String value) {
-        encoding = value;
-    }
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * The encoding of this document (part of XML Declaration)
-     */
-    public String getEncoding() {
-	return encoding;
-    }
-
-    /**
-      * DOM Level 3 WD - Experimental.
-      * version - An attribute specifying, as part of the XML declaration,
-      * the version number of this document. This is null when unspecified
-      */
-    public void setVersion(String value) {
-       version = value;
-    }
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * The version of this document (part of XML Declaration)
-     */
-    public String getVersion() {
-	return version;
-    }
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * standalone - An attribute specifying, as part of the XML declaration,
-     * whether this document is standalone
-     */
-    public void setStandalone(boolean value) {
-        standalone = value;
-    }
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * standalone that specifies whether this document is standalone
-     * (part of XML Declaration)
-     */
-    public boolean getStandalone() {
-        return standalone;
-    }
-
-
-    /**
-     * Sets whether the DOM implementation generates mutation events
-     * upon operations.
-     */
-    void setMutationEvents(boolean set) {
-        // does nothing by default - overidden in subclass
-    }
-
-    /**
-     * Returns true if the DOM implementation generates mutation events.
-     */
-    boolean getMutationEvents() {
-        // does nothing by default - overriden in subclass
-        return false;
-    }
-
-
-
-    // non-DOM factory methods
-
-    /**
-     * NON-DOM
-     * Factory method; creates a DocumentType having this Document
-     * as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building
-     * DTD information unspecified.)
-     *
-     * @param name The name of the Entity we wish to provide a value for.
-     *
-     * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
-     * DTDs are not permitted. (HTML not yet implemented.)
-     */
-    public DocumentType createDocumentType(String qualifiedName,
-                                           String publicID,
-                                           String systemID)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(qualifiedName)) {
-            throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-                                   "DOM002 Illegal character");
-        }
-    	return new DocumentTypeImpl(this, qualifiedName, publicID, systemID);
-
-    } // createDocumentType(String):DocumentType
-
-    /**
-     * NON-DOM
-     * Factory method; creates an Entity having this Document
-     * as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building
-     * DTD information unspecified.)
-     *
-     * @param name The name of the Entity we wish to provide a value for.
-     *
-     * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
-     * nonstandard entities are not permitted. (HTML not yet
-     * implemented.)
-     */
-    public Entity createEntity(String name)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(name)) {
-    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-    		                           "DOM002 Illegal character");
-        }
-    	return new EntityImpl(this, name);
-
-    } // createEntity(String):Entity
-
-    /**
-     * NON-DOM
-     * Factory method; creates a Notation having this Document
-     * as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building
-     * DTD information unspecified.)
-     *
-     * @param name The name of the Notation we wish to describe
-     *
-     * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents, where
-     * notations are not permitted. (HTML not yet
-     * implemented.)
-     */
-    public Notation createNotation(String name)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(name)) {
-    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-    		                           "DOM002 Illegal character");
-        }
-    	return new NotationImpl(this, name);
-
-    } // createNotation(String):Notation
-
-    /**
-     * NON-DOM Factory method: creates an element definition. Element
-     * definitions hold default attribute values.
-     */
-    public ElementDefinitionImpl createElementDefinition(String name)
-        throws DOMException {
-
-    	if (errorChecking && !isXMLName(name)) {
-    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-    		                           "DOM002 Illegal character");
-        }
-        return new ElementDefinitionImpl(this, name);
-
-    } // createElementDefinition(String):ElementDefinitionImpl
-
-    // other non-DOM methods
-
-    /**
-     * Copies a node from another document to this document. The new nodes are
-     * created using this document's factory methods and are populated with the
-     * data from the source's accessor methods defined by the DOM interfaces.
-     * Its behavior is otherwise similar to that of cloneNode.
-     * <p>
-     * According to the DOM specifications, document nodes cannot be imported
-     * and a NOT_SUPPORTED_ERR exception is thrown if attempted.
-     */
-    public Node importNode(Node source, boolean deep)
-	throws DOMException {
-        return importNode(source, deep, false, null);
-    } // importNode(Node,boolean):Node
-
-    /**
-     * Overloaded implementation of DOM's importNode method. This method
-     * provides the core functionality for the public importNode and cloneNode
-     * methods.
-     *
-     * The reversedIdentifiers parameter is provided for cloneNode to
-     * preserve the document's identifiers. The Hashtable has Elements as the
-     * keys and their identifiers as the values. When an element is being
-     * imported, a check is done for an associated identifier. If one exists,
-     * the identifier is registered with the new, imported element. If
-     * reversedIdentifiers is null, the parameter is not applied.
-     */
-    private Node importNode(Node source, boolean deep, boolean cloningDoc,
-                            Hashtable reversedIdentifiers)
-	throws DOMException {
-        Node newnode=null;
-
-        // Sigh. This doesn't work; too many nodes have private data that
-        // would have to be manually tweaked. May be able to add local
-        // shortcuts to each nodetype. Consider ?????
-        // if(source instanceof NodeImpl &&
-        //  !(source instanceof DocumentImpl))
-        // {
-        //  // Can't clone DocumentImpl since it invokes us...
-        //  newnode=(NodeImpl)source.cloneNode(false);
-        //  newnode.ownerDocument=this;
-        // }
-        // else
-        
-        int type = source.getNodeType();
-
-        switch (type) {
-            case ELEMENT_NODE: {
-                Element newElement;
-                boolean domLevel20 = source.getOwnerDocument().getImplementation().hasFeature("XML", "2.0");
-                // Create element according to namespace support/qualification.
-                if(domLevel20 == false || source.getLocalName() == null)
-                    newElement = createElement(source.getNodeName());
-                else
-                    newElement = createElementNS(source.getNamespaceURI(),
-                                                 source.getNodeName());
-
-                // Copy element's attributes, if any.
-                NamedNodeMap sourceAttrs = source.getAttributes();
-                if (sourceAttrs != null) {
-                    int length = sourceAttrs.getLength();
-                    for (int index = 0; index < length; index++) {
-                        Attr attr = (Attr)sourceAttrs.item(index);
-
-                        // Copy the attribute only if it is not a default.
-                        if (attr.getSpecified()) {
-                            Attr newAttr = (Attr)importNode(attr, true, false,
-                                                          reversedIdentifiers);
-
-                            // Attach attribute according to namespace
-                            // support/qualification.
-                            if (domLevel20 == false ||
-                                attr.getLocalName() == null)
-                                newElement.setAttributeNode(newAttr);
-                            else
-                                newElement.setAttributeNodeNS(newAttr);
-                        }
-                    }
-                }
-
-                // Register element identifier.
-                if (reversedIdentifiers != null) {
-                    // Does element have an associated identifier?
-                    Object elementId = reversedIdentifiers.get(source);
-                    if (elementId != null) {
-                        if (identifiers == null)
-                            identifiers = new Hashtable();
-
-                        identifiers.put(elementId, newElement);
-                    }
-                }
-
-                newnode = newElement;
-                break;
-            }
-
-            case ATTRIBUTE_NODE: {
-
-                if( source.getOwnerDocument().getImplementation().hasFeature("XML", "2.0") ){
-                    if (source.getLocalName() == null) {
-         	        newnode = createAttribute(source.getNodeName());
-         	    } else {
-          	        newnode = createAttributeNS(source.getNamespaceURI(),
-                                                    source.getNodeName());
-         	    }
-                }
-                else {
-                    newnode = createAttribute(source.getNodeName());
-                }
-                // if source is an AttrImpl from this very same implementation
-                // avoid creating the child nodes if possible
-                if (source instanceof AttrImpl) {
-                    AttrImpl attr = (AttrImpl) source;
-                    if (attr.hasStringValue()) {
-                        AttrImpl newattr = (AttrImpl) newnode;
-                        newattr.setValue(attr.getValue());
-                        deep = false;
-                    }
-                    else {
-                        deep = true;
-                    }
-                }
-                else {
-                    // According to the DOM spec the kids carry the value.
-                    // However, there are non compliant implementations out
-                    // there that fail to do so. To avoid ending up with no
-                    // value at all, in this case we simply copy the text value
-                    // directly.
-                    if (source.getFirstChild() == null) {
-                        newnode.setNodeValue(source.getNodeValue());
-                        deep = false;
-                    } else {
-                        deep = true;
-                    }
-                }
-		break;
-            }
-
-	    case TEXT_NODE: {
-		newnode = createTextNode(source.getNodeValue());
-		break;
-            }
-
-	    case CDATA_SECTION_NODE: {
-		newnode = createCDATASection(source.getNodeValue());
-		break;
-            }
-
-    	    case ENTITY_REFERENCE_NODE: {
-		newnode = createEntityReference(source.getNodeName());
-                // the subtree is created according to this doc by the method
-                // above, so avoid carrying over original subtree
-                deep = false;
-		break;
-            }
-
-    	    case ENTITY_NODE: {
-		Entity srcentity = (Entity)source;
-		EntityImpl newentity =
-		    (EntityImpl)createEntity(source.getNodeName());
-		newentity.setPublicId(srcentity.getPublicId());
-		newentity.setSystemId(srcentity.getSystemId());
-		newentity.setNotationName(srcentity.getNotationName());
-                // Kids carry additional value,
-                // allow deep import temporarily
-                newentity.isReadOnly(false);
-		newnode = newentity;
-		break;
-            }
-
-    	    case PROCESSING_INSTRUCTION_NODE: {
-		newnode = createProcessingInstruction(source.getNodeName(),
-						      source.getNodeValue());
-		break;
-            }
-
-    	    case COMMENT_NODE: {
-		newnode = createComment(source.getNodeValue());
-		break;
-            }
-    	    
-            case DOCUMENT_TYPE_NODE: {
-                // unless this is used as part of cloning a Document
-                // forbid it for the sake of being compliant to the DOM spec
-                if (!cloningDoc) {
-                    throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                                  "Node type being imported is not supported");
-                }
-                DocumentType srcdoctype = (DocumentType)source;
-                DocumentTypeImpl newdoctype = (DocumentTypeImpl)
-                    createDocumentType(srcdoctype.getNodeName(),
-                                       srcdoctype.getPublicId(),
-                                       srcdoctype.getSystemId());
-                // Values are on NamedNodeMaps
-                NamedNodeMap smap = srcdoctype.getEntities();
-                NamedNodeMap tmap = newdoctype.getEntities();
-                if(smap != null) {
-                    for(int i = 0; i < smap.getLength(); i++) {
-                        tmap.setNamedItem(importNode(smap.item(i), true, false,
-                                                     reversedIdentifiers));
-                    }
-                }
-                smap = srcdoctype.getNotations();
-                tmap = newdoctype.getNotations();
-                if (smap != null) {
-                    for(int i = 0; i < smap.getLength(); i++) {
-                        tmap.setNamedItem(importNode(smap.item(i), true, false,
-                                                     reversedIdentifiers));
-                    }
-                }
-                // NOTE: At this time, the DOM definition of DocumentType
-                // doesn't cover Elements and their Attributes. domimpl's
-                // extentions in that area will not be preserved, even if
-                // copying from domimpl to domimpl. We could special-case
-                // that here. Arguably we should. Consider. ?????
-                newnode = newdoctype;
-                break;
-            }
-
-            case DOCUMENT_FRAGMENT_NODE: {
-		newnode = createDocumentFragment();
-		// No name, kids carry value
-		break;
-            }
-
-    	    case NOTATION_NODE: {
-		Notation srcnotation = (Notation)source;
-		NotationImpl newnotation =
-		    (NotationImpl)createNotation(source.getNodeName());
-		newnotation.setPublicId(srcnotation.getPublicId());
-		newnotation.setSystemId(srcnotation.getSystemId());
-		// Kids carry additional value
-		newnode = newnotation;
-		// No name, no value
-		break;
-            }
-            case DOCUMENT_NODE : // Can't import document nodes
-            default: {           // Unknown node type
-                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                                  "Node type being imported is not supported");
-            }
-        }
-
-        callUserDataHandlers(source, newnode, UserDataHandler.NODE_IMPORTED);
-
-    	// If deep, replicate and attach the kids.
-    	if (deep) {
-	    for (Node srckid = source.getFirstChild();
-                 srckid != null;
-                 srckid = srckid.getNextSibling()) {
-		newnode.appendChild(importNode(srckid, true, false,
-                                               reversedIdentifiers));
-	    }
-        }
-        if (newnode.getNodeType() == Node.ENTITY_NODE) {
-          ((NodeImpl)newnode).setReadOnly(true, true);
-        }
-    	return newnode;
-
-    } // importNode(Node,boolean,boolean,Hashtable):Node
-
-    /**
-     * DOM Level 3 WD - Experimental
-     * Change the node's ownerDocument, and its subtree, to this Document
-     *
-     * @param source The node to adopt.
-     * @see #importNode
-     **/
-    public Node adoptNode(Node source) {
-        NodeImpl node;
-        try {
-            node = (NodeImpl) source;
-        } catch (ClassCastException e) {
-            // source node comes from a different DOMImplementation
-            return null;
-        }
-        switch (node.getNodeType()) {
-            case ATTRIBUTE_NODE: {
-                AttrImpl attr = (AttrImpl) node;
-                // remove node from wherever it is
-                attr.getOwnerElement().removeAttributeNode(attr);
-                // mark it as specified
-                attr.isSpecified(true);
-                // change ownership
-                attr.setOwnerDocument(this);
-                break;
-            }
-            case DOCUMENT_NODE:
-            case DOCUMENT_TYPE_NODE: {
-                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                                       "cannot adopt this type of node.");
-            }
-            case ENTITY_REFERENCE_NODE: {
-                // remove node from wherever it is
-                Node parent = node.getParentNode();
-                if (parent != null) {
-                    parent.removeChild(source);
-                }
-                // discard its replacement value
-                Node child;
-                while ((child = node.getFirstChild()) != null) {
-                    node.removeChild(child);
-                }
-                // change ownership
-                node.setOwnerDocument(this);
-                // set its new replacement value if any
-                if (docType == null) {
-                    break;
-                }
-                NamedNodeMap entities = docType.getEntities();
-                Node entityNode = entities.getNamedItem(node.getNodeName());
-                if (entityNode == null) {
-                    break;
-                }
-                EntityImpl entity = (EntityImpl) entityNode;
-                for (child = entityNode.getFirstChild();
-                     child != null; child = child.getNextSibling()) {
-                    Node childClone = child.cloneNode(true);
-                    node.appendChild(childClone);
-                }
-                break;
-            }
-            case ELEMENT_NODE: {
-                // remove node from wherever it is
-                Node parent = node.getParentNode();
-                if (parent != null) {
-                    parent.removeChild(source);
-                }
-                // change ownership
-                node.setOwnerDocument(this);
-                // reconcile default attributes
-                ((ElementImpl)node).reconcileDefaultAttributes();
-                break;
-            }
-            default: {
-                // remove node from wherever it is
-                Node parent = node.getParentNode();
-                if (parent != null) {
-                    parent.removeChild(source);
-                }
-                // change ownership
-                node.setOwnerDocument(this);
-            }
-        }
-        return node;
-    }
-
-    // identifier maintenence
-    /**
-     * Introduced in DOM Level 2
-     * Returns the Element whose ID is given by elementId. If no such element
-     * exists, returns null. Behavior is not defined if more than one element
-     * has this ID.
-     * <p>
-     * Note: The DOM implementation must have information that says which
-     * attributes are of type ID. Attributes with the name "ID" are not of type
-     * ID unless so defined. Implementations that do not know whether
-     * attributes are of type ID or not are expected to return null.
-     * @see #getIdentifier
-     */
-    public Element getElementById(String elementId) {
-        return getIdentifier(elementId);
-    }
-
-    /**
-     * Registers an identifier name with a specified element node.
-     * If the identifier is already registered, the new element
-     * node replaces the previous node. If the specified element
-     * node is null, removeIdentifier() is called.
-     *
-     * @see #getIdentifier
-     * @see #removeIdentifier
-     */
-    public void putIdentifier(String idName, Element element) {
-
-        if (element == null) {
-            removeIdentifier(idName);
-            return;
-        }
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (identifiers == null) {
-            identifiers = new Hashtable();
-        }
-
-        identifiers.put(idName, element);
-
-    } // putIdentifier(String,Element)
-
-    /**
-     * Returns a previously registered element with the specified
-     * identifier name, or null if no element is registered.
-     *
-     * @see #putIdentifier
-     * @see #removeIdentifier
-     */
-    public Element getIdentifier(String idName) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (identifiers == null) {
-            return null;
-        }
-
-        return (Element)identifiers.get(idName);
-
-    } // getIdentifier(String):Element
-
-    /**
-     * Removes a previously registered element with the specified
-     * identifier name.
-     *
-     * @see #putIdentifier
-     * @see #getIdentifier
-     */
-    public void removeIdentifier(String idName) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (identifiers == null) {
-            return;
-        }
-
-        identifiers.remove(idName);
-
-    } // removeIdentifier(String)
-
-    /** Returns an enumeration registered of identifier names. */
-    public Enumeration getIdentifiers() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (identifiers == null) {
-            identifiers = new Hashtable();
-        }
-
-        return identifiers.keys();
-
-    } // getIdentifiers():Enumeration
-
-    //
-    // DOM2: Namespace methods
-    //
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Creates an element of the given qualified name and namespace URI.
-     * If the given namespaceURI is null or an empty string and the
-     * qualifiedName has a prefix that is "xml", the created element
-     * is bound to the predefined namespace
-     * "http://www.w3.org/XML/1998/namespace" [Namespaces].
-     * @param namespaceURI The namespace URI of the element to
-     *                     create.
-     * @param qualifiedName The qualified name of the element type to
-     *                      instantiate.
-     * @return Element A new Element object with the following attributes:
-     * @throws DOMException INVALID_CHARACTER_ERR: Raised if the specified
-                            name contains an invalid character.
-     * @throws DOMException NAMESPACE_ERR: Raised if the qualifiedName has a
-     *                      prefix that is "xml" and the namespaceURI is
-     *                      neither null nor an empty string nor
-     *                      "http://www.w3.org/XML/1998/namespace", or
-     *                      if the qualifiedName has a prefix different
-     *                      from "xml" and the namespaceURI is null or an
-     *                      empty string.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public Element createElementNS(String namespaceURI, String qualifiedName)
-        throws DOMException
-    {
-    	if (errorChecking && !isXMLName(qualifiedName)) {
-            throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-                                   "DOM002 Illegal character");
-        }
-        return new ElementNSImpl(this, namespaceURI, qualifiedName);
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Creates an attribute of the given qualified name and namespace URI.
-     * If the given namespaceURI is null or an empty string and the
-     * qualifiedName has a prefix that is "xml", the created element
-     * is bound to the predefined namespace
-     * "http://www.w3.org/XML/1998/namespace" [Namespaces].
-     *
-     * @param namespaceURI  The namespace URI of the attribute to
-     *                      create. When it is null or an empty string,
-     *                      this method behaves like createAttribute.
-     * @param qualifiedName The qualified name of the attribute to
-     *                      instantiate.
-     * @return Attr         A new Attr object.
-     * @throws DOMException INVALID_CHARACTER_ERR: Raised if the specified
-                            name contains an invalid character.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public Attr createAttributeNS(String namespaceURI, String qualifiedName)
-        throws DOMException
-    {
-    	if (errorChecking && !isXMLName(qualifiedName)) {
-            throw new DOMException(DOMException.INVALID_CHARACTER_ERR,
-                                   "DOM002 Illegal character");
-        }
-        return new AttrNSImpl(this, namespaceURI, qualifiedName);
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Returns a NodeList of all the Elements with a given local name and
-     * namespace URI in the order in which they would be encountered in a
-     * preorder traversal of the Document tree.
-     * @param namespaceURI  The namespace URI of the elements to match
-     *                      on. The special value "*" matches all
-     *                      namespaces. When it is null or an empty
-     *                      string, this method behaves like
-     *                      getElementsByTagName.
-     * @param localName     The local name of the elements to match on.
-     *                      The special value "*" matches all local names.
-     * @return NodeList     A new NodeList object containing all the matched
-     *                      Elements.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public NodeList getElementsByTagNameNS(String namespaceURI,
-                                           String localName)
-    {
-        return new DeepNodeListImpl(this, namespaceURI, localName);
-    }
-
-    //
-    // Object methods
-    //
-
-    /** Clone. */
-    public Object clone() throws CloneNotSupportedException {
-        CoreDocumentImpl newdoc = (CoreDocumentImpl) super.clone();
-        newdoc.docType = null;
-        newdoc.docElement = null;
-        return newdoc;
-    }
-
-    //
-    // Public static methods
-    //
-
-    /**
-     * Check the string against XML's definition of acceptable names for
-     * elements and attributes and so on using the XMLCharacterProperties
-     * utility class
-     */
-    public static boolean isXMLName(String s) {
-
-        if (s == null) {
-            return false;
-        }
-        return XMLChar.isValidName(s);
-
-    } // isXMLName(String):boolean
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Uses the kidOK lookup table to check whether the proposed
-     * tree structure is legal.
-     */
-    protected boolean isKidOK(Node parent, Node child) {
-        if (allowGrammarAccess &&
-            parent.getNodeType() == Node.DOCUMENT_TYPE_NODE) {
-            return child.getNodeType() == Node.ELEMENT_NODE;
-        }
-    	return 0 != (kidOK[parent.getNodeType()] & 1 << child.getNodeType());
-    }
-
-    /**
-     * Denotes that this node has changed.
-     */
-    protected void changed() {
-        changes++;
-    }
-
-    /**
-     * Returns the number of changes to this node.
-     */
-    protected int changes() {
-        return changes;
-    }
-
-    //  NodeListCache pool
-
-    /**
-     * Returns a NodeListCache for the given node.
-     */
-    NodeListCache getNodeListCache(ParentNode owner) {
-        if (fFreeNLCache == null) {
-            return new NodeListCache(owner);
-        }
-        NodeListCache c = fFreeNLCache;
-        fFreeNLCache = fFreeNLCache.next;
-        c.fChild = null;
-        c.fChildIndex = -1;
-        c.fLength = -1;
-        // revoke previous ownership
-        if (c.fOwner != null) {
-            c.fOwner.fNodeListCache = null;
-        }
-        c.fOwner = owner;
-        // c.next = null; not necessary, except for confused people...
-        return c;
-    }
-
-    /**
-     * Puts the given NodeListCache in the free list.
-     * Note: The owner node can keep using it until we reuse it
-     */
-    void freeNodeListCache(NodeListCache c) {
-        c.next = fFreeNLCache;
-        fFreeNLCache = c;
-    }
-
-
-    /*
-     * a class to store some user data along with its handler
-     */
-    class UserDataRecord {
-        Object fData;
-        UserDataHandler fHandler;
-        UserDataRecord(Object data, UserDataHandler handler) {
-            fData = data;
-            fHandler = handler;
-        }
-    }
-
-    /**
-     * 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 n The node to associate the object to.
-     * @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>DOMObject</code> previously associated to 
-     *   the given key on this node, or <code>null</code> if there was none.
-     * @since DOM Level 3
-     *
-     * REVISIT: we could use a free list of UserDataRecord here
-     */
-    public Object setUserData(Node n, String key, 
-                              Object data, UserDataHandler handler) {
-        if (data == null) {
-            if (userData != null) {
-                Hashtable t = (Hashtable) userData.get(n);
-                if (t != null) {
-                    Object o = t.remove(key);
-                    if (o != null) {
-                        UserDataRecord r = (UserDataRecord) o;
-                        return r.fData;
-                    }
-                }
-            }
-            return null;
-        }
-        else {
-            Hashtable t;
-            if (userData == null) {
-                userData = new Hashtable();
-                t = new Hashtable();
-                userData.put(n, t);
-            }
-            else {
-                t = (Hashtable) userData.get(n);
-                if (t == null) {
-                    t = new Hashtable();
-                    userData.put(n, t);
-                }
-            }
-            Object o = t.put(key, new UserDataRecord(data, handler));
-            if (o != null) {
-                UserDataRecord r = (UserDataRecord) o;
-                return r.fData;
-            }
-            return null;
-        }
-    }
-
-    /**
-     * 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 n The node the object is associated to.
-     * @param key The key the object is associated to.
-     * @return Returns the <code>DOMObject</code> associated to the given key 
-     *   on this node, or <code>null</code> if there was none.
-     * @since DOM Level 3
-     */
-    public Object getUserData(Node n, String key) {
-        if (userData == null) {
-            return null;
-        }
-        Hashtable t = (Hashtable) userData.get(n);
-        if (t == null) {
-            return null;
-        }
-        Object o = t.get(key);
-        if (o != null) {
-            UserDataRecord r = (UserDataRecord) o;
-            return r.fData;
-        }
-        return null;
-    }
-
-    /**
-     * Call user data handlers when a node is deleted (finalized)
-     * @param n The node this operation applies to.
-     * @param c The copy node or null.
-     * @param operation The operation - import, clone, or delete.
-     */
-    void callUserDataHandlers(Node n, Node c, short operation) {
-        if (userData == null) {
-            return;
-        }
-        Hashtable t = (Hashtable) userData.get(n);
-        if (t == null || t.isEmpty()) {
-            return;
-        }
-        Enumeration keys = t.keys();
-        while (keys.hasMoreElements()) {
-            String key = (String) keys.nextElement();
-            UserDataRecord r = (UserDataRecord) t.get(key);
-            if (r.fHandler != null) {
-                r.fHandler.handle(operation, key, r.fData, n, c);
-            }
-        }
-    }
-
-    /**
-     * Call user data handlers to let them know the nodes they are related to
-     * are being deleted. The alternative would be to do that on Node but
-     * because the nodes are used as the keys we have a reference to them that
-     * prevents them from being gc'ed until the document is. At the same time,
-     * doing it here has the advantage of avoiding a finalize() method on Node,
-     * which would affect all nodes and not just the ones that have a user
-     * data.
-     */
-    public void finalize() {
-        if (userData == null) {
-            return;
-        }
-        Enumeration nodes = userData.keys();
-        while (nodes.hasMoreElements()) {
-            Object node = nodes.nextElement();
-            Hashtable t = (Hashtable) userData.get(node);
-            if (t != null && !t.isEmpty()) {
-                Enumeration keys = t.keys();
-                while (keys.hasMoreElements()) {
-                    String key = (String) keys.nextElement();
-                    UserDataRecord r = (UserDataRecord) t.get(key);
-                    if (r.fHandler != null) {
-                        r.fHandler.handle(UserDataHandler.NODE_DELETED,
-                                          key, r.fData, null, null);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * NON-DOM: kept for backward compatibility
-     * Store user data related to a given node
-     * This is a place where we could use weak references! Indeed, the node
-     * here won't be GC'ed as long as some user data is attached to it, since
-     * the userData table will have a reference to the node.
-     */
-    protected void setUserData(NodeImpl n, Object data) {
-        setUserData(n, "XERCES1DOMUSERDATA", data, null);
-    }
-
-    /**
-     * NON-DOM: kept for backward compatibility
-     * Retreive user data related to a given node
-     */
-    protected Object getUserData(NodeImpl n) {
-        return getUserData(n, "XERCES1DOMUSERDATA");
-    }
-
-
-    // Event related methods overidden in subclass
-
-    protected void addEventListener(NodeImpl node, String type,
-                                    EventListener listener,
-                                    boolean useCapture) {
-        // does nothing by default - overidden in subclass
-    }
-
-    protected void removeEventListener(NodeImpl node, String type,
-                                       EventListener listener,
-                                       boolean useCapture) {
-        // does nothing by default - overidden in subclass
-    }
-
-    protected boolean dispatchEvent(NodeImpl node, Event event) {
-        // does nothing by default - overidden in subclass
-        return false;
-    }
-
-    // Notification methods overidden in subclasses
-
-    /**
-     * A method to be called when some text was changed in a text node,
-     * so that live objects can be notified.
-     */
-    void replacedText(NodeImpl node) {
-    }
-
-    /**
-     * A method to be called when some text was deleted from a text node,
-     * so that live objects can be notified.
-     */
-    void deletedText(NodeImpl node, int offset, int count) {
-    }
-
-    /**
-     * A method to be called when some text was inserted into a text node,
-     * so that live objects can be notified.
-     */
-    void insertedText(NodeImpl node, int offset, int count) {
-    }
-
-    /**
-     * A method to be called when a character data node has been modified
-     */
-    void modifyingCharacterData(NodeImpl node) {
-    }
-
-    /**
-     * A method to be called when a character data node has been modified
-     */
-    void modifiedCharacterData(NodeImpl node, String oldvalue, String value) {
-    }
-
-    /**
-     * A method to be called when a node is about to be inserted in the tree.
-     */
-    void insertingNode(NodeImpl node, boolean replace) {
-    }
-
-    /**
-     * A method to be called when a node has been inserted in the tree.
-     */
-    void insertedNode(NodeImpl node, NodeImpl newInternal, boolean replace) {
-    }
-
-    /**
-     * A method to be called when a node is about to be removed from the tree.
-     */
-    void removingNode(NodeImpl node, NodeImpl oldChild, boolean replace) {
-    }
-
-    /**
-     * A method to be called when a node has been removed from the tree.
-     */
-    void removedNode(NodeImpl node, boolean replace) {
-    }
-
-    /**
-     * A method to be called when a node is about to be replaced in the tree.
-     */
-    void replacingNode(NodeImpl node) {
-    }
-
-    /**
-     * A method to be called when a node has been replaced in the tree.
-     */
-    void replacedNode(NodeImpl node) {
-    }
-
-    /**
-     * A method to be called when an attribute value has been modified
-     */
-    void modifiedAttrValue(AttrImpl attr, String oldvalue) {
-    }
-
-    /**
-     * A method to be called when an attribute node has been set
-     */
-    void setAttrNode(AttrImpl attr, AttrImpl previous) {
-    }
-
-    /**
-     * A method to be called when an attribute node has been removed
-     */
-    void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
-    }
-
-} // class CoreDocumentImpl
diff --git a/src/org/apache/xerces/dom/DOMErrorImpl.java b/src/org/apache/xerces/dom/DOMErrorImpl.java
deleted file mode 100644
index 00941c0..0000000
--- a/src/org/apache/xerces/dom/DOMErrorImpl.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.apache.xerces.xni.parser.XMLParseException;
-
-import org.apache.xerces.dom3.DOMError;
-import org.apache.xerces.dom3.DOMLocator;
-
-
-/**
- * <code>DOMErrorImpl</code> is an implementation that describes an error.
- * <strong>Note:</strong> The error object that describes the error 
- * might be reused by Xerces implementation, across multiple calls to the 
- * handleEvent method on DOMErrorHandler interface.
- * 
- * 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010913'>Document Object Model (DOM) Level 3 Core Specification</a>.
- * 
- * @author Gopal Sharma, SUN Microsystems Inc.
- * @author Elena Litani, IBM
- */
-
-// REVISIT: the implementation of ErrorReporter. 
-//          we probably should not pass XMLParseException
-//
-
-public class DOMErrorImpl implements DOMError {
-
-    //
-    // Data
-    //
-
-    short fSeverity = DOMError.SEVERITY_WARNING;
-    String fMessage = null;    
-    DOMLocator fLocation = null;
-    Exception fException = null;
-
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */    
-    public DOMErrorImpl () {
-    }
-
-    /** Exctracts information from XMLParserException) */
-    public DOMErrorImpl (short severity, XMLParseException exception) {
-        fSeverity = severity;
-        fException = exception;
-        fMessage = exception.getMessage();
-        fLocation = createDOMLocator (exception);
-    }
-
-    /**
-     * The severity of the error, either <code>SEVERITY_WARNING</code>, 
-     * <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
-     */
-
-    public short getSeverity() {
-        return fSeverity;
-    }
-
-    /**
-     * An implementation specific string describing the error that occured.
-     */
-
-    public String getMessage() {
-        return fMessage;
-    }
-
-    /**
-     * The byte or character offset into the input source, if we're parsing a 
-     * file or a byte stream then this will be the byte offset into that 
-     * stream, but if a character media is parsed then the offset will be 
-     * the character offset.exception is a reserved word, we need to rename 
-     * it.
-     */
-
-    public Object getException() {
-        return fException;
-    } 
-
-    /**
-     * The location of the error.
-     */
-
-    public DOMLocator getLocation() {
-        return fLocation;
-    }
-
-    // method to get the DOMLocator Object
-    private DOMLocator createDOMLocator(XMLParseException exception) {
-        return new DOMLocatorImpl(exception.getLineNumber(),
-                                  exception.getColumnNumber(),
-                                  exception.getSystemId()
-                                 );
-    } // createDOMLocator()
-
-    //
-    // non-DOM methods
-    // The setter methods allow to reuse DOMError object
-    //
-
-    public void setSeverity(short error){
-        fSeverity = error;
-    }
-
-    public void setMessage(String msg){
-        fMessage = msg;
-    }
-
-    public void setLocator(DOMLocator locator){
-        fLocation = locator;
-    }
-
-    public void setException(Exception ex){
-        fException = ex;
-    }
-
-    public void reset(){
-        fSeverity = DOMError.SEVERITY_WARNING; 
-        fMessage = null;    
-        fLocation = null;
-        fException = null;
-    }
-
-
-}// class DOMErrorImpl
\ No newline at end of file
diff --git a/src/org/apache/xerces/dom/DOMImplementationImpl.java b/src/org/apache/xerces/dom/DOMImplementationImpl.java
deleted file mode 100644
index 5970ec0..0000000
--- a/src/org/apache/xerces/dom/DOMImplementationImpl.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-
-// DOM L3 LS
-import org.apache.xerces.dom3.ls.DOMImplementationLS;
-import org.apache.xerces.dom3.ls.DOMBuilder;
-import org.apache.xerces.dom3.ls.DOMWriter;
-import org.apache.xerces.dom3.ls.DOMInputSource;
-import org.apache.xerces.dom3.as.DOMImplementationAS;
-import org.apache.xerces.dom3.as.ASModel;
-import org.apache.xerces.dom3.as.DOMASBuilder;
-import org.apache.xerces.dom3.as.DOMASWriter;
-import org.apache.xerces.parsers.DOMBuilderImpl;
-import org.apache.xerces.parsers.DOMASBuilderImpl;
-import org.apache.xml.serialize.XMLSerializer;
-
-
-
-/**
- * The DOMImplementation class is description of a particular
- * implementation of the Document Object Model. As such its data is
- * static, shared by all instances of this implementation.
- * <P>
- * The DOM API requires that it be a real object rather than static
- * methods. However, there's nothing that says it can't be a singleton,
- * so that's how I've implemented it.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DOMImplementationImpl  
-    implements DOMImplementation, DOMImplementationLS, DOMImplementationAS {
-
-    //
-    // Data
-    //
-
-    // static
-
-    /** Dom implementation singleton. */
-    static DOMImplementationImpl singleton = new DOMImplementationImpl();
-
-    //
-    // DOMImplementation methods
-    //
-
-    /** 
-     * Test if the DOM implementation supports a specific "feature" --
-     * currently meaning language and level thereof.
-     * 
-     * @param feature      The package name of the feature to test.
-     * In Level 1, supported values are "HTML" and "XML" (case-insensitive).
-     * At this writing, org.apache.xerces.dom supports only XML.
-     *
-     * @param version      The version number of the feature being tested.
-     * This is interpreted as "Version of the DOM API supported for the
-     * specified Feature", and in Level 1 should be "1.0"
-     *
-     * @returns    true iff this implementation is compatable with the
-     * specified feature and version.
-     */
-    public boolean hasFeature(String feature, String version) {
-
-        // Currently, we support only XML Level 1 version 1.0
-        boolean anyVersion = version == null || version.length() == 0;
-        return 
-            (feature.equalsIgnoreCase("Core") 
-            && (anyVersion
-		|| version.equals("1.0")
-		|| version.equals("2.0")))
-         || (feature.equalsIgnoreCase("XML") 
-            && (anyVersion
-		|| version.equals("1.0")
-		|| version.equals("2.0")))
-         || (feature.equalsIgnoreCase("Events") 
-	     && (anyVersion
-		 || version.equals("2.0")))
-         || (feature.equalsIgnoreCase("MutationEvents") 
-	     && (anyVersion
-		 || version.equals("2.0")))
-         || (feature.equalsIgnoreCase("Traversal") 
-	     && (anyVersion
-		 || version.equals("2.0")))
-         || (feature.equalsIgnoreCase("Range") 
-	     && (anyVersion
-		 || version.equals("2.0")))
-            ;
-
-    } // hasFeature(String,String):boolean
-
-    //
-    // Public methods
-    //
-
-    /** NON-DOM: Obtain and return the single shared object */
-    public static DOMImplementation getDOMImplementation() {
-        return singleton;
-    }  
-    
-    /**
-     * Introduced in DOM Level 2. <p>
-     * 
-     * Creates an empty DocumentType node.
-     *
-     * @param qualifiedName The qualified name of the document type to be created. 
-     * @param publicID The document type public identifier.
-     * @param systemID The document type system identifier.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public DocumentType       createDocumentType(String qualifiedName, 
-                                                 String publicID, 
-                                                 String systemID)
-    {
-    	if (!CoreDocumentImpl.isXMLName(qualifiedName)) {
-    		throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
-    		                           "DOM002 Illegal character");
-        }
-        int index = qualifiedName.indexOf(':');
-        int lastIndex = qualifiedName.lastIndexOf(':');
-        // it is an error for NCName to have more than one ':'
-        if (index == 0 || index == qualifiedName.length() - 1 || lastIndex!=index) {
-	    throw new DOMException(DOMException.NAMESPACE_ERR, 
-				       "DOM003 Namespace error");
-	}
-    	return new DocumentTypeImpl(null, qualifiedName, publicID, systemID);
-    }
-    /**
-     * Introduced in DOM Level 2. <p>
-     * 
-     * Creates an XML Document object of the specified type with its document
-     * element.
-     *
-     * @param namespaceURI     The namespace URI of the document
-     *                         element to create, or null. 
-     * @param qualifiedName    The qualified name of the document
-     *                         element to create. 
-     * @param doctype          The type of document to be created or null.<p>
-     *
-     *                         When doctype is not null, its
-     *                         Node.ownerDocument attribute is set to
-     *                         the document being created.
-     * @return Document        A new Document object.
-     * @throws DOMException    WRONG_DOCUMENT_ERR: Raised if doctype has
-     *                         already been used with a different document.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public Document           createDocument(String namespaceURI, 
-                                             String qualifiedName, 
-                                             DocumentType doctype)
-                                             throws DOMException
-    {
-    	if (doctype != null && doctype.getOwnerDocument() != null) {
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
-                                   "DOM005 Wrong document");
-        }
-        DocumentImpl doc = new DocumentImpl(doctype);
-        Element e = doc.createElementNS( namespaceURI, qualifiedName);
-        doc.appendChild(e);
-        return doc;
-    }
-    
-    // DOM L3 LS
-    /**
-     * DOM Level 3 WD - Experimental.
-     */
-    public DOMBuilder createDOMBuilder(short mode)
-                                       throws DOMException {
-        if (mode == DOMImplementationLS.MODE_ASYNCHRONOUS) {
-           throw new DOMException(DOMException.NOT_SUPPORTED_ERR, 
-                                   "Asynchronous mode is not supported");
-        }
-        return new DOMBuilderImpl();
-    }
-    /**
-     * DOM Level 3 WD - Experimental.
-     */                
-    public DOMWriter createDOMWriter() {
-        return new XMLSerializer();
-    }
-    /**
-     * DOM Level 3 WD - Experimental.
-     */
-    public DOMInputSource createDOMInputSource() {
-        return new DOMInputSourceImpl();
-    }
-
-    //
-    // DOM L3 Abstract Schemas
-    //
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Creates an ASModel.
-     * @param isNamespaceAware Allow creation of <code>ASModel</code> with 
-     *   this attribute set to a specific value.
-     * @return A <code>null</code> return indicates failure.what is a 
-     *   failure? Could be a system error.
-     */
-    public ASModel createAS(boolean isNamespaceAware){
-        return new ASModelImpl(isNamespaceAware);
-    }
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Creates an <code>DOMASBuilder</code>.Do we need the method since we 
-     * already have <code>DOMImplementationLS.createDOMBuilder</code>?
-     * @return  DOMASBuilder
-     */
-    public DOMASBuilder createDOMASBuilder(){
-        return new DOMASBuilderImpl();
-    }
-
-
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Creates an <code>DOMASWriter</code>.
-     * @return  a DOMASWriter
-     */
-    public DOMASWriter createDOMASWriter(){
-        throw new  DOMException(DOMException.NOT_SUPPORTED_ERR, 
-                                   "ASWriter is not implemented.");
-    }
-    
-
-
-} // class DOMImplementationImpl
diff --git a/src/org/apache/xerces/dom/DOMImplementationSourceImpl.java b/src/org/apache/xerces/dom/DOMImplementationSourceImpl.java
deleted file mode 100644
index abc731c..0000000
--- a/src/org/apache/xerces/dom/DOMImplementationSourceImpl.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMImplementation;
-
-import org.apache.xerces.dom3.DOMImplementationRegistry;
-import org.apache.xerces.dom3.DOMImplementationSource;
-
-import org.apache.xerces.dom.CoreDOMImplementationImpl;
-import org.apache.xerces.dom.DOMImplementationImpl;
-
-import java.util.StringTokenizer;
-
-/**
- * Supply one the right implementation, based upon requested features. Each
- * implemented <code>DOMImplementationSource</code> object is listed in the
- * binding-specific list of available sources so that its
- * <code>DOMImplementation</code> objects are made available.
- * <p>See also the <a href='http://www.w3.org/2001/10/WD-DOM-Level-3-Core-20011017'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public class DOMImplementationSourceImpl
-    implements DOMImplementationSource {
-
-    /**
-     * A method to request a DOM implementation.
-     * @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 this source has none.
-     */
-    public DOMImplementation getDOMImplementation(String features) {
-        // first check whether the CoreDOMImplementation would do
-        DOMImplementation impl =
-            CoreDOMImplementationImpl.getDOMImplementation();
-        if (testImpl(impl, features)) {
-            return impl;
-        }
-        // if not try the DOMImplementation
-        impl = DOMImplementationImpl.getDOMImplementation();
-        if (testImpl(impl, features)) {
-            return impl;
-        }
-        return null;
-    }
-
-    boolean testImpl(DOMImplementation impl, String features) {
-        StringTokenizer st = new StringTokenizer(features);
-        while (st.hasMoreTokens()) {
-            String feature = st.nextToken();
-            if (!impl.hasFeature(feature, null)) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
diff --git a/src/org/apache/xerces/dom/DOMInputSourceImpl.java b/src/org/apache/xerces/dom/DOMInputSourceImpl.java
deleted file mode 100644
index ecdc59f..0000000
--- a/src/org/apache/xerces/dom/DOMInputSourceImpl.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.apache.xerces.dom3.ls.DOMInputSource;
-
-import java.io.Reader;
-import java.io.InputStream;
-
-/**
- * This Class <code>DOMInputSourceImpl</code> represents a single input source for an XML entity. 
- * <p> This Class 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), and/or a character stream. 
- * <p> The exact definitions of a byte stream and a character stream are 
- * binding dependent. 
- * <p> There are two places that the application will deliver this input 
- * source to the parser: as the argument to the <code>parse</code> method, 
- * or as the return value of the <code>DOMEntityResolver.resolveEntity</code>
- *  method. 
- * <p> The <code>DOMBuilder</code> will use the <code>DOMInputSource</code> 
- * object to determine how to read XML input. If there is a character stream 
- * available, the parser will read that stream directly; if not, the parser 
- * will use a byte stream, if available; if neither a character stream nor a 
- * byte stream is available, the parser will attempt to open a URI 
- * connection to the resource identified by the system identifier. 
- * <p> An <code>DOMInputSource</code> object belongs to the application: the 
- * parser shall never modify it in any way (it may modify a copy if 
- * necessary).  Eventhough all attributes in this interface are writable the 
- * DOM implementation is expected to never mutate a DOMInputSource. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- *
- *
- * @author Gopal Sharma, SUN Microsystems Inc.
- */
-
-// REVISIT: 
-// 1. it should be possible to do the following
-// DOMInputSourceImpl extends XMLInputSource implements DOMInputSource
-// 2. we probably need only the default constructor.  -- el
-
-public class DOMInputSourceImpl implements DOMInputSource {
-
-	//
-	// Data
-	//
-
-	protected String fPublicId = null;
-	protected String fSystemId = null;
-	protected String fBaseSystemId = null;
-	
-	protected InputStream fByteStream = null;
-	protected Reader fCharStream	= null;
-	protected String fData = null;
-	
-	protected String fEncoding = null;
-
-   /** 
-     * Default Constructor, constructs an input source 
-     *
-     *
-     */
-     public DOMInputSourceImpl() {} 	
-
-   /** 
-     * Constructs an input source from just the public and system
-     * identifiers, leaving resolution of the entity and opening of
-     * the input stream up to the caller.
-     *
-     * @param publicId     The public identifier, if known.
-     * @param systemId     The system identifier. This value should
-     *                     always be set, if possible, and can be
-     *                     relative or absolute. If the system identifier
-     *                     is relative, then the base system identifier
-     *                     should be set.
-     * @param baseSystemId The base system identifier. This value should
-     *                     always be set to the fully expanded URI of the
-     *                     base system identifier, if possible.
-     */
- 
-    public DOMInputSourceImpl(String publicId, String systemId,  
-                          String baseSystemId) {
-		
-		fPublicId = publicId;
-		fSystemId = systemId;
-		fBaseSystemId = baseSystemId;
-
-    } // DOMInputSourceImpl(String,String,String)
-
-    /**
-     * Constructs an input source from a byte stream.
-     *
-     * @param publicId     The public identifier, if known.
-     * @param systemId     The system identifier. This value should
-     *                     always be set, if possible, and can be
-     *                     relative or absolute. If the system identifier
-     *                     is relative, then the base system identifier
-     *                     should be set.
-     * @param baseSystemId The base system identifier. This value should
-     *                     always be set to the fully expanded URI of the
-     *                     base system identifier, if possible.
-     * @param byteStream   The byte stream.
-     * @param encoding     The encoding of the byte stream, if known.
-     */
-
-    public DOMInputSourceImpl(String publicId, String systemId,  
-                          String baseSystemId, InputStream byteStream,
-                          String encoding) {
-		
-		fPublicId = publicId;
-		fSystemId = systemId;
-		fBaseSystemId = baseSystemId;
-		fByteStream = byteStream;
-		fEncoding = encoding;
-
-    } // DOMInputSourceImpl(String,String,String,InputStream,String)
-
-   /**
-     * Constructs an input source from a character stream.
-     *
-     * @param publicId     The public identifier, if known.
-     * @param systemId     The system identifier. This value should
-     *                     always be set, if possible, and can be
-     *                     relative or absolute. If the system identifier
-     *                     is relative, then the base system identifier
-     *                     should be set.
-     * @param baseSystemId The base system identifier. This value should
-     *                     always be set to the fully expanded URI of the
-     *                     base system identifier, if possible.
-     * @param charStream   The character stream.
-     * @param encoding     The original encoding of the byte stream
-     *                     used by the reader, if known.
-     */
-
-     public DOMInputSourceImpl(String publicId, String systemId,  
-                          String baseSystemId, Reader charStream,
-                          String encoding) {
-		
-		fPublicId = publicId;
-		fSystemId = systemId;
-		fBaseSystemId = baseSystemId;
-		fCharStream = charStream;
-		fEncoding = encoding;
-
-     } // DOMInputSourceImpl(String,String,String,Reader,String)
-
-   /**
-     * Constructs an input source from a String.
-     *
-     * @param publicId     The public identifier, if known.
-     * @param systemId     The system identifier. This value should
-     *                     always be set, if possible, and can be
-     *                     relative or absolute. If the system identifier
-     *                     is relative, then the base system identifier
-     *                     should be set.
-     * @param baseSystemId The base system identifier. This value should
-     *                     always be set to the fully expanded URI of the
-     *                     base system identifier, if possible.
-     * @param data		   The String Data.
-     * @param encoding     The original encoding of the byte stream
-     *                     used by the reader, if known.
-     */
-
-     public DOMInputSourceImpl(String publicId, String systemId,  
-                          String baseSystemId, String data,
-                          String encoding) {
-                fPublicId = publicId;
-		fSystemId = systemId;
-		fBaseSystemId = baseSystemId;
-		fData = data;
-		fEncoding = encoding;
-     } // DOMInputSourceImpl(String,String,String,String,String)
-
-   /**
-     * An attribute of a language-binding dependent type that represents a 
-     * stream of bytes.
-     * <br>The parser will ignore this if there is also a character stream 
-     * specified, but it will use a byte stream in preference to opening a 
-     * URI connection itself.
-     * <br>If the application knows the character encoding of the byte stream, 
-     * it should set the encoding property. Setting the encoding in this way 
-     * will override any encoding specified in the XML declaration itself.
-     */
-
-    public InputStream getByteStream(){ 
-	return fByteStream;
-    } 
-
-    /**
-     * An attribute of a language-binding dependent type that represents a 
-     * stream of bytes.
-     * <br>The parser will ignore this if there is also a character stream 
-     * specified, but it will use a byte stream in preference to opening a 
-     * URI connection itself.
-     * <br>If the application knows the character encoding of the byte stream, 
-     * it should set the encoding property. Setting the encoding in this way 
-     * will override any encoding specified in the XML declaration itself.
-     */
-
-     public void setByteStream(InputStream byteStream){
- 	fByteStream = byteStream;
-     }
-
-    /**
-     *  An attribute of a language-binding dependent type that represents a 
-     * stream of 16-bit units. Application must encode the stream using 
-     * UTF-16 (defined in  and Amendment 1 of ). 
-     * <br>If a character stream is specified, the parser will ignore any byte 
-     * stream and will not attempt to open a URI connection to the system 
-     * identifier.
-     */
-    public Reader getCharacterStream(){
-	return fCharStream;
-    }
-    /**
-     *  An attribute of a language-binding dependent type that represents a 
-     * stream of 16-bit units. Application must encode the stream using 
-     * UTF-16 (defined in  and Amendment 1 of ). 
-     * <br>If a character stream is specified, the parser will ignore any byte 
-     * stream and will not attempt to open a URI connection to the system 
-     * identifier.
-     */
-
-     public void setCharacterStream(Reader characterStream){
-	fCharStream = characterStream;
-     }
-
-    /**
-     * A string attribute that represents a sequence of 16 bit units (utf-16 
-     * encoded characters).
-     * <br>If string data is available in the input source, the parser will 
-     * ignore the character stream and the byte stream and will not attempt 
-     * to open a URI connection to the system identifier.
-     */
-    public String getStringData(){
-	return fData;
-    }
-
-   /**
-     * A string attribute that represents a sequence of 16 bit units (utf-16 
-     * encoded characters).
-     * <br>If string data is available in the input source, the parser will 
-     * ignore the character stream and the byte stream and will not attempt 
-     * to open a URI connection to the system identifier.
-     */
-    
-     public void setStringData(String stringData){
-		fData = stringData;
-     }
-
-    /**
-     *  The character encoding, if known. The encoding must be a string 
-     * acceptable for an XML encoding declaration ( section 4.3.3 "Character 
-     * Encoding in Entities"). 
-     * <br>This attribute has no effect when the application provides a 
-     * character stream. For other sources of input, an encoding specified 
-     * by means of this attribute will override any encoding specified in 
-     * the XML claration or the Text Declaration, or an encoding obtained 
-     * from a higher level protocol, such as HTTP .
-     */
-
-    public String getEncoding(){
-	return fEncoding;
-    }
-
-    /**
-     *  The character encoding, if known. The encoding must be a string 
-     * acceptable for an XML encoding declaration ( section 4.3.3 "Character 
-     * Encoding in Entities"). 
-     * <br>This attribute has no effect when the application provides a 
-     * character stream. For other sources of input, an encoding specified 
-     * by means of this attribute will override any encoding specified in 
-     * the XML claration or the Text Declaration, or an encoding obtained 
-     * from a higher level protocol, such as HTTP .
-     */
-    public void setEncoding(String encoding){
-	fEncoding = encoding;
-    }
-
-    /**
-     * The public identifier for this input source. The public identifier is 
-     * always optional: if the application writer includes one, it will be 
-     * provided as part of the location information.
-     */
-    public String getPublicId(){
-	return fPublicId;
-    }
-    /**
-     * The public identifier for this input source. The public identifier is 
-     * always optional: if the application writer includes one, it will be 
-     * provided as part of the location information.
-     */
-    public void setPublicId(String publicId){
-	fPublicId = publicId;
-    }
-
-    /**
-     * The system identifier, a URI reference , for this input source. The 
-     * system identifier is optional if there is a byte stream or a 
-     * character stream, but it is still useful to provide one, since the 
-     * application can use it to resolve relative URIs and can include it in 
-     * error messages and warnings (the parser will attempt to fetch the 
-     * ressource identifier by the URI reference only if there is no byte 
-     * stream or character stream specified).
-     * <br>If the application knows the character encoding of the object 
-     * pointed to by the system identifier, it can register the encoding by 
-     * setting the encoding attribute.
-     * <br>If the system ID is a relative URI reference (see section 5 in ), 
-     * the behavior is implementation dependent.
-     */
-    public String getSystemId(){
-	return fSystemId;
-    }
-    /**
-     * The system identifier, a URI reference , for this input source. The 
-     * system identifier is optional if there is a byte stream or a 
-     * character stream, but it is still useful to provide one, since the 
-     * application can use it to resolve relative URIs and can include it in 
-     * error messages and warnings (the parser will attempt to fetch the 
-     * ressource identifier by the URI reference only if there is no byte 
-     * stream or character stream specified).
-     * <br>If the application knows the character encoding of the object 
-     * pointed to by the system identifier, it can register the encoding by 
-     * setting the encoding attribute.
-     * <br>If the system ID is a relative URI reference (see section 5 in ), 
-     * the behavior is implementation dependent.
-     */
-    public void setSystemId(String systemId){
-	fSystemId = systemId;
-    }
-
-    /**
-     *  The base URI to be used (see section 5.1.4 in ) for resolving relative 
-     * URIs to absolute URIs. If the baseURI is itself a relative URI, the 
-     * behavior is implementation dependent. 
-     */
-    public String getBaseURI(){
-	return fBaseSystemId;	
-    }
-    /**
-     *  The base URI to be used (see section 5.1.4 in ) for resolving relative 
-     * URIs to absolute URIs. If the baseURI is itself a relative URI, the 
-     * behavior is implementation dependent. 
-     */
-    public void setBaseURI(String baseURI){
-	fBaseSystemId = baseURI;
-    }
-
-}// class DOMInputSourceImpl
diff --git a/src/org/apache/xerces/dom/DOMLocatorImpl.java b/src/org/apache/xerces/dom/DOMLocatorImpl.java
deleted file mode 100644
index f79f2b2..0000000
--- a/src/org/apache/xerces/dom/DOMLocatorImpl.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.apache.xerces.dom3.DOMLocator;
-import org.w3c.dom.Node;
-
-
-/**
- * <code>DOMLocatorImpl</code> is an implementaion that describes a location (e.g. 
- * where an error occured).
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010913'>Document Object Model (DOM) Level 3 Core Specification</a>.
- *
- * @author Gopal Sharma, SUN Microsystems Inc.
- */
- 
-public class DOMLocatorImpl implements DOMLocator {
-
-    //
-    // Data
-    //
-
-   /**
-    * The column number where the error occured, 
-    * or -1 if there is no column number available.
-    */
-   int fColumnNumber = -1;
-
-   /**
-    * The DOM Node where the error occured, or 
-    * null if there is no Node available.
-    */
-   Node fErrorNode = null;
-
-   /**
-    * The line number where the error occured, 
-    * or -1 if there is no line number available.
-    */
-   int fLineNumber = -1;
-
-   /**
-    * The byte or character offset into the input source, 
-    * if we're parsing a file or a byte stream then this 
-    * will be the byte offset into that stream, but if a character media 
-    * is parsed then the offset will be the character offset
-    */
-   int fOffset = -1;
-
-   /**
-    * The URI where the error occured, 
-    * or null if there is no URI available.
-    */
-   String fUri = null;
-     
-   //
-   // Constructors
-   //
-
-   public DOMLocatorImpl (int lineNumber, int columnNumber, String uri ){
-	fLineNumber = lineNumber ;
-	fColumnNumber = columnNumber ;
-	fUri = uri;
-   } // DOMLocatorImpl (int lineNumber, int columnNumber, String uri )
-
-  public DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri ){
-	fLineNumber = lineNumber ;
-	fColumnNumber = columnNumber ;
-	fOffset = offset ;
-	fErrorNode = errorNode ;
-	fUri = uri;
-  } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
-
-  /**
-   * The line number where the error occured, or -1 if there is no line 
-   * number available.
-   */
-   public int getLineNumber(){
- 	return fLineNumber;
-   }
-
-  /**
-   * The column number where the error occured, or -1 if there is no column 
-   * number available.
-   */
-  public int getColumnNumber(){
-	return fColumnNumber;
-  }
-
-  /**
-   * The byte or character offset into the input source, if we're parsing a 
-   * file or a byte stream then this will be the byte offset into that 
-   * stream, but if a character media is parsed then the offset will be 
-   * the character offset.
-   */
-  public int getOffset(){
-	return fOffset;
-  }
-  /**
-   * The DOM Node where the error occured, or null if there is no Node 
-   * available.
-   */
-  public Node getErrorNode(){
-	return fErrorNode;
-  }
-
-  /**
-   * The URI where the error occured, or null if there is no URI available.
-   */
-  public String getUri(){
-	return fUri;
-  }
-
-  
-
-}// class DOMLocatorImpl
\ No newline at end of file
diff --git a/src/org/apache/xerces/dom/DeepNodeListImpl.java b/src/org/apache/xerces/dom/DeepNodeListImpl.java
deleted file mode 100644
index 784f8c0..0000000
--- a/src/org/apache/xerces/dom/DeepNodeListImpl.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import java.util.Vector;
-
-/**
- * This class implements the DOM's NodeList behavior for
- * Element.getElementsByTagName()
- * <P>
- * The DOM describes NodeList as follows:
- * <P>
- * 1) It may represent EITHER nodes scattered through a subtree (when
- * returned by Element.getElementsByTagName), or just the immediate
- * children (when returned by Node.getChildNodes). The latter is easy,
- * but the former (which this class addresses) is more challenging.
- * <P>
- * 2) Its behavior is "live" -- that is, it always reflects the
- * current state of the document tree. To put it another way, the
- * NodeLists obtained before and after a series of insertions and
- * deletions are effectively identical (as far as the user is
- * concerned, the former has been dynamically updated as the changes
- * have been made).
- * <P>
- * 3) Its API accesses individual nodes via an integer index, with the
- * listed nodes numbered sequentially in the order that they were
- * found during a preorder depth-first left-to-right search of the tree.
- * (Of course in the case of getChildNodes, depth is not involved.) As
- * nodes are inserted or deleted in the tree, and hence the NodeList,
- * the numbering of nodes that follow them in the NodeList will
- * change.
- * <P>
- * It is rather painful to support the latter two in the
- * getElementsByTagName case. The current solution is for Nodes to
- * maintain a change count (eventually that may be a Digest instead),
- * which the NodeList tracks and uses to invalidate itself.
- * <P>
- * Unfortunately, this does _not_ respond efficiently in the case that
- * the dynamic behavior was supposed to address: scanning a tree while
- * it is being extended. That requires knowing which subtrees have
- * changed, which can become an arbitrarily complex problem.
- * <P>
- * We save some work by filling the vector only as we access the
- * item()s... but I suspect the same users who demanded index-based
- * access will also start by doing a getLength() to control their loop,
- * blowing this optimization out of the water.
- * <P>
- * NOTE: Level 2 of the DOM will probably _not_ use NodeList for its
- * extended search mechanisms, partly for the reasons just discussed.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeepNodeListImpl 
-    implements NodeList {
-
-    //
-    // Data
-    //
-
-    protected NodeImpl rootNode; // Where the search started
-    protected String tagName;   // Or "*" to mean all-tags-acceptable
-    protected int changes=0;
-    protected Vector nodes;
-    
-    protected String nsName;
-    protected boolean enableNS = false;
-
-    //
-    // Constructors
-    //
-
-    /** Constructor. */
-    public DeepNodeListImpl(NodeImpl rootNode, String tagName) {
-        this.rootNode = rootNode;
-        this.tagName  = tagName;
-        nodes = new Vector();
-    }  
-
-    /** Constructor for Namespace support. */
-    public DeepNodeListImpl(NodeImpl rootNode,
-                            String nsName, String tagName) {
-        this(rootNode, tagName);
-        this.nsName = (nsName != null && !nsName.equals("")) ? nsName : null;
-        enableNS = true;
-    }
-    
-    //
-    // NodeList methods
-    //
-
-    /** Returns the length of the node list. */
-    public int getLength() {
-        // Preload all matching elements. (Stops when we run out of subtree!)
-        item(java.lang.Integer.MAX_VALUE);
-        return nodes.size();
-    }  
-
-    /** Returns the node at the specified index. */
-    public Node item(int index) {
-    	Node thisNode;
-
-        // Tree changed. Do it all from scratch!
-    	if(rootNode.changes() != changes) {
-            nodes   = new Vector();     
-            changes = rootNode.changes();
-    	}
-    
-        // In the cache
-    	if (index < nodes.size())      
-    	    return (Node)nodes.elementAt(index);
-    
-        // Not yet seen
-    	else {
-    
-            // Pick up where we left off (Which may be the beginning)
-    		if (nodes.size() == 0)     
-    		    thisNode = rootNode;
-    		else
-    		    thisNode=(NodeImpl)(nodes.lastElement());
-    
-    		// Add nodes up to the one we're looking for
-    		while(thisNode != null && index >= nodes.size()) {
-    			thisNode=nextMatchingElementAfter(thisNode);
-    			if (thisNode != null)
-    			    nodes.addElement(thisNode);
-    		    }
-
-            // Either what we want, or null (not avail.)
-		    return thisNode;           
-	    }
-
-    } // item(int):Node
-
-    //
-    // Protected methods (might be overridden by an extending DOM)
-    //
-
-    /** 
-     * Iterative tree-walker. When you have a Parent link, there's often no
-     * need to resort to recursion. NOTE THAT only Element nodes are matched
-     * since we're specifically supporting getElementsByTagName().
-     */
-    protected Node nextMatchingElementAfter(Node current) {
-
-	    Node next;
-	    while (current != null) {
-		    // Look down to first child.
-		    if (current.hasChildNodes()) {
-			    current = (current.getFirstChild());
-		    }
-
-		    // Look right to sibling (but not from root!)
-		    else if (current != rootNode && null != (next = current.getNextSibling())) {
-				current = next;
-			}
-
-			// Look up and right (but not past root!)
-			else {
-				next = null;
-				for (; current != rootNode; // Stop when we return to starting point
-					current = current.getParentNode()) {
-
-					next = current.getNextSibling();
-					if (next != null)
-						break;
-				}
-				current = next;
-			}
-
-			// Have we found an Element with the right tagName?
-			// ("*" matches anything.)
-		    if (current != rootNode 
-		        && current != null
-		        && current.getNodeType() ==  Node.ELEMENT_NODE) {
-			if (!enableNS) {
-			    if (tagName.equals("*") ||
-				((ElementImpl) current).getTagName().equals(tagName))
-			    {
-				return current;
-			    }
-			} else {
-			    // DOM2: Namespace logic. 
-			    if (tagName.equals("*")) {
-				if (nsName != null && nsName.equals("*")) {
-				    return current;
-				} else {
-				    ElementImpl el = (ElementImpl) current;
-				    if ((nsName == null
-					 && el.getNamespaceURI() == null)
-					|| (nsName != null
-					    && nsName.equals(el.getNamespaceURI())))
-				    {
-					return current;
-				    }
-				}
-			    } else {
-				ElementImpl el = (ElementImpl) current;
-				if (el.getLocalName() != null
-				    && el.getLocalName().equals(tagName)) {
-				    if (nsName != null && nsName.equals("*")) {
-					return current;
-				    } else {
-					if ((nsName == null
-					     && el.getNamespaceURI() == null)
-					    || (nsName != null &&
-						nsName.equals(el.getNamespaceURI())))
-					{
-					    return current;
-					}
-				    }
-				}
-			    }
-			}
-		    }
-
-		// Otherwise continue walking the tree
-	    }
-
-	    // Fell out of tree-walk; no more instances found
-	    return null;
-
-    } // nextMatchingElementAfter(int):Node
-
-} // class DeepNodeListImpl
diff --git a/src/org/apache/xerces/dom/DeferredAttrImpl.java b/src/org/apache/xerces/dom/DeferredAttrImpl.java
deleted file mode 100644
index 42c7c95..0000000
--- a/src/org/apache/xerces/dom/DeferredAttrImpl.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-/*
- * WARNING: because java doesn't support multi-inheritance some code is
- * duplicated. If you're changing this file you probably want to change
- * DeferredAttrNSImpl.java at the same time.
- */
-
-package org.apache.xerces.dom;
-
-/**
- * Attribute represents an XML-style attribute of an
- * Element. Typically, the allowable values are controlled by its
- * declaration in the Document Type Definition (DTD) governing this
- * kind of document.
- * <P>
- * If the attribute has not been explicitly assigned a value, but has
- * been declared in the DTD, it will exist and have that default. Only
- * if neither the document nor the DTD specifies a value will the
- * Attribute really be considered absent and have no value; in that
- * case, querying the attribute will return null.
- * <P>
- * Attributes may have multiple children that contain their data. (XML
- * allows attributes to contain entity references, and tokenized
- * attribute types such as NMTOKENS may have a child for each token.)
- * For convenience, the Attribute object's getValue() method returns
- * the string version of the attribute's value.
- * <P>
- * Attributes are not children of the Elements they belong to, in the
- * usual sense, and have no valid Parent reference. However, the spec
- * says they _do_ belong to a specific Element, and an INUSE exception
- * is to be thrown if the user attempts to explicitly share them
- * between elements.
- * <P>
- * Note that Elements do not permit attributes to appear to be shared
- * (see the INUSE exception), so this object's mutability is
- * officially not an issue.
- * <P>
- * DeferredAttrImpl inherits from AttrImpl which does not support
- * Namespaces. DeferredAttrNSImpl, which inherits from AttrNSImpl, does.
- * @see DeferredAttrNSImpl
- *
- *
- * @author Andy Clark, IBM
- * @author Arnaud  Le Hors, IBM
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public final class DeferredAttrImpl
-    extends AttrImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 6903232312469148636L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here.
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredAttrImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-        needsSyncChildren(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) ownerDocument();
-        name = ownerDocument.getNodeName(fNodeIndex);
-        isSpecified(ownerDocument.getNodeExtra(fNodeIndex) == 1);
-
-    } // synchronizeData()
-
-    /**
-     * Synchronizes the node's children with the internal structure.
-     * Fluffing the children at once solves a lot of work to keep
-     * the two structures in sync. The problem gets worse when
-     * editing the tree -- this makes it a lot easier.
-     */
-    protected void synchronizeChildren() {
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) ownerDocument();
-        ownerDocument.synchronizeChildren(this, fNodeIndex);
-    } // synchronizeChildren()
-
-} // class DeferredAttrImpl
diff --git a/src/org/apache/xerces/dom/DeferredAttrNSImpl.java b/src/org/apache/xerces/dom/DeferredAttrNSImpl.java
deleted file mode 100644
index 2d11d59..0000000
--- a/src/org/apache/xerces/dom/DeferredAttrNSImpl.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-/*
- * WARNING: because java doesn't support multi-inheritance some code is
- * duplicated. If you're changing this file you probably want to change
- * DeferredAttrImpl.java at the same time.
- */
-
-/* $Id$ */
-
-
-package org.apache.xerces.dom;
-
-/**
- * DeferredAttrNSImpl is to AttrNSImpl, what DeferredAttrImpl is to
- * AttrImpl. 
- * @author Andy Clark, IBM
- * @author Arnaud  Le Hors, IBM
- * @see DeferredAttrImpl
- */
-public final class DeferredAttrNSImpl
-    extends AttrNSImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 6074924934945957154L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here.
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredAttrNSImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-        needsSyncChildren(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-	    (DeferredDocumentImpl) ownerDocument();
-        name = ownerDocument.getNodeName(fNodeIndex);
-
-        // extract prefix and local part from QName
-        int index = name.indexOf(':');
-        String prefix;
-        if (index < 0) {
-            prefix = null;
-            localName = name;
-        } 
-        else {
-            prefix = name.substring(0, index); 
-            localName = name.substring(index + 1);
-        }
-
-        isSpecified(ownerDocument.getNodeExtra(fNodeIndex) == 1);
-        namespaceURI = ownerDocument.getNodeURI(fNodeIndex);
-        // hide the fact that our parser uses an empty string for null
-        if (namespaceURI != null && namespaceURI.length() == 0) {
-            namespaceURI = null;
-        }
-	// DOM Level 2 wants all namespace declaration attributes
-	// to be bound to "http://www.w3.org/2000/xmlns/"
-	// So as long as the XML parser doesn't do it, it needs to
-	// done here.
-	if (namespaceURI == null) {
-	    if (prefix != null)  {
-		if (prefix.equals("xmlns")) {
-		    namespaceURI = "http://www.w3.org/2000/xmlns/";
-		}
-	    } else if (name.equals("xmlns")) {
-		namespaceURI = "http://www.w3.org/2000/xmlns/";
-	    }
-	}
-
-    } // synchronizeData()
-
-    /**
-     * Synchronizes the node's children with the internal structure.
-     * Fluffing the children at once solves a lot of work to keep
-     * the two structures in sync. The problem gets worse when
-     * editing the tree -- this makes it a lot easier.
-     */
-    protected void synchronizeChildren() {
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) ownerDocument();
-        ownerDocument.synchronizeChildren(this, fNodeIndex);
-    } // synchronizeChildren()
-
-} // class DeferredAttrImpl
diff --git a/src/org/apache/xerces/dom/DeferredCDATASectionImpl.java b/src/org/apache/xerces/dom/DeferredCDATASectionImpl.java
deleted file mode 100644
index 9dd1e25..0000000
--- a/src/org/apache/xerces/dom/DeferredCDATASectionImpl.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-/**
- * XML provides the CDATA markup to allow a region of text in which
- * most of the XML delimiter recognition does not take place. This is
- * intended to ease the task of quoting XML fragments and other
- * programmatic information in a document's text without needing to
- * escape these special characters. It's primarily a convenience feature
- * for those who are hand-editing XML.
- * <P>
- * CDATASection is an Extended DOM feature, and is not used in HTML 
- * contexts.
- * <P>
- * Within the DOM, CDATASections are treated essentially as Text
- * blocks. Their distinct type is retained in order to allow us to
- * properly recreate the XML syntax when we write them out.
- * <P>
- * Reminder: CDATA IS NOT A COMPLETELY GENERAL SOLUTION; it can't
- * quote its own end-of-block marking. If you need to write out a
- * CDATA that contains the ]]> sequence, it's your responsibility to
- * split that string over two successive CDATAs at that time.
- * <P>
- * CDATA does not participate in Element.normalize() processing.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredCDATASectionImpl 
-    extends CDATASectionImpl 
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 1983580632355645726L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here. All other data,
-     * can be requested from the ownerDocument via the index.
-     */
-    DeferredCDATASectionImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-    
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) this.ownerDocument();
-        data = ownerDocument.getNodeValueString(fNodeIndex);
-
-    } // synchronizeData()
-
-} // class DeferredCDATASectionImpl
diff --git a/src/org/apache/xerces/dom/DeferredCommentImpl.java b/src/org/apache/xerces/dom/DeferredCommentImpl.java
deleted file mode 100644
index ebb430c..0000000
--- a/src/org/apache/xerces/dom/DeferredCommentImpl.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-/**
- * Represents an XML (or HTML) comment.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredCommentImpl 
-    extends CommentImpl 
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 6498796371083589338L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here. All other data,
-     * can be requested from the ownerDocument via the index.
-     */
-    DeferredCommentImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-    
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) this.ownerDocument();
-        data = ownerDocument.getNodeValueString(fNodeIndex);
-
-    } // synchronizeData()
-
-} // class DeferredCommentImpl
diff --git a/src/org/apache/xerces/dom/DeferredDocumentImpl.java b/src/org/apache/xerces/dom/DeferredDocumentImpl.java
deleted file mode 100644
index 7484227..0000000
--- a/src/org/apache/xerces/dom/DeferredDocumentImpl.java
+++ /dev/null
@@ -1,1976 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import org.apache.xerces.xni.XMLAttributes;
-import java.util.Vector;
-
-/**
- * The Document interface represents the entire HTML or XML document.
- * Conceptually, it is the root of the document tree, and provides the
- * primary access to the document's data.
- * <P>
- * Since elements, text nodes, comments, processing instructions,
- * etc. cannot exist outside the context of a Document, the Document
- * interface also contains the factory methods needed to create these
- * objects. The Node objects created have a ownerDocument attribute
- * which associates them with the Document within whose context they
- * were created.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredDocumentImpl
-    extends DocumentImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 5186323580749626857L;
-
-    // debugging
-
-    /** To include code for printing the ref count tables. */
-    private static final boolean DEBUG_PRINT_REF_COUNTS = false;
-
-    /** To include code for printing the internal tables. */
-    private static final boolean DEBUG_PRINT_TABLES = false;
-
-    /** To debug identifiers set to true and recompile. */
-    private static final boolean DEBUG_IDS = false;
-
-    // protected
-
-    /** Chunk shift. */
-    protected static final int CHUNK_SHIFT = 11;           // 2^11 = 2k
-
-    /** Chunk size. */
-    protected static final int CHUNK_SIZE = (1 << CHUNK_SHIFT);
-
-    /** Chunk mask. */
-    protected static final int CHUNK_MASK = CHUNK_SIZE - 1;
-
-    /** Initial chunk size. */
-    protected static final int INITIAL_CHUNK_COUNT = (1 << (16 - CHUNK_SHIFT));   // 2^16 = 64k
-
-    //
-    // Data
-    //
-
-    // lazy-eval information
-    // To maximize memory consumption the actual semantic of these fields vary
-    // depending on the node type.
-
-    /** Node count. */
-    protected transient int fNodeCount = 0;
-
-    /** Node types. */
-    protected transient int fNodeType[][];
-
-    /** Node names. */
-    protected transient Object fNodeName[][];
-
-    /** Node values. */
-    protected transient Object fNodeValue[][];
-
-    /** Node parents. */
-    protected transient int fNodeParent[][];
-
-    /** Node first children. */
-    protected transient int fNodeLastChild[][];
-
-    /** Node prev siblings. */
-    protected transient int fNodePrevSib[][];
-
-    /** Node namespace URI. */
-    protected transient Object fNodeURI[][];
-
-    /** Extra data. */
-    protected transient int fNodeExtra[][];
-
-    /** Identifier count. */
-    protected transient int fIdCount;
-
-    /** Identifier name indexes. */
-    protected transient String fIdName[];
-
-    /** Identifier element indexes. */
-    protected transient int fIdElement[];
-
-    /** DOM2: For namespace support in the deferred case.
-     */
-    // Implementation Note: The deferred element and attribute must know how to
-    // interpret the int representing the qname.
-    protected boolean fNamespacesEnabled = false;
-    
-    //
-    // private data
-    //
-    private transient final StringBuffer fBufferStr = new StringBuffer();
-    private transient final Vector fStrChunks = new Vector();
-
-    //
-    // Constructors
-    //
-
-    /**
-     * NON-DOM: Actually creating a Document is outside the DOM's spec,
-     * since it has to operate in terms of a particular implementation.
-     */
-    public DeferredDocumentImpl() {
-        this(false);
-    } // <init>()
-
-    /**
-     * NON-DOM: Actually creating a Document is outside the DOM's spec,
-     * since it has to operate in terms of a particular implementation.
-     */
-    public DeferredDocumentImpl(boolean namespacesEnabled) {
-        this(namespacesEnabled, false);
-    } // <init>(boolean)
-
-    /** Experimental constructor. */
-    public DeferredDocumentImpl(boolean namespaces, boolean grammarAccess) {
-        super(grammarAccess);
-
-        needsSyncData(true);
-        needsSyncChildren(true);
-
-        fNamespacesEnabled = namespaces;
-
-    } // <init>(boolean,boolean)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the cached parser.getNamespaces() value.*/
-    boolean getNamespacesEnabled() {
-        return fNamespacesEnabled;
-    }
-
-    void setNamespacesEnabled(boolean enable) {
-        fNamespacesEnabled = enable;
-    }
-
-    // internal factory methods
-
-    /** Creates a document node in the table. */
-    public int createDeferredDocument() {
-        int nodeIndex = createNode(Node.DOCUMENT_NODE);
-        return nodeIndex;
-    }
-
-    /** Creates a doctype. */
-    public int createDeferredDocumentType(String rootElementName,
-                                          String publicId, String systemId) {
-
-        // create node
-        int nodeIndex = createNode(Node.DOCUMENT_TYPE_NODE);
-        int chunk     = nodeIndex >> CHUNK_SHIFT;
-        int index     = nodeIndex & CHUNK_MASK;
-
-        // added for DOM2: createDoctype factory method includes
-        // name, publicID, systemID
-
-        // create extra data node
-        int extraDataIndex = createNode((short)0); // node type unimportant
-        int echunk = extraDataIndex >> CHUNK_SHIFT;
-        int eindex = extraDataIndex & CHUNK_MASK;
-
-        // save name, public id, system id
-        setChunkValue(fNodeName, rootElementName, chunk, index);
-        setChunkValue(fNodeValue, publicId, chunk, index);
-        setChunkValue(fNodeURI, systemId, chunk, index);
-        setChunkIndex(fNodeExtra, extraDataIndex, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredDocumentType(String,String,String):int
-
-    public void setInternalSubset(int doctypeIndex, String subset) {
-        int chunk     = doctypeIndex >> CHUNK_SHIFT;
-        int index     = doctypeIndex & CHUNK_MASK;
-        int extraDataIndex = fNodeExtra[chunk][index];
-        int echunk = extraDataIndex >> CHUNK_SHIFT;
-        int eindex = extraDataIndex & CHUNK_MASK;
-        setChunkValue(fNodeValue, subset, echunk, eindex);
-    }
-
-    /** Creates a notation in the table. */
-    public int createDeferredNotation(String notationName,
-                                      String publicId, String systemId) {
-
-        // create node
-        int nodeIndex = createNode(Node.NOTATION_NODE);
-        int chunk     = nodeIndex >> CHUNK_SHIFT;
-        int index     = nodeIndex & CHUNK_MASK;
-
-        // save name, public id, system id, and notation name
-        setChunkValue(fNodeName, notationName, chunk, index);
-        setChunkValue(fNodeValue, publicId, chunk, index);
-        setChunkValue(fNodeURI, systemId, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredNotation(String,String,String):int
-
-    /** Creates an entity in the table. */
-    public int createDeferredEntity(String entityName, String publicId,
-                                    String systemId, String notationName) {
-        // create node
-        int nodeIndex = createNode(Node.ENTITY_NODE);
-        int chunk     = nodeIndex >> CHUNK_SHIFT;
-        int index     = nodeIndex & CHUNK_MASK;
-
-        // create extra data node
-        int extraDataIndex = createNode((short)0); // node type unimportant
-        int echunk = extraDataIndex >> CHUNK_SHIFT;
-        int eindex = extraDataIndex & CHUNK_MASK;
-
-        // save name, public id, system id, and notation name
-        setChunkValue(fNodeName, entityName, chunk, index);
-        setChunkValue(fNodeValue, publicId, chunk, index);
-        setChunkValue(fNodeURI, systemId, chunk, index);
-        setChunkIndex(fNodeExtra, extraDataIndex, chunk, index);
-
-        setChunkValue(fNodeName, notationName, echunk, eindex);
-
-        // initialize encoding and version for DOM Level 3 - el
-        setChunkValue(fNodeValue, null, echunk, eindex);
-        setChunkValue(fNodeURI, null, echunk, eindex);
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredEntity(String,String,String,String):int
-
-    // DOM Level 3 - el
-    // setting encoding and version
-    public void setEntityInfo(int currentEntityDecl,
-                              String version, String encoding){
-        int eNodeIndex = getNodeExtra(currentEntityDecl, false);
-        if (eNodeIndex !=-1) {
-            int echunk = eNodeIndex >> CHUNK_SHIFT;
-            int eindex = eNodeIndex & CHUNK_MASK;
-            setChunkValue(fNodeValue, version, echunk, eindex);
-            setChunkValue(fNodeURI, encoding, echunk, eindex);
-        }
-    }
-
-    /** Creates an entity reference node in the table. */
-    public int createDeferredEntityReference(String name) {
-
-        // create node
-        int nodeIndex = createNode(Node.ENTITY_REFERENCE_NODE);
-        int chunk     = nodeIndex >> CHUNK_SHIFT;
-        int index     = nodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeName, name, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredEntityReference(String):int
-
-    /** Creates an element node in the table. */
-    public int createDeferredElement(String elementName,
-                                     XMLAttributes attrList) {
-        return createDeferredElement(null, elementName, attrList);
-    }
-
-    /** Creates an element node with a URI in the table. */
-    public int createDeferredElement(String elementURI, String elementName,
-                                     XMLAttributes attrList) {
-
-        // create node
-        int elementNodeIndex = createNode(Node.ELEMENT_NODE);
-        int elementChunk     = elementNodeIndex >> CHUNK_SHIFT;
-        int elementIndex     = elementNodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeName, elementName, elementChunk, elementIndex);
-        setChunkValue(fNodeURI, elementURI, elementChunk, elementIndex);
-
-        // create attributes
-        int attrCount = attrList.getLength();
-        int lastAttrNodeIndex = -1;
-        int lastAttrChunk = -1;
-        int lastAttrIndex = -1;
-        for (int i = 0; i < attrCount; i++) {
-            // create attribute
-            int attrNodeIndex =
-                createDeferredAttribute(attrList.getQName(i),
-                                        attrList.getURI(i),
-                                        attrList.getValue(i),
-                                        attrList.isSpecified(i));
-            int attrChunk = attrNodeIndex >> CHUNK_SHIFT;
-            int attrIndex  = attrNodeIndex & CHUNK_MASK;
-
-            setChunkIndex(fNodeParent, elementNodeIndex, attrChunk, attrIndex);
-
-            // add links
-            if (i == 0) {
-                // from element to first attribute
-                setChunkIndex(fNodeExtra, attrNodeIndex,
-                              elementChunk, elementIndex);
-            }
-            else {
-                // from last attribute to new attribute
-                setChunkIndex(fNodePrevSib, attrNodeIndex,
-                              lastAttrChunk, lastAttrIndex);
-            }
-
-            // save last chunk and index
-            lastAttrNodeIndex = attrNodeIndex;
-            lastAttrChunk     = attrChunk;
-            lastAttrIndex     = attrIndex;
-        }
- 
-        // return node index
-        return elementNodeIndex;
-
-    } // createDeferredElement(String,XMLAttributes):int
-
-    /** Creates an attribute in the table. */
-    public int createDeferredAttribute(String attrName,
-                                       String attrValue, boolean specified) {
-        return createDeferredAttribute(attrName, null, attrValue, specified);
-    }
-
-    /** Creates an attribute with a URI in the table. */
-    public int createDeferredAttribute(String attrName, String attrURI,
-                                       String attrValue, boolean specified) {
-
-        // create node
-        int nodeIndex = createNode(NodeImpl.ATTRIBUTE_NODE);
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeName, attrName, chunk, index);
-        setChunkValue(fNodeURI, attrURI, chunk, index);
-        setChunkValue(fNodeValue, attrValue, chunk, index);
-        setChunkIndex(fNodeExtra, specified ? 1 : 0, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredAttribute(String,String,boolean):int
-
-    /** Creates an element definition in the table. */
-    public int createDeferredElementDefinition(String elementName) {
-
-        // create node
-        int nodeIndex = createNode(NodeImpl.ELEMENT_DEFINITION_NODE);
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeName, elementName, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredElementDefinition(String):int
-
-    /** Creates a text node in the table. */
-    public int createDeferredTextNode(String data,
-                                      boolean ignorableWhitespace) {
-
-        // create node
-        int nodeIndex = createNode(Node.TEXT_NODE);
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeValue, data, chunk, index);
-        // use extra to store ignorableWhitespace info
-        setChunkIndex(fNodeExtra, ignorableWhitespace ?  1 : 0, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredTextNode(String,boolean):int
-
-    /** Creates a CDATA section node in the table. */
-    public int createDeferredCDATASection(String data) {
-
-        // create node
-        int nodeIndex = createNode(Node.CDATA_SECTION_NODE);
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeValue, data, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredCDATASection(String):int
-
-    /** Creates a processing instruction node in the table. */
-    public int createDeferredProcessingInstruction(String target,
-                                                   String data) {
-
-        // create node
-        int nodeIndex = createNode(Node.PROCESSING_INSTRUCTION_NODE);
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeName, target, chunk, index);
-        setChunkValue(fNodeValue, data, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredProcessingInstruction(String,String):int
-
-    /** Creates a comment node in the table. */
-    public int createDeferredComment(String data) {
-
-        // create node
-        int nodeIndex = createNode(Node.COMMENT_NODE);
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        setChunkValue(fNodeValue, data, chunk, index);
-
-        // return node index
-        return nodeIndex;
-
-    } // createDeferredComment(String):int
-
-    /** Creates a clone of the specified node. */
-    public int cloneNode(int nodeIndex, boolean deep) {
-
-        // clone immediate node
-        
-        int nchunk = nodeIndex >> CHUNK_SHIFT;
-        int nindex = nodeIndex & CHUNK_MASK;
-        int nodeType = fNodeType[nchunk][nindex];
-        int cloneIndex = createNode((short)nodeType);
-        int cchunk = cloneIndex >> CHUNK_SHIFT;
-        int cindex = cloneIndex & CHUNK_MASK;
-        setChunkValue(fNodeName, fNodeName[nchunk][nindex], cchunk, cindex);
-        setChunkValue(fNodeValue, fNodeValue[nchunk][nindex], cchunk, cindex);
-        setChunkValue(fNodeURI, fNodeURI[nchunk][nindex], cchunk, cindex);
-        int extraIndex = fNodeExtra[nchunk][nindex];
-        if (extraIndex != -1) {
-            if (nodeType != Node.ATTRIBUTE_NODE && nodeType != Node.TEXT_NODE) {
-                extraIndex = cloneNode(extraIndex, false);
-            }
-            setChunkIndex(fNodeExtra, extraIndex, cchunk, cindex);
-        }
-
-        // clone and attach children
-        if (deep) {
-            int prevIndex = -1;
-            int childIndex = getLastChild(nodeIndex, false);
-            while (childIndex != -1) {
-                int clonedChildIndex = cloneNode(childIndex, deep);
-                insertBefore(cloneIndex, clonedChildIndex, prevIndex);
-                prevIndex = clonedChildIndex;
-                childIndex = getRealPrevSibling(childIndex, false);
-            }
-            
-
-        }
-        
-        // return cloned node index
-        return cloneIndex;
-
-    } // cloneNode(int,boolean):int
-
-    /** Appends a child to the specified parent in the table. */
-    public void appendChild(int parentIndex, int childIndex) {
-
-        // append parent index
-        int pchunk = parentIndex >> CHUNK_SHIFT;
-        int pindex = parentIndex & CHUNK_MASK;
-        int cchunk = childIndex >> CHUNK_SHIFT;
-        int cindex = childIndex & CHUNK_MASK;
-        setChunkIndex(fNodeParent, parentIndex, cchunk, cindex);
-
-        // set previous sibling of new child
-        int olast = getChunkIndex(fNodeLastChild, pchunk, pindex);
-        setChunkIndex(fNodePrevSib, olast, cchunk, cindex);
-
-        // update parent's last child
-        setChunkIndex(fNodeLastChild, childIndex, pchunk, pindex);
-
-    } // appendChild(int,int)
-
-    /** Adds an attribute node to the specified element. */
-    public int setAttributeNode(int elemIndex, int attrIndex) {
-
-        int echunk = elemIndex >> CHUNK_SHIFT;
-        int eindex = elemIndex & CHUNK_MASK;
-        int achunk = attrIndex >> CHUNK_SHIFT;
-        int aindex = attrIndex & CHUNK_MASK;
-
-        // see if this attribute is already here
-        String attrName = getChunkValue(fNodeName, achunk, aindex);
-        int oldAttrIndex = getChunkIndex(fNodeExtra, echunk, eindex);
-        int nextIndex = -1;
-        int oachunk = -1;
-        int oaindex = -1;
-        while (oldAttrIndex != -1) {
-            oachunk = oldAttrIndex >> CHUNK_SHIFT;
-            oaindex = oldAttrIndex & CHUNK_MASK;
-            String oldAttrName = getChunkValue(fNodeName, oachunk, oaindex);
-            if (oldAttrName.equals(attrName)) {
-                break;
-            }
-            nextIndex = oldAttrIndex;
-            oldAttrIndex = getChunkIndex(fNodePrevSib, oachunk, oaindex);
-        }
-
-        // remove old attribute
-        if (oldAttrIndex != -1) {
-
-            // patch links
-            int prevIndex = getChunkIndex(fNodePrevSib, oachunk, oaindex);
-            if (nextIndex == -1) {
-                setChunkIndex(fNodeExtra, prevIndex, echunk, eindex);
-            }
-            else {
-                int pchunk = nextIndex >> CHUNK_SHIFT;
-                int pindex = nextIndex & CHUNK_MASK;
-                setChunkIndex(fNodePrevSib, prevIndex, pchunk, pindex);
-            }
-
-            // remove connections to siblings
-            clearChunkIndex(fNodeType, oachunk, oaindex);
-            clearChunkValue(fNodeName, oachunk, oaindex);
-            clearChunkValue(fNodeValue, oachunk, oaindex);
-            clearChunkIndex(fNodeParent, oachunk, oaindex);
-            clearChunkIndex(fNodePrevSib, oachunk, oaindex);
-            int attrTextIndex =
-                clearChunkIndex(fNodeLastChild, oachunk, oaindex);
-            int atchunk = attrTextIndex >> CHUNK_SHIFT;
-            int atindex = attrTextIndex & CHUNK_MASK;
-            clearChunkIndex(fNodeType, atchunk, atindex);
-            clearChunkValue(fNodeValue, atchunk, atindex);
-            clearChunkIndex(fNodeParent, atchunk, atindex);
-            clearChunkIndex(fNodeLastChild, atchunk, atindex);
-        }
-
-        // add new attribute
-        int prevIndex = getChunkIndex(fNodeExtra, echunk, eindex);
-        setChunkIndex(fNodeExtra, attrIndex, echunk, eindex);
-        setChunkIndex(fNodePrevSib, prevIndex, achunk, aindex);
-
-        // return
-        return oldAttrIndex;
-
-    } // setAttributeNode(int,int):int
-
-    /** Inserts a child before the specified node in the table. */
-    public int insertBefore(int parentIndex, int newChildIndex, int refChildIndex) {
-
-        if (refChildIndex == -1) {
-            appendChild(parentIndex, newChildIndex);
-            return newChildIndex;
-        }
-
-        int nchunk = newChildIndex >> CHUNK_SHIFT;
-        int nindex = newChildIndex & CHUNK_MASK;
-        int rchunk = refChildIndex >> CHUNK_SHIFT;
-        int rindex = refChildIndex & CHUNK_MASK;
-        int previousIndex = getChunkIndex(fNodePrevSib, rchunk, rindex);
-        setChunkIndex(fNodePrevSib, newChildIndex, rchunk, rindex);
-        setChunkIndex(fNodePrevSib, previousIndex, nchunk, nindex);
-
-        return newChildIndex;
-
-    } // insertBefore(int,int,int):int
-
-    /** Sets the last child of the parentIndex to childIndex. */
-    public void setAsLastChild(int parentIndex, int childIndex) {
-
-        int pchunk = parentIndex >> CHUNK_SHIFT;
-        int pindex = parentIndex & CHUNK_MASK;
-        int chunk = childIndex >> CHUNK_SHIFT;
-        int index = childIndex & CHUNK_MASK;
-        setChunkIndex(fNodeLastChild, childIndex, pchunk, pindex);
-    } // setAsLastChild(int,int)
-
-    /**
-     * Returns the parent node of the given node.
-     * <em>Calling this method does not free the parent index.</em>
-     */
-    public int getParentNode(int nodeIndex) {
-        return getParentNode(nodeIndex, false);
-    }
-
-    /**
-     * Returns the parent node of the given node.
-     * @param free True to free parent node.
-     */
-    public int getParentNode(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return -1;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? clearChunkIndex(fNodeParent, chunk, index)
-                    : getChunkIndex(fNodeParent, chunk, index);
-
-    } // getParentNode(int):int
-
-    /** Returns the last child of the given node. */
-    public int getLastChild(int nodeIndex) {
-        return getLastChild(nodeIndex, true);
-    }
-
-    /**
-     * Returns the last child of the given node.
-     * @param free True to free child index.
-     */
-    public int getLastChild(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return -1;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? clearChunkIndex(fNodeLastChild, chunk, index)
-                    : getChunkIndex(fNodeLastChild, chunk, index);
-
-    } // getLastChild(int,boolean):int
-
-    /**
-     * Returns the prev sibling of the given node.
-     * This is post-normalization of Text Nodes.
-     */
-    public int getPrevSibling(int nodeIndex) {
-        return getPrevSibling(nodeIndex, true);
-    }
-
-    /**
-     * Returns the prev sibling of the given node.
-     * @param free True to free sibling index.
-     */
-    public int getPrevSibling(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return -1;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        int type = getChunkIndex(fNodeType, chunk, index);
-        if (type == Node.TEXT_NODE) {
-            do {
-                nodeIndex = getChunkIndex(fNodePrevSib, chunk, index);
-                if (nodeIndex == -1) {
-                    break;
-                }
-                chunk = nodeIndex >> CHUNK_SHIFT;
-                index = nodeIndex & CHUNK_MASK;
-                type = getChunkIndex(fNodeType, chunk, index);
-            } while (type == Node.TEXT_NODE);
-        }
-        else {
-            nodeIndex = getChunkIndex(fNodePrevSib, chunk, index);
-        }
-
-        return nodeIndex;
-
-    } // getPrevSibling(int,boolean):int
-
-    /**
-     * Returns the <i>real</i> prev sibling of the given node,
-     * directly from the data structures. Used by TextImpl#getNodeValue()
-     * to normalize values.
-     */
-    public int getRealPrevSibling(int nodeIndex) {
-        return getRealPrevSibling(nodeIndex, true);
-    }
-
-    /**
-     * Returns the <i>real</i> prev sibling of the given node.
-     * @param free True to free sibling index.
-     */
-    public int getRealPrevSibling(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return -1;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? clearChunkIndex(fNodePrevSib, chunk, index)
-                    : getChunkIndex(fNodePrevSib, chunk, index);
-
-    } // getReadPrevSibling(int,boolean):int
-
-    /**
-     * Returns the index of the element definition in the table
-     * with the specified name index, or -1 if no such definition
-     * exists.
-     */
-    public int lookupElementDefinition(String elementName) {
-
-        if (fNodeCount > 1) {
-
-            // find doctype
-            int docTypeIndex = -1;
-            int nchunk = 0;
-            int nindex = 0;
-            for (int index = getChunkIndex(fNodeLastChild, nchunk, nindex);
-                 index != -1;
-                 index = getChunkIndex(fNodePrevSib, nchunk, nindex)) {
-
-                nchunk = index >> CHUNK_SHIFT;
-                nindex = index  & CHUNK_MASK;
-                if (getChunkIndex(fNodeType, nchunk, nindex) == Node.DOCUMENT_TYPE_NODE) {
-                    docTypeIndex = index;
-                    break;
-                }
-            }
-
-            // find element definition
-            if (docTypeIndex == -1) {
-                return -1;
-            }
-            nchunk = docTypeIndex >> CHUNK_SHIFT;
-            nindex = docTypeIndex & CHUNK_MASK;
-            for (int index = getChunkIndex(fNodeLastChild, nchunk, nindex);
-                 index != -1;
-                 index = getChunkIndex(fNodePrevSib, nchunk, nindex)) {
-
-                nchunk = index >> CHUNK_SHIFT;
-                nindex = index & CHUNK_MASK;
-                if (getChunkValue(fNodeName, nchunk, nindex) == elementName) {
-                    return index;
-                }
-            }
-        }
-
-        return -1;
-
-    } // lookupElementDefinition(String):int
-
-    /** Instantiates the requested node object. */
-    public DeferredNode getNodeObject(int nodeIndex) {
-
-        // is there anything to do?
-        if (nodeIndex == -1) {
-            return null;
-        }
-
-        // get node type
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        int type = getChunkIndex(fNodeType, chunk, index);
-        if (type != Node.TEXT_NODE && type != Node.CDATA_SECTION_NODE) {
-            clearChunkIndex(fNodeType, chunk, index);
-        }
-
-        // create new node
-        DeferredNode node = null;
-        switch (type) {
-
-            //
-            // Standard DOM node types
-            //
-
-            case Node.ATTRIBUTE_NODE: {
-		if (fNamespacesEnabled) {
-		    node = new DeferredAttrNSImpl(this, nodeIndex);
-		} else {
-		    node = new DeferredAttrImpl(this, nodeIndex);
-		}
-                break;
-            }
-
-            case Node.CDATA_SECTION_NODE: {
-                node = new DeferredCDATASectionImpl(this, nodeIndex);
-                break;
-            }
-
-            case Node.COMMENT_NODE: {
-                node = new DeferredCommentImpl(this, nodeIndex);
-                break;
-            }
-
-            // NOTE: Document fragments can never be "fast".
-            //
-            //       The parser will never ask to create a document
-            //       fragment during the parse. Document fragments
-            //       are used by the application *after* the parse.
-            //
-            // case Node.DOCUMENT_FRAGMENT_NODE: { break; }
-            case Node.DOCUMENT_NODE: {
-                // this node is never "fast"
-                node = this;
-                break;
-            }
-
-            case Node.DOCUMENT_TYPE_NODE: {
-                node = new DeferredDocumentTypeImpl(this, nodeIndex);
-                // save the doctype node
-                docType = (DocumentTypeImpl)node;
-                break;
-            }
-
-            case Node.ELEMENT_NODE: {
-
-                if (DEBUG_IDS) {
-                    System.out.println("getNodeObject(ELEMENT_NODE): "+nodeIndex);
-                }
-
-                // create node
-		if (fNamespacesEnabled) {
-		    node = new DeferredElementNSImpl(this, nodeIndex);
-		} else {
-		    node = new DeferredElementImpl(this, nodeIndex);
-		}
-
-                // save the document element node
-                if (docElement == null) {
-                    docElement = (ElementImpl)node;
-                }
-
-                // check to see if this element needs to be
-                // registered for its ID attributes
-                if (fIdElement != null) {
-                    int idIndex = binarySearch(fIdElement, 0,
-                                               fIdCount-1, nodeIndex);
-                    while (idIndex != -1) {
-
-                        if (DEBUG_IDS) {
-                            System.out.println("  id index: "+idIndex);
-                            System.out.println("  fIdName["+idIndex+
-                                               "]: "+fIdName[idIndex]);
-                        }
-
-                        // register ID
-                        String name = fIdName[idIndex];
-                        if (name != null) {
-                            if (DEBUG_IDS) {
-                                System.out.println("  name: "+name);
-                                System.out.print("getNodeObject()#");
-                            }
-                            putIdentifier0(name, (Element)node);
-                            fIdName[idIndex] = null;
-                        }
-
-                        // continue if there are more IDs for
-                        // this element
-                        if (idIndex + 1 < fIdCount &&
-                            fIdElement[idIndex + 1] == nodeIndex) {
-                            idIndex++;
-                        }
-                        else {
-                            idIndex = -1;
-                        }
-                    }
-                }
-                break;
-            }
-
-            case Node.ENTITY_NODE: {
-                node = new DeferredEntityImpl(this, nodeIndex);
-                break;
-            }
-
-            case Node.ENTITY_REFERENCE_NODE: {
-                node = new DeferredEntityReferenceImpl(this, nodeIndex);
-                break;
-            }
-
-            case Node.NOTATION_NODE: {
-                node = new DeferredNotationImpl(this, nodeIndex);
-                break;
-            }
-
-            case Node.PROCESSING_INSTRUCTION_NODE: {
-                node = new DeferredProcessingInstructionImpl(this, nodeIndex);
-                break;
-            }
-
-            case Node.TEXT_NODE: {
-                node = new DeferredTextImpl(this, nodeIndex);
-                break;
-            }
-
-            //
-            // non-standard DOM node types
-            //
-
-            case NodeImpl.ELEMENT_DEFINITION_NODE: {
-                node = new DeferredElementDefinitionImpl(this, nodeIndex);
-                break;
-            }
-
-            default: {
-                throw new IllegalArgumentException("type: "+type);
-            }
-
-        } // switch node type
-
-        // store and return
-        if (node != null) {
-            return node;
-        }
-
-        // error
-        throw new IllegalArgumentException();
-
-    } // createNodeObject(int):Node
-
-    /** Returns the name of the given node. */
-    public String getNodeName(int nodeIndex) {
-        return getNodeName(nodeIndex, true);
-    } // getNodeNameString(int):String
-
-    /**
-     * Returns the name of the given node.
-     * @param free True to free the string index.
-     */
-    public String getNodeName(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return null;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? clearChunkValue(fNodeName, chunk, index)
-                    : getChunkValue(fNodeName, chunk, index);
-
-    } // getNodeName(int,boolean):String
-
-    /** Returns the real value of the given node. */
-    public String getNodeValueString(int nodeIndex) {
-        return getNodeValueString(nodeIndex, true);
-    } // getNodeValueString(int):String
-
-    /**
-     * Returns the real value of the given node.
-     * @param free True to free the string index.
-     */
-    public String getNodeValueString(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return null;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        String value = free ? clearChunkValue(fNodeValue, chunk, index)
-                            : getChunkValue(fNodeValue, chunk, index);
-        if (value == null) {
-            return null;
-        }
-
-        int type  = getChunkIndex(fNodeType, chunk, index);
-        if (type == Node.TEXT_NODE) {
-            int prevSib = getRealPrevSibling(nodeIndex);
-            if (prevSib != -1 &&
-                getNodeType(prevSib, false) == Node.TEXT_NODE) {
-                // append data that is stored in fNodeValue
-                // REVISIT: for text nodes it works differently than for CDATA
-                //          nodes.
-                fStrChunks.addElement(value);
-                do {
-                    // go in reverse order: find last child, then
-                    // its previous sibling, etc
-                    chunk = prevSib >> CHUNK_SHIFT;
-                    index = prevSib & CHUNK_MASK;
-                    value = getChunkValue(fNodeValue, chunk, index);
-                    fStrChunks.addElement(value);
-                    prevSib = getChunkIndex(fNodePrevSib, chunk, index);
-                    if (prevSib == -1) {
-                        break;
-                    }
-                } while (getNodeType(prevSib, false) == Node.TEXT_NODE);
-                
-                int chunkCount = fStrChunks.size();
-
-                // add to the buffer in the correct order.
-                for (int i = chunkCount - 1; i >= 0; i--) {                                                               
-                    fBufferStr.append((String)fStrChunks.elementAt(i));
-                }
-                
-                value = fBufferStr.toString();
-                fStrChunks.removeAllElements();
-                fBufferStr.setLength(0);
-                return value;
-            }
-        }
-        else if (type == Node.CDATA_SECTION_NODE) {
-            // append data that is stored in fNodeValue
-            fBufferStr.append(value);
-            // find if any other data stored in children
-            int child = getLastChild(nodeIndex, false);
-            if (child !=-1) {
-                while (child !=-1) {
-                    // go in reverse order: find last child, then
-                    // its previous sibling, etc
-                   chunk = child >> CHUNK_SHIFT;
-                    index = child & CHUNK_MASK;
-                    value = getChunkValue(fNodeValue, chunk, index);
-                    fStrChunks.addElement(value);
-                    child = getChunkIndex(fNodePrevSib, chunk, index);
-                }
-                // add to the buffer in the correct order.
-                for (int i=fStrChunks.size()-1; i>=0; i--) {                                                               
-                     fBufferStr.append((String)fStrChunks.elementAt(i));
-                }
-                                                         
-                value = fBufferStr.toString();
-                fStrChunks.setSize(0);
-                fBufferStr.setLength(0);
-                return value;
-            }
-        }
-
-        return value;
-
-    } // getNodeValueString(int,boolean):String
-
-    /**
-     * Returns the value of the given node.
-     */
-    public String getNodeValue(int nodeIndex) {
-        return getNodeValue(nodeIndex, true);
-    }
-
-    /**
-     * Returns the value of the given node.
-     * @param free True to free the value index.
-     */
-    public String getNodeValue(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return null;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? clearChunkValue(fNodeValue, chunk, index)
-                    : getChunkValue(fNodeValue, chunk, index);
-
-    } // getNodeValue(int,boolean):String
-
-    /**
-     * Returns the extra info of the given node.
-     * Used by AttrImpl to store specified value (1 == true).
-     */
-    public int getNodeExtra(int nodeIndex) {
-        return getNodeExtra(nodeIndex, true);
-    }
-
-    /**
-     * Returns the extra info of the given node.
-     * @param free True to free the value index.
-     */
-    public int getNodeExtra(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return -1;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? clearChunkIndex(fNodeExtra, chunk, index)
-                    : getChunkIndex(fNodeExtra, chunk, index);
-
-    } // getNodeExtra(int,boolean):int
-
-    /** Returns the type of the given node. */
-    public short getNodeType(int nodeIndex) {
-        return getNodeType(nodeIndex, true);
-    }
-
-    /**
-     * Returns the type of the given node.
-     * @param free True to free type index.
-     */
-    public short getNodeType(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return -1;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? (short)clearChunkIndex(fNodeType, chunk, index)
-                    : (short)getChunkIndex(fNodeType, chunk, index);
-
-    } // getNodeType(int):int
-
-    /** Returns the attribute value of the given name. */
-    public String getAttribute(int elemIndex, String name) {
-        if (elemIndex == -1 || name == null) {
-            return null;
-        }
-        int echunk = elemIndex >> CHUNK_SHIFT;
-        int eindex = elemIndex & CHUNK_MASK;
-        int attrIndex = getChunkIndex(fNodeExtra, echunk, eindex);
-        while (attrIndex != -1) {
-            int achunk = attrIndex >> CHUNK_SHIFT;
-            int aindex = attrIndex & CHUNK_MASK;
-            if (getChunkValue(fNodeName, achunk, aindex) == name) {
-                return getChunkValue(fNodeValue, achunk, aindex);
-            }
-            attrIndex = getChunkIndex(fNodePrevSib, achunk, aindex);
-        }
-        return null;
-    }
-
-    /** Returns the URI of the given node. */
-    public String getNodeURI(int nodeIndex) {
-        return getNodeURI(nodeIndex, true);
-    }
-
-    /**
-     * Returns the URI of the given node.
-     * @param free True to free URI index.
-     */
-    public String getNodeURI(int nodeIndex, boolean free) {
-
-        if (nodeIndex == -1) {
-            return null;
-        }
-
-        int chunk = nodeIndex >> CHUNK_SHIFT;
-        int index = nodeIndex & CHUNK_MASK;
-        return free ? clearChunkValue(fNodeURI, chunk, index)
-                    : getChunkValue(fNodeURI, chunk, index);
-
-    } // getNodeURI(int,int):String
-
-    // identifier maintenance
-
-    /** Registers an identifier name with a specified element node. */
-    public void putIdentifier(String name, int elementNodeIndex) {
-
-        if (DEBUG_IDS) {
-            System.out.println("putIdentifier(" + name + ", "
-                               + elementNodeIndex + ')' + " // " +
-                               getChunkValue(fNodeName,
-                                             elementNodeIndex >> CHUNK_SHIFT,
-                                             elementNodeIndex & CHUNK_MASK));
-        }
-
-        // initialize arrays
-        if (fIdName == null) {
-            fIdName    = new String[64];
-            fIdElement = new int[64];
-        }
-
-        // resize arrays
-        if (fIdCount == fIdName.length) {
-            String idName[] = new String[fIdCount * 2];
-            System.arraycopy(fIdName, 0, idName, 0, fIdCount);
-            fIdName = idName;
-
-            int idElement[] = new int[idName.length];
-            System.arraycopy(fIdElement, 0, idElement, 0, fIdCount);
-            fIdElement = idElement;
-        }
-
-        // store identifier
-        fIdName[fIdCount] = name;
-        fIdElement[fIdCount] = elementNodeIndex;
-        fIdCount++;
-
-    } // putIdentifier(String,int)
-
-    //
-    // DEBUG
-    //
-
-    /** Prints out the tables. */
-    public void print() {
-
-        if (DEBUG_PRINT_REF_COUNTS) {
-            System.out.print("num\t");
-            System.out.print("type\t");
-            System.out.print("name\t");
-            System.out.print("val\t");
-            System.out.print("par\t");
-            System.out.print("lch\t");
-            System.out.print("psib");
-            System.out.println();
-            for (int i = 0; i < fNodeType.length; i++) {
-                if (fNodeType[i] != null) {
-                    // separator
-                    System.out.print("--------");
-                    System.out.print("--------");
-                    System.out.print("--------");
-                    System.out.print("--------");
-                    System.out.print("--------");
-                    System.out.print("--------");
-                    System.out.print("--------");
-                    System.out.println();
-
-                    // ref count
-                    System.out.print(i);
-                    System.out.print('\t');
-                    switch (fNodeType[i][CHUNK_SIZE]) {
-                        case DocumentImpl.ELEMENT_DEFINITION_NODE: { System.out.print("EDef"); break; }
-                        case Node.DOCUMENT_NODE: { System.out.print("Doc"); break; }
-                        case Node.DOCUMENT_TYPE_NODE: { System.out.print("DType"); break; }
-                        case Node.COMMENT_NODE: { System.out.print("Com"); break; }
-                        case Node.PROCESSING_INSTRUCTION_NODE: { System.out.print("PI"); break; }
-                        case Node.ELEMENT_NODE: { System.out.print("Elem"); break; }
-                        case Node.ENTITY_NODE: { System.out.print("Ent"); break; }
-                        case Node.ENTITY_REFERENCE_NODE: { System.out.print("ERef"); break; }
-                        case Node.TEXT_NODE: { System.out.print("Text"); break; }
-                        case Node.ATTRIBUTE_NODE: { System.out.print("Attr"); break; }
-                        default: { System.out.print("?"+fNodeType[i][CHUNK_SIZE]); }
-                    }
-                    System.out.print('\t');
-                    System.out.print(fNodeName[i][CHUNK_SIZE]);
-                    System.out.print('\t');
-                    System.out.print(fNodeValue[i][CHUNK_SIZE]);
-                    System.out.print('\t');
-                    System.out.print(fNodeURI[i][CHUNK_SIZE]);
-                    System.out.print('\t');
-                    System.out.print(fNodeParent[i][CHUNK_SIZE]);
-                    System.out.print('\t');
-                    System.out.print(fNodeLastChild[i][CHUNK_SIZE]);
-                    System.out.print('\t');
-                    System.out.print(fNodePrevSib[i][CHUNK_SIZE]);
-                    System.out.print('\t');
-                    System.out.print(fNodeExtra[i][CHUNK_SIZE]);
-                    System.out.println();
-                }
-            }
-        }
-
-        if (DEBUG_PRINT_TABLES) {
-            // This assumes that the document is small
-            System.out.println("# start table");
-            for (int i = 0; i < fNodeCount; i++) {
-                int chunk = i >> CHUNK_SHIFT;
-                int index = i & CHUNK_MASK;
-                if (i % 10 == 0) {
-                    System.out.print("num\t");
-                    System.out.print("type\t");
-                    System.out.print("name\t");
-                    System.out.print("val\t");
-                    System.out.print("uri\t");
-                    System.out.print("par\t");
-                    System.out.print("lch\t");
-                    System.out.print("psib\t");
-                    System.out.print("xtra");
-                    System.out.println();
-                }
-                System.out.print(i);
-                System.out.print('\t');
-                switch (getChunkIndex(fNodeType, chunk, index)) {
-                    case DocumentImpl.ELEMENT_DEFINITION_NODE: { System.out.print("EDef"); break; }
-                    case Node.DOCUMENT_NODE: { System.out.print("Doc"); break; }
-                    case Node.DOCUMENT_TYPE_NODE: { System.out.print("DType"); break; }
-                    case Node.COMMENT_NODE: { System.out.print("Com"); break; }
-                    case Node.PROCESSING_INSTRUCTION_NODE: { System.out.print("PI"); break; }
-                    case Node.ELEMENT_NODE: { System.out.print("Elem"); break; }
-                    case Node.ENTITY_NODE: { System.out.print("Ent"); break; }
-                    case Node.ENTITY_REFERENCE_NODE: { System.out.print("ERef"); break; }
-                    case Node.TEXT_NODE: { System.out.print("Text"); break; }
-                    case Node.ATTRIBUTE_NODE: { System.out.print("Attr"); break; }
-                    default: { System.out.print("?"+getChunkIndex(fNodeType, chunk, index)); }
-                }
-                System.out.print('\t');
-                System.out.print(getChunkValue(fNodeName, chunk, index));
-                System.out.print('\t');
-                System.out.print(getChunkValue(fNodeValue, chunk, index));
-                System.out.print('\t');
-                System.out.print(getChunkValue(fNodeURI, chunk, index));
-                System.out.print('\t');
-                System.out.print(getChunkIndex(fNodeParent, chunk, index));
-                System.out.print('\t');
-                System.out.print(getChunkIndex(fNodeLastChild, chunk, index));
-                System.out.print('\t');
-                System.out.print(getChunkIndex(fNodePrevSib, chunk, index));
-                System.out.print('\t');
-                System.out.print(getChunkIndex(fNodeExtra, chunk, index));
-                System.out.println();
-            }
-            System.out.println("# end table");
-        }
-
-    } // print()
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return 0;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the node's data. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff up enough nodes to fill identifiers hash
-        if (fIdElement != null) {
-
-            // REVISIT: There has to be a more efficient way of
-            //          doing this. But keep in mind that the
-            //          tree can have been altered and re-ordered
-            //          before all of the element nodes with ID
-            //          attributes have been registered. For now
-            //          this is reasonable and safe. -Ac
-
-            IntVector path = new IntVector();
-            for (int i = 0; i < fIdCount; i++) {
-
-                // ignore if it's already been registered
-                int elementNodeIndex = fIdElement[i];
-                String idName      = fIdName[i];
-                if (idName == null) {
-                    continue;
-                }
-
-                // find path from this element to the root
-                path.removeAllElements();
-                int index = elementNodeIndex;
-                do {
-                    path.addElement(index);
-                    int pchunk = index >> CHUNK_SHIFT;
-                    int pindex = index & CHUNK_MASK;
-                    index = getChunkIndex(fNodeParent, pchunk, pindex);
-                } while (index != -1);
-
-                // Traverse path (backwards), fluffing the elements
-                // along the way. When this loop finishes, "place"
-                // will contain the reference to the element node
-                // we're interested in. -Ac
-                Node place = this;
-                for (int j = path.size() - 2; j >= 0; j--) {
-                    index = path.elementAt(j);
-                    Node child = place.getLastChild();
-                    while (child != null) {
-                        if (child instanceof DeferredNode) {
-                            int nodeIndex =
-                                ((DeferredNode)child).getNodeIndex();
-                            if (nodeIndex == index) {
-                                place = child;
-                                break;
-                            }
-                        }
-                        child = child.getPreviousSibling();
-                    }
-                }
-
-                // register the element
-                Element element = (Element)place;
-                putIdentifier0(idName, element);
-                fIdName[i] = null;
-
-                // see if there are more IDs on this element
-                while (i + 1 < fIdCount &&
-                    fIdElement[i + 1] == elementNodeIndex) {
-                    idName = fIdName[++i];
-                    if (idName == null) {
-                        continue;
-                    }
-                    putIdentifier0(idName, element);
-                }
-            }
-
-        } // if identifiers
-
-    } // synchronizeData()
-
-    /**
-     * Synchronizes the node's children with the internal structure.
-     * Fluffing the children at once solves a lot of work to keep
-     * the two structures in sync. The problem gets worse when
-     * editing the tree -- this makes it a lot easier.
-     */
-    protected void synchronizeChildren() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-            /*
-             * when we have elements with IDs this method is being recursively
-             * called from synchronizeData, in which case we've already gone
-             * through the following and we can now simply stop here.
-             */
-            if (!needsSyncChildren()) {
-                return;
-            }
-        }
-
-        // we don't want to generate any event for this so turn them off
-        boolean orig = mutationEvents;
-        mutationEvents = false;
-
-        // no need to sync in the future
-        needsSyncChildren(false);
-
-        getNodeType(0);
-
-        // create children and link them as siblings
-        ChildNode first = null;
-        ChildNode last = null;
-        for (int index = getLastChild(0);
-             index != -1;
-             index = getPrevSibling(index)) {
-
-            ChildNode node = (ChildNode)getNodeObject(index);
-            if (last == null) {
-                last = node;
-            }
-            else {
-                first.previousSibling = node;
-            }
-            node.ownerNode = this;
-            node.isOwned(true);
-            node.nextSibling = first;
-            first = node;
-
-            // save doctype and document type
-            int type = node.getNodeType();
-            if (type == Node.ELEMENT_NODE) {
-                docElement = (ElementImpl)node;
-            }
-            else if (type == Node.DOCUMENT_TYPE_NODE) {
-                docType = (DocumentTypeImpl)node;
-            }
-        }
-
-        if (first != null) {
-            firstChild = first;
-            first.isFirstChild(true);
-            lastChild(last);
-        }
-
-        // set mutation events flag back to its original value
-        mutationEvents = orig;
-
-    } // synchronizeChildren()
-
-    /**
-     * Synchronizes the node's children with the internal structure.
-     * Fluffing the children at once solves a lot of work to keep
-     * the two structures in sync. The problem gets worse when
-     * editing the tree -- this makes it a lot easier.
-     * This is not directly used in this class but this method is
-     * here so that it can be shared by all deferred subclasses of AttrImpl.
-     */
-    protected final void synchronizeChildren(AttrImpl a, int nodeIndex) {
-
-        // we don't want to generate any event for this so turn them off
-        boolean orig = getMutationEvents();
-        setMutationEvents(false);
-
-        // no need to sync in the future
-        a.needsSyncChildren(false);
-
-        // create children and link them as siblings or simply store the value
-        // as a String if all we have is one piece of text
-        int last = getLastChild(nodeIndex);
-        int prev = getPrevSibling(last);
-        if (prev == -1) {
-            a.value = getNodeValueString(nodeIndex);
-            a.hasStringValue(true);
-        }
-        else {
-            ChildNode firstNode = null;
-            ChildNode lastNode = null;
-            for (int index = last; index != -1;
-                 index = getPrevSibling(index)) {
-
-                ChildNode node = (ChildNode) getNodeObject(index);
-                if (lastNode == null) {
-                    lastNode = node;
-                }
-                else {
-                    firstNode.previousSibling = node;
-                }
-                node.ownerNode = a;
-                node.isOwned(true);
-                node.nextSibling = firstNode;
-                firstNode = node;
-            }
-            if (lastNode != null) {
-                a.value = firstNode; // firstChild = firstNode
-                firstNode.isFirstChild(true);
-                a.lastChild(lastNode);
-            }
-            a.hasStringValue(false);
-        }
-
-        // set mutation events flag back to its original value
-        setMutationEvents(orig);
-
-    } // synchronizeChildren(AttrImpl,int):void
-
-
-    /**
-     * Synchronizes the node's children with the internal structure.
-     * Fluffing the children at once solves a lot of work to keep
-     * the two structures in sync. The problem gets worse when
-     * editing the tree -- this makes it a lot easier.
-     * This is not directly used in this class but this method is
-     * here so that it can be shared by all deferred subclasses of ParentNode.
-     */
-    protected final void synchronizeChildren(ParentNode p, int nodeIndex) {
-
-        // we don't want to generate any event for this so turn them off
-        boolean orig = getMutationEvents();
-        setMutationEvents(false);
-
-        // no need to sync in the future
-        p.needsSyncChildren(false);
-
-        // create children and link them as siblings
-        ChildNode firstNode = null;
-        ChildNode lastNode = null;
-        for (int index = getLastChild(nodeIndex);
-             index != -1;
-             index = getPrevSibling(index)) {
-
-            ChildNode node = (ChildNode) getNodeObject(index);
-            if (lastNode == null) {
-                lastNode = node;
-            }
-            else {
-                firstNode.previousSibling = node;
-            }
-            node.ownerNode = p;
-            node.isOwned(true);
-            node.nextSibling = firstNode;
-            firstNode = node;
-        }
-        if (lastNode != null) {
-            p.firstChild = firstNode;
-            firstNode.isFirstChild(true);
-            p.lastChild(lastNode);
-        }
-
-        // set mutation events flag back to its original value
-        setMutationEvents(orig);
-
-    } // synchronizeChildren(ParentNode,int):void
-
-    // utility methods
-
-    /** Ensures that the internal tables are large enough. */
-    protected boolean ensureCapacity(int chunk, int index) {
-
-        // create buffers
-        if (fNodeType == null) {
-            fNodeType       = new int[INITIAL_CHUNK_COUNT][];
-            fNodeName       = new Object[INITIAL_CHUNK_COUNT][];
-            fNodeValue      = new Object[INITIAL_CHUNK_COUNT][];
-            fNodeParent     = new int[INITIAL_CHUNK_COUNT][];
-            fNodeLastChild  = new int[INITIAL_CHUNK_COUNT][];
-            fNodePrevSib    = new int[INITIAL_CHUNK_COUNT][];
-            fNodeURI        = new Object[INITIAL_CHUNK_COUNT][];
-            fNodeExtra      = new int[INITIAL_CHUNK_COUNT][];
-        }
-
-        // return true if table is already big enough
-        try {
-            return fNodeType[chunk][index] != 0;
-        }
-
-        // resize the tables
-        catch (ArrayIndexOutOfBoundsException ex) {
-            int newsize = chunk * 2;
-
-            int[][] newArray = new int[newsize][];
-            System.arraycopy(fNodeType, 0, newArray, 0, chunk);
-            fNodeType = newArray;
-
-            Object[][] newStrArray = new Object[newsize][];
-            System.arraycopy(fNodeName, 0, newStrArray, 0, chunk);
-            fNodeName = newStrArray;
-
-            newStrArray = new Object[newsize][];
-            System.arraycopy(fNodeValue, 0, newStrArray, 0, chunk);
-            fNodeValue = newStrArray;
-
-            newArray = new int[newsize][];
-            System.arraycopy(fNodeParent, 0, newArray, 0, chunk);
-            fNodeParent = newArray;
-
-            newArray = new int[newsize][];
-            System.arraycopy(fNodeLastChild, 0, newArray, 0, chunk);
-            fNodeLastChild = newArray;
-
-            newArray = new int[newsize][];
-            System.arraycopy(fNodePrevSib, 0, newArray, 0, chunk);
-            fNodePrevSib = newArray;
-
-            newStrArray = new Object[newsize][];
-            System.arraycopy(fNodeURI, 0, newStrArray, 0, chunk);
-            fNodeURI = newStrArray;
-
-            newArray = new int[newsize][];
-            System.arraycopy(fNodeExtra, 0, newArray, 0, chunk);
-            fNodeExtra = newArray;
-        }
-
-        catch (NullPointerException ex) {
-            // ignore
-        }
-
-        // create chunks
-        createChunk(fNodeType, chunk);
-        createChunk(fNodeName, chunk);
-        createChunk(fNodeValue, chunk);
-        createChunk(fNodeParent, chunk);
-        createChunk(fNodeLastChild, chunk);
-        createChunk(fNodePrevSib, chunk);
-        createChunk(fNodeURI, chunk);
-        createChunk(fNodeExtra, chunk);
-
-        // success
-        return true;
-
-    } // ensureCapacity(int,int):boolean
-
-    /** Creates a node of the specified type. */
-    protected int createNode(short nodeType) {
-
-        // ensure tables are large enough
-        int chunk = fNodeCount >> CHUNK_SHIFT;
-        int index = fNodeCount & CHUNK_MASK;
-        ensureCapacity(chunk, index);
-
-        // initialize node
-        setChunkIndex(fNodeType, nodeType, chunk, index);
-
-        // return node index number
-        return fNodeCount++;
-
-    } // createNode(short):int
-
-    /**
-     * Performs a binary search for a target value in an array of
-     * values. The array of values must be in ascending sorted order
-     * before calling this method and all array values must be
-     * non-negative.
-     *
-     * @param values  The array of values to search.
-     * @param start   The starting offset of the search.
-     * @param end     The ending offset of the search.
-     * @param target  The target value.
-     *
-     * @return This function will return the <i>first</i> occurrence
-     *         of the target value, or -1 if the target value cannot
-     *         be found.
-     */
-    protected static int binarySearch(final int values[],
-                                      int start, int end, int target) {
-
-        if (DEBUG_IDS) {
-            System.out.println("binarySearch(), target: "+target);
-        }
-
-        // look for target value
-        while (start <= end) {
-
-            // is this the one we're looking for?
-            int middle = (start + end) / 2;
-            int value  = values[middle];
-            if (DEBUG_IDS) {
-                System.out.print("  value: "+value+", target: "+target+" // ");
-                print(values, start, end, middle, target);
-            }
-            if (value == target) {
-                while (middle > 0 && values[middle - 1] == target) {
-                    middle--;
-                }
-                if (DEBUG_IDS) {
-                    System.out.println("FOUND AT "+middle);
-                }
-                return middle;
-            }
-
-            // is this point higher or lower?
-            if (value > target) {
-                end = middle - 1;
-            }
-            else {
-                start = middle + 1;
-            }
-
-        } // while
-
-        // not found
-        if (DEBUG_IDS) {
-            System.out.println("NOT FOUND!");
-        }
-        return -1;
-
-    } // binarySearch(int[],int,int,int):int
-
-    //
-    // Private methods
-    //
-
-    /** Creates the specified chunk in the given array of chunks. */
-    private final void createChunk(int data[][], int chunk) {
-        data[chunk] = new int[CHUNK_SIZE + 1];
-        for (int i = 0; i < CHUNK_SIZE; i++) {
-            data[chunk][i] = -1;
-        }
-    }
-
-    class RefCount {
-        int fCount;
-    }
-
-    private final void createChunk(Object data[][], int chunk) {
-        data[chunk] = new Object[CHUNK_SIZE + 1];
-        data[chunk][CHUNK_SIZE] = new RefCount();
-    }
-
-    /**
-     * Sets the specified value in the given of data at the chunk and index.
-     *
-     * @return Returns the old value.
-     */
-    private final int setChunkIndex(int data[][], int value,
-                                    int chunk, int index) {
-        if (value == -1) {
-            return clearChunkIndex(data, chunk, index);
-        }
-        int ovalue = data[chunk][index];
-        if (ovalue == -1) {
-            data[chunk][CHUNK_SIZE]++;
-        }
-        data[chunk][index] = value;
-        return ovalue;
-    }
-    private final String setChunkValue(Object data[][], Object value,
-                                       int chunk, int index) {
-        if (value == null) {
-            return clearChunkValue(data, chunk, index);
-        }
-        String ovalue = (String) data[chunk][index];
-        if (ovalue == null) {
-            RefCount c = (RefCount) data[chunk][CHUNK_SIZE];
-            c.fCount++;
-        }
-        data[chunk][index] = value;
-        return ovalue;
-    }
-
-    /**
-     * Returns the specified value in the given data at the chunk and index.
-     */
-    private final int getChunkIndex(int data[][], int chunk, int index) {
-        return data[chunk] != null ? data[chunk][index] : -1;
-    }
-    private final String getChunkValue(Object data[][], int chunk, int index) {
-        return data[chunk] != null ? (String) data[chunk][index] : null;
-    }
-
-    /**
-     * Clears the specified value in the given data at the chunk and index.
-     * Note that this method will clear the given chunk if the reference
-     * count becomes zero.
-     *
-     * @return Returns the old value.
-     */
-    private final int clearChunkIndex(int data[][], int chunk, int index) {
-        int value = data[chunk] != null ? data[chunk][index] : -1;
-        if (value != -1) {
-            data[chunk][CHUNK_SIZE]--;
-            data[chunk][index] = -1;
-            if (data[chunk][CHUNK_SIZE] == 0) {
-                data[chunk] = null;
-            }
-        }
-        return value;
-    }
-    private final String clearChunkValue(Object data[][],
-                                         int chunk, int index) {
-        String value = data[chunk] != null ? (String)data[chunk][index] : null;
-        if (value != null) {
-            data[chunk][index] = null;
-            RefCount c = (RefCount) data[chunk][CHUNK_SIZE];
-            c.fCount--;
-            if (c.fCount == 0) {
-                data[chunk] = null;
-            }
-        }
-        return value;
-    }
-
-    /**
-     * This version of putIdentifier is needed to avoid fluffing
-     * all of the paths to ID attributes when a node object is
-     * created that contains an ID attribute.
-     */
-    private final void putIdentifier0(String idName, Element element) {
-
-        if (DEBUG_IDS) {
-            System.out.println("putIdentifier0("+
-                               idName+", "+
-                               element+')');
-        }
-
-        // create hashtable
-        if (identifiers == null) {
-            identifiers = new java.util.Hashtable();
-        }
-
-        // save ID and its associated element
-        identifiers.put(idName, element);
-
-    } // putIdentifier0(String,Element)
-
-    /** Prints the ID array. */
-    private static void print(int values[], int start, int end,
-                              int middle, int target) {
-
-        if (DEBUG_IDS) {
-            System.out.print(start);
-            System.out.print(" [");
-            for (int i = start; i < end; i++) {
-                if (middle == i) {
-                    System.out.print("!");
-                }
-                System.out.print(values[i]);
-                if (values[i] == target) {
-                    System.out.print("*");
-                }
-                if (i < end - 1) {
-                    System.out.print(" ");
-                }
-            }
-            System.out.println("] "+end);
-        }
-
-    } // print(int[],int,int,int,int)
-
-    //
-    // Classes
-    //
-
-    /**
-     * A simple integer vector.
-     */
-    static class IntVector {
-
-        //
-        // Data
-        //
-
-        /** Data. */
-        private int data[];
-
-        /** Size. */
-        private int size;
-
-        //
-        // Public methods
-        //
-
-        /** Returns the length of this vector. */
-        public int size() {
-            return size;
-        }
-
-        /** Returns the element at the specified index. */
-        public int elementAt(int index) {
-            return data[index];
-        }
-
-        /** Appends an element to the end of the vector. */
-        public void addElement(int element) {
-            ensureCapacity(size + 1);
-            data[size++] = element;
-        }
-
-        /** Clears the vector. */
-        public void removeAllElements() {
-            size = 0;
-        }
-
-        //
-        // Private methods
-        //
-
-        /** Makes sure that there is enough storage. */
-        private void ensureCapacity(int newsize) {
-
-            if (data == null) {
-                data = new int[newsize + 15];
-            }
-            else if (newsize > data.length) {
-                int newdata[] = new int[newsize + 15];
-                System.arraycopy(data, 0, newdata, 0, data.length);
-                data = newdata;
-            }
-
-        } // ensureCapacity(int)
-
-    } // class IntVector
-
-} // class DeferredDocumentImpl
diff --git a/src/org/apache/xerces/dom/DeferredDocumentTypeImpl.java b/src/org/apache/xerces/dom/DeferredDocumentTypeImpl.java
deleted file mode 100644
index bf5842d..0000000
--- a/src/org/apache/xerces/dom/DeferredDocumentTypeImpl.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Node;
-
-/**
- * This class represents a Document Type <em>declaraction</em> in
- * the document itself, <em>not</em> a Document Type Definition (DTD).
- * An XML document may (or may not) have such a reference.
- * <P>
- * DocumentType is an Extended DOM feature, used in XML documents but
- * not in HTML.
- * <P>
- * Note that Entities and Notations are no longer children of the
- * DocumentType, but are parentless nodes hung only in their
- * appropriate NamedNodeMaps.
- * <P>
- * This area is UNDERSPECIFIED IN REC-DOM-Level-1-19981001
- * Most notably, absolutely no provision was made for storing
- * and using Element and Attribute information. Nor was the linkage
- * between Entities and Entity References nailed down solidly.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredDocumentTypeImpl
-    extends DocumentTypeImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -2172579663227313509L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here.
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredDocumentTypeImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-        needsSyncChildren(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument;
-        name = ownerDocument.getNodeName(fNodeIndex);
-
-        // public and system ids
-        publicID = ownerDocument.getNodeValue(fNodeIndex);
-        systemID = ownerDocument.getNodeURI(fNodeIndex);
-        int extraDataIndex = ownerDocument.getNodeExtra(fNodeIndex);
-        internalSubset = ownerDocument.getNodeValue(extraDataIndex);
-    } // synchronizeData()
-
-    /** Synchronizes the entities, notations, and elements. */
-    protected void synchronizeChildren() {
-        
-        // we don't want to generate any event for this so turn them off
-        boolean orig = ownerDocument().getMutationEvents();
-        ownerDocument().setMutationEvents(false);
-
-        // no need to synchronize again
-        needsSyncChildren(false);
-
-        // create new node maps
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument;
-
-        entities  = new NamedNodeMapImpl(this);
-        notations = new NamedNodeMapImpl(this);
-        elements  = new NamedNodeMapImpl(this);
-
-        // fill node maps
-        DeferredNode last = null;
-        for (int index = ownerDocument.getLastChild(fNodeIndex);
-            index != -1;
-            index = ownerDocument.getPrevSibling(index)) {
-
-            DeferredNode node = ownerDocument.getNodeObject(index);
-            int type = node.getNodeType();
-            switch (type) {
-
-                // internal, external, and unparsed entities
-                case Node.ENTITY_NODE: {
-                    entities.setNamedItem(node);
-                    break;
-                }
-
-                // notations
-                case Node.NOTATION_NODE: {
-                    notations.setNamedItem(node);
-                    break;
-                }
-
-                // element definitions
-                case NodeImpl.ELEMENT_DEFINITION_NODE: {
-                    elements.setNamedItem(node);
-                    break;
-                }
-
-                // elements
-                case Node.ELEMENT_NODE: {
-                    if (((DocumentImpl)getOwnerDocument()).allowGrammarAccess){
-                        insertBefore(node, last);
-                        last = node;
-                        break;
-                    }
-                }
-
-                // NOTE: Should never get here! -Ac
-                default: {
-                    System.out.println("DeferredDocumentTypeImpl" +
-                                       "#synchronizeInfo: " +
-                                       "node.getNodeType() = " +
-                                       node.getNodeType() +
-                                       ", class = " +
-                                       node.getClass().getName());
-                }
-             }
-        }
-
-        // set mutation events flag back to its original value
-        ownerDocument().setMutationEvents(orig);
-
-        // set entities and notations read_only per DOM spec
-        setReadOnly(true, false);
-
-    } // synchronizeChildren()
-
-} // class DeferredDocumentTypeImpl
diff --git a/src/org/apache/xerces/dom/DeferredElementDefinitionImpl.java b/src/org/apache/xerces/dom/DeferredElementDefinitionImpl.java
deleted file mode 100644
index fa968da..0000000
--- a/src/org/apache/xerces/dom/DeferredElementDefinitionImpl.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Node;
-
-/**
- * NON-DOM CLASS: Describe one of the Elements (and its associated
- * Attributes) defined in this Document Type.
- * <p>
- * I've included this in Level 1 purely as an anchor point for default
- * attributes. In Level 2 it should enable the ChildRule support.
- *
- * @version $Id$
- */
-public class DeferredElementDefinitionImpl 
-    extends ElementDefinitionImpl 
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 6703238199538041591L;
-    
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here.
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredElementDefinitionImpl(DeferredDocumentImpl ownerDocument,
-                                  int nodeIndex) {
-        super(ownerDocument, null);
-        
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-        needsSyncChildren(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument;
-        name = ownerDocument.getNodeName(fNodeIndex);
-
-    } // synchronizeData()
-
-    /** Synchronizes the default attribute values. */
-    protected void synchronizeChildren() {
-
-        // we don't want to generate any event for this so turn them off
-        boolean orig = ownerDocument.getMutationEvents();
-        ownerDocument.setMutationEvents(false);
-
-        // attributes are now synced
-        needsSyncChildren(false);
-
-        // create attributes node map
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument;
-        attributes = new NamedNodeMapImpl(ownerDocument);
-
-        // Default attributes dangle as children of the element
-        // definition "node" in the internal fast table.
-        for (int nodeIndex = ownerDocument.getLastChild(fNodeIndex);
-             nodeIndex != -1;
-             nodeIndex = ownerDocument.getPrevSibling(nodeIndex)) {
-            Node attr = ownerDocument.getNodeObject(nodeIndex);
-            attributes.setNamedItem(attr);
-        }
-
-        // set mutation events flag back to its original value
-        ownerDocument.setMutationEvents(orig);
-
-    } // synchronizeChildren()
-
-} // class DeferredElementDefinitionImpl
diff --git a/src/org/apache/xerces/dom/DeferredElementImpl.java b/src/org/apache/xerces/dom/DeferredElementImpl.java
deleted file mode 100644
index 28fd673..0000000
--- a/src/org/apache/xerces/dom/DeferredElementImpl.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-/*
- * WARNING: because java doesn't support multi-inheritance some code is
- * duplicated. If you're changing this file you probably want to change
- * DeferredElementNSImpl.java at the same time.
- */
-
-package org.apache.xerces.dom;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Elements represent most of the "markup" and structure of the
- * document.  They contain both the data for the element itself
- * (element name and attributes), and any contained nodes, including
- * document text (as children).
- * <P>
- * Elements may have Attributes associated with them; the API for this is
- * defined in Node, but the function is implemented here. In general, XML
- * applications should retrive Attributes as Nodes, since they may contain
- * entity references and hence be a fairly complex sub-tree. HTML users will
- * be dealing with simple string values, and convenience methods are provided
- * to work in terms of Strings.
- * <P>
- * DeferredElementImpl inherits from ElementImpl which does not support
- * Namespaces. DeferredElementNSImpl, which inherits from ElementNSImpl, does.
- * @see DeferredElementNSImpl
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredElementImpl
-    extends ElementImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -7670981133940934842L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here. All
-     * other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredElementImpl(DeferredDocumentImpl ownerDoc, int nodeIndex) {
-        super(ownerDoc, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncChildren(true);
-
-    } // <init>(DocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public final int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected final void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument;
-
-        // we don't want to generate any event for this so turn them off
-        boolean orig = ownerDocument.mutationEvents;
-        ownerDocument.mutationEvents = false;
-
-        name = ownerDocument.getNodeName(fNodeIndex);
-
-        // attributes
-        setupDefaultAttributes();
-        int index = ownerDocument.getNodeExtra(fNodeIndex);
-        if (index != -1) {
-            NamedNodeMap attrs = getAttributes();
-            do {
-                NodeImpl attr = (NodeImpl)ownerDocument.getNodeObject(index);
-                attrs.setNamedItem(attr);
-                index = ownerDocument.getPrevSibling(index);
-            } while (index != -1);
-        }
-
-        // set mutation events flag back to its original value
-        ownerDocument.mutationEvents = orig;
-
-    } // synchronizeData()
-
-    protected final void synchronizeChildren() {
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) ownerDocument();
-        ownerDocument.synchronizeChildren(this, fNodeIndex);
-    } // synchronizeChildren()
-
-} // class DeferredElementImpl
diff --git a/src/org/apache/xerces/dom/DeferredElementNSImpl.java b/src/org/apache/xerces/dom/DeferredElementNSImpl.java
deleted file mode 100644
index c3952a9..0000000
--- a/src/org/apache/xerces/dom/DeferredElementNSImpl.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-/* $Id$ */
-
-/*
- * WARNING: because java doesn't support multi-inheritance some code is
- * duplicated. If you're changing this file you probably want to change
- * DeferredElementImpl.java at the same time.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * DeferredElementNSImpl is to ElementNSImpl, what DeferredElementImpl is to
- * ElementImpl. 
- * @see DeferredElementImpl
- */
-public class DeferredElementNSImpl
-    extends ElementNSImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -5001885145370927385L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here. All
-     * other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredElementNSImpl(DeferredDocumentImpl ownerDoc, int nodeIndex) {
-        super(ownerDoc, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncChildren(true);
-
-    } // <init>(DocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public final int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected final void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) this.ownerDocument;
-
-        // we don't want to generate any event for this so turn them off
-        boolean orig = ownerDocument.mutationEvents;
-        ownerDocument.mutationEvents = false;
-
-        name = ownerDocument.getNodeName(fNodeIndex);
-
-        // extract local part from QName
-        int index = name.indexOf(':');
-        if (index < 0) {
-            localName = name;
-        } 
-        else {
-            localName = name.substring(index + 1);
-        }
-
-	namespaceURI = ownerDocument.getNodeURI(fNodeIndex);
-        // hide the fact that our parser uses an empty string for null
-        if (namespaceURI != null && namespaceURI.length() == 0) {
-            namespaceURI = null;
-        }
-
-        // attributes
-        setupDefaultAttributes();
-        int attrIndex = ownerDocument.getNodeExtra(fNodeIndex);
-        if (attrIndex != -1) {
-            NamedNodeMap attrs = getAttributes();
-            do {
-                NodeImpl attr =
-                    (NodeImpl)ownerDocument.getNodeObject(attrIndex);
-                attrs.setNamedItem(attr);
-                attrIndex = ownerDocument.getPrevSibling(attrIndex);
-            } while (attrIndex != -1);
-        }
-
-        // set mutation events flag back to its original value
-        ownerDocument.mutationEvents = orig;
-
-    } // synchronizeData()
-
-    /**
-     * Synchronizes the node's children with the internal structure.
-     * Fluffing the children at once solves a lot of work to keep
-     * the two structures in sync. The problem gets worse when
-     * editing the tree -- this makes it a lot easier.
-     */
-    protected final void synchronizeChildren() {
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) ownerDocument();
-        ownerDocument.synchronizeChildren(this, fNodeIndex);
-    } // synchronizeChildren()
-
-} // class DeferredElementImpl
diff --git a/src/org/apache/xerces/dom/DeferredEntityImpl.java b/src/org/apache/xerces/dom/DeferredEntityImpl.java
deleted file mode 100644
index 190f7c3..0000000
--- a/src/org/apache/xerces/dom/DeferredEntityImpl.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-
-/**
- * Entity nodes hold the reference data for an XML Entity -- either
- * parsed or unparsed. The nodeName (inherited from Node) will contain
- * the name (if any) of the Entity. Its data will be contained in the
- * Entity's children, in exactly the structure which an
- * EntityReference to this name will present within the document's
- * body.
- * <P>
- * Note that this object models the actual entity, _not_ the entity
- * declaration or the entity reference.
- * <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 EntityReferences in the DOM tree.
- * <P>
- * Quoting the 10/01 DOM Proposal,
- * <BLOCKQUOTE>
- * "The DOM Level 1 does not support editing Entity nodes; if a user
- * wants to make changes to the contents of an Entity, every related
- * EntityReference node has to be replaced in the structure model by
- * a clone of the Entity's contents, and then the desired changes
- * must be made to each of those clones instead. All the
- * descendants of an Entity node are readonly."
- * </BLOCKQUOTE>
- * I'm interpreting this as: It is the parser's responsibilty to call
- * the non-DOM operation setReadOnly(true,true) after it constructs
- * the Entity. Since the DOM explicitly decided not to deal with this,
- * _any_ answer will involve a non-DOM operation, and this is the
- * simplest solution.
- *
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredEntityImpl
-    extends EntityImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 4760180431078941638L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here.
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredEntityImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-        needsSyncChildren(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Synchronize the entity data. This is special because of the way
-     * that the "fast" version stores the information.
-     */
-    protected void synchronizeData() {
-
-        // no need to sychronize again
-        needsSyncData(false);
-
-        // get the node data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument;
-        name = ownerDocument.getNodeName(fNodeIndex);
-
-        // get the entity data
-        publicId    = ownerDocument.getNodeValue(fNodeIndex);
-        systemId    = ownerDocument.getNodeURI(fNodeIndex);
-        int extraDataIndex = ownerDocument.getNodeExtra(fNodeIndex);
-        ownerDocument.getNodeType(extraDataIndex);
-        notationName = ownerDocument.getNodeName(extraDataIndex);
-
-        // DOM Level 3 adding experimental features -el
-        version     = ownerDocument.getNodeValue(extraDataIndex);
-        encoding    = ownerDocument.getNodeURI(extraDataIndex);
-         
-    } // synchronizeData()
-
-    /** Synchronize the children. */
-    protected void synchronizeChildren() {
-
-        // no need to synchronize again
-        needsSyncChildren(false);
-
-        isReadOnly(false);
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) ownerDocument();
-        ownerDocument.synchronizeChildren(this, fNodeIndex);
-        setReadOnly(true, true);
-
-    } // synchronizeChildren()
-
-} // class DeferredEntityImpl
diff --git a/src/org/apache/xerces/dom/DeferredEntityReferenceImpl.java b/src/org/apache/xerces/dom/DeferredEntityReferenceImpl.java
deleted file mode 100644
index a54e204..0000000
--- a/src/org/apache/xerces/dom/DeferredEntityReferenceImpl.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Entity;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * EntityReference models the XML &entityname; syntax, when used for
- * entities defined by the DOM. Entities hardcoded into XML, such as
- * character entities, should instead have been translated into text
- * by the code which generated the DOM tree.
- * <P>
- * An XML processor has the alternative of fully expanding Entities
- * into the normal document tree. If it does so, no EntityReference nodes
- * will appear.
- * <P>
- * Similarly, non-validating XML processors are not required to read
- * or process entity declarations made in the external subset or
- * declared in external parameter entities. Hence, some applications
- * may not make the replacement value available for Parsed Entities 
- * of these types.
- * <P>
- * EntityReference behaves as a read-only node, and the children of 
- * the EntityReference (which reflect those of the Entity, and should
- * also be read-only) give its replacement value, if any. They are 
- * supposed to automagically stay in synch if the DocumentType is 
- * updated with new values for the Entity.
- * <P>
- * The defined behavior makes efficient storage difficult for the DOM
- * implementor. We can't just look aside to the Entity's definition
- * in the DocumentType since those nodes have the wrong parent (unless
- * we can come up with a clever "imaginary parent" mechanism). We
- * must at least appear to clone those children... which raises the
- * issue of keeping the reference synchronized with its parent.
- * This leads me back to the "cached image of centrally defined data"
- * solution, much as I dislike it.
- * <P>
- * For now I have decided, since REC-DOM-Level-1-19980818 doesn't
- * cover this in much detail, that synchronization doesn't have to be
- * considered while the user is deep in the tree. That is, if you're
- * looking within one of the EntityReferennce's children and the Entity
- * changes, you won't be informed; instead, you will continue to access
- * the same object -- which may or may not still be part of the tree.
- * This is the same behavior that obtains elsewhere in the DOM if the
- * subtree you're looking at is deleted from its parent, so it's
- * acceptable here. (If it really bothers folks, we could set things
- * up so deleted subtrees are walked and marked invalid, but that's
- * not part of the DOM's defined behavior.)
- * <P>
- * As a result, only the EntityReference itself has to be aware of
- * changes in the Entity. And it can take advantage of the same
- * structure-change-monitoring code I implemented to support
- * DeepNodeList.
- * 
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredEntityReferenceImpl 
-    extends EntityReferenceImpl 
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 390319091370032223L;
-    
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here. 
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredEntityReferenceImpl(DeferredDocumentImpl ownerDocument,
-                                int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** 
-     * Synchronize the entity data. This is special because of the way
-     * that the "fast" version stores the information.
-     */
-    protected void synchronizeData() {
-
-        // no need to sychronize again
-        needsSyncData(false);
-
-        // get the node data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument;
-        name = ownerDocument.getNodeName(fNodeIndex);
-        
-    } // synchronizeData()
-
-    /** Synchronize the children. */
-    protected void synchronizeChildren() {
-
-        // no need to synchronize again
-        needsSyncChildren(false);
-
-        // get children
-        isReadOnly(false);
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) ownerDocument();
-        ownerDocument.synchronizeChildren(this, fNodeIndex);
-        setReadOnly(true, true);
-
-    } // synchronizeChildren()
-
-} // class DeferredEntityReferenceImpl
diff --git a/src/org/apache/xerces/dom/DeferredNode.java b/src/org/apache/xerces/dom/DeferredNode.java
deleted file mode 100644
index 9ad7c71..0000000
--- a/src/org/apache/xerces/dom/DeferredNode.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Node;
-
-/** 
- * An interface for deferred node object. 
- *
- * @version $Id$
- */
-public interface DeferredNode extends Node {
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex();
-
-} // interface DeferredNode
diff --git a/src/org/apache/xerces/dom/DeferredNotationImpl.java b/src/org/apache/xerces/dom/DeferredNotationImpl.java
deleted file mode 100644
index f29ba1b..0000000
--- a/src/org/apache/xerces/dom/DeferredNotationImpl.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-/**
- * Notations are how the Document Type Description (DTD) records hints
- * about the format of an XML "unparsed entity" -- in other words,
- * non-XML data bound to this document type, which some applications
- * may wish to consult when manipulating the document. A Notation
- * represents a name-value pair, with its nodeName being set to the
- * declared name of the notation.
- * <P>
- * Notations are also used to formally declare the "targets" of
- * Processing Instructions.
- * <P>
- * Note that the Notation's data is non-DOM information; the DOM only
- * records what and where it is.
- * <P>
- * See the XML 1.0 spec, sections 4.7 and 2.6, for more info.
- * <P>
- * Level 1 of the DOM does not support editing Notation contents.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredNotationImpl
-    extends NotationImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 5705337172887990848L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here.
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredNotationImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Synchronizes the data. This is special because of the way
-     * that the "fast" notation stores its information internally.
-     */
-    protected void synchronizeData() {
-
-        // no need to synchronize again
-        needsSyncData(false);
-
-        // name
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl)this.ownerDocument();
-        name = ownerDocument.getNodeName(fNodeIndex);
-
-        ownerDocument.getNodeType(fNodeIndex);
-        // public and system ids
-        publicId = ownerDocument.getNodeValue(fNodeIndex);
-        systemId = ownerDocument.getNodeURI(fNodeIndex);
-
-    } // synchronizeData()
-
-} // class DeferredNotationImpl
diff --git a/src/org/apache/xerces/dom/DeferredProcessingInstructionImpl.java b/src/org/apache/xerces/dom/DeferredProcessingInstructionImpl.java
deleted file mode 100644
index 06567c2..0000000
--- a/src/org/apache/xerces/dom/DeferredProcessingInstructionImpl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-/**
- * Processing Instructions (PIs) permit documents to carry
- * processor-specific information alongside their actual content. PIs
- * are most common in XML, but they are supported in HTML as well.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredProcessingInstructionImpl
-    extends ProcessingInstructionImpl 
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -4643577954293565388L;
-    
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here. 
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredProcessingInstructionImpl(DeferredDocumentImpl ownerDocument,
-                                      int nodeIndex) {
-        super(ownerDocument, null, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // fluff data
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) this.ownerDocument();
-        target  = ownerDocument.getNodeName(fNodeIndex);
-        data = ownerDocument.getNodeValueString(fNodeIndex);
-
-    } // synchronizeData()
-
-} // class DeferredProcessingInstructionImpl
diff --git a/src/org/apache/xerces/dom/DeferredTextImpl.java b/src/org/apache/xerces/dom/DeferredTextImpl.java
deleted file mode 100644
index 6ed4ad4..0000000
--- a/src/org/apache/xerces/dom/DeferredTextImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-/**
- * Text nodes hold the non-markup, non-Entity content of
- * an Element or Attribute.
- * <P>
- * When a document is first made available to the DOM, there is only
- * one Text object for each block of adjacent plain-text. Users (ie,
- * applications) may create multiple adjacent Texts during editing --
- * see {@link org.w3c.dom.Element#normalize} for discussion.
- * <P>
- * Note that CDATASection is a subclass of Text. This is conceptually
- * valid, since they're really just two different ways of quoting
- * characters when they're written out as part of an XML stream.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DeferredTextImpl
-    extends TextImpl
-    implements DeferredNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 2310613872100393425L;
-
-    //
-    // Data
-    //
-
-    /** Node index. */
-    protected transient int fNodeIndex;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * This is the deferred constructor. Only the fNodeIndex is given here.
-     * All other data, can be requested from the ownerDocument via the index.
-     */
-    DeferredTextImpl(DeferredDocumentImpl ownerDocument, int nodeIndex) {
-        super(ownerDocument, null);
-
-        fNodeIndex = nodeIndex;
-        needsSyncData(true);
-
-    } // <init>(DeferredDocumentImpl,int)
-
-    //
-    // DeferredNode methods
-    //
-
-    /** Returns the node index. */
-    public int getNodeIndex() {
-        return fNodeIndex;
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the underlying data. */
-    protected void synchronizeData() {
-
-        // no need for future synchronizations
-        needsSyncData(false);
-
-        // get initial text value
-        DeferredDocumentImpl ownerDocument =
-            (DeferredDocumentImpl) this.ownerDocument();
-        data = ownerDocument.getNodeValueString(fNodeIndex);
-
-        // NOTE: We used to normalize adjacent text node values here.
-        //       This code has moved to the DeferredDocumentImpl
-        //       getNodeValueString() method. -Ac
-
-        // ignorable whitespace
-        isIgnorableWhitespace(ownerDocument.getNodeExtra(fNodeIndex) == 1);
-
-    } // synchronizeData()
-
-} // class DeferredTextImpl
diff --git a/src/org/apache/xerces/dom/DocumentFragmentImpl.java b/src/org/apache/xerces/dom/DocumentFragmentImpl.java
deleted file mode 100644
index f71dab8..0000000
--- a/src/org/apache/xerces/dom/DocumentFragmentImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.Node;
-
-/**
- * DocumentFragment is a "lightweight" or "minimal" Document
- * object. It is very common to want to be able to extract a portion
- * of a document's tree or to create a new fragment of a
- * document. Imagine implementing a user command like cut or
- * rearranging a document by moving fragments around. It is desirable
- * to have an object which can hold such fragments and it is quite
- * natural to use a Node for this purpose. While it is true that a
- * Document object could fulfil this role, a Document object can
- * potentially be a heavyweight object, depending on the underlying
- * implementation... and in DOM Level 1, nodes aren't allowed to cross
- * Document boundaries anyway. What is really needed for this is a
- * very lightweight object.  DocumentFragment is such an object.
- * <P>
- * Furthermore, various operations -- such as inserting nodes as
- * children of another Node -- may take DocumentFragment objects as
- * arguments; this results in all the child nodes of the
- * DocumentFragment being moved to the child list of this node.
- * <P>
- * The children of a DocumentFragment node are zero or more nodes
- * representing the tops of any sub-trees defining the structure of
- * the document.  DocumentFragment do not need to be well-formed XML
- * documents (although they do need to follow the rules imposed upon
- * well-formed XML parsed entities, which can have multiple top
- * nodes). For example, a DocumentFragment might have only one child
- * and that child node could be a Text node. Such a structure model
- * represents neither an HTML document nor a well-formed XML document.
- * <P>
- * When a DocumentFragment is inserted into a Document (or indeed any
- * other Node that may take children) the children of the
- * DocumentFragment and not the DocumentFragment itself are inserted
- * into the Node. This makes the DocumentFragment very useful when the
- * user wishes to create nodes that are siblings; the DocumentFragment
- * acts as the parent of these nodes so that the user can use the
- * standard methods from the Node interface, such as insertBefore()
- * and appendChild().
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DocumentFragmentImpl 
-    extends ParentNode
-    implements DocumentFragment {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -7596449967279236746L;
-    
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public DocumentFragmentImpl(CoreDocumentImpl ownerDoc) {
-        super(ownerDoc);
-    }  
-  
-    /** Constructor for serialization. */
-    public DocumentFragmentImpl() {}
-
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.DOCUMENT_FRAGMENT_NODE;
-    }
-
-    /** Returns the node name. */
-    public String getNodeName() {
-        return "#document-fragment";
-    }
-    
-} // class DocumentFragmentImpl
diff --git a/src/org/apache/xerces/dom/DocumentImpl.java b/src/org/apache/xerces/dom/DocumentImpl.java
deleted file mode 100644
index 6a144ba..0000000
--- a/src/org/apache/xerces/dom/DocumentImpl.java
+++ /dev/null
@@ -1,1364 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Notation;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-import org.w3c.dom.events.DocumentEvent;
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventException;
-import org.w3c.dom.events.EventListener;
-import org.w3c.dom.events.EventTarget;
-import org.w3c.dom.events.MutationEvent;
-import org.w3c.dom.ranges.DocumentRange;
-import org.w3c.dom.ranges.Range;
-import org.w3c.dom.traversal.DocumentTraversal;
-import org.w3c.dom.traversal.NodeIterator;
-import org.w3c.dom.traversal.NodeFilter;
-import org.w3c.dom.traversal.TreeWalker;
-
-import org.apache.xerces.dom.events.EventImpl;
-import org.apache.xerces.dom.events.MutationEventImpl;
-import org.apache.xerces.dom3.UserDataHandler;
-
-// DOM L3 LS
-import org.apache.xerces.dom3.ls.DOMWriter;
-import org.apache.xerces.dom3.ls.DocumentLS;
-import org.apache.xerces.dom3.ls.DOMImplementationLS;
-
-
-/**
- * The Document interface represents the entire HTML or XML document.
- * Conceptually, it is the root of the document tree, and provides the
- * primary access to the document's data.
- * <P>
- * Since elements, text nodes, comments, processing instructions,
- * etc. cannot exist outside the context of a Document, the Document
- * interface also contains the factory methods needed to create these
- * objects. The Node objects created have a ownerDocument attribute
- * which associates them with the Document within whose context they
- * were created.
- * <p>
- * The DocumentImpl class also implements the DOM Level 2 DocumentTraversal
- * interface. This interface is comprised of factory methods needed to
- * create NodeIterators and TreeWalkers. The process of creating NodeIterator
- * objects also adds these references to this document.
- * After finishing with an iterator it is important to remove the object
- * using the remove methods in this implementation. This allows the release of
- * the references from the iterator objects to the DOM Nodes.
- * <p>
- * <b>Note:</b> When any node in the document is serialized, the
- * entire document is serialized along with it.
- *
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @author Andy Clark, IBM
- * @author Ralf Pfeiffer, IBM
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DocumentImpl
-    extends CoreDocumentImpl
-    implements DocumentTraversal, DocumentEvent, DocumentRange, DocumentLS {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 515687835542616694L;
-
-    //
-    // Data
-    //
-
-    /** Iterators */
-    // REVISIT: Should this be transient? -Ac
-    protected Vector iterators;
-
-     /** Ranges */
-    // REVISIT: Should this be transient? -Ac
-    protected Vector ranges;
-
-    /** Table for event listeners registered to this document nodes. */
-    protected Hashtable eventListeners;
-
-    /** Bypass mutation events firing. */
-    protected boolean mutationEvents = false;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * NON-DOM: Actually creating a Document is outside the DOM's spec,
-     * since it has to operate in terms of a particular implementation.
-     */
-    public DocumentImpl() {
-        super();
-    }
-
-    /** Constructor. */
-    public DocumentImpl(boolean grammarAccess) {
-        super(grammarAccess);
-    }
-
-    /**
-     * For DOM2 support.
-     * The createDocument factory method is in DOMImplementation.
-     */
-    public DocumentImpl(DocumentType doctype)
-    {
-        super(doctype);
-    }
-
-    /** For DOM2 support. */
-    public DocumentImpl(DocumentType doctype, boolean grammarAccess) {
-        super(doctype, grammarAccess);
-    }
-
-    //
-    // Node methods
-    //
-
-    /**
-     * Deep-clone a document, including fixing ownerDoc for the cloned
-     * children. Note that this requires bypassing the WRONG_DOCUMENT_ERR
-     * protection. I've chosen to implement it by calling importNode
-     * which is DOM Level 2.
-     *
-     * @return org.w3c.dom.Node
-     * @param deep boolean, iff true replicate children
-     */
-    public Node cloneNode(boolean deep) {
-
-        DocumentImpl newdoc = new DocumentImpl();
-        callUserDataHandlers(this, newdoc, UserDataHandler.NODE_CLONED);
-        cloneNode(newdoc, deep);
-
-        // experimental
-        newdoc.mutationEvents = mutationEvents;
-
-    	return newdoc;
-
-    } // cloneNode(boolean):Node
-
-    /**
-     * Retrieve information describing the abilities of this particular
-     * DOM implementation. Intended to support applications that may be
-     * using DOMs retrieved from several different sources, potentially
-     * with different underlying representations.
-     */
-    public DOMImplementation getImplementation() {
-        // Currently implemented as a singleton, since it's hardcoded
-        // information anyway.
-        return DOMImplementationImpl.getDOMImplementation();
-    }
-
-    //
-    // DocumentTraversal methods
-    //
-
-    /**
-     * NON-DOM extension:
-     * Create and return a NodeIterator. The NodeIterator is
-     * added to a list of NodeIterators so that it can be
-     * removed to free up the DOM Nodes it references.
-     *
-     * @param root The root of the iterator.
-     * @param whatToShow The whatToShow mask.
-     * @param filter The NodeFilter installed. Null means no filter.
-     */
-    public NodeIterator createNodeIterator(Node root,
-                                           short whatToShow,
-                                           NodeFilter filter)
-    {
-        return createNodeIterator(root, whatToShow, filter, true);
-    }
-
-    /**
-     * Create and return a NodeIterator. The NodeIterator is
-     * added to a list of NodeIterators so that it can be
-     * removed to free up the DOM Nodes it references.
-     *
-     * @param root The root of the iterator.
-     * @param whatToShow The whatToShow mask.
-     * @param filter The NodeFilter installed. Null means no filter.
-     * @param entityReferenceExpansion true to expand the contents of
-     *                                 EntityReference nodes
-     * @since WD-DOM-Level-2-19990923
-     */
-    public NodeIterator createNodeIterator(Node root,
-                                           int whatToShow,
-                                           NodeFilter filter,
-                                           boolean entityReferenceExpansion)
-    {
-        NodeIterator iterator = new NodeIteratorImpl(this,
-                                                     root,
-                                                     whatToShow,
-                                                     filter,
-                                                     entityReferenceExpansion);
-        if (iterators == null) {
-            iterators = new Vector();
-        }
-
-        iterators.addElement(iterator);
-
-        return iterator;
-    }
-
-    /**
-     * NON-DOM extension:
-     * Create and return a TreeWalker.
-     *
-     * @param root The root of the iterator.
-     * @param whatToShow The whatToShow mask.
-     * @param filter The NodeFilter installed. Null means no filter.
-     */
-    public TreeWalker createTreeWalker(Node root,
-                                       short whatToShow,
-                                       NodeFilter filter)
-    {
-        return createTreeWalker(root, whatToShow, filter, true);
-    }
-    /**
-     * Create and return a TreeWalker.
-     *
-     * @param root The root of the iterator.
-     * @param whatToShow The whatToShow mask.
-     * @param filter The NodeFilter installed. Null means no filter.
-     * @param entityReferenceExpansion true to expand the contents of
-     *                                 EntityReference nodes
-     * @since WD-DOM-Level-2-19990923
-     */
-    public TreeWalker createTreeWalker(Node root,
-                                       int whatToShow,
-                                       NodeFilter filter,
-                                       boolean entityReferenceExpansion)
-    {
-    	if (root == null) {
-            throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                                   "DOM007 Not supported");
-        }
-        return new TreeWalkerImpl(root, whatToShow, filter,
-                                  entityReferenceExpansion);
-    }
-
-    //
-    // Not DOM Level 2. Support DocumentTraversal methods.
-    //
-
-    /** This is not called by the developer client. The
-     *  developer client uses the detach() function on the
-     *  NodeIterator itself. <p>
-     *
-     *  This function is called from the NodeIterator#detach().
-     */
-     void removeNodeIterator(NodeIterator nodeIterator) {
-
-        if (nodeIterator == null) return;
-        if (iterators == null) return;
-
-        iterators.removeElement(nodeIterator);
-    }
-
-    //
-    // DocumentRange methods
-    //
-    /**
-     */
-    public Range createRange() {
-
-        if (ranges == null) {
-            ranges = new Vector();
-        }
-
-        Range range = new RangeImpl(this);
-
-        ranges.addElement(range);
-
-        return range;
-
-    }
-
-    /** Not a client function. Called by Range.detach(),
-     *  so a Range can remove itself from the list of
-     *  Ranges.
-     */
-    void removeRange(Range range) {
-
-        if (range == null) return;
-        if (ranges == null) return;
-
-        ranges.removeElement(range);
-    }
-
-    /**
-     * A method to be called when some text was changed in a text node,
-     * so that live objects can be notified.
-     */
-    void replacedText(NodeImpl node) {
-        // notify ranges
-        if (ranges != null) {
-            Enumeration enum = ranges.elements();
-            while (enum.hasMoreElements()) {
-                ((RangeImpl)enum.nextElement()).receiveReplacedText(node);
-            }
-        }
-    }
-
-    /**
-     * A method to be called when some text was deleted from a text node,
-     * so that live objects can be notified.
-     */
-    void deletedText(NodeImpl node, int offset, int count) {
-        // notify ranges
-        if (ranges != null) {
-            Enumeration enum = ranges.elements();
-            while (enum.hasMoreElements()) {
-                ((RangeImpl)enum.nextElement()).receiveDeletedText(node,
-                                                                   offset,
-                                                                   count);
-            }
-        }
-    }
-
-    /**
-     * A method to be called when some text was inserted into a text node,
-     * so that live objects can be notified.
-     */
-    void insertedText(NodeImpl node, int offset, int count) {
-        // notify ranges
-        if (ranges != null) {
-            Enumeration enum = ranges.elements();
-            while (enum.hasMoreElements()) {
-                ((RangeImpl)enum.nextElement()).receiveInsertedText(node,
-                                                                    offset,
-                                                                    count);
-            }
-        }
-    }
-
-    /**
-     * A method to be called when a text node has been split,
-     * so that live objects can be notified.
-     */
-    void splitData(Node node, Node newNode, int offset) {
-        // notify ranges
-        if (ranges != null) {
-            Enumeration enum = ranges.elements();
-            while (enum.hasMoreElements()) {
-                ((RangeImpl)enum.nextElement()).receiveSplitData(node,
-                                                                 newNode,
-                                                                 offset);
-            }
-        }
-    }
-
-    //
-    // DocumentEvent methods
-    //
-
-    /**
-     * Introduced in DOM Level 2. Optional. <p>
-     * Create and return Event objects.
-     *
-     * @param type The eventType parameter specifies the type of Event
-     * interface to be created.  If the Event interface specified is supported
-     * by the implementation this method will return a new Event of the
-     * interface type requested. If the Event is to be dispatched via the
-     * dispatchEvent method the appropriate event init method must be called
-     * after creation in order to initialize the Event's values.  As an
-     * example, a user wishing to synthesize some kind of Event would call
-     * createEvent with the parameter "Events". The initEvent method could then
-     * be called on the newly created Event to set the specific type of Event
-     * to be dispatched and set its context information.
-     * @return Newly created Event
-     * @exception DOMException NOT_SUPPORTED_ERR: Raised if the implementation
-     * does not support the type of Event interface requested
-     * @since WD-DOM-Level-2-19990923
-     */
-    public Event createEvent(String type)
-	throws DOMException {
-	    if (type.equalsIgnoreCase("Events") || "Event".equals(type))
-	        return new EventImpl();
-	    if (type.equalsIgnoreCase("MutationEvents") ||
-                "MutationEvent".equals(type))
-	        return new MutationEventImpl();
-	    else
-	        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-					   "DOM007 Not supported");
-	}
-
-    /**
-     * Sets whether the DOM implementation generates mutation events
-     * upon operations.
-     */
-    void setMutationEvents(boolean set) {
-        mutationEvents = set;
-    }
-
-    /**
-     * Returns true if the DOM implementation generates mutation events.
-     */
-    boolean getMutationEvents() {
-        return mutationEvents;
-    }
-
-    /**
-     * Store event listener registered on a given node
-     * This is another place where we could use weak references! Indeed, the
-     * node here won't be GC'ed as long as some listener is registered on it,
-     * since the eventsListeners table will have a reference to the node.
-     */
-    protected void setEventListeners(NodeImpl n, Vector listeners) {
-        if (eventListeners == null) {
-            eventListeners = new Hashtable();
-        }
-        if (listeners == null) {
-            eventListeners.remove(n);
-            if (eventListeners.isEmpty()) {
-                // stop firing events when there isn't any listener
-                mutationEvents = false;
-            }
-        } else {
-            eventListeners.put(n, listeners);
-            // turn mutation events on
-            mutationEvents = true;
-        }
-    }
-
-    /**
-     * Retreive event listener registered on a given node
-     */
-    protected Vector getEventListeners(NodeImpl n) {
-        if (eventListeners == null) {
-            return null;
-        }
-        return (Vector) eventListeners.get(n);
-    }
-
-    //
-    // EventTarget support (public and internal)
-    //
-
-    //
-    // Constants
-    //
-
-    /*
-     * NON-DOM INTERNAL: Class LEntry is just a struct used to represent
-     * event listeners registered with this node. Copies of this object
-     * are hung from the nodeListeners Vector.
-     * <p>
-     * I considered using two vectors -- one for capture,
-     * one for bubble -- but decided that since the list of listeners 
-     * is probably short in most cases, it might not be worth spending
-     * the space. ***** REVISIT WHEN WE HAVE MORE EXPERIENCE.
-     */
-    class LEntry
-    {
-        String type;
-        EventListener listener;
-        boolean useCapture;
-	    
-        /** NON-DOM INTERNAL: Constructor for Listener list Entry 
-         * @param type Event name (NOT event group!) to listen for.
-         * @param listener Who gets called when event is dispatched
-         * @param useCaptue True iff listener is registered on
-         *  capturing phase rather than at-target or bubbling
-         */
-        LEntry(String type, EventListener listener, boolean useCapture)
-        {
-            this.type = type;
-            this.listener = listener;
-            this.useCapture = useCapture;
-        }
-    } // LEntry
-	
-    /**
-     * Introduced in DOM Level 2. <p> Register an event listener with this
-     * Node. A listener may be independently registered as both Capturing and
-     * Bubbling, but may only be registered once per role; redundant
-     * registrations are ignored.
-     * @param node node to add listener to
-     * @param type Event name (NOT event group!) to listen for.
-     * @param listener Who gets called when event is dispatched
-     * @param useCapture True iff listener is registered on
-     *  capturing phase rather than at-target or bubbling
-     */
-    protected void addEventListener(NodeImpl node, String type,
-                                    EventListener listener, boolean useCapture)
-    {
-        // We can't dispatch to blank type-name, and of course we need
-        // a listener to dispatch to
-        if (type == null || type.equals("") || listener == null)
-            return;
-
-        // Each listener may be registered only once per type per phase.
-        // Simplest way to code that is to zap the previous entry, if any.
-        removeEventListener(node, type, listener, useCapture);
-	    
-        Vector nodeListeners = getEventListeners(node);
-        if(nodeListeners == null) {
-            nodeListeners = new Vector();
-            setEventListeners(node, nodeListeners);
-        }
-        nodeListeners.addElement(new LEntry(type, listener, useCapture));
-	    
-        // Record active listener
-        LCount lc = LCount.lookup(type);
-        if (useCapture)
-            ++lc.captures;
-        else
-            ++lc.bubbles;
-
-    } // addEventListener(NodeImpl,String,EventListener,boolean) :void
-	
-    /**
-     * Introduced in DOM Level 2. <p> Deregister an event listener previously
-     * registered with this Node.  A listener must be independently removed
-     * from the Capturing and Bubbling roles. Redundant removals (of listeners
-     * not currently registered for this role) are ignored.
-     * @param node node to remove listener from
-     * @param type Event name (NOT event group!) to listen for.
-     * @param listener Who gets called when event is dispatched
-     * @param useCapture True iff listener is registered on
-     *  capturing phase rather than at-target or bubbling
-     */
-    protected void removeEventListener(NodeImpl node, String type,
-                                       EventListener listener,
-                                       boolean useCapture)
-    {
-        // If this couldn't be a valid listener registration, ignore request
-        if (type == null || type.equals("") || listener == null)
-            return;
-        Vector nodeListeners = getEventListeners(node);
-        if (nodeListeners == null)
-            return;
-
-        // Note that addListener has previously ensured that 
-        // each listener may be registered only once per type per phase.
-        // count-down is OK for deletions!
-        for (int i = nodeListeners.size() - 1; i >= 0; --i) {
-            LEntry le = (LEntry) nodeListeners.elementAt(i);
-            if (le.useCapture == useCapture && le.listener == listener && 
-                le.type.equals(type)) {
-                nodeListeners.removeElementAt(i);
-                // Storage management: Discard empty listener lists
-                if (nodeListeners.size() == 0)
-                    setEventListeners(node, null);
-
-                // Remove active listener
-                LCount lc = LCount.lookup(type);
-                if (useCapture)
-                    --lc.captures;
-                else
-                    --lc.bubbles;
-
-                break;  // Found it; no need to loop farther.
-            }
-        }
-    } // removeEventListener(NodeImpl,String,EventListener,boolean) :void
-	
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Distribution engine for DOM Level 2 Events. 
-     * <p>
-     * Event propagation runs as follows:
-     * <ol>
-     * <li>Event is dispatched to a particular target node, which invokes
-     *   this code. Note that the event's stopPropagation flag is
-     *   cleared when dispatch begins; thereafter, if it has 
-     *   been set before processing of a node commences, we instead
-     *   immediately advance to the DEFAULT phase.
-     * <li>The node's ancestors are established as destinations for events.
-     *   For capture and bubble purposes, node ancestry is determined at 
-     *   the time dispatch starts. If an event handler alters the document 
-     *   tree, that does not change which nodes will be informed of the event. 
-     * <li>CAPTURING_PHASE: Ancestors are scanned, root to target, for 
-     *   Capturing listeners. If found, they are invoked (see below). 
-     * <li>AT_TARGET: 
-     *   Event is dispatched to NON-CAPTURING listeners on the
-     *   target node. Note that capturing listeners on this node are _not_
-     *   invoked.
-     * <li>BUBBLING_PHASE: Ancestors are scanned, target to root, for
-     *   non-capturing listeners. 
-     * <li>Default processing: Some DOMs have default behaviors bound to
-     *   specific nodes. If this DOM does, and if the event's preventDefault
-     *   flag has not been set, we now return to the target node and process
-     *   its default handler for this event, if any.
-     * </ol>
-     * <p>
-     * Note that registration of handlers during processing of an event does
-     * not take effect during this phase of this event; they will not be called
-     * until the next time this node is visited by dispatchEvent. On the other
-     * hand, removals take effect immediately.
-     * <p>
-     * If an event handler itself causes events to be dispatched, they are
-     * processed synchronously, before processing resumes
-     * on the event which triggered them. Please be aware that this may 
-     * result in events arriving at listeners "out of order" relative
-     * to the actual sequence of requests.
-     * <p>
-     * Note that our implementation resets the event's stop/prevent flags
-     * when dispatch begins.
-     * I believe the DOM's intent is that event objects be redispatchable,
-     * though it isn't stated in those terms.
-     * @param node node to dispatch to
-     * @param event the event object to be dispatched to 
-     *              registered EventListeners
-     * @return true if the event's <code>preventDefault()</code>
-     *              method was invoked by an EventListener; otherwise false.
-    */
-    protected boolean dispatchEvent(NodeImpl node, Event event) {
-        if (event == null) return false;
-        
-        // Can't use anyone else's implementation, since there's no public
-        // API for setting the event's processing-state fields.
-        EventImpl evt = (EventImpl)event;
-
-        // VALIDATE -- must have been initialized at least once, must have
-        // a non-null non-blank name.
-        if(!evt.initialized || evt.type == null || evt.type.equals(""))
-            throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR,
-                                     "DOM010 Unspecified event type");
-        
-        // If nobody is listening for this event, discard immediately
-        LCount lc = LCount.lookup(evt.getType());
-        if (lc.captures + lc.bubbles + lc.defaults == 0)
-            return evt.preventDefault;
-
-        // INITIALIZE THE EVENT'S DISPATCH STATUS
-        // (Note that Event objects are reusable in our implementation;
-        // that doesn't seem to be explicitly guaranteed in the DOM, but
-        // I believe it is the intent.)
-        evt.target = node;
-        evt.stopPropagation = false;
-        evt.preventDefault = false;
-        
-        // Capture pre-event parentage chain, not including target;
-        // use pre-event-dispatch ancestors even if event handlers mutate
-        // document and change the target's context.
-        // Note that this is parents ONLY; events do not
-        // cross the Attr/Element "blood/brain barrier". 
-        // DOMAttrModified. which looks like an exception,
-        // is issued to the Element rather than the Attr
-        // and causes a _second_ DOMSubtreeModified in the Element's
-        // tree.
-        Vector pv = new Vector(10,10);
-        Node p = node;
-        Node n = p.getParentNode();
-        while (n != null) {
-            pv.addElement(n);
-            p = n;
-            n = n.getParentNode();
-        }
-        
-        // CAPTURING_PHASE:
-        if (lc.captures > 0) {
-            evt.eventPhase = Event.CAPTURING_PHASE;
-            // Ancestors are scanned, root to target, for 
-            // Capturing listeners.
-            for (int j = pv.size() - 1; j >= 0; --j) {
-                if (evt.stopPropagation)
-                    break;  // Someone set the flag. Phase ends.
-
-                // Handle all capturing listeners on this node
-                NodeImpl nn = (NodeImpl) pv.elementAt(j);
-                evt.currentTarget = nn;
-                Vector nodeListeners = getEventListeners(nn);
-                if (nodeListeners != null) {
-                    Vector nl = (Vector) nodeListeners.clone();
-                    // count-down more efficient
-                    for (int i = nl.size() - 1; i >= 0; --i) {
-                        LEntry le = (LEntry) nl.elementAt(i);
-                        if (le.useCapture && le.type.equals(evt.type) &&
-                            nodeListeners.contains(le)) {
-                            try {
-                                le.listener.handleEvent(evt);
-                            }
-                            catch (Exception e) {
-                                // All exceptions are ignored.
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        
-        // Both AT_TARGET and BUBBLE use non-capturing listeners.
-        if (lc.bubbles > 0) {
-            // AT_TARGET PHASE: Event is dispatched to NON-CAPTURING listeners
-            // on the target node. Note that capturing listeners on the target
-            // node are _not_ invoked, even during the capture phase.
-            evt.eventPhase = Event.AT_TARGET;
-            evt.currentTarget = node;
-            Vector nodeListeners = getEventListeners(node);
-            if (!evt.stopPropagation && nodeListeners != null) {
-                Vector nl = (Vector) nodeListeners.clone();
-                // count-down is more efficient
-                for (int i = nl.size() - 1; i >= 0; --i) {
-                    LEntry le = (LEntry) nl.elementAt(i);
-                    if (!le.useCapture && le.type.equals(evt.type) &&
-                        nodeListeners.contains(le)) {
-                        try {
-                            le.listener.handleEvent(evt);
-                        }
-                        catch (Exception e) {
-                            // All exceptions are ignored.
-                        }
-                    }
-                }
-            }
-            // BUBBLING_PHASE: Ancestors are scanned, target to root, for
-            // non-capturing listeners. If the event's preventBubbling flag
-            // has been set before processing of a node commences, we
-            // instead immediately advance to the default phase.
-            // Note that not all events bubble.
-            if (evt.bubbles) {
-                evt.eventPhase = Event.BUBBLING_PHASE;
-                for (int j = 0; j < pv.size(); ++j) {
-                    if (evt.stopPropagation)
-                        break;  // Someone set the flag. Phase ends.
-
-                    // Handle all bubbling listeners on this node
-                    NodeImpl nn = (NodeImpl) pv.elementAt(j);
-                    evt.currentTarget = nn;
-                    nodeListeners = getEventListeners(nn);
-                    if (nodeListeners != null) {
-                        Vector nl = (Vector) nodeListeners.clone();
-                        // count-down more efficient
-                        for (int i = nl.size() - 1; i >= 0; --i) {
-                            LEntry le = (LEntry) nl.elementAt(i);
-                            if (!le.useCapture && le.type.equals(evt.type) &&
-                                nodeListeners.contains(le)) {
-                                try {
-                                    le.listener.handleEvent(evt);
-                                }
-                                catch (Exception e) {
-                                    // All exceptions are ignored.
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        
-        // DEFAULT PHASE: Some DOMs have default behaviors bound to specific
-        // nodes. If this DOM does, and if the event's preventDefault flag has
-        // not been set, we now return to the target node and process its
-        // default handler for this event, if any.
-        // No specific phase value defined, since this is DOM-internal
-        if (lc.defaults > 0 && (!evt.cancelable || !evt.preventDefault)) {
-            // evt.eventPhase = Event.DEFAULT_PHASE;
-            // evt.currentTarget = node;
-            // DO_DEFAULT_OPERATION
-        }
-
-        return evt.preventDefault;        
-    } // dispatchEvent(NodeImpl,Event) :boolean
-
-
-    /**
-     * NON-DOM INTERNAL: DOMNodeInsertedIntoDocument and ...RemovedFrom...
-     * are dispatched to an entire subtree. This is the distribution code
-     * therefor. They DO NOT bubble, thanks be, but may be captured.
-     * <p>
-     * ***** At the moment I'm being sloppy and using the normal
-     * capture dispatcher on every node. This could be optimized hugely
-     * by writing a capture engine that tracks our position in the tree to
-     * update the capture chain without repeated chases up to root.
-     * @param node node to dispatch to
-     * @param n node which was directly inserted or removed
-     * @param e event to be sent to that node and its subtree
-     */
-    protected void dispatchEventToSubtree(NodeImpl node, Node n, Event e) {
-        Vector nodeListeners = getEventListeners(node);
-        if (nodeListeners == null || n == null)
-            return;
-
-        // ***** Recursive implementation. This is excessively expensive,
-        // and should be replaced in conjunction with optimization
-        // mentioned above.
-        ((NodeImpl) n).dispatchEvent(e);
-        if (n.getNodeType() == Node.ELEMENT_NODE) {
-            NamedNodeMap a = n.getAttributes();
-            for (int i = a.getLength() - 1; i >= 0; --i)
-                dispatchEventToSubtree(node, a.item(i), e);
-        }
-        dispatchEventToSubtree(node, n.getFirstChild(), e);
-        dispatchEventToSubtree(node, n.getNextSibling(), e);
-    } // dispatchEventToSubtree(NodeImpl,Node,Event) :void
-
-    /**
-     * NON-DOM INTERNAL: Return object for getEnclosingAttr. Carries
-     * (two values, the Attr node affected (if any) and its previous 
-     * string value. Simple struct, no methods.
-     */
-    class EnclosingAttr
-    {
-        AttrImpl node;
-        String oldvalue;
-    }
-
-    EnclosingAttr savedEnclosingAttr;
-
-    /**
-     * NON-DOM INTERNAL: Convenience wrapper for calling
-     * dispatchAggregateEvents when the context was established
-     * by <code>savedEnclosingAttr</code>.
-     * @param node node to dispatch to
-     * @param ea description of Attr affected by current operation
-     */
-    protected void dispatchAggregateEvents(NodeImpl node, EnclosingAttr ea) {
-        if (ea != null)
-            dispatchAggregateEvents(node, ea.node, ea.oldvalue,
-                                    MutationEvent.MODIFICATION);
-        else
-            dispatchAggregateEvents(node, null, null, (short) 0);
-	        
-    } // dispatchAggregateEvents(NodeImpl,EnclosingAttr) :void
-
-    /**
-     * NON-DOM INTERNAL: Generate the "aggregated" post-mutation events
-     * DOMAttrModified and DOMSubtreeModified.
-     * Both of these should be issued only once for each user-requested
-     * mutation operation, even if that involves multiple changes to
-     * the DOM.
-     * For example, if a DOM operation makes multiple changes to a single
-     * Attr before returning, it would be nice to generate only one 
-     * DOMAttrModified, and multiple changes over larger scope but within
-     * a recognizable single subtree might want to generate only one 
-     * DOMSubtreeModified, sent to their lowest common ancestor. 
-     * <p>
-     * To manage this, use the "internal" versions of insert and remove
-     * with MUTATION_LOCAL, then make an explicit call to this routine
-     * at the higher level. Some examples now exist in our code.
-     *
-     * @param node The node to dispatch to
-     * @param enclosingAttr The Attr node (if any) whose value has been changed
-     * as a result of the DOM operation. Null if none such.
-     * @param oldValue The String value previously held by the
-     * enclosingAttr. Ignored if none such.
-     * @param change Type of modification to the attr. See
-     * MutationEvent.attrChange
-     */
-    protected void dispatchAggregateEvents(NodeImpl node,
-                                           AttrImpl enclosingAttr,
-                                           String oldvalue, short change) {
-        // We have to send DOMAttrModified.
-        NodeImpl owner = null;
-        if (enclosingAttr != null) {
-            LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
-            owner = (NodeImpl) enclosingAttr.getOwnerElement();
-            if (lc.captures + lc.bubbles + lc.defaults > 0) {
-                if (owner != null) {
-                    MutationEventImpl me =  new MutationEventImpl();
-                    me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
-                                         true, false, enclosingAttr,
-                                         oldvalue,
-                                         enclosingAttr.getNodeValue(),
-                                         enclosingAttr.getNodeName(),
-                                         change);
-                    owner.dispatchEvent(me);
-                }
-            }
-        }
-        // DOMSubtreeModified gets sent to the lowest common root of a
-        // set of changes. 
-        // "This event is dispatched after all other events caused by the
-        // mutation have been fired."
-        LCount lc = LCount.lookup(MutationEventImpl.DOM_SUBTREE_MODIFIED);
-        if (lc.captures + lc.bubbles + lc.defaults > 0) {
-            MutationEvent me =  new MutationEventImpl();
-            me.initMutationEvent(MutationEventImpl.DOM_SUBTREE_MODIFIED,
-                                 true, false, null, null,
-                                 null, null, (short) 0);
-
-            // If we're within an Attr, DStM gets sent to the Attr
-            // and to its owningElement. Otherwise we dispatch it
-            // locally.
-            if (enclosingAttr != null) {
-                dispatchEvent(enclosingAttr, me);
-                if (owner != null)
-                    dispatchEvent(owner, me);
-            }
-            else
-                dispatchEvent(node, me);
-        }
-    } // dispatchAggregateEvents(NodeImpl, AttrImpl,String) :void
-
-    /**
-     * NON-DOM INTERNAL: Pre-mutation context check, in
-     * preparation for later generating DOMAttrModified events.
-     * Determines whether this node is within an Attr
-     * @param node node to get enclosing attribute for
-     * @return either a description of that Attr, or null if none such. 
-     */
-    protected void saveEnclosingAttr(NodeImpl node) {
-        savedEnclosingAttr = null;
-        // MUTATION PREPROCESSING AND PRE-EVENTS:
-        // If we're within the scope of an Attr and DOMAttrModified 
-        // was requested, we need to preserve its previous value for
-        // that event.
-        LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
-        if (lc.captures + lc.bubbles + lc.defaults > 0) {
-            NodeImpl eventAncestor = node;
-            while (true) {
-                if (eventAncestor == null)
-                    return;
-                int type = eventAncestor.getNodeType();
-                if (type == Node.ATTRIBUTE_NODE) {
-                    EnclosingAttr retval = new EnclosingAttr();
-                    retval.node = (AttrImpl) eventAncestor;
-                    retval.oldvalue = retval.node.getNodeValue();
-                    savedEnclosingAttr = retval;
-                    return;
-                }
-                else if (type == Node.ENTITY_REFERENCE_NODE)
-                    eventAncestor = eventAncestor.parentNode();
-                else
-                    return;
-                // Any other parent means we're not in an Attr
-            }
-        }
-    } // saveEnclosingAttr(NodeImpl) :void
-
-    /**
-     * A method to be called when a character data node has been modified
-     */
-    void modifyingCharacterData(NodeImpl node) {
-        if (mutationEvents) {
-            saveEnclosingAttr(node);
-        }
-    }
-
-    /**
-     * A method to be called when a character data node has been modified
-     */
-    void modifiedCharacterData(NodeImpl node, String oldvalue, String value) {
-        if (mutationEvents) {
-            // MUTATION POST-EVENTS:
-            LCount lc =
-                LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
-            if (lc.captures + lc.bubbles + lc.defaults > 0) {
-                MutationEvent me = new MutationEventImpl();
-                me.initMutationEvent(
-                                 MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
-                                     true, false, null,
-                                     oldvalue, value, null, (short) 0);
-                dispatchEvent(node, me);
-            }
-            
-            // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
-            // if required. (Common to most kinds of mutation)
-            dispatchAggregateEvents(node, savedEnclosingAttr);
-        } // End mutation postprocessing
-    }
-
-    /**
-     * A method to be called when a node is about to be inserted in the tree.
-     */
-    void insertingNode(NodeImpl node, boolean replace) {
-        if (mutationEvents) {
-            if (!replace) {
-                saveEnclosingAttr(node);
-            }
-        }
-    }
-
-    /**
-     * A method to be called when a node has been inserted in the tree.
-     */
-    void insertedNode(NodeImpl node, NodeImpl newInternal, boolean replace) {
-        if (mutationEvents) {
-            // MUTATION POST-EVENTS:
-            // "Local" events (non-aggregated)
-            // New child is told it was inserted, and where
-            LCount lc = LCount.lookup(MutationEventImpl.DOM_NODE_INSERTED);
-            if (lc.captures + lc.bubbles + lc.defaults > 0) {
-                MutationEventImpl me = new MutationEventImpl();
-                me.initMutationEvent(MutationEventImpl.DOM_NODE_INSERTED,
-                                     true, false, node,
-                                     null, null, null, (short) 0);
-                dispatchEvent(newInternal, me);
-            }
-
-            // If within the Document, tell the subtree it's been added
-            // to the Doc.
-            lc = LCount.lookup(
-                            MutationEventImpl.DOM_NODE_INSERTED_INTO_DOCUMENT);
-            if (lc.captures + lc.bubbles + lc.defaults > 0) {
-                NodeImpl eventAncestor = node;
-                if (savedEnclosingAttr != null)
-                    eventAncestor = (NodeImpl)
-                        savedEnclosingAttr.node.getOwnerElement();
-                if (eventAncestor != null) { // Might have been orphan Attr
-                    NodeImpl p = eventAncestor;
-                    while (p != null) {
-                        eventAncestor = p; // Last non-null ancestor
-                        // In this context, ancestry includes
-                        // walking back from Attr to Element
-                        if (p.getNodeType() == ATTRIBUTE_NODE) {
-                            p = (NodeImpl) ((AttrImpl)p).getOwnerElement();
-                        }
-                        else {
-                            p = p.parentNode();
-                        }
-                    }
-                    if (eventAncestor.getNodeType() == Node.DOCUMENT_NODE){
-                        MutationEventImpl me = new MutationEventImpl();
-                        me.initMutationEvent(MutationEventImpl
-                                             .DOM_NODE_INSERTED_INTO_DOCUMENT,
-                                             false,false,null,null,
-                                             null,null,(short)0);
-                        dispatchEventToSubtree(node, newInternal, me);
-                    }
-                }
-            }
-            if (!replace) {
-                // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified
-                // (Common to most kinds of mutation)
-                dispatchAggregateEvents(node, savedEnclosingAttr);
-            }
-        }
-    }
-
-    /**
-     * A method to be called when a node is about to be removed from the tree.
-     */
-    void removingNode(NodeImpl node, NodeImpl oldChild, boolean replace) {
-
-        // notify iterators
-        if (iterators != null) {
-            Enumeration enum = iterators.elements();
-            while (enum.hasMoreElements()) {
-                ((NodeIteratorImpl)enum.nextElement()).removeNode(oldChild);
-            }
-        }
-
-        // notify ranges
-        if (ranges != null) {
-            Enumeration enum = ranges.elements();
-            while (enum.hasMoreElements()) {
-                ((RangeImpl)enum.nextElement()).removeNode(oldChild);
-            }
-        }
-
-        // mutation events
-        if (mutationEvents) {
-            // MUTATION PREPROCESSING AND PRE-EVENTS:
-            // If we're within the scope of an Attr and DOMAttrModified 
-            // was requested, we need to preserve its previous value for
-            // that event.
-            if (!replace) {
-                saveEnclosingAttr(node);
-            }
-            // Child is told that it is about to be removed
-            LCount lc = LCount.lookup(MutationEventImpl.DOM_NODE_REMOVED);
-            if (lc.captures + lc.bubbles + lc.defaults > 0) {
-                MutationEventImpl me= new MutationEventImpl();
-                me.initMutationEvent(MutationEventImpl.DOM_NODE_REMOVED,
-                                     true, false, node, null,
-                                     null, null, (short) 0);
-                dispatchEvent(oldChild, me);
-            }
-
-            // If within Document, child's subtree is informed that it's
-            // losing that status
-            lc = LCount.lookup(
-                             MutationEventImpl.DOM_NODE_REMOVED_FROM_DOCUMENT);
-            if (lc.captures + lc.bubbles + lc.defaults > 0) {
-                NodeImpl eventAncestor = this;
-                if(savedEnclosingAttr != null)
-                    eventAncestor = (NodeImpl)
-                        savedEnclosingAttr.node.getOwnerElement();
-                if (eventAncestor != null) { // Might have been orphan Attr
-                    for (NodeImpl p = eventAncestor.parentNode();
-                         p != null; p = p.parentNode()) {
-                        eventAncestor = p; // Last non-null ancestor
-                    }
-                    if (eventAncestor.getNodeType() == Node.DOCUMENT_NODE){
-                        MutationEventImpl me = new MutationEventImpl();
-                        me.initMutationEvent(
-                              MutationEventImpl.DOM_NODE_REMOVED_FROM_DOCUMENT,
-                                             false, false, null,
-                                             null, null, null, (short) 0);
-                        dispatchEventToSubtree(node, oldChild, me);
-                    }
-                }
-            }
-        } // End mutation preprocessing
-    }
-
-    /**
-     * A method to be called when a node has been removed from the tree.
-     */
-    void removedNode(NodeImpl node, boolean replace) {
-        if (mutationEvents) {
-            // MUTATION POST-EVENTS:
-            // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
-            // if required. (Common to most kinds of mutation)
-            if (!replace) {
-                dispatchAggregateEvents(node, savedEnclosingAttr);
-            }
-        } // End mutation postprocessing
-    }
-
-    /**
-     * A method to be called when a node is about to be replaced in the tree.
-     */
-    void replacingNode(NodeImpl node) {
-        if (mutationEvents) {
-            saveEnclosingAttr(node);
-        }
-    }
-
-    /**
-     * A method to be called when a node has been replaced in the tree.
-     */
-    void replacedNode(NodeImpl node) {
-        if (mutationEvents) {
-            dispatchAggregateEvents(node, savedEnclosingAttr);
-        }
-    }
-
-    /**
-     * A method to be called when an attribute value has been modified
-     */
-    void modifiedAttrValue(AttrImpl attr, String oldvalue) {
-        if (mutationEvents) {
-            // MUTATION POST-EVENTS:
-            dispatchAggregateEvents(attr, attr, oldvalue,
-                                    MutationEvent.MODIFICATION);
-        }
-    }
-
-    /**
-     * A method to be called when an attribute node has been set
-     */
-    void setAttrNode(AttrImpl attr, AttrImpl previous) {
-        if (mutationEvents) {
-            // MUTATION POST-EVENTS:
-            if (previous == null) {
-                dispatchAggregateEvents(attr.ownerNode, attr, null,
-                                        MutationEvent.ADDITION);
-            }
-            else {
-                dispatchAggregateEvents(attr.ownerNode, attr,
-                                        previous.getNodeValue(),
-                                        MutationEvent.MODIFICATION);
-            }
-        }
-    }
-
-    /**
-     * A method to be called when an attribute node has been removed
-     */
-    void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name) {
-        // We can't use the standard dispatchAggregate, since it assumes
-        // that the Attr is still attached to an owner. This code is
-        // similar but dispatches to the previous owner, "element".
-        if (mutationEvents) {
-    	    // If we have to send DOMAttrModified (determined earlier),
-            // do so.
-            LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
-            if (lc.captures + lc.bubbles + lc.defaults > 0) {
-                MutationEventImpl me= new MutationEventImpl();
-                me.initMutationEvent(MutationEventImpl.DOM_ATTR_MODIFIED,
-                                     true, false, null,
-                                     attr.getNodeValue(), null, name,
-                                     MutationEvent.REMOVAL);
-                dispatchEvent(oldOwner, me);
-            }
-
-            // We can hand off to process DOMSubtreeModified, though.
-            // Note that only the Element needs to be informed; the
-            // Attr's subtree has not been changed by this operation.
-            dispatchAggregateEvents(oldOwner, null, null, (short) 0);
-        }
-    }
-    
-    //
-    // DOM L3 LS
-    //
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Indicates whether the method load should be synchronous or 
-     * asynchronous. When the async attribute is set to <code>true</code> 
-     * the load method returns control to the caller before the document has 
-     * completed loading. The default value of this property is 
-     * <code>false</code>.
-     * <br>Setting the value of this attribute might throw NOT_SUPPORTED_ERR 
-     * if the implementation doesn't support the mode the attribute is being 
-     * set to. Should the DOM spec define the default value of this 
-     * property? What if implementing both async and sync IO is impractical 
-     * in some systems?  2001-09-14. default is <code>false</code> but we 
-     * need to check with Mozilla and IE. 
-     */
-    public boolean getAsync() {
-        return false;
-    }
-    
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Indicates whether the method load should be synchronous or 
-     * asynchronous. When the async attribute is set to <code>true</code> 
-     * the load method returns control to the caller before the document has 
-     * completed loading. The default value of this property is 
-     * <code>false</code>.
-     * <br>Setting the value of this attribute might throw NOT_SUPPORTED_ERR 
-     * if the implementation doesn't support the mode the attribute is being 
-     * set to. Should the DOM spec define the default value of this 
-     * property? What if implementing both async and sync IO is impractical 
-     * in some systems?  2001-09-14. default is <code>false</code> but we 
-     * need to check with Mozilla and IE. 
-     */
-    public void setAsync(boolean async) {
-        if (async) {
-            // NOT SUPPORTED
-            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, 
-                                   "Asynchronous mode is not supported");
-        }
-    }
-    /**
-     * DOM Level 3 WD - Experimental.
-     * If the document is currently being loaded as a result of the method 
-     * <code>load</code> being invoked the loading and parsing is 
-     * immediately aborted. The possibly partial result of parsing the 
-     * document is discarded and the document is cleared.
-     */
-
-    public void abort() {
-    }
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Replaces the content of the document with the result of parsing the 
-     * given URI. Invoking this method will either block the caller or 
-     * return to the caller immediately depending on the value of the async 
-     * attribute. Once the document is fully loaded the document will fire a 
-     * "load" event that the caller can register as a listener for. If an 
-     * error occurs the document will fire an "error" event so that the 
-     * caller knows that the load failed (see <code>ParseErrorEvent</code>).
-     * @param uri The URI reference for the XML file to be loaded. If this is 
-     *   a relative URI...
-     * @return If async is set to <code>true</code> <code>load</code> returns 
-     *   <code>true</code> if the document load was successfully initiated. 
-     *   If an error occurred when initiating the document load 
-     *   <code>load</code> returns <code>false</code>.If async is set to 
-     *   <code>false</code> <code>load</code> returns <code>true</code> if 
-     *   the document was successfully loaded and parsed. If an error 
-     *   occurred when either loading or parsing the URI <code>load</code> 
-     *   returns <code>false</code>.
-     */
-    public boolean load(String uri) {
-        return false;
-    }
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Replace the content of the document with the result of parsing the 
-     * input string, this method is always synchronous.
-     * @param source A string containing an XML document.
-     * @return <code>true</code> if parsing the input string succeeded 
-     *   without errors, otherwise <code>false</code>.
-     */
-    public boolean loadXML(String source) {
-        return false;
-    }
-    
-    /**
-     * DOM Level 3 WD - Experimental.
-     * Save the document or the given node to a string (i.e. serialize the 
-     * document or node).
-     * @param snode Specifies what to serialize, if this parameter is 
-     *   <code>null</code> the whole document is serialized, if it's 
-     *   non-null the given node is serialized.
-     * @return The serialized document or <code>null</code>.
-     * @exception DOMException
-     *   WRONG_DOCUMENT_ERR: Raised if the node passed in as the node 
-     *   parameter is from an other document.
-     */
-    public String saveXML(Node snode)
-                          throws DOMException {
-        if ( snode != null &&
-             getOwnerDocument() != snode.getOwnerDocument() )
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,"Node "+snode.getNodeName()+" does not belongs to this Document.");
-        DOMImplementationLS domImplLS = (DOMImplementationLS)DOMImplementationImpl.getDOMImplementation();
-        DOMWriter xmlWriter = domImplLS.createDOMWriter();
-        if (snode == null) {
-            snode = this;
-        }
-        return xmlWriter.writeToString(snode);
-    }
-
-} // class DocumentImpl
diff --git a/src/org/apache/xerces/dom/DocumentTypeImpl.java b/src/org/apache/xerces/dom/DocumentTypeImpl.java
deleted file mode 100644
index fca5b4d..0000000
--- a/src/org/apache/xerces/dom/DocumentTypeImpl.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * This class represents a Document Type <em>declaraction</em> in
- * the document itself, <em>not</em> a Document Type Definition (DTD).
- * An XML document may (or may not) have such a reference.
- * <P>
- * DocumentType is an Extended DOM feature, used in XML documents but
- * not in HTML.
- * <P>
- * Note that Entities and Notations are no longer children of the
- * DocumentType, but are parentless nodes hung only in their
- * appropriate NamedNodeMaps.
- * <P>
- * This area is UNDERSPECIFIED IN REC-DOM-Level-1-19981001
- * Most notably, absolutely no provision was made for storing
- * and using Element and Attribute information. Nor was the linkage
- * between Entities and Entity References nailed down solidly.
- *
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @author Andy Clark, IBM
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class DocumentTypeImpl 
-    extends ParentNode
-    implements DocumentType {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 7751299192316526485L;
-    
-    //
-    // Data
-    //
-
-    /** Document type name. */
-    protected String name;
-
-    /** Entities. */
-    protected NamedNodeMapImpl entities;
-    
-    /** Notations. */
-    protected NamedNodeMapImpl notations;
-
-    // NON-DOM
-
-    /** Elements. */
-    protected NamedNodeMapImpl elements;
-    
-    // DOM2: support public ID.
-    protected String publicID;
-    
-    // DOM2: support system ID.
-    protected String systemID;
-    
-    // DOM2: support internal subset.
-    protected String internalSubset;
-
-    //
-    // Constructors
-    //
-
-    /** Factory method for creating a document type node. */
-    public DocumentTypeImpl(CoreDocumentImpl ownerDocument, String name) {
-        super(ownerDocument);
-
-        this.name = name;
-        // DOM
-        entities  = new NamedNodeMapImpl(this);
-        notations = new NamedNodeMapImpl(this);
-
-        // NON-DOM
-        elements = new NamedNodeMapImpl(this);
-
-    } // <init>(CoreDocumentImpl,String)
-  
-    /** Factory method for creating a document type node. */
-    public DocumentTypeImpl(CoreDocumentImpl ownerDocument,
-                            String qualifiedName,
-                            String publicID, String systemID) {
-        this(ownerDocument, qualifiedName);
-        this.publicID = publicID;
-        this.systemID = systemID;
-
-    } // <init>(CoreDocumentImpl,String)
-    
-    //
-    // DOM2: methods.
-    //
-    
-    /**
-     * Introduced in DOM Level 2. <p>
-     * 
-     * Return the public identifier of this Document type.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getPublicId() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return publicID;
-    }
-    /**
-     * Introduced in DOM Level 2. <p>
-     * 
-     * Return the system identifier of this Document type.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getSystemId() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return systemID;
-    }
-    
-    /**
-     * NON-DOM. <p>
-     *
-     * Set the internalSubset given as a string.
-     */
-    public void setInternalSubset(String internalSubset) {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        this.internalSubset = internalSubset;
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     * 
-     * Return the internalSubset given as a string.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getInternalSubset() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return internalSubset;
-    }
-    
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.DOCUMENT_TYPE_NODE;
-    }
-    
-    /**
-     * Returns the document type name
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return name;
-    }
-
-    /** Clones the node. */
-    public Node cloneNode(boolean deep) {
-
-    	DocumentTypeImpl newnode = (DocumentTypeImpl)super.cloneNode(deep);
-    	// NamedNodeMaps must be cloned explicitly, to avoid sharing them.
-    	newnode.entities  = entities.cloneMap(newnode);
-    	newnode.notations = notations.cloneMap(newnode);
-    	newnode.elements  = elements.cloneMap(newnode);
-
-    	return newnode;
-
-    } // cloneNode(boolean):Node
-
-    /* 
-     * Get Node text content
-     * @since DOM Level 3
-     */
-    public String getTextContent() throws DOMException {
-        return null;
-    }
-
-    /*
-     * Set Node text content
-     * @since DOM Level 3
-     */
-    public void setTextContent(String textContent)
-        throws DOMException {
-        // no-op
-    }
-
-    /**
-     * NON-DOM
-     * set the ownerDocument of this node and its children
-     */
-    void setOwnerDocument(CoreDocumentImpl doc) {
-        super.setOwnerDocument(doc);
-        entities.setOwnerDocument(doc);
-        notations.setOwnerDocument(doc);
-        elements.setOwnerDocument(doc);
-    }
-
-    //
-    // DocumentType methods
-    //
-
-    /**
-     * Name of this document type. If we loaded from a DTD, this should
-     * be the name immediately following the DOCTYPE keyword.
-     */
-    public String getName() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	return name;
-
-    } // getName():String
-
-    /**
-     * Access the collection of general Entities, both external and
-     * internal, defined in the DTD. For example, in:
-     * <p>
-     * <pre>
-     *   &lt;!doctype example SYSTEM "ex.dtd" [
-     *     &lt;!ENTITY foo "foo"&gt;
-     *     &lt;!ENTITY bar "bar"&gt;
-     *     &lt;!ENTITY % baz "baz"&gt;
-     *     ]&gt;
-     * </pre>
-     * <p>
-     * The Entities map includes foo and bar, but not baz. It is promised that
-     * only Nodes which are Entities will exist in this NamedNodeMap.
-     * <p>
-     * For HTML, this will always be null.
-     * <p>
-     * Note that "built in" entities such as &amp; and &lt; should be
-     * converted to their actual characters before being placed in the DOM's
-     * contained text, and should be converted back when the DOM is rendered
-     * as XML or HTML, and hence DO NOT appear here.
-     */
-    public NamedNodeMap getEntities() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-            }
-    	return entities;
-    }
-
-    /**
-     * Access the collection of Notations defined in the DTD.  A
-     * notation declares, by name, the format of an XML unparsed entity
-     * or is used to formally declare a Processing Instruction target.
-     */
-    public NamedNodeMap getNotations() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-            }
-    	return notations;
-    }
-
-    //
-    // Public methods
-    //
-
-    /**
-     * NON-DOM: Subclassed to flip the entities' and notations' readonly switch
-     * as well.
-     * @see NodeImpl#setReadOnly
-     */
-    public void setReadOnly(boolean readOnly, boolean deep) {
-    	
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        super.setReadOnly(readOnly, deep);
-
-        // set read-only property
-        elements.setReadOnly(readOnly, true);
-        entities.setReadOnly(readOnly, true);
-    	notations.setReadOnly(readOnly, true);
-
-    } // setReadOnly(boolean,boolean)
-    
-    /**
-     * NON-DOM: Access the collection of ElementDefinitions.
-     * @see ElementDefinitionImpl
-     */
-    public NamedNodeMap getElements() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-    	return elements;
-    }
-
-} // class DocumentTypeImpl
diff --git a/src/org/apache/xerces/dom/ElementDefinitionImpl.java b/src/org/apache/xerces/dom/ElementDefinitionImpl.java
deleted file mode 100644
index 004cffe..0000000
--- a/src/org/apache/xerces/dom/ElementDefinitionImpl.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * NON-DOM CLASS: Describe one of the Elements (and its associated
- * Attributes) defined in this Document Type.
- * <p>
- * I've included this in Level 1 purely as an anchor point for default
- * attributes. In Level 2 it should enable the ChildRule support.
- *
- * @version $Id$
- */
-public class ElementDefinitionImpl 
-    extends ParentNode {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -8373890672670022714L;
-    
-    //
-    // Data
-    //
-
-    /** Element definition name. */
-    protected String name;
-
-    /** Default attributes. */
-    protected NamedNodeMapImpl attributes;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public ElementDefinitionImpl(CoreDocumentImpl ownerDocument, String name) {
-    	super(ownerDocument);
-        this.name = name;
-        attributes = new NamedNodeMapImpl(ownerDocument);
-    }
-
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return NodeImpl.ELEMENT_DEFINITION_NODE;
-    }
-
-    /**
-     * Returns the element definition name
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return name;
-    }
-
-    /**
-     * Replicate this object.
-     */
-    public Node cloneNode(boolean deep) {
-
-    	ElementDefinitionImpl newnode =
-            (ElementDefinitionImpl) super.cloneNode(deep);
-    	// NamedNodeMap must be explicitly replicated to avoid sharing
-    	newnode.attributes = attributes.cloneMap(newnode);
-    	return newnode;
-
-    } // cloneNode(boolean):Node
-
-    /**
-     * Query the attributes defined on this Element.
-     * <p>
-     * In the base implementation this Map simply contains Attribute objects
-     * representing the defaults. In a more serious implementation, it would
-     * contain AttributeDefinitionImpl objects for all declared Attributes,
-     * indicating which are Default, DefaultFixed, Implicit and/or Required.
-     * 
-     * @return org.w3c.dom.NamedNodeMap containing org.w3c.dom.Attribute
-     */
-    public NamedNodeMap getAttributes() {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-    	return attributes;
-
-    } // getAttributes():NamedNodeMap
-
-} // class ElementDefinitionImpl
diff --git a/src/org/apache/xerces/dom/ElementImpl.java b/src/org/apache/xerces/dom/ElementImpl.java
deleted file mode 100644
index d02a1ce..0000000
--- a/src/org/apache/xerces/dom/ElementImpl.java
+++ /dev/null
@@ -1,838 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/**
- * Elements represent most of the "markup" and structure of the
- * document.  They contain both the data for the element itself
- * (element name and attributes), and any contained nodes, including
- * document text (as children).
- * <P>
- * Elements may have Attributes associated with them; the API for this is
- * defined in Node, but the function is implemented here. In general, XML
- * applications should retrive Attributes as Nodes, since they may contain
- * entity references and hence be a fairly complex sub-tree. HTML users will
- * be dealing with simple string values, and convenience methods are provided
- * to work in terms of Strings.
- * <P>
- * ElementImpl does not support Namespaces. ElementNSImpl, which inherits from
- * it, does.
- * @see ElementNSImpl
- *
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @author Andy Clark, IBM
- * @author Ralf Pfeiffer, IBM
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class ElementImpl
-    extends ParentNode
-    implements Element {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 3717253516652722278L;
-    //
-    // Data
-    //
-
-    /** Element name. */
-    protected String name;
-
-    /** Attributes. */
-    protected AttributeMap attributes;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public ElementImpl(CoreDocumentImpl ownerDoc, String name) {
-    	super(ownerDoc);
-        this.name = name;
-        needsSyncData(true);    // synchronizeData will initialize attributes
-    }
-
-    // for ElementNSImpl
-    protected ElementImpl() {}
-    
-    //
-    // Node methods
-    //
-
-    
-    /**
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.ELEMENT_NODE;
-    }
-
-    /**
-     * Returns the element name
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return name;
-    }
-
-    /**
-     * Retrieve all the Attributes as a set. Note that this API is inherited
-     * from Node rather than specified on Element; in fact only Elements will
-     * ever have Attributes, but they want to allow folks to "blindly" operate
-     * on the tree as a set of Nodes.
-     */
-    public NamedNodeMap getAttributes() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        if (attributes == null) {
-            attributes = new AttributeMap(this, null);
-        }
-        return attributes;
-
-    } // getAttributes():NamedNodeMap
-
-    /**
-     * Return a duplicate copy of this Element. Note that its children
-     * will not be copied unless the "deep" flag is true, but Attributes
-     * are <i>always</i> replicated.
-     *
-     * @see org.w3c.dom.Node#cloneNode(boolean)
-     */
-    public Node cloneNode(boolean deep) {
-
-    	ElementImpl newnode = (ElementImpl) super.cloneNode(deep);
-    	// Replicate NamedNodeMap rather than sharing it.
-        if (attributes != null) {
-            newnode.attributes = (AttributeMap) attributes.cloneMap(newnode);
-        }
-    	return newnode;
-
-    } // cloneNode(boolean):Node
-
-    /**
-     * NON-DOM
-     * set the ownerDocument of this node, its children, and its attributes
-     */
-    void setOwnerDocument(CoreDocumentImpl doc) {
-	super.setOwnerDocument(doc);
-        if (attributes != null) {
-            attributes.setOwnerDocument(doc);
-        }
-    }
-
-    //
-    // Element methods
-    //
-
-    /**
-     * Look up a single Attribute by name. Returns the Attribute's
-     * string value, or an empty string (NOT null!) to indicate that the
-     * name did not map to a currently defined attribute.
-     * <p>
-     * Note: Attributes may contain complex node trees. This method
-     * returns the "flattened" string obtained from Attribute.getValue().
-     * If you need the structure information, see getAttributeNode().
-     */
-    public String getAttribute(String name) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        if (attributes == null) {
-            return "";
-        }
-        Attr attr = (Attr)(attributes.getNamedItem(name));
-        return (attr == null) ? "" : attr.getValue();
-
-    } // getAttribute(String):String
-
-
-    /**
-     * Look up a single Attribute by name. Returns the Attribute Node,
-     * so its complete child tree is available. This could be important in
-     * XML, where the string rendering may not be sufficient information.
-     * <p>
-     * If no matching attribute is available, returns null.
-     */
-    public Attr getAttributeNode(String name) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        if (attributes == null) {
-            return null;
-        }
-        return (Attr)attributes.getNamedItem(name);
-
-    } // getAttributeNode(String):Attr
-    
-
-    /**
-     * Returns a NodeList of all descendent nodes (children,
-     * grandchildren, and so on) which are Elements and which have the
-     * specified tag name.
-     * <p>
-     * Note: NodeList is a "live" view of the DOM. Its contents will
-     * change as the DOM changes, and alterations made to the NodeList
-     * will be reflected in the DOM.
-     *
-     * @param tagname The type of element to gather. To obtain a list of
-     * all elements no matter what their names, use the wild-card tag
-     * name "*".
-     *
-     * @see DeepNodeListImpl
-     */
-    public NodeList getElementsByTagName(String tagname) {
-    	return new DeepNodeListImpl(this,tagname);
-    }
-
-    /**
-     * Returns the name of the Element. Note that Element.nodeName() is
-     * defined to also return the tag name.
-     * <p>
-     * This is case-preserving in XML. HTML should uppercasify it on the
-     * way in.
-     */
-    public String getTagName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	return name;
-    }
-
-    /**
-     * In "normal form" (as read from a source file), there will never be two
-     * Text children in succession. But DOM users may create successive Text
-     * nodes in the course of manipulating the document. Normalize walks the
-     * sub-tree and merges adjacent Texts, as if the DOM had been written out
-     * and read back in again. This simplifies implementation of higher-level
-     * functions that may want to assume that the document is in standard form.
-     * <p>
-     * To normalize a Document, normalize its top-level Element child.
-     * <p>
-     * As of PR-DOM-Level-1-19980818, CDATA -- despite being a subclass of
-     * Text -- is considered "markup" and will _not_ be merged either with
-     * normal Text or with other CDATASections.
-     */
-    public void normalize() {
-        // No need to normalize if already normalized.
-        if (isNormalized()) {
-            return;
-        }
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        ChildNode kid, next;
-        for (kid = firstChild; kid != null; kid = next) {
-            next = kid.nextSibling;
-
-            // If kid is a text node, we need to check for one of two
-            // conditions:
-            //   1) There is an adjacent text node
-            //   2) There is no adjacent text node, but kid is
-            //      an empty text node.
-            if ( kid.getNodeType() == Node.TEXT_NODE )
-            {
-                // If an adjacent text node, merge it with kid
-                if ( next!=null && next.getNodeType() == Node.TEXT_NODE )
-                {
-                    ((Text)kid).appendData(next.getNodeValue());
-                    removeChild( next );
-                    next = kid; // Don't advance; there might be another.
-                }
-                else
-                {
-                    // If kid is empty, remove it
-                    if ( kid.getNodeValue().length()==0 )
-                        removeChild( kid );
-                }
-            }
-
-            // Otherwise it might be an Element, which is handled recursively
-            else if (kid.getNodeType() == Node.ELEMENT_NODE) {
-                kid.normalize();
-            }
-        }
-
-        // We must also normalize all of the attributes
-        if ( attributes!=null )
-        {
-            for( int i=0; i<attributes.getLength(); ++i )
-            {
-                Node attr = attributes.item(i);
-                attr.normalize();
-            }
-        }
-
-    	// changed() will have occurred when the removeChild() was done,
-    	// so does not have to be reissued.
-
-        isNormalized(true);
-    } // normalize()
-
-    /**
-     * Remove the named attribute from this Element. If the removed
-     * Attribute has a default value, it is immediately replaced thereby.
-     * <P>
-     * The default logic is actually implemented in NamedNodeMapImpl.
-     * PR-DOM-Level-1-19980818 doesn't fully address the DTD, so some
-     * of this behavior is likely to change in future versions. ?????
-     * <P>
-     * Note that this call "succeeds" even if no attribute by this name
-     * existed -- unlike removeAttributeNode, which will throw a not-found
-     * exception in that case.
-     *	
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if the node is
-     * readonly.
-     */
-    public void removeAttribute(String name) {
-
-    	if (ownerDocument.errorChecking && isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                   "DOM001 Modification not allowed");
-        }
-    		
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (attributes == null) {
-            return;
-        }
-
-        attributes.safeRemoveNamedItem(name);
-
-    } // removeAttribute(String)
-
-  
-    /**
-     * Remove the specified attribute/value pair. If the removed
-     * Attribute has a default value, it is immediately replaced.
-     * <p>
-     * NOTE: Specifically removes THIS NODE -- not the node with this
-     * name, nor the node with these contents. If the specific Attribute
-     * object passed in is not stored in this Element, we throw a
-     * DOMException.  If you really want to remove an attribute by name,
-     * use removeAttribute().
-     *
-     * @return the Attribute object that was removed.
-     * @throws DOMException(NOT_FOUND_ERR) if oldattr is not an attribute of
-     * this Element.
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if the node is
-     * readonly.
-     */
-    public Attr removeAttributeNode(Attr oldAttr)
-        throws DOMException {
-
-    	if (ownerDocument.errorChecking && isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                   "DOM001 Modification not allowed");
-        }
-    		
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (attributes == null) {
-            throw new DOMException(DOMException.NOT_FOUND_ERR, 
-                                       "DOM008 Not found");
-        }
-        return (Attr) attributes.removeNamedItem(oldAttr.getName());
-
-    } // removeAttributeNode(Attr):Attr
-
-   
-    /**
-     * Add a new name/value pair, or replace the value of the existing
-     * attribute having that name.
-     *
-     * Note: this method supports only the simplest kind of Attribute,
-     * one whose value is a string contained in a single Text node.
-     * If you want to assert a more complex value (which XML permits,
-     * though HTML doesn't), see setAttributeNode().
-     *
-     * The attribute is created with specified=true, meaning it's an
-     * explicit value rather than inherited from the DTD as a default.
-     * Again, setAttributeNode can be used to achieve other results.
-     *
-     * @throws DOMException(INVALID_NAME_ERR) if the name is not acceptable.
-     * (Attribute factory will do that test for us.)
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if the node is
-     * readonly.
-     */
-    public void setAttribute(String name, String value) {
-
-    	if (ownerDocument.errorChecking && isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                   "DOM001 Modification not allowed");
-        }
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-    	Attr newAttr = getAttributeNode(name);
-        if (newAttr == null) {
-            newAttr = getOwnerDocument().createAttribute(name);
-
-            if (attributes == null) {
-                attributes = new AttributeMap(this, null);
-            }
-
-	    newAttr.setNodeValue(value);
-            attributes.setNamedItem(newAttr);
-        }
-	else {
-	    newAttr.setNodeValue(value);
-	}
-
-    } // setAttribute(String,String)
- 
-    /**
-     * Add a new attribute/value pair, or replace the value of the
-     * existing attribute with that name.
-     * <P>
-     * This method allows you to add an Attribute that has already been
-     * constructed, and hence avoids the limitations of the simple
-     * setAttribute() call. It can handle attribute values that have
-     * arbitrarily complex tree structure -- in particular, those which
-     * had entity references mixed into their text.
-     *
-     * @throws DOMException(INUSE_ATTRIBUTE_ERR) if the Attribute object
-     * has already been assigned to another Element.
-     */
-    public Attr setAttributeNode(Attr newAttr)
-        throws DOMException
-        {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-    	if (ownerDocument.errorChecking) {
-            if (isReadOnly()) {
-                throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                     "DOM001 Modification not allowed");
-            }
-    	
-            if (newAttr.getOwnerDocument() != ownerDocument) {
-    		throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
-                                       "DOM005 Wrong document");
-            }
-        }
-
-        if (attributes == null) {
-            attributes = new AttributeMap(this, null);
-        }
-    	// This will throw INUSE if necessary
-    	return (Attr) attributes.setNamedItem(newAttr);
-
-    } // setAttributeNode(Attr):Attr
-    
-    //
-    // DOM2: Namespace methods
-    //
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     * Retrieves an attribute value by local name and namespace URI. 
-     *
-     * @param namespaceURI
-     *                      The namespace URI of the attribute to
-     *                      retrieve.
-     * @param localName     The local name of the attribute to retrieve.
-     * @return String       The Attr value as a string, or empty string
-     *                      if that attribute
-     *                      does not have a specified or default value.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getAttributeNS(String namespaceURI, String localName) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (attributes == null) {
-            return "";
-        }
-
-        Attr attr = (Attr)(attributes.getNamedItemNS(namespaceURI, localName));
-        return (attr == null) ? "" : attr.getValue();
-
-    } // getAttributeNS(String,String):String
-    
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     *  Adds a new attribute.
-     *  If the given namespaceURI is null or an empty string and the
-     *  qualifiedName has a prefix that is "xml", the new attribute is bound to
-     *  the predefined namespace "http://www.w3.org/XML/1998/namespace"
-     *  [Namespaces].  If an attribute with the same local name and namespace
-     *  URI is already present on the element, its prefix is changed to be the
-     *  prefix part of the qualifiedName, and its value is changed to be the
-     *  value parameter. This value is a simple string, it is not parsed as it
-     *  is being set. So any markup (such as syntax to be recognized as an
-     *  entity reference) is treated as literal text, and needs to be
-     *  appropriately escaped by the implementation when it is written out. In
-     *  order to assign an attribute value that contains entity references, the
-     *  user must create an Attr node plus any Text and EntityReference nodes,
-     *  build the appropriate subtree, and use setAttributeNodeNS or
-     *  setAttributeNode to assign it as the value of an attribute.
-     *
-     * @param namespaceURI      The namespace URI of the attribute to create
-     *                          or alter. 
-     * @param localName         The local name of the attribute to create or
-     *                          alter.
-     * @param value             The value to set in string form.
-     * @throws                  INVALID_CHARACTER_ERR: Raised if the specified
-     *                          name contains an invalid character.
-     *
-     * @throws                  NO_MODIFICATION_ALLOWED_ERR: Raised if this
-     *                          node is readonly.
-     *
-     * @throws                  NAMESPACE_ERR: Raised if the qualifiedName
-     *                          has a prefix that is "xml" and the namespaceURI
-     *                          is neither null nor an empty string nor
-     *                          "http://www.w3.org/XML/1998/namespace", or if
-     *                          the qualifiedName has a prefix that is "xmlns"
-     *                          but the namespaceURI is neither null nor an
-     *                          empty string, or if if the qualifiedName has a
-     *                          prefix different from "xml" and "xmlns" and the
-     *                          namespaceURI is null or an empty string.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public void setAttributeNS(String namespaceURI, String localName, String value) {
-
-    	if (ownerDocument.errorChecking && isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                   "DOM001 Modification not allowed");
-        }
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-    	Attr newAttr = getAttributeNodeNS(namespaceURI, localName);
-        if (newAttr == null) {
-            newAttr =
-                getOwnerDocument().createAttributeNS(namespaceURI, localName);
-
-            if (attributes == null) {
-                attributes = new AttributeMap(this, null);
-            }
-	    newAttr.setNodeValue(value);
-            attributes.setNamedItemNS(newAttr);
-    	}
-	else {
-	    newAttr.setNodeValue(value);
-	}
-
-    } // setAttributeNS(String,String,String)
-    
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     * Removes an attribute by local name and namespace URI. If the removed
-     * attribute has a default value it is immediately replaced.
-     * The replacing attribute has the same namespace URI and local name, 
-     * as well as the original prefix.<p>
-     *
-     * @param namespaceURI  The namespace URI of the attribute to remove.
-     *                      
-     * @param localName     The local name of the attribute to remove.
-     * @throws                  NO_MODIFICATION_ALLOWED_ERR: Raised if this
-     *                          node is readonly.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public void removeAttributeNS(String namespaceURI, String localName) {
-
-    	if (ownerDocument.errorChecking && isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                   "DOM001 Modification not allowed");
-        }
-    		
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-
-        if (attributes == null) {
-            return;
-        }
-
-        attributes.safeRemoveNamedItemNS(namespaceURI, localName);
-
-    } // removeAttributeNS(String,String)
-    
-    /**
-     * Retrieves an Attr node by local name and namespace URI. 
-     *
-     * @param namespaceURI  The namespace URI of the attribute to
-     *                      retrieve. 
-     * @param localName     The local name of the attribute to retrieve.
-     * @return Attr         The Attr node with the specified attribute 
-     *                      local name and namespace
-     *                      URI or null if there is no such attribute.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public Attr getAttributeNodeNS(String namespaceURI, String localName){
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        if (attributes == null) {
-            return null;
-        }
-        return (Attr)attributes.getNamedItemNS(namespaceURI, localName);
-
-    } // getAttributeNodeNS(String,String):Attr
- 
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     * Adds a new attribute. If an attribute with that local name and 
-     * namespace URI is already present in the element, it is replaced 
-     * by the new one.
-     *
-     * @param Attr      The Attr node to add to the attribute list. When 
-     *                  the Node has no namespaceURI, this method behaves 
-     *                  like setAttributeNode.
-     * @return Attr     If the newAttr attribute replaces an existing attribute
-     *                  with the same local name and namespace URI, the *
-     *                  previously existing Attr node is returned, otherwise
-     *                  null is returned.
-     * @throws          WRONG_DOCUMENT_ERR: Raised if newAttr
-     *                  was created from a different document than the one that
-     *                  created the element.
-     *
-     * @throws          NO_MODIFICATION_ALLOWED_ERR: Raised if
-     *                  this node is readonly.
-     *
-     * @throws          INUSE_ATTRIBUTE_ERR: Raised if newAttr is
-     *                  already an attribute of another Element object. The
-     *                  DOM user must explicitly clone Attr nodes to re-use
-     *                  them in other elements.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public Attr setAttributeNodeNS(Attr newAttr)
-        throws DOMException
-        {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        if (ownerDocument.errorChecking) {
-            if (isReadOnly()) {
-    		throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                     "DOM001 Modification not allowed");
-            }
-            if (newAttr.getOwnerDocument() != ownerDocument) {
-                throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
-                                       "DOM005 Wrong document");
-            }
-        }
-
-        if (attributes == null) {
-            attributes = new AttributeMap(this, null);
-        }
-    	// This will throw INUSE if necessary
-    	return (Attr) attributes.setNamedItemNS(newAttr);
-
-    } // setAttributeNodeNS(Attr):Attr
-    
-    /**
-     * Introduced in DOM Level 2.
-     */
-    public boolean hasAttributes() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return (attributes != null && attributes.getLength() != 0);
-    }
-
-    /**
-     * Introduced in DOM Level 2.
-     */
-    public boolean hasAttribute(String name) {
-        return getAttributeNode(name) != null;
-    }
-
-    /**
-     * Introduced in DOM Level 2.
-     */
-    public boolean hasAttributeNS(String namespaceURI, String localName) {
-        return getAttributeNodeNS(namespaceURI, localName) != null;
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     * Returns a NodeList of all the Elements with a given local name and
-     * namespace URI in the order in which they would be encountered in a
-     * preorder traversal of the Document tree, starting from this node.
-     *
-     * @param namespaceURI The namespace URI of the elements to match
-     *                     on. The special value "*" matches all
-     *                     namespaces. When it is null or an empty
-     *                     string, this method behaves like
-     *                     getElementsByTagName.
-     * @param localName    The local name of the elements to match on.
-     *                     The special value "*" matches all local names.
-     * @return NodeList    A new NodeList object containing all the matched
-     *                     Elements.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public NodeList getElementsByTagNameNS(String namespaceURI,
-                                           String localName) {
-    	return new DeepNodeListImpl(this, namespaceURI, localName);
-    }
-
-    //
-    // Public methods
-    //
-
-    /**
-     * NON-DOM: Subclassed to flip the attributes' readonly switch as well.
-     * @see NodeImpl#setReadOnly
-     */
-    public void setReadOnly(boolean readOnly, boolean deep) {
-    	super.setReadOnly(readOnly,deep);
-        if (attributes != null) {
-            attributes.setReadOnly(readOnly,true);
-        }
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** Synchronizes the data (name and value) for fast nodes. */
-    protected void synchronizeData() {
-
-        // no need to sync in the future
-        needsSyncData(false);
-
-        // we don't want to generate any event for this so turn them off
-        boolean orig = ownerDocument.getMutationEvents();
-        ownerDocument.setMutationEvents(false);
-
-        // attributes
-        setupDefaultAttributes();
-
-        // set mutation events flag back to its original value
-        ownerDocument.setMutationEvents(orig);
-
-    } // synchronizeData()
-
-    /** Setup the default attributes. */
-    protected void setupDefaultAttributes() {
-        NamedNodeMapImpl defaults = getDefaultAttributes();
-        if (defaults != null) {
-            attributes = new AttributeMap(this, defaults);
-        }
-    }
-
-    /** Reconcile default attributes. */
-    protected void reconcileDefaultAttributes() {
-        NamedNodeMapImpl defaults = getDefaultAttributes();
-        if (defaults != null) {
-            attributes.reconcileDefaults(defaults);
-        }
-    }
-
-    /** Get the default attributes. */
-    protected NamedNodeMapImpl getDefaultAttributes() {
-
-    	DocumentTypeImpl doctype =
-            (DocumentTypeImpl) ownerDocument.getDoctype();
-    	if (doctype == null) {
-            return null;
-        }
-        ElementDefinitionImpl eldef =
-            (ElementDefinitionImpl)doctype.getElements()
-                                               .getNamedItem(getNodeName());
-        if (eldef == null) {
-            return null;
-        }
-        return (NamedNodeMapImpl) eldef.getAttributes();
-
-    } // getDefaultAttributes()
-
-} // class ElementImpl
diff --git a/src/org/apache/xerces/dom/ElementNSImpl.java b/src/org/apache/xerces/dom/ElementNSImpl.java
deleted file mode 100644
index fef7d58..0000000
--- a/src/org/apache/xerces/dom/ElementNSImpl.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-
-
-/**
- * ElementNSImpl inherits from ElementImpl and adds namespace support. 
- * <P>
- * The qualified name is the node name, and we store localName which is also
- * used in all queries. On the other hand we recompute the prefix when
- * necessary.
- */
-public class ElementNSImpl
-    extends ElementImpl {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -9142310625494392642L;
-    static final String xmlURI = "http://www.w3.org/XML/1998/namespace";
-
-    //
-    // Data
-    //
-
-    /** DOM2: Namespace URI. */
-    protected String namespaceURI;
-  
-    /** DOM2: localName. */
-    protected String localName;
-
-    
-    /**
-     * DOM2: Constructor for Namespace implementation.
-     */
-    protected ElementNSImpl(CoreDocumentImpl ownerDocument, 
-			    String namespaceURI,
-			    String qualifiedName) 
-        throws DOMException
-    {
-    	super(ownerDocument, qualifiedName);
-
-        int index = qualifiedName.indexOf(':');
-        String prefix;
-        if (index < 0) {
-            prefix = null;
-            localName = qualifiedName;
-        } 
-        else {
-            prefix = qualifiedName.substring(0, index); 
-            localName = qualifiedName.substring(index+1);
-        
-            if (ownerDocument.errorChecking) {
-                if (namespaceURI == null
-                    || (localName.length() == 0)
-                    || (localName.indexOf(':') >= 0)) {
-                    throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                           "DOM003 Namespace error");
-                }
-                else if (prefix.equals("xml")) {
-                    if (!namespaceURI.equals(xmlURI)) {
-                        throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                               "DOM003 Namespace error");
-                    }
-                } else if (index == 0) {
-                    throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                           "DOM003 Namespace error");
-                }
-            }
-        }
-	this.namespaceURI = namespaceURI;
-    }
-
-    // for DeferredElementImpl
-    protected ElementNSImpl(CoreDocumentImpl ownerDocument, 
-			    String value) {
-	super(ownerDocument, value);
-    }
-
-    //
-    // Node methods
-    //
-
-    
-    //
-    //DOM2: Namespace methods.
-    //
-    
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * The namespace URI of this node, or null if it is unspecified.<p>
-     *
-     * This is not a computed value that is the result of a namespace lookup based on
-     * an examination of the namespace declarations in scope. It is merely the
-     * namespace URI given at creation time.<p>
-     *
-     * For nodes created with a DOM Level 1 method, such as createElement
-     * from the Document interface, this is null.     
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getNamespaceURI()
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return namespaceURI;
-    }
-    
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * The namespace prefix of this node, or null if it is unspecified. <p>
-     *
-     * For nodes created with a DOM Level 1 method, such as createElement
-     * from the Document interface, this is null. <p>
-     *
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String getPrefix()
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        int index = name.indexOf(':');
-        return index < 0 ? null : name.substring(0, index); 
-    }
-    
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * Note that setting this attribute changes the nodeName attribute, which holds the
-     * qualified name, as well as the tagName and name attributes of the Element
-     * and Attr interfaces, when applicable.<p>
-     *
-     * @throws INVALID_CHARACTER_ERR Raised if the specified
-     * prefix contains an invalid character.     
-     *
-     * @since WD-DOM-Level-2-19990923
-     */
-    public void setPrefix(String prefix)
-        throws DOMException
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-	if (ownerDocument().errorChecking) {
-            if (isReadOnly()) {
-                throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                     "DOM001 Modification not allowed");
-            }
-            if (!CoreDocumentImpl.isXMLName(prefix)) {
-                throw new DOMException(DOMException.INVALID_CHARACTER_ERR, 
-    	                               "DOM002 Illegal character");
-            }
-            if (namespaceURI == null || prefix.indexOf(':') >=0) {
-                  throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                         "DOM003 Namespace error");
-            } else if (prefix != null) {
-                if (prefix.equals("xml")) {
-                    if (!namespaceURI.equals(xmlURI)) {
-                        throw new DOMException(DOMException.NAMESPACE_ERR, 
-                                               "DOM003 Namespace error");
-                    }
-                }
-            }
-        }
-        // update node name with new qualifiedName
-        name = prefix + ":" + localName;
-    }
-                                        
-    /** 
-     * Introduced in DOM Level 2. <p>
-     *
-     * Returns the local part of the qualified name of this node.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public String             getLocalName()
-    {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return localName;
-    }
-}
diff --git a/src/org/apache/xerces/dom/EntityImpl.java b/src/org/apache/xerces/dom/EntityImpl.java
deleted file mode 100644
index b9f6b46..0000000
--- a/src/org/apache/xerces/dom/EntityImpl.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Entity;
-import org.w3c.dom.Node;
-
-/**
- * Entity nodes hold the reference data for an XML Entity -- either
- * parsed or unparsed. The nodeName (inherited from Node) will contain
- * the name (if any) of the Entity. Its data will be contained in the
- * Entity's children, in exactly the structure which an
- * EntityReference to this name will present within the document's
- * body.
- * <P>
- * Note that this object models the actual entity, _not_ the entity
- * declaration or the entity reference.
- * <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 EntityReferences in the DOM tree.
- * <P>
- * Quoting the 10/01 DOM Proposal,
- * <BLOCKQUOTE>
- * "The DOM Level 1 does not support editing Entity nodes; if a user
- * wants to make changes to the contents of an Entity, every related
- * EntityReference node has to be replaced in the structure model by
- * a clone of the Entity's contents, and then the desired changes 
- * must be made to each of those clones instead. All the
- * descendants of an Entity node are readonly."
- * </BLOCKQUOTE>
- * I'm interpreting this as: It is the parser's responsibilty to call
- * the non-DOM operation setReadOnly(true,true) after it constructs
- * the Entity. Since the DOM explicitly decided not to deal with this,
- * _any_ answer will involve a non-DOM operation, and this is the
- * simplest solution.
- *
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class EntityImpl 
-    extends ParentNode
-    implements Entity {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -3575760943444303423L;
-    
-    //
-    // Data
-    //
-
-    /** Entity name. */
-    protected String name;
-
-    /** Public identifier. */
-    protected String publicId;
-
-    /** System identifier. */
-    protected String systemId;
-
-    /** Encoding */
-    protected String encoding;
-
-    /** Version */
-    protected String version;
-
-
-    /** Notation name. */
-    protected String notationName;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public EntityImpl(CoreDocumentImpl ownerDoc, String name) {
-    	super(ownerDoc);
-        this.name = name;
-        isReadOnly(true);
-    }
-    
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.ENTITY_NODE;
-    }
-
-    /**
-     * Returns the entity name
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return name;
-    }
-
-    /** Clone node. */
-    public Node cloneNode(boolean deep) {
-        EntityImpl newentity = (EntityImpl)super.cloneNode(deep);
-        newentity.setReadOnly(true, deep);
-        return newentity;
-    }
-
-    //
-    // Entity methods
-    //
-
-    /** 
-     * The public identifier associated with the entity. If not specified,
-     * this will be null. 
-     */
-    public String getPublicId() {
-        
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return publicId;
-
-    } // getPublicId():String
-
-    /** 
-     * The system identifier associated with the entity. If not specified,
-     * this will be null. 
-     */
-    public String getSystemId() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return systemId;
-
-    } // getSystemId():String
-
-    /** 
-      * DOM Level 3 WD - experimental
-      * the version number of this entity, when it is an external parsed entity. 
-      */
-    public String getVersion() {
-
-       if (needsSyncData()) {
-           synchronizeData();
-       }
-       return version;
-
-   } // getVersion():String
-
-
-    /**
-     * DOM Level 3 WD - experimental 
-     * the encoding of this entity, when it is an external parsed entity. 
-     */
-    public String getEncoding() {
-
-       if (needsSyncData()) {
-           synchronizeData();
-       }
-       return encoding;
-
-   } // getVersion():String
-
-
-
-
-
-    /** 
-     * Unparsed entities -- which contain non-XML data -- have a
-     * "notation name" which tells applications how to deal with them.
-     * Parsed entities, which <em>are</em> in XML format, don't need this and
-     * set it to null.  
-     */
-    public String getNotationName() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return notationName;
-
-    } // getNotationName():String
-
-    //
-    // Public methods
-    //
-
-    /**
-     * DOM Level 2: The public identifier associated with the entity. If not specified,
-     * this will be null. */
-    public void setPublicId(String id) {
-        
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	publicId = id;
-
-    } // setPublicId(String)
-
-    /**
-     * DOM Level 3 WD - experimental 
-     * encoding - An attribute specifying, as part of the text declaration, 
-     * the encoding of this entity, when it is an external parsed entity. 
-     * This is null otherwise
-     */
-    public void setEncoding(String value) {
-        
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	encoding = value;
-
-    } // setEncoding (String)
-
-
-    /** 
-      * DOM Level 3 WD - experimental
-      * version - An attribute specifying, as part of the text declaration, 
-      * the version number of this entity, when it is an external parsed entity. 
-      * This is null otherwise
-      */
-    public void setVersion(String value) {
-        
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	version = value;
-
-    } // setVersion (String)
-
-
-    /**
-     * DOM Level 2: The system identifier associated with the entity. If not
-     * specified, this will be null. 
-     */
-    public void setSystemId(String id) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	systemId = id;
-
-    } // setSystemId(String)
-
-    /** 
-     * DOM Level 2: Unparsed entities -- which contain non-XML data -- have a
-     * "notation name" which tells applications how to deal with them.
-     * Parsed entities, which <em>are</em> in XML format, don't need this and
-     * set it to null.  
-     */
-    public void setNotationName(String name) {
-        
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	notationName = name;
-
-    } // setNotationName(String)
-
-} // class EntityImpl
diff --git a/src/org/apache/xerces/dom/EntityReferenceImpl.java b/src/org/apache/xerces/dom/EntityReferenceImpl.java
deleted file mode 100644
index 3676df8..0000000
--- a/src/org/apache/xerces/dom/EntityReferenceImpl.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * EntityReference models the XML &entityname; syntax, when used for
- * entities defined by the DOM. Entities hardcoded into XML, such as
- * character entities, should instead have been translated into text
- * by the code which generated the DOM tree.
- * <P>
- * An XML processor has the alternative of fully expanding Entities
- * into the normal document tree. If it does so, no EntityReference nodes
- * will appear.
- * <P>
- * Similarly, non-validating XML processors are not required to read
- * or process entity declarations made in the external subset or
- * declared in external parameter entities. Hence, some applications
- * may not make the replacement value available for Parsed Entities 
- * of these types.
- * <P>
- * EntityReference behaves as a read-only node, and the children of 
- * the EntityReference (which reflect those of the Entity, and should
- * also be read-only) give its replacement value, if any. They are 
- * supposed to automagically stay in synch if the DocumentType is 
- * updated with new values for the Entity.
- * <P>
- * The defined behavior makes efficient storage difficult for the DOM
- * implementor. We can't just look aside to the Entity's definition
- * in the DocumentType since those nodes have the wrong parent (unless
- * we can come up with a clever "imaginary parent" mechanism). We
- * must at least appear to clone those children... which raises the
- * issue of keeping the reference synchronized with its parent.
- * This leads me back to the "cached image of centrally defined data"
- * solution, much as I dislike it.
- * <P>
- * For now I have decided, since REC-DOM-Level-1-19980818 doesn't
- * cover this in much detail, that synchronization doesn't have to be
- * considered while the user is deep in the tree. That is, if you're
- * looking within one of the EntityReferennce's children and the Entity
- * changes, you won't be informed; instead, you will continue to access
- * the same object -- which may or may not still be part of the tree.
- * This is the same behavior that obtains elsewhere in the DOM if the
- * subtree you're looking at is deleted from its parent, so it's
- * acceptable here. (If it really bothers folks, we could set things
- * up so deleted subtrees are walked and marked invalid, but that's
- * not part of the DOM's defined behavior.)
- * <P>
- * As a result, only the EntityReference itself has to be aware of
- * changes in the Entity. And it can take advantage of the same
- * structure-change-monitoring code I implemented to support
- * DeepNodeList.
- * 
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @author Andy Clark, IBM
- * @author Ralf Pfeiffer, IBM
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class EntityReferenceImpl 
-    extends ParentNode
-    implements EntityReference {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -7381452955687102062L;
-    
-    //
-    // Data
-    //
-
-    /** Name of Entity referenced */
-    protected String name;
-
-    /** Entity changes. */
-	//protected int entityChanges = -1;	
-
-    /** Enable synchronize. */
-    //protected boolean fEnableSynchronize = false;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public EntityReferenceImpl(CoreDocumentImpl ownerDoc, String name) {
-    	super(ownerDoc);
-        this.name = name;
-        isReadOnly(true);
-        needsSyncChildren(true);
-    }
-    
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.ENTITY_REFERENCE_NODE;
-    }
-
-    /**
-     * Returns the name of the entity referenced
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return name;
-    }
-
-    /** Clone node. */
-    public Node cloneNode(boolean deep) {
-        EntityReferenceImpl er = (EntityReferenceImpl)super.cloneNode(deep);
-        er.setReadOnly(true, deep);
-        return er;
-    }
-
-    /**
-     * EntityReference's children are a reflection of those defined in the
-     * named Entity. This method creates them if they haven't been created yet.
-     * This doesn't support editing the Entity though, since this only called
-     * once for all.
-     */
-    protected void synchronizeChildren() {
-        // no need to synchronize again
-        needsSyncChildren(false);
-
-    	DocumentType doctype;
-    	NamedNodeMap entities;
-    	EntityImpl entDef;
-    	if (null != (doctype = getOwnerDocument().getDoctype()) && 
-            null != (entities = doctype.getEntities())) {
-            
-            entDef = (EntityImpl)entities.getNamedItem(getNodeName());
-
-            // No Entity by this name, stop here.
-            if (entDef == null)
-                return;
-
-            // If entity's definition exists, clone its kids
-            isReadOnly(false);
-            for (Node defkid = entDef.getFirstChild();
-                 defkid != null;
-                 defkid = defkid.getNextSibling()) {
-                Node newkid = defkid.cloneNode(true);
-                insertBefore(newkid, null);
-            }
-            setReadOnly(true, true);
-    	}
-    }
-
-
-    /**
-     * Enable the synchronize method which may do cloning. This method is enabled
-     * when the parser is done with an EntityReference.
-    /***
-    // revisit: enable editing of Entity
-    public void enableSynchronize(boolean enableSynchronize) {
-        fEnableSynchronize= enableSynchronize;
-    }
-    /***/
-
-    /**
-     * EntityReference's children are a reflection of those defined in the
-     * named Entity. This method updates them if the Entity is changed.
-     * <P>
-     * It is unclear what the least-cost resynch mechanism is.
-     * If we expect the kids to be shallow, and/or expect changes
-     * to the Entity contents to be rare, wiping them all out
-     * and recloning is simplest.
-     * <P>
-     * If we expect them to be deep,
-     * it might be better to first decide which kids (if any)
-     * persist, and keep the ones (if any) that are unchanged
-     * rather than doing all the work of cloning them again.
-     * But that latter gets into having to convolve the two child lists,
-     * insert new information in the right order (and possibly reorder
-     * the existing kids), and a few other complexities that I really
-     * don't want to deal with in this implementation.
-     * <P>
-     * Note that if we decide that we need to update the EntityReference's
-     * contents, we have to turn off the readOnly flag temporarily to do so.
-     * When we get around to adding multitasking support, this whole method
-     * should probably be an atomic operation.
-     * 
-     * @see DocumentTypeImpl
-     * @see EntityImpl
-     */
-     // The Xerces parser invokes callbacks for startEnityReference
-     // the parsed value of the entity EACH TIME, so it is actually 
-     // easier to create the nodes through the callbacks rather than
-     // clone the Entity.
-    /***
-    // revisit: enable editing of Entity
-    private void synchronize() {
-        if (!fEnableSynchronize) {
-            return;
-        }
-    	DocumentType doctype;
-    	NamedNodeMap entities;
-    	EntityImpl entDef;
-    	if (null != (doctype = getOwnerDocument().getDoctype()) && 
-    		null != (entities = doctype.getEntities())) {
-            
-    		entDef = (EntityImpl)entities.getNamedItem(getNodeName());
-
-    		// No Entity by this name. If we had a change count, reset it.
-    		if(null==entDef)
-    			entityChanges=-1;
-
-    		// If no kids availalble, wipe any pre-existing children.
-    		// (See discussion above.)
-    		// Note that we have to use the superclass to avoid recursion
-    		// through Synchronize.
-    		readOnly=false;
-    		if(null==entDef || !entDef.hasChildNodes())
-    			for(Node kid=super.getFirstChild();
-    				kid!=null;
-    				kid=super.getFirstChild())
-    				removeChild(kid);
-
-    		// If entity's definition changed, clone its kids
-    		// (See discussion above.)
-    		if(null!=entDef && entDef.changes!=entityChanges) {
-    			for(Node defkid=entDef.getFirstChild();
-    				defkid!=null;
-    				defkid=defkid.getNextSibling()) {
-                    
-    				NodeImpl newkid=(NodeImpl) defkid.cloneNode(true);
-    				newkid.setReadOnly(true,true);
-    				insertBefore(newkid,null);
-    			}
-    			entityChanges=entDef.changes;
-    		}
-    		readOnly=true;
-    	}
-    }
-     /***/
-    
-} // class EntityReferenceImpl
diff --git a/src/org/apache/xerces/dom/LCount.java b/src/org/apache/xerces/dom/LCount.java
deleted file mode 100644
index 919c118..0000000
--- a/src/org/apache/xerces/dom/LCount.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.dom;
-
-import java.util.Vector;
-
-/** Internal class LCount is used to track the number of
-    listeners registered for a given event name, as an entry
-    in a global hashtable. This should allow us to avoid generating,
-    or discard, events for which no listeners are registered. 
-    
-    ***** There should undoubtedly be methods here to manipulate
-    this table. At the moment that code's residing in NodeImpl.
-    Move it when we have a chance to do so. Sorry; we were
-    rushed.
-    
-    ***** Also, I'm currently asking "are there any listeners"
-    by testing captures+bubbles+defaults =? 0. It would probably
-    make sense to have a separate "total" field, calculated at
-    add/remove, to save a few cycles during dispatch. Fix.
-    
-    ???? CONCERN: Hashtables are known to be "overserialized" in
-    current versions of Java. That may impact performance.
-    
-    ???? CONCERN: The hashtable should probably be a per-document object.
-    Finer granularity would be even better, but would cost more cycles to
-    resolve and might not save enough event traffic to be worth the investment.
-*/
-class LCount 
-{ 
-    static java.util.Hashtable lCounts=new java.util.Hashtable();
-    public int captures=0,bubbles=0,defaults=0;
-
-    static LCount lookup(String evtName)
-    {
-        LCount lc=(LCount)lCounts.get(evtName);
-        if(lc==null)
-            lCounts.put(evtName,(lc=new LCount()));
-        return lc;	        
-    }
-} // class LCount
diff --git a/src/org/apache/xerces/dom/NamedNodeMapImpl.java b/src/org/apache/xerces/dom/NamedNodeMapImpl.java
deleted file mode 100644
index 2a5f757..0000000
--- a/src/org/apache/xerces/dom/NamedNodeMapImpl.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.io.Serializable;
-import java.util.Vector;
-import java.util.Enumeration;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * NamedNodeMaps represent collections of Nodes that can be accessed
- * by name. Entity and Notation nodes are stored in NamedNodeMaps
- * attached to the DocumentType. Attributes are placed in a NamedNodeMap
- * attached to the elem they're related too. However, because attributes
- * require more work, such as firing mutation events, they are stored in
- * a subclass of NamedNodeMapImpl.
- * <P>
- * Only one Node may be stored per name; attempting to
- * store another will replace the previous value.
- * <P>
- * NOTE: The "primary" storage key is taken from the NodeName attribute of the
- * node. The "secondary" storage key is the namespaceURI and localName, when
- * accessed by DOM level 2 nodes. All nodes, even DOM Level 2 nodes are stored
- * in a single Vector sorted by the primary "nodename" key.
- * <P>
- * NOTE: item()'s integer index does _not_ imply that the named nodes
- * must be stored in an array; that's only an access method. Note too
- * that these indices are "live"; if someone changes the map's
- * contents, the indices associated with nodes may change.
- * <P>
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class NamedNodeMapImpl
-    implements NamedNodeMap, Serializable {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -7039242451046758020L;
-
-    //
-    // Data
-    //
-
-    protected short flags;
-
-    protected final static short READONLY     = 0x1<<0;
-    protected final static short CHANGED      = 0x1<<1;
-    protected final static short HASDEFAULTS  = 0x1<<2;
-
-    /** Nodes. */
-    protected Vector nodes;
-
-    protected NodeImpl ownerNode; // the node this map belongs to
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a named node map. */
-    protected NamedNodeMapImpl(NodeImpl ownerNode) {
-        this.ownerNode = ownerNode;
-    }
-
-    //
-    // NamedNodeMap methods
-    //
-
-    /**
-     * Report how many nodes are currently stored in this NamedNodeMap.
-     * Caveat: This is a count rather than an index, so the
-     * highest-numbered node at any time can be accessed via
-     * item(getLength()-1).
-     */
-    public int getLength() {
-    	return (nodes != null) ? nodes.size() : 0;
-    }
-
-    /**
-     * Retrieve an item from the map by 0-based index.
-     *
-     * @param index Which item to retrieve. Note that indices are just an
-     * enumeration of the current contents; they aren't guaranteed to be
-     * stable, nor do they imply any promises about the order of the
-     * NamedNodeMap's contents. In other words, DO NOT assume either that
-     * index(i) will always refer to the same entry, or that there is any
-     * stable ordering of entries... and be prepared for double-reporting
-     * or skips as insertion and deletion occur.
-     *
-     * @returns the node which currenly has the specified index, or null
-     * if index is greater than or equal to getLength().
-     */
-    public Node item(int index) {
-    	return (nodes != null && index < nodes.size()) ?
-                    (Node)(nodes.elementAt(index)) : null;
-    }
-
-    /**
-     * Retrieve a node by name.
-     *
-     * @param name Name of a node to look up.
-     * @returns the Node (of unspecified sub-class) stored with that name,
-     * or null if no value has been assigned to that name.
-     */
-    public Node getNamedItem(String name) {
-
-    	int i = findNamePoint(name,0);
-        return (i < 0) ? null : (Node)(nodes.elementAt(i));
-
-    } // getNamedItem(String):Node
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Retrieves a node specified by local name and namespace URI.
-     *
-     * @param namespaceURI  The namespace URI of the node to retrieve.
-     *                      When it is null or an empty string, this
-     *                      method behaves like getNamedItem.
-     * @param localName     The local name of the node to retrieve.
-     * @return Node         A Node (of any type) with the specified name, or null if the specified
-     *                      name did not identify any node in the map.
-     */
-    public Node getNamedItemNS(String namespaceURI, String localName) {
-
-    	int i = findNamePoint(namespaceURI, localName);
-        return (i < 0) ? null : (Node)(nodes.elementAt(i));
-
-    } // getNamedItemNS(String,String):Node
-
-    /**
-     * Adds a node using its nodeName attribute.
-     * As the nodeName 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.
-     * @see org.w3c.dom.NamedNodeMap#setNamedItem
-     * @return If the new Node replaces an existing node the replaced Node is returned,
-     *      otherwise null is returned. 
-     * @param arg 
-     *      A node to store in a named node map. The node will later be
-     *      accessible using the value of the namespaceURI and localName
-     *      attribute of the node. If a node with those namespace URI and
-     *      local name is already present in the map, it is replaced by the new
-     *      one.
-     * @exception org.w3c.dom.DOMException The exception description.
-     */
-    public Node setNamedItem(Node arg)
-        throws DOMException {
-
-    	if (isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                       "DOM001 Modification not allowed");
-        }
-    	if (arg.getOwnerDocument() != ownerNode.ownerDocument()) {
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,
-                                       "DOM005 Wrong document");
-        }
-
-   	int i = findNamePoint(arg.getNodeName(),0);
-    	NodeImpl previous = null;
-    	if (i >= 0) {
-            previous = (NodeImpl) nodes.elementAt(i);
-            nodes.setElementAt(arg,i);
-    	} else {
-            i = -1 - i; // Insert point (may be end of list)
-            if (null == nodes) {
-                nodes = new Vector(5, 10);
-            }
-            nodes.insertElementAt(arg, i);
-        }
-    	return previous;
-
-    } // setNamedItem(Node):Node
-
-    /**
-     * Adds a node using its namespaceURI and localName.
-     * @see org.w3c.dom.NamedNodeMap#setNamedItem
-     * @return If the new Node replaces an existing node the replaced Node is returned,
-     *      otherwise null is returned. 
-     * @param arg A node to store in a named node map. The node will later be
-     *      accessible using the value of the namespaceURI and localName
-     *      attribute of the node. If a node with those namespace URI and
-     *      local name is already present in the map, it is replaced by the new
-     *      one.
-     */
-    public Node setNamedItemNS(Node arg)
-        throws DOMException {
-
-    	if (isReadOnly()) {
-            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                       "DOM001 Modification not allowed");
-        }
-    
-    	if(arg.getOwnerDocument() != ownerNode.ownerDocument()) {
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,
-                                       "DOM005 Wrong document");
-        }
-
-    	int i = findNamePoint(arg.getNamespaceURI(), arg.getLocalName());
-    	NodeImpl previous = null;
-    	if (i >= 0) {
-            previous = (NodeImpl) nodes.elementAt(i);
-            nodes.setElementAt(arg,i);
-    	} else {
-    	    // If we can't find by namespaceURI, localName, then we find by
-    	    // nodeName so we know where to insert.
-    	    i = findNamePoint(arg.getNodeName(),0);
-            if (i >=0) {
-                previous = (NodeImpl) nodes.elementAt(i);
-                nodes.insertElementAt(arg,i);
-            } else {
-                i = -1 - i; // Insert point (may be end of list)
-                if (null == nodes) {
-                    nodes = new Vector(5, 10);
-                }
-                nodes.insertElementAt(arg, i);
-            }
-        }
-    	return previous;
-
-    } // setNamedItem(Node):Node
-   
-    /**
-     * Removes a node specified by name.
-     * @param name The name of a node to remove.
-     * @return The node removed from the map if a node with such a name exists.
-     */
-    /***/
-    public Node removeNamedItem(String name)
-        throws DOMException {
-
-    	if (isReadOnly()) {
-            throw
-                new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                     "DOM001 Modification not allowed");
-        }
-    	int i = findNamePoint(name,0);
-    	if (i < 0) {
-            throw new DOMException(DOMException.NOT_FOUND_ERR,
-                                       "DOM008 Not found");
-        }
-
-        NodeImpl n = (NodeImpl)nodes.elementAt(i);
-        nodes.removeElementAt(i);
-
-        return n;
-
-    } // removeNamedItem(String):Node
-    
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Removes a node specified by local name and namespace URI.
-     * @param namespaceURI
-     *                      The namespace URI of the node to remove.
-     *                      When it is null or an empty string, this
-     *                      method behaves like removeNamedItem.
-     * @param               The local name of the node to remove.
-     * @return Node         The node removed from the map if a node with such
-     *                      a local name and namespace URI exists.
-     * @throws              NOT_FOUND_ERR: Raised if there is no node named
-     *                      name in the map.
-
-     */
-     public Node removeNamedItemNS(String namespaceURI, String name)
-        throws DOMException {
-
-    	if (isReadOnly()) {
-            throw
-                new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
-                                     "DOM001 Modification not allowed");
-        }
-    	int i = findNamePoint(namespaceURI, name);
-    	if (i < 0) {
-            throw new DOMException(DOMException.NOT_FOUND_ERR,
-                                       "DOM008 Not found");
-        }
-
-        NodeImpl n = (NodeImpl)nodes.elementAt(i);
-        nodes.removeElementAt(i);
-
-        return n;
-
-    } // removeNamedItem(String):Node
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Cloning a NamedNodeMap is a DEEP OPERATION; it always clones
-     * all the nodes contained in the map.
-     */
-     
-    public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) {
-    	NamedNodeMapImpl newmap = new NamedNodeMapImpl(ownerNode);
-        newmap.cloneContent(this);
-    	return newmap;
-    }
-
-    protected void cloneContent(NamedNodeMapImpl srcmap) {
-    	if (srcmap.nodes != null) {
-            nodes = new Vector(srcmap.nodes.size());
-            for (int i = 0; i < srcmap.nodes.size(); ++i) {
-                NodeImpl n = (NodeImpl) srcmap.nodes.elementAt(i);
-                NodeImpl clone = (NodeImpl) n.cloneNode(true);
-                clone.isSpecified(n.isSpecified());
-                nodes.insertElementAt(clone, i);
-            }
-        }
-    } // cloneMap():NamedNodeMapImpl
-
-    //
-    // Package methods
-    //
-
-    /**
-     * Internal subroutine to allow read-only Nodes to make their contained
-     * NamedNodeMaps readonly too. I expect that in fact the shallow
-     * version of this operation will never be
-     *
-     * @param readOnly boolean true to make read-only, false to permit editing.
-     * @param deep boolean true to pass this request along to the contained
-     * nodes, false to only toggle the NamedNodeMap itself. I expect that
-     * the shallow version of this operation will never be used, but I want
-     * to design it in now, while I'm thinking about it.
-     */
-    void setReadOnly(boolean readOnly, boolean deep) {
-
-        isReadOnly(readOnly);
-    	if(deep && nodes != null) {
-    		Enumeration e=nodes.elements();
-    		while(e.hasMoreElements()) {
-    			((NodeImpl)e.nextElement()).setReadOnly(readOnly,deep);
-            }
-    	}
-
-    } // setReadOnly(boolean,boolean)
-    
-    /**
-     * Internal subroutine returns this NodeNameMap's (shallow) readOnly value.
-     *
-     */
-    boolean getReadOnly() {
-    	return isReadOnly();
-    } // getReadOnly()
-    
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * NON-DOM
-     * set the ownerDocument of this node, and the attributes it contains
-     */
-    void setOwnerDocument(CoreDocumentImpl doc) {
-        if (nodes != null) {
-            for (int i = 0; i < nodes.size(); i++) {
-                ((NodeImpl)item(i)).setOwnerDocument(doc);
-            }
-        }
-    }
-
-    final boolean isReadOnly() {
-        return (flags & READONLY) != 0;
-    }
-
-    final void isReadOnly(boolean value) {
-        flags = (short) (value ? flags | READONLY : flags & ~READONLY);
-    }
-
-    final boolean changed() {
-        return (flags & CHANGED) != 0;
-    }
-
-    final void changed(boolean value) {
-        flags = (short) (value ? flags | CHANGED : flags & ~CHANGED);
-    }
-
-    final boolean hasDefaults() {
-        return (flags & HASDEFAULTS) != 0;
-    }
-
-    final void hasDefaults(boolean value) {
-        flags = (short) (value ? flags | HASDEFAULTS : flags & ~HASDEFAULTS);
-    }
-
-    //
-    // Private methods
-    //
-
-    /**
-     * Subroutine: Locate the named item, or the point at which said item
-     * should be added. 
-     *
-     * @param name Name of a node to look up.
-     *
-     * @return If positive or zero, the index of the found item.
-     * If negative, index of the appropriate point at which to insert
-     * the item, encoded as -1-index and hence reconvertable by subtracting
-     * it from -1. (Encoding because I don't want to recompare the strings
-     * but don't want to burn bytes on a datatype to hold a flagged value.)
-     */
-    protected int findNamePoint(String name, int start) {
-
-    	// Binary search
-    	int i = 0;
-    	if(nodes != null) {
-    		int first = start;
-            int last  = nodes.size() - 1;
-
-    		while (first <= last) {
-    			i = (first + last) / 2;
-    			int test = name.compareTo(((Node)(nodes.elementAt(i))).getNodeName());
-    			if(test == 0) {
-    				return i; // Name found
-                }
-    			else if (test < 0) {
-    				last = i - 1;
-                }
-    			else {
-    				first = i + 1;
-                }
-    		}
-
-    		if (first > i) {
-                i = first;
-            }
-    	}
-
-    	return -1 - i; // not-found has to be encoded.
-
-    } // findNamePoint(String):int
-
-    
-    /** This findNamePoint is for DOM Level 2 Namespaces.
-     */
-    protected int findNamePoint(String namespaceURI, String name) {
-        
-        if (nodes == null) return -1;
-        if (name == null) return -1;
-        
-        // This is a linear search through the same nodes Vector.
-        // The Vector is sorted on the DOM Level 1 nodename.
-        // The DOM Level 2 NS keys are namespaceURI and Localname, 
-        // so we must linear search thru it.
-        // In addition, to get this to work with nodes without any namespace
-        // (namespaceURI and localNames are both null) we then use the nodeName
-        // as a seconday key.
-        for (int i = 0; i < nodes.size(); i++) {
-            NodeImpl a = (NodeImpl)nodes.elementAt(i);
-            String aNamespaceURI = a.getNamespaceURI();
-            String aLocalName = a.getLocalName();
-            if (namespaceURI == null) {
-              if (aNamespaceURI == null
-                  &&
-                  (name.equals(aLocalName)
-                   ||
-                   (aLocalName == null && name.equals(a.getNodeName()))))
-                return i;
-            } else {
-              if (namespaceURI.equals(aNamespaceURI)
-                  &&
-                  name.equals(aLocalName))
-                return i;
-            }
-        }
-        return -1;
-    }
-    
-
-} // class NamedNodeMapImpl
diff --git a/src/org/apache/xerces/dom/NodeImpl.java b/src/org/apache/xerces/dom/NodeImpl.java
deleted file mode 100644
index c92ebf8..0000000
--- a/src/org/apache/xerces/dom/NodeImpl.java
+++ /dev/null
@@ -1,1222 +0,0 @@
- /*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventListener;
-import org.w3c.dom.events.EventTarget;
-
-import org.apache.xerces.dom3.Node3;
-import org.apache.xerces.dom3.UserDataHandler;
-
-/**
- * NodeImpl provides the basic structure of a DOM tree. It is never used
- * directly, but instead is subclassed to add type and data
- * information, and additional methods, appropriate to each node of
- * the tree. Only its subclasses should be instantiated -- and those,
- * with the exception of Document itself, only through a specific
- * Document's factory methods.
- * <P>
- * The Node interface provides shared behaviors such as siblings and
- * children, both for consistancy and so that the most common tree
- * operations may be performed without constantly having to downcast
- * to specific node types. When there is no obvious mapping for one of
- * these queries, it will respond with null.
- * Note that the default behavior is that children are forbidden. To
- * permit them, the subclass ParentNode overrides several methods.
- * <P>
- * NodeImpl also implements NodeList, so it can return itself in
- * response to the getChildNodes() query. This eliminiates the need
- * for a separate ChildNodeList object. Note that this is an
- * IMPLEMENTATION DETAIL; applications should _never_ assume that
- * this identity exists.
- * <P>
- * All nodes in a single document must originate
- * in that document. (Note that this is much tighter than "must be
- * same implementation") Nodes are all aware of their ownerDocument,
- * and attempts to mismatch will throw WRONG_DOCUMENT_ERR.
- * <P>
- * However, to save memory not all nodes always have a direct reference
- * to their ownerDocument. When a node is owned by another node it relies
- * on its owner to store its ownerDocument. Parent nodes always store it
- * though, so there is never more than one level of indirection.
- * And when a node doesn't have an owner, ownerNode refers to its
- * ownerDocument.
- * <p>
- * This class doesn't directly support mutation events, however, it still
- * implements the EventTarget interface and forward all related calls to the
- * document so that the document class do so.
- *
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public abstract class NodeImpl
-    implements Node, NodeList, EventTarget, Cloneable, Serializable, Node3 {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -6316591992167219696L;
-
-    // public
-
-    /** Element definition node type. */
-    public static final short ELEMENT_DEFINITION_NODE = -1;
-
-    //
-    // Data
-    //
-
-    // links
-
-    protected NodeImpl ownerNode; // typically the parent but not always!
-
-    // data
-
-    protected short flags;
-
-    protected final static short READONLY     = 0x1<<0;
-    protected final static short SYNCDATA     = 0x1<<1;
-    protected final static short SYNCCHILDREN = 0x1<<2;
-    protected final static short OWNED        = 0x1<<3;
-    protected final static short FIRSTCHILD   = 0x1<<4;
-    protected final static short SPECIFIED    = 0x1<<5;
-    protected final static short IGNORABLEWS  = 0x1<<6;
-    protected final static short HASSTRING    = 0x1<<7;
-    protected final static short UNNORMALIZED = 0x1<<8;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * No public constructor; only subclasses of Node should be
-     * instantiated, and those normally via a Document's factory methods
-     * <p>
-     * Every Node knows what Document it belongs to.
-     */
-    protected NodeImpl(CoreDocumentImpl ownerDocument) {
-        // as long as we do not have any owner, ownerNode is our ownerDocument
-        ownerNode = ownerDocument;
-    } // <init>(CoreDocumentImpl)
-
-    /** Constructor for serialization. */
-    public NodeImpl() {}
-
-    //
-    // Node methods
-    //
-
-    /**
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public abstract short getNodeType();
-
-    /**
-     * the name of this node.
-     */
-    public abstract String getNodeName();
-    
-    /**
-     * Returns the node value.
-     */
-    public String getNodeValue() {
-        return null;            // overridden in some subclasses
-    }
-
-    /**
-     * Sets the node value.
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR)
-     */
-    public void setNodeValue(String x) 
-        throws DOMException {
-        // Default behavior is to do nothing, overridden in some subclasses
-    }
-
-    /**
-     * Adds a child node to the end of the list of children for this node.
-     * Convenience shorthand for insertBefore(newChild,null).
-     * @see #insertBefore(Node, Node)
-     * <P>
-     * By default we do not accept any children, ParentNode overrides this.
-     * @see ParentNode
-     *
-     * @returns newChild, in its new state (relocated, or emptied in the
-     * case of DocumentNode.)
-     *
-     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
-     * type that shouldn't be a child of this node.
-     *
-     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
-     * different owner document than we do.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node appendChild(Node newChild) throws DOMException {
-    	return insertBefore(newChild, null);
-    }
-
-    /**
-     * Returns a duplicate of a given node. You can consider this a
-     * generic "copy constructor" for nodes. The newly returned object should
-     * be completely independent of the source object's subtree, so changes
-     * in one after the clone has been made will not affect the other.
-     * <P>
-     * Note: since we never have any children deep is meaningless here,
-     * ParentNode overrides this behavior.
-     * @see ParentNode
-     *
-     * <p>
-     * Example: Cloning a Text node will copy both the node and the text it
-     * contains.
-     * <p>
-     * Example: Cloning something that has children -- Element or Attr, for
-     * example -- will _not_ clone those children unless a "deep clone"
-     * has been requested. A shallow clone of an Attr node will yield an
-     * empty Attr of the same name.
-     * <p>
-     * NOTE: Clones will always be read/write, even if the node being cloned
-     * is read-only, to permit applications using only the DOM API to obtain
-     * editable copies of locked portions of the tree.
-     */
-    public Node cloneNode(boolean deep) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-	}
-    	
-    	NodeImpl newnode;
-    	try {
-            newnode = (NodeImpl)clone();
-    	}
-    	catch (CloneNotSupportedException e) {
-            // if we get here we have an error in our program we may as well
-            // be vocal about it, so that people can take appropriate action.
-            throw new RuntimeException("**Internal Error**" + e);
-    	}
-    	
-        // Need to break the association w/ original kids
-    	newnode.ownerNode      = ownerDocument();
-        newnode.isOwned(false);
-
-        // By default we make all clones readwrite,
-        // this is overriden in readonly subclasses
-        newnode.isReadOnly(false);
-
-        ownerDocument().callUserDataHandlers(this, newnode,
-                                             UserDataHandler.NODE_CLONED);
-
-    	return newnode;
-
-    } // cloneNode(boolean):Node
-
-    /**
-     * Find the Document that this Node belongs to (the document in
-     * whose context the Node was created). The Node may or may not
-     * currently be part of that Document's actual contents.
-     */
-    public Document getOwnerDocument() {
-        // if we have an owner simply forward the request
-        // otherwise ownerNode is our ownerDocument
-        if (isOwned()) {
-            return ownerNode.ownerDocument();
-        } else {
-            return (Document) ownerNode;
-        }
-    }
-
-    /**
-     * same as above but returns internal type and this one is not overridden
-     * by CoreDocumentImpl to return null 
-     */
-    CoreDocumentImpl ownerDocument() {
-        // if we have an owner simply forward the request
-        // otherwise ownerNode is our ownerDocument
-        if (isOwned()) {
-            return ownerNode.ownerDocument();
-        } else {
-            return (CoreDocumentImpl) ownerNode;
-        }
-    }
-
-    /**
-     * NON-DOM
-     * set the ownerDocument of this node
-     */
-    void setOwnerDocument(CoreDocumentImpl doc) {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        // if we have an owner we rely on it to have it right
-        // otherwise ownerNode is our ownerDocument
-	if (!isOwned()) {
-            ownerNode = doc;
-        }
-    }
-
-    /**
-     * Obtain the DOM-tree parent of this node, or null if it is not
-     * currently active in the DOM tree (perhaps because it has just been
-     * created or removed). Note that Document, DocumentFragment, and
-     * Attribute will never have parents.
-     */
-    public Node getParentNode() {
-        return null;            // overriden by ChildNode
-    }
-
-    /*
-     * same as above but returns internal type
-     */
-    NodeImpl parentNode() {
-        return null;
-    }
-
-    /** The next child of this node's parent, or null if none */
-    public Node getNextSibling() {
-        return null;            // default behavior, overriden in ChildNode
-    }
-
-    /** The previous child of this node's parent, or null if none */
-    public Node getPreviousSibling() {
-        return null;            // default behavior, overriden in ChildNode
-    }
-
-    ChildNode previousSibling() {
-        return null;            // default behavior, overriden in ChildNode
-    }
-
-    /**
-     * Return the collection of attributes associated with this node,
-     * or null if none. At this writing, Element is the only type of node
-     * which will ever have attributes.
-     *
-     * @see ElementImpl
-     */
-    public NamedNodeMap getAttributes() {
-    	return null; // overridden in ElementImpl
-    }
-
-    /**
-     *  Returns whether this node (if it is an element) has any attributes.
-     * @return <code>true</code> if this node has any attributes, 
-     *   <code>false</code> otherwise.
-     * @since DOM Level 2
-     * @see ElementImpl
-     */
-    public boolean hasAttributes() {
-        return false;           // overridden in ElementImpl
-    }
-
-    /**
-     * Test whether this node has any children. Convenience shorthand
-     * for (Node.getFirstChild()!=null)
-     * <P>
-     * By default we do not have any children, ParentNode overrides this.
-     * @see ParentNode
-     */
-    public boolean hasChildNodes() {
-        return false;
-    }
-
-    /**
-     * Obtain a NodeList enumerating all children of this node. If there
-     * are none, an (initially) empty NodeList is returned.
-     * <p>
-     * NodeLists are "live"; as children are added/removed the NodeList
-     * will immediately reflect those changes. Also, the NodeList refers
-     * to the actual nodes, so changes to those nodes made via the DOM tree
-     * will be reflected in the NodeList and vice versa.
-     * <p>
-     * In this implementation, Nodes implement the NodeList interface and
-     * provide their own getChildNodes() support. Other DOMs may solve this
-     * differently.
-     */
-    public NodeList getChildNodes() {
-        return this;
-    }
-
-    /** The first child of this Node, or null if none.
-     * <P>
-     * By default we do not have any children, ParentNode overrides this.
-     * @see ParentNode
-     */
-    public Node getFirstChild() {
-    	return null;
-    }
-
-    /** The first child of this Node, or null if none.
-     * <P>
-     * By default we do not have any children, ParentNode overrides this.
-     * @see ParentNode
-     */
-    public Node getLastChild() {
-	return null;
-    }
-
-    /**
-     * Move one or more node(s) to our list of children. Note that this
-     * implicitly removes them from their previous parent.
-     * <P>
-     * By default we do not accept any children, ParentNode overrides this.
-     * @see ParentNode
-     *
-     * @param newChild The Node to be moved to our subtree. As a
-     * convenience feature, inserting a DocumentNode will instead insert
-     * all its children.
-     *
-     * @param refChild Current child which newChild should be placed
-     * immediately before. If refChild is null, the insertion occurs
-     * after all existing Nodes, like appendChild().
-     *
-     * @returns newChild, in its new state (relocated, or emptied in the
-     * case of DocumentNode.)
-     *
-     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
-     * type that shouldn't be a child of this node, or if newChild is an
-     * ancestor of this node.
-     *
-     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
-     * different owner document than we do.
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if refChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node insertBefore(Node newChild, Node refChild) 
-	throws DOMException {
-	throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-				   "DOM006 Hierarchy request error");
-    }
-
-    /**
-     * Remove a child from this Node. The removed child's subtree
-     * remains intact so it may be re-inserted elsewhere.
-     * <P>
-     * By default we do not have any children, ParentNode overrides this.
-     * @see ParentNode
-     *
-     * @return oldChild, in its new state (removed).
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node removeChild(Node oldChild) 
-		throws DOMException {
-	throw new DOMException(DOMException.NOT_FOUND_ERR, 
-				   "DOM008 Not found");
-    }
-
-    /**
-     * Make newChild occupy the location that oldChild used to
-     * have. Note that newChild will first be removed from its previous
-     * parent, if any. Equivalent to inserting newChild before oldChild,
-     * then removing oldChild.
-     * <P>
-     * By default we do not have any children, ParentNode overrides this.
-     * @see ParentNode
-     *
-     * @returns oldChild, in its new state (removed).
-     *
-     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
-     * type that shouldn't be a child of this node, or if newChild is
-     * one of our ancestors.
-     *
-     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
-     * different owner document than we do.
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node replaceChild(Node newChild, Node oldChild)
-        throws DOMException {
-	throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-				   "DOM006 Hierarchy request error");
-    }
-
-    //
-    // NodeList methods
-    //
-
-    /**
-     * NodeList method: Count the immediate children of this node
-     * <P>
-     * By default we do not have any children, ParentNode overrides this.
-     * @see ParentNode
-     *
-     * @return int
-     */
-    public int getLength() {
-	return 0;
-    }
-
-    /**
-     * NodeList method: Return the Nth immediate child of this node, or
-     * null if the index is out of bounds.
-     * <P>
-     * By default we do not have any children, ParentNode overrides this.
-     * @see ParentNode
-     *
-     * @return org.w3c.dom.Node
-     * @param Index int
-     */
-    public Node item(int index) {
-	return null;
-    }
-
-    //
-    // DOM2: methods, getters, setters
-    //
-
-    /**
-     * 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 markup (e.g., tags, comments, processing 
-     * instructions, CDATA sections, and entity references) separates 
-     * <code>Text</code> nodes, i.e., there are no adjacent <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 lookups) that depend on a particular 
-     * document tree structure are to be used.In cases where the document 
-     * contains <code>CDATASections</code>, the normalize operation alone may 
-     * not be sufficient, since XPointers do not differentiate between 
-     * <code>Text</code> nodes and <code>CDATASection</code> nodes.
-     * <p>
-     * Note that this implementation simply calls normalize() on this Node's
-     * children. It is up to implementors or Node to override normalize()
-     * to take action.
-     */
-    public void normalize() {
-	/* by default we do not have any children,
-	   ParentNode overrides this behavior */
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     * Tests whether the DOM implementation implements a specific feature and
-     * that feature is supported by this node.
-     * @param feature The package name of the feature to test. This is the same
-     * name as what can be passed to the method hasFeature on
-     * DOMImplementation.
-     * @param version This is the version number of the package name to
-     * test. In Level 2, version 1, this is the string "2.0". If the version is
-     * not specified, supporting any version of the feature will cause the
-     * method to return true.
-     * @return boolean Returns true if this node defines a subtree within which
-     * the specified feature is supported, false otherwise.
-     * @since WD-DOM-Level-2-19990923
-     */
-    public boolean isSupported(String feature, String version)
-    {
-        return ownerDocument().getImplementation().hasFeature(feature,
-                                                              version);
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     * The namespace URI of this node, or null if it is unspecified. When this
-     * node is of any type other than ELEMENT_NODE and ATTRIBUTE_NODE, this is
-     * always null and setting it has no effect. <p>
-     *
-     * This is not a computed value that is the result of a namespace lookup
-     * based on an examination of the namespace declarations in scope. It is
-     * merely the namespace URI given at creation time.<p>
-     *
-     * For nodes created with a DOM Level 1 method, such as createElement
-     * from the Document interface, this is null.
-     * @since WD-DOM-Level-2-19990923
-     * @see AttrNSImpl
-     * @see ElementNSImpl
-     */
-    public String getNamespaceURI()
-    {
-        return null;
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     * The namespace prefix of this node, or null if it is unspecified. When
-     * this node is of any type other than ELEMENT_NODE and ATTRIBUTE_NODE this
-     * is always null and setting it has no effect.<p>
-     *
-     * For nodes created with a DOM Level 1 method, such as createElement
-     * from the Document interface, this is null. <p>
-     *
-     * @since WD-DOM-Level-2-19990923
-     * @see AttrNSImpl
-     * @see ElementNSImpl
-     */
-    public String getPrefix()
-    {
-        return null;
-    }
-
-    /**
-     *  Introduced in DOM Level 2. <p>
-     *
-     *  The namespace prefix of this node, or null if it is unspecified. When
-     *  this node is of any type other than ELEMENT_NODE and ATTRIBUTE_NODE
-     *  this is always null and setting it has no effect.<p>
-     *
-     *  For nodes created with a DOM Level 1 method, such as createElement from
-     *  the Document interface, this is null.<p>
-     *
-     *  Note that setting this attribute changes the nodeName attribute, which
-     *  holds the qualified name, as well as the tagName and name attributes of
-     *  the Element and Attr interfaces, when applicable.<p>
-     *
-     * @throws INVALID_CHARACTER_ERR Raised if the specified
-     *  prefix contains an invalid character.
-     *
-     * @since WD-DOM-Level-2-19990923
-     * @see AttrNSImpl
-     * @see ElementNSImpl
-     */
-    public void setPrefix(String prefix)
-        throws DOMException
-    {
-	throw new DOMException(DOMException.NAMESPACE_ERR, 
-				   "DOM003 Namespace error");
-    }
-
-    /**
-     * Introduced in DOM Level 2. <p>
-     *
-     * Returns the local part of the qualified name of this node.
-     * For nodes created with a DOM Level 1 method, such as createElement
-     * from the Document interface, and for nodes of any type other than
-     * ELEMENT_NODE and ATTRIBUTE_NODE this is the same as the nodeName
-     * attribute.
-     * @since WD-DOM-Level-2-19990923
-     * @see AttrNSImpl
-     * @see ElementNSImpl
-     */
-    public String             getLocalName()
-    {
-        return null;
-    }
-    
-    //
-    // EventTarget support
-    //
-
-    public void addEventListener(String type, EventListener listener,
-                                 boolean useCapture) {
-        // simply forward to Document
-        ownerDocument().addEventListener(this, type, listener, useCapture);
-    }
-
-    public void removeEventListener(String type, EventListener listener,
-                                    boolean useCapture) {
-        // simply forward to Document
-        ownerDocument().removeEventListener(this, type, listener, useCapture);
-    }
-
-    public boolean dispatchEvent(Event event) {
-        // simply forward to Document
-        return ownerDocument().dispatchEvent(this, event);
-    }
-
-    //
-    // Public DOM Level 3 methods
-    //
-
-    /**
-     * The absolute base URI of this node or <code>null</code> if undefined. 
-     * This value is computed according to . However, when the 
-     * <code>Document</code> supports the feature "HTML" , 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.
-     * <br> When the node is an <code>Element</code>, a <code>Document</code> 
-     * or a a <code>ProcessingInstruction</code>, this attribute represents 
-     * the properties [base URI] defined in . When the node is a 
-     * <code>Notation</code>, an <code>Entity</code>, or an 
-     * <code>EntityReference</code>, this attribute represents the 
-     * properties [declaration base URI] in the . How will this be affected 
-     * by resolution of relative namespace URIs issue?It's not.Should this 
-     * only be on Document, Element, ProcessingInstruction, Entity, and 
-     * Notation nodes, according to the infoset? If not, what is it equal to 
-     * on other nodes? Null? An empty string? I think it should be the 
-     * parent's.No.Should this be read-only and computed or and actual 
-     * read-write attribute?Read-only and computed (F2F 19 Jun 2000 and 
-     * teleconference 30 May 2001).If the base HTML element is not yet 
-     * attached to a document, does the insert change the Document.baseURI?
-     * Yes. (F2F 26 Sep 2001)
-     * @since DOM Level 3
-     */
-    public String getBaseURI() {
-        // REVISIT: Implementation needed! :)
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                               "not implemented yet!");
-    }
-
-    /**
-     * Compares a node with this node with regard to their position in the 
-     * tree and according to the document order. This order can be extended 
-     * by module that define additional types of nodes.
-     * @param other The node to compare against this node.
-     * @return Returns how the given node is positioned relatively to this 
-     *   node.
-     * @since DOM Level 3
-     */
-    public short compareTreePosition(Node other) {
-        // REVISIT: Implementation needed! :)
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                               "not implemented yet!");
-    }
-
-    /**
-     * This attribute returns the text content of this node and its 
-     * descendants. When it is defined to be null, setting it has no effect. 
-     * When set, any possible children this node may have are removed and 
-     * replaced by a single <code>Text</code> node containing the string 
-     * this attribute is set to. On getting, no serialization is performed, 
-     * the returned string does not contain any markup. No whitespace 
-     * normalization is performed, the returned string does not contain the 
-     * element content whitespaces . 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'>
-     * <tr>
-     * <th>Node type</th>
-     * <th>Content</th>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>
-     * ELEMENT_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</td>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, 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'>
-     * null</td>
-     * </tr>
-     * </table>
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     * @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 {
-        return getNodeValue();  // overriden in some subclasses
-    }
-
-    // internal method taking a StringBuffer in parameter
-    void getTextContent(StringBuffer buf) throws DOMException {
-        String content = getNodeValue();
-        if (content != null) {
-            buf.append(content);
-        }
-    }
-
-    /**
-     * This attribute returns the text content of this node and its 
-     * descendants. When it is defined to be null, setting it has no effect. 
-     * When set, any possible children this node may have are removed and 
-     * replaced by a single <code>Text</code> node containing the string 
-     * this attribute is set to. On getting, no serialization is performed, 
-     * the returned string does not contain any markup. No whitespace 
-     * normalization is performed, the returned string does not contain the 
-     * element content whitespaces . 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'>
-     * <tr>
-     * <th>Node type</th>
-     * <th>Content</th>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>
-     * ELEMENT_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</td>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, 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'>
-     * null</td>
-     * </tr>
-     * </table>
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     * @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 void setTextContent(String textContent)
-        throws DOMException {
-        setNodeValue(textContent);
-    }
-
-    /**
-     * 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 interchangably, 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) {
-        // we do not use any wrapper so the answer is obvious
-        return this == other;
-    }
-
-    /**
-     * Look up the prefix associated to the given namespace URI, starting from 
-     * this node.
-     * <br>See  for details on the algorithm used by this method.Should this 
-     * be optional?No.How does the lookup work? Is it based on the prefix of 
-     * the nodes, the namespace declaration attributes, or a combination of 
-     * both?See .
-     * @param namespaceURI The namespace URI to look for.
-     * @return Returns the associated namespace prefix 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 lookupNamespacePrefix(String namespaceURI) {
-        // REVISIT: Implementation needed! :)
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                               "not implemented yet!");
-    }
-
-    /**
-     * 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.Name? May 
-     * need to change depending on ending of the relative namespace URI 
-     * reference nightmare.No need.Should this be optional?No.How does the 
-     * lookup work? Is it based on the namespaceURI of the nodes, the 
-     * namespace declaration attributes, or a combination of both?See .
-     * @param prefix The prefix to look for.
-     * @return Returns the associated namespace URI or <code>null</code> if 
-     *   none is found.
-     * @since DOM Level 3
-     */
-    public String lookupNamespaceURI(String prefix) {
-        // REVISIT: Implementation needed! :)
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                               "not implemented yet!");
-    }
-
-    /**
-     * 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: The two nodes are of the same type.The following string 
-     * attributes are equal: <code>nodeName</code>, <code>localName</code>, 
-     * <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code>
-     * , <code>baseURI</code>. This is: they are both <code>null</code>, or 
-     * they have the same length and are character for character identical.
-     * 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.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. This is true 
-     * for <code>Attr</code> nodes as for any other type of node. Note that 
-     * normalization can affect equality; to avoid this, nodes should be 
-     * normalized before being compared. 
-     * <br>For two <code>DocumentType</code> nodes to be equal, the following 
-     * conditions must also be satisfied: The following string attributes 
-     * are equal: <code>publicId</code>, <code>systemId</code>, 
-     * <code>internalSubset</code>.The <code>entities</code> 
-     * <code>NamedNodeMaps</code> are equal.The <code>notations</code> 
-     * <code>NamedNodeMaps</code> are equal. 
-     * <br>On the other hand, the following do not affect equality: the 
-     * <code>ownerDocument</code> attribute, the <code>specified</code> 
-     * attribute for <code>Attr</code> nodes, the 
-     * <code>isWhitespaceInElementContent</code> attribute for 
-     * <code>Text</code> nodes, as well as any user data or event listeners 
-     * registered on the nodes.Should this be optional?No.
-     * @param arg The node to compare equality with.
-     * @param deep If <code>true</code>, recursively compare the subtrees; if 
-     *   <code>false</code>, compare only the nodes themselves (and its 
-     *   attributes, if it is an <code>Element</code>).
-     * @return If the nodes, and possibly subtrees are equal, 
-     *   <code>true</code> otherwise <code>false</code>.
-     * @since DOM Level 3
-     */
-    public boolean isEqualNode(Node arg, boolean deep) {
-        // REVISIT: Implementation needed! :)
-        throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                               "not implemented yet!");
-    }
-
-    /**
-     * This method makes available a <code>Node</code>'s specialized interface.
-     * @param feature The name of the feature requested (case-insensitive).
-     * @return Returns an alternate <code>Node</code> which implements the 
-     *   specialized APIs of the specified feature, if any, or 
-     *   <code>null</code> if there is no alternate <code>Node</code> which 
-     *   implements interfaces associated with that feature. Any alternate 
-     *   <code>Node</code> returned by this method must delegate to the 
-     *   primary core <code>Node</code> and not return results inconsistent 
-     *   with the primary core <code>Node</code> such as <code>key</code>, 
-     *   <code>attributes</code>, <code>childNodes</code>, etc.
-     * @since DOM Level 3
-     */
-    public Node getInterface(String feature) {
-        // we don't have any alternate node, either this node does the job
-        // or we don't have anything that does
-        return isSupported(feature, null) ? this : null;
-    }
-
-    /**
-     * 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>DOMObject</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) {
-        return ownerDocument().setUserData(this, key, data, 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>DOMObject</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) {
-        return ownerDocument().getUserData(this, key);
-    }
-
-    //
-    // Public methods
-    //
-
-    /**
-     * NON-DOM: PR-DOM-Level-1-19980818 mentions readonly nodes in conjunction
-     * with Entities, but provides no API to support this.
-     * <P>
-     * Most DOM users should not touch this method. Its anticpated use
-     * is during construction of EntityRefernces, where it will be used to
-     * lock the contents replicated from Entity so they can't be casually
-     * altered. It _could_ be published as a DOM extension, if desired.
-     * <P>
-     * Note: since we never have any children deep is meaningless here,
-     * ParentNode overrides this behavior.
-     * @see ParentNode
-     *
-     * @param readOnly True or false as desired.
-     * @param deep If true, children are also toggled. Note that this will
-     *	not change the state of an EntityReference or its children,
-     *  which are always read-only.
-     */
-    public void setReadOnly(boolean readOnly, boolean deep) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	isReadOnly(readOnly);
-
-    } // setReadOnly(boolean,boolean)
-
-    /**
-     * NON-DOM: Returns true if this node is read-only. This is a
-     * shallow check.
-     */
-    public boolean getReadOnly() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return isReadOnly();
-
-    } // getReadOnly():boolean
-
-    /**
-     * NON-DOM: As an alternative to subclassing the DOM, this implementation
-     * has been extended with the ability to attach an object to each node.
-     * (If you need multiple objects, you can attach a collection such as a
-     * vector or hashtable, then attach your application information to that.)
-     * <p><b>Important Note:</b> You are responsible for removing references
-     * to your data on nodes that are no longer used. Failure to do so will
-     * prevent the nodes, your data is attached to, to be garbage collected
-     * until the whole document is.
-     *
-     * @param data the object to store or null to remove any existing reference
-     */
-    public void setUserData(Object data) {
-        ownerDocument().setUserData(this, data);
-    }
-
-    /**
-     * NON-DOM:
-     * Returns the user data associated to this node.
-     */
-    public Object getUserData() {
-        return ownerDocument().getUserData(this);
-    }
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Denotes that this node has changed.
-     */
-    protected void changed() {
-        // we do not actually store this information on every node, we only
-        // have a global indicator on the Document. Doing otherwise cost us too
-        // much for little gain.
-        ownerDocument().changed();
-    }
-
-    /**
-     * Returns the number of changes to this node.
-     */
-    protected int changes() {
-        // we do not actually store this information on every node, we only
-        // have a global indicator on the Document. Doing otherwise cost us too
-        // much for little gain.
-        return ownerDocument().changes();
-    }
-
-    /**
-     * Override this method in subclass to hook in efficient
-     * internal data structure.
-     */
-    protected void synchronizeData() {
-        // By default just change the flag to avoid calling this method again
-        needsSyncData(false);
-    }
-
-
-    /*
-     * Flags setters and getters
-     */
-
-    final boolean isReadOnly() {
-        return (flags & READONLY) != 0;
-    }
-
-    final void isReadOnly(boolean value) {
-        flags = (short) (value ? flags | READONLY : flags & ~READONLY);
-    }
-
-    final boolean needsSyncData() {
-        return (flags & SYNCDATA) != 0;
-    }
-
-    final void needsSyncData(boolean value) {
-        flags = (short) (value ? flags | SYNCDATA : flags & ~SYNCDATA);
-    }
-
-    final boolean needsSyncChildren() {
-        return (flags & SYNCCHILDREN) != 0;
-    }
-
-    final void needsSyncChildren(boolean value) {
-        flags = (short) (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN);
-    }
-
-    final boolean isOwned() {
-        return (flags & OWNED) != 0;
-    }
-
-    final void isOwned(boolean value) {
-        flags = (short) (value ? flags | OWNED : flags & ~OWNED);
-    }
-
-    final boolean isFirstChild() {
-        return (flags & FIRSTCHILD) != 0;
-    }
-
-    final void isFirstChild(boolean value) {
-        flags = (short) (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD);
-    }
-
-    final boolean isSpecified() {
-        return (flags & SPECIFIED) != 0;
-    }
-
-    final void isSpecified(boolean value) {
-        flags = (short) (value ? flags | SPECIFIED : flags & ~SPECIFIED);
-    }
-
-    // inconsistent name to avoid clash with public method on TextImpl
-    final boolean internalIsIgnorableWhitespace() {
-        return (flags & IGNORABLEWS) != 0;
-    }
-
-    final void isIgnorableWhitespace(boolean value) {
-        flags = (short) (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS);
-    }
-
-    final boolean hasStringValue() {
-        return (flags & HASSTRING) != 0;
-    }
-
-    final void hasStringValue(boolean value) {
-        flags = (short) (value ? flags | HASSTRING : flags & ~HASSTRING);
-    }
-
-    final boolean isNormalized() {
-        return (flags & UNNORMALIZED) == 0;
-    }
-
-    final void isNormalized(boolean value) {
-        // See if flag should propagate to parent.
-        if (!value && isNormalized() && ownerNode != null) {
-            ownerNode.isNormalized(false);
-        }
-        flags = (short) (value ? flags & ~UNNORMALIZED : flags | UNNORMALIZED);
-    }
-
-    //
-    // Object methods
-    //
-
-    /** NON-DOM method for debugging convenience. */
-    public String toString() {
-        return "["+getNodeName()+": "+getNodeValue()+"]";
-    }
-
-    //
-    // Serialization methods
-    //
-
-    /** Serialize object. */
-    private void writeObject(ObjectOutputStream out) throws IOException {
-
-        // synchronize data
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        // write object
-        out.defaultWriteObject();
-
-    } // writeObject(ObjectOutputStream)
-
-} // class NodeImpl
diff --git a/src/org/apache/xerces/dom/NodeIteratorImpl.java b/src/org/apache/xerces/dom/NodeIteratorImpl.java
deleted file mode 100644
index c975e6a..0000000
--- a/src/org/apache/xerces/dom/NodeIteratorImpl.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-import org.w3c.dom.traversal.NodeFilter;
-import org.w3c.dom.traversal.NodeIterator;
-
-
-/** DefaultNodeIterator implements a NodeIterator, which iterates a 
- *  DOM tree in the expected depth first way. 
- *
- *  <p>The whatToShow and filter functionality is implemented as expected.
- *  
- *  <p>This class also has method removeNode to enable iterator "fix-up" 
- *  on DOM remove. It is expected that the DOM implementation call removeNode
- *  right before the actual DOM transformation. If not called by the DOM,
- *  the client could call it before doing the removal.
- */
-public class NodeIteratorImpl implements NodeIterator {
-    
-    //
-    // Data
-    //
-    
-    /** The DocumentImpl which created this iterator, so it can be detached. */
-    private DocumentImpl fDocument;
-    /** The root. */
-    private Node fRoot;
-    /** The whatToShow mask. */
-    private int fWhatToShow = NodeFilter.SHOW_ALL;
-    /** The NodeFilter reference. */
-    private NodeFilter fNodeFilter;
-    /** If detach is called, the fDetach flag is true, otherwise flase. */
-    private boolean fDetach = false;
-    
-    // 
-    // Iterator state - current node and direction.
-    //
-    // Note: The current node and direction are sufficient to implement
-    // the desired behaviour of the current pointer being _between_
-    // two nodes. The fCurrentNode is actually the last node returned, 
-    // and the
-    // direction is whether the pointer is in front or behind this node.
-    // (usually akin to whether the node was returned via nextNode()) 
-    // (eg fForward = true) or previousNode() (eg fForward = false).
-    // Note also, if removing a Node, the fCurrentNode
-    // can be placed on a Node which would not pass filters. 
-    
-    /** The last Node returned. */
-    private Node fCurrentNode;
-    
-    /** The direction of the iterator on the fCurrentNode.
-     *  <pre>
-     *  nextNode()  ==      fForward = true;
-     *  previousNode() ==   fForward = false;
-     *  </pre>
-     */
-    private boolean fForward = true;
-    
-    /** When TRUE, the children of entites references are returned in the iterator. */
-    private boolean fEntityReferenceExpansion;
-    
-    // 
-    // Constructor
-    //
-    
-    /** Public constructor */
-    public NodeIteratorImpl( DocumentImpl document,
-                             Node root, 
-                             int whatToShow, 
-                             NodeFilter nodeFilter,
-                             boolean entityReferenceExpansion) {
-        fDocument = document;
-        fRoot = root;
-        fCurrentNode = null;
-        fWhatToShow = whatToShow;
-        fNodeFilter = nodeFilter;
-        fEntityReferenceExpansion = entityReferenceExpansion;
-    }
-    
-    public Node getRoot() {
-	return fRoot;
-    }
-
-    // Implementation Note: Note that the iterator looks at whatToShow
-    // and filter values at each call, and therefore one _could_ add
-    // setters for these values and alter them while iterating!
-    
-    /** Return the whatToShow value */
-    public int                getWhatToShow() {
-        return fWhatToShow;
-    }
-
-    /** Return the filter */
-    public NodeFilter         getFilter() {
-        return fNodeFilter;
-    }
-    
-    /** Return whether children entity references are included in the iterator. */
-    public boolean            getExpandEntityReferences() {
-        return fEntityReferenceExpansion;
-    }
-            
-    /** Return the next Node in the Iterator. The node is the next node in 
-     *  depth-first order which also passes the filter, and whatToShow. 
-     *  If there is no next node which passes these criteria, then return null.
-     */
-    public Node               nextNode() {
-        
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        
-        // if root is null there is no next node.
-        if (fRoot == null) return null;
-        
-        Node nextNode = fCurrentNode;
-        boolean accepted = false; // the next node has not been accepted.
-     
-        accepted_loop:
-        while (!accepted) {
-            
-            // if last direction is not forward, repeat node.
-            if (!fForward && nextNode!=null) {
-                //System.out.println("nextNode():!fForward:"+fCurrentNode.getNodeName());
-                nextNode = fCurrentNode;
-            } else { 
-            // else get the next node via depth-first
-                if (!fEntityReferenceExpansion
-                    && nextNode != null
-                    && nextNode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
-                    nextNode = nextNode(nextNode, false);
-                } else {
-                    nextNode = nextNode(nextNode, true);
-                }
-            }
-   
-            fForward = true; //REVIST: should direction be set forward before null check?
-            
-            // nothing in the list. return null.
-            if (nextNode == null) return null; 
-            
-            // does node pass the filters and whatToShow?
-            accepted = acceptNode(nextNode);
-            if (accepted) {
-                // if so, then the node is the current node.
-                fCurrentNode = nextNode;
-                return fCurrentNode;
-            } else 
-                continue accepted_loop;
-            
-        } // while (!accepted) {
-        
-        // no nodes, or no accepted nodes.
-        return null;
-            
-    }
-    
-    /** Return the previous Node in the Iterator. The node is the next node in 
-     *  _backwards_ depth-first order which also passes the filter, and whatToShow. 
-     */
-    public Node               previousNode() {
-        
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
- 
-        // if the root is null, or the current node is null, return null.
-        if (fRoot == null || fCurrentNode == null) return null;
-       
-        Node previousNode = fCurrentNode;
-        boolean accepted = false;
-        
-        accepted_loop:
-        while (!accepted) {
-            
-            if (fForward && previousNode != null) {
-                //repeat last node.
-                previousNode = fCurrentNode;
-            } else { 
-                // get previous node in backwards depth first order.
-                previousNode = previousNode(previousNode);
-            }
-            
-            // we are going backwards
-            fForward = false;
-            
-            // if the new previous node is null, we're at head or past the root,
-            // so return null. 
-            if (previousNode == null) return null;
-            
-            // check if node passes filters and whatToShow.
-            accepted = acceptNode(previousNode);
-            if (accepted) {
-                // if accepted, update the current node, and return it.
-                fCurrentNode = previousNode;
-                return fCurrentNode;
-            } else 
-                continue accepted_loop;
-        }
-        // there are no nodes?
-        return null;
-    }
-                
-    /** The node is accepted if it passes the whatToShow and the filter. */
-    boolean acceptNode(Node node) {
-                
-        if (fNodeFilter == null) {            
-            return ( fWhatToShow & (1 << node.getNodeType()-1)) != 0 ;
-        } else {
-            return ((fWhatToShow & (1 << node.getNodeType()-1)) != 0 ) 
-                && fNodeFilter.acceptNode(node) == NodeFilter.FILTER_ACCEPT;
-        }
-    } 
-    
-    /** Return node, if matches or any parent if matches. */
-    Node matchNodeOrParent(Node node) {
-        for (Node n = node; n != fRoot; n = n.getParentNode()) {
-            if (node == n) return n;
-        }
-        return null;
-    }
-    
-    /** The method nextNode(Node, boolean) returns the next node 
-     *  from the actual DOM tree.
-     * 
-     *  The boolean visitChildren determines whether to visit the children.
-     *  The result is the nextNode.
-     */
-    Node nextNode(Node node, boolean visitChildren) {
-            
-        if (node == null) return fRoot;
-
-        Node result;
-        // only check children if we visit children.
-        if (visitChildren) {
-            //if hasChildren, return 1st child.
-            if (node.hasChildNodes()) {
-                result = node.getFirstChild();
-                return result;
-            }
-        }
-            
-        if (node == fRoot) { //if Root has no kids
-            return null;
-        }
-
-        // if hasSibling, return sibling
-        result = node.getNextSibling();
-        if (result != null) return result;
-        
-                
-        // return parent's 1st sibling.
-        Node parent = node.getParentNode();
-        while (parent != null && parent != fRoot) {
-            result = parent.getNextSibling();
-            if (result != null) {
-                return result;
-            } else {
-                parent = parent.getParentNode();
-            }
-                            
-        } // while (parent != null && parent != fRoot) {
-        
-        // end of list, return null
-        return null;            
-    }
-    
-    /** The method previousNode(Node) returns the previous node 
-     *  from the actual DOM tree.
-     */
-    Node previousNode(Node node) {
-        
-        Node result;
-        
-        // if we're at the root, return null.
-        if (node == fRoot) return null;
-        
-        // get sibling
-        result = node.getPreviousSibling();
-        if (result == null) {
-            //if 1st sibling, return parent
-            result = node.getParentNode();
-            return result;
-        }
-        
-        // if sibling has children, keep getting last child of child.
-        if (result.hasChildNodes()
-            && !(!fEntityReferenceExpansion
-                && result != null
-                && result.getNodeType() == Node.ENTITY_REFERENCE_NODE)) 
-       
-        {
-            while (result.hasChildNodes()) {
-                result = result.getLastChild();
-            }
-        }          
-            
-        return result;
-    }
-    
-    /** Fix-up the iterator on a remove. Called by DOM or otherwise,
-     *  before an actual DOM remove.   
-     */
-    public void removeNode(Node node) {
-        
-        // Implementation note: Fix-up means setting the current node properly
-        // after a remove.
-        
-        if (node == null) return;
-        
-        Node deleted = matchNodeOrParent(node);
-        
-        if (deleted == null) return;
-        
-        if (fForward) {
-            fCurrentNode = previousNode(deleted);
-        } else
-        // if (!fForward) 
-        {
-            Node next = nextNode(deleted, false);
-            if (next!=null) {
-                // normal case: there _are_ nodes following this in the iterator.
-                fCurrentNode = next;
-            } else {
-                // the last node in the iterator is to be removed, 
-                // so we set the current node to be the previous one.
-                fCurrentNode = previousNode(deleted);
-                fForward = true;
-            }
-                
-        }
-        
-    }
-    
-    public void               detach() {
-        fDetach = true;
-        fDocument.removeNodeIterator(this);
-    }
-    
-}
diff --git a/src/org/apache/xerces/dom/NodeListCache.java b/src/org/apache/xerces/dom/NodeListCache.java
deleted file mode 100644
index 0d460d3..0000000
--- a/src/org/apache/xerces/dom/NodeListCache.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-/**
- * This class is used, via a pool managed on CoreDocumentImpl, in ParentNode to
- * improve performance of the NodeList accessors, getLength() and item(i).
- * @author Arnaud  Le Hors, IBM
- */
-class NodeListCache {
-    /** Cached node list length. */
-    int fLength = -1;
-
-    /** Last requested node index. */
-    int fChildIndex = -1;
-
-    /** Last requested node. */
-    ChildNode fChild;
-
-    /** Owner of this cache */
-    ParentNode fOwner;
-
-    /** Pointer to the next object on the list,
-        only meaningful when actully stored in the free list. */
-    NodeListCache next;
-
-    NodeListCache(ParentNode owner) {
-        fOwner = owner;
-    }
-}
-
diff --git a/src/org/apache/xerces/dom/NotationImpl.java b/src/org/apache/xerces/dom/NotationImpl.java
deleted file mode 100644
index 55cd59f..0000000
--- a/src/org/apache/xerces/dom/NotationImpl.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-import org.w3c.dom.Notation;
-
-/**
- * Notations are how the Document Type Description (DTD) records hints
- * about the format of an XML "unparsed entity" -- in other words,
- * non-XML data bound to this document type, which some applications
- * may wish to consult when manipulating the document. A Notation
- * represents a name-value pair, with its nodeName being set to the
- * declared name of the notation.
- * <P>
- * Notations are also used to formally declare the "targets" of
- * Processing Instructions.
- * <P>
- * Note that the Notation's data is non-DOM information; the DOM only
- * records what and where it is.
- * <P>
- * See the XML 1.0 spec, sections 4.7 and 2.6, for more info.
- * <P>
- * Level 1 of the DOM does not support editing Notation contents.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class NotationImpl 
-    extends NodeImpl 
-    implements Notation {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -764632195890658402L;
-    
-    //
-    // Data
-    //
-
-    /** Notation name. */
-    protected String name;
-
-    /** Public identifier. */
-    protected String publicId;
-
-    /** System identifier. */
-    protected String systemId;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public NotationImpl(CoreDocumentImpl ownerDoc, String name) {
-    	super(ownerDoc);
-        this.name = name;
-    }
-    
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.NOTATION_NODE;
-    }
-
-    /**
-     * Returns the notation name
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return name;
-    }
-
-    //
-    // Notation methods
-    //
-
-    /**
-     * The Public Identifier for this Notation. If no public identifier
-     * was specified, this will be null.  
-     */
-    public String getPublicId() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	return publicId;
-
-    } // getPublicId():String
-
-    /**
-     * The System Identifier for this Notation. If no system identifier
-     * was specified, this will be null.  
-     */
-    public String getSystemId() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	return systemId;
-
-    } // getSystemId():String
-
-    //
-    // Public methods
-    //
-
-    /** 
-     * NON-DOM: The Public Identifier for this Notation. If no public
-     * identifier was specified, this will be null.  
-     */
-    public void setPublicId(String id) {
-
-    	if (isReadOnly()) {
-    		throw new DOMException(
-    			DOMException.NO_MODIFICATION_ALLOWED_ERR,
-			"DOM001 Modification not allowed");
-        }
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        publicId = id;
-
-    } // setPublicId(String)
-
-    /** 
-     * NON-DOM: The System Identifier for this Notation. If no system
-     * identifier was specified, this will be null.  
-     */
-    public void setSystemId(String id) {
-
-    	if(isReadOnly()) {
-    		throw new DOMException(
-    			DOMException.NO_MODIFICATION_ALLOWED_ERR,
-			"DOM001 Modification not allowed");
-        }
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	systemId = id;
-
-    } // setSystemId(String)
-
-} // class NotationImpl
diff --git a/src/org/apache/xerces/dom/ParentNode.java b/src/org/apache/xerces/dom/ParentNode.java
deleted file mode 100644
index 86021b8..0000000
--- a/src/org/apache/xerces/dom/ParentNode.java
+++ /dev/null
@@ -1,1017 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-
-/**
- * ParentNode inherits from ChildNode and adds the capability of having child
- * nodes. Not every node in the DOM can have children, so only nodes that can
- * should inherit from this class and pay the price for it.
- * <P>
- * ParentNode, just like NodeImpl, also implements NodeList, so it can
- * return itself in response to the getChildNodes() query. This eliminiates
- * the need for a separate ChildNodeList object. Note that this is an
- * IMPLEMENTATION DETAIL; applications should _never_ assume that
- * this identity exists. On the other hand, subclasses may need to override
- * this, in case of conflicting names. This is the case for the classes
- * HTMLSelectElementImpl and HTMLFormElementImpl of the HTML DOM.
- * <P>
- * While we have a direct reference to the first child, the last child is
- * stored as the previous sibling of the first child. First child nodes are
- * marked as being so, and getNextSibling hides this fact.
- * <P>Note: Not all parent nodes actually need to also be a child. At some
- * point we used to have ParentNode inheriting from NodeImpl and another class
- * called ChildAndParentNode that inherited from ChildNode. But due to the lack
- * of multiple inheritance a lot of code had to be duplicated which led to a
- * maintenance nightmare. At the same time only a few nodes (Document,
- * DocumentFragment, Entity, and Attribute) cannot be a child so the gain in
- * memory wasn't really worth it. The only type for which this would be the
- * case is Attribute, but we deal with there in another special way, so this is
- * not applicable.
- * <p>
- * This class doesn't directly support mutation events, however, it notifies
- * the document when mutations are performed so that the document class do so.
- *
- * <p><b>WARNING</b>: Some of the code here is partially duplicated in
- * AttrImpl, be careful to keep these two classes in sync!
- *
- * @author Arnaud  Le Hors, IBM
- * @author Joe Kesselman, IBM
- * @author Andy Clark, IBM
- */
-public abstract class ParentNode
-    extends ChildNode {
-
-    /** Serialization version. */
-    static final long serialVersionUID = 2815829867152120872L;
-
-    /** Owner document. */
-    protected CoreDocumentImpl ownerDocument;
-
-    /** First child. */
-    protected ChildNode firstChild = null;
-
-    // transients
-
-    /** NodeList cache */
-    protected transient NodeListCache fNodeListCache = null;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * No public constructor; only subclasses of ParentNode should be
-     * instantiated, and those normally via a Document's factory methods
-     */
-    protected ParentNode(CoreDocumentImpl ownerDocument) {
-        super(ownerDocument);
-        this.ownerDocument = ownerDocument;
-    }
-
-    /** Constructor for serialization. */
-    public ParentNode() {}
-
-    //
-    // NodeList methods
-    //
-
-    /**
-     * Returns a duplicate of a given node. You can consider this a
-     * generic "copy constructor" for nodes. The newly returned object should
-     * be completely independent of the source object's subtree, so changes
-     * in one after the clone has been made will not affect the other.
-     * <p>
-     * Example: Cloning a Text node will copy both the node and the text it
-     * contains.
-     * <p>
-     * Example: Cloning something that has children -- Element or Attr, for
-     * example -- will _not_ clone those children unless a "deep clone"
-     * has been requested. A shallow clone of an Attr node will yield an
-     * empty Attr of the same name.
-     * <p>
-     * NOTE: Clones will always be read/write, even if the node being cloned
-     * is read-only, to permit applications using only the DOM API to obtain
-     * editable copies of locked portions of the tree.
-     */
-    public Node cloneNode(boolean deep) {
-    	
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-    	ParentNode newnode = (ParentNode) super.cloneNode(deep);
-
-        // set owner document
-        newnode.ownerDocument = ownerDocument;
-
-    	// Need to break the association w/ original kids
-    	newnode.firstChild      = null;
-
-        // invalidate cache for children NodeList
-        newnode.fNodeListCache = null;
-
-        // Then, if deep, clone the kids too.
-    	if (deep) {
-            for (ChildNode child = firstChild;
-                 child != null;
-                 child = child.nextSibling) {
-                newnode.appendChild(child.cloneNode(true));
-            }
-        }
-
-    	return newnode;
-
-    } // cloneNode(boolean):Node
-
-    /**
-     * Find the Document that this Node belongs to (the document in
-     * whose context the Node was created). The Node may or may not
-     * currently be part of that Document's actual contents.
-     */
-    public Document getOwnerDocument() {
-        return ownerDocument;
-    }
-
-    /**
-     * same as above but returns internal type and this one is not overridden
-     * by CoreDocumentImpl to return null
-     */
-    CoreDocumentImpl ownerDocument() {
-        return ownerDocument;
-    }
-
-    /**
-     * NON-DOM
-     * set the ownerDocument of this node and its children
-     */
-    void setOwnerDocument(CoreDocumentImpl doc) {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        super.setOwnerDocument(doc);
-        ownerDocument = doc;
-	for (ChildNode child = firstChild;
-	     child != null; child = child.nextSibling) {
-	    child.setOwnerDocument(doc);
-	}
-    }
-
-    /**
-     * Test whether this node has any children. Convenience shorthand
-     * for (Node.getFirstChild()!=null)
-     */
-    public boolean hasChildNodes() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return firstChild != null;
-    }
-
-    /**
-     * Obtain a NodeList enumerating all children of this node. If there
-     * are none, an (initially) empty NodeList is returned.
-     * <p>
-     * NodeLists are "live"; as children are added/removed the NodeList
-     * will immediately reflect those changes. Also, the NodeList refers
-     * to the actual nodes, so changes to those nodes made via the DOM tree
-     * will be reflected in the NodeList and vice versa.
-     * <p>
-     * In this implementation, Nodes implement the NodeList interface and
-     * provide their own getChildNodes() support. Other DOMs may solve this
-     * differently.
-     */
-    public NodeList getChildNodes() {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return this;
-
-    } // getChildNodes():NodeList
-
-    /** The first child of this Node, or null if none. */
-    public Node getFirstChild() {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-    	return firstChild;
-
-    }   // getFirstChild():Node
-
-    /** The last child of this Node, or null if none. */
-    public Node getLastChild() {
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return lastChild();
-
-    } // getLastChild():Node
-
-    final ChildNode lastChild() {
-        // last child is stored as the previous sibling of first child
-        return firstChild != null ? firstChild.previousSibling : null;
-    }
-
-    final void lastChild(ChildNode node) {
-        // store lastChild as previous sibling of first child
-        if (firstChild != null) {
-            firstChild.previousSibling = node;
-        }
-    }
-
-    /**
-     * Move one or more node(s) to our list of children. Note that this
-     * implicitly removes them from their previous parent.
-     *
-     * @param newChild The Node to be moved to our subtree. As a
-     * convenience feature, inserting a DocumentNode will instead insert
-     * all its children.
-     *
-     * @param refChild Current child which newChild should be placed
-     * immediately before. If refChild is null, the insertion occurs
-     * after all existing Nodes, like appendChild().
-     *
-     * @returns newChild, in its new state (relocated, or emptied in the
-     * case of DocumentNode.)
-     *
-     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
-     * type that shouldn't be a child of this node, or if newChild is an
-     * ancestor of this node.
-     *
-     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
-     * different owner document than we do.
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if refChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node insertBefore(Node newChild, Node refChild) 
-        throws DOMException {
-        // Tail-call; optimizer should be able to do good things with.
-        return internalInsertBefore(newChild, refChild, false);
-    } // insertBefore(Node,Node):Node
-     
-    /** NON-DOM INTERNAL: Within DOM actions,we sometimes need to be able
-     * to control which mutation events are spawned. This version of the
-     * insertBefore operation allows us to do so. It is not intended
-     * for use by application programs.
-     */
-    Node internalInsertBefore(Node newChild, Node refChild, boolean replace) 
-        throws DOMException {
-
-        boolean errorChecking = ownerDocument.errorChecking;
-
-        if (newChild.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE) {
-            // SLOW BUT SAFE: We could insert the whole subtree without
-            // juggling so many next/previous pointers. (Wipe out the
-            // parent's child-list, patch the parent pointers, set the
-            // ends of the list.) But we know some subclasses have special-
-            // case behavior they add to insertBefore(), so we don't risk it.
-            // This approch also takes fewer bytecodes.
-
-            // NOTE: If one of the children is not a legal child of this
-            // node, throw HIERARCHY_REQUEST_ERR before _any_ of the children
-            // have been transferred. (Alternative behaviors would be to
-            // reparent up to the first failure point or reparent all those
-            // which are acceptable to the target node, neither of which is
-            // as robust. PR-DOM-0818 isn't entirely clear on which it
-            // recommends?????
-
-            // No need to check kids for right-document; if they weren't,
-            // they wouldn't be kids of that DocFrag.
-            if (errorChecking) {
-                for (Node kid = newChild.getFirstChild(); // Prescan
-                     kid != null; kid = kid.getNextSibling()) {
-
-                    if (!ownerDocument.isKidOK(this, kid)) {
-                        throw new DOMException(
-                                           DOMException.HIERARCHY_REQUEST_ERR, 
-                                           "DOM006 Hierarchy request error");
-                    }
-                }
-            }
-
-            while (newChild.hasChildNodes()) {
-                insertBefore(newChild.getFirstChild(), refChild);
-            }
-            return newChild;
-        }
-
-        if (newChild == refChild) {
-            // stupid case that must be handled as a no-op triggering events...
-            refChild = refChild.getNextSibling();
-            removeChild(newChild);
-            insertBefore(newChild, refChild);
-            return newChild;
-        }
-
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-
-        if (errorChecking) {
-            if (isReadOnly()) {
-                throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                       "DOM001 Modification not allowed");
-            }
-            if (newChild.getOwnerDocument() != ownerDocument) {
-                throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, 
-                                       "DOM005 Wrong document");
-            }
-            if (!ownerDocument.isKidOK(this, newChild)) {
-                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-                                       "DOM006 Hierarchy request error");
-            }
-            // refChild must be a child of this node (or null)
-            if (refChild != null && refChild.getParentNode() != this) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR,
-                                       "DOM008 Not found");
-            }
-
-            // Prevent cycles in the tree
-            // newChild cannot be ancestor of this Node,
-            // and actually cannot be this
-            boolean treeSafe = true;
-            for (NodeImpl a = this; treeSafe && a != null; a = a.parentNode())
-            {
-                treeSafe = newChild != a;
-            }
-            if(!treeSafe) {
-                throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, 
-                                       "DOM006 Hierarchy request error");
-            }
-        }
-
-        // notify document
-        ownerDocument.insertingNode(this, replace);
-
-        // Convert to internal type, to avoid repeated casting
-        ChildNode newInternal = (ChildNode)newChild;
-
-        Node oldparent = newInternal.parentNode();
-        if (oldparent != null) {
-            oldparent.removeChild(newInternal);
-        }
-
-        // Convert to internal type, to avoid repeated casting
-        ChildNode refInternal = (ChildNode)refChild;
-
-        // Attach up
-        newInternal.ownerNode = this;
-        newInternal.isOwned(true);
-
-        // Attach before and after
-        // Note: firstChild.previousSibling == lastChild!!
-        if (firstChild == null) {
-            // this our first and only child
-            firstChild = newInternal;
-            newInternal.isFirstChild(true);
-            newInternal.previousSibling = newInternal;
-        }
-        else {
-            if (refInternal == null) {
-                // this is an append
-                ChildNode lastChild = firstChild.previousSibling;
-                lastChild.nextSibling = newInternal;
-                newInternal.previousSibling = lastChild;
-                firstChild.previousSibling = newInternal;
-            }
-            else {
-                // this is an insert
-                if (refChild == firstChild) {
-                    // at the head of the list
-                    firstChild.isFirstChild(false);
-                    newInternal.nextSibling = firstChild;
-                    newInternal.previousSibling = firstChild.previousSibling;
-                    firstChild.previousSibling = newInternal;
-                    firstChild = newInternal;
-                    newInternal.isFirstChild(true);
-                }
-                else {
-                    // somewhere in the middle
-                    ChildNode prev = refInternal.previousSibling;
-                    newInternal.nextSibling = refInternal;
-                    prev.nextSibling = newInternal;
-                    refInternal.previousSibling = newInternal;
-                    newInternal.previousSibling = prev;
-                }
-            }
-        }
-
-        changed();
-
-        // update cached length if we have any
-        if (fNodeListCache != null) {
-            if (fNodeListCache.fLength != -1) {
-                fNodeListCache.fLength++;
-            }
-            if (fNodeListCache.fChildIndex != -1) {
-                // if we happen to insert just before the cached node, update
-                // the cache to the new node to match the cached index
-                if (fNodeListCache.fChild == refInternal) {
-                    fNodeListCache.fChild = newInternal;
-                } else {
-                    // otherwise just invalidate the cache
-                    fNodeListCache.fChildIndex = -1;
-                }
-            }
-        }
-
-        // notify document
-        ownerDocument.insertedNode(this, newInternal, replace);
-
-        checkNormalizationAfterInsert(newInternal);
-
-        return newChild;
-
-    } // internalInsertBefore(Node,Node,boolean):Node
-
-    /**
-     * Remove a child from this Node. The removed child's subtree
-     * remains intact so it may be re-inserted elsewhere.
-     *
-     * @return oldChild, in its new state (removed).
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node removeChild(Node oldChild) 
-        throws DOMException {
-        // Tail-call, should be optimizable
-        return internalRemoveChild(oldChild, false);
-    } // removeChild(Node) :Node
-     
-    /** NON-DOM INTERNAL: Within DOM actions,we sometimes need to be able
-     * to control which mutation events are spawned. This version of the
-     * removeChild operation allows us to do so. It is not intended
-     * for use by application programs.
-     */
-    Node internalRemoveChild(Node oldChild, boolean replace)
-        throws DOMException {
-
-        CoreDocumentImpl ownerDocument = ownerDocument();
-        if (ownerDocument.errorChecking) {
-            if (isReadOnly()) {
-                throw new DOMException(
-                                     DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-                                     "DOM001 Modification not allowed");
-            }
-            if (oldChild != null && oldChild.getParentNode() != this) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR, 
-                                       "DOM008 Not found");
-            }
-        }
-
-        ChildNode oldInternal = (ChildNode) oldChild;
-
-        // notify document
-        ownerDocument.removingNode(this, oldInternal, replace);
-
-        // update cached length if we have any
-        if (fNodeListCache != null) {
-            if (fNodeListCache.fLength != -1) {
-                fNodeListCache.fLength--;
-            }
-            if (fNodeListCache.fChildIndex != -1) {
-                // if the removed node is the cached node
-                // move the cache to its (soon former) previous sibling
-                if (fNodeListCache.fChild == oldInternal) {
-                    fNodeListCache.fChildIndex--;
-                    fNodeListCache.fChild = oldInternal.previousSibling();
-                } else {
-                    // otherwise just invalidate the cache
-                    fNodeListCache.fChildIndex = -1;
-                }
-            }
-        }
-
-        // Patch linked list around oldChild
-        // Note: lastChild == firstChild.previousSibling
-        if (oldInternal == firstChild) {
-            // removing first child
-            oldInternal.isFirstChild(false);
-            firstChild = oldInternal.nextSibling;
-            if (firstChild != null) {
-                firstChild.isFirstChild(true);
-                firstChild.previousSibling = oldInternal.previousSibling;
-            }
-        } else {
-            ChildNode prev = oldInternal.previousSibling;
-            ChildNode next = oldInternal.nextSibling;
-            prev.nextSibling = next;
-            if (next == null) {
-                // removing last child
-                firstChild.previousSibling = prev;
-            } else {
-                // removing some other child in the middle
-                next.previousSibling = prev;
-            }
-        }
-
-        // Save previous sibling for normalization checking.
-        ChildNode oldPreviousSibling = oldInternal.previousSibling();
-
-        // Remove oldInternal's references to tree
-        oldInternal.ownerNode       = ownerDocument;
-        oldInternal.isOwned(false);
-        oldInternal.nextSibling     = null;
-        oldInternal.previousSibling = null;
-
-        changed();
-
-        // notify document
-        ownerDocument.removedNode(this, replace);
-
-        checkNormalizationAfterRemove(oldPreviousSibling);
-
-        return oldInternal;
-
-    } // internalRemoveChild(Node,boolean):Node
-
-    /**
-     * Make newChild occupy the location that oldChild used to
-     * have. Note that newChild will first be removed from its previous
-     * parent, if any. Equivalent to inserting newChild before oldChild,
-     * then removing oldChild.
-     *
-     * @returns oldChild, in its new state (removed).
-     *
-     * @throws DOMException(HIERARCHY_REQUEST_ERR) if newChild is of a
-     * type that shouldn't be a child of this node, or if newChild is
-     * one of our ancestors.
-     *
-     * @throws DOMException(WRONG_DOCUMENT_ERR) if newChild has a
-     * different owner document than we do.
-     *
-     * @throws DOMException(NOT_FOUND_ERR) if oldChild is not a child of
-     * this node.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if this node is
-     * read-only.
-     */
-    public Node replaceChild(Node newChild, Node oldChild)
-        throws DOMException {
-        // If Mutation Events are being generated, this operation might
-        // throw aggregate events twice when modifying an Attr -- once 
-        // on insertion and once on removal. DOM Level 2 does not specify 
-        // this as either desirable or undesirable, but hints that
-        // aggregations should be issued only once per user request.
-
-        // notify document
-        ownerDocument.replacingNode(this);
-
-        internalInsertBefore(newChild, oldChild, true);
-        if (newChild != oldChild) {
-            internalRemoveChild(oldChild, true);
-        }
-
-        // notify document
-        ownerDocument.replacedNode(this);
-
-        return oldChild;
-    }
-
-    /*
-     * Get Node text content
-     * @since DOM Level 3
-     */
-    public String getTextContent() throws DOMException {
-        Node child = getFirstChild();
-        if (child != null) {
-            Node next = child.getNextSibling();
-            if (next == null) {
-                return hasTextContent(child) ? child.getNodeValue() : "";
-            }
-            StringBuffer buf = new StringBuffer();
-            getTextContent(buf);
-            return buf.toString();
-        }
-        return "";
-    }
-
-    // internal method taking a StringBuffer in parameter
-    void getTextContent(StringBuffer buf) throws DOMException {
-        Node child = getFirstChild();
-        while (child != null) {
-            if (hasTextContent(child)) {
-                ((NodeImpl) child).getTextContent(buf);
-            }
-            child = child.getNextSibling();
-        }
-    }
-
-    // internal method returning whether to take the given node's text content
-    final boolean hasTextContent(Node child) {
-        return child.getNodeType() != Node.COMMENT_NODE &&
-            child.getNodeType() != Node.PROCESSING_INSTRUCTION_NODE &&
-            (child.getNodeType() != Node.TEXT_NODE ||
-             ((TextImpl) child).isIgnorableWhitespace() == false);
-    }
-
-    /*
-     * Set Node text content
-     * @since DOM Level 3
-     */
-    public void setTextContent(String textContent)
-        throws DOMException {
-        // get rid of any existing children
-        Node child;
-        while ((child = getFirstChild()) != null) {
-            removeChild(child);
-        }
-        // create a Text node to hold the given content
-        appendChild(ownerDocument().createTextNode(textContent));
-    }
-
-    //
-    // NodeList methods
-    //
-
-    /**
-     * Count the immediate children of this node.  Use to implement
-     * NodeList.getLength().
-     * @return int
-     */
-    private int nodeListGetLength() {
-
-        if (fNodeListCache == null) {
-            // get rid of trivial cases
-            if (firstChild == null) {
-                return 0;
-            }
-            if (firstChild == lastChild()) {
-                return 1;
-            }
-            // otherwise request a cache object
-            fNodeListCache = ownerDocument.getNodeListCache(this);
-        }
-        if (fNodeListCache.fLength == -1) { // is the cached length invalid ?
-            int l;
-            ChildNode n;
-            // start from the cached node if we have one
-            if (fNodeListCache.fChildIndex != -1 &&
-                fNodeListCache.fChild != null) {
-                l = fNodeListCache.fChildIndex;
-                n = fNodeListCache.fChild;
-            } else {
-                n = firstChild;
-                l = 0;
-            }
-            while (n != null) {
-                l++;
-                n = n.nextSibling;
-            }
-            fNodeListCache.fLength = l;
-        }
-
-        return fNodeListCache.fLength;
-
-    } // nodeListGetLength():int
-
-    /**
-     * NodeList method: Count the immediate children of this node
-     * @return int
-     */
-    public int getLength() {
-        return nodeListGetLength();
-    }
-
-    /**
-     * Return the Nth immediate child of this node, or null if the index is
-     * out of bounds.  Use to implement NodeList.item().
-     * @param index int
-     */
-    private Node nodeListItem(int index) {
-
-        if (fNodeListCache == null) {
-            // get rid of trivial case
-            if (firstChild == lastChild()) {
-                return index == 0 ? firstChild : null;
-            }
-            // otherwise request a cache object
-            fNodeListCache = ownerDocument.getNodeListCache(this);
-        }
-        int i = fNodeListCache.fChildIndex;
-        ChildNode n = fNodeListCache.fChild;
-        boolean firstAccess = true;
-        // short way
-        if (i != -1 && n != null) {
-            firstAccess = false;
-            if (i < index) {
-                while (i < index && n != null) {
-                    i++;
-                    n = n.nextSibling;
-                }
-            }
-            else if (i > index) {
-                while (i > index && n != null) {
-                    i--;
-                    n = n.previousSibling();
-                }
-            }
-        }
-        else {
-            // long way
-            n = firstChild;
-            for (i = 0; i < index && n != null; i++) {
-                n = n.nextSibling;
-            }
-        }
-
-        // release cache if reaching last child or first child
-        if (!firstAccess && (n == firstChild || n == lastChild())) {
-            fNodeListCache.fChildIndex = -1;
-            fNodeListCache.fChild = null;
-            ownerDocument.freeNodeListCache(fNodeListCache);
-            // we can keep using the cache until it is actually reused
-            // fNodeListCache will be nulled by the pool (document) if that
-            // happens.
-            // fNodeListCache = null;
-        }
-        else {
-            // otherwise update it
-            fNodeListCache.fChildIndex = i;
-            fNodeListCache.fChild = n;
-        }
-        return n;
-
-    } // nodeListItem(int):Node
-
-    /**
-     * NodeList method: Return the Nth immediate child of this node, or
-     * null if the index is out of bounds.
-     * @return org.w3c.dom.Node
-     * @param index int
-     */
-    public Node item(int index) {
-        return nodeListItem(index);
-    } // item(int):Node
-
-    /**
-     * Create a NodeList to access children that is use by subclass elements
-     * that have methods named getLength() or item(int).  ChildAndParentNode
-     * optimizes getChildNodes() by implementing NodeList itself.  However if
-     * a subclass Element implements methods with the same name as the NodeList
-     * methods, they will override the actually methods in this class.
-     * <p>
-     * To use this method, the subclass should implement getChildNodes() and
-     * have it call this method.  The resulting NodeList instance maybe
-     * shared and cached in a transient field, but the cached value must be
-     * cleared if the node is cloned.
-     */
-    protected final NodeList getChildNodesUnoptimized() {
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        return new NodeList() {
-                /**
-                 * @see NodeList.getLength()
-                 */
-                public int getLength() {
-                    return nodeListGetLength();
-                } // getLength():int
-                
-                /**
-                 * @see NodeList.item(int)
-                 */
-                public Node item(int index) {
-                    return nodeListItem(index);
-                } // item(int):Node
-            };
-    } // getChildNodesUnoptimized():NodeList
-
-    //
-    // DOM2: methods, getters, setters
-    //
-
-    /**
-     * Override default behavior to call normalize() on this Node's
-     * children. It is up to implementors or Node to override normalize()
-     * to take action.
-     */
-    public void normalize() {
-        // No need to normalize if already normalized.
-        if (isNormalized()) {
-            return;
-        }
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        ChildNode kid;
-        for (kid = firstChild; kid != null; kid = kid.nextSibling) {
-            kid.normalize();
-        }
-        isNormalized(true);
-    }
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Override default behavior so that if deep is true, children are also
-     * toggled.
-     * @see Node
-     * <P>
-     * Note: this will not change the state of an EntityReference or its
-     * children, which are always read-only.
-     */
-    public void setReadOnly(boolean readOnly, boolean deep) {
-
-        super.setReadOnly(readOnly, deep);
-
-        if (deep) {
-
-            if (needsSyncChildren()) {
-                synchronizeChildren();
-            }
-
-            // Recursively set kids
-            for (ChildNode mykid = firstChild;
-                 mykid != null;
-                 mykid = mykid.nextSibling) {
-                if (mykid.getNodeType() != Node.ENTITY_REFERENCE_NODE) {
-                    mykid.setReadOnly(readOnly,true);
-                }
-            }
-        }
-    } // setReadOnly(boolean,boolean)
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Override this method in subclass to hook in efficient
-     * internal data structure.
-     */
-    protected void synchronizeChildren() {
-        // By default just change the flag to avoid calling this method again
-        needsSyncChildren(false);
-    }
-
-    /**
-     * Checks the normalized state of this node after inserting a child.
-     * If the inserted child causes this node to be unnormalized, then this
-     * node is flagged accordingly.
-     * The conditions for changing the normalized state are:
-     * <ul>
-     * <li>The inserted child is a text node and one of its adjacent siblings
-     * is also a text node.
-     * <li>The inserted child is is itself unnormalized.
-     * </ul>
-     *
-     * @param insertedChild the child node that was inserted into this node
-     *
-     * @throws NullPointerException if the inserted child is <code>null</code>
-     */
-    void checkNormalizationAfterInsert(ChildNode insertedChild) {
-        // See if insertion caused this node to be unnormalized.
-        if (insertedChild.getNodeType() == Node.TEXT_NODE) {
-            ChildNode prev = insertedChild.previousSibling();
-            ChildNode next = insertedChild.nextSibling;
-            // If an adjacent sibling of the new child is a text node,
-            // flag this node as unnormalized.
-            if ((prev != null && prev.getNodeType() == Node.TEXT_NODE) ||
-                (next != null && next.getNodeType() == Node.TEXT_NODE)) {
-                isNormalized(false);
-            }
-        }
-        else {
-            // If the new child is not normalized,
-            // then this node is inherently not normalized.
-            if (!insertedChild.isNormalized()) {
-                isNormalized(false);
-            }
-        }
-    } // checkNormalizationAfterInsert(ChildNode)
-
-    /**
-     * Checks the normalized of this node after removing a child.
-     * If the removed child causes this node to be unnormalized, then this
-     * node is flagged accordingly.
-     * The conditions for changing the normalized state are:
-     * <ul>
-     * <li>The removed child had two adjacent siblings that were text nodes.
-     * </ul>
-     *
-     * @param previousSibling the previous sibling of the removed child, or
-     * <code>null</code>
-     */
-    void checkNormalizationAfterRemove(ChildNode previousSibling) {
-        // See if removal caused this node to be unnormalized.
-        // If the adjacent siblings of the removed child were both text nodes,
-        // flag this node as unnormalized.
-        if (previousSibling != null &&
-            previousSibling.getNodeType() == Node.TEXT_NODE) {
-
-            ChildNode next = previousSibling.nextSibling;
-            if (next != null && next.getNodeType() == Node.TEXT_NODE) {
-                isNormalized(false);
-            }
-        }
-    } // checkNormalizationAfterRemove(Node)
-
-    //
-    // Serialization methods
-    //
-
-    /** Serialize object. */
-    private void writeObject(ObjectOutputStream out) throws IOException {
-
-        // synchronize chilren
-        if (needsSyncChildren()) {
-            synchronizeChildren();
-        }
-        // write object
-        out.defaultWriteObject();
-
-    } // writeObject(ObjectOutputStream)
-
-    /** Deserialize object. */
-    private void readObject(ObjectInputStream ois)
-        throws ClassNotFoundException, IOException {
-
-        // perform default deseralization
-        ois.defaultReadObject();
-
-        // hardset synchildren - so we don't try to sync - it does not make any
-        // sense to try to synchildren when we just deserialize object.
-        needsSyncChildren(false);
-
-    } // readObject(ObjectInputStream)
-
-} // class ParentNode
diff --git a/src/org/apache/xerces/dom/ProcessingInstructionImpl.java b/src/org/apache/xerces/dom/ProcessingInstructionImpl.java
deleted file mode 100644
index 0b05fcf..0000000
--- a/src/org/apache/xerces/dom/ProcessingInstructionImpl.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.ProcessingInstruction;
-
-/**
- * Processing Instructions (PIs) permit documents to carry
- * processor-specific information alongside their actual content. PIs
- * are most common in XML, but they are supported in HTML as well.
- *
- * This class inherits from CharacterDataImpl to reuse its setNodeValue method.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class ProcessingInstructionImpl
-    extends CharacterDataImpl
-    implements ProcessingInstruction {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = 7554435174099981510L;
-
-    //
-    // Data
-    //
-
-    protected String target;
-
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public ProcessingInstructionImpl(CoreDocumentImpl ownerDoc,
-                                     String target, String data) {
-        super(ownerDoc, data);
-        this.target = target;
-    }
-
-    //
-    // Node methods
-    //
-
-    /**
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.PROCESSING_INSTRUCTION_NODE;
-    }
-
-    /**
-     * Returns the target
-     */
-    public String getNodeName() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return target;
-    }
-
-    //
-    // ProcessingInstruction methods
-    //
-
-    /**
-     * A PI's "target" states what processor channel the PI's data
-     * should be directed to. It is defined differently in HTML and XML.
-     * <p>
-     * In XML, a PI's "target" is the first (whitespace-delimited) token
-     * following the "<?" token that begins the PI.
-     * <p>
-     * In HTML, target is always null.
-     * <p>
-     * Note that getNodeName is aliased to getTarget.
-     */
-    public String getTarget() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return target;
-
-    } // getTarget():String
-
-    /**
-     * A PI's data content tells the processor what we actually want it
-     * to do.  It is defined slightly differently in HTML and XML.
-     * <p>
-     * In XML, the data begins with the non-whitespace character
-     * immediately after the target -- @see getTarget().
-     * <p>
-     * In HTML, the data begins with the character immediately after the
-     * "&lt;?" token that begins the PI.
-     * <p>
-     * Note that getNodeValue is aliased to getData
-     */
-    public String getData() {
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return data;
-
-    } // getData():String
-
-    /**
-     * Change the data content of this PI.
-     * Note that setData is aliased to setNodeValue.
-     * @see #getData().
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is read-only.
-     */
-    public void setData(String data) {
-        // Hand off to setNodeValue for code-reuse reasons (mutation
-        // events, readonly protection, synchronizing, etc.)
-        setNodeValue(data);
-    } // setData(String)
-
-} // class ProcessingInstructionImpl
diff --git a/src/org/apache/xerces/dom/RangeExceptionImpl.java b/src/org/apache/xerces/dom/RangeExceptionImpl.java
deleted file mode 100644
index 94b4b0d..0000000
--- a/src/org/apache/xerces/dom/RangeExceptionImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.dom;
-
-import org.w3c.dom.ranges.RangeException;
-
-public class RangeExceptionImpl extends RangeException {
-    public RangeExceptionImpl(short code, String message) {
-        super(code,message);
-    }
-}
diff --git a/src/org/apache/xerces/dom/RangeImpl.java b/src/org/apache/xerces/dom/RangeImpl.java
deleted file mode 100644
index ce1bd17..0000000
--- a/src/org/apache/xerces/dom/RangeImpl.java
+++ /dev/null
@@ -1,1945 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *4dorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.ranges.Range;
-import org.w3c.dom.ranges.RangeException;
-
-
-/** The RangeImpl class implements the org.w3c.dom.range.Range interface.
- *  <p> Please see the API documentation for the interface classes  
- *  and use the interfaces in your client programs.
- */
-public class RangeImpl  implements Range {
-    
-    //
-    // Constants
-    //
-    
-
-    //
-    // Data
-    //
-    
-    DocumentImpl fDocument;
-    Node fStartContainer;
-    Node fEndContainer;
-    int fStartOffset;
-    int fEndOffset;
-    boolean fIsCollapsed;   
-    boolean fDetach = false;
-    Node fInsertNode = null;
-    Node fDeleteNode = null;
-    Node fSplitNode = null;
-    
-    
-    /** The constructor. Clients must use DocumentRange.createRange(),
-     *  because it registers the Range with the document, so it can 
-     *  be fixed-up.
-     */
-    public RangeImpl(DocumentImpl document) {
-        fDocument = document;
-        fStartContainer = document;
-        fEndContainer = document;
-        fStartOffset = 0;
-        fEndOffset = 0;
-        fDetach = false;
-    }
-    
-    public Node getStartContainer() {
-        return fStartContainer;
-    }
-    
-    public int getStartOffset() {
-        return fStartOffset;
-    }
-    
-    public Node getEndContainer() {
-        return fEndContainer;
-    }
-    public int getEndOffset() {
-        return fEndOffset;
-    }
-    
-    public boolean getCollapsed() {
-        return (fStartContainer == fEndContainer 
-             && fStartOffset == fEndOffset);
-    }
-    
-    public Node getCommonAncestorContainer(){
-        Vector startV = new Vector();
-        Node node;
-        for (node=fStartContainer; node != null; 
-             node=node.getParentNode()) 
-        {
-            startV.addElement(node);
-        }
-        Vector endV = new Vector();
-        for (node=fEndContainer; node != null; 
-             node=node.getParentNode()) 
-        {
-            endV.addElement(node);
-        }
-        int s = startV.size()-1;
-        int e = endV.size()-1;
-        Object result = null;
-        while (s>=0 && e>=0) {
-            if (startV.elementAt(s) == endV.elementAt(e)) {
-                result = startV.elementAt(s);
-            } else {
-                break;
-            }
-            --s;
-            --e;
-        }
-        return (Node)result; 
-    }
-    
-    
-    public void setStart(Node refNode, int offset)
-                         throws RangeException, DOMException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        if ( !isLegalContainer(refNode)) {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        
-        checkIndex(refNode, offset);
-        
-        fStartContainer = refNode;
-        fStartOffset = offset;
-    }
-    
-    public void setEnd(Node refNode, int offset)
-                       throws RangeException, DOMException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        if ( !isLegalContainer(refNode)) {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        
-        checkIndex(refNode, offset);
-        
-        fEndContainer = refNode;
-        fEndOffset = offset;
-    }
-    public void setStartBefore(Node refNode) 
-        throws RangeException 
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-		if ( !hasLegalRootContainer(refNode) ||
-			 !isLegalContainedNode(refNode) )
-		{
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        fStartContainer = refNode.getParentNode();
-        int i = 0;
-        for (Node n = refNode; n!=null; n = n.getPreviousSibling()) {
-            i++;
-        }
-        fStartOffset = i-1;
-    }
-    public void setStartAfter(Node refNode)
-        throws RangeException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        if ( !hasLegalRootContainer(refNode) || 
-			 !isLegalContainedNode(refNode)) {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        fStartContainer = refNode.getParentNode();
-        int i = 0;
-        for (Node n = refNode; n!=null; n = n.getPreviousSibling()) {
-            i++;
-        }
-        fStartOffset = i;
-    }
-    public void setEndBefore(Node refNode)
-        throws RangeException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        if ( !hasLegalRootContainer(refNode) ||
-			 !isLegalContainedNode(refNode)) {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        fEndContainer = refNode.getParentNode();
-        int i = 0;
-        for (Node n = refNode; n!=null; n = n.getPreviousSibling()) {
-            i++;
-        }
-        fEndOffset = i-1;
-    }
-                                            
-    public void setEndAfter(Node refNode)
-        throws RangeException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        if ( !hasLegalRootContainer(refNode) ||
-			 !isLegalContainedNode(refNode)) {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        fEndContainer = refNode.getParentNode();
-        int i = 0;
-        for (Node n = refNode; n!=null; n = n.getPreviousSibling()) {
-            i++;
-        }
-        fEndOffset = i;
-    }
-    public void collapse(boolean toStart) {
-        
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        
-        if (toStart) {
-            fEndContainer = fStartContainer;
-            fEndOffset = fStartOffset;
-        } else {
-            fStartContainer = fEndContainer;
-            fStartOffset = fEndOffset;
-        }
-    }
-    
-    public void selectNode(Node refNode)
-        throws RangeException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        if ( !isLegalContainer( refNode.getParentNode() ) ||
-			 !isLegalContainedNode( refNode ) ) {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        Node parent = refNode.getParentNode();
-        if (parent != null ) // REVIST: what to do if it IS null?
-        {
-            fStartContainer = parent;
-            fEndContainer = parent;
-            int i = 0;
-            for (Node n = refNode; n!=null; n = n.getPreviousSibling()) {
-                i++;
-            }
-            fStartOffset = i-1;
-            fEndOffset = fStartOffset+1;
-        }
-    }
-        
-    public void selectNodeContents(Node refNode)
-        throws RangeException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-        }
-        if ( !isLegalContainer(refNode)) {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        fStartContainer = refNode;
-        fEndContainer = refNode;
-        Node first = refNode.getFirstChild();
-        fStartOffset = 0;
-        if (first == null) {
-            fEndOffset = 0;
-        } else {
-            int i = 0;
-            for (Node n = first; n!=null; n = n.getNextSibling()) {
-                i++;
-            }
-            fEndOffset = i;
-        }
-        
-    }
-
-    public short compareBoundaryPoints(short how, Range sourceRange)
-        throws DOMException
-    {
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-    	}
-       
-        Node endPointA;
-        Node endPointB;
-        int offsetA;
-        int offsetB;
-        
-        if (how == START_TO_START) {
-            endPointA = sourceRange.getStartContainer();
-            endPointB = fStartContainer;
-            offsetA = sourceRange.getStartOffset();
-            offsetB = fStartOffset;
-        } else 
-        if (how == START_TO_END) {
-            endPointA = sourceRange.getStartContainer();
-            endPointB = fEndContainer;
-            offsetA = sourceRange.getStartOffset();
-            offsetB = fEndOffset;
-        } else 
-        if (how == END_TO_START) {
-            endPointA = sourceRange.getEndContainer();
-            endPointB = fStartContainer;
-            offsetA = sourceRange.getEndOffset();
-            offsetB = fStartOffset;
-        } else {
-            endPointA = sourceRange.getEndContainer();
-            endPointB = fEndContainer;
-            offsetA = sourceRange.getEndOffset();
-            offsetB = fEndOffset;
-        }
-
-        // The DOM Spec outlines four cases that need to be tested
-        // to compare two range boundary points:
-        //   case 1: same container
-        //   case 2: Child C of container A is ancestor of B
-        //   case 3: Child C of container B is ancestor of A
-        //   case 4: preorder traversal of context tree.
-        
-        // case 1: same container
-        if (endPointA == endPointB) {
-            if (offsetA < offsetB) return 1;
-            if (offsetA == offsetB) return 0;
-            return -1;
-        }
-        // case 2: Child C of container A is ancestor of B
-        // This can be quickly tested by walking the parent chain of B
-        for ( Node c = endPointB, p = c.getParentNode();
-             p != null;
-             c = p, p = p.getParentNode())
-        {
-            if (p == endPointA) {
-                int index = indexOf(c, endPointA);
-                if (offsetA <= index) return 1;
-                return -1;
-            }
-        }
-
-        // case 3: Child C of container B is ancestor of A
-        // This can be quickly tested by walking the parent chain of A
-        for ( Node c = endPointA, p = c.getParentNode();
-             p != null;
-             c = p, p = p.getParentNode())
-        {
-            if (p == endPointB) {
-                int index = indexOf(c, endPointB);
-                if (index < offsetB) return 1;
-                return -1;
-            }
-        }
-
-        // case 4: preorder traversal of context tree.
-        // Instead of literally walking the context tree in pre-order,
-        // we use relative node depth walking which is usually faster
-
-        int depthDiff = 0;
-        for ( Node n = endPointA; n != null; n = n.getParentNode() )
-            depthDiff++;
-        for ( Node n = endPointB; n != null; n = n.getParentNode() )
-            depthDiff--;
-        while (depthDiff > 0) {
-            endPointA = endPointA.getParentNode();
-            depthDiff--;
-        }
-        while (depthDiff < 0) {
-            endPointB = endPointB.getParentNode();
-            depthDiff++;
-        }
-        for (Node pA = endPointA.getParentNode(),
-             pB = endPointB.getParentNode();
-             pA != pB;
-             pA = pA.getParentNode(), pB = pB.getParentNode() )
-        {
-            endPointA = pA;
-            endPointB = pB;
-        }
-        for ( Node n = endPointA.getNextSibling();
-             n != null;
-             n = n.getNextSibling() )
-        {
-            if (n == endPointB) {
-                return 1;
-            }
-        }
-        return -1;
-    }
-    
-    public void deleteContents()
-        throws DOMException
-    {
-        traverseContents(DELETE_CONTENTS);
-    }
-        
-    public DocumentFragment extractContents()
-        throws DOMException
-    {
-        return traverseContents(EXTRACT_CONTENTS);
-    }
-        
-    public DocumentFragment cloneContents()
-        throws DOMException
-    {
-        return traverseContents(CLONE_CONTENTS);
-    }
-    
-    public void insertNode(Node newNode)
-        throws DOMException, RangeException
-    {
-    	if ( newNode == null ) return; //throw exception?
-        
-        if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-    	}
-        if ( fDocument != newNode.getOwnerDocument() ) {
-            throw new DOMException(DOMException.WRONG_DOCUMENT_ERR,"DOM004 Wrong document");
-        }
-       
-        int type = newNode.getNodeType();
-        if (type == Node.ATTRIBUTE_NODE
-            || type == Node.ENTITY_NODE
-            || type == Node.NOTATION_NODE
-            || type == Node.DOCUMENT_NODE)
-        {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        Node cloneCurrent;
-        Node current;
-        int currentChildren = 0;
-
-        //boolean MULTIPLE_MODE = false;
-        if (fStartContainer.getNodeType() == Node.TEXT_NODE) {
-        
-            Node parent = fStartContainer.getParentNode();
-            currentChildren = parent.getChildNodes().getLength(); //holds number of kids before insertion
-            // split text node: results is 3 nodes..
-            cloneCurrent = fStartContainer.cloneNode(false);
-            ((TextImpl)cloneCurrent).setNodeValueInternal(
-                    (cloneCurrent.getNodeValue()).substring(fStartOffset));
-            ((TextImpl)fStartContainer).setNodeValueInternal(
-                    (fStartContainer.getNodeValue()).substring(0,fStartOffset));
-            Node next = fStartContainer.getNextSibling();
-            if (next != null) {
-                    if (parent !=  null) {
-                        parent.insertBefore(newNode, next);
-                        parent.insertBefore(cloneCurrent, next);
-                    }
-            } else {
-                    if (parent != null) {
-                        parent.appendChild(newNode);
-                        parent.appendChild(cloneCurrent);
-                    }
-            }
-             //update ranges after the insertion
-             if ( fEndContainer == fStartContainer) {
-                  fEndContainer = cloneCurrent; //endContainer is the new Node created
-                  fEndOffset -= fStartOffset;   
-             }
-             else if ( fEndContainer == parent ) {    //endContainer was not a text Node.
-                  //endOffset + = number_of_children_added
-                   fEndOffset += (parent.getChildNodes().getLength() - currentChildren);  
-             }
-
-             // signal other Ranges to update their start/end containers/offsets
-             signalSplitData(fStartContainer, cloneCurrent, fStartOffset);
-                
-             
-        } else { // ! TEXT_NODE
-            if ( fEndContainer == fStartContainer )      //need to remember number of kids
-                currentChildren= fEndContainer.getChildNodes().getLength();
-
-            current = fStartContainer.getFirstChild();
-            int i = 0;
-            for(i = 0; i < fStartOffset && current != null; i++) {
-                current=current.getNextSibling();
-            }
-            if (current != null) {
-                fStartContainer.insertBefore(newNode, current);
-            } else {
-                fStartContainer.appendChild(newNode);
-            }
-            //update fEndOffset. ex:<body><p/></body>. Range(start;end): body,0; body,1
-            // insert <h1>: <body></h1><p/></body>. Range(start;end): body,0; body,2
-            if ( fEndContainer == fStartContainer ) {     //update fEndOffset
-                fEndOffset += (fEndContainer.getChildNodes().getLength() - currentChildren);
-            }
-
-        } 
-    }
-    
-    public void surroundContents(Node newParent)
-        throws DOMException, RangeException
-    {
-        if (newParent==null) return;
-        
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-    	}
-        int type = newParent.getNodeType();
-        if (type == Node.ATTRIBUTE_NODE
-            || type == Node.ENTITY_NODE
-            || type == Node.NOTATION_NODE
-            || type == Node.DOCUMENT_TYPE_NODE
-            || type == Node.DOCUMENT_NODE
-            || type == Node.DOCUMENT_FRAGMENT_NODE)
-        {
-    		throw new RangeExceptionImpl(
-    			RangeException.INVALID_NODE_TYPE_ERR, 
-			"DOM012 Invalid node type");
-        }
-        
-        Node root = getCommonAncestorContainer();
-        
-        Node realStart = fStartContainer;
-        Node realEnd = fEndContainer;
-        if (fStartContainer.getNodeType() == Node.TEXT_NODE) {
-            realStart = fStartContainer.getParentNode();
-        }
-        if (fEndContainer.getNodeType() == Node.TEXT_NODE) {
-            realEnd = fEndContainer.getParentNode();
-        }
-            
-        if (realStart != realEnd) {
-           	throw new RangeExceptionImpl(
-    		RangeException.BAD_BOUNDARYPOINTS_ERR, 
-    		"DOM013 Bad boundary points");
-        }
-
-    	DocumentFragment frag = extractContents();
-    	insertNode(newParent);
-    	newParent.appendChild(frag);
-    	selectNode(newParent);
-    }
-        
-    public Range cloneRange(){
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-    	}
-        
-        Range range = fDocument.createRange();
-        range.setStart(fStartContainer, fStartOffset);
-        range.setEnd(fEndContainer, fEndOffset);
-        return range;
-    }
-    
-    public String toString(){
-    	if( fDetach) {
-    		throw new DOMException(
-    			DOMException.INVALID_STATE_ERR, 
-			"DOM011 Invalid state");
-    	}
-    	
-    	Node node = fStartContainer;
-        Node stopNode = fEndContainer;
-    	StringBuffer sb = new StringBuffer();
-    	if (fStartContainer.getNodeType() == Node.TEXT_NODE
-    	 || fStartContainer.getNodeType() == Node.CDATA_SECTION_NODE
-    	) {
-    	    if (fStartContainer == fEndContainer) {
-    	        sb.append(fStartContainer.getNodeValue().substring(fStartOffset, fEndOffset));
-    	        return sb.toString();
-            }
-    	    sb.append(fStartContainer.getNodeValue().substring(fStartOffset));
-            node=nextNode (node,true); //fEndContainer!=fStartContainer
-    	    
-    	}
-        else {  //fStartContainer is not a TextNode
-            node=node.getFirstChild();
-            if (fStartOffset>0) { //find a first node within a range, specified by fStartOffset
-               int counter=0;
-               while (counter<fStartOffset && node!=null) {
-                   node=node.getNextSibling();
-                   counter++;
-               }  
-            }
-            if (node == null) {
-                   node = nextNode(fStartContainer,false);
-            }
-        } 
-        if ( fEndContainer.getNodeType()!= Node.TEXT_NODE &&
-             fEndContainer.getNodeType()!= Node.CDATA_SECTION_NODE ){
-             int i=fEndOffset;
-             stopNode = fEndContainer.getFirstChild();
-             while( i>0 && stopNode!=null ){
-                 --i;
-                 stopNode = stopNode.getNextSibling();
-             }
-             if ( stopNode == null )
-                 stopNode = nextNode( fEndContainer, false );
-         }
-         while (node != stopNode) {  //look into all kids of the Range
-             if (node == null) break;
-             if (node.getNodeType() == Node.TEXT_NODE
-             ||  node.getNodeType() == Node.CDATA_SECTION_NODE) {
-                 sb.append(node.getNodeValue());
-             }
-
-             node = nextNode(node, true);
-         }
-
-      	if (fEndContainer.getNodeType() == Node.TEXT_NODE
-    	 || fEndContainer.getNodeType() == Node.CDATA_SECTION_NODE) {
-    	    sb.append(fEndContainer.getNodeValue().substring(0,fEndOffset));
-    	}
-    	return sb.toString();
-    }
-    
-    public void detach() {
-        fDetach = true;
-        fDocument.removeRange(this);
-    }
-    
-    // 
-    // Mutation functions
-    //
-    
-    /** Signal other Ranges to update their start/end 
-     *  containers/offsets. The data has already been split
-     *  into the two Nodes.
-     */
-    void signalSplitData(Node node, Node newNode, int offset) {
-        fSplitNode = node;
-        // notify document
-        fDocument.splitData(node, newNode, offset);
-        fSplitNode = null;
-    }
-    
-    /** Fix up this Range if another Range has split a Text Node
-     *  into 2 Nodes.
-     */
-    void receiveSplitData(Node node, Node newNode, int offset) {
-        if (node == null || newNode == null) return;
-        if (fSplitNode == node) return;
-        
-        if (node == fStartContainer 
-        && fStartContainer.getNodeType() == Node.TEXT_NODE) {
-            if (fStartOffset > offset) {
-                fStartOffset = fStartOffset - offset;
-                fStartContainer = newNode;
-            }
-        }
-        if (node == fEndContainer 
-        && fEndContainer.getNodeType() == Node.TEXT_NODE) {
-            if (fEndOffset > offset) {
-                fEndOffset = fEndOffset-offset;
-                fEndContainer = newNode;
-            }
-        }
-        
-    }
-   
-    /** This function inserts text into a Node and invokes
-     *  a method to fix-up all other Ranges.
-     */
-    void deleteData(CharacterData node, int offset, int count) {
-        fDeleteNode = node;
-        node.deleteData( offset,  count);
-        fDeleteNode = null;
-    }
-    
-    
-    /** This function is called from DOM.
-     *  The  text has already beeen inserted.
-     *  Fix-up any offsets.
-     */
-    void receiveDeletedText(Node node, int offset, int count) {
-        if (node == null) return;
-        if (fDeleteNode == node) return;
-        if (node == fStartContainer 
-        && fStartContainer.getNodeType() == Node.TEXT_NODE) {
-            if (fStartOffset > offset+count) {
-                fStartOffset = offset+(fStartOffset-(offset+count));
-            } else 
-            if (fStartOffset > offset) {
-                fStartOffset = offset;
-            }  
-        }
-        if (node == fEndContainer 
-        && fEndContainer.getNodeType() == Node.TEXT_NODE) {
-            if (fEndOffset > offset+count) {
-                fEndOffset = offset+(fEndOffset-(offset+count));
-            } else 
-            if (fEndOffset > offset) {
-                fEndOffset = offset;
-            }  
-        }
-        
-    }
-   
-    /** This function inserts text into a Node and invokes
-     *  a method to fix-up all other Ranges.
-     */
-    void insertData(CharacterData node, int index, String insert) {
-        fInsertNode = node;
-        node.insertData( index,  insert);
-        fInsertNode = null;
-    }
-    
-    
-    /** This function is called from DOM.
-     *  The  text has already beeen inserted.
-     *  Fix-up any offsets.
-     */
-    void receiveInsertedText(Node node, int index, int len) {
-        if (node == null) return;
-        if (fInsertNode == node) return;
-        if (node == fStartContainer 
-        && fStartContainer.getNodeType() == Node.TEXT_NODE) {
-            if (index < fStartOffset) {
-                fStartOffset = fStartOffset+len;
-            }
-        }
-        if (node == fEndContainer 
-        && fEndContainer.getNodeType() == Node.TEXT_NODE) {
-            if (index < fEndOffset) {
-                fEndOffset = fEndOffset+len;
-            }
-        }
-        
-    }
-   
-    /** This function is called from DOM.
-     *  The  text has already beeen replaced.
-     *  Fix-up any offsets.
-     */
-    void receiveReplacedText(Node node) {
-        if (node == null) return;
-        if (node == fStartContainer 
-        && fStartContainer.getNodeType() == Node.TEXT_NODE) {
-            fStartOffset = 0;
-        }
-        if (node == fEndContainer 
-        && fEndContainer.getNodeType() == Node.TEXT_NODE) {
-            fEndOffset = 0;
-        }
-        
-    }
-    
-    /** This function is called from the DOM.
-     *  This node has already been inserted into the DOM.
-     *  Fix-up any offsets.
-     */
-    public void insertedNodeFromDOM(Node node) {
-        if (node == null) return;
-        if (fInsertNode == node) return;
-        
-        Node parent = node.getParentNode();
-        
-        if (parent == fStartContainer) {
-            int index = indexOf(node, fStartContainer);
-            if (index < fStartOffset) {
-                fStartOffset++;
-            }
-        }
-        
-        if (parent == fEndContainer) {
-            int index = indexOf(node, fEndContainer);
-            if (index < fEndOffset) {
-                fEndOffset++;
-            }
-        }
-        
-    }
-    
-    /** This function is called within Range 
-     *  instead of Node.removeChild,
-     *  so that the range can remember that it is actively
-     *  removing this child.
-     */
-     
-    Node fRemoveChild = null;
-    Node removeChild(Node parent, Node child) {
-        fRemoveChild = child;
-        Node n = parent.removeChild(child);
-        fRemoveChild = null;
-        return n;
-    }
-    
-    /** This function must be called by the DOM _BEFORE_
-     *  a node is deleted, because at that time it is
-     *  connected in the DOM tree, which we depend on.
-     */
-    void removeNode(Node node) {
-        if (node == null) return;
-        if (fRemoveChild == node) return;
-        
-        Node parent = node.getParentNode();
-        
-        if (parent == fStartContainer) {
-            int index = indexOf(node, fStartContainer);
-            if (index < fStartOffset) {
-                fStartOffset--;
-            }
-        }
-        
-        if (parent == fEndContainer) {
-            int index = indexOf(node, fEndContainer);
-            if (index < fEndOffset) {
-                fEndOffset--;
-            }
-        }
-        //startContainer or endContainer or both is/are the ancestor(s) of the Node to be deleted
-        if (parent != fStartContainer 
-        ||  parent != fEndContainer) {
-            if (isAncestorOf(node, fStartContainer)) {
-                fStartContainer = parent;
-                fStartOffset = indexOf( node, parent);
-            }   
-            if (isAncestorOf(node, fEndContainer)) {
-                fEndContainer = parent;
-                fEndOffset = indexOf( node, parent);
-            }
-        } 
-        
-    }
-        
-    //
-    // Utility functions.
-    //
-    
-    // parameters for traverseContents(int)
-    //REVIST: use boolean, since there are only 2 now...
-    static final int EXTRACT_CONTENTS = 1;
-    static final int CLONE_CONTENTS = 2;
-    static final int DELETE_CONTENTS = 3;
-    
-    /**
-     * This is the master routine invoked to visit the nodes
-     * selected by this range.  For each such node, different
-     * actions are taken depending on the value of the
-     * <code>how</code> argument.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     * 
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will produce
-     *               a document fragment containing the range's content.
-     *               Partially selected nodes are copied, but fully
-     *               selected nodes are moved.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but sill
-     *               produced cloned content in a document fragment
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete from
-     *               the context tree of the range, all fully selected
-     *               nodes.
-     *               </ol>
-     * 
-     * @return Returns a document fragment containing any
-     *         copied or extracted nodes.  If the <code>how</code>
-     *         parameter was <code>DELETE_CONTENTS</code>, the
-     *         return value is null.
-     */
-    private DocumentFragment traverseContents( int how )
-        throws DOMException
-    {
-        if (fStartContainer == null || fEndContainer == null) {
-            return null; // REVIST: Throw exception?
-        }
-        
-        //Check for a detached range.
-        if( fDetach) {
-            throw new DOMException(
-                DOMException.INVALID_STATE_ERR, 
-            "DOM011 Invalid state");
-        }
-
-        /*
-          Traversal is accomplished by first determining the
-          relationship between the endpoints of the range.
-          For each of four significant relationships, we will
-          delegate the traversal call to a method that 
-          can make appropriate assumptions.
-         */
-
-        // case 1: same container
-        if ( fStartContainer == fEndContainer )
-            return traverseSameContainer( how );
-
-
-        // case 2: Child C of start container is ancestor of end container 
-        // This can be quickly tested by walking the parent chain of 
-        // end container
-        int endContainerDepth = 0;
-        for ( Node c = fEndContainer, p = c.getParentNode();
-             p != null;
-             c = p, p = p.getParentNode())
-        {
-            if (p == fStartContainer)
-                return traverseCommonStartContainer( c, how );
-            ++endContainerDepth;
-        }
-
-        // case 3: Child C of container B is ancestor of A
-        // This can be quickly tested by walking the parent chain of A
-        int startContainerDepth = 0;
-        for ( Node c = fStartContainer, p = c.getParentNode();
-             p != null;
-             c = p, p = p.getParentNode())
-        {
-            if (p == fEndContainer)
-                return traverseCommonEndContainer( c, how );
-            ++startContainerDepth;
-        }
-
-        // case 4: There is a common ancestor container.  Find the
-        // ancestor siblings that are children of that container.
-        int depthDiff = startContainerDepth - endContainerDepth;
-
-        Node startNode = fStartContainer;
-        while (depthDiff > 0) {
-            startNode = startNode.getParentNode();
-            depthDiff--;
-        }
-
-        Node endNode = fEndContainer;
-        while (depthDiff < 0) {
-            endNode = endNode.getParentNode();
-            depthDiff++;
-        }
-
-        // ascend the ancestor hierarchy until we have a common parent.
-        for( Node sp = startNode.getParentNode(), ep = endNode.getParentNode();
-             sp!=ep; 
-             sp = sp.getParentNode(), ep = ep.getParentNode() )
-        {
-            startNode = sp;
-            endNode = ep;
-        }
-        return traverseCommonAncestors( startNode, endNode, how );
-    }
-    
-    /**
-     * Visits the nodes selected by this range when we know
-     * a-priori that the start and end containers are the same.
-     * This method is invoked by the generic <code>traverse</code>
-     * method.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will produce
-     *               a document fragment containing the range's content.
-     *               Partially selected nodes are copied, but fully
-     *               selected nodes are moved.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but sill
-     *               produced cloned content in a document fragment
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete from
-     *               the context tree of the range, all fully selected
-     *               nodes.
-     *               </ol>
-     * 
-     * @return Returns a document fragment containing any
-     *         copied or extracted nodes.  If the <code>how</code>
-     *         parameter was <code>DELETE_CONTENTS</code>, the
-     *         return value is null.
-     */
-    private DocumentFragment traverseSameContainer( int how )
-    {
-        DocumentFragment frag = null;
-        if ( how!=DELETE_CONTENTS)
-            frag = fDocument.createDocumentFragment();
-
-        // If selection is empty, just return the fragment
-        if ( fStartOffset==fEndOffset )
-            return frag;
-
-        // Text node needs special case handling
-        if ( fStartContainer.getNodeType()==Node.TEXT_NODE )
-        {
-            // get the substring
-            String s = fStartContainer.getNodeValue();
-            String sub = s.substring( fStartOffset, fEndOffset );
-
-            // set the original text node to its new value
-            if ( how != CLONE_CONTENTS )
-            {
-                fStartContainer.setNodeValue(
-                    s.substring(0, fStartOffset ) +
-                    s.substring(fEndOffset)
-                );
-
-                // Nothing is partially selected, so collapse to start point
-                collapse( true );
-            }
-            if ( how==DELETE_CONTENTS)
-                return null;
-            frag.appendChild( fDocument.createTextNode(sub) );
-            return frag;
-        }
-
-        // Copy nodes between the start/end offsets.
-        Node n = getSelectedNode( fStartContainer, fStartOffset );
-        int cnt = fEndOffset - fStartOffset;
-        while( cnt > 0 )
-        {
-            Node sibling = n.getNextSibling();
-            Node xferNode = traverseFullySelected( n, how );
-            if ( frag!=null )
-                frag.appendChild( xferNode );
-            --cnt;
-            n = sibling;
-        }
-
-        // Nothing is partially selected, so collapse to start point
-        if ( how != CLONE_CONTENTS )
-            collapse( true );
-        return frag;
-    }
-
-    /**
-     * Visits the nodes selected by this range when we know
-     * a-priori that the start and end containers are not the
-     * same, but the start container is an ancestor of the
-     * end container. This method is invoked by the generic 
-     * <code>traverse</code> method.
-     * 
-     * @param endAncestor
-     *               The ancestor of the end container that is a direct child
-     *               of the start container.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will produce
-     *               a document fragment containing the range's content.
-     *               Partially selected nodes are copied, but fully
-     *               selected nodes are moved.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but sill
-     *               produced cloned content in a document fragment
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete from
-     *               the context tree of the range, all fully selected
-     *               nodes.
-     *               </ol>
-     * 
-     * @return Returns a document fragment containing any
-     *         copied or extracted nodes.  If the <code>how</code>
-     *         parameter was <code>DELETE_CONTENTS</code>, the
-     *         return value is null.
-     */
-    private DocumentFragment 
-        traverseCommonStartContainer( Node endAncestor, int how )
-    {
-        DocumentFragment frag = null;
-        if ( how!=DELETE_CONTENTS)
-            frag = fDocument.createDocumentFragment();
-        Node n = traverseRightBoundary( endAncestor, how );
-        if ( frag!=null )
-            frag.appendChild( n );
-
-        int endIdx = indexOf( endAncestor, fStartContainer );
-        int cnt = endIdx - fStartOffset;
-        if ( cnt <=0 )
-        {
-            // Collapse to just before the endAncestor, which 
-            // is partially selected.
-            if ( how != CLONE_CONTENTS )
-            {
-                setEndBefore( endAncestor );
-                collapse( false );
-            }
-            return frag;
-        }
-
-        n = endAncestor.getPreviousSibling();
-        while( cnt > 0 )
-        {
-            Node sibling = n.getPreviousSibling();
-            Node xferNode = traverseFullySelected( n, how );
-            if ( frag!=null )
-                frag.insertBefore( xferNode, frag.getFirstChild() );
-            --cnt;
-            n = sibling;
-        }
-        // Collapse to just before the endAncestor, which 
-        // is partially selected.
-        if ( how != CLONE_CONTENTS )
-        {
-            setEndBefore( endAncestor );
-            collapse( false );
-        }
-        return frag;
-    }
-    
-    /**
-     * Visits the nodes selected by this range when we know
-     * a-priori that the start and end containers are not the
-     * same, but the end container is an ancestor of the
-     * start container. This method is invoked by the generic
-     * <code>traverse</code> method.
-     * 
-     * @param startAncestor
-     *               The ancestor of the start container that is a direct
-     *               child of the end container.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will produce
-     *               a document fragment containing the range's content.
-     *               Partially selected nodes are copied, but fully
-     *               selected nodes are moved.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but sill
-     *               produced cloned content in a document fragment
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete from
-     *               the context tree of the range, all fully selected
-     *               nodes.
-     *               </ol>
-     * 
-     * @return Returns a document fragment containing any
-     *         copied or extracted nodes.  If the <code>how</code>
-     *         parameter was <code>DELETE_CONTENTS</code>, the
-     *         return value is null.
-     */
-    private DocumentFragment 
-        traverseCommonEndContainer( Node startAncestor, int how )
-    {
-        DocumentFragment frag = null;
-        if ( how!=DELETE_CONTENTS)
-            frag = fDocument.createDocumentFragment();
-        Node n = traverseLeftBoundary( startAncestor, how );
-        if ( frag!=null )
-            frag.appendChild( n );
-        int startIdx = indexOf( startAncestor, fEndContainer );
-        ++startIdx;  // Because we already traversed it....
-
-        int cnt = fEndOffset - startIdx;
-        n = startAncestor.getNextSibling();
-        while( cnt > 0 )
-        {
-            Node sibling = n.getNextSibling();
-            Node xferNode = traverseFullySelected( n, how );
-            if ( frag!=null )
-                frag.appendChild( xferNode );
-            --cnt;
-            n = sibling;
-        }
-
-        if ( how != CLONE_CONTENTS )
-        {
-            setStartAfter( startAncestor );
-            collapse( true );
-        }
-
-        return frag;
-    }
-
-    /**
-     * Visits the nodes selected by this range when we know
-     * a-priori that the start and end containers are not
-     * the same, and we also know that neither the start
-     * nor end container is an ancestor of the other.
-     * This method is invoked by
-     * the generic <code>traverse</code> method.
-     * 
-     * @param startAncestor
-     *               Given a common ancestor of the start and end containers,
-     *               this parameter is the ancestor (or self) of the start
-     *               container that is a direct child of the common ancestor.
-     * 
-     * @param endAncestor
-     *               Given a common ancestor of the start and end containers,
-     *               this parameter is the ancestor (or self) of the end
-     *               container that is a direct child of the common ancestor.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will produce
-     *               a document fragment containing the range's content.
-     *               Partially selected nodes are copied, but fully
-     *               selected nodes are moved.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but sill
-     *               produced cloned content in a document fragment
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete from
-     *               the context tree of the range, all fully selected
-     *               nodes.
-     *               </ol>
-     * 
-     * @return Returns a document fragment containing any
-     *         copied or extracted nodes.  If the <code>how</code>
-     *         parameter was <code>DELETE_CONTENTS</code>, the
-     *         return value is null.
-     */
-    private DocumentFragment 
-        traverseCommonAncestors( Node startAncestor, Node endAncestor, int how )
-    {
-        DocumentFragment frag = null;
-        if ( how!=DELETE_CONTENTS)
-            frag = fDocument.createDocumentFragment();
-
-        Node n = traverseLeftBoundary( startAncestor, how );
-        if ( frag!=null )
-            frag.appendChild( n );
-
-        Node commonParent = startAncestor.getParentNode();
-        int startOffset = indexOf( startAncestor, commonParent );
-        int endOffset = indexOf( endAncestor, commonParent );
-        ++startOffset;
-
-        int cnt = endOffset - startOffset;
-        Node sibling = startAncestor.getNextSibling();
-
-        while( cnt > 0 )
-        {
-            Node nextSibling = sibling.getNextSibling();
-            n = traverseFullySelected( sibling, how );
-            if ( frag!=null )
-                frag.appendChild( n );
-            sibling = nextSibling;
-            --cnt;
-        }
-
-        n = traverseRightBoundary( endAncestor, how );
-        if ( frag!=null )
-            frag.appendChild( n );
-
-        if ( how != CLONE_CONTENTS )
-        {
-            setStartAfter( startAncestor );
-            collapse( true );
-        }
-        return frag;
-    }
-
-    /**
-     * Traverses the "right boundary" of this range and
-     * operates on each "boundary node" according to the
-     * <code>how</code> parameter.  It is a-priori assumed
-     * by this method that the right boundary does
-     * not contain the range's start container.
-     * <p>
-     * A "right boundary" is best visualized by thinking
-     * of a sample tree:<pre>
-     *                 A
-     *                /|\
-     *               / | \
-     *              /  |  \
-     *             B   C   D
-     *            /|\     /|\
-     *           E F G   H I J
-     * </pre>
-     * Imagine first a range that begins between the
-     * "E" and "F" nodes and ends between the
-     * "I" and "J" nodes.  The start container is
-     * "B" and the end container is "D".  Given this setup,
-     * the following applies:
-     * <p>
-     * Partially Selected Nodes: B, D<br>
-     * Fully Selected Nodes: F, G, C, H, I
-     * <p>
-     * The "right boundary" is the highest subtree node
-     * that contains the ending container.  The root of
-     * this subtree is always partially selected.
-     * <p>
-     * In this example, the nodes that are traversed
-     * as "right boundary" nodes are: H, I, and D.
-     * 
-     * @param root   The node that is the root of the "right boundary" subtree.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will produce
-     *               a node containing the boundaries content.
-     *               Partially selected nodes are copied, but fully
-     *               selected nodes are moved.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but will
-     *               produced cloned content.
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete from
-     *               the context tree of the range, all fully selected
-     *               nodes within the boundary.
-     *               </ol>
-     * 
-     * @return Returns a node that is the result of visiting nodes.
-     *         If the traversal operation is
-     *         <code>DELETE_CONTENTS</code> the return value is null.
-     */
-    private Node traverseRightBoundary( Node root, int how )
-    {
-        Node next = getSelectedNode( fEndContainer, fEndOffset-1 );
-        boolean isFullySelected = ( next!=fEndContainer );
-
-        if ( next==root )
-            return traverseNode( next, isFullySelected, false, how );
-
-        Node parent = next.getParentNode();
-        Node clonedParent = traverseNode( parent, false, false, how );
-
-        while( parent!=null )
-        {
-            while( next!=null )
-            {
-                Node prevSibling = next.getPreviousSibling();
-                Node clonedChild = 
-                    traverseNode( next, isFullySelected, false, how );
-                if ( how!=DELETE_CONTENTS )
-                {
-                    clonedParent.insertBefore( 
-                        clonedChild, 
-                        clonedParent.getFirstChild() 
-                    );
-                }
-                isFullySelected = true;
-                next = prevSibling;
-            }
-            if ( parent==root )
-                return clonedParent;
-
-            next = parent.getPreviousSibling();
-            parent = parent.getParentNode();
-            Node clonedGrandParent = traverseNode( parent, false, false, how );
-            if ( how!=DELETE_CONTENTS )
-                clonedGrandParent.appendChild( clonedParent );
-            clonedParent = clonedGrandParent;
-
-        } 
-
-        // should never occur
-        return null;
-    }
-
-    /**
-     * Traverses the "left boundary" of this range and
-     * operates on each "boundary node" according to the
-     * <code>how</code> parameter.  It is a-priori assumed
-     * by this method that the left boundary does
-     * not contain the range's end container.
-     * <p>
-     * A "left boundary" is best visualized by thinking
-     * of a sample tree:<pre>
-     * 
-     *                 A
-     *                /|\
-     *               / | \
-     *              /  |  \
-     *             B   C   D
-     *            /|\     /|\
-     *           E F G   H I J
-     * </pre>
-     * Imagine first a range that begins between the
-     * "E" and "F" nodes and ends between the
-     * "I" and "J" nodes.  The start container is
-     * "B" and the end container is "D".  Given this setup,
-     * the following applies:
-     * <p>
-     * Partially Selected Nodes: B, D<br>
-     * Fully Selected Nodes: F, G, C, H, I
-     * <p>
-     * The "left boundary" is the highest subtree node
-     * that contains the starting container.  The root of
-     * this subtree is always partially selected.
-     * <p>
-     * In this example, the nodes that are traversed
-     * as "left boundary" nodes are: F, G, and B.
-     * 
-     * @param root   The node that is the root of the "left boundary" subtree.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will produce
-     *               a node containing the boundaries content.
-     *               Partially selected nodes are copied, but fully
-     *               selected nodes are moved.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but will
-     *               produced cloned content.
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete from
-     *               the context tree of the range, all fully selected
-     *               nodes within the boundary.
-     *               </ol>
-     * 
-     * @return Returns a node that is the result of visiting nodes.
-     *         If the traversal operation is
-     *         <code>DELETE_CONTENTS</code> the return value is null.
-     */
-    private Node traverseLeftBoundary( Node root, int how )
-    {
-        Node next = getSelectedNode( getStartContainer(), getStartOffset() );
-        boolean isFullySelected = ( next!=getStartContainer() );
-
-        if ( next==root )
-            return traverseNode( next, isFullySelected, true, how );
-
-        Node parent = next.getParentNode();
-        Node clonedParent = traverseNode( parent, false, true, how );
-
-        while( parent!=null )
-        {
-            while( next!=null )
-            {
-                Node nextSibling = next.getNextSibling();
-                Node clonedChild = 
-                    traverseNode( next, isFullySelected, true, how );
-                if ( how!=DELETE_CONTENTS )
-                    clonedParent.appendChild(clonedChild);
-                isFullySelected = true;
-                next = nextSibling;
-            }
-            if ( parent==root )
-                return clonedParent;
-
-            next = parent.getNextSibling();
-            parent = parent.getParentNode();
-            Node clonedGrandParent = traverseNode( parent, false, true, how );
-            if ( how!=DELETE_CONTENTS )
-                clonedGrandParent.appendChild( clonedParent );
-            clonedParent = clonedGrandParent;
-
-        } 
-
-        // should never occur
-        return null;
-
-    }
-
-    /**
-     * Utility method for traversing a single node.
-     * Does not properly handle a text node containing both the
-     * start and end offsets.  Such nodes should
-     * have been previously detected and been routed to traverseTextNode.
-     * 
-     * @param n      The node to be traversed.
-     * 
-     * @param isFullySelected
-     *               Set to true if the node is fully selected.  Should be 
-     *               false otherwise.
-     *               Note that although the DOM 2 specification says that a 
-     *               text node that is boththe start and end container is not
-     *               selected, we treat it here as if it were partially 
-     *               selected.
-     * 
-     * @param isLeft Is true if we are traversing the node as part of navigating
-     *               the "left boundary" of the range.  If this value is false,
-     *               it implies we are navigating the "right boundary" of the
-     *               range.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will simply
-     *               return the original node.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but will
-     *               return a cloned node.
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete the
-     *               node from it's parent, but will return null.
-     *               </ol>
-     * 
-     * @return Returns a node that is the result of visiting the node.
-     *         If the traversal operation is
-     *         <code>DELETE_CONTENTS</code> the return value is null.
-     */
-    private Node traverseNode( Node n, boolean isFullySelected, boolean isLeft, int how )
-    {
-        if ( isFullySelected )
-            return traverseFullySelected( n, how );
-        if ( n.getNodeType()==Node.TEXT_NODE )
-            return traverseTextNode( n, isLeft, how );
-        return traversePartiallySelected( n, how );
-    }
-
-    /**
-     * Utility method for traversing a single node when
-     * we know a-priori that the node if fully
-     * selected.
-     * 
-     * @param n      The node to be traversed.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will simply
-     *               return the original node.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but will
-     *               return a cloned node.
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete the
-     *               node from it's parent, but will return null.
-     *               </ol>
-     * 
-     * @return Returns a node that is the result of visiting the node.
-     *         If the traversal operation is
-     *         <code>DELETE_CONTENTS</code> the return value is null.
-     */
-    private Node traverseFullySelected( Node n, int how )
-    {
-        switch( how )
-        {
-        case CLONE_CONTENTS:
-            return n.cloneNode( true );
-        case EXTRACT_CONTENTS:
-            if ( n.getNodeType()==Node.DOCUMENT_TYPE_NODE )
-            {
-                // TBD: This should be a HIERARCHY_REQUEST_ERR
-                throw new RangeExceptionImpl(
-                    RangeException.INVALID_NODE_TYPE_ERR, 
-                "DOM012 Invalid node type");
-            }
-            return n;
-        case DELETE_CONTENTS:
-            n.getParentNode().removeChild(n);
-            return null;
-        }
-        return null;
-    }
-
-    /**
-     * Utility method for traversing a single node when
-     * we know a-priori that the node if partially
-     * selected and is not a text node.
-     * 
-     * @param n      The node to be traversed.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will simply
-     *               return the original node.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but will
-     *               return a cloned node.
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete the
-     *               node from it's parent, but will return null.
-     *               </ol>
-     * 
-     * @return Returns a node that is the result of visiting the node.
-     *         If the traversal operation is
-     *         <code>DELETE_CONTENTS</code> the return value is null.
-     */
-    private Node traversePartiallySelected( Node n, int how )
-    {
-        switch( how )
-        {
-        case DELETE_CONTENTS:
-            return null;
-        case CLONE_CONTENTS:
-        case EXTRACT_CONTENTS:
-            return n.cloneNode( false );
-        }
-        return null;
-    }
-
-    /**
-     * Utility method for traversing a text node that we know
-     * a-priori to be on a left or right boundary of the range.
-     * This method does not properly handle text nodes that contain
-     * both the start and end points of the range.
-     * 
-     * @param n      The node to be traversed.
-     * 
-     * @param isLeft Is true if we are traversing the node as part of navigating
-     *               the "left boundary" of the range.  If this value is false,
-     *               it implies we are navigating the "right boundary" of the
-     *               range.
-     * 
-     * @param how    Specifies what type of traversal is being
-     *               requested (extract, clone, or delete).
-     *               Legal values for this argument are:
-     *               
-     *               <ol>
-     *               <li><code>EXTRACT_CONTENTS</code> - will simply
-     *               return the original node.
-     *               
-     *               <li><code>CLONE_CONTENTS</code> - will leave the
-     *               context tree of the range undisturbed, but will
-     *               return a cloned node.
-     *               
-     *               <li><code>DELETE_CONTENTS</code> - will delete the
-     *               node from it's parent, but will return null.
-     *               </ol>
-     * 
-     * @return Returns a node that is the result of visiting the node.
-     *         If the traversal operation is
-     *         <code>DELETE_CONTENTS</code> the return value is null.
-     */
-    private Node traverseTextNode( Node n, boolean isLeft, int how )
-    {
-        String txtValue = n.getNodeValue();
-        String newNodeValue;
-        String oldNodeValue;
-
-        if ( isLeft )
-        {
-            int offset = getStartOffset();
-            newNodeValue = txtValue.substring( offset );
-            oldNodeValue = txtValue.substring( 0, offset );
-        }
-        else
-        {
-            int offset = getEndOffset();
-            newNodeValue = txtValue.substring( 0, offset );
-            oldNodeValue = txtValue.substring( offset );
-        }
-
-        if ( how != CLONE_CONTENTS )
-            n.setNodeValue( oldNodeValue );
-        if ( how==DELETE_CONTENTS )
-            return null;
-        Node newNode = n.cloneNode( false );
-        newNode.setNodeValue( newNodeValue );
-        return newNode;
-    }
-
-    void checkIndex(Node refNode, int offset) throws DOMException
-    {
-        if (offset < 0) {
-            throw new DOMException(
-                                   DOMException.INDEX_SIZE_ERR, 
-                                   "DOM004 Index out of bounds");
-    	}
-
-        int type = refNode.getNodeType();
-        
-        // If the node contains text, ensure that the
-        // offset of the range is <= to the length of the text
-        if (type == Node.TEXT_NODE
-            || type == Node.CDATA_SECTION_NODE
-            || type == Node.COMMENT_NODE
-            || type == Node.PROCESSING_INSTRUCTION_NODE) {
-            if (offset > refNode.getNodeValue().length()) {
-                throw new DOMException(DOMException.INDEX_SIZE_ERR, 
-                                       "DOM004 Index out of bounds");
-            }
-        }
-        else {
-            // Since the node is not text, ensure that the offset
-            // is valid with respect to the number of child nodes
-            if (offset > refNode.getChildNodes().getLength()) {
-    		throw new DOMException(DOMException.INDEX_SIZE_ERR, 
-                                       "DOM004 Index out of bounds");
-            }
-        }
-    }
-
-	/**
-	 * Given a node, calculate what the Range's root container
-	 * for that node would be.
-	 */
-	private Node getRootContainer( Node node )
-	{
-		if ( node==null )
-			return null;
-
-		while( node.getParentNode()!=null )
-			node = node.getParentNode();
-		return node;
-	}
-
-	/**
-	 * Returns true IFF the given node can serve as a container
-	 * for a range's boundary points.
-	 */
-	private boolean isLegalContainer( Node node )
-	{
-		if ( node==null )
-			return false;
-
-		while( node!=null )
-		{
-			switch( node.getNodeType() )
-			{
-			case Node.ENTITY_NODE:
-			case Node.NOTATION_NODE:
-			case Node.DOCUMENT_TYPE_NODE:
-				return false;
-			}
-			node = node.getParentNode();
-		}
-
-		return true;
-	}
-
-
-	/**
-	 * Finds the root container for the given node and determines
-	 * if that root container is legal with respect to the
-	 * DOM 2 specification.  At present, that means the root
-	 * container must be either an attribute, a document,
-	 * or a document fragment.
-	 */
-	private boolean hasLegalRootContainer( Node node )
-	{
-		if ( node==null )
-			return false;
-
-		Node rootContainer = getRootContainer( node );
-		switch( rootContainer.getNodeType() )
-		{
-		case Node.ATTRIBUTE_NODE:
-		case Node.DOCUMENT_NODE:
-		case Node.DOCUMENT_FRAGMENT_NODE:
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	 * Returns true IFF the given node can be contained by
-	 * a range.
-	 */
-	private boolean isLegalContainedNode( Node node )
-	{
-		if ( node==null )
-			return false;
-		switch( node.getNodeType() )
-		{
-		case Node.DOCUMENT_NODE:
-		case Node.DOCUMENT_FRAGMENT_NODE:
-		case Node.ATTRIBUTE_NODE:
-		case Node.ENTITY_NODE:
-		case Node.NOTATION_NODE:
-			return false;
-		}
-		return true;
-	}
-
-    Node nextNode(Node node, boolean visitChildren) {
-            
-        if (node == null) return null;
-
-        Node result;
-        if (visitChildren) {
-            result = node.getFirstChild();
-            if (result != null) {
-                return result;
-            }
-        }
-            
-        // if hasSibling, return sibling
-        result = node.getNextSibling();
-        if (result != null) {
-            return result;
-        }
-        
-                
-        // return parent's 1st sibling.
-        Node parent = node.getParentNode();
-        while (parent != null
-               && parent != fDocument
-                ) {
-            result = parent.getNextSibling();
-            if (result != null) {
-                return result;
-            } else {
-                parent = parent.getParentNode();
-            }
-                            
-        } // while (parent != null && parent != fRoot) {
-        
-        // end of list, return null
-        return null;            
-    }
-    
-    /** is a an ancestor of b ? */
-    boolean isAncestorOf(Node a, Node b) {
-        for (Node node=b; node != null; node=node.getParentNode()) {
-            if (node == a) return true;
-        }
-        return false;
-    }
-
-    /** what is the index of the child in the parent */
-    int indexOf(Node child, Node parent) {
-        if (child.getParentNode() != parent) return -1;
-        int i = 0;
-        for(Node node = parent.getFirstChild(); node!= child; node=node.getNextSibling()) {
-            i++;
-        }
-        return i;
-    }
-
-    /**
-     * Utility method to retrieve a child node by index.  This method
-     * assumes the caller is trying to find out which node is 
-     * selected by the given index.  Note that if the index is
-     * greater than the number of children, this implies that the
-     * first node selected is the parent node itself.
-     * 
-     * @param container A container node
-     * 
-     * @param offset    An offset within the container for which a selected node should
-     *                  be computed.  If the offset is less than zero, or if the offset
-     *                  is greater than the number of children, the container is returned.
-     * 
-     * @return Returns either a child node of the container or the
-     *         container itself.
-     */
-    private Node getSelectedNode( Node container, int offset )
-    {
-        if ( container.getNodeType() == Node.TEXT_NODE )
-            return container;
-
-        // This case is an important convenience for 
-        // traverseRightBoundary()
-        if ( offset<0 )
-            return container;
-
-        Node child = container.getFirstChild();
-        while( child!=null && offset > 0 )
-        {
-            --offset;
-            child = child.getNextSibling();
-        }
-        if ( child!=null )
-            return child;
-        return container;
-    }
-
-}
diff --git a/src/org/apache/xerces/dom/TextImpl.java b/src/org/apache/xerces/dom/TextImpl.java
deleted file mode 100644
index 5a4d392..0000000
--- a/src/org/apache/xerces/dom/TextImpl.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.CharacterData;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-/**
- * Text nodes hold the non-markup, non-Entity content of
- * an Element or Attribute.
- * <P>
- * When a document is first made available to the DOM, there is only
- * one Text object for each block of adjacent plain-text. Users (ie,
- * applications) may create multiple adjacent Texts during editing --
- * see {@link org.w3c.dom.Element#normalize} for discussion.
- * <P>
- * Note that CDATASection is a subclass of Text. This is conceptually
- * valid, since they're really just two different ways of quoting
- * characters when they're written out as part of an XML stream.
- *
- * @version $Id$
- * @since  PR-DOM-Level-1-19980818.
- */
-public class TextImpl 
-    extends CharacterDataImpl 
-    implements CharacterData, Text {
-
-    //
-    // Constants
-    //
-
-    /** Serialization version. */
-    static final long serialVersionUID = -5294980852957403469L;
-    
-    //
-    // Constructors
-    //
-
-    /** Factory constructor. */
-    public TextImpl(CoreDocumentImpl ownerDoc, String data) {
-        super(ownerDoc, data);
-    }  
-    
-    //
-    // Node methods
-    //
-
-    /** 
-     * A short integer indicating what type of node this is. The named
-     * constants for this value are defined in the org.w3c.dom.Node interface.
-     */
-    public short getNodeType() {
-        return Node.TEXT_NODE;
-    }
-
-    /** Returns the node name. */
-    public String getNodeName() {
-        return "#text";
-    }
-
-    /**
-     * NON-DOM: Set whether this Text is ignorable whitespace.
-     */
-    public void setIgnorableWhitespace(boolean ignore) {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        isIgnorableWhitespace(ignore);
-
-    } // setIgnorableWhitespace(boolean)
-    
-
-    /**
-     * NON-DOM: Returns whether this Text is ignorable whitespace.
-     */
-    public boolean isIgnorableWhitespace() {
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-        return internalIsIgnorableWhitespace();
-
-    } // isIgnorableWhitespace():boolean
-    
-    //
-    // Text methods
-    //
-
-    /** 
-     * Break a text node into two sibling nodes.  (Note that if the
-     * current node has no parent, they won't wind up as "siblings" --
-     * they'll both be orphans.)
-     *
-     * @param offset The offset at which to split. If offset is at the
-     * end of the available data, the second node will be empty.
-     *
-     * @returns A reference to the new node (containing data after the
-     * offset point). The original node will contain data up to that
-     * point.
-     *
-     * @throws DOMException(INDEX_SIZE_ERR) if offset is <0 or >length.
-     *
-     * @throws DOMException(NO_MODIFICATION_ALLOWED_ERR) if node is read-only.
-     */
-    public Text splitText(int offset) 
-        throws DOMException {
-
-    	if (isReadOnly()) {
-            throw new DOMException(
-    			DOMException.NO_MODIFICATION_ALLOWED_ERR, 
-    			"DOM001 Modification not allowed");
-        }
-
-        if (needsSyncData()) {
-            synchronizeData();
-        }
-    	if (offset < 0 || offset > data.length() ) {
-            throw new DOMException(DOMException.INDEX_SIZE_ERR, 
-                                       "DOM004 Index out of bounds");
-        }
-    		
-        // split text into two separate nodes
-    	Text newText =
-            getOwnerDocument().createTextNode(data.substring(offset));
-    	setNodeValue(data.substring(0, offset));
-
-        // insert new text node
-        Node parentNode = getParentNode();
-    	if (parentNode != null) {
-    		parentNode.insertBefore(newText, nextSibling);
-        }
-
-    	return newText;
-
-    } // splitText(int):Text
-
-} // class TextImpl
diff --git a/src/org/apache/xerces/dom/TreeWalkerImpl.java b/src/org/apache/xerces/dom/TreeWalkerImpl.java
deleted file mode 100644
index c36fe55..0000000
--- a/src/org/apache/xerces/dom/TreeWalkerImpl.java
+++ /dev/null
@@ -1,533 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.dom;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.traversal.NodeFilter;
-import org.w3c.dom.traversal.TreeWalker;
-
-/** This class implements the TreeWalker interface. */
-public class TreeWalkerImpl implements TreeWalker {
-    
-    //
-    // Data
-    //
-    
-    /** When TRUE, the children of entites references are returned in the iterator. */
-    private boolean fEntityReferenceExpansion = false;
-    /** The whatToShow mask. */
-    int fWhatToShow = NodeFilter.SHOW_ALL;
-    /** The NodeFilter reference. */
-    NodeFilter fNodeFilter;
-    /** The current Node. */
-    Node fCurrentNode;
-    /** The root Node. */
-    Node fRoot;
-    
-    //
-    // Implementation Note: No state is kept except the data above
-    // (fWhatToShow, fNodeFilter, fCurrentNode, fRoot) such that 
-    // setters could be created for these data values and the 
-    // implementation will still work.
-    
-    
-    // 
-    // Constructor
-    //
-    
-    /** Public constructor */
-    public TreeWalkerImpl(Node root, 
-                          int whatToShow, 
-                          NodeFilter nodeFilter,
-                          boolean entityReferenceExpansion) {
-        fCurrentNode = root;
-        fRoot = root;
-        fWhatToShow = whatToShow;
-        fNodeFilter = nodeFilter;
-        fEntityReferenceExpansion = entityReferenceExpansion;
-    }
-    
-    public Node getRoot() {
-	return fRoot;
-    }
-
-    /** Return the whatToShow value */
-    public int                getWhatToShow() {
-        return fWhatToShow;
-    }
-
-    public void setWhatShow(int whatToShow){
-        fWhatToShow = whatToShow;
-    }
-    /** Return the NodeFilter */
-    public NodeFilter         getFilter() {
-        return fNodeFilter;
-    }
-    
-    /** Return whether children entity references are included in the iterator. */
-    public boolean            getExpandEntityReferences() {
-        return fEntityReferenceExpansion;
-    }
-            
-    /** Return the current Node. */
-    public Node               getCurrentNode() {
-        return fCurrentNode;
-    }
-    /** Return the current Node. */
-    public void               setCurrentNode(Node node) {
-        fCurrentNode = node;
-    }
-    
-    /** Return the parent Node from the current node, 
-     *  after applying filter, whatToshow.
-     *  If result is not null, set the current Node.
-     */
-    public Node               parentNode() {
-
-        if (fCurrentNode == null) return null;
-                
-        Node node = getParentNode(fCurrentNode);
-        if (node !=null) {
-            fCurrentNode = node;
-        }
-        return node;
-        
-    }
-
-    /** Return the first child Node from the current node, 
-     *  after applying filter, whatToshow.
-     *  If result is not null, set the current Node.
-     */
-    public Node               firstChild() {
-        
-        if (fCurrentNode == null) return null;
-                
-        Node node = getFirstChild(fCurrentNode);
-        if (node !=null) {
-            fCurrentNode = node;
-        }
-        return node;
-    }
-    /** Return the last child Node from the current node, 
-     *  after applying filter, whatToshow.
-     *  If result is not null, set the current Node.
-     */
-    public Node               lastChild() {
-
-        if (fCurrentNode == null) return null;
-                
-        Node node = getLastChild(fCurrentNode);
-        if (node !=null) {
-            fCurrentNode = node;
-        }
-        return node;
-    }
-    
-    /** Return the previous sibling Node from the current node, 
-     *  after applying filter, whatToshow.
-     *  If result is not null, set the current Node.
-     */
-    public Node               previousSibling() {
-
-        if (fCurrentNode == null) return null;
-                
-        Node node = getPreviousSibling(fCurrentNode);
-        if (node !=null) {
-            fCurrentNode = node;
-        }
-        return node;
-    }
-    
-    /** Return the next sibling Node from the current node, 
-     *  after applying filter, whatToshow.
-     *  If result is not null, set the current Node.
-     */
-    public Node               nextSibling(){
-        if (fCurrentNode == null) return null;
-                
-        Node node = getNextSibling(fCurrentNode);
-        if (node !=null) {
-            fCurrentNode = node;
-        }
-        return node;
-    }
-    
-    /** Return the previous Node from the current node, 
-     *  after applying filter, whatToshow.
-     *  If result is not null, set the current Node.
-     */
-    public Node               previousNode() {
-        Node result;
-        
-        if (fCurrentNode == null) return null;
-        
-        // get sibling
-        result = getPreviousSibling(fCurrentNode);
-        if (result == null) {
-            result = getParentNode(fCurrentNode);
-            if (result != null) {
-                fCurrentNode = result;
-                return fCurrentNode;
-            } 
-            return null;
-        }
-        
-        // get the lastChild of result.
-        Node lastChild  = getLastChild(result);
-        
-        Node prev = lastChild ;
-        while (lastChild != null) {
-          prev = lastChild ;
-          lastChild = getLastChild(prev) ;
-        }
-
-        lastChild = prev ;
-        
-        // if there is a lastChild which passes filters return it.
-        if (lastChild != null) {
-            fCurrentNode = lastChild;
-            return fCurrentNode;
-        } 
-        
-        // otherwise return the previous sibling.
-        if (result != null) {
-            fCurrentNode = result;
-            return fCurrentNode;
-        }
-        
-        // otherwise return null.
-        return null;
-    }
-    
-    /** Return the next Node from the current node, 
-     *  after applying filter, whatToshow.
-     *  If result is not null, set the current Node.
-     */
-    public Node               nextNode() {
-        
-        if (fCurrentNode == null) return null;
-        
-        Node result = getFirstChild(fCurrentNode);
-        
-        if (result != null) {
-            fCurrentNode = result;
-            return result;
-        }
-        
-        result = getNextSibling(fCurrentNode);
-        
-        if (result != null) {
-            fCurrentNode = result;
-            return result;
-        }
-                
-        // return parent's 1st sibling.
-        Node parent = getParentNode(fCurrentNode);
-        while (parent != null) {
-            result = getNextSibling(parent);
-            if (result != null) {
-                fCurrentNode = result;
-                return result;
-            } else {
-                parent = getParentNode(parent);
-            }
-        }
-        
-        // end , return null
-        return null;
-    }
-    
-    /** Internal function.
-     *  Return the parent Node, from the input node
-     *  after applying filter, whatToshow.
-     *  The current node is not consulted or set.
-     */
-    Node getParentNode(Node node) {
-        
-        if (node == null || node == fRoot) return null;
-        
-        Node newNode = node.getParentNode();
-        if (newNode == null)  return null; 
-                        
-        int accept = acceptNode(newNode);
-        
-        if (accept == NodeFilter.FILTER_ACCEPT)
-            return newNode;
-        else 
-        //if (accept == NodeFilter.SKIP_NODE) // and REJECT too.
-        {
-            return getParentNode(newNode);
-        }
-        
-        
-    }
-    
-    /** Internal function.
-     *  Return the nextSibling Node, from the input node
-     *  after applying filter, whatToshow.
-     *  The current node is not consulted or set.
-     */
-    Node getNextSibling(Node node) {
-		return getNextSibling(node, fRoot);
-	}
-
-    /** Internal function.
-     *  Return the nextSibling Node, from the input node
-     *  after applying filter, whatToshow.
-     *  NEVER TRAVERSES ABOVE THE SPECIFIED ROOT NODE. 
-     *  The current node is not consulted or set.
-     */
-    Node getNextSibling(Node node, Node root) {
-        
-        if (node == null || node == root) return null;
-        
-        Node newNode = node.getNextSibling();
-        if (newNode == null) {
-                
-            newNode = node.getParentNode();
-                
-            if (newNode == null || newNode == root)  return null; 
-                
-            int parentAccept = acceptNode(newNode);
-                
-            if (parentAccept==NodeFilter.FILTER_SKIP) {
-                return getNextSibling(newNode, root);
-            }
-                
-            return null;
-        }
-        
-        int accept = acceptNode(newNode);
-        
-        if (accept == NodeFilter.FILTER_ACCEPT)
-            return newNode;
-        else 
-        if (accept == NodeFilter.FILTER_SKIP) {
-            Node fChild = getFirstChild(newNode);
-            if (fChild == null) {
-                return getNextSibling(newNode, root);
-            }
-            return fChild;
-        }
-        else 
-        //if (accept == NodeFilter.REJECT_NODE) 
-        {
-            return getNextSibling(newNode, root);
-        }
-        
-    } // getNextSibling(Node node) {
-    
-    /** Internal function.
-     *  Return the previous sibling Node, from the input node
-     *  after applying filter, whatToshow.
-     *  The current node is not consulted or set.
-     */
-    Node getPreviousSibling(Node node) {
-		return getPreviousSibling(node, fRoot);
-	}
-
-    /** Internal function.
-     *  Return the previousSibling Node, from the input node
-     *  after applying filter, whatToshow.
-	 *  NEVER TRAVERSES ABOVE THE SPECIFIED ROOT NODE. 
-     *  The current node is not consulted or set.
-     */
-    Node getPreviousSibling(Node node, Node root) {
-        
-        if (node == null || node == root) return null;
-        
-        Node newNode = node.getPreviousSibling();
-        if (newNode == null) {
-                
-            newNode = node.getParentNode();
-            if (newNode == null || newNode == root)  return null; 
-                
-            int parentAccept = acceptNode(newNode);
-                
-            if (parentAccept==NodeFilter.FILTER_SKIP) {
-                return getPreviousSibling(newNode, root);
-            }
-            
-            return null;
-        }
-        
-        int accept = acceptNode(newNode);
-        
-        if (accept == NodeFilter.FILTER_ACCEPT)
-            return newNode;
-        else 
-        if (accept == NodeFilter.FILTER_SKIP) {
-            Node fChild =  getLastChild(newNode);
-            if (fChild == null) {
-                return getPreviousSibling(newNode, root);
-            }
-            return fChild;
-        }
-        else 
-        //if (accept == NodeFilter.REJECT_NODE) 
-        {
-            return getPreviousSibling(newNode, root);
-        }
-        
-    } // getPreviousSibling(Node node) {
-    
-    /** Internal function.
-     *  Return the first child Node, from the input node
-     *  after applying filter, whatToshow.
-     *  The current node is not consulted or set.
-     */
-    Node getFirstChild(Node node) {
-        if (node == null) return null;
-        
-        if ( !fEntityReferenceExpansion
-             && node.getNodeType() == Node.ENTITY_REFERENCE_NODE)
-            return null;
-        Node newNode = node.getFirstChild();
-        if (newNode == null)  return null;
-        int accept = acceptNode(newNode);
-        
-        if (accept == NodeFilter.FILTER_ACCEPT)
-            return newNode;
-        else 
-        if (accept == NodeFilter.FILTER_SKIP
-            && newNode.hasChildNodes()) 
-        {
-            Node fChild = getFirstChild(newNode);
-            
-            if (fChild == null) {
-                return getNextSibling(newNode, node);
-            }
-            return fChild;
-        }
-        else 
-        //if (accept == NodeFilter.REJECT_NODE) 
-        {
-            return getNextSibling(newNode, node);
-        }
-        
-        
-    }
-   
-    /** Internal function.
-     *  Return the last child Node, from the input node
-     *  after applying filter, whatToshow.
-     *  The current node is not consulted or set.
-     */
-    Node getLastChild(Node node) {
-        
-        if (node == null) return null;
-        
-        if ( !fEntityReferenceExpansion
-             && node.getNodeType() == Node.ENTITY_REFERENCE_NODE)
-            return null;
-            
-        Node newNode = node.getLastChild();
-        if (newNode == null)  return null; 
-        
-        int accept = acceptNode(newNode);
-        
-        if (accept == NodeFilter.FILTER_ACCEPT)
-            return newNode;
-        else 
-        if (accept == NodeFilter.FILTER_SKIP
-            && newNode.hasChildNodes()) 
-        {
-            Node lChild = getLastChild(newNode);
-            if (lChild == null) {
-                return getPreviousSibling(newNode, node);
-            }
-            return lChild;
-        }
-        else 
-        //if (accept == NodeFilter.REJECT_NODE) 
-        {
-            return getPreviousSibling(newNode, node);
-        }
-        
-        
-    }
-    
-    /** Internal function. 
-     *  The node whatToShow and the filter are combined into one result. */
-    short acceptNode(Node node) {
-        /***
-         7.1.2.4. Filters and whatToShow flags 
-
-         Iterator and TreeWalker apply whatToShow flags before applying Filters. If a node is rejected by the
-         active whatToShow flags, a Filter will not be called to evaluate that node. When a node is rejected by
-         the active whatToShow flags, children of that node will still be considered, and Filters may be called to
-         evaluate them.
-         ***/
-                
-        if (fNodeFilter == null) {
-            if ( ( fWhatToShow & (1 << node.getNodeType()-1)) != 0) {
-                return NodeFilter.FILTER_ACCEPT;
-            } else {
-                return NodeFilter.FILTER_SKIP;
-            }
-        } else {
-            if ((fWhatToShow & (1 << node.getNodeType()-1)) != 0 ) {
-                return fNodeFilter.acceptNode(node);
-            } else {
-                // What to show has failed. See above excerpt from spec.
-                // Equivalent to FILTER_SKIP.
-                return NodeFilter.FILTER_SKIP;
-            }
-        }
-    } 
-}
diff --git a/src/org/apache/xerces/dom/events/EventImpl.java b/src/org/apache/xerces/dom/events/EventImpl.java
deleted file mode 100644
index ffd7f77..0000000
--- a/src/org/apache/xerces/dom/events/EventImpl.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.dom.events;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventTarget;
-import org.w3c.dom.Node;
-
-/** EventImpl is an implementation of the basic "generic" DOM Level 2 Event
-    object. It may be subclassed by more specialized event sets.
-    Note that in our implementation, events are re-dispatchable (dispatch
-    clears the stopPropagation and preventDefault flags before it starts);
-    I believe that is the DOM's intent but I don't see an explicit statement
-    to this effect.
-*/
-public class EventImpl implements Event
-{
-    public String type=null;
-    public EventTarget target;
-    public EventTarget currentTarget;
-    public short eventPhase;
-    public boolean initialized=false, bubbles=true, cancelable=false;
-    public boolean stopPropagation=false, preventDefault=false;
-     
-    protected long timeStamp = System.currentTimeMillis();
-
-    /** The DOM doesn't deal with constructors, so instead we have an
-        initializer call to set most of the read-only fields. The
-        others are set, and reset, by the event subsystem during dispatch.
-        <p>
-        Note that init() -- and the subclass-specific initWhatever() calls --
-        may be reinvoked. At least one initialization is required; repeated
-        initializations overwrite the event with new values of their
-        parameters.
-    */
-    public void initEvent(String eventTypeArg, boolean canBubbleArg, 
-                        boolean cancelableArg)
-    {
-            type=eventTypeArg;
-            bubbles=canBubbleArg;
-            cancelable=cancelableArg;
-            
-            initialized=true;
-    }
-    
-    /** @return true iff this Event is of a class and type which supports
-        bubbling. In the generic case, this is True.
-        */
-    public boolean getBubbles()
-    {
-        return bubbles;
-    }
-
-    /** @return true iff this Event is of a class and type which (a) has a
-        Default Behavior in this DOM, and (b)allows cancellation (blocking)
-        of that behavior. In the generic case, this is False.
-        */
-    public boolean getCancelable()
-    {
-        return cancelable;
-    }
-
-    /** @return the Node (EventTarget) whose EventListeners are currently
-        being processed. During capture and bubble phases, this may not be
-        the target node. */
-    public EventTarget getCurrentTarget()
-    {
-        return currentTarget;
-    }
-
-    /** @return the current processing phase for this event -- 
-        CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE. (There may be
-        an internal DEFAULT_PHASE as well, but the users won't see it.) */
-    public short getEventPhase()
-    {
-        return eventPhase;
-    }
-
-    /** @return the EventTarget (Node) to which the event was originally
-        dispatched.
-        */
-    public EventTarget getTarget()
-    {
-        return target;
-    }
-
-    /** @return event name as a string
-    */
-    public String getType()
-    {
-        return type;
-    }
-
-    public long getTimeStamp() {
-	return timeStamp;
-    }
-
-    /** Causes exit from in-progress event dispatch before the next
-        currentTarget is selected. Replaces the preventBubble() and 
-        preventCapture() methods which were present in early drafts; 
-        they may be reintroduced in future levels of the DOM. */
-    public void stopPropagation()
-    {
-        stopPropagation=true;
-    }
-
-    /** Prevents any default processing built into the target node from
-        occurring.
-      */
-    public void preventDefault()
-    {
-        preventDefault=true;
-    }
-
-}
diff --git a/src/org/apache/xerces/dom/events/MutationEventImpl.java b/src/org/apache/xerces/dom/events/MutationEventImpl.java
deleted file mode 100644
index 39cfacd..0000000
--- a/src/org/apache/xerces/dom/events/MutationEventImpl.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.dom.events;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.events.MutationEvent;
-
-public class MutationEventImpl 
-extends org.apache.xerces.dom.events.EventImpl 
-implements MutationEvent
-{
-    Node relatedNode=null;
-    String prevValue=null,newValue=null,attrName=null;
-    // REVISIT: The DOM Level 2 PR has a bug: the init method should let this
-    // attribute be specified. Since it doesn't we have to give write access.
-    public short attrChange;
-    
-    // NON-DOM CONSTANTS: Storage efficiency, avoid risk of typos.
-    public static final String DOM_SUBTREE_MODIFIED = "DOMSubtreeModified";
-    public static final String DOM_NODE_INSERTED = "DOMNodeInserted";
-    public static final String DOM_NODE_REMOVED = "DOMNodeRemoved";
-    public static final String DOM_NODE_REMOVED_FROM_DOCUMENT = "DOMNodeRemovedFromDocument";
-    public static final String DOM_NODE_INSERTED_INTO_DOCUMENT = "DOMNodeInsertedIntoDocument";
-    public static final String DOM_ATTR_MODIFIED = "DOMAttrModified";
-    public static final String DOM_CHARACTER_DATA_MODIFIED = "DOMCharacterDataModified";
-
-    /** @return the name of the Attr which
-        changed, for DOMAttrModified events. 
-        Undefined for others.
-        */
-    public String getAttrName()
-    {
-        return attrName;
-    }
-
-    /**
-     *  <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()
-    {
-        return attrChange;
-    }
-
-    /** @return the new string value of the Attr for DOMAttrModified events, or
-        of the CharacterData node for DOMCharDataModifed events.
-        Undefined for others.
-        */
-    public String getNewValue()
-    {
-        return newValue;
-    }
-
-    /** @return the previous string value of the Attr for DOMAttrModified events, or
-        of the CharacterData node for DOMCharDataModifed events.
-        Undefined for others.
-        */
-    public String getPrevValue()
-    {
-        return prevValue;
-    }
-
-    /** @return a Node related to this event, other than the target that the
-        node was dispatched to. For DOMNodeRemoved, it is the node which
-        was removed. 
-        No other uses are currently defined.
-        */
-    public Node getRelatedNode()
-    {
-        return relatedNode;
-    }
-
-    /** Initialize a mutation event, or overwrite the event's current
-        settings with new values of the parameters. 
-        */
-    public void initMutationEvent(String typeArg, boolean canBubbleArg, 
-        boolean cancelableArg, Node relatedNodeArg, String prevValueArg, 
-        String newValueArg, String attrNameArg, short attrChangeArg)
-    {
-        relatedNode=relatedNodeArg;
-        prevValue=prevValueArg;
-        newValue=newValueArg;
-        attrName=attrNameArg;
-        attrChange=attrChangeArg;
-        super.initEvent(typeArg,canBubbleArg,cancelableArg);
-    }
-
-}
diff --git a/src/org/apache/xerces/dom3/DOMError.java b/src/org/apache/xerces/dom3/DOMError.java
deleted file mode 100644
index cc047dd..0000000
--- a/src/org/apache/xerces/dom3/DOMError.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3;
-
-/**
- * <code>DOMError</code> is an interface that describes an error.
- * <p>See also the <a href='http://www.w3.org/2001/09/WD-DOM-Level-3-Core-20010919'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface DOMError {
-    /**
-     * The severity of the error described by the <code>DOMError</code> is 
-     * warning
-     */
-    public static final short SEVERITY_WARNING          = 0;
-    /**
-     * The severity of the error described by the <code>DOMError</code> is 
-     * error
-     */
-    public static final short SEVERITY_ERROR            = 1;
-    /**
-     * The severity of the error described by the <code>DOMError</code> is 
-     * fatal error
-     */
-    public static final short SEVERITY_FATAL_ERROR      = 2;
-    /**
-     * The severity of the error, either <code>SEVERITY_WARNING</code>, 
-     * <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
-     */
-    public short getSeverity();
-
-    /**
-     * An implementation specific string describing the error that occured.
-     */
-    public String getMessage();
-
-    /**
-     * The byte or character offset into the input source, if we're parsing a 
-     * file or a byte stream then this will be the byte offset into that 
-     * stream, but if a character media is parsed then the offset will be 
-     * the character offset.exception is a reserved word, we need to rename 
-     * it.
-     */
-    public Object getException();
-
-    /**
-     * The location of the error.
-     */
-    public DOMLocator getLocation();
-
-}
diff --git a/src/org/apache/xerces/dom3/DOMErrorHandler.java b/src/org/apache/xerces/dom3/DOMErrorHandler.java
deleted file mode 100644
index 4d51f7f..0000000
--- a/src/org/apache/xerces/dom3/DOMErrorHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3;
-
-/**
- * <code>DOMErrorHandler</code> is a callback interface that the DOM 
- * implementation can call when reporting errors that happens while 
- * processing XML data, or when doing some other processing (e.g. validating 
- * a document).
- * <p>The application that is using the DOM implementation is expected to 
- * implement this interface.How does one register an error handler in the 
- * core? Passed as an argument to super-duper-normalize or registered on the 
- * DOMImplementation?
- * <p>See also the <a href='http://www.w3.org/2001/09/WD-DOM-Level-3-Core-20010919'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface DOMErrorHandler {
-    /**
-     * This method is called on the error handler when an error occures.
-     * @param error The error object that describes the error, this object 
-     *   may be reused by the DOM implementation across multiple calls to 
-     *   the handleEvent method.
-     * @return If the handleError method returns <code>true</code> the DOM 
-     *   implementation should continue as if the error didn't happen when 
-     *   possible, if the method returns <code>false</code> then the DOM 
-     *   implementation should stop the current processing when possible.
-     */
-    public boolean handleError(DOMError error);
-
-}
diff --git a/src/org/apache/xerces/dom3/DOMImplementationRegistry.java b/src/org/apache/xerces/dom3/DOMImplementationRegistry.java
deleted file mode 100644
index bbb19ad..0000000
--- a/src/org/apache/xerces/dom3/DOMImplementationRegistry.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2001 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; 
-package org.apache.xerces.dom3;
-
-import org.w3c.dom.DOMImplementation;
-import org.apache.xerces.dom3.DOMImplementationSource;
-
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-/**
- * This class holds the list of registered DOMImplementations. It is first
- * initialized based on the content of the space separated list of classnames
- * contained in the System Property "org.w3c.dom.DOMImplementationSourceList".
- *
- * <p>Subsequently, additional sources can be registered and implementations
- * can be queried based on a list of requested features.
- *
- * <p>This provides an application with an implementation independent starting
- * point.
- *
- * @see DOMImplementation
- * @see DOMImplementationSource
- */
-public class DOMImplementationRegistry 
-{ 
-
-    // The system property to specify the DOMImplementationSource class names. 
-    public static String PROPERTY = "org.w3c.dom.DOMImplementationSourceList";
-
-    private static Vector sources = new Vector();
-    private static boolean initialized = false;
-
-    private static void initialize() throws ClassNotFoundException,
-        InstantiationException, IllegalAccessException
-    {
-        initialized = true;
-        String p = System.getProperty(PROPERTY);
-        if (p == null) {
-            return;
-        }
-        StringTokenizer st = new StringTokenizer(p);
-        while (st.hasMoreTokens()) {
-            Object source = Class.forName(st.nextToken()).newInstance();
-            sources.addElement(source);
-        }
-    }
-
-    /**
-     * Return the first registered implementation that has the desired features,
-     * or null 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 this source has none.
-     */
-    public static DOMImplementation getDOMImplementation(String features)
-        throws ClassNotFoundException,
-        InstantiationException, IllegalAccessException
-    {
-        if (!initialized) {
-            initialize();
-        }
-        int len = sources.size(); 
-        for (int i = 0; i < len; i++) {
-            DOMImplementationSource source =
-                (DOMImplementationSource) sources.elementAt(i);
-
-            DOMImplementation impl = source.getDOMImplementation(features);
-            if (impl != null) {
-                return impl;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Register an implementation.
-     */
-    public static void addSource(DOMImplementationSource s)
-        throws ClassNotFoundException,
-        InstantiationException, IllegalAccessException
-    {
-        if (!initialized) {
-            initialize();
-        }
-        sources.addElement(s);
-        // update system property accordingly
-        StringBuffer b = new StringBuffer(System.getProperty(PROPERTY));
-        b.append(" " + s.getClass().getName());
-        System.setProperty(PROPERTY, b.toString());
-    }
-}
-  
diff --git a/src/org/apache/xerces/dom3/DOMImplementationSource.java b/src/org/apache/xerces/dom3/DOMImplementationSource.java
deleted file mode 100644
index e217231..0000000
--- a/src/org/apache/xerces/dom3/DOMImplementationSource.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2001 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; 
-package org.apache.xerces.dom3;
-
-import org.w3c.dom.DOMImplementation;
-
-/**
- * This interface permits a DOM implementer to supply one or more 
- * implementations, based upon requested features. Each implemented 
- * <code>DOMImplementationSource</code> object is listed in the 
- * binding-specific list of available sources so that its 
- * <code>DOMImplementation</code> objects are made available.
- * <p>See also the <a href='http://www.w3.org/2001/10/WD-DOM-Level-3-Core-20011017'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface DOMImplementationSource {
-    /**
-     * A method to request a DOM implementation.
-     * @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 this source has none.
-     */
-    public DOMImplementation getDOMImplementation(String features);
-
-}
diff --git a/src/org/apache/xerces/dom3/DOMLocator.java b/src/org/apache/xerces/dom3/DOMLocator.java
deleted file mode 100644
index 2fcb2ec..0000000
--- a/src/org/apache/xerces/dom3/DOMLocator.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3;
-import org.w3c.dom.Node;
-
-/**
- * <code>DOMLocator</code> is an interface that describes a location (e.g. 
- * where an error occured).
- * <p>See also the <a href='http://www.w3.org/2001/09/WD-DOM-Level-3-Core-20010919'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface DOMLocator {
-    /**
-     * The line number where the error occured, or -1 if there is no line 
-     * number available.
-     */
-    public int getLineNumber();
-
-    /**
-     * The column number where the error occured, or -1 if there is no column 
-     * number available.
-     */
-    public int getColumnNumber();
-
-    /**
-     * The byte or character offset into the input source, if we're parsing a 
-     * file or a byte stream then this will be the byte offset into that 
-     * stream, but if a character media is parsed then the offset will be 
-     * the character offset.
-     */
-    public int getOffset();
-
-    /**
-     * The DOM Node where the error occured, or null if there is no Node 
-     * available.
-     */
-    public Node getErrorNode();
-
-    /**
-     * The URI where the error occured, or null if there is no URI available.
-     */
-    public String getUri();
-
-}
diff --git a/src/org/apache/xerces/dom3/Document3.java b/src/org/apache/xerces/dom3/Document3.java
deleted file mode 100644
index d481d68..0000000
--- a/src/org/apache/xerces/dom3/Document3.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (c) 2001 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;
-package org.apache.xerces.dom3;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * The <code>Document3</code> interface is an extension to the DOM Level 2
- * <code>Document</code> interface containing the DOM Level 3 additions.
- * <p>See also the <a href='http://www.w3.org/2001/10/WD-DOM-Level-3-Core-20011017'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface Document3 extends Document {
-    /**
-     * An attribute specifying the actual encoding of this document. This is 
-     * <code>null</code> otherwise.
-     * <br> This attribute represents the property [character encoding scheme] 
-     * defined in . 
-     * @since DOM Level 3
-     */
-    public String getActualEncoding();
-    /**
-     * An attribute specifying the actual encoding of this document. This is 
-     * <code>null</code> otherwise.
-     * <br> This attribute represents the property [character encoding scheme] 
-     * defined in . 
-     * @since DOM Level 3
-     */
-    public void setActualEncoding(String actualEncoding);
-
-    /**
-     * An attribute specifying, as part of the XML declaration, the encoding 
-     * of this document. This is <code>null</code> when unspecified.
-     * @since DOM Level 3
-     */
-    public String getEncoding();
-    /**
-     * An attribute specifying, as part of the XML declaration, the encoding 
-     * of this document. This is <code>null</code> when unspecified.
-     * @since DOM Level 3
-     */
-    public void setEncoding(String encoding);
-
-    /**
-     * An attribute specifying, as part of the XML declaration, whether this 
-     * document is standalone.
-     * <br> This attribute represents the property [standalone] defined in . 
-     * @since DOM Level 3
-     */
-    public boolean getStandalone();
-    /**
-     * An attribute specifying, as part of the XML declaration, whether this 
-     * document is standalone.
-     * <br> This attribute represents the property [standalone] defined in . 
-     * @since DOM Level 3
-     */
-    public void setStandalone(boolean standalone);
-
-    /**
-     * An attribute specifying, as part of the XML declaration, the version 
-     * number of this document. This is <code>null</code> when unspecified.
-     * <br> This attribute represents the property [version] defined in . 
-     * @since DOM Level 3
-     */
-    public String getVersion();
-    /**
-     * An attribute specifying, as part of the XML declaration, the version 
-     * number of this document. This is <code>null</code> when unspecified.
-     * <br> This attribute represents the property [version] defined in . 
-     * @since DOM Level 3
-     */
-    public void setVersion(String version);
-
-    /**
-     * An attribute specifying whether errors checking is enforced or not. 
-     * When set to <code>false</code>, the implementation is free to not 
-     * test every possible error case normally defined on DOM operations, 
-     * and not raise any <code>DOMException</code>. In case of error, the 
-     * behavior is undefined. This attribute is <code>true</code> by 
-     * defaults.
-     * @since DOM Level 3
-     */
-    public boolean getStrictErrorChecking();
-    /**
-     * An attribute specifying whether errors checking is enforced or not. 
-     * When set to <code>false</code>, the implementation is free to not 
-     * test every possible error case normally defined on DOM operations, 
-     * and not raise any <code>DOMException</code>. In case of error, the 
-     * behavior is undefined. This attribute is <code>true</code> by 
-     * defaults.
-     * @since DOM Level 3
-     */
-    public void setStrictErrorChecking(boolean strictErrorChecking);
-
-    /**
-     * This attribute allows applications to specify a 
-     * <code>DOMErrorHandler</code> to be called in the event that an error 
-     * is encountered while performing an operation on a document. Note that 
-     * not all methods use this mechanism, see the description of each 
-     * method for details.
-     * @since DOM Level 3
-     */
-    public DOMErrorHandler getErrorHandler();
-    /**
-     * This attribute allows applications to specify a 
-     * <code>DOMErrorHandler</code> to be called in the event that an error 
-     * is encountered while performing an operation on a document. Note that 
-     * not all methods use this mechanism, see the description of each 
-     * method for details.
-     * @since DOM Level 3
-     */
-    public void setErrorHandler(DOMErrorHandler errorHandler);
-
-    /**
-     * The location of the document or <code>null</code> if undefined.
-     * <br>Beware that when the <code>Document</code> supports the feature 
-     * "HTML" , the href attribute of the HTML BASE element takes precedence 
-     * over this attribute.
-     * @since DOM Level 3
-     */
-    public String getDocumentURI();
-    /**
-     * The location of the document or <code>null</code> if undefined.
-     * <br>Beware that when the <code>Document</code> supports the feature 
-     * "HTML" , the href attribute of the HTML BASE element takes precedence 
-     * over this attribute.
-     * @since DOM Level 3
-     */
-    public void setDocumentURI(String documentURI);
-
-    /**
-     * Changes the <code>ownerDocument</code> of a node, its children, as well 
-     * as the attached attribute nodes if there are any. If the node has a 
-     * parent it is first removed from its parent child list. This 
-     * effectively allows moving a subtree from one document to another. The 
-     * following list describes the specifics for each type of node. 
-     * <dl>
-     * <dt>
-     * ATTRIBUTE_NODE</dt>
-     * <dd>The <code>ownerElement</code> attribute is set to 
-     * <code>null</code> and the <code>specified</code> flag is set to 
-     * <code>true</code> on the adopted <code>Attr</code>. The descendants 
-     * of the source <code>Attr</code> are recursively adopted.</dd>
-     * <dt>
-     * DOCUMENT_FRAGMENT_NODE</dt>
-     * <dd>The descendants of the source node are 
-     * recursively adopted.</dd>
-     * <dt>DOCUMENT_NODE</dt>
-     * <dd><code>Document</code> nodes cannot 
-     * be adopted.</dd>
-     * <dt>DOCUMENT_TYPE_NODE</dt>
-     * <dd><code>DocumentType</code> nodes cannot 
-     * be adopted.</dd>
-     * <dt>ELEMENT_NODE</dt>
-     * <dd>Specified attribute nodes of the source 
-     * element are adopted, and the generated <code>Attr</code> nodes. 
-     * Default attributes are discarded, though if the document being 
-     * adopted into defines default attributes for this element name, those 
-     * are assigned. The descendants of the source element are recursively 
-     * adopted.</dd>
-     * <dt>ENTITY_NODE</dt>
-     * <dd><code>Entity</code> nodes cannot be adopted.</dd>
-     * <dt>
-     * ENTITY_REFERENCE_NODE</dt>
-     * <dd>Only the <code>EntityReference</code> node 
-     * itself is adopted, the descendants are discarded, since the source 
-     * and destination documents might have defined the entity differently. 
-     * If the document being imported into provides a definition for this 
-     * entity name, its value is assigned.</dd>
-     * <dt>NOTATION_NODE</dt>
-     * <dd><code>Notation</code> 
-     * nodes cannot be adopted.</dd>
-     * <dt>PROCESSING_INSTRUCTION_NODE, TEXT_NODE, 
-     * CDATA_SECTION_NODE, COMMENT_NODE</dt>
-     * <dd>These nodes can all be adopted. No 
-     * specifics.</dd>
-     * </dl> Should this method simply return null when it fails? How 
-     * "exceptional" is failure for this method?Stick with raising 
-     * exceptions only in exceptional circumstances, return null on failure 
-     * (F2F 19 Jun 2000).Can an entity node really be adopted?No, neither 
-     * can Notation nodes (Telcon 13 Dec 2000).Does this affect keys and 
-     * hashCode's of the adopted subtree nodes?If so, what about 
-     * readonly-ness of key and hashCode?if not, would appendChild affect 
-     * keys/hashCodes or would it generate exceptions if key's are duplicate?
-     * Both keys and hashcodes have been dropped.
-     * @param source The node to move into this document.
-     * @return The adopted node, or <code>null</code> if this operation 
-     *   fails, such as when the source node comes from a different 
-     *   implementation.
-     * @exception DOMException
-     *   NOT_SUPPORTED_ERR: Raised if the source node is of type 
-     *   <code>DOCUMENT</code>, <code>DOCUMENT_TYPE</code>.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is 
-     *   readonly.
-     * @since DOM Level 3
-     */
-    public Node adoptNode(Node source)
-                          throws DOMException;
-
-    /**
-     * This method acts as if the document was going through a save and load 
-     * cycle, putting the document in a "normal" form. The actual result 
-     * depends on the features being set and governing what operations 
-     * actually take place. See <code>setNormalizeFeature</code> for details.
-     * <br>Noticeably this method normalizes <code>Text</code> nodes, makes 
-     * the document "namespace wellformed", according to the algorithm 
-     * described below in pseudo code, by adding missing namespace 
-     * declaration attributes and adding or changing namespace prefixes, 
-     * updates the replacement tree of <code>EntityReference</code> nodes, 
-     * normalizes attribute values, etc.
-     * <br>See  for details on how namespace declaration attributes and 
-     * prefixes are normalized.Any other name? Joe proposes 
-     * normalizeNamespaces.normalizeDocument. (F2F 26 Sep 2001)How specific 
-     * should this be? Should we not even specify that this should be done 
-     * by walking down the tree?Very. See above.What does this do on 
-     * attribute nodes?Doesn't do anything (F2F 1 Aug 2000).How does it work 
-     * with entity reference subtree which may be broken?This doesn't affect 
-     * entity references which are not visited in this operation (F2F 1 Aug 
-     * 2000).Should this really be on Node?Yes, but this only works on 
-     * Document, Element, and DocumentFragment. On other types it is a 
-     * no-op. (F2F 1 Aug 2000).No. Now that it does much more than simply 
-     * fixing namespaces it only makes sense on Document (F2F 26 Sep 2001).
-     * What happens with read-only nodes?What/how errors should be reported? 
-     * Are there any?Through the error reporter.Should this be optional?No.
-     * What happens with regard to mutation events?
-     * @since DOM Level 3
-     */
-    public void normalizeDocument();
-
-    /**
-     * Query whether setting a feature to a specific value is supported.
-     * <br>The feature name has the same form as a DOM <code>hasFeature</code> 
-     * string.
-     * @param name The name of the feature to check.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @return <code>true</code> if the feature could be successfully set to 
-     *   the specified value, or <code>false</code> if the feature is not 
-     *   recognized or the requested value is not supported. This does not 
-     *   change the current value of the feature itself.
-     * @since DOM Level 3
-     */
-    public boolean canSetNormalizationFeature(String name, 
-                                              boolean state);
-
-    /**
-     * Set the state of a feature.
-     * <br>The feature name has the same form as a DOM <code>hasFeature</code> 
-     * string.
-     * <br>It is possible for a <code>Document</code> to recognize a feature 
-     * name but to be unable to set its value.Need to specify the list of 
-     * features.
-     * @param name The name of the feature to set.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   NOT_SUPPORTED_ERR: Raised when the feature name is recognized but the 
-     *   requested value cannot be set.
-     *   <br>NOT_FOUND_ERR: Raised when the feature name is not recognized.
-     * @since DOM Level 3
-     */
-    public void setNormalizationFeature(String name, 
-                                        boolean state)
-                                        throws DOMException;
-
-    /**
-     * Look up the value of a feature.
-     * <br>The feature name has the same form as a DOM <code>hasFeature</code> 
-     * string
-     * @param name The name of the feature to look up.
-     * @return The current state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   NOT_FOUND_ERR: Raised when the feature name is not recognized.
-     * @since DOM Level 3
-     */
-    public boolean getNormalizationFeature(String name)
-                                           throws DOMException;
-
-    /**
-     * Rename an existing node. When possible this simply changes the name of 
-     * the given node, otherwise this creates a new node with the specified 
-     * name and replaces the existing node with the new node as described 
-     * below. This only applies to nodes of type <code>ELEMENT_NODE</code> 
-     * and <code>ATTRIBUTE_NODE</code>.
-     * <br>When a new node is created, the following operations are performed: 
-     * the new node is created, any registered event listener is registered 
-     * on the new node, any user data attached to the old node is removed 
-     * from that node, the old node is removed from its parent if it has 
-     * one, the children are moved to the new node, if the renamed node is 
-     * an <code>Element</code> its attributes are moved to the new node, the 
-     * new node is inserted at the position the old node used to have in its 
-     * parent's child nodes list if it has one, the user data that was 
-     * attached to the old node is attach to the new node, the user data 
-     * event <code>NODE_RENAMED</code> is fired.
-     * <br>When the node being renamed is an <code>Attr</code> that is 
-     * attached to an <code>Element</code>, the node is first removed from 
-     * the <code>Element</code> attributes map. Then, once renamed, either 
-     * by modifying the existing node or creating a new one as described 
-     * above, it is put back.
-     * <br>In addition, when the implementation supports the feature 
-     * "MutationEvents", each mutation operation involved in this method 
-     * fires the appropriate event, and in the end the event 
-     * <code>ElementNameChanged</code> or <code>AttributeNameChanged</code> 
-     * is fired.Should this throw a HIERARCHY_REQUEST_ERR?
-     * @param n The node to rename.
-     * @param namespaceURI The new namespaceURI.
-     * @param name The new qualified name.
-     * @return The renamed node. This is either the specified node or the new 
-     *   node that was created to replace the specified node.
-     * @exception DOMException
-     *   NOT_SUPPORTED_ERR: Raised when the type of the specified node is 
-     *   neither <code>ELEMENT_NODE</code> nor <code>ATTRIBUTE_NODE</code>.
-     * @since DOM Level 3
-     */
-    public Node renameNode(Node n, 
-                           String namespaceURI, 
-                           String name)
-                           throws DOMException;
-
-}
diff --git a/src/org/apache/xerces/dom3/Entity3.java b/src/org/apache/xerces/dom3/Entity3.java
deleted file mode 100644
index 107e02e..0000000
--- a/src/org/apache/xerces/dom3/Entity3.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2001 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;
-package org.apache.xerces.dom3;
-
-import org.w3c.dom.Entity;
-
-/**
- * The <code>Entity3</code> interface is an extension to the DOM Level 2
- * <code>Entity</code> interface containing the DOM Level 3 additions.
- * <p>See also the <a href='http://www.w3.org/2001/10/WD-DOM-Level-3-Core-20011017'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface Entity3 extends Entity {
-
-    /**
-     * An attribute specifying the actual encoding of this entity, when it is 
-     * an external parsed entity. This is <code>null</code> otherwise.
-     * @since DOM Level 3
-     */
-    public String getActualEncoding();
-    /**
-     * An attribute specifying the actual encoding of this entity, when it is 
-     * an external parsed entity. This is <code>null</code> otherwise.
-     * @since DOM Level 3
-     */
-    public void setActualEncoding(String actualEncoding);
-
-    /**
-     * 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 getEncoding();
-    /**
-     * 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 void setEncoding(String encoding);
-
-    /**
-     * 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 getVersion();
-    /**
-     * 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 void setVersion(String version);
-
-}
diff --git a/src/org/apache/xerces/dom3/Node3.java b/src/org/apache/xerces/dom3/Node3.java
deleted file mode 100644
index 0e5b70f..0000000
--- a/src/org/apache/xerces/dom3/Node3.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright (c) 2001 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;
-package org.apache.xerces.dom3;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-
-/**
- * The <code>Node3</code> interface is an extension to the DOM Level 2
- * <code>Node</code> interface containing the DOM Level 3 additions.
- * <p>See also the <a href='http://www.w3.org/2001/10/WD-DOM-Level-3-Core-20011017'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface Node3 extends Node {
-    /**
-     * The absolute base URI of this node or <code>null</code> if undefined. 
-     * This value is computed according to . However, when the 
-     * <code>Document</code> supports the feature "HTML" , 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.
-     * <br> When the node is an <code>Element</code>, a <code>Document</code> 
-     * or a a <code>ProcessingInstruction</code>, this attribute represents 
-     * the properties [base URI] defined in . When the node is a 
-     * <code>Notation</code>, an <code>Entity</code>, or an 
-     * <code>EntityReference</code>, this attribute represents the 
-     * properties [declaration base URI] in the . How will this be affected 
-     * by resolution of relative namespace URIs issue?It's not.Should this 
-     * only be on Document, Element, ProcessingInstruction, Entity, and 
-     * Notation nodes, according to the infoset? If not, what is it equal to 
-     * on other nodes? Null? An empty string? I think it should be the 
-     * parent's.No.Should this be read-only and computed or and actual 
-     * read-write attribute?Read-only and computed (F2F 19 Jun 2000 and 
-     * teleconference 30 May 2001).If the base HTML element is not yet 
-     * attached to a document, does the insert change the Document.baseURI?
-     * Yes. (F2F 26 Sep 2001)
-     * @since DOM Level 3
-     */
-    public String getBaseURI();
-
-    // TreePosition
-    /**
-     * The node precedes the reference node.
-     */
-    public static final short TREE_POSITION_PRECEDING   = 0x01;
-    /**
-     * The node follows the reference node.
-     */
-    public static final short TREE_POSITION_FOLLOWING   = 0x02;
-    /**
-     * The node is an ancestor of the reference node.
-     */
-    public static final short TREE_POSITION_ANCESTOR    = 0x04;
-    /**
-     * The node is a descendant of the reference node.
-     */
-    public static final short TREE_POSITION_DESCENDANT  = 0x08;
-    /**
-     * The two nodes have an equivalent position. This is the case of two 
-     * attributes that have the same <code>ownerElement</code>, and two 
-     * nodes that are the same.
-     */
-    public static final short TREE_POSITION_EQUIVALENT  = 0x10;
-    /**
-     * The two nodes are the same. Two nodes that are the same have an 
-     * equivalent position, though the reverse may not be true.
-     */
-    public static final short TREE_POSITION_SAME_NODE   = 0x20;
-    /**
-     * The two nodes are disconnected, they do not have any common ancestor. 
-     * This is the case of two nodes that are not in the same document.
-     */
-    public static final short TREE_POSITION_DISCONNECTED = 0x00;
-
-    /**
-     * Compares a node with this node with regard to their position in the 
-     * tree and according to the document order. This order can be extended 
-     * by module that define additional types of nodes.Should this method be 
-     * optional?No.Need reference for namespace nodes.No, instead avoid 
-     * referencing them directly.
-     * @param other The node to compare against this node.
-     * @return Returns how the given node is positioned relatively to this 
-     *   node.
-     * @since DOM Level 3
-     */
-    public short compareTreePosition(Node other);
-
-    /**
-     * This attribute returns the text content of this node and its 
-     * descendants. When it is defined to be null, setting it has no effect. 
-     * When set, any possible children this node may have are removed and 
-     * replaced by a single <code>Text</code> node containing the string 
-     * this attribute is set to. On getting, no serialization is performed, 
-     * the returned string does not contain any markup. No whitespace 
-     * normalization is performed, the returned string does not contain the 
-     * element content whitespaces . 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'>
-     * <tr>
-     * <th>Node type</th>
-     * <th>Content</th>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>
-     * ELEMENT_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</td>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, 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'>
-     * null</td>
-     * </tr>
-     * </table> Should any whitespace normalization be performed? MS' text 
-     * property doesn't but what about "ignorable whitespace"?Does not 
-     * perform any whitespace normalization and ignores "ignorable 
-     * whitespace".Should this be two methods instead?No. Keep it a read 
-     * write attribute.What about the name? MS uses text and innerText. text 
-     * conflicts with HTML DOM.Keep the current name, MS has a different 
-     * name and different semantic.Should this be optional?No.Setting the 
-     * text property on a Document, Document Type, or Notation node is an 
-     * error for MS. How do we expose it? Exception? Which one?
-     * (teleconference 23 May 2001) consistency with nodeValue. Remove 
-     * Document from the list.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     * @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 null, setting it has no effect. 
-     * When set, any possible children this node may have are removed and 
-     * replaced by a single <code>Text</code> node containing the string 
-     * this attribute is set to. On getting, no serialization is performed, 
-     * the returned string does not contain any markup. No whitespace 
-     * normalization is performed, the returned string does not contain the 
-     * element content whitespaces . 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'>
-     * <tr>
-     * <th>Node type</th>
-     * <th>Content</th>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>
-     * ELEMENT_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</td>
-     * </tr>
-     * <tr>
-     * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, 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'>
-     * null</td>
-     * </tr>
-     * </table> Should any whitespace normalization be performed? MS' text 
-     * property doesn't but what about "ignorable whitespace"?Does not 
-     * perform any whitespace normalization and ignores "ignorable 
-     * whitespace".Should this be two methods instead?No. Keep it a read 
-     * write attribute.What about the name? MS uses text and innerText. text 
-     * conflicts with HTML DOM.Keep the current name, MS has a different 
-     * name and different semantic.Should this be optional?No.Setting the 
-     * text property on a Document, Document Type, or Notation node is an 
-     * error for MS. How do we expose it? Exception? Which one?
-     * (teleconference 23 May 2001) consistency with nodeValue. Remove 
-     * Document from the list.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     * @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 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.Do we really want to make this 
-     * different from equals?Yes, change name from isIdentical to 
-     * isSameNode. (Telcon 4 Jul 2000).Is this really needed if we provide a 
-     * unique key?Yes, because the key is only unique within a document. 
-     * (F2F 2 Mar 2001).Definition of 'sameness' is needed.
-     * @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.
-     * <br>See  for details on the algorithm used by this method.Should this 
-     * be optional?No.How does the lookup work? Is it based on the prefix of 
-     * the nodes, the namespace declaration attributes, or a combination of 
-     * both?See .
-     * @param namespaceURI The namespace URI to look for.
-     * @return Returns the associated namespace prefix 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 lookupNamespacePrefix(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.Name? May 
-     * need to change depending on ending of the relative namespace URI 
-     * reference nightmare.No need.Should this be optional?No.How does the 
-     * lookup work? Is it based on the namespaceURI of the nodes, the 
-     * namespace declaration attributes, or a combination of both?See .
-     * @param prefix The prefix to look for.
-     * @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: The two nodes are of the same type.The following string 
-     * attributes are equal: <code>nodeName</code>, <code>localName</code>, 
-     * <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code>
-     * , <code>baseURI</code>. This is: they are both <code>null</code>, or 
-     * they have the same length and are character for character identical.
-     * 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.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. This is true 
-     * for <code>Attr</code> nodes as for any other type of node. Note that 
-     * normalization can affect equality; to avoid this, nodes should be 
-     * normalized before being compared. 
-     * <br>For two <code>DocumentType</code> nodes to be equal, the following 
-     * conditions must also be satisfied: The following string attributes 
-     * are equal: <code>publicId</code>, <code>systemId</code>, 
-     * <code>internalSubset</code>.The <code>entities</code> 
-     * <code>NamedNodeMaps</code> are equal.The <code>notations</code> 
-     * <code>NamedNodeMaps</code> are equal. 
-     * <br>On the other hand, the following do not affect equality: the 
-     * <code>ownerDocument</code> attribute, the <code>specified</code> 
-     * attribute for <code>Attr</code> nodes, the 
-     * <code>isWhitespaceInElementContent</code> attribute for 
-     * <code>Text</code> nodes, as well as any user data or event listeners 
-     * registered on the nodes.Should this be optional?No.
-     * @param arg The node to compare equality with.
-     * @param deep If <code>true</code>, recursively compare the subtrees; if 
-     *   <code>false</code>, compare only the nodes themselves (and its 
-     *   attributes, if it is an <code>Element</code>).
-     * @return If the nodes, and possibly subtrees are equal, 
-     *   <code>true</code> otherwise <code>false</code>.
-     * @since DOM Level 3
-     */
-    public boolean isEqualNode(Node arg, 
-                               boolean deep);
-
-    /**
-     * This method makes available a <code>Node</code>'s specialized interface 
-     * (see ).What are the relations between Node.isSupported and 
-     * Node3.getInterface?Should we rename this method (and also 
-     * DOMImplementation.getInterface?)?getInterface can return a node that 
-     * doesn't actually support the requested interface and will lead to a 
-     * cast exception. Other solutions are returning null or throwing an 
-     * exception.
-     * @param feature The name of the feature requested (case-insensitive).
-     * @return Returns an alternate <code>Node</code> which implements the 
-     *   specialized APIs of the specified feature, if any, or 
-     *   <code>null</code> if there is no alternate <code>Node</code> which 
-     *   implements interfaces associated with that feature. Any alternate 
-     *   <code>Node</code> returned by this method must delegate to the 
-     *   primary core <code>Node</code> and not return results inconsistent 
-     *   with the primary core <code>Node</code> such as <code>key</code>, 
-     *   <code>attributes</code>, <code>childNodes</code>, etc.
-     * @since DOM Level 3
-     */
-    public Node getInterface(String feature);
-
-    /**
-     * 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>DOMObject</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>DOMObject</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);
-
-}
diff --git a/src/org/apache/xerces/dom3/UserDataHandler.java b/src/org/apache/xerces/dom3/UserDataHandler.java
deleted file mode 100644
index a4f85d6..0000000
--- a/src/org/apache/xerces/dom3/UserDataHandler.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2001 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;
-package org.apache.xerces.dom3;
-
-import org.w3c.dom.Node;
-
-
-/**
- * When associating an object to a key on a node using <code>setUserData</code>
- *  the application can provide a handler that gets called when the node the 
- * object is associated to is being cloned or imported. 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/2001/07/WD-DOM-Level-3-Core-20010726'>Document Object Model (DOM) Level 3 Core Specification</a>.
- */
-public interface UserDataHandler {
-    // OperationType
-    /**
-     * The node is cloned.
-     */
-    public static final short NODE_CLONED               = 1;
-    /**
-     * The node is imported.
-     */
-    public static final short NODE_IMPORTED             = 2;
-    /**
-     * The node is deleted.
-     */
-    public static final short NODE_DELETED              = 3;
-    /**
-     * The node is renamed.
-     */
-    public static final short NODE_RENAMED              = 4;
-
-    /**
-     * This method is called whenever the node for which this handler is 
-     * registered is imported or cloned. 
-     * @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, imported, or renamed.
-     * @param dst Specifies the node newly created.
-     */
-    public void handle(short operation, 
-                       String key, 
-                       Object data, 
-                       Node src, 
-                       Node dst);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASAttributeDeclaration.java b/src/org/apache/xerces/dom3/as/ASAttributeDeclaration.java
deleted file mode 100644
index b81552c..0000000
--- a/src/org/apache/xerces/dom3/as/ASAttributeDeclaration.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * An attribute declaration in the context of a <code>ASObject</code>.The 
- * constant 'REQUIRED' is missing from this interface.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASAttributeDeclaration extends ASObject {
-    // VALUE_TYPES
-    /**
-     * Describes that the attribute does not have any value constraint.
-     */
-    public static final short VALUE_NONE                = 0;
-    /**
-     * Indicates that the there is a default value constraint.
-     */
-    public static final short VALUE_DEFAULT             = 1;
-    /**
-     * Indicates that there is a fixed value constraint for this attribute.
-     */
-    public static final short VALUE_FIXED               = 2;
-
-    /**
-     * Datatype of the attribute.
-     */
-    public ASDataType getDataType();
-    /**
-     * Datatype of the attribute.
-     */
-    public void setDataType(ASDataType dataType);
-
-    /**
-     * Default or fixed value.
-     */
-    public String getDataValue();
-    /**
-     * Default or fixed value.
-     */
-    public void setDataValue(String dataValue);
-
-    /**
-     * Valid attribute values, separated by commas, in a string.
-     */
-    public String getEnumAttr();
-    /**
-     * Valid attribute values, separated by commas, in a string.
-     */
-    public void setEnumAttr(String enumAttr);
-
-    /**
-     * Owner elements <code>ASObject</code> of attribute, meaning that an 
-     * attribute declaration can be shared by multiple elements.
-     */
-    public ASObjectList getOwnerElements();
-    /**
-     * Owner elements <code>ASObject</code> of attribute, meaning that an 
-     * attribute declaration can be shared by multiple elements.
-     */
-    public void setOwnerElements(ASObjectList ownerElements);
-
-    /**
-     * Constraint type if any for this attribute.
-     */
-    public short getDefaultType();
-    /**
-     * Constraint type if any for this attribute.
-     */
-    public void setDefaultType(short defaultType);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASContentModel.java b/src/org/apache/xerces/dom3/as/ASContentModel.java
deleted file mode 100644
index 14f5085..0000000
--- a/src/org/apache/xerces/dom3/as/ASContentModel.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * The content model of a declared element.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASContentModel extends ASObject {
-    /**
-     * Signifies unbounded upper limit. The MAX_VALUE value is 
-     * <code>0xFFFFFFFF FFFFFFFF</code>. This needs to be better defined in 
-     * the generated bindings.
-     */
-    public static final int AS_UNBOUNDED              = Integer.MAX_VALUE;
-    // ASContentModelType
-    /**
-     * This constant value signifies a sequence operator. For example, in a 
-     * DTD, this would be the '<code>,</code>' operator.
-     */
-    public static final short AS_SEQUENCE               = 0;
-    /**
-     * This constant value signifies a choice operator. For example, in a DTD, 
-     * this would be the '<code>|</code>' operator.
-     */
-    public static final short AS_CHOICE                 = 1;
-    /**
-     * All of the above.
-     */
-    public static final short AS_ALL                    = 2;
-    /**
-     * None of the above, i.e., neither a choice nor sequence operator.
-     */
-    public static final short AS_NONE                   = 3;
-
-    /**
-     *  One of <code>AS_CHOICE</code>, <code>AS_SEQUENCE</code>, 
-     * <code>AS_ALL</code> or <code>AS_NONE</code>. The operator is applied 
-     * to all the components(ASObjects) in the <code>subModels</code>. For 
-     * example, if the list operator is <code>AS_CHOICE</code> and the 
-     * components in subModels are a, b and c then the abstract schema for 
-     * the element being declared is <code>(a|b|c)</code>. 
-     */
-    public short getListOperator();
-    /**
-     *  One of <code>AS_CHOICE</code>, <code>AS_SEQUENCE</code>, 
-     * <code>AS_ALL</code> or <code>AS_NONE</code>. The operator is applied 
-     * to all the components(ASObjects) in the <code>subModels</code>. For 
-     * example, if the list operator is <code>AS_CHOICE</code> and the 
-     * components in subModels are a, b and c then the abstract schema for 
-     * the element being declared is <code>(a|b|c)</code>. 
-     */
-    public void setListOperator(short listOperator);
-
-    /**
-     * min occurrence for this content particle. Its value may be 0 or a 
-     * positive integer. 
-     */
-    public int getMinOccurs();
-    /**
-     * min occurrence for this content particle. Its value may be 0 or a 
-     * positive integer. 
-     */
-    public void setMinOccurs(int minOccurs);
-
-    /**
-     *  maximum occurrence for this content particle. Its value may be 
-     * <code>0</code>, a positive integer, or <code>AS_UNBOUNDED</code> to 
-     * indicate that no upper limit has been set. 
-     */
-    public int getMaxOccurs();
-    /**
-     *  maximum occurrence for this content particle. Its value may be 
-     * <code>0</code>, a positive integer, or <code>AS_UNBOUNDED</code> to 
-     * indicate that no upper limit has been set. 
-     */
-    public void setMaxOccurs(int maxOccurs);
-
-    /**
-     * Pointers to <code>ASObject</code>s such as 
-     * <code> ASElementDeclaration</code>s and further 
-     * <code>ASContentModel</code>s. 
-     */
-    public ASObjectList getSubModels();
-    /**
-     * Pointers to <code>ASObject</code>s such as 
-     * <code> ASElementDeclaration</code>s and further 
-     * <code>ASContentModel</code>s. 
-     */
-    public void setSubModels(ASObjectList subModels);
-
-    /**
-     * Removes the <code>ASObject</code> in the submodel. Nodes that already 
-     * exist in the list are moved as needed. 
-     * @param oldNode The node to be removed.
-     */
-    public void removesubModel(ASObject oldNode);
-
-    /**
-     * Inserts a new node in the submodel. Nodes that already exist in the 
-     * list are moved as needed. 
-     * @param newNode The new node to be inserted.
-     * @exception DOMASException
-     *    <code>DUPLICATE_NAME_ERR</code>: Raised if a element declaration 
-     *   already exists with the same name within an <code>AS_CHOICE</code> 
-     *   operator. 
-     */
-    public void insertsubModel(ASObject newNode)
-                               throws DOMASException;
-
-    /**
-     * Appends a new node to the end of the list representing the
-     * <code>subModels</code>.
-     * @param newNode The new node to be appended.
-     * @return the length of the <code>subModels</code>.
-     * @exception DOMASException
-     *    <code>DUPLICATE_NAME_ERR</code>: Raised if a element declaration 
-     *   already exists with the same name within an <code>AS_CHOICE</code> 
-     *   operator. 
-     *   <br> <code>TYPE_ERR</code>: Raised if type is neither an 
-     *   <code>ASContentModel</code> nor an <code>ASElementDeclaration</code>
-     *   . 
-     */
-    public int appendsubModel(ASObject newNode)
-                              throws DOMASException;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASDataType.java b/src/org/apache/xerces/dom3/as/ASDataType.java
deleted file mode 100644
index e79e55b..0000000
--- a/src/org/apache/xerces/dom3/as/ASDataType.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * The datatypes supported by DOM AS implementations. Further datatypes may be 
- * added in the Schema/PSVI spec. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASDataType {
-    /**
-     * One of the enumerated codes representing the data type.
-     */
-    public short getDataType();
-
-    // DATA_TYPES
-    /**
-     * A code representing the string data type as defined in .
-     */
-    public static final short STRING_DATATYPE           = 1;
-    /**
-     * The NOTATION data type as defined in .
-     */
-    public static final short NOTATION_DATATYPE         = 10;
-    /**
-     * The ID data type as defined in .
-     */
-    public static final short ID_DATATYPE               = 11;
-    /**
-     * The IDREF data type as defined in .
-     */
-    public static final short IDREF_DATATYPE            = 12;
-    /**
-     * The IDREFS data type as defined in .
-     */
-    public static final short IDREFS_DATATYPE           = 13;
-    /**
-     * The ENTITY data type as defined in .
-     */
-    public static final short ENTITY_DATATYPE           = 14;
-    /**
-     * The ENTITIES data type as defined in .
-     */
-    public static final short ENTITIES_DATATYPE         = 15;
-    /**
-     * The NMTOKEN data type as defined in .
-     */
-    public static final short NMTOKEN_DATATYPE          = 16;
-    /**
-     * The NMTOKENS data type as defined in .
-     */
-    public static final short NMTOKENS_DATATYPE         = 17;
-    /**
-     * A code representing the boolean data type as defined in .
-     */
-    public static final short BOOLEAN_DATATYPE          = 100;
-    /**
-     * A code representing the float data type as defined in .
-     */
-    public static final short FLOAT_DATATYPE            = 101;
-    /**
-     * A code representing the double data type as defined in .
-     */
-    public static final short DOUBLE_DATATYPE           = 102;
-    /**
-     * The decimal data type as defined in .
-     */
-    public static final short DECIMAL_DATATYPE          = 103;
-    /**
-     * The hexbinary data type as defined in .
-     */
-    public static final short HEXBINARY_DATATYPE        = 104;
-    /**
-     * The base64binary data type as defined in .
-     */
-    public static final short BASE64BINARY_DATATYPE     = 105;
-    /**
-     * Then uri reference data type as defined in .
-     */
-    public static final short ANYURI_DATATYPE           = 106;
-    /**
-     * Then XML qualified name data type as defined in .
-     */
-    public static final short QNAME_DATATYPE            = 107;
-    /**
-     * The duration data type as defined in .
-     */
-    public static final short DURATION_DATATYPE         = 108;
-    /**
-     * The datetime data type as defined in .
-     */
-    public static final short DATETIME_DATATYPE         = 109;
-    /**
-     * The date data type as defined in .
-     */
-    public static final short DATE_DATATYPE             = 110;
-    /**
-     * The time data type as defined in .
-     */
-    public static final short TIME_DATATYPE             = 111;
-    /**
-     * The yearmonth data type as defined in .
-     */
-    public static final short GYEARMONTH_DATATYPE       = 112;
-    /**
-     * The year data type as defined in .
-     */
-    public static final short GYEAR_DATATYPE            = 113;
-    /**
-     * The monthday data type as defined in .
-     */
-    public static final short GMONTHDAY_DATATYPE        = 114;
-    /**
-     * The day data type as defined in .
-     */
-    public static final short GDAY_DATATYPE             = 115;
-    /**
-     * The month data type as defined in .
-     */
-    public static final short GMONTH_DATATYPE           = 116;
-    /**
-     * The integer data type as defined in .
-     */
-    public static final short INTEGER                   = 117;
-    /**
-     * A code representing the Name data type as defined in .
-     */
-    public static final short NAME_DATATYPE             = 200;
-    /**
-     * A code representing the NCName data type as defined in .
-     */
-    public static final short NCNAME_DATATYPE           = 201;
-    /**
-     * A code representing the Normalized string data type as defined in .
-     */
-    public static final short NORMALIZEDSTRING_DATATYPE = 202;
-    /**
-     * The token data type as defined in .
-     */
-    public static final short TOKEN_DATATYPE            = 203;
-    /**
-     * The Language data type as defined in .
-     */
-    public static final short LANGUAGE_DATATYPE         = 204;
-    /**
-     * The Non-positive integer data type as defined in .
-     */
-    public static final short NONPOSITIVEINTEGER_DATATYPE = 205;
-    /**
-     * Then negative integer  data type as defined in .
-     */
-    public static final short NEGATIVEINTEGER_DATATYPE  = 206;
-    /**
-     * Then long data type as defined in .
-     */
-    public static final short LONG_DATATYPE             = 207;
-    /**
-     * The integer data type as defined in .
-     */
-    public static final short INT_DATATYPE              = 208;
-    /**
-     * The short data type as defined in .
-     */
-    public static final short SHORT_DATATYPE            = 209;
-    /**
-     * The byte data type as defined in .
-     */
-    public static final short BYTE_DATATYPE             = 210;
-    /**
-     * The non-negative integer data type as defined in .
-     */
-    public static final short NONNEGATIVEINTEGER_DATATYPE = 211;
-    /**
-     * The unsigned long data type as defined in .
-     */
-    public static final short UNSIGNEDLONG_DATATYPE     = 212;
-    /**
-     * The unsigned integer data type as defined in .
-     */
-    public static final short UNSIGNEDINT_DATATYPE      = 213;
-    /**
-     * The unsigned short data type as defined in .
-     */
-    public static final short UNSIGNEDSHORT_DATATYPE    = 214;
-    /**
-     * The unsigned byte data type as defined in .
-     */
-    public static final short UNSIGNEDBYTE_DATATYPE     = 215;
-    /**
-     * The positive integer data type as defined in .
-     */
-    public static final short POSITIVEINTEGER_DATATYPE  = 216;
-    /**
-     * The other simple data type as defined in .
-     */
-    public static final short OTHER_SIMPLE_DATATYPE     = 1000;
-    /**
-     * The user-defined complex data type as defined in .
-     */
-    public static final short COMPLEX_DATATYPE          = 1001;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASElementDeclaration.java b/src/org/apache/xerces/dom3/as/ASElementDeclaration.java
deleted file mode 100644
index 94710ef..0000000
--- a/src/org/apache/xerces/dom3/as/ASElementDeclaration.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * The element name along with the content specification in the context of an 
- * <code>ASObject</code>.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASElementDeclaration extends ASObject {
-    // CONTENT_MODEL_TYPES
-    /**
-     * Represents an EMPTY content type for an Element declaration.
-     */
-    public static final short EMPTY_CONTENTTYPE         = 1;
-    /**
-     * Represents an ANY content type for an Element declaration.
-     */
-    public static final short ANY_CONTENTTYPE           = 2;
-    /**
-     * Represents a MIXED content type for an Element declaration. Note that 
-     * <code>isPCDataOnly</code> would also need to checked, in addition to 
-     * this, if an element's content model was simply text, as an example. 
-     */
-    public static final short MIXED_CONTENTTYPE         = 3;
-    /**
-     * Represents an ELEMENTS only content type for an Element declaration.
-     */
-    public static final short ELEMENTS_CONTENTTYPE      = 4;
-
-    /**
-     * A boolean defining whether the element order and number of the child 
-     * elements for mixed content type has to be respected or not. For 
-     * example XML Schema defined mixed content types the order is important 
-     * and needs to be respected whether for DTD based AS the order and 
-     * number of child elements are not important.
-     */
-    public boolean getStrictMixedContent();
-    /**
-     * A boolean defining whether the element order and number of the child 
-     * elements for mixed content type has to be respected or not. For 
-     * example XML Schema defined mixed content types the order is important 
-     * and needs to be respected whether for DTD based AS the order and 
-     * number of child elements are not important.
-     */
-    public void setStrictMixedContent(boolean strictMixedContent);
-
-    /**
-     * Datatype of the element.
-     */
-    public ASDataType getElementType();
-    /**
-     * Datatype of the element.
-     */
-    public void setElementType(ASDataType elementType);
-
-    /**
-     * Boolean defining whether the element type contains child elements and 
-     * PCDATA or PCDATA only for mixed element types. <code>true</code> if 
-     * the element is of type PCDATA only. Relevant only for mixed content 
-     * type elements. 
-     */
-    public boolean getIsPCDataOnly();
-    /**
-     * Boolean defining whether the element type contains child elements and 
-     * PCDATA or PCDATA only for mixed element types. <code>true</code> if 
-     * the element is of type PCDATA only. Relevant only for mixed content 
-     * type elements. 
-     */
-    public void setIsPCDataOnly(boolean isPCDataOnly);
-
-    /**
-     * The content type of the element. One of <code>EMPTY_CONTENTTYPE</code>, 
-     * <code>ANY_CONTENTTYPE</code>, <code>MIXED_CONTENTTYPE</code>, 
-     * <code>ELEMENTS_CONTENTTYPE</code>.
-     */
-    public short getContentType();
-    /**
-     * The content type of the element. One of <code>EMPTY_CONTENTTYPE</code>, 
-     * <code>ANY_CONTENTTYPE</code>, <code>MIXED_CONTENTTYPE</code>, 
-     * <code>ELEMENTS_CONTENTTYPE</code>.
-     */
-    public void setContentType(short contentType);
-
-    /**
-     * the URI reference representing the system identifier for the notation 
-     * declaration, if present, <code>null</code> otherwise.
-     */
-    public String getSystemId();
-    /**
-     * the URI reference representing the system identifier for the notation 
-     * declaration, if present, <code>null</code> otherwise.
-     */
-    public void setSystemId(String systemId);
-
-    /**
-     * The content model of element.
-     */
-    public ASContentModel getAsCM();
-    /**
-     * The content model of element.
-     */
-    public void setAsCM(ASContentModel asCM);
-
-    /**
-     * The<code>ASNamedObjectMap</code> containing 
-     * <code>ASAttributeDeclarations</code> for all the attributes that can 
-     * appear on this type of element.
-     */
-    public ASNamedObjectMap getASAttributeDecls();
-    /**
-     * The<code>ASNamedObjectMap</code> containing 
-     * <code>ASAttributeDeclarations</code> for all the attributes that can 
-     * appear on this type of element.
-     */
-    public void setASAttributeDecls(ASNamedObjectMap ASAttributeDecls);
-
-    /**
-     * Adds an <code>ASAttributeDeclaration</code> for the element being 
-     * declared.
-     * @param attributeDecl The new attribute to add. If the attribute 
-     *   declaration already exists for the element, the call does not have 
-     *   any effect.
-     */
-    public void addASAttributeDecl(ASAttributeDeclaration attributeDecl);
-
-    /**
-     * Removes an <code>ASAttributeDeclaration</code> from the element being 
-     * declared.
-     * @param attributeDecl The attribute declaraition to be removed. If the 
-     *   attribute declaration does not exist for the element, the call does 
-     *   not have any effect.
-     * @return <code>null</code> if the attribute does not exist. Otherwise 
-     *   returns the attribute being removed.
-     */
-    public ASAttributeDeclaration removeASAttributeDecl(ASAttributeDeclaration attributeDecl);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASEntityDeclaration.java b/src/org/apache/xerces/dom3/as/ASEntityDeclaration.java
deleted file mode 100644
index 9341dbe..0000000
--- a/src/org/apache/xerces/dom3/as/ASEntityDeclaration.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * Models a general entity declaration in an abstract schema. The abstract 
- * schema does not handle any parameter entity. It is assumed that the 
- * parameter entities are expanded by the implementation as the abstract 
- * schema is built.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASEntityDeclaration extends ASObject {
-    // EntityType
-    /**
-     * constant defining an internal entity.
-     */
-    public static final short INTERNAL_ENTITY           = 1;
-    /**
-     * constant defining an external entity.
-     */
-    public static final short EXTERNAL_ENTITY           = 2;
-
-    /**
-     * The type of the entity as defined above.
-     */
-    public short getEntityType();
-    /**
-     * The type of the entity as defined above.
-     */
-    public void setEntityType(short entityType);
-
-    /**
-     * The replacement text for the internal entity. The entity references 
-     * within the replacement text are kept intact. For an entity of type 
-     * <code>EXTERNAL_ENTITY</code>, this is <code>null</code>.
-     */
-    public String getEntityValue();
-    /**
-     * The replacement text for the internal entity. The entity references 
-     * within the replacement text are kept intact. For an entity of type 
-     * <code>EXTERNAL_ENTITY</code>, this is <code>null</code>.
-     */
-    public void setEntityValue(String entityValue);
-
-    /**
-     * the URI reference representing the system identifier for the notation 
-     * declaration, if present, <code>null</code> otherwise.
-     */
-    public String getSystemId();
-    /**
-     * the URI reference representing the system identifier for the notation 
-     * declaration, if present, <code>null</code> otherwise.
-     */
-    public void setSystemId(String systemId);
-
-    /**
-     * The string representing the public identifier for this notation 
-     * declaration, if present; <code>null</code> otherwise.
-     */
-    public String getPublicId();
-    /**
-     * The string representing the public identifier for this notation 
-     * declaration, if present; <code>null</code> otherwise.
-     */
-    public void setPublicId(String publicId);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASModel.java b/src/org/apache/xerces/dom3/as/ASModel.java
deleted file mode 100644
index 8df789d..0000000
--- a/src/org/apache/xerces/dom3/as/ASModel.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  To begin with, an abstract schema is a generic structure that could 
- * contain both internal and external subsets. An <code>ASModel</code> is an 
- * abstract object that could map to a DTD , an XML Schema , a database 
- * schema, etc. An <code>ASModel</code> could represent either an internal 
- * or an external subset; hence an abstract schema could be composed of an 
- * <code>ASModel</code> representing the internal subset and an 
- * <code>ASModel</code> representing the external subset. Note that the 
- * <code>ASModel</code> representing the external subset could consult the 
- * <code>ASModel</code> representing the internal subset. Furthermore, the 
- * <code>ASModel</code> representing the internal subset could be set to 
- * null by the <code>setInternalAS</code> method as a mechanism for 
- * "removal". In addition, only one <code>ASModel</code> representing the 
- * external subset can be specified as "active" and it is possible that none 
- * are "active". Finally, the <code>ASModel</code> contains the factory 
- * methods needed to create a various types of ASObjects like 
- * <code>ASElementDeclaration</code>, <code>ASAttributeDeclaration</code>, 
- * etc. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASModel extends ASObject {
-    /**
-     * <code>true</code> if this <code>ASModel</code> defines the document 
-     * structure in terms of namespaces and local names ; <code>false</code> 
-     * if the document structure is defined only in terms of 
-     * <code>QNames</code>.
-     */
-    public boolean getIsNamespaceAware();
-
-    /**
-     *  0 if used internally, 1 if used externally, 2 if not all. An exception 
-     * will be raised if it is incompatibly shared or in use as an internal 
-     * subset. 
-     */
-    public short getUsageLocation();
-
-    /**
-     *  The URI reference. 
-     */
-    public String getAsLocation();
-    /**
-     *  The URI reference. 
-     */
-    public void setAsLocation(String asLocation);
-
-    /**
-     *  The hint to locating an ASModel. 
-     */
-    public String getAsHint();
-    /**
-     *  The hint to locating an ASModel. 
-     */
-    public void setAsHint(String asHint);
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * element declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getElementDeclarations();
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * attribute declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getAttributeDeclarations();
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * notation declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getNotationDeclarations();
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global" 
-     * entity declarations. If one attempts to add, set, or remove a node 
-     * type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getEntityDeclarations();
-
-    /**
-     * Instead of returning an all-in-one <code>ASObject</code> with 
-     * <code>ASModel</code> methods, have discernible top-level/"global 
-     * content model declarations. If one attempts to add, set, or remove a 
-     * node type other than the intended one, a hierarchy exception (or 
-     * equivalent is thrown). 
-     */
-    public ASNamedObjectMap getContentModelDeclarations();
-
-    /**
-     * This method will allow the nesting or "importation" of ASModels. 
-     * @param abstractSchema ASModel to be set. Subsequent calls will nest 
-     *   the ASModels within the specified <code>ownerASModel</code>. 
-     */
-    public void addASModel(ASModel abstractSchema);
-
-    /**
-     * To retrieve a list of nested ASModels without reference to names. 
-     * @return A list of ASModels. 
-     */
-    public ASObjectList getASModels();
-
-    /**
-     * Removes only the specified <code>ASModel</code> from the list of 
-     * <code>ASModel</code>s.
-     * @param as AS to be removed.
-     */
-    public void removeAS(ASModel as);
-
-    /**
-     * Determines if an <code>ASModel</code> itself is valid, i.e., confirming 
-     * that it's well-formed and valid per its own formal grammar. 
-     * @return <code>true</code> if the <code>ASModel</code> is valid, 
-     *   <code>false</code> otherwise.
-     */
-    public boolean validate();
-
-    /**
-     * Creates an element declaration for the element type specified.
-     * @param namespaceURI The <code>namespace URI</code> of the element type 
-     *   being declared. 
-     * @param name The name of the element. The format of the name could be 
-     *   an NCName as defined by XML Namespaces or a Name as defined by XML 
-     *   1.0; it's ASModel-dependent. 
-     * @return A new <code>ASElementDeclaration</code> object with 
-     *   <code>name</code> attribute set to <code>tagname</code> and 
-     *   <code>namespaceURI</code> set to <code>systemId</code>. Other 
-     *   attributes of the element declaration are set through 
-     *   <code>ASElementDeclaration</code> interface methods.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public ASElementDeclaration createASElementDeclaration(String namespaceURI, 
-                                                           String name)
-                                                           throws DOMException;
-
-    /**
-     * Creates an attribute declaration.
-     * @param namespaceURI The namespace URI of the attribute being declared.
-     * @param name The name of the attribute. The format of the name could be 
-     *   an NCName as defined by XML Namespaces or a Name as defined by XML 
-     *   1.0; it's ASModel-dependent. 
-     * @return A new <code>ASAttributeDeclaration</code> object with 
-     *   appropriate attributes set by input parameters.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the input <code>name</code> 
-     *   parameter contains an illegal character.
-     */
-    public ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI, 
-                                                               String name)
-                                                               throws DOMException;
-
-    /**
-     * Creates a new notation declaration. 
-     * @param namespaceURI The namespace URI of the notation being declared.
-     * @param name The name of the notation. The format of the name could be 
-     *   an NCName as defined by XML Namespaces or a Name as defined by XML 
-     *   1.0; it's ASModel-dependent. 
-     * @param systemId The system identifier for the notation declaration.
-     * @param publicId The public identifier for the notation declaration.
-     * @return A new <code>ASNotationDeclaration</code> object with 
-     *   <code>notationName</code> attribute set to <code>name</code> and 
-     *   <code>publicId</code> and <code>systemId</code> set to the 
-     *   corresponding fields.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public ASNotationDeclaration createASNotationDeclaration(String namespaceURI, 
-                                                             String name, 
-                                                             String systemId, 
-                                                             String publicId)
-                                                             throws DOMException;
-
-    /**
-     * Creates an ASEntityDeclaration. 
-     * @param name The name of the entity being declared.
-     * @return A new <code>ASEntityDeclaration</code> object with 
-     *   <code>entityName</code> attribute set to name.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public ASEntityDeclaration createASEntityDeclaration(String name)
-                                                         throws DOMException;
-
-    /**
-     * Creates an object which describes part of an 
-     * <code>ASElementDeclaration</code>'s content model. 
-     * @param minOccurs The minimum occurrence for the subModels of this 
-     *   <code>ASContentModel</code>.
-     * @param maxOccurs The maximum occurrence for the subModels of this 
-     *   <code>ASContentModel</code>.
-     * @param operator operator of type <code>AS_CHOICE</code>, 
-     *   <code>AS_SEQUENCE</code>, <code>AS_ALL</code> or 
-     *   <code>AS_NONE</code>.
-     * @return A new <code>ASContentModel</code> object.
-     * @exception DOMASException
-     *   A DOMASException, e.g., <code>minOccurs &gt; maxOccurs</code>.
-     */
-    public ASContentModel createASContentModel(int minOccurs, 
-                                               int maxOccurs, 
-                                               short operator)
-                                               throws DOMASException;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASNamedObjectMap.java b/src/org/apache/xerces/dom3/as/ASNamedObjectMap.java
deleted file mode 100644
index b338929..0000000
--- a/src/org/apache/xerces/dom3/as/ASNamedObjectMap.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-import org.w3c.dom.DOMException;
-
-/**
- * Objects implementing the <code>ASNamedObjectMap</code> interface are used 
- * to represent collections of abstract schema nodes that can be accessed by 
- * name. Note that <code>ASNamedObjectMap</code> does not inherit from 
- * <code>ASObjectList</code>; <code>ASNamedObjectMaps</code> are not 
- * maintained in any particular order. Objects contained in an object 
- * implementing <code>ASNamedObjectMap</code> may also be accessed by an 
- * ordinal index, but this is simply to allow convenient enumeration of the 
- * contents of a <code>ASNamedObjectMap</code>, and does not imply that the 
- * DOM specifies an order to these <code>ASObjects</code>. 
- * <p><code>ASNamedObjectMap</code> object in the DOM are live.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASNamedObjectMap {
-    /**
-     * The number of <code>ASObjects</code> in the <code>ASObjectList</code>. 
-     * The range of valid child node indices is 0 to <code>length-1</code> 
-     * inclusive.
-     */
-    public int getLength();
-
-    /**
-     * Retrieves an <code>ASObject</code> specified by name.
-     * @param name The <code>nodeName</code> of an <code>ASObject</code> to 
-     *   retrieve.
-     * @return An <code>ASObject</code> with specified node name and 
-     *   <code>null</code> if the map does not contain an element with the 
-     *   given name.
-     */
-    public ASObject getNamedItem(String name);
-
-    /**
-     * Retrieves an <code>ASObject</code> specified by local name and 
-     * namespace URI.
-     * @param namespaceURI The namespace URI of the <code>ASObject</code> to 
-     *   retrieve.
-     * @param localName The local name of the <code>ASObject</code> to 
-     *   retrieve.
-     * @return A <code>ASObject</code> (of any type) with the specified local 
-     *   name and namespace URI, or <code>null</code> if they do not 
-     *   identify any <code>ASObject</code> in this map.
-     */
-    public ASObject getNamedItemNS(String namespaceURI, 
-                                   String localName);
-
-    /**
-     * Returns the <code>index</code>th item in the map. The index starts at 
-     * <code>0</code>. If <code>index</code> is greater than or equal to the 
-     * number of nodes in the list, this returns <code>null</code>.
-     * @param index The position in the map from which the item is to be 
-     *   retrieved.
-     * @return The <code>ASObject</code> at the <code>index</code>th position 
-     *   in the <code>ASNamedObjectMap</code>, or <code>null</code> if that 
-     *   is not a valid index.
-     */
-    public ASObject item(int index);
-
-    /**
-     * Removes an <code>ASObject</code> specified by a <code>nodeName</code>. 
-     * @param name The <code>nodeName</code> of the <code>ASObject</code> to 
-     *   be removed.
-     * @return  The <code>ASObject</code> removed from this map if an 
-     *   <code>ASObject</code> 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 ASObject removeNamedItem(String name)
-                                    throws DOMException;
-
-    /**
-     * Removes an <code>ASObject</code> specified by a namespace URI and a 
-     * local name.
-     * @param namespaceURI The namespace URI of the <code>ASObject</code> to 
-     *   be removed.
-     * @param localName The local name of the <code>ASObject</code> to remove.
-     * @return The <code>ASObject</code> removed from this map if an 
-     *   <code>ASObject</code> 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.
-     */
-    public ASObject removeNamedItemNS(String namespaceURI, 
-                                      String localName)
-                                      throws DOMException;
-
-    /**
-     * Adds an <code>ASObject</code> using its <code>nodeName</code> 
-     * attribute. If an <code>ASObject</code> with that name is already 
-     * present in this map, it is replaced by the new one.
-     * @param newASObject The <code>ASObject</code> to be inserted in the map 
-     *   with its <code>nodeName</code> as the key.
-     * @return If the new node replaces an existing one, the replaced node is 
-     *   returned, otherwise <code>null</code>.
-     * @exception DOMException
-     *   WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a 
-     *   different <code>ASModel</code> than the one that created this map.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
-     *   <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node 
-     *   doesn't belong in this <code>ASNamedObjectMap</code>.
-     */
-    public ASObject setNamedItem(ASObject newASObject)
-                                 throws DOMException;
-
-    /**
-     * Adds an <code>ASObject</code> using its <code>namespaceURI</code> and 
-     * <code>localName</code>. If an <code>ASObject</code> with the same 
-     * <code>namespaceURI</code> and <code>localName</code> is already 
-     * present in this map, it is replaced by the new one.
-     * @param newASObject The <code>ASObject</code> to be inserted in the 
-     *   map.The <code>ASObject</code> will later be accessible using the 
-     *   value of its <code>namespaceURI</code> and <code>localName</code> 
-     *   attributes.
-     * @return If the new node replaces an existing one, the replaced node is 
-     *   returned, otherwise <code>null</code>.
-     * @exception DOMException
-     *   <code>WRONG_DOCUMENT_ERR</code>: Raised if <code>arg</code> was 
-     *   created from a different <code>ASModel</code> than the one that 
-     *   created this map.
-     *   <br><code>NO_MODIFICATION_ALLOWED_ERR</code>: Raised if this map is 
-     *   readonly.
-     *   <br><code>HIERARCHY_REQUEST_ERR</code>: Raised if an attempt is made 
-     *   to add a node doesn't belong in this <code>ASNamedObjectMap</code>.
-     */
-    public ASObject setNamedItemNS(ASObject newASObject)
-                                   throws DOMException;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASNotationDeclaration.java b/src/org/apache/xerces/dom3/as/ASNotationDeclaration.java
deleted file mode 100644
index 9fd100d..0000000
--- a/src/org/apache/xerces/dom3/as/ASNotationDeclaration.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * This interface represents a notation declaration. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASNotationDeclaration extends ASObject {
-    /**
-     * the URI reference representing the system identifier for the notation 
-     * declaration, if present, <code>null</code> otherwise.
-     */
-    public String getSystemId();
-    /**
-     * the URI reference representing the system identifier for the notation 
-     * declaration, if present, <code>null</code> otherwise.
-     */
-    public void setSystemId(String systemId);
-
-    /**
-     * The string representing the public identifier for this notation 
-     * declaration, if present; <code>null</code> otherwise.
-     */
-    public String getPublicId();
-    /**
-     * The string representing the public identifier for this notation 
-     * declaration, if present; <code>null</code> otherwise.
-     */
-    public void setPublicId(String publicId);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASObject.java b/src/org/apache/xerces/dom3/as/ASObject.java
deleted file mode 100644
index c046b02..0000000
--- a/src/org/apache/xerces/dom3/as/ASObject.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * The <code>ASObject</code> interface is analogous to a <code>Node</code> in 
- * , e.g., an element declaration. 
- * <p>Opaque.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASObject {
-    // ASObjectType
-    /**
-     * The node is an <code>ASElementDeclaration</code>.
-     */
-    public static final short AS_ELEMENT_DECLARATION    = 1;
-    /**
-     * The node is an <code>ASAttributeDeclaration</code>.
-     */
-    public static final short AS_ATTRIBUTE_DECLARATION  = 2;
-    /**
-     * The node is a <code>ASNotationDeclaration</code>.
-     */
-    public static final short AS_NOTATION_DECLARATION   = 3;
-    /**
-     * The node is an <code>ASEntityDeclaration</code>.
-     */
-    public static final short AS_ENTITY_DECLARATION     = 4;
-    /**
-     * The node is a <code>ASContentModel</code>.
-     */
-    public static final short AS_CONTENTMODEL           = 5;
-    /**
-     * The node is a <code>ASModel</code>.
-     */
-    public static final short AS_MODEL                  = 6;
-
-    /**
-     * A code representing the underlying object as defined above.
-     */
-    public short getAsNodeType();
-
-    /**
-     * The <code>ASModel</code> object associated with this 
-     * <code>ASObject</code>. For a node of type <code>AS_MODEL</code>, this 
-     * is <code>null</code>. 
-     */
-    public ASModel getOwnerASModel();
-    /**
-     * The <code>ASModel</code> object associated with this 
-     * <code>ASObject</code>. For a node of type <code>AS_MODEL</code>, this 
-     * is <code>null</code>. 
-     */
-    public void setOwnerASModel(ASModel ownerASModel);
-
-    /**
-     * The <code>name</code> of this <code>ASObject</code> depending on the 
-     * <code>ASObject</code> type.
-     */
-    public String getNodeName();
-    /**
-     * The <code>name</code> of this <code>ASObject</code> depending on the 
-     * <code>ASObject</code> type.
-     */
-    public void setNodeName(String nodeName);
-
-    /**
-     * The namespace prefix of this node, or <code>null</code> if it is 
-     * unspecified.
-     */
-    public String getPrefix();
-    /**
-     * The namespace prefix of this node, or <code>null</code> if it is 
-     * unspecified.
-     */
-    public void setPrefix(String prefix);
-
-    /**
-     * Returns the local part of the qualified name of this 
-     * <code>ASObject</code>.
-     */
-    public String getLocalName();
-    /**
-     * Returns the local part of the qualified name of this 
-     * <code>ASObject</code>.
-     */
-    public void setLocalName(String localName);
-
-    /**
-     * The namespace URI of this node, or <code>null</code> if it is 
-     * unspecified.  defines how a namespace URI is attached to schema 
-     * components.
-     */
-    public String getNamespaceURI();
-    /**
-     * The namespace URI of this node, or <code>null</code> if it is 
-     * unspecified.  defines how a namespace URI is attached to schema 
-     * components.
-     */
-    public void setNamespaceURI(String namespaceURI);
-
-    /**
-     * Creates a copy of this <code>ASObject</code>. See text for 
-     * <code>cloneNode</code> off of <code>Node</code> but substitute AS 
-     * functionality.
-     * @param deep Setting the <code>deep</code> flag on, causes the whole 
-     *   subtree to be duplicated. Setting it to <code>false</code> only 
-     *   duplicates its immediate child nodes.
-     * @return Cloned <code>ASObject</code>.
-     */
-    public ASObject cloneASObject(boolean deep);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ASObjectList.java b/src/org/apache/xerces/dom3/as/ASObjectList.java
deleted file mode 100644
index 9ecab48..0000000
--- a/src/org/apache/xerces/dom3/as/ASObjectList.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * The <code>ASObjectList</code> interface provides the abstraction of an 
- * ordered collection of AS nodes, without defining or constraining how this 
- * collection is implemented. <code>ASObjectList</code> objects in the DOM 
- * AS are live.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ASObjectList {
-    /**
-     * The number of <code>ASObjects</code> in the list. The range of valid 
-     * child node indices is 0 to <code>length-1</code> inclusive.
-     */
-    public int getLength();
-
-    /**
-     * Returns the <code>index</code>th item in the collection. The index 
-     * starts at 0. 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 <code>ASObject</code> at the <code>index</code>th position 
-     *   in the <code>ASObjectList</code>, or <code>null</code> if that is 
-     *   not a valid index.
-     */
-    public ASObject item(int index);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/CharacterDataEditAS.java b/src/org/apache/xerces/dom3/as/CharacterDataEditAS.java
deleted file mode 100644
index 99b06f7..0000000
--- a/src/org/apache/xerces/dom3/as/CharacterDataEditAS.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * This interface extends the <code>NodeEditAS</code> interface with 
- * additional methods for document editing. An object implementing this 
- * interface must also implement NodeEditAS interface.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface CharacterDataEditAS extends NodeEditAS {
-    /**
-     * <code>true</code> if content only whitespace; <code>false</code> for 
-     * non-whitespace.
-     */
-    public boolean getIsWhitespaceOnly();
-
-    /**
-     * Determines if data can be set.
-     * @param offset Offset.
-     * @param count Argument to be set.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canSetData(int offset, 
-                              int count);
-
-    /**
-     * Determines if data can be appended.
-     * @param arg Argument to be appended.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canAppendData(String arg);
-
-    /**
-     * Determines if data can be replaced.
-     * @param offset Offset.
-     * @param count Replacement.
-     * @param arg Argument to be set.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canReplaceData(int offset, 
-                                  int count, 
-                                  String arg);
-
-    /**
-     * Determines if data can be inserted.
-     * @param offset Offset.
-     * @param arg Argument to be set.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canInsertData(int offset, 
-                                 String arg);
-
-    /**
-     * Determines if data can be deleted.
-     * @param offset Offset.
-     * @param count Number of 16-bit units to delete.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canDeleteData(int offset, 
-                                 int count);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/DOMASBuilder.java b/src/org/apache/xerces/dom3/as/DOMASBuilder.java
deleted file mode 100644
index ac349c4..0000000
--- a/src/org/apache/xerces/dom3/as/DOMASBuilder.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-import org.apache.xerces.dom3.ls.DOMInputSource;
-import org.apache.xerces.dom3.ls.DOMBuilder;
-
-/**
- * An Abstract Schema parser interface.
- * <p><code>DOMASBuilder</code> provides an API for parsing Abstract Schemas 
- * and building the corresponding <code>ASModel</code> tree. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMASBuilder extends DOMBuilder {
-    /**
-     *  Associate an <code>ASModel</code> with a <code>DOMBuilder</code>. This 
-     * <code>ASModel</code> will be used by the "
-     * <code>validate-if-schema</code>" and "
-     * <code>datatype-normalization</code>" options during the load of a new 
-     * <code>Document</code>. 
-     */
-    public ASModel getAbstractSchema();
-    /**
-     *  Associate an <code>ASModel</code> with a <code>DOMBuilder</code>. This 
-     * <code>ASModel</code> will be used by the "
-     * <code>validate-if-schema</code>" and "
-     * <code>datatype-normalization</code>" options during the load of a new 
-     * <code>Document</code>. 
-     */
-    public void setAbstractSchema(ASModel abstractSchema);
-
-    /**
-     * Parse a Abstract Schema from a location identified by an URI reference.
-     * @param uri The location of the Abstract Schema to be read. 
-     * @return The newly created Abstract Schema.
-     * @exception DOMASException
-     *   Exceptions raised by <code>parseASURI()</code> originate with the 
-     *   installed ErrorHandler, and thus depend on the implementation of 
-     *   the <code>DOMErrorHandler</code> interfaces. The default error 
-     *   handlers will raise a <code>DOMASException</code> if any form of 
-     *   Abstract Schema inconsistencies or warning occurs during the parse, 
-     *   but application defined errorHandlers are not required to do so. 
-     *   <br> WRONG_MIME_TYPE_ERR: Raised when <code>mimeTypeCheck</code> is 
-     *   <code>true</code> and the input source has an incorrect MIME Type. 
-     *   See the attribute <code>mimeTypeCheck</code>. 
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parseURI()</code> originate with the 
-     *   installed ErrorHandler, and thus depend on the implementation of 
-     *   the <code>DOMErrorHandler</code> interfaces. The default error 
-     *   handlers will raise a DOMSystemException if any form I/O or other 
-     *   system error occurs during the parse, but application defined error 
-     *   handlers are not required to do so. 
-     */
-    public ASModel parseASURI(String uri)
-                              throws DOMASException, Exception;
-
-    /**
-     * Parse a Abstract Schema from a location identified by an 
-     * <code>DOMInputSource</code>.
-     * @param is The <code>DOMInputSource</code> from which the source 
-     *   Abstract Schema is to be read. 
-     * @return The newly created <code>ASModel</code>.
-     * @exception DOMASException
-     *   Exceptions raised by <code>parseASURI()</code> originate with the 
-     *   installed ErrorHandler, and thus depend on the implementation of 
-     *   the <code>DOMErrorHandler</code> interfaces. The default error 
-     *   handlers will raise a <code>DOMASException</code> if any form of 
-     *   Abstract Schema inconsistencies or warning occurs during the parse, 
-     *   but application defined errorHandlers are not required to do so. 
-     *   <br> Raise a WRONG_MIME_TYPE_ERR when <code>mimeTypeCheck</code> is 
-     *   <code>true</code> and the inputsource has an incorrect MIME Type. 
-     *   See attribute <code>mimeTypeCheck</code>. 
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parseURI()</code> originate with the 
-     *   installed ErrorHandler, and thus depend on the implementation of 
-     *   the <code>DOMErrorHandler</code> interfaces. The default error 
-     *   handlers will raise a DOMSystemException if any form I/O or other 
-     *   system error occurs during the parse, but application defined error 
-     *   handlers are not required to do so. 
-     */
-    public ASModel parseASInputSource(DOMInputSource is)
-                                      throws DOMASException, Exception;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/DOMASException.java b/src/org/apache/xerces/dom3/as/DOMASException.java
deleted file mode 100644
index 25723fa..0000000
--- a/src/org/apache/xerces/dom3/as/DOMASException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- *  Abstract Schemas operations may throw a <code>DOMSystemException</code> as 
- * described in their descriptions. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public class DOMASException extends RuntimeException {
-    public DOMASException(short code, String message) {
-       super(message);
-       this.code = code;
-    }
-    public short   code;
-    // ASExceptionCode
-    /**
-     *  If an element declaration already exists with the same name within an 
-     * <code>AS_CHOICE</code> operator. 
-     */
-    public static final short DUPLICATE_NAME_ERR        = 1;
-    /**
-     * If the type of the <code>ASObject</code> is neither an 
-     * <code>ASContentModel</code> nor an <code>ASElementDeclaration</code>. 
-     */
-    public static final short TYPE_ERR                  = 2;
-    /**
-     * If the <code>DocumentEditAS</code> related to the node does not have 
-     * any active <code>ASModel</code> and <code>wfValidityCheckLevel</code> 
-     * is set to <code>PARTIAL</code> or <code>STRICT_VALIDITY_CHECK</code>.
-     */
-    public static final short NO_AS_AVAILABLE           = 3;
-    /**
-     *  When <code>mimeTypeCheck</code> is <code>true</code> and the input 
-     * source has an incorrect MIME Type. See the attribute 
-     * <code>mimeTypeCheck</code>. 
-     */
-    public static final short WRONG_MIME_TYPE_ERR       = 4;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/DOMASWriter.java b/src/org/apache/xerces/dom3/as/DOMASWriter.java
deleted file mode 100644
index dcee3e1..0000000
--- a/src/org/apache/xerces/dom3/as/DOMASWriter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-import org.apache.xerces.dom3.ls.DOMWriter;
-
-/**
- *  A Abstract Schema serialization interface. 
- * <p> DOMASWriters provides an API for serializing Abstract Schemas out in 
- * the form of a source Abstract Schema. The Abstract Schema is written to 
- * an output stream, the type of which depends on the specific language 
- * bindings in use. 
- * <p> DOMASWriter is a generic Abstract Schema serialization interface. It 
- * can be applied to both an internal Abstract Schema and/or an external 
- * Abstract Schema. DOMASWriter is applied to serialize a single Abstract 
- * Schema. Serializing a document with an active Internal Abstract Schema 
- * will serialize this internal Abstract Schema with the document as it is 
- * part of the Document (see <code>DOMWriter</code>). 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMASWriter extends DOMWriter {
-    /**
-     *  Write out the specified Abstract Schema to the specified destination. 
-     * Does it write a DTD or an XML Schema (or something else)? Is it 
-     * possible to use this method to convert a DTD to an XML Schema?
-     * @param destination The destination for the data to be written.
-     * @param model  The Abstract Schema to serialize. 
-     * @exception DOMSystemException
-     *   This exception will be raised in response to any sort of IO or system 
-     *   error that occurs while writing to the destination. It may wrap an 
-     *   underlying system exception.
-     */
-    public void writeASModel(java.io.OutputStream destination, 
-                             ASModel model)
-                             throws Exception;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/DOMImplementationAS.java b/src/org/apache/xerces/dom3/as/DOMImplementationAS.java
deleted file mode 100644
index 1f93b72..0000000
--- a/src/org/apache/xerces/dom3/as/DOMImplementationAS.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- *  This interface allows creation of an <code>ASModel</code>. The expectation 
- * is that an instance of the <code>DOMImplementationAS</code> interface can 
- * be obtained by using binding-specific casting methods on an instance of 
- * the <code>DOMImplementation</code> interface when the DOM implementation 
- * supports the feature "<code>AS-EDIT</code>". 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMImplementationAS {
-    /**
-     * Creates an ASModel.
-     * @param isNamespaceAware Allow creation of <code>ASModel</code> with 
-     *   this attribute set to a specific value.
-     * @return A <code>null</code> return indicates failure.what is a 
-     *   failure? Could be a system error.
-     */
-    public ASModel createAS(boolean isNamespaceAware);
-
-    /**
-     * Creates an <code>DOMASBuilder</code>.Do we need the method since we 
-     * already have <code>DOMImplementationLS.createDOMBuilder</code>?
-     * @return a DOMASBuilder
-     */
-    public DOMASBuilder createDOMASBuilder();
-
-    /**
-     * Creates an <code>DOMASWriter</code>.
-     * @return a DOMASWriter
-     */
-    public DOMASWriter createDOMASWriter();
-
-}
diff --git a/src/org/apache/xerces/dom3/as/DocumentAS.java b/src/org/apache/xerces/dom3/as/DocumentAS.java
deleted file mode 100644
index aa3a7b4..0000000
--- a/src/org/apache/xerces/dom3/as/DocumentAS.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-import org.w3c.dom.DOMException;
-
-/**
- * This interface extends the <code>Document</code> interface with additional 
- * methods for both document and AS editing.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DocumentAS {
-    /**
-     *  The active external ASModel. Note that the active external 
-     * <code>ASModel</code> is responsible for consulting the internal 
-     * ASModel, so if an attribute is declared in the internal 
-     * <code>ASModel</code> and the corresponding <code>ownerElements</code> 
-     * points to a <code>ASElementDeclaration</code>s defined in the active 
-     * external ASModel, changing the active external ASModel will cause the 
-     * <code>ownerElements</code> to be recomputed. If the 
-     * <code>ownerElements</code> is not defined in the newly active 
-     * external ASModel, the <code>ownerElements</code> will be an empty 
-     * node list. 
-     */
-    public ASModel getActiveASModel();
-    /**
-     *  The active external ASModel. Note that the active external 
-     * <code>ASModel</code> is responsible for consulting the internal 
-     * ASModel, so if an attribute is declared in the internal 
-     * <code>ASModel</code> and the corresponding <code>ownerElements</code> 
-     * points to a <code>ASElementDeclaration</code>s defined in the active 
-     * external ASModel, changing the active external ASModel will cause the 
-     * <code>ownerElements</code> to be recomputed. If the 
-     * <code>ownerElements</code> is not defined in the newly active 
-     * external ASModel, the <code>ownerElements</code> will be an empty 
-     * node list. 
-     */
-    public void setActiveASModel(ASModel activeASModel);
-
-    /**
-     *  A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s 
-     * associated with a document. The <code>addAS</code> method associates 
-     * a <code>ASModel</code> with a document.
-     */
-    public ASObjectList getBoundASModels();
-    /**
-     *  A list of <code>ASObject</code>s of type <code>AS_MODEL</code>s 
-     * associated with a document. The <code>addAS</code> method associates 
-     * a <code>ASModel</code> with a document.
-     */
-    public void setBoundASModels(ASObjectList boundASModels);
-
-    /**
-     * Retrieve the internal <code>ASModel</code> of a document. 
-     * @return <code>ASModel</code>.
-     */
-    public ASModel getInternalAS();
-
-    /**
-     * Sets the internal subset <code>ASModel</code> of a document. This could 
-     * be null as a mechanism for "removal". 
-     * @param as <code>ASModel</code> to be the internal subset of the 
-     *   document.
-     */
-    public void setInternalAS(ASModel as);
-
-    /**
-     * Associate a <code>ASModel</code> with a document. Can be invoked 
-     * multiple times to result in a list of <code>ASModel</code>s. Note 
-     * that only one internal <code>ASModel</code> is associated with the 
-     * document, however, and that only one of the possible list of 
-     * <code>ASModel</code>s is active at any one time.
-     * @param as <code>ASModel</code> to be associated with the document.
-     */
-    public void addAS(ASModel as);
-
-    /**
-     * Removes a <code>ASModel</code> associated with a document. Can be 
-     * invoked multiple times to remove a number of these in the list of 
-     * <code>ASModel</code>s.
-     * @param as The <code>ASModel</code> to be removed.
-     */
-    public void removeAS(ASModel as);
-
-    /**
-     * Gets the AS editing object describing this elementThis method needs to 
-     * be changed and others added.
-     * @return ASElementDeclaration object if the implementation supports "
-     *   <code>AS-EDIT</code>" feature. Otherwise <code>null</code>.
-     * @exception DOMException
-     *   NOT_FOUND_ERR: Raised if no <code>ASModel</code> is present.
-     */
-    public ASElementDeclaration getElementDeclaration()
-                                                      throws DOMException;
-
-    /**
-     * Validates the document against the <code>ASModel</code>.
-     * @exception DOMASException
-     *   
-     */
-    public void validate()
-                         throws DOMASException;
-
-}
diff --git a/src/org/apache/xerces/dom3/as/DocumentEditAS.java b/src/org/apache/xerces/dom3/as/DocumentEditAS.java
deleted file mode 100644
index 3b40b63..0000000
--- a/src/org/apache/xerces/dom3/as/DocumentEditAS.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-/**
- * This interface extends the <code>NodeEditAS</code> interface with 
- * additional methods for both document and AS editing.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DocumentEditAS extends NodeEditAS {
-    /**
-     * An attribute specifying whether continuous checking for the validity of 
-     * the document is enforced or not. Setting this to <code>true</code> 
-     * will result in an exception being thrown, i.e., 
-     * <code>VALIDATION_ERR</code>, for documents that are invalid at the 
-     * time of the call. If the document is invalid, then this attribute 
-     * will remain <code>false</code>. This attribute is <code>false</code> 
-     * by default.Add VALIDATION_ERR code to the list of constants in 
-     * DOMASException.
-     */
-    public boolean getContinuousValidityChecking();
-    /**
-     * An attribute specifying whether continuous checking for the validity of 
-     * the document is enforced or not. Setting this to <code>true</code> 
-     * will result in an exception being thrown, i.e., 
-     * <code>VALIDATION_ERR</code>, for documents that are invalid at the 
-     * time of the call. If the document is invalid, then this attribute 
-     * will remain <code>false</code>. This attribute is <code>false</code> 
-     * by default.Add VALIDATION_ERR code to the list of constants in 
-     * DOMASException.
-     */
-    public void setContinuousValidityChecking(boolean continuousValidityChecking);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/ElementEditAS.java b/src/org/apache/xerces/dom3/as/ElementEditAS.java
deleted file mode 100644
index ea4e5f0..0000000
--- a/src/org/apache/xerces/dom3/as/ElementEditAS.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Attr;
-
-/**
- * This interface extends the <code>Element</code> interface with additional 
- * methods for guided document editing. An object implementing this 
- * interface must also implement NodeEditAS interface.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ElementEditAS extends NodeEditAS {
-    /**
-     * The list of qualified element names defined in the abstract schema. 
-     */
-    public NodeList getDefinedElementTypes();
-
-    /**
-     * Determines element content type.
-     * @return Constant for one of EMPTY_CONTENTTYPE, ANY_CONTENTTYPE, 
-     *   MIXED_CONTENTTYPE, ELEMENTS_CONTENTTYPE.
-     */
-    public short contentType();
-
-    /**
-     * Determines if the value for specified attribute can be set.
-     * @param attrname Name of attribute.
-     * @param attrval Value to be assigned to the attribute.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canSetAttribute(String attrname, 
-                                   String attrval);
-
-    /**
-     * Determines if an attribute node can be added with respect to the 
-     * validity check level.This is an attribute node, there is no need for 
-     * canSetAttributreNodeNS!
-     * @param attrNode <code>Node</code> in which the attribute can possibly 
-     *   be set.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canSetAttributeNode(Attr attrNode);
-
-    /**
-     * Determines if the attribute with given namespace and qualified name can 
-     * be created if not already present in the attribute list of the 
-     * element. If the attribute with same qualified name and namespaceURI 
-     * is already present in the elements attribute list it tests for the 
-     * value of the attribute and its prefix to the new value. See DOM core 
-     * <code>setAttributeNS</code>.
-     * @param name Qualified name of attribute.
-     * @param attrval Value to be assigned to the attribute.
-     * @param namespaceURI <code>namespaceURI</code> of namespace.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canSetAttributeNS(String name, 
-                                     String attrval, 
-                                     String namespaceURI);
-
-    /**
-     * Verifies if an attribute by the given name can be removed.
-     * @param attrname Name of attribute.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canRemoveAttribute(String attrname);
-
-    /**
-     * Verifies if an attribute by the given local name and namespace can be 
-     * removed.
-     * @param attrname Local name of the attribute to be removed.
-     * @param namespaceURI The namespace URI of the attribute to remove.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canRemoveAttributeNS(String attrname, 
-                                        String namespaceURI);
-
-    /**
-     * Determines if an attribute node can be removed.
-     * @param attrNode The <code>Attr</code> node to remove from the 
-     *   attribute list.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canRemoveAttributeNode(Node attrNode);
-
-    /**
-     * Returns an <code>NodeList</code> containing the possible 
-     * <code>Element</code> names that can appear as children of this type 
-     * of element.
-     * @return List of possible children element types of this element.
-     */
-    public NodeList getChildElements();
-
-    /**
-     * Returns an <code>NodeList</code> containing the possible 
-     * <code>Element</code> names that can appear as a parent of this type 
-     * of element.
-     * @return List of possible parent element types of this element.
-     */
-    public NodeList getParentElements();
-
-    /**
-     * Returns an <code>NodeList</code> containing all the possible 
-     * <code>Attr</code>s that can appear with this type of element.
-     * @return List of possible attributes of this element.
-     */
-    public NodeList getAttributeList();
-
-    /**
-     * Determines if this element is defined in the currently active AS.
-     * @param elemTypeName Name of element.
-     * @return A boolean that is <code>true</code> if the element is defined, 
-     *   <code>false</code> otherwise.
-     */
-    public boolean isElementDefined(String elemTypeName);
-
-    /**
-     * Determines if this element in this namespace is defined in the 
-     * currently active AS.
-     * @param elemTypeName Name of element.
-     * @param namespaceURI <code>namespaceURI</code> of namespace.
-     * @param name Qualified name of namespace. This is for sub-elements.
-     * @return A boolean that is <code>true</code> if the element is defined, 
-     *   <code>false</code> otherwise.
-     */
-    public boolean isElementDefinedNS(String elemTypeName, 
-                                      String namespaceURI, 
-                                      String name);
-
-}
diff --git a/src/org/apache/xerces/dom3/as/NodeEditAS.java b/src/org/apache/xerces/dom3/as/NodeEditAS.java
deleted file mode 100644
index e1d3447..0000000
--- a/src/org/apache/xerces/dom3/as/NodeEditAS.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.as;
-
-import org.w3c.dom.Node;
-
-/**
- * This interface extends a <code>Node</code> from  with additional methods 
- * for guided document editing. The expectation is that an instance of the 
- * <code>DOMImplementationAS</code> interface can be obtained by using 
- * binding-specific casting methods on an instance of the 
- * <code>DOMImplementation</code> interface when the DOM implementation 
- * supports the feature "<code>AS-DOC</code>".
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface NodeEditAS {
-    // ASCheckType
-    /**
-     * Check for well-formedness of this node.
-     */
-    public static final short WF_CHECK                  = 1;
-    /**
-     * Check for namespace well-formedness includes <code>WF_CHECK</code>.
-     */
-    public static final short NS_WF_CHECK               = 2;
-    /**
-     * Checks for whether this node is partially valid. It includes 
-     * <code>NS_WF_CHECK</code>.
-     */
-    public static final short PARTIAL_VALIDITY_CHECK    = 3;
-    /**
-     * Checks for strict validity of the node with respect to active AS which 
-     * by definition includes <code>NS_WF_CHECK</code>.
-     */
-    public static final short STRICT_VALIDITY_CHECK     = 4;
-
-    /**
-     * Determines whether the <code>insertBefore</code> operation from the 
-     * <code>Node</code> interface would make this document invalid with 
-     * respect to the currently active AS. Describe "valid" when referring 
-     * to partially completed documents.
-     * @param newChild <code>Node</code> to be inserted.
-     * @param refChild Reference <code>Node</code>.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canInsertBefore(Node newChild, 
-                                   Node refChild);
-
-    /**
-     * Has the same arguments as <code>RemoveChild</code>.
-     * @param oldChild <code>Node</code> to be removed.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canRemoveChild(Node oldChild);
-
-    /**
-     * Has the same arguments as <code>ReplaceChild</code>.
-     * @param newChild New <code>Node</code>.
-     * @param oldChild <code>Node</code> to be replaced.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canReplaceChild(Node newChild, 
-                                   Node oldChild);
-
-    /**
-     * Has the same arguments as <code>AppendChild</code>.
-     * @param newChild <code>Node</code> to be appended.
-     * @return <code>true</code> if no reason it can't be done; 
-     *   <code>false</code> if it can't be done.
-     */
-    public boolean canAppendChild(Node newChild);
-
-    /**
-     * Determines if the Node is valid relative to currently active AS. It 
-     * doesn't normalize before checking if the document is valid. To do so, 
-     * one would need to explicitly call a normalize method. 
-     * @param deep Setting the <code>deep</code> flag on causes the 
-     *   <code>isNodeValid</code> method to check for the whole subtree of 
-     *   the current node for validity. Setting it to <code>false</code> 
-     *   only checks the current node and its immediate child nodes. The 
-     *   <code>validate</code> method on the <code>DocumentAS</code> 
-     *   interface, however, checks to determine whether the entire document 
-     *   is valid.
-     * @param wFValidityCheckLevel Flag to tell at what level validity and 
-     *   well-formedness checking is done. 
-     * @return <code>true</code> if the node is valid/well-formed in the 
-     *   current context and check level defined by 
-     *   <code>wfValidityCheckLevel</code>, <code>false</code> if not.
-     * @exception DOMASException
-     *   <code>NO_AS_AVAILABLE</code>: Raised if the 
-     *   <code>DocumentEditAS</code> related to this node does not have any 
-     *   active <code>ASModel</code> and <code>wfValidityCheckLevel</code> 
-     *   is set to <code>PARTIAL</code> or <code>STRICT_VALIDITY_CHECK</code>
-     *   .
-     */
-    public boolean isNodeValid(boolean deep, 
-                               short wFValidityCheckLevel)
-                               throws DOMASException;
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DOMBuilder.java b/src/org/apache/xerces/dom3/ls/DOMBuilder.java
deleted file mode 100644
index d02448f..0000000
--- a/src/org/apache/xerces/dom3/ls/DOMBuilder.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.DOMException;
-import org.apache.xerces.dom3.DOMErrorHandler;
-
-/**
- * A interface to an object that is able to build a DOM tree from various 
- * input sources.
- * <p><code>DOMBuilder</code> provides an API for parsing XML documents and 
- * building the corresponding DOM document tree. A <code>DOMBuilder</code> 
- * instance is obtained from the <code>DOMImplementationLS</code> interface 
- * by invoking its <code>createDOMBuilder</code>method.
- * <p> As specified in , when a document is first made available via the 
- * DOMBuilder: there is only one <code>Text</code> node for each block of 
- * text. The <code>Text</code> nodes are into "normal" form: 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.  it is expected that the <code>value</code> and 
- * <code>nodeValue</code> attributes of an <code>Attr</code> node initially 
- * return the XML 1.0 normalized value. However, if the features 
- * <code>validate-if-schema</code> and <code>datatype-normalization</code> 
- * 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 feature 
- * <code>datatype-normalization</code> is not set to <code>true</code>, the 
- * XML 1.0 attribute normalization is garantee to occur, and if attributes 
- * list does not contain namespace declarations, the <code>attributes</code> 
- * attribute on <code>Element</code> node represents the property 
- * [attributes] defined in  .  XML Schemas does not modified the XML 
- * attribute normalization but represents their normalized value in an other 
- * information item property: [schema normalized value]XML Schema 
- * normalization only occurs if <code>datatype-normalization</code> is set 
- * to <code>true</code>.
- * <p> The Document Object Model Level 3 Load and Save does not provide a way 
- * to disable the namespace resolution: Namespaces are always taken into 
- * account during loading and saving operations. 
- * <p> Asynchronous <code>DOMBuilder</code> objects are expected to also 
- * implement the <code>events::EventTarget</code> interface so that event 
- * listeners can be registerd on asynchronous <code>DOMBuilder</code> 
- * objects. 
- * <p> Events supported by asynchronous <code>DOMBuilder</code> are: ls-load: 
- * The document that's being loaded is completely parsed, see the definition 
- * of <code>LSLoadEvent</code>ls-progress: Progress notification, see the 
- * definition of <code>LSProgressEvent</code>
- * <p> <code>DOMBuilder</code>s have a number of named features that can be 
- * queried or set. The name of <code>DOMBuilder</code> features must be 
- * valid XML names. Implementation specific features (extensions) should 
- * choose a implementation specific prefix to avoid name collisions. 
- * <p> Even if all features must be recognized by all implementations, being 
- * able to set a state (<code>true</code> or <code>false</code>) is not 
- * always required. The following list of recognized features indicates the 
- * definitions of each feature state, if setting the state to 
- * <code>true</code> or <code>false</code> must be supported or is optional 
- * and, which state is the default one: 
- * <dl>
- * <dt><code>"namespace-declarations"</code></dt>
- * <dd>
- * <dl>
- * <dt>
- * <code>true</code></dt>
- * <dd>[required] (default) include the namespace declaration 
- * attributes, specified or defaulted from the schema or the DTD, in the DOM 
- * document. See also the section Declaring Namespaces in . </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[optional] discard all namespace declaration 
- * attributes. The Namespace prefixes will be retained even if this feature 
- * is set to <code>false</code>. </dd>
- * </dl></dd>
- * <dt><code>"validation"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[
- * optional] report validation errors (setting <code>true</code> also will 
- * force the <code>external-general-entities</code> and 
- * <code>external-parameter-entities</code> features to be <code>true</code>
- * .) Also note that the <code>validate-if-schema</code> feature will alter 
- * the validation behavior when this feature is set <code>true</code>. </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[required] (default) do not report validation errors. </dd>
- * </dl></dd>
- * <dt>
- * <code>"external-parameter-entities"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (
- * default)load external parameter entities. </dd>
- * <dt><code>false</code></dt>
- * <dd>[optional]do 
- * not load external parameter entities. </dd>
- * <dt>default value</dt>
- * <dd><code>true</code></dd>
- * </dl></dd>
- * <dt>
- * <code>"external-general-entities"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (
- * default) include all external general (text) entities. </dd>
- * <dt><code>false</code></dt>
- * <dd>[
- * optional]do not include external general entities. </dd>
- * </dl></dd>
- * <dt>
- * <code>"external-dtd-subset"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (default) 
- * load the external dtd and also all external parameter entities. </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[optional] do not load the dtd nor external parameter 
- * entities. </dd>
- * </dl></dd>
- * <dt><code>"validate-if-schema"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[optional] 
- * when both this feature and validation are <code>true</code>, enable 
- * validation only if the document being processed has a schema (i.e. XML 
- * schema, DTD, any other type of schema, note that this is unrelated to the 
- * abstract schema specification). Documents without schemas are parsed 
- * without validation. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] (default) the validation 
- * feature alone controls whether the document is checked for validity. 
- * Documents without a schemas are not valid. </dd>
- * </dl></dd>
- * <dt>
- * <code>"validate-against-dtd"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[optional] Prefere 
- * validation against the DTD over any other schema referenced in the XML 
- * file. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] (default) Let the parser decide what 
- * to validate against if there are references to multiple types of schemas. </dd>
- * </dl></dd>
- * <dt>
- * <code>"datatype-normalization"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] Let the 
- * (non-DTD) validation process do its datatype normalization that is 
- * defined in the used schema language.  We should define "datatype 
- * normalization". </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] (default) Disable datatype 
- * normalization. The XML 1.0 attribute value normalization is garantee to 
- * occur in that case. </dd>
- * </dl></dd>
- * <dt><code>"create-entity-ref-nodes"</code></dt>
- * <dd>
- * <dl>
- * <dt>
- * <code>true</code></dt>
- * <dd>[required] (default) Create <code>EntityReference</code> 
- * nodes in the DOM document. It will also set 
- * <code>create-entity-nodes</code> to be <code>true</code>. </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[optional] omit all <code>EntityReference</code> nodes 
- * from the DOM document, putting the entity expansions directly in their 
- * place. <code>Text</code> nodes are into "normal" form. 
- * <code>EntityReference</code> nodes to non-defined entities will still be 
- * created in the DOM document. </dd>
- * </dl></dd>
- * <dt><code>"create-entity-nodes"</code></dt>
- * <dd>
- * <dl>
- * <dt>
- * <code>true</code></dt>
- * <dd>[required] (default) Create <code>Entity</code> nodes in 
- * the DOM document. </dd>
- * <dt><code>false</code></dt>
- * <dd>[optional] Omit all 
- * <code>entity</code> nodes from the DOM document. It will also set 
- * <code>create-entity-ref-nodes</code> to <code>false</code>. </dd>
- * </dl></dd>
- * <dt>
- * <code>"whitespace-in-element-content"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (
- * default) Include white space characters appearing within element content 
- * (see  2.10 "White Space Handling"). </dd>
- * <dt><code>false</code></dt>
- * <dd>[optional] Omit 
- * white space characters appearing within element content. Note that white 
- * space characters within element content will only be omitted if it can be 
- * identified as such, and not all parsers may be able to do so (see  2.10 
- * "White Space Handling"). </dd>
- * </dl></dd>
- * <dt><code>"create-cdata-nodes"</code></dt>
- * <dd>
- * <dl>
- * <dt>
- * <code>true</code></dt>
- * <dd>[required] (default) Create <code>CDATASection</code> 
- * nodes in response to the appearance of CDATA sections in the XML 
- * document. </dd>
- * <dt><code>false</code></dt>
- * <dd>[optional] Do not create 
- * <code>CDATASection</code> nodes in the DOM document.  The content of any 
- * CDATA sections in the XML document appears in the DOM as if it had been 
- * normal (non-CDATA) content. If a CDATA section is adjacent to other 
- * content, the combined content appears in a single <code>Text</code> node, 
- * i.e. the <code>Text</code> nodes are into "normal" form. </dd>
- * </dl></dd>
- * <dt>
- * <code>"comments"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (default) Include XML 
- * comments in the DOM document. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] Discard XML 
- * comments, do not create <code>Comment</code> nodes in the DOM Document 
- * resulting from a parse. </dd>
- * </dl></dd>
- * <dt><code>"charset-overrides-xml-encoding"</code></dt>
- * <dd>
- * <dl>
- * <dt>
- * <code>true</code></dt>
- * <dd>[required] (default) If a higher level protocol such as 
- * HTTP  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  4.3.3 "Character 
- * Encoding in Entities"). Explicitly setting an encoding in the 
- * <code>DOMInputSource</code> overrides encodings from the protocol. </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[required] Any character set encoding information from 
- * higher level protocols is ignored by the parser. </dd>
- * </dl></dd>
- * <dt>
- * <code>"load-as-infoset"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[optional] Load the 
- * document and store only the information defined in the XML Information 
- * Set .  This will force the following features to <code>false</code>: 
- * <code>namespace-declarations</code>, <code>validate-if-schema</code>, 
- * <code>create-entity-ref-nodes</code>, <code>create-entity-nodes</code>, 
- * <code>create-cdata-nodes</code>.  This will force the following features 
- * to <code>true</code>: <code>datatype-normalization</code>, 
- * <code>whitespace-in-element-content</code>, <code>comments</code>, 
- * <code>charset-overrides-xml-encoding</code>.  Other features are not 
- * changed unless explicity specified in the description of the features.  
- * Note that querying this feature with <code>getFeature</code> will return 
- * <code>true</code> only if the individual features specified above are 
- * appropriately set. </dd>
- * <dt><code>false</code></dt>
- * <dd> Setting <code>load-as-infoset</code>
- *  to <code>false</code> has no effect. </dd>
- * </dl></dd>
- * <dt>
- * <code>"supported-mediatypes-only"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[optional] Check 
- * that the media type of the parsed resource is a supported media type and 
- * call the error handler if an unsupported media type is encountered. The 
- * media types defined in  must be accepted. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] (
- * default) Don't check the media type, accept any type of data. </dd>
- * </dl></dd>
- * </dl>
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMBuilder {
-    /**
-     * If a <code>DOMEntityResolver</code> has been specified, each time a 
-     * reference to an external entity is encountered the 
-     * <code>DOMBuilder</code> will pass the public and system IDs to the 
-     * entity resolver, which can then specify the actual source of the 
-     * entity.
-     */
-    public DOMEntityResolver getEntityResolver();
-    /**
-     * If a <code>DOMEntityResolver</code> has been specified, each time a 
-     * reference to an external entity is encountered the 
-     * <code>DOMBuilder</code> will pass the public and system IDs to the 
-     * entity resolver, which can then specify the actual source of the 
-     * entity.
-     */
-    public void setEntityResolver(DOMEntityResolver entityResolver);
-
-    /**
-     *  In the event that an error is encountered in the XML document being 
-     * parsed, the <code>DOMDcoumentBuilder</code> will call back to the 
-     * <code>errorHandler</code> with the error information. When the 
-     * document loading process calls the error handler the node closest to 
-     * where the error occured is passed to the error handler if the 
-     * implementation, if the implementation is unable to pass the node 
-     * where the error occures the document Node is passed to the error 
-     * handler. Mutations to the document from within an error handler will 
-     * result in implementation dependent behavour. 
-     */
-    public DOMErrorHandler getErrorHandler();
-    /**
-     *  In the event that an error is encountered in the XML document being 
-     * parsed, the <code>DOMDcoumentBuilder</code> will call back to the 
-     * <code>errorHandler</code> with the error information. When the 
-     * document loading process calls the error handler the node closest to 
-     * where the error occured is passed to the error handler if the 
-     * implementation, if the implementation is unable to pass the node 
-     * where the error occures the document Node is passed to the error 
-     * handler. Mutations to the document from within an error handler will 
-     * result in implementation dependent behavour. 
-     */
-    public void setErrorHandler(DOMErrorHandler errorHandler);
-
-    /**
-     *  When the application provides a filter, the parser will call out to 
-     * the filter at the completion of the construction of each 
-     * <code>Element</code> node. The filter implementation can choose to 
-     * remove the element from the document being constructed (unless the 
-     * element is the document element) or to terminate the parse early. If 
-     * the document is being validated when it's loaded the validation 
-     * happens before the filter is called. 
-     */
-    public DOMBuilderFilter getFilter();
-    /**
-     *  When the application provides a filter, the parser will call out to 
-     * the filter at the completion of the construction of each 
-     * <code>Element</code> node. The filter implementation can choose to 
-     * remove the element from the document being constructed (unless the 
-     * element is the document element) or to terminate the parse early. If 
-     * the document is being validated when it's loaded the validation 
-     * happens before the filter is called. 
-     */
-    public void setFilter(DOMBuilderFilter filter);
-
-    /**
-     * Set the state of a feature.
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * <br>It is possible for a <code>DOMBuilder</code> to recognize a feature 
-     * name but to be unable to set its value.
-     * @param name The feature name.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_SUPPORTED_ERR exception when the <code>DOMBuilder</code> 
-     *   recognizes the feature name but cannot set the requested value. 
-     *   <br>Raise a NOT_FOUND_ERR When the <code>DOMBuilder</code> does not 
-     *   recognize the feature name.
-     */
-    public void setFeature(String name, 
-                           boolean state)
-                           throws DOMException;
-
-    /**
-     * Query whether setting a feature to a specific value is supported.
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * @param name The feature name, which is a DOM has-feature style string.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @return <code>true</code> if the feature could be successfully set to 
-     *   the specified value, or <code>false</code> if the feature is not 
-     *   recognized or the requested value is not supported. The value of 
-     *   the feature itself is not changed.
-     */
-    public boolean canSetFeature(String name, 
-                                 boolean state);
-
-    /**
-     * Look up the value of a feature.
-     * <br>The feature name has the same form as a DOM hasFeature string
-     * @param name The feature name, which is a string with DOM has-feature 
-     *   syntax.
-     * @return The current state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_FOUND_ERR When the <code>DOMBuilder</code> does not 
-     *   recognize the feature name.
-     */
-    public boolean getFeature(String name)
-                              throws DOMException;
-
-    /**
-     *  Parse an XML document from a location identified by an URI reference . 
-     * If the URI contains a fragment identifier (see section 4.1 in ), the 
-     * behavior is not defined by this specification. 
-     * @param uri The location of the XML document to be read.
-     * @return If the <code>DOMBuilder</code> is a synchronous 
-     *   <code>DOMBuilder</code> the newly created and populated 
-     *   <code>Document</code> is returned. If the <code>DOMBuilder</code> 
-     *   is asynchronous then <code>null</code> is returned since the 
-     *   document object is not yet parsed when this method returns.
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parseURI</code> originate with the 
-     *   installed ErrorHandler, and thus depend on the implementation of 
-     *   the <code>DOMErrorHandler</code> interfaces. The default error 
-     *   handlers will raise a DOMSystemException if any form I/O or other 
-     *   system error occurs during the parse, but application defined error 
-     *   handlers are not required to do so. 
-     */
-    public Document parseURI(String uri)
-                             throws Exception;
-
-    /**
-     * Parse an XML document from a resource identified by an 
-     * <code>DOMInputSource</code>.
-     * @param is The <code>DOMInputSource</code> from which the source 
-     *   document is to be read. 
-     * @return If the <code>DOMBuilder</code> is a synchronous 
-     *   <code>DOMBuilder</code> the newly created and populated 
-     *   <code>Document</code> is returned. If the <code>DOMBuilder</code> 
-     *   is asynchronous then <code>null</code> is returned since the 
-     *   document object is not yet parsed when this method returns.
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parse</code> originate with the installed 
-     *   ErrorHandler, and thus depend on the implementation of the 
-     *   <code>DOMErrorHandler</code> interfaces. The default ErrorHandlers 
-     *   will raise a <code>DOMSystemException</code> if any form I/O or 
-     *   other system error occurs during the parse, but application defined 
-     *   ErrorHandlers are not required to do so. 
-     */
-    public Document parse(DOMInputSource is)
-                          throws Exception;
-
-    // ACTION_TYPES
-    /**
-     * Replace the context node with the result of parsing the input source. 
-     * For this action to work the context node must be an 
-     * <code>Element</code>, <code>Text</code>, <code>CDATASection</code>, 
-     * <code>Comment</code>, <code>ProcessingInstruction</code>, or 
-     * <code>EntityReference</code> node.
-     */
-    public static final short ACTION_REPLACE            = 1;
-    /**
-     * Append the result of parsing the input source to the context node. For 
-     * this action to work, the context node must be an <code>Element</code>.
-     */
-    public static final short ACTION_APPEND             = 2;
-    /**
-     * Insert the result of parsing the input source after the context node. 
-     * For this action to work the context nodes parent must be an 
-     * <code>Element</code>.
-     */
-    public static final short ACTION_INSERT_AFTER       = 3;
-    /**
-     * Insert the result of parsing the input source before the context node. 
-     * For this action to work the context nodes parent must be an 
-     * <code>Element</code>.
-     */
-    public static final short ACTION_INSERT_BEFORE      = 4;
-
-    /**
-     *  Parse an XML document or fragment from a resource identified by an 
-     * <code>DOMInputSource</code> and insert the content into an existing 
-     * document at the position epcified with the <code>contextNode</code> 
-     * and <code>action</code> arguments. When parsing the input stream the 
-     * context node is used for resolving unbound namespace prefixes. 
-     * @param is  The <code>DOMInputSource</code> from which the source 
-     *   document is to be read. 
-     * @param cnode  The <code>Node</code> that is used as the context for 
-     *   the data that is being parsed. 
-     * @param action This parameter describes which action should be taken 
-     *   between the new set of node being inserted and the existing 
-     *   children of the context node. The set of possible actions is 
-     *   defined above. 
-     * @exception DOMException
-     *   HIERARCHY_REQUEST_ERR: Thrown if this action results in an invalid 
-     *   hierarchy (i.e. a Document with more than one document element). 
-     */
-    public void parseWithContext(DOMInputSource is, 
-                                 Node cnode, 
-                                 short action)
-                                 throws DOMException;
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DOMBuilderFilter.java b/src/org/apache/xerces/dom3/ls/DOMBuilderFilter.java
deleted file mode 100644
index 504e411..0000000
--- a/src/org/apache/xerces/dom3/ls/DOMBuilderFilter.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import org.w3c.dom.Node;
-
-/**
- * <code>DOMBuilderFilter</code>s provide applications the ability to examine 
- * nodes as they are being constructed during a parse. 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>DOMBuilderFilter</code> 
- * methods, i.e. it is not possible to filter out the document element.
- * <p>All validity checking while reading 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.The description of these methods is not complete
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMBuilderFilter {
-    /**
-     * This method will be called by the parser 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>startNode</code> function.
-     * <br>The element node passed to <code>startNode</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>startNode</code> filter function may access or change the 
-     * attributers 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 snode The newly encountered element. At the time this method is 
-     *   called, the element is incomplete - it will have its attributes, 
-     *   but no children. Should the parameter be an Element since we only 
-     *   passed elements to startNode?
-     * @return  <code>ACCEPT</code> if this <code>Element</code> should be 
-     *   included in the DOM document being built.  <code>REJECT</code> if 
-     *   the <code>Element</code> and all of its children should be 
-     *   rejected.  <code>SKIP</code> if the <code>Element</code> should be 
-     *   rejected. All of its children are inserted in place of the rejected 
-     *   <code>Element</code> node. 
-     */
-    public int startNode(Node snode);
-
-    /**
-     * This method will be called by the parser at the completion of the parse 
-     * of each node. The node will exist and be complete, as will all of its 
-     * children, and their children, recursively. The parent node will also 
-     * exist, although that node may be incomplete, as 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. This node 
-     * may also be removed from its parent node, which will prevent it from 
-     * appearing in the final document at the completion of the parse. Aside 
-     * from this one operation on the node's parent, the state of the rest 
-     * of the document outside of this node is not defined, and the affect 
-     * of any attempt to navigate to or 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. 
-     * @param enode 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  <code>ACCEPT</code> if this <code>Node</code> should be 
-     *   included in the DOM document being built.  <code>REJECT</code> if 
-     *   the <code>Node</code> and all of its children should be rejected. 
-     */
-    public int endNode(Node enode);
-
-    /**
-     *  Tells the <code>DOMBuilder</code> what types of nodes to show to the 
-     * filter. See <code>NodeFilter</code> for definition of the constants. 
-     * The constant <code>SHOW_ATTRIBUTE</code> is meaningless here, 
-     * attribute nodes will never be passed to a 
-     * <code>DOMBuilderFilter</code>. 
-     */
-    public int getWhatToShow();
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DOMEntityResolver.java b/src/org/apache/xerces/dom3/ls/DOMEntityResolver.java
deleted file mode 100644
index 2912faa..0000000
--- a/src/org/apache/xerces/dom3/ls/DOMEntityResolver.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-/**
- * <code>DOMEntityResolver</code> Provides a way for applications to redirect 
- * references to external entities.
- * <p>Applications needing to implement customized handling for external 
- * entities must implement this interface and register their implementation 
- * by setting the <code>entityResolver</code> property of the 
- * <code>DOMBuilder</code>. 
- * <p>The <code>DOMBuilder</code> will then allow the application to intercept 
- * any external entities (including the external DTD subset and external 
- * parameter entities) before including them.
- * <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 URI types other than URIs. <code>DOMEtityResolver</code> is based on 
- * the SAX2  <code>EntityResolver</code> interface. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMEntityResolver {
-    /**
-     * Allow the application to resolve external entities. 
-     * <br>The <code>DOMBuilder</code> will call this method before opening 
-     * any external entity except the top-level document entity (including 
-     * the external DTD subset, external entities referenced within the DTD, 
-     * and external entities referenced within the document element); the 
-     * application may request that the <code>DOMBuilder</code> resolve the 
-     * entity 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 URIs, 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).
-     * <br>If the system identifier is a URI, the <code>DOMBuilder</code> must 
-     * resolve it fully before reporting it to the application through this 
-     * interface. See issue #4. An alternative would be to pass the URI out 
-     * without resolving it, and to provide a base as an additional 
-     * parameter. SAX resolves URIs first, and does not provide a base. 
-     * @param publicId The public identifier of the external entity being 
-     *   referenced, or <code>null</code> if none was supplied.
-     * @param systemId The system identifier, a URI reference , of the 
-     *   external entity being referenced exactly as written in the source 
-     *   (i.e. . 
-     * @param baseURI The URI reference representing the base URI of the 
-     *   resource being parsed, or <code>null</code> if there is no base 
-     *   URI. 
-     * @return A <code>DOMInputSource</code> object describing the new input 
-     *   source, or <code>null</code> to request that the parser open a 
-     *   regular URI connection to the system identifier. 
-     * @exception DOMSystemException
-     *   Any <code>DOMSystemException</code>, possibly wrapping another 
-     *   exception. 
-     */
-    public DOMInputSource resolveEntity(String publicId, 
-                                        String systemId, 
-                                        String baseURI)
-                                        throws Exception;
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DOMImplementationLS.java b/src/org/apache/xerces/dom3/ls/DOMImplementationLS.java
deleted file mode 100644
index aee0a6a..0000000
--- a/src/org/apache/xerces/dom3/ls/DOMImplementationLS.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  <code>DOMImplementationLS</code> contains the factory methods for creating 
- * objects that implement the <code>DOMBuilder</code> (parser) and 
- * <code>DOMWriter</code> (serializer) interfaces. 
- * <p> An object that implements DOMImplementationLS is obtained by doing a 
- * binding specific cast from DOMImplementation to DOMImplementationLS. 
- * Implementations supporting the Load and Save feature must implement the 
- * DOMImplementationLS interface on whatever object implements the 
- * DOMImplementation interface. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMImplementationLS {
-    // DOMIMplementationLSMode
-    /**
-     * Create a synchronous <code>DOMBuilder</code>.
-     */
-    public static final short MODE_SYNCHRONOUS          = 1;
-    /**
-     * Create an asynchronous <code>DOMBuilder</code>.
-     */
-    public static final short MODE_ASYNCHRONOUS         = 2;
-
-    /**
-     * Create a new <code>DOMBuilder</code>. The newly constructed parser may 
-     * then be configured by means of its <code>setFeature</code> method, 
-     * 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>DOMBuilder</code> that is created will operate in synchronous 
-     *   mode, if it's <code>MODE_ASYNCHRONOUS</code> then the 
-     *   <code>DOMBuilder</code> that is created will operate in 
-     *   asynchronous mode. 
-     * @return  The newly created <code>DOMBuilder</code> object, this 
-     *   <code>DOMBuilder</code> is either synchronous or asynchronous 
-     *   depending on the value of the <code>type</code> argument. 
-     * @exception DOMException
-     *    Raise a NOT_SUPPORTED_ERR exception if MODE_ASYNCHRONOUS is not 
-     *   supported. 
-     */
-    public DOMBuilder createDOMBuilder(short mode)
-                                       throws DOMException;
-
-    /**
-     * Create a new <code>DOMWriter</code> object. <code>DOMWriter</code>s are 
-     * used to serialize a DOM tree back into an XML document. 
-     * @return The newly created <code>DOMWriter</code> object.
-     */
-    public DOMWriter createDOMWriter();
-
-    /**
-     *  Create a new "empty" <code>DOMInputSource</code>. 
-     * @return  The newly created <code>DOMBuilder</code> object, this 
-     *   <code>DOMBuilder</code> is either synchronous or asynchronous 
-     *   depending on the value of the <code>type</code> argument. 
-     */
-    public DOMInputSource createDOMInputSource();
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DOMInputSource.java b/src/org/apache/xerces/dom3/ls/DOMInputSource.java
deleted file mode 100644
index 43d5059..0000000
--- a/src/org/apache/xerces/dom3/ls/DOMInputSource.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import java.io.InputStream;
-
-/**
- * This interface represents a single input source for an XML entity. 
- * <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), and/or a character stream. 
- * <p> The exact definitions of a byte stream and a character stream are 
- * binding dependent. 
- * <p> There are two places that the application will deliver this input 
- * source to the parser: as the argument to the <code>parse</code> method, 
- * or as the return value of the <code>DOMEntityResolver.resolveEntity</code>
- *  method. 
- * <p> The <code>DOMBuilder</code> will use the <code>DOMInputSource</code> 
- * object to determine how to read XML input. If there is a character stream 
- * available, the parser will read that stream directly; if not, the parser 
- * will use a byte stream, if available; if neither a character stream nor a 
- * byte stream is available, the parser will attempt to open a URI 
- * connection to the resource identified by the system identifier. 
- * <p> An <code>DOMInputSource</code> object belongs to the application: the 
- * parser shall never modify it in any way (it may modify a copy if 
- * necessary).  Eventhough all attributes in this interface are writable the 
- * DOM implementation is expected to never mutate a DOMInputSource. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMInputSource {
-    /**
-     * An attribute of a language-binding dependent type that represents a 
-     * stream of bytes.
-     * <br>The parser will ignore this if there is also a character stream 
-     * specified, but it will use a byte stream in preference to opening a 
-     * URI connection itself.
-     * <br>If the application knows the character encoding of the byte stream, 
-     * it should set the encoding property. Setting the encoding in this way 
-     * will override any encoding specified in the XML declaration itself.
-     */
-    public InputStream getByteStream();
-    /**
-     * An attribute of a language-binding dependent type that represents a 
-     * stream of bytes.
-     * <br>The parser will ignore this if there is also a character stream 
-     * specified, but it will use a byte stream in preference to opening a 
-     * URI connection itself.
-     * <br>If the application knows the character encoding of the byte stream, 
-     * it should set the encoding property. Setting the encoding in this way 
-     * will override any encoding specified in the XML declaration itself.
-     */
-    public void setByteStream(InputStream byteStream);
-
-    /**
-     *  An attribute of a language-binding dependent type that represents a 
-     * stream of 16-bit units. Application must encode the stream using 
-     * UTF-16 (defined in  and Amendment 1 of ). 
-     * <br>If a character stream is specified, the parser will ignore any byte 
-     * stream and will not attempt to open a URI connection to the system 
-     * identifier.
-     */
-    public java.io.Reader getCharacterStream();
-    /**
-     *  An attribute of a language-binding dependent type that represents a 
-     * stream of 16-bit units. Application must encode the stream using 
-     * UTF-16 (defined in  and Amendment 1 of ). 
-     * <br>If a character stream is specified, the parser will ignore any byte 
-     * stream and will not attempt to open a URI connection to the system 
-     * identifier.
-     */
-    public void setCharacterStream(java.io.Reader characterStream);
-
-    /**
-     * A string attribute that represents a sequence of 16 bit units (utf-16 
-     * encoded characters).
-     * <br>If string data is available in the input source, the parser will 
-     * ignore the character stream and the byte stream and will not attempt 
-     * to open a URI connection to the system identifier.
-     */
-    public String getStringData();
-    /**
-     * A string attribute that represents a sequence of 16 bit units (utf-16 
-     * encoded characters).
-     * <br>If string data is available in the input source, the parser will 
-     * ignore the character stream and the byte stream and will not attempt 
-     * to open a URI connection to the system identifier.
-     */
-    public void setStringData(String stringData);
-
-    /**
-     *  The character encoding, if known. The encoding must be a string 
-     * acceptable for an XML encoding declaration ( section 4.3.3 "Character 
-     * Encoding in Entities"). 
-     * <br>This attribute has no effect when the application provides a 
-     * character stream. For other sources of input, an encoding specified 
-     * by means of this attribute will override any encoding specified in 
-     * the XML claration or the Text Declaration, or an encoding obtained 
-     * from a higher level protocol, such as HTTP .
-     */
-    public String getEncoding();
-    /**
-     *  The character encoding, if known. The encoding must be a string 
-     * acceptable for an XML encoding declaration ( section 4.3.3 "Character 
-     * Encoding in Entities"). 
-     * <br>This attribute has no effect when the application provides a 
-     * character stream. For other sources of input, an encoding specified 
-     * by means of this attribute will override any encoding specified in 
-     * the XML claration or the Text Declaration, or an encoding obtained 
-     * from a higher level protocol, such as HTTP .
-     */
-    public void setEncoding(String encoding);
-
-    /**
-     * The public identifier for this input source. The public identifier is 
-     * always optional: if the application writer includes one, it will be 
-     * provided as part of the location information.
-     */
-    public String getPublicId();
-    /**
-     * The public identifier for this input source. The public identifier is 
-     * always optional: if the application writer includes one, it will be 
-     * provided as part of the location information.
-     */
-    public void setPublicId(String publicId);
-
-    /**
-     * The system identifier, a URI reference , for this input source. The 
-     * system identifier is optional if there is a byte stream or a 
-     * character stream, but it is still useful to provide one, since the 
-     * application can use it to resolve relative URIs and can include it in 
-     * error messages and warnings (the parser will attempt to fetch the 
-     * ressource identifier by the URI reference only if there is no byte 
-     * stream or character stream specified).
-     * <br>If the application knows the character encoding of the object 
-     * pointed to by the system identifier, it can register the encoding by 
-     * setting the encoding attribute.
-     * <br>If the system ID is a relative URI reference (see section 5 in ), 
-     * the behavior is implementation dependent.
-     */
-    public String getSystemId();
-    /**
-     * The system identifier, a URI reference , for this input source. The 
-     * system identifier is optional if there is a byte stream or a 
-     * character stream, but it is still useful to provide one, since the 
-     * application can use it to resolve relative URIs and can include it in 
-     * error messages and warnings (the parser will attempt to fetch the 
-     * ressource identifier by the URI reference only if there is no byte 
-     * stream or character stream specified).
-     * <br>If the application knows the character encoding of the object 
-     * pointed to by the system identifier, it can register the encoding by 
-     * setting the encoding attribute.
-     * <br>If the system ID is a relative URI reference (see section 5 in ), 
-     * the behavior is implementation dependent.
-     */
-    public void setSystemId(String systemId);
-
-    /**
-     *  The base URI to be used (see section 5.1.4 in ) for resolving relative 
-     * URIs to absolute URIs. If the baseURI is itself a relative URI, the 
-     * behavior is implementation dependent. 
-     */
-    public String getBaseURI();
-    /**
-     *  The base URI to be used (see section 5.1.4 in ) for resolving relative 
-     * URIs to absolute URIs. If the baseURI is itself a relative URI, the 
-     * behavior is implementation dependent. 
-     */
-    public void setBaseURI(String baseURI);
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DOMWriter.java b/src/org/apache/xerces/dom3/ls/DOMWriter.java
deleted file mode 100644
index 4ac7903..0000000
--- a/src/org/apache/xerces/dom3/ls/DOMWriter.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.DOMException;
-import org.apache.xerces.dom3.DOMErrorHandler;
-
-/**
- *  DOMWriter provides an API for serializing (writing) a DOM document out in 
- * an XML document. The XML data is written to an output stream, the type of 
- * which depends on the specific language bindings in use. During 
- * serialization of XML data, namespace fixup is done when possible. 
- * <p> <code>DOMWriter</code> accepts any node type for serialization. For 
- * nodes of type <code>Document</code> or <code>Entity</code>, well formed 
- * XML will be created if possible. The serialized output for these node 
- * types is either as a Document or an External Entity, respectively, and is 
- * acceptable input for an XML parser. For all other types of nodes the 
- * serialized form is not specified, but should be something useful to a 
- * human for debugging or diagnostic purposes. Note: rigorously designing an 
- * external (source) form for stand-alone node types that don't already have 
- * one defined in  seems a bit much to take on here. 
- * <p>Within a Document or Entity being serialized, Nodes are processed as 
- * follows Documents are written including an XML declaration and a DTD 
- * subset, if one exists in the DOM. Writing a document node serializes the 
- * entire document.  Entity nodes, when written directly by 
- * <code>writeNode</code> defined in the <code>DOMWriter</code> interface, 
- * output the entity expansion but no namespace fixup is done. The resulting 
- * output will be valid as an external entity.  Entity References nodes are 
- * serializes as an entity reference of the form 
- * <code>"&amp;entityName;"</code>) in the output. Child nodes (the 
- * expansion) of the entity reference are ignored.  CDATA sections 
- * containing content characters that can not be represented in the 
- * specified output encoding are handled according to the 
- * "split-cdata-sections" feature.If the feature is <code>true</code>, CDATA 
- * sections 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 feature is <code>false</code>, 
- * unrepresentable characters in a CDATA section are reported as errors. The 
- * error is not recoverable - there is no mechanism for supplying 
- * alternative characters and continuing with the serialization. All other 
- * node types (Element, Text, etc.) are serialized to their corresponding 
- * XML source form. 
- * <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 '&lt;' and '&amp;' are replaced by 
- * the predefined entities &amp;lt; and &amp;amp. The other predefined 
- * entities (&amp;gt, &amp;apos, etc.) are not used; these characters can be 
- * included directly. Any character that can not be represented directly in 
- * the output character encoding is serialized as a numeric character 
- * reference. 
- * <p> Attributes not containing quotes are serialized in quotes. Attributes 
- * containing quotes but no apostrophes are serialized in apostrophes 
- * (single quotes). Attributes containing both forms of quotes are 
- * serialized in quotes, with quotes within the value represented by the 
- * predefined entity &amp;quot;. Any character that can not be represented 
- * directly in the output character encoding is 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 an error. An example would be serializing the element 
- * &lt;LaCañada/&gt; with the encoding="us-ascii". 
- * <p> When requested by setting the <code>normalize-characters</code> feature 
- * on <code>DOMWriter</code>, all data to be serialized, both markup and 
- * character data, is W3C Text normalized according to the rules defined in 
- * . The W3C Text 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>Namespaces are fixed up during serialization, the serialization process 
- * will verify that namespace declarations, namespace prefixes and the 
- * namespace URIs associated with Elements and Attributes are consistent. If 
- * inconsistencies are found, the serialized form of the document will be 
- * altered to remove them. The algorithm used for doing the namespace fixup 
- * while seralizing a document is a combination of the algorithms used for 
- * lookupNamespaceURI and lookupNamespacePrefix . previous paragraph to be 
- * defined closer here.
- * <p>Any changes made affect only the namespace prefixes and declarations 
- * appearing in the serialized data. The DOM's view of the document is not 
- * altered by the serialization operation, and does not reflect any changes 
- * made to namespace declarations or prefixes in the serialized output. 
- * <p> While serializing a document the serializer will write out 
- * non-specified values (such as attributes whose <code>specified</code> is 
- * <code>false</code>) if the <code>output-default-values</code> feature is 
- * set to <code>true</code>. If the <code>output-default-values</code> flag 
- * is set to <code>false</code> and the <code>use-abstract-schema</code> 
- * feature is set to <code>true</code> the abstract schema will be used to 
- * determine if a value is specified or not, if 
- * <code>use-abstract-schema</code> is not set the <code>specified</code> 
- * flag on attribute nodes is used to determine if attribute values should 
- * be written out. 
- * <p> Ref to Core spec (1.1.9, XML namespaces, 5th paragraph) entity ref 
- * description about warning about unbound entity refs. Entity refs are 
- * always serialized as &amp;foo;, also mention this in the load part of 
- * this spec. 
- * <p> When serializing a document the DOMWriter checks to see if the document 
- * element in the document is a DOM Level 1 element or a DOM Level 2 (or 
- * higher) element (this check is done by looking at the localName of the 
- * root element). If the root element is a DOM Level 1 element then the 
- * DOMWriter will issue an error if a DOM Level 2 (or higher) element is 
- * found while serializing. Likewise if the document element is a DOM Level 
- * 2 (or higher) element and the DOMWriter sees a DOM Level 1 element an 
- * error is issued. Mixing DOM Level 1 elements with DOM Level 2 (or higher) 
- * is not supported. 
- * <p> <code>DOMWriter</code>s have a number of named features that can be 
- * queried or set. The name of <code>DOMWriter</code> features must be valid 
- * XML names. Implementation specific features (extensions) should choose an 
- * implementation dependent prefix to avoid name collisions. 
- * <p>Here is a list of properties that must be recognized by all 
- * implementations. 
- * <dl>
- * <dt><code>"normalize-characters"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[
- * optional] (default) Perform the W3C Text Normalization of the characters  
- * in document as they are written out. Only the characters being written 
- * are (potentially) altered. The DOM document itself is unchanged. </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[required] do not perform character normalization. </dd>
- * </dl></dd>
- * <dt>
- * <code>"split-cdata-sections"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (default) 
- * Split CDATA sections containing the CDATA section termination marker 
- * ']]&gt;' or characters that can not be represented in the output 
- * encoding, and output the characters using numeric character references. 
- * If a CDATA section is split a warning is issued. </dd>
- * <dt><code>false</code></dt>
- * <dd>[
- * required] Signal an error if a <code>CDATASection</code> contains an 
- * unrepresentable character. </dd>
- * </dl></dd>
- * <dt><code>"validation"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[
- * optional] Use the abstract schema to validate the document as it is being 
- * serialized. If validation errors are found the error handler is notified 
- * about the error. Setting this state will also set the feature 
- * <code>use-abstract-schema</code> to <code>true</code>. </dd>
- * <dt><code>false</code></dt>
- * <dd>[
- * required] (default) Don't validate the document as it is being 
- * serialized. </dd>
- * </dl></dd>
- * <dt><code>"expand-entity-references"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[
- * optional] Expand <code>EntityReference</code> nodes when serializing. </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[required] (default) Serialize all 
- * <code>EntityReference</code> nodes as XML entity references. </dd>
- * </dl></dd>
- * <dt>
- * <code>"whitespace-in-element-content"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (
- * default) Output all white spaces in the document. </dd>
- * <dt><code>false</code></dt>
- * <dd>[
- * optional] Only output white space that is not within element content. The 
- * implementation is expected to use the 
- * <code>isWhitespaceInElementContent</code> flag on <code>Text</code> nodes 
- * to determine if a text node should be written out or not. </dd>
- * </dl></dd>
- * <dt>
- * <code>"discard-default-content"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (default
- * ) Use whatever information available to the implementation (i.e. XML 
- * schema, DTD, the <code>specified</code> flag on <code>Attr</code> nodes, 
- * and so on) to decide what attributes and content should be serialized or 
- * not. Note that the <code>specified</code> flag on <code>Attr</code> nodes 
- * in itself is not always reliable, it is only reliable when it is set to 
- * <code>false</code> since the only case where it can be set to 
- * <code>false</code> is if the attribute was created by a Level 1 
- * implementation. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] Output all attributes and 
- * all content. </dd>
- * </dl></dd>
- * <dt><code>"format-canonical"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[optional] 
- * This formatting writes the document according to the rules specified in . 
- * Setting this feature to true will set the feature "format-pretty-print" 
- * to false. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] (default) Don't canonicalize the 
- * output. </dd>
- * </dl></dd>
- * <dt><code>"format-pretty-print"</code></dt>
- * <dd>
- * <dl>
- * <dt><code>true</code></dt>
- * <dd>[optional] 
- * 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. Setting this feature to true will 
- * set the feature "format-canonical" to false. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] 
- * (default) Don't pretty-print the result. </dd>
- * </dl></dd>
- * </dl>
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMWriter {
-    /**
-     * Set the state of a feature.
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * <br>It is possible for a <code>DOMWriter</code> to recognize a feature 
-     * name but to be unable to set its value.
-     * @param name The feature name.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_SUPPORTED_ERR exception when the <code>DOMWriter</code> 
-     *   recognizes the feature name but cannot set the requested value. 
-     *   <br>Raise a NOT_FOUND_ERR When the <code>DOMWriter</code> does not 
-     *   recognize the feature name.
-     */
-    public void setFeature(String name, 
-                           boolean state)
-                           throws DOMException;
-
-    /**
-     * Query whether setting a feature to a specific value is supported.
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * @param name The feature name, which is a DOM has-feature style string.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @return <code>true</code> if the feature could be successfully set to 
-     *   the specified value, or <code>false</code> if the feature is not 
-     *   recognized or the requested value is not supported. The value of 
-     *   the feature itself is not changed.
-     */
-    public boolean canSetFeature(String name, 
-                                 boolean state);
-
-    /**
-     * Look up the value of a feature.
-     * <br>The feature name has the same form as a DOM hasFeature string
-     * @param name The feature name, which is a string with DOM has-feature 
-     *   syntax.
-     * @return The current state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_FOUND_ERR When the <code>DOMWriter</code> does not 
-     *   recognize the feature name.
-     */
-    public boolean getFeature(String name)
-                              throws DOMException;
-
-    /**
-     *  The character encoding in which the output will be written. 
-     * <br> The encoding to use when writing is determined as follows: If the 
-     * encoding attribute has been set, that value will be used.If the 
-     * encoding attribute is <code>null</code> or empty, but the item to be 
-     * written includes an encoding declaration, that value will be used.If 
-     * neither of the above provides an encoding name, a default encoding of 
-     * "UTF-8" will be used.
-     * <br>The default value is <code>null</code>.
-     */
-    public String getEncoding();
-    /**
-     *  The character encoding in which the output will be written. 
-     * <br> The encoding to use when writing is determined as follows: If the 
-     * encoding attribute has been set, that value will be used.If the 
-     * encoding attribute is <code>null</code> or empty, but the item to be 
-     * written includes an encoding declaration, that value will be used.If 
-     * neither of the above provides an encoding name, a default encoding of 
-     * "UTF-8" will be used.
-     * <br>The default value is <code>null</code>.
-     */
-    public void setEncoding(String encoding);
-
-    /**
-     *  The actual character encoding that was last used by this formatter. 
-     * This convenience method allows the encoding that was used when 
-     * serializing a document to be directly obtained. 
-     */
-    public String getLastEncoding();
-
-    /**
-     *  The end-of-line sequence of characters to be used in the XML being 
-     * written out. The only permitted values are these: 
-     * <dl>
-     * <dt><code>null</code></dt>
-     * <dd> 
-     * Use a 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  2.11 "End-of-Line 
-     * Handling". </dd>
-     * <dt>CR</dt>
-     * <dd>The carriage-return character (#xD).</dd>
-     * <dt>CR-LF</dt>
-     * <dd> The 
-     * carriage-return and line-feed characters (#xD #xA). </dd>
-     * <dt>LF</dt>
-     * <dd> The line-feed 
-     * character (#xA). </dd>
-     * </dl>
-     * <br>The default value for this attribute is <code>null</code>.
-     */
-    public String getNewLine();
-    /**
-     *  The end-of-line sequence of characters to be used in the XML being 
-     * written out. The only permitted values are these: 
-     * <dl>
-     * <dt><code>null</code></dt>
-     * <dd> 
-     * Use a 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  2.11 "End-of-Line 
-     * Handling". </dd>
-     * <dt>CR</dt>
-     * <dd>The carriage-return character (#xD).</dd>
-     * <dt>CR-LF</dt>
-     * <dd> The 
-     * carriage-return and line-feed characters (#xD #xA). </dd>
-     * <dt>LF</dt>
-     * <dd> The line-feed 
-     * character (#xA). </dd>
-     * </dl>
-     * <br>The default value for this attribute is <code>null</code>.
-     */
-    public void setNewLine(String newLine);
-
-    /**
-     *  The error handler that will receive error notifications during 
-     * serialization. The node where the error occured is passed to this 
-     * error handler, any modification to nodes from within an error 
-     * callback should be avoided since this will result in undefined, 
-     * implementation dependent behavior. 
-     */
-    public DOMErrorHandler getErrorHandler();
-    /**
-     *  The error handler that will receive error notifications during 
-     * serialization. The node where the error occured is passed to this 
-     * error handler, any modification to nodes from within an error 
-     * callback should be avoided since this will result in undefined, 
-     * implementation dependent behavior. 
-     */
-    public void setErrorHandler(DOMErrorHandler errorHandler);
-
-    /**
-     * Write out the specified node as described above in the description of 
-     * <code>DOMWriter</code>. Writing a Document or Entity node produces a 
-     * serialized form that is well formed XML. Writing other node types 
-     * produces a fragment of text in a form that is not fully defined by 
-     * this document, but that should be useful to a human for debugging or 
-     * diagnostic purposes. 
-     * @param destination The destination for the data to be written.
-     * @param wnode The <code>Document</code> or <code>Entity</code> node to 
-     *   be written. For other node types, something sensible should be 
-     *   written, but the exact serialized form is not specified.
-     * @return  Returns <code>true</code> if <code>node</code> was 
-     *   successfully serialized and <code>false</code> in case a failure 
-     *   occured and the failure wasn't canceled by the error handler. 
-     * @exception DOMSystemException
-     *   This exception will be raised in response to any sort of IO or system 
-     *   error that occurs while writing to the destination. It may wrap an 
-     *   underlying system exception.
-     */
-    public boolean writeNode(java.io.OutputStream destination, 
-                             Node wnode)
-                             throws Exception;
-
-    /**
-     *  Serialize the specified node as described above in the description of 
-     * <code>DOMWriter</code>. The result of serializing the node is 
-     * returned as a string. Writing a Document or Entity node produces a 
-     * serialized form that is well formed XML. Writing other node types 
-     * produces a fragment of text in a form that is not fully defined by 
-     * this document, but that should be useful to a human for debugging or 
-     * diagnostic purposes. 
-     * @param wnode  The node to be written. 
-     * @return  Returns the serialized data, or <code>null</code> in case a 
-     *   failure occured and the failure wasn't canceled by the error 
-     *   handler. 
-     * @exception DOMException
-     *    DOMSTRING_SIZE_ERR: The resulting string is too long to fit in a 
-     *   <code>DOMString</code>. 
-     */
-    public String writeToString(Node wnode)
-                                throws DOMException;
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DOMWriterFilter.java b/src/org/apache/xerces/dom3/ls/DOMWriterFilter.java
deleted file mode 100644
index d623dd0..0000000
--- a/src/org/apache/xerces/dom3/ls/DOMWriterFilter.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import org.w3c.dom.traversal.NodeFilter;
-
-/**
- *  <code>DOMWriterFilter</code>s provide applications the ability to examine 
- * nodes as they are being serialized. <code>DOMWriterFilter</code> lets the 
- * application decide what nodes should be serialized or not. 
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DOMWriterFilter extends NodeFilter {
-    /**
-     *  Tells the <code>DOMWriter</code> what types of nodes to show to the 
-     * filter. See <code>NodeFilter</code> for definition of the constants. 
-     * The constant <code>SHOW_ATTRIBUTE</code> is meaningless here, 
-     * attribute nodes will never be passed to a <code>DOMWriterFilter</code>
-     * . 
-     */
-    public int getWhatToShow();
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/DocumentLS.java b/src/org/apache/xerces/dom3/ls/DocumentLS.java
deleted file mode 100644
index d76c0da..0000000
--- a/src/org/apache/xerces/dom3/ls/DocumentLS.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.DOMException;
-
-/**
- * The DocumentLS interface provides a mechanism by which the content of a 
- * document can be replaced with the DOM tree produced when loading a URI, 
- * or parsing a string. The expectation is that an instance of the 
- * DocumentLS interface can be obtained by using binding-specific casting 
- * methods on an instance of the Document interface. 
- * <p>uses the default features.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface DocumentLS {
-    /**
-     * Indicates whether the method load should be synchronous or 
-     * asynchronous. When the async attribute is set to <code>true</code> 
-     * the load method returns control to the caller before the document has 
-     * completed loading. The default value of this property is 
-     * <code>false</code>.
-     * <br>Setting the value of this attribute might throw NOT_SUPPORTED_ERR 
-     * if the implementation doesn't support the mode the attribute is being 
-     * set to. Should the DOM spec define the default value of this 
-     * property? What if implementing both async and sync IO is impractical 
-     * in some systems?  2001-09-14. default is <code>false</code> but we 
-     * need to check with Mozilla and IE. 
-     */
-    public boolean getAsync();
-    /**
-     * Indicates whether the method load should be synchronous or 
-     * asynchronous. When the async attribute is set to <code>true</code> 
-     * the load method returns control to the caller before the document has 
-     * completed loading. The default value of this property is 
-     * <code>false</code>.
-     * <br>Setting the value of this attribute might throw NOT_SUPPORTED_ERR 
-     * if the implementation doesn't support the mode the attribute is being 
-     * set to. Should the DOM spec define the default value of this 
-     * property? What if implementing both async and sync IO is impractical 
-     * in some systems?  2001-09-14. default is <code>false</code> but we 
-     * need to check with Mozilla and IE. 
-     */
-    public void setAsync(boolean async);
-
-    /**
-     * If the document is currently being loaded as a result of the method 
-     * <code>load</code> being invoked the loading and parsing is 
-     * immediately aborted. The possibly partial result of parsing the 
-     * document is discarded and the document is cleared.
-     */
-    public void abort();
-
-    /**
-     * Replaces the content of the document with the result of parsing the 
-     * given URI. Invoking this method will either block the caller or 
-     * return to the caller immediately depending on the value of the async 
-     * attribute. Once the document is fully loaded the document will fire a 
-     * "load" event that the caller can register as a listener for. If an 
-     * error occurs the document will fire an "error" event so that the 
-     * caller knows that the load failed (see <code>ParseErrorEvent</code>).
-     * @param uri The URI reference for the XML file to be loaded. If this is 
-     *   a relative URI...
-     * @return If async is set to <code>true</code> <code>load</code> returns 
-     *   <code>true</code> if the document load was successfully initiated. 
-     *   If an error occurred when initiating the document load 
-     *   <code>load</code> returns <code>false</code>.If async is set to 
-     *   <code>false</code> <code>load</code> returns <code>true</code> if 
-     *   the document was successfully loaded and parsed. If an error 
-     *   occurred when either loading or parsing the URI <code>load</code> 
-     *   returns <code>false</code>.
-     */
-    public boolean load(String uri);
-
-    /**
-     * Replace the content of the document with the result of parsing the 
-     * input string, this method is always synchronous.
-     * @param source A string containing an XML document.
-     * @return <code>true</code> if parsing the input string succeeded 
-     *   without errors, otherwise <code>false</code>.
-     */
-    public boolean loadXML(String source);
-
-    /**
-     * Save the document or the given node to a string (i.e. serialize the 
-     * document or node).
-     * @param snode Specifies what to serialize, if this parameter is 
-     *   <code>null</code> the whole document is serialized, if it's 
-     *   non-null the given node is serialized.
-     * @return The serialized document or <code>null</code>.
-     * @exception DOMException
-     *   WRONG_DOCUMENT_ERR: Raised if the node passed in as the node 
-     *   parameter is from an other document.
-     */
-    public String saveXML(Node snode)
-                          throws DOMException;
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/LSLoadEvent.java b/src/org/apache/xerces/dom3/ls/LSLoadEvent.java
deleted file mode 100644
index 87ca617..0000000
--- a/src/org/apache/xerces/dom3/ls/LSLoadEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.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/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and 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 DOMInputSource getInputSource();
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/LSProgressEvent.java b/src/org/apache/xerces/dom3/ls/LSProgressEvent.java
deleted file mode 100644
index d419e60..0000000
--- a/src/org/apache/xerces/dom3/ls/LSProgressEvent.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.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. This event is 
- * optional and the rate at which this event is fired is implementation 
- * dependent.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface LSProgressEvent extends Event {
-    /**
-     * The input source that is being parsed.
-     */
-    public DOMInputSource getInputSource();
-
-    /**
-     * 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.
-     */
-    public int getTotalSize();
-
-}
diff --git a/src/org/apache/xerces/dom3/ls/ParseErrorEvent.java b/src/org/apache/xerces/dom3/ls/ParseErrorEvent.java
deleted file mode 100644
index 906d156..0000000
--- a/src/org/apache/xerces/dom3/ls/ParseErrorEvent.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2001 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.apache.xerces.dom3.ls;
-
-import org.w3c.dom.events.Event;
-import org.apache.xerces.dom3.DOMError;
-
-/**
- * ParseErrorEvent is the event that is fired if there's an error in the XML 
- * document being parsed.
- * <p>See also the <a href='http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20011025'>Document Object Model (DOM) Level 3 Abstract Schemas and Load
-and Save Specification</a>.
- */
-public interface ParseErrorEvent extends Event {
-    /**
-     * An non-zero implementation dependent error code describing the error, 
-     * or <code>0</code> if there is no error.
-     */
-    public DOMError getError();
-
-}
diff --git a/src/org/apache/xerces/impl/Constants.java b/src/org/apache/xerces/impl/Constants.java
deleted file mode 100644
index 7da112a..0000000
--- a/src/org/apache/xerces/impl/Constants.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-
-/**
- * Commonly used constants.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public final class Constants {
-
-    //
-    // Constants
-    //
-
-    // sax features
-
-    /** SAX feature prefix ("http://xml.org/sax/features/"). */
-    public static final String SAX_FEATURE_PREFIX = "http://xml.org/sax/features/";
-
-    /** Namespaces feature ("namespaces"). */
-    public static final String NAMESPACES_FEATURE = "namespaces";
-
-    /** Namespace prefixes feature ("namespace-prefixes"). */
-    public static final String NAMESPACE_PREFIXES_FEATURE = "namespace-prefixes";
-
-    /** String interning feature ("string-interning"). */
-    public static final String STRING_INTERNING_FEATURE = "string-interning";
-
-    /** Validation feature ("validation"). */
-    public static final String VALIDATION_FEATURE = "validation";
-
-    /** External general entities feature ("external-general-entities "). */
-    public static final String EXTERNAL_GENERAL_ENTITIES_FEATURE = "external-general-entities";
-
-    /** External parameter entities feature ("external-parameter-entities "). */
-    public static final String EXTERNAL_PARAMETER_ENTITIES_FEATURE = "external-parameter-entities";
-
-    // sax properties
-
-    /** SAX property prefix ("http://xml.org/sax/properties/"). */
-    public static final String SAX_PROPERTY_PREFIX = "http://xml.org/sax/properties/";
-
-    /** Declaration handler property ("declaration-handler"). */
-    public static final String DECLARATION_HANDLER_PROPERTY = "declaration-handler";
-
-    /** Lexical handler property ("lexical-handler"). */
-    public static final String LEXICAL_HANDLER_PROPERTY = "lexical-handler";
-
-    /** DOM node property ("dom-node"). */
-    public static final String DOM_NODE_PROPERTY = "dom-node";
-
-    /** XML string property ("xml-string"). */
-    public static final String XML_STRING_PROPERTY = "xml-string";
-
-    //
-    // DOM features
-    //
-
-    /** Comments feature ("include-comments"). */
-    public static final String INCLUDE_COMMENTS_FEATURE = "include-comments";
-
-    /** Create cdata nodes feature ("create-cdata-nodes"). */
-    public static final String CREATE_CDATA_NODES_FEATURE = "create-cdata-nodes";
-
-    // xerces features
-
-    /** Xerces features prefix ("http://apache.org/xml/features/"). */
-    public static final String XERCES_FEATURE_PREFIX = "http://apache.org/xml/features/";
-
-    /** Schema validation feature ("validation/schema"). */
-    public static final String SCHEMA_VALIDATION_FEATURE = "validation/schema";
-
-    /** Schema full constraint checking ("validation/schema-full-checking"). */
-    public static final String SCHEMA_FULL_CHECKING = "validation/schema-full-checking";
-
-    /** Dynamic validation feature ("validation/dynamic"). */
-    public static final String DYNAMIC_VALIDATION_FEATURE = "validation/dynamic";
-
-    /** Warn on duplicate attribute declaration feature ("validation/warn-on-duplicate-attdef"). */
-    public static final String WARN_ON_DUPLICATE_ATTDEF_FEATURE = "validation/warn-on-duplicate-attdef";
-
-    /** Warn on undeclared element feature ("validation/warn-on-undeclared-elemdef"). */
-    public static final String WARN_ON_UNDECLARED_ELEMDEF_FEATURE = "validation/warn-on-undeclared-elemdef";
-
-    /** Allow Java encoding names feature ("allow-java-encodings"). */
-    public static final String ALLOW_JAVA_ENCODINGS_FEATURE = "allow-java-encodings";
-
-    /** Continue after fatal error feature ("continue-after-fatal-error"). */
-    public static final String CONTINUE_AFTER_FATAL_ERROR_FEATURE = "continue-after-fatal-error";
-
-    /** Load dtd grammar when nonvalidating feature ("nonvalidating/load-dtd-grammar"). */
-    public static final String LOAD_DTD_GRAMMAR_FEATURE = "nonvalidating/load-dtd-grammar";
-
-    /** Load external dtd when nonvalidating feature ("nonvalidating/load-external-dtd"). */
-    public static final String LOAD_EXTERNAL_DTD_FEATURE = "nonvalidating/load-external-dtd";
-
-    /** Defer node expansion feature ("dom/defer-node-expansion"). */
-    //public static final String DEFER_NODE_EXPANSION_FEATURE = "dom/defer-node-expansion";
-
-    /** Create entity reference nodes feature ("dom/create-entity-ref-nodes"). */
-    public static final String CREATE_ENTITY_REF_NODES_FEATURE = "dom/create-entity-ref-nodes";
-
-    /** Include ignorable whitespace feature ("dom/include-ignorable-whitespace"). */
-    public static final String INCLUDE_IGNORABLE_WHITESPACE = "dom/include-ignorable-whitespace";
-
-    /** Default attribute values feature ("validation/default-attribute-values"). */
-    public static final String DEFAULT_ATTRIBUTE_VALUES_FEATURE = "validation/default-attribute-values";
-
-    /** Validate content models feature ("validation/validate-content-models"). */
-    public static final String VALIDATE_CONTENT_MODELS_FEATURE = "validation/validate-content-models";
-
-    /** Validate datatypes feature ("validation/validate-datatypes"). */
-    public static final String VALIDATE_DATATYPES_FEATURE = "validation/validate-datatypes";
-
-    /** Notify character references feature (scanner/notify-char-refs"). */
-    public static final String NOTIFY_CHAR_REFS_FEATURE = "scanner/notify-char-refs";
-
-    /** Notify built-in (&amp;amp;, etc.) references feature (scanner/notify-builtin-refs"). */
-    public static final String NOTIFY_BUILTIN_REFS_FEATURE = "scanner/notify-builtin-refs";
-
-    // xerces properties
-
-    /** Xerces properties prefix ("http://apache.org/xml/properties/"). */
-    public static final String XERCES_PROPERTY_PREFIX = "http://apache.org/xml/properties/";
-
-    /** Current element node property ("dom/current-element-node"). */
-    public static final String CURRENT_ELEMENT_NODE_PROPERTY = "dom/current-element-node";
-
-    /** Document class name property ("dom/document-class-name"). */
-    public static final String DOCUMENT_CLASS_NAME_PROPERTY = "dom/document-class-name";
-
-    /** Symbol table property ("internal/symbol-table"). */
-    public static final String SYMBOL_TABLE_PROPERTY = "internal/symbol-table";
-
-    /** Error reporter property ("internal/error-reporter"). */
-    public static final String ERROR_REPORTER_PROPERTY = "internal/error-reporter";
-
-    /** Error handler property ("internal/error-handler"). */
-    public static final String ERROR_HANDLER_PROPERTY = "internal/error-handler";
-
-    /** Entity manager property ("internal/entity-manager"). */
-    public static final String ENTITY_MANAGER_PROPERTY = "internal/entity-manager";
-
-    /** Entity resolver property ("internal/entity-resolver"). */
-    public static final String ENTITY_RESOLVER_PROPERTY = "internal/entity-resolver";
-
-    /** Grammar pool property ("internal/grammar-pool"). */
-    public static final String GRAMMAR_POOL_PROPERTY = "internal/grammar-pool";
-
-    /** Datatype validator factory ("internal/datatype-validator-factory"). */
-    public static final String DATATYPE_VALIDATOR_FACTORY_PROPERTY = "internal/datatype-validator-factory";
-
-    /** Document scanner property ("internal/document-scanner"). */
-    public static final String DOCUMENT_SCANNER_PROPERTY = "internal/document-scanner";
-
-    /** DTD scanner property ("internal/dtd-scanner"). */
-    public static final String DTD_SCANNER_PROPERTY = "internal/dtd-scanner";
-
-    /** Validator property ("internal/validator"). */
-    public static final String VALIDATOR_PROPERTY = "internal/validator";
-
-    /** Validator property ("internal/validator/dtd"). */
-    public static final String DTD_VALIDATOR_PROPERTY = "internal/validator/dtd";
-
-    /** Validator property ("internal/validator/schema"). */
-    public static final String SCHEMA_VALIDATOR_PROPERTY = "internal/validator/schema";
-
-    /** No namespace schema location property ("schema/external-schemaLocation"). */
-    public static final String SCHEMA_LOCATION = "schema/external-schemaLocation";
-
-    /** Schema location property ("schema/external-noNamespaceSchemaLocation"). */
-    public static final String SCHEMA_NONS_LOCATION = "schema/external-noNamespaceSchemaLocation";
-
-    /** Namespace binder property ("internal/namespace-binder"). */
-    public static final String NAMESPACE_BINDER_PROPERTY = "internal/namespace-binder";
-
-    /** Validation manager property ("internal/validation-manager"). */
-    public static final String VALIDATION_MANAGER_PROPERTY = "internal/validation-manager";
-
-    // private
-
-    /** SAX features. */
-    private static final String[] fgSAXFeatures = {
-        NAMESPACES_FEATURE,
-        NAMESPACE_PREFIXES_FEATURE,
-        STRING_INTERNING_FEATURE,
-        VALIDATION_FEATURE,
-        EXTERNAL_GENERAL_ENTITIES_FEATURE,
-        EXTERNAL_PARAMETER_ENTITIES_FEATURE,
-    };
-
-    /** SAX properties. */
-    private static final String[] fgSAXProperties = {
-        DECLARATION_HANDLER_PROPERTY,
-        LEXICAL_HANDLER_PROPERTY,
-        DOM_NODE_PROPERTY,
-        XML_STRING_PROPERTY,
-    };
-
-    /** Xerces features. */
-    private static final String[] fgXercesFeatures = {
-        SCHEMA_VALIDATION_FEATURE,
-        SCHEMA_FULL_CHECKING,
-        DYNAMIC_VALIDATION_FEATURE,
-        WARN_ON_DUPLICATE_ATTDEF_FEATURE,
-        WARN_ON_UNDECLARED_ELEMDEF_FEATURE,
-        ALLOW_JAVA_ENCODINGS_FEATURE,
-        CONTINUE_AFTER_FATAL_ERROR_FEATURE,
-        LOAD_DTD_GRAMMAR_FEATURE,
-        LOAD_EXTERNAL_DTD_FEATURE,
-        //DEFER_NODE_EXPANSION_FEATURE,
-        CREATE_ENTITY_REF_NODES_FEATURE,
-        INCLUDE_IGNORABLE_WHITESPACE,
-        //GRAMMAR_ACCESS_FEATURE,
-        DEFAULT_ATTRIBUTE_VALUES_FEATURE,
-        VALIDATE_CONTENT_MODELS_FEATURE,
-        VALIDATE_DATATYPES_FEATURE,
-        NOTIFY_CHAR_REFS_FEATURE
-    };
-
-    /** Xerces properties. */
-    private static final String[] fgXercesProperties = {
-        CURRENT_ELEMENT_NODE_PROPERTY,
-        DOCUMENT_CLASS_NAME_PROPERTY,
-        SYMBOL_TABLE_PROPERTY,
-        ERROR_HANDLER_PROPERTY,
-        ERROR_REPORTER_PROPERTY,
-        ENTITY_MANAGER_PROPERTY,
-        ENTITY_RESOLVER_PROPERTY,
-        GRAMMAR_POOL_PROPERTY,
-        DATATYPE_VALIDATOR_FACTORY_PROPERTY,
-        DOCUMENT_SCANNER_PROPERTY,
-        DTD_SCANNER_PROPERTY,
-        VALIDATOR_PROPERTY,
-        SCHEMA_LOCATION,
-        SCHEMA_NONS_LOCATION,
-        VALIDATION_MANAGER_PROPERTY
-    };
-
-    /** Empty enumeration. */
-    private static final Enumeration fgEmptyEnumeration = new ArrayEnumeration(new Object[] {});
-
-    //
-    // Constructors
-    //
-
-    /** This class cannot be instantiated. */
-    private Constants() {}
-
-    //
-    // Public methods
-    //
-
-    // sax
-
-    /** Returns an enumeration of the SAX features. */
-    public static Enumeration getSAXFeatures() {
-        return fgSAXFeatures.length > 0
-               ? new ArrayEnumeration(fgSAXFeatures) : fgEmptyEnumeration;
-    } // getSAXFeatures():Enumeration
-
-    /** Returns an enumeration of the SAX properties. */
-    public static Enumeration getSAXProperties() {
-        return fgSAXProperties.length > 0
-               ? new ArrayEnumeration(fgSAXProperties) : fgEmptyEnumeration;
-    } // getSAXProperties():Enumeration
-
-    // xerces
-
-    /** Returns an enumeration of the Xerces features. */
-    public static Enumeration getXercesFeatures() {
-        return fgXercesFeatures.length > 0
-               ? new ArrayEnumeration(fgXercesFeatures) : fgEmptyEnumeration;
-    } // getXercesFeatures():Enumeration
-
-    /** Returns an enumeration of the Xerces properties. */
-    public static Enumeration getXercesProperties() {
-        return fgXercesProperties.length > 0
-               ? new ArrayEnumeration(fgXercesProperties) : fgEmptyEnumeration;
-    } // getXercesProperties():Enumeration
-
-    //
-    // Classes
-    //
-
-    /**
-     * An array enumeration.
-     *
-     * @author Andy Clark, IBM
-     */
-    static class ArrayEnumeration
-        implements Enumeration {
-
-        //
-        // Data
-        //
-
-        /** Array. */
-        private Object[] array;
-
-        /** Index. */
-        private int index;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs an array enumeration. */
-        public ArrayEnumeration(Object[] array) {
-            this.array = array;
-        } // <init>(Object[])
-
-        //
-        // Enumeration methods
-        //
-
-        /**
-         * Tests if this enumeration contains more elements.
-         *
-         * @return  <code>true</code> if this enumeration contains more elements;
-         *          <code>false</code> otherwise.
-         * @since   JDK1.0
-         */
-        public boolean hasMoreElements() {
-            return index < array.length;
-        } // hasMoreElement():boolean
-
-        /**
-         * Returns the next element of this enumeration.
-         *
-         * @return     the next element of this enumeration.
-         * @exception  NoSuchElementException  if no more elements exist.
-         * @since      JDK1.0
-         */
-        public Object nextElement() {
-            if (index < array.length) {
-                return array[index++];
-            }
-            throw new NoSuchElementException();
-        } // nextElement():Object
-
-    } // class ArrayEnumeration
-
-    //
-    // MAIN
-    //
-
-    /** Prints all of the constants to standard output. */
-    public static void main(String[] argv) {
-
-        print("SAX features:", SAX_FEATURE_PREFIX, fgSAXFeatures);
-        print("SAX properties:", SAX_PROPERTY_PREFIX, fgSAXProperties);
-        print("Xerces features:", XERCES_FEATURE_PREFIX, fgXercesFeatures);
-        print("Xerces properties:", XERCES_PROPERTY_PREFIX, fgXercesProperties);
-
-    } // main(String[])
-
-    /** Prints a list of features/properties. */
-    private static void print(String header, String prefix, Object[] array) {
-        System.out.print(header);
-        if (array.length > 0) {
-            System.out.println();
-            for (int i = 0; i < array.length; i++) {
-                System.out.print("  ");
-                System.out.print(prefix);
-                System.out.println(array[i]);
-            }
-        }
-        else {
-            System.out.println(" none.");
-        }
-    } // print(String,String,Object[])
-
-} // class Constants
diff --git a/src/org/apache/xerces/impl/Version.java b/src/org/apache/xerces/impl/Version.java
deleted file mode 100644
index 65aad04..0000000
--- a/src/org/apache/xerces/impl/Version.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-/**
- * This class defines the version number of the parser.
- *
- * @version $Id$
- */
-public class Version {
-
-    //
-    // Data
-    //
-
-    /** Version string. */
-    public static String fVersion = "@@VERSION@@";
-
-    //
-    // MAIN
-    //
-
-    /**
-     * Prints out the version number to System.out. This is needed
-     * for the build system.
-     */
-    public static void main(String argv[]) {
-        System.out.println(fVersion);
-    }
-
-} // class Version
diff --git a/src/org/apache/xerces/impl/XMLDTDScannerImpl.java b/src/org/apache/xerces/impl/XMLDTDScannerImpl.java
deleted file mode 100644
index 60966c1..0000000
--- a/src/org/apache/xerces/impl/XMLDTDScannerImpl.java
+++ /dev/null
@@ -1,1949 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.io.IOException;
-import java.io.EOFException;
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.XMLEntityManager;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-
-import org.apache.xerces.util.XMLAttributesImpl;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.util.XMLStringBuffer;
-import org.apache.xerces.util.SymbolTable;
-
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLDTDScanner;
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-/**
- * This class is responsible for scanning the declarations found
- * in the internal and external subsets of a DTD in an XML document.
- * The scanner acts as the sources for the DTD information which is 
- * communicated to the DTD handlers.
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/validation</li>
- *  <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *  <li>http://apache.org/xml/properties/internal/entity-manager</li>
- * </ul>
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- * @author Glenn Marcy, IBM
- * @author Eric Ye, IBM
- *
- * @version $Id$
- */
-public class XMLDTDScannerImpl
-    extends XMLScanner
-    implements XMLDTDScanner, XMLComponent, XMLEntityHandler {
-
-    //
-    // Constants
-    //
-
-    // scanner states
-
-    /** Scanner state: end of input. */
-    protected static final int SCANNER_STATE_END_OF_INPUT = 0;
-
-    /** Scanner state: text declaration. */
-    protected static final int SCANNER_STATE_TEXT_DECL = 1;
-
-    /** Scanner state: markup declaration. */
-    protected static final int SCANNER_STATE_MARKUP_DECL = 2;
-
-    // recognized features and properties
-    
-    /** Recognized features. */
-    private static final String[] RECOGNIZED_FEATURES = {
-        VALIDATION,
-        NOTIFY_CHAR_REFS,
-    };
-
-    /** Recognized properties. */
-    private static final String[] RECOGNIZED_PROPERTIES = {
-        SYMBOL_TABLE,
-        ERROR_REPORTER,
-        ENTITY_MANAGER,
-    };
-
-    // debugging
-
-    /** Debug scanner state. */
-    private static final boolean DEBUG_SCANNER_STATE = false;
-
-    //
-    // Data
-    //
-
-    // handlers
-
-    /** DTD handler. */
-    protected XMLDTDHandler fDTDHandler;
-
-    /** DTD content model handler. */
-    protected XMLDTDContentModelHandler fDTDContentModelHandler;
-
-    // state
-
-    /** Scanner state. */
-    protected int fScannerState;
-
-    /** Standalone. */
-    protected boolean fStandalone;
-
-    /** Seen external DTD. */
-    protected boolean fSeenExternalDTD;
-
-    /** Seen external parameter entity. */
-    protected boolean fSeenExternalPE;
-
-    /** Report entity boundary. */
-    protected boolean fReportEntity;
-
-    // private data
-
-    /** Start DTD called. */
-    private boolean fStartDTDCalled;
-
-    /** Default attribute */
-    private XMLAttributesImpl fAttributes = new XMLAttributesImpl();
-
-    /** 
-     * Stack of content operators (either '|' or ',') in children 
-     * content.
-     */
-    private int[] fContentStack = new int[5];
-
-    /** Size of content stack. */
-    private int fContentDepth;
-
-    /** Parameter entity stack to check well-formedness. */
-    private int[] fPEStack = new int[5];
-
-
-    /** Parameter entity stack to report start/end entity calls. */
-    private boolean[] fPEReport = new boolean[5];
-
-    /** Number of opened parameter entities. */
-    private int fPEDepth;
-
-    /** Markup depth. */
-    private int fMarkUpDepth;
-
-    /** Number of opened external entities. */
-    private int fExtEntityDepth;
-
-    /** Number of opened include sections. */
-    private int fIncludeSectDepth;
-
-    // temporary variables
-
-    /** Array of 3 strings. */
-    private String[] fStrings = new String[3];
-
-    /** String. */
-    private XMLString fString = new XMLString();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer = new XMLStringBuffer();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer();
-
-    /** Literal text. */
-    private XMLString fLiteral = new XMLString();
-
-    /** Literal text. */
-    private XMLString fLiteral2 = new XMLString();
-
-    /** Enumeration values. */
-    private String[] fEnumeration = new String[5];
-
-    /** Enumeration values count. */
-    private int fEnumerationCount;
-
-    /** Ignore conditional section buffer. */
-    private XMLStringBuffer fIgnoreConditionalBuffer = new XMLStringBuffer(128);
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLDTDScannerImpl() {} // <init>()
-
-    //
-    // XMLDTDScanner methods
-    //
-
-    /** 
-     * Sets the input source. 
-     *
-     * @param inputSource The input source.
-     *
-     * @throws IOException Thrown on i/o error.
-     */
-    public void setInputSource(XMLInputSource inputSource) throws IOException {
-        fEntityManager.setEntityHandler(this);
-        fEntityManager.startDTDEntity(inputSource);
-    } // setInputSource(XMLInputSource)
-
-    /**
-     * Scans the external subset of the document.
-     *
-     * @param complete True if the scanner should scan the document
-     *                 completely, pushing all events to the registered
-     *                 document handler. A value of false indicates that
-     *                 that the scanner should only scan the next portion
-     *                 of the document and return. A scanner instance is
-     *                 permitted to completely scan a document if it does
-     *                 not support this "pull" scanning model.
-     *
-     * @returns True if there is more to scan, false otherwise.
-     */
-    public boolean scanDTDExternalSubset(boolean complete) 
-        throws IOException, XNIException {
-
-        fEntityManager.setEntityHandler(this);
-        if (fScannerState == SCANNER_STATE_TEXT_DECL) {
-            fSeenExternalDTD = true;
-            boolean textDecl = scanTextDecl();
-            if (fScannerState == SCANNER_STATE_END_OF_INPUT) {
-                return false;
-            }
-            else {
-                // next state is markup decls regardless of whether there
-                // is a TextDecl or not
-                setScannerState(SCANNER_STATE_MARKUP_DECL);
-                if (textDecl && !complete) {
-                    return true;
-                }
-            }
-        }
-        // keep dispatching "events"
-        do {
-            if (!scanDecls(complete)) {
-                return false;
-            }
-        } while (complete);
-
-        // return that there is more to scan
-        return true;
-
-    } // scanDTDExternalSubset(boolean):boolean
-
-    /** 
-     * Scans the internal subset of the document.
-     *
-     * @param complete True if the scanner should scan the document
-     *                 completely, pushing all events to the registered
-     *                 document handler. A value of false indicates that
-     *                 that the scanner should only scan the next portion
-     *                 of the document and return. A scanner instance is
-     *                 permitted to completely scan a document if it does
-     *                 not support this "pull" scanning model.
-     * @param standalone True if the document was specified as standalone.
-     *                   This value is important for verifying certain
-     *                   well-formedness constraints.
-     * @param hasExternalDTD True if the document has an external DTD.
-     *                       This allows the scanner to properly notify
-     *                       the handler of the end of the DTD in the
-     *                       absence of an external subset.
-     *
-     * @returns True if there is more to scan, false otherwise.
-     */
-    public boolean scanDTDInternalSubset(boolean complete, boolean standalone,
-                                         boolean hasExternalSubset)
-        throws IOException, XNIException {
-
-        fEntityManager.setEntityHandler(this);
-        fStandalone = standalone;
-        if (fScannerState == SCANNER_STATE_TEXT_DECL) {
-            // call handler
-            if (fDTDHandler != null) {
-                fDTDHandler.startDTD(fEntityScanner);
-                fStartDTDCalled = true;
-            }
-            // set starting state for internal subset
-            setScannerState(SCANNER_STATE_MARKUP_DECL);
-        }
-        // keep dispatching "events"
-        do {
-            if (!scanDecls(complete)) {
-                // call handler
-                if (fDTDHandler != null && hasExternalSubset == false) {
-                    fDTDHandler.endDTD();
-                }
-                // we're done, set starting state for external subset
-                setScannerState(SCANNER_STATE_TEXT_DECL);
-                return false;
-            }
-        } while (complete);
-
-        // return that there is more to scan
-        return true;
-
-    } // scanDTDInternalSubset(boolean,boolean,boolean):boolean
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * reset
-     * 
-     * @param componentManager 
-     */
-    public void reset(XMLComponentManager componentManager)
-        throws XMLConfigurationException {
-        
-        super.reset(componentManager);
-
-        // reset state related data
-        fStartDTDCalled = false;
-        fExtEntityDepth = 0;
-        fIncludeSectDepth = 0;
-        fMarkUpDepth = 0;
-        fPEDepth = 0;
-
-        fStandalone = false;
-        fSeenExternalDTD = false;
-        fSeenExternalPE = false;
-
-        fReportEntity = true;
-
-        // set starting state
-        setScannerState(SCANNER_STATE_TEXT_DECL);
-
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    //
-    // XMLDTDSource methods
-    //
-
-    /**
-     * setDTDHandler
-     * 
-     * @param dtdHandler 
-     */
-    public void setDTDHandler(XMLDTDHandler dtdHandler) {
-        fDTDHandler = dtdHandler;
-    } // setDTDHandler
-
-    //
-    // XMLDTDContentModelSource methods
-    //
-
-    /**
-     * setDTDContentModelHandler
-     * 
-     * @param dtdContentModelHandler 
-     */
-    public void setDTDContentModelHandler(XMLDTDContentModelHandler
-                                          dtdContentModelHandler) {
-        fDTDContentModelHandler = dtdContentModelHandler;
-    } // setDTDContentModelHandler
-
-    //
-    // XMLEntityHandler methods
-    //
-
-    /**
-     * startEntity
-     * 
-     * @param name 
-     * @param publicId 
-     * @param systemId 
-     * @param encoding
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-
-        super.startEntity(name, publicId, systemId, baseSystemId, encoding);
-
-        if (name.equals("[dtd]")) {
-            // call handler
-            if (fDTDHandler != null && fStartDTDCalled == false) {
-                fDTDHandler.startDTD(fEntityScanner);
-            }
-            fExtEntityDepth++;
-        }
-        else if (name.charAt(0) == '%') {
-            pushPEStack(fMarkUpDepth, fReportEntity);
-            if (fEntityScanner.isExternal()) {
-                fExtEntityDepth++;
-            }
-        }
-
-        // call handler
-        if (fDTDHandler != null && fReportEntity) {
-            fDTDHandler.startEntity(name, publicId, systemId, 
-                                    baseSystemId, encoding);
-        }
-
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * endEntity
-     * 
-     * @param name 
-     */
-    public void endEntity(String name) throws XNIException {
-
-        super.endEntity(name);
-
-        // Handle end of PE
-        boolean reportEntity = fReportEntity;
-        if (name.startsWith("%")) {
-            reportEntity = peekReportEntity();
-            // check well-formedness of the enity
-            int startMarkUpDepth = popPEStack();
-            if (startMarkUpDepth != fMarkUpDepth) {
-                reportEntity = false;
-                if (fValidation) {
-                // Proper nesting of parameter entities is a Validity Constraint
-                // and must not be enforced when validation is off
-                // REVISIT: Should this be a fatal error? -Ac
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                           "ImproperDeclarationNesting",
-                                           new Object[]{ name },
-                                           XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-            if (fEntityScanner.isExternal()) {
-                fExtEntityDepth--;
-            }
-        }
-
-        // call handler
-        if (fDTDHandler != null && reportEntity) {
-            fDTDHandler.endEntity(name);
-        }
-
-        // end DTD
-        if (name.equals("[dtd]")) {
-            if (fIncludeSectDepth != 0) {
-                reportFatalError("IncludeSectUnterminated", null);
-            }
-            fScannerState = SCANNER_STATE_END_OF_INPUT;
-            // call handler
-            if (fDTDHandler != null) {
-                fDTDHandler.endDTD();
-            }
-            fExtEntityDepth--;
-        }
-
-    } // endEntity(String)
-
-    // helper methods
-
-    /**
-     * Sets the scanner state.
-     *
-     * @param state The new scanner state.
-     */
-    protected final void setScannerState(int state) {
-
-        fScannerState = state;
-        if (DEBUG_SCANNER_STATE) {
-            System.out.print("### setScannerState: ");
-            System.out.print(getScannerStateName(state));
-            System.out.println();
-        }
-
-    } // setScannerState(int)
-
-    //
-    // Private methods
-    //
-
-    /** Returns the scanner state name. */
-    private static String getScannerStateName(int state) {
-
-        if (DEBUG_SCANNER_STATE) {
-            switch (state) {
-                case SCANNER_STATE_END_OF_INPUT: return "SCANNER_STATE_END_OF_INPUT";
-                case SCANNER_STATE_TEXT_DECL: return "SCANNER_STATE_TEXT_DECL";
-                case SCANNER_STATE_MARKUP_DECL: return "SCANNER_STATE_MARKUP_DECL";
-            }
-        }
-
-        return "??? ("+state+')';
-
-    } // getScannerStateName(int):String
-
-    protected final boolean scanningInternalSubset() {
-        return fExtEntityDepth == 0;
-    }
-
-    /**
-     * start a parameter entity dealing with the textdecl if there is any
-     *
-     * @param name The name of the parameter entity to start (without the '%')
-     * @param literal Whether this is happening within a literal
-     */
-    protected void startPE(String name, boolean literal) 
-        throws IOException, XNIException {
-        int depth = fPEDepth;
-        if (fValidation && !fEntityManager.isDeclaredEntity("%"+name)) {
-            fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,"EntityNotDeclared", 
-                                        new Object[]{name}, XMLErrorReporter.SEVERITY_ERROR);
-        }
-        fEntityManager.startEntity(fSymbolTable.addSymbol("%" + name),
-                                   literal);
-        // if we actually got a new entity and it's external
-        // parse text decl if there is any
-        if (depth != fPEDepth && fEntityScanner.isExternal()) {
-            scanTextDecl();
-        }
-    }
-
-    /** 
-     * Dispatch an XML "event".
-     *
-     * @param complete True if this method is intended to scan
-     *                 and dispatch as much as possible.                 
-     *
-     * @returns True if a TextDecl was scanned.
-     *
-     * @throws IOException  Thrown on i/o error.
-     * @throws XNIException Thrown on parse error.
-     *
-     */
-    protected final boolean scanTextDecl() 
-        throws IOException, XNIException {
-
-        // scan XMLDecl
-        boolean textDecl = false;
-        if (fEntityScanner.skipString("<?xml")) {
-            fMarkUpDepth++;
-            // NOTE: special case where document starts with a PI
-            //       whose name starts with "xml" (e.g. "xmlfoo")
-            if (XMLChar.isName(fEntityScanner.peekChar())) {
-                fStringBuffer.clear();
-                fStringBuffer.append("xml");
-                while (XMLChar.isName(fEntityScanner.peekChar())) {
-                    fStringBuffer.append((char)fEntityScanner.scanChar());
-                }
-                String target =
-                    fSymbolTable.addSymbol(fStringBuffer.ch,
-                                           fStringBuffer.offset,
-                                           fStringBuffer.length);
-                scanPIData(target, fString);
-            }
-
-            // standard Text declaration
-            else {
-                // pseudo-attribute values
-                String version = null;
-                String encoding = null;
-
-                scanXMLDeclOrTextDecl(true, fStrings);
-                textDecl = true;
-                fMarkUpDepth--;
-
-                version = fStrings[0];
-                encoding = fStrings[1];
-
-                fEntityScanner.setEncoding(encoding);
-
-                // call handler
-                if (fDTDHandler != null) {
-                    fDTDHandler.textDecl(version, encoding);
-                }
-            }
-        }
-
-        return textDecl;
-    
-    } // scanTextDecl(boolean):boolean
-
-    /**
-     * Scans a processing data. This is needed to handle the situation
-     * where a document starts with a processing instruction whose 
-     * target name <em>starts with</em> "xml". (e.g. xmlfoo)
-     *
-     * @param target The PI target
-     * @param data The string to fill in with the data
-     */
-    protected final void scanPIData(String target, XMLString data) 
-        throws IOException, XNIException {
-
-        super.scanPIData(target, data);
-        fMarkUpDepth--;
-
-        // call handler
-        if (fDTDHandler != null) {
-            fDTDHandler.processingInstruction(target, data);
-        }
-
-    } // scanPIData(String)
-
-    /**
-     * Scans a comment.
-     * <p>
-     * <pre>
-     * [15] Comment ::= '&lt!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!--'
-     */
-    protected final void scanComment() throws IOException, XNIException {
-
-        scanComment(fStringBuffer);
-        fMarkUpDepth--;
-
-        // call handler
-        if (fDTDHandler != null) {
-            fDTDHandler.comment(fStringBuffer);
-        }
-
-    } // scanComment()
-
-    /**
-     * Scans an element declaration
-     * <p>
-     * <pre>
-     * [45]    elementdecl    ::=    '&lt;!ELEMENT' S Name S contentspec S? '>'
-     * [46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children  
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!ELEMENT'
-     */
-    protected final void scanElementDecl() throws IOException, XNIException {
-
-        // spaces
-        fReportEntity = false;
-        if (!skipSeparator(true, !scanningInternalSubset())) {
-            reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL",
-                             null);
-        }
-
-        // element name
-        String name = fEntityScanner.scanName();
-        if (name == null) {
-            reportFatalError("MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL",
-                             null);
-        }
-
-        // spaces
-        if (!skipSeparator(true, !scanningInternalSubset())) {
-            reportFatalError("MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL",
-                             new Object[]{name});
-        }
-
-        // content model
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.startContentModel(name);
-        }
-        String contentModel = null;
-        fReportEntity = true;
-        if (fEntityScanner.skipString("EMPTY")) {
-            contentModel = "EMPTY";
-            // call handler
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.empty();
-            }
-        }
-        else if (fEntityScanner.skipString("ANY")) {
-            contentModel = "ANY";
-            // call handler
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.any();
-            }
-        }
-        else {
-            if (!fEntityScanner.skipChar('(')) {
-                reportFatalError("MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN",
-                                 new Object[]{name});
-            }
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.startGroup();
-            }
-            fStringBuffer.clear();
-            fStringBuffer.append('(');
-            fMarkUpDepth++;
-            skipSeparator(false, !scanningInternalSubset());
-
-            // Mixed content model
-            if (fEntityScanner.skipString("#PCDATA")) {
-                scanMixed(name);
-            }
-            else {              // children content
-                scanChildren(name);
-            }
-            contentModel = fStringBuffer.toString();
-        }
-
-        // call handler
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.endContentModel();
-        }
-
-        fReportEntity = false;
-        skipSeparator(false, !scanningInternalSubset());
-        // end
-        if (!fEntityScanner.skipChar('>')) {
-            reportFatalError("ElementDeclUnterminated", new Object[]{name});
-        }
-        fReportEntity = true;
-        fMarkUpDepth--;
-        
-        // call handler
-        if (fDTDHandler != null) {
-            fDTDHandler.elementDecl(name, contentModel);
-        }
-
-    } // scanElementDecl()
-
-    /**
-     * scan Mixed content model
-     * This assumes the content model has been parsed up to #PCDATA and
-     * can simply append to fStringBuffer.
-     * <pre>
-     * [51]    Mixed    ::=    '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'  
-     *                       | '(' S? '#PCDATA' S? ')'  
-     * </pre>
-     *
-     * @param elName The element type name this declaration is about.
-     *
-     * <strong>Note:</strong> Called after scanning past '(#PCDATA'.
-     */
-    private final void scanMixed(String elName)
-        throws IOException, XNIException {
-
-        String childName = null;
-
-        fStringBuffer.append("#PCDATA");
-        // call handler
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.pcdata();
-        }
-        skipSeparator(false, !scanningInternalSubset());
-        while (fEntityScanner.skipChar('|')) {
-            fStringBuffer.append('|');
-            // call handler
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.separator(XMLDTDContentModelHandler.SEPARATOR_CHOICE);
-            }
-            skipSeparator(false, !scanningInternalSubset());
-
-            childName = fEntityScanner.scanName();
-            if (childName == null) {
-                reportFatalError("MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT",
-                                 new Object[]{elName});
-            }
-            fStringBuffer.append(childName);
-            // call handler
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.element(childName);
-            }
-            skipSeparator(false, !scanningInternalSubset());
-        }
-        // The following check must be done in a single call (as opposed to one
-        // for ')' and then one for '*') to guarantee that callbacks are
-        // properly nested. We do not want to trigger endEntity too early in
-        // case we cross the boundary of an entity between the two characters.
-        if (fEntityScanner.skipString(")*")) {
-            fStringBuffer.append(")*");
-            // call handler
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.endGroup();
-                fDTDContentModelHandler.occurrence(XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE);
-            }
-        }
-        else if (childName != null) {
-            reportFatalError("MixedContentUnterminated",
-                             new Object[]{elName});
-        }
-        else if (fEntityScanner.skipChar(')')){
-            fStringBuffer.append(')');
-            // call handler
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.endGroup();
-            }
-        }
-        else {
-            reportFatalError("MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN",
-                             new Object[]{elName});
-        }
-        fMarkUpDepth--;
-        // we are done
-    }
-
-    /**
-     * scan children content model
-     * This assumes it can simply append to fStringBuffer.
-     * <pre>
-     * [47]    children  ::=    (choice | seq) ('?' | '*' | '+')? 
-     * [48]    cp        ::=    (Name | choice | seq) ('?' | '*' | '+')? 
-     * [49]    choice    ::=    '(' S? cp ( S? '|' S? cp )+ S? ')'
-     * [50]    seq       ::=    '(' S? cp ( S? ',' S? cp )* S? ')' 
-     * </pre>
-     *
-     * @param elName The element type name this declaration is about.
-     *
-     * <strong>Note:</strong> Called after scanning past the first open
-     * paranthesis.
-     */
-    private final void scanChildren(String elName)
-        throws IOException, XNIException {
-
-        fContentDepth = 0;
-        pushContentStack(0);
-        int currentOp = 0;
-        int c;
-        while (true) {
-            if (fEntityScanner.skipChar('(')) {
-                fMarkUpDepth++;
-                fStringBuffer.append('(');
-                // call handler
-                if (fDTDContentModelHandler != null) {
-                    fDTDContentModelHandler.startGroup();
-                }
-                // push current op on stack and reset it
-                pushContentStack(currentOp);
-                currentOp = 0;
-                skipSeparator(false, !scanningInternalSubset());
-                continue;
-            }
-            skipSeparator(false, !scanningInternalSubset());
-            String childName = fEntityScanner.scanName();
-            if (childName == null) {
-                reportFatalError("MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN",
-                                 new Object[]{elName});
-                return;
-            }
-            // call handler
-            if (fDTDContentModelHandler != null) {
-                fDTDContentModelHandler.element(childName);
-            }
-            fStringBuffer.append(childName);
-            c = fEntityScanner.peekChar();
-            if (c == '?' || c == '*' || c == '+') {
-                // call handler
-                if (fDTDContentModelHandler != null) {
-                    short oc;
-                    if (c == '?') {
-                        oc = XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE;
-                    }
-                    else if (c == '*') {
-                        oc = XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE;
-                    }
-                    else {
-                        oc = XMLDTDContentModelHandler.OCCURS_ONE_OR_MORE;
-                    }
-                    fDTDContentModelHandler.occurrence(oc);
-                }
-                fEntityScanner.scanChar();
-                fStringBuffer.append((char)c);
-            }
-            while (true) {
-                skipSeparator(false, !scanningInternalSubset());
-                c = fEntityScanner.peekChar();
-                if (c == ',' && currentOp != '|') {
-                    currentOp = c;
-                    // call handler
-                    if (fDTDContentModelHandler != null) {
-                        fDTDContentModelHandler.separator(XMLDTDContentModelHandler.SEPARATOR_SEQUENCE);
-                    }
-                    fEntityScanner.scanChar();
-                    fStringBuffer.append(',');
-                    break;
-                }
-                else if (c == '|' && currentOp != ',') {
-                    currentOp = c;
-                    // call handler
-                    if (fDTDContentModelHandler != null) {
-                        fDTDContentModelHandler.separator(XMLDTDContentModelHandler.SEPARATOR_CHOICE);
-                    }
-                    fEntityScanner.scanChar();
-                    fStringBuffer.append('|');
-                    break;
-                }
-                else if (c != ')') {
-                    reportFatalError("MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN",
-                                     new Object[]{elName});
-                }
-                // call handler
-                if (fDTDContentModelHandler != null) {
-                    fDTDContentModelHandler.endGroup();
-                }
-                // restore previous op
-                currentOp = popContentStack();
-                short oc;
-                // The following checks must be done in a single call (as
-                // opposed to one for ')' and then one for '?', '*', and '+')
-                // to guarantee that callbacks are properly nested. We do not
-                // want to trigger endEntity too early in case we cross the
-                // boundary of an entity between the two characters.
-                if (fEntityScanner.skipString(")?")) {
-                    fStringBuffer.append(")?");
-                    // call handler
-                    if (fDTDContentModelHandler != null) {
-                        oc = XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE;
-                        fDTDContentModelHandler.occurrence(oc);
-                    }
-                }
-                else if (fEntityScanner.skipString(")+")) {
-                    fStringBuffer.append(")+");
-                    // call handler
-                    if (fDTDContentModelHandler != null) {
-                        oc = XMLDTDContentModelHandler.OCCURS_ONE_OR_MORE;
-                        fDTDContentModelHandler.occurrence(oc);
-                    }
-                }
-                else if (fEntityScanner.skipString(")*")) {
-                    fStringBuffer.append(")*");
-                    // call handler
-                    if (fDTDContentModelHandler != null) {
-                        oc = XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE;
-                        fDTDContentModelHandler.occurrence(oc);
-                    }
-                }
-                else {
-                    // no occurrence specified
-                    fEntityScanner.scanChar();
-                    fStringBuffer.append(')');
-                }
-                fMarkUpDepth--;
-                if (fContentDepth == 0) {
-                    return;
-                }
-            }
-            skipSeparator(false, !scanningInternalSubset());
-        }
-    }
-
-    /**
-     * Scans an attlist declaration
-     * <p>
-     * <pre>
-     * [52]  AttlistDecl    ::=   '&lt;!ATTLIST' S Name AttDef* S? '>' 
-     * [53]  AttDef         ::=   S Name S AttType S DefaultDecl 
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!ATTLIST'
-     */
-    protected final void scanAttlistDecl() throws IOException, XNIException {
-
-        // spaces
-        fReportEntity = false;
-        if (!skipSeparator(true, !scanningInternalSubset())) {
-            reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL",
-                             null);
-        }
-
-        // element name
-        String elName = fEntityScanner.scanName();
-        if (elName == null) {
-            reportFatalError("MSG_ELEMENT_TYPE_REQUIRED_IN_ATTLISTDECL",
-                             null);
-        }
-
-        // call handler
-        if (fDTDHandler != null) {
-            fDTDHandler.startAttlist(elName);
-        }
-
-        // spaces
-        if (!skipSeparator(true, !scanningInternalSubset())) {
-            // no space, is it the end yet?
-            if (fEntityScanner.skipChar('>')) {
-                // yes, stop here
-                // call handler
-                if (fDTDHandler != null) {
-                    fDTDHandler.endAttlist();
-                }
-                fMarkUpDepth--;
-                return;
-            }
-            else {
-                reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ATTRIBUTE_NAME_IN_ATTDEF",
-                                 new Object[]{elName});
-            }
-        }
-
-        // definitions
-        while (!fEntityScanner.skipChar('>')) {
-            String name = fEntityScanner.scanName();
-            if (name == null) {
-                reportFatalError("AttNameRequiredInAttDef",
-                                 new Object[]{elName}); 
-            }
-            // spaces
-            if (!skipSeparator(true, !scanningInternalSubset())) {
-                reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ATTTYPE_IN_ATTDEF",
-                                 new Object[]{elName, name});
-            }
-            // type
-            String type = scanAttType(elName, name);
-
-            // spaces
-            if (!skipSeparator(true, !scanningInternalSubset())) {
-                reportFatalError("MSG_SPACE_REQUIRED_BEFORE_DEFAULTDECL_IN_ATTDEF",
-                                 new Object[]{elName, name}); 
-            }
-
-            // default decl
-            String defaultType = scanAttDefaultDecl(elName, name,
-                                                    type, 
-                                                    fLiteral, fLiteral2);
-            // REVISIT: Should we do anything with the non-normalized
-            //          default attribute value? -Ac
-
-            // call handler
-            if (fDTDHandler != null) {
-                String[] enum = null;
-                if (fEnumerationCount != 0) {
-                    enum = new String[fEnumerationCount];
-                    System.arraycopy(fEnumeration, 0, enum,
-                                     0, fEnumerationCount);
-                }
-                // Determine whether the default value to be passed should be null. 
-                // REVISIT: should probably check whether fLiteral.ch is null instead. LM.
-                if (defaultType!=null && (defaultType.equals("#REQUIRED") || 
-                                          defaultType.equals("#IMPLIED"))) {
-                  fDTDHandler.attributeDecl(elName, name, type, enum,
-                                           defaultType, null);
-                }
-                else {
-                  fDTDHandler.attributeDecl(elName, name, type, enum,
-                                           defaultType, fLiteral);
-                }
-            }
-            skipSeparator(false, !scanningInternalSubset());
-        }
-
-        // call handler
-        if (fDTDHandler != null) {
-            fDTDHandler.endAttlist();
-        }
-        fMarkUpDepth--;
-        fReportEntity = true;
-
-    } // scanAttlistDecl()
-
-    /**
-     * Scans an attribute type definition
-     * <p>
-     * <pre>
-     * [54]  AttType        ::=   StringType | TokenizedType | EnumeratedType  
-     * [55]  StringType     ::=   'CDATA' 
-     * [56]  TokenizedType  ::=   'ID'
-     *                          | 'IDREF'
-     *                          | 'IDREFS'
-     *                          | 'ENTITY'
-     *                          | 'ENTITIES'
-     *                          | 'NMTOKEN'
-     *                          | 'NMTOKENS'
-     * [57]  EnumeratedType ::=    NotationType | Enumeration  
-     * [58]  NotationType ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'
-     * [59]  Enumeration    ::=    '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')' 
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!ATTLIST'
-     *
-     * @param elName The element type name this declaration is about.
-     * @param atName The attribute name this declaration is about.
-     */
-    private final String scanAttType(String elName, String atName)
-        throws IOException, XNIException {
-
-        String type = null;
-        fEnumerationCount = 0;
-        /*
-         * Watchout: the order here is important: when a string happens to
-         * be a substring of another string, the longer one needs to be
-         * looked for first!!
-         */
-        if (fEntityScanner.skipString("CDATA")) {
-            type = "CDATA";
-        }
-        else if (fEntityScanner.skipString("IDREFS")) {
-            type = "IDREFS";
-        }
-        else if (fEntityScanner.skipString("IDREF")) {
-            type = "IDREF";
-        }
-        else if (fEntityScanner.skipString("ID")) {
-            type = "ID";
-        }
-        else if (fEntityScanner.skipString("ENTITY")) {
-            type = "ENTITY";
-        }
-        else if (fEntityScanner.skipString("ENTITIES")) {
-            type = "ENTITIES";
-        }
-        else if (fEntityScanner.skipString("NMTOKENS")) {
-            type = "NMTOKENS";
-        }
-        else if (fEntityScanner.skipString("NMTOKEN")) {
-            type = "NMTOKEN";
-        }
-        else if (fEntityScanner.skipString("NOTATION")) {
-            type = "NOTATION";
-            // spaces
-            if (!skipSeparator(true, !scanningInternalSubset())) {
-                reportFatalError("MSG_SPACE_REQUIRED_AFTER_NOTATION_IN_NOTATIONTYPE",
-                                 new Object[]{elName, atName}); 
-            }
-            // open paren
-            int c = fEntityScanner.scanChar();
-            if (c != '(') {
-                reportFatalError("MSG_OPEN_PAREN_REQUIRED_IN_NOTATIONTYPE",
-                                 new Object[]{elName, atName});
-            }
-            fMarkUpDepth++;
-            do {
-                skipSeparator(false, !scanningInternalSubset());
-                String aName = fEntityScanner.scanName();
-                if (aName == null) {
-                    reportFatalError("MSG_NAME_REQUIRED_IN_NOTATIONTYPE",
-                                     new Object[]{elName, atName}); 
-                }
-                ensureEnumerationSize(fEnumerationCount + 1);
-                fEnumeration[fEnumerationCount++] = aName;
-                skipSeparator(false, !scanningInternalSubset());
-                c = fEntityScanner.scanChar();
-            } while (c == '|');
-            if (c != ')') {
-                reportFatalError("NotationTypeUnterminated",
-                                 new Object[]{elName, atName});
-            }
-            fMarkUpDepth--;
-        }
-        else {              // Enumeration
-            type = "ENUMERATION";
-            // open paren
-            int c = fEntityScanner.scanChar();
-            if (c != '(') {
-//                       "OPEN_PAREN_REQUIRED_BEFORE_ENUMERATION_IN_ATTRDECL",
-                reportFatalError("AttTypeRequiredInAttDef",
-                                 new Object[]{elName, atName});
-            }
-            fMarkUpDepth++;
-            do {
-                skipSeparator(false, !scanningInternalSubset());
-                String token = fEntityScanner.scanNmtoken();
-                if (token == null) {
-                    reportFatalError("MSG_NMTOKEN_REQUIRED_IN_ENUMERATION",
-                                     new Object[]{elName, atName});
-                }
-                ensureEnumerationSize(fEnumerationCount + 1);
-                fEnumeration[fEnumerationCount++] = token;
-                skipSeparator(false, !scanningInternalSubset());
-                c = fEntityScanner.scanChar();
-            } while (c == '|');
-            if (c != ')') {
-                reportFatalError("EnumerationUnterminated",
-                                 new Object[]{elName, atName});
-            }
-            fMarkUpDepth--;
-        }
-        return type;
-
-    } // scanAttType():String
-
-
-    /**
-     * Scans an attribute default declaration
-     * <p>
-     * <pre>
-     * [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
-     * </pre>
-     *
-     * @param name The name of the attribute being scanned.
-     * @param defaultVal The string to fill in with the default value.
-     */
-    protected final String scanAttDefaultDecl(String elName, String atName,
-                                              String type,
-                                              XMLString defaultVal,
-                                              XMLString nonNormalizedDefaultVal)
-        throws IOException, XNIException {
-
-        String defaultType = null;
-        fString.clear();
-        defaultVal.clear();
-        if (fEntityScanner.skipString("#REQUIRED")) {
-            defaultType = "#REQUIRED";
-        }
-        else if (fEntityScanner.skipString("#IMPLIED")) {
-            defaultType = "#IMPLIED";
-        }
-        else {
-            if (fEntityScanner.skipString("#FIXED")) {
-                defaultType = "#FIXED";
-                // spaces
-                if (!skipSeparator(true, !scanningInternalSubset())) {
-                    reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
-                                     new Object[]{elName, atName});
-                }
-            }
-            // AttValue 
-            boolean isVC = !fStandalone  &&  (fSeenExternalDTD || fSeenExternalPE) ;
-            scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
-                               fAttributes, 0, isVC);
-        }
-        return defaultType;
-
-    } // ScanAttDefaultDecl
-
-    /**
-     * Scans an entity declaration
-     * <p>
-     * <pre>
-     * [70]    EntityDecl  ::=    GEDecl | PEDecl 
-     * [71]    GEDecl      ::=    '&lt;!ENTITY' S Name S EntityDef S? '>' 
-     * [72]    PEDecl      ::=    '&lt;!ENTITY' S '%' S Name S PEDef S? '>' 
-     * [73]    EntityDef   ::=    EntityValue | (ExternalID NDataDecl?) 
-     * [74]    PEDef       ::=    EntityValue | ExternalID 
-     * [75]    ExternalID  ::=    'SYSTEM' S SystemLiteral 
-     *                          | 'PUBLIC' S PubidLiteral S SystemLiteral  
-     * [76]    NDataDecl   ::=    S 'NDATA' S Name 
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!ENTITY'
-     */
-    private final void scanEntityDecl() throws IOException, XNIException {
-
-        boolean isPEDecl = false;
-        boolean sawPERef = false;
-        fReportEntity = false;
-        if (fEntityScanner.skipSpaces()) {
-            if (!fEntityScanner.skipChar('%')) {
-                isPEDecl = false; // <!ENTITY x "x">
-            }
-            else if (skipSeparator(true, !scanningInternalSubset())) {
-                // <!ENTITY % x "x">
-                isPEDecl = true;
-            }
-            else if (scanningInternalSubset()) {
-                reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL",
-                                 null);
-                isPEDecl = true;
-            }
-            else if (fEntityScanner.peekChar() == '%') {
-                // <!ENTITY %%x; "x"> is legal
-                skipSeparator(false, !scanningInternalSubset());
-                isPEDecl = true;
-            }
-            else {
-                sawPERef = true;
-            }
-        }
-        else if (scanningInternalSubset() || !fEntityScanner.skipChar('%')) {
-            // <!ENTITY[^ ]...> or <!ENTITY[^ %]...>
-            reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL",
-                             null);
-            isPEDecl = false;
-        }
-        else if (fEntityScanner.skipSpaces()) {
-            // <!ENTITY% ...>
-            reportFatalError("MSG_SPACE_REQUIRED_BEFORE_PERCENT_IN_PEDECL",
-                             null);
-            isPEDecl = false;
-        }
-        else {
-            sawPERef = true;
-        }
-        if (sawPERef) {
-            while (true) {
-                String peName = fEntityScanner.scanName();
-                if (peName == null) {
-                    reportFatalError("NameRequiredInPEReference", null);
-                }
-                else if (!fEntityScanner.skipChar(';')) {
-                    reportFatalError("SemicolonRequiredInPEReference",
-                                     new Object[]{peName});
-                }
-                else {
-                    startPE(peName, false);
-                }
-                fEntityScanner.skipSpaces();
-                if (!fEntityScanner.skipChar('%'))
-                    break;
-                if (!isPEDecl) {
-                    if (skipSeparator(true, !scanningInternalSubset())) {
-                        isPEDecl = true;
-                        break;
-                    }
-                    isPEDecl = fEntityScanner.skipChar('%');
-                }
-            }
-        }
-
-        // name
-        String name = fEntityScanner.scanName();
-        if (name == null) {
-            reportFatalError("MSG_ENTITY_NAME_REQUIRED_IN_ENTITYDECL", null);
-        }
-
-        // spaces
-        if (!skipSeparator(true, !scanningInternalSubset())) {
-            reportFatalError("MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL",
-                             new Object[]{name});
-        }
-
-        // external id
-        scanExternalID(fStrings, false);
-        String systemId = fStrings[0];
-        String publicId = fStrings[1];
-
-        if (isPEDecl && systemId != null) {
-            fSeenExternalPE = true;
-        }
-
-        String notation = null;
-        // NDATA
-        boolean sawSpace = skipSeparator(true, !scanningInternalSubset());
-        if (!isPEDecl && fEntityScanner.skipString("NDATA")) {
-            // check whether there was space before NDATA
-            if (!sawSpace) {
-                reportFatalError("MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL",
-                                 new Object[]{name});
-            }
-
-            // spaces
-            if (!skipSeparator(true, !scanningInternalSubset())) {
-                reportFatalError("MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL",
-                                 new Object[]{name});
-            }
-            notation = fEntityScanner.scanName();
-            if (notation == null) {
-                reportFatalError("MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL",
-                                 new Object[]{name});
-            }
-        }
-
-        // internal entity
-        if (systemId == null) {
-            scanEntityValue(fLiteral, fLiteral2);
-        }
-
-        // skip possible trailing space
-        skipSeparator(false, !scanningInternalSubset());
-
-        // end
-        if (!fEntityScanner.skipChar('>')) {
-            reportFatalError("EntityDeclUnterminated", new Object[]{name});
-        }
-        fMarkUpDepth--;
-
-        // register entity and make callback
-        if (isPEDecl) {
-            name = "%" + name;
-        }
-        if (systemId != null) {
-            if (notation != null) {
-                fEntityManager.addUnparsedEntity(name, publicId, systemId, notation);
-            }
-            else {
-                String baseSystemId = fEntityScanner.getBaseSystemId();
-                fEntityManager.addExternalEntity(name, publicId, systemId, 
-                                                 baseSystemId);
-            }
-            if (fDTDHandler != null) {
-                if (notation != null) {
-                    fDTDHandler.unparsedEntityDecl(name, publicId, systemId, notation);
-                }
-                else {
-                    String baseSystemId = fEntityScanner.getBaseSystemId();
-                    fDTDHandler.externalEntityDecl(name, publicId, systemId, 
-                                                   baseSystemId);
-                }
-            }
-        }
-        else {
-            fEntityManager.addInternalEntity(name, fLiteral.toString());
-            if (fDTDHandler != null) {
-                fDTDHandler.internalEntityDecl(name, fLiteral, fLiteral2); 
-            }
-        }
-        fReportEntity = true;
-
-    } // scanEntityDecl()
-
-    /**
-     * Scans an entity value.
-     *
-     * @param value The string to fill in with the value.
-     * @param nonNormalizedValue The string to fill in with the 
-     *                           non-normalized value.
-     *
-     * <strong>Note:</strong> This method uses fString, fStringBuffer (through
-     * the use of scanCharReferenceValue), and fStringBuffer2, anything in them
-     * at the time of calling is lost.
-     */
-    protected final void scanEntityValue(XMLString value, 
-                                         XMLString nonNormalizedValue)
-        throws IOException, XNIException
-    {
-        int quote = fEntityScanner.scanChar();
-        if (quote != '\'' && quote != '"') {
-            reportFatalError("OpenQuoteMissingInDecl", null);
-        }
-        // store at which depth of entities we start
-        int entityDepth = fEntityDepth;
-
-        XMLString literal = fString;
-        XMLString literal2 = fString;
-        if (fEntityScanner.scanLiteral(quote, fString) != quote) {
-            fStringBuffer.clear();
-            fStringBuffer2.clear();
-            do {
-                fStringBuffer.append(fString);
-                fStringBuffer2.append(fString);
-                if (fEntityScanner.skipChar('&')) {
-                    if (fEntityScanner.skipChar('#')) {
-                        fStringBuffer2.append("&#");
-                        scanCharReferenceValue(fStringBuffer, fStringBuffer2);
-                    }
-                    else {
-                        fStringBuffer.append('&');
-                        fStringBuffer2.append('&');
-                        String eName = fEntityScanner.scanName();
-                        if (eName == null) {
-                            reportFatalError("NameRequiredInReference",
-                                             null);
-                        }
-                        else {
-                            fStringBuffer.append(eName);
-                            fStringBuffer2.append(eName);
-                        }
-                        if (!fEntityScanner.skipChar(';')) {
-                            reportFatalError("SemicolonRequiredInReference",
-                                             new Object[]{eName});
-                        }
-                        else {
-                            fStringBuffer.append(';');
-                            fStringBuffer2.append(';');
-                        }
-                    }
-                }
-                else if (fEntityScanner.skipChar('%')) {
-                    while (true) {
-                        fStringBuffer2.append('%');
-                        String peName = fEntityScanner.scanName();
-                        if (peName == null) {
-                            reportFatalError("NameRequiredInPEReference",
-                                             null);
-                        }
-                        else if (!fEntityScanner.skipChar(';')) {
-                            reportFatalError("SemicolonRequiredInPEReference",
-                                             new Object[]{peName});
-                        }
-                        else {
-                            if (scanningInternalSubset()) {
-                                reportFatalError("PEReferenceWithinMarkup",
-                                                 new Object[]{peName});
-                            }
-                            fStringBuffer2.append(peName);
-                            fStringBuffer2.append(';');
-                        }
-                        startPE(peName, true);
-                        // REVISIT: [Q] Why do we skip spaces here? -Ac
-                        // REVISIT: This will make returning the non-
-                        //          normalized value harder. -Ac
-                        fEntityScanner.skipSpaces();
-                        if (!fEntityScanner.skipChar('%'))
-                            break;
-                    }
-                }
-                else {
-                    int c = fEntityScanner.peekChar();
-                    if (XMLChar.isHighSurrogate(c)) {
-                        scanSurrogates(fStringBuffer2);
-                    }
-                    else if (XMLChar.isInvalid(c)) {
-                        reportFatalError("InvalidCharInLiteral",
-                                         new Object[]{Integer.toHexString(c)});
-                        fEntityScanner.scanChar();
-                    }
-                    // if it's not the delimiting quote or if it is but from a
-                    // different entity than the one this literal started from,
-                    // simply append the character to our buffer
-                    else if (c != quote || entityDepth != fEntityDepth) {
-                        fStringBuffer.append((char)c);
-                        fStringBuffer2.append((char)c);
-                        fEntityScanner.scanChar();
-                    }
-                }
-            } while (fEntityScanner.scanLiteral(quote, fString) != quote);
-            fStringBuffer.append(fString);
-            fStringBuffer2.append(fString);
-            literal = fStringBuffer;
-            literal2 = fStringBuffer2;
-        }
-        value.setValues(literal);
-        nonNormalizedValue.setValues(literal2);
-        if (!fEntityScanner.skipChar(quote)) {
-            reportFatalError("CloseQuoteMissingInDecl", null);
-        }
-    } // scanEntityValue(XMLString,XMLString):void
-
-    /**
-     * Scans a notation declaration
-     * <p>
-     * <pre>
-     * [82] NotationDecl ::= '&lt;!NOTATION' S Name S (ExternalID|PublicID) S? '>'
-     * [83]  PublicID    ::= 'PUBLIC' S PubidLiteral  
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!NOTATION'
-     */
-    private final void scanNotationDecl() throws IOException, XNIException {
-
-        // spaces
-        fReportEntity = false;
-        if (!skipSeparator(true, !scanningInternalSubset())) {
-            reportFatalError("MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL",
-                             null);
-        }
-
-        // notation name
-        String name = fEntityScanner.scanName();
-        if (name == null) {
-            reportFatalError("MSG_NOTATION_NAME_REQUIRED_IN_NOTATIONDECL",
-                             null);
-        }
-
-        // spaces
-        if (!skipSeparator(true, !scanningInternalSubset())) {
-            reportFatalError("MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL",
-                             new Object[]{name});
-        }
-
-        // external id
-        scanExternalID(fStrings, true);
-        String systemId = fStrings[0];
-        String publicId = fStrings[1];
-
-        if (systemId == null && publicId == null) {
-            reportFatalError("ExternalIDorPublicIDRequired",
-                             new Object[]{name});
-       }
-
-        // skip possible trailing space
-        skipSeparator(false, !scanningInternalSubset());
-
-        // end
-        if (!fEntityScanner.skipChar('>')) {
-            reportFatalError("NotationDeclUnterminated", new Object[]{name});
-        }
-        fMarkUpDepth--;
-
-        // call handler
-        if (fDTDHandler != null) {
-            fDTDHandler.notationDecl(name, publicId, systemId);
-        }
-        fReportEntity = true;
-
-    } // scanNotationDecl()
-
-    /**
-     * Scans a conditional section. If it's a section to ignore the whole
-     * section gets scanned through and this method only returns after the
-     * closing bracket has been found. When it's an include section though, it
-     * returns to let the main loop take care of scanning it. In that case the
-     * end of the section if handled by the main loop (scanDecls).
-     * <p>
-     * <pre>
-     * [61] conditionalSect   ::= includeSect | ignoreSect  
-     * [62] includeSect       ::= '&lt;![' S? 'INCLUDE' S? '[' extSubsetDecl ']]>'
-     * [63] ignoreSect   ::= '&lt;![' S? 'IGNORE' S? '[' ignoreSectContents* ']]>'
-     * [64] ignoreSectContents ::= Ignore ('&lt;![' ignoreSectContents ']]>' Ignore)* 
-     * [65] Ignore            ::=    Char* - (Char* ('&lt;![' | ']]>') Char*)  
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;![' */
-    private final void scanConditionalSect()
-        throws IOException, XNIException {
-
-        fReportEntity = false;
-        skipSeparator(false, !scanningInternalSubset());
-
-        if (fEntityScanner.skipString("INCLUDE")) {
-            skipSeparator(false, !scanningInternalSubset());
-            // call handler
-            if (!fEntityScanner.skipChar('[')) {
-                reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", null);
-            }
-
-            if (fDTDHandler != null) {
-                fDTDHandler.startConditional(
-                                            XMLDTDHandler.CONDITIONAL_INCLUDE);
-            }
-            fIncludeSectDepth++;
-            // just stop there and go back to the main loop
-            fReportEntity = true;
-        }
-        else if (fEntityScanner.skipString("IGNORE")) {
-            skipSeparator(false, !scanningInternalSubset());
-            // call handler
-            if (fDTDHandler != null) {
-                fDTDHandler.startConditional(XMLDTDHandler.CONDITIONAL_IGNORE);
-            }
-            if (!fEntityScanner.skipChar('[')) {
-                reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", null);
-            }
-            fReportEntity = true;
-            int initialDepth = ++fIncludeSectDepth;
-            if (fDTDHandler != null) {
-                fIgnoreConditionalBuffer.clear();
-            }
-            while (true) {
-                if (fEntityScanner.skipChar('<')) {
-                    if (fDTDHandler != null) {
-                        fIgnoreConditionalBuffer.append('<');
-                    }
-                    //
-                    // These tests are split so that we handle cases like
-                    // '<<![' and '<!<![' which we might otherwise miss.
-                    //
-                    if (fEntityScanner.skipChar('!')) {
-                        if(fEntityScanner.skipChar('[')) {
-                            if (fDTDHandler != null) {
-                                fIgnoreConditionalBuffer.append("![");
-                            }
-                            fIncludeSectDepth++;
-                        } else {
-                            if (fDTDHandler != null) {
-                                fIgnoreConditionalBuffer.append("!");
-                            }
-                        }
-                    }
-                }
-                else if (fEntityScanner.skipChar(']')) {
-                    if (fDTDHandler != null) {
-                        fIgnoreConditionalBuffer.append(']');
-                    }
-                    //
-                    // The same thing goes for ']<![' and '<]]>', etc.
-                    //
-                    if (fEntityScanner.skipChar(']')) {
-                        if (fDTDHandler != null) {
-                            fIgnoreConditionalBuffer.append(']');
-                        }
-                        while (fEntityScanner.skipChar(']')) {
-                            /* empty loop body */
-                            if (fDTDHandler != null) {
-                                fIgnoreConditionalBuffer.append(']');
-                            }
-                        }
-                        if (fEntityScanner.skipChar('>')) {
-                            if (fIncludeSectDepth-- == initialDepth) {
-                                fMarkUpDepth--;
-                                // call handler
-                                if (fDTDHandler != null) {
-                                    fLiteral.setValues(fIgnoreConditionalBuffer.ch, 0,
-                                                       fIgnoreConditionalBuffer.length - 2);
-                                    fDTDHandler.characters(fLiteral);
-                                    fDTDHandler.endConditional();
-                                }
-                                return;
-                            } else if(fDTDHandler != null) {
-                                fIgnoreConditionalBuffer.append('>');
-                            }
-                        }
-                    }
-                }
-                else {
-                    int c = fEntityScanner.scanChar();
-                    if (fScannerState == SCANNER_STATE_END_OF_INPUT) {
-                        reportFatalError("IgnoreSectUnterminated", null);
-                        return;
-                    }
-                    if (fDTDHandler != null) {
-                        fIgnoreConditionalBuffer.append((char)c);
-                    }
-                }
-            }
-        }
-        else {
-            reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", null);
-        }
-
-    } // scanConditionalSect()
-
-    /** 
-     * Dispatch an XML "event".
-     *
-     * @param complete True if this method is intended to scan
-     *                 and dispatch as much as possible.                 
-     *
-     * @returns True if there is more to scan.
-     *
-     * @throws IOException  Thrown on i/o error.
-     * @throws XNIException Thrown on parse error.
-     *
-     */
-    protected final boolean scanDecls(boolean complete)
-            throws IOException, XNIException {
-        
-        skipSeparator(false, true);
-        boolean again = true;
-        while (again && fScannerState == SCANNER_STATE_MARKUP_DECL) {
-            again = complete;
-            if (fEntityScanner.skipChar('<')) {
-                fMarkUpDepth++;
-                if (fEntityScanner.skipChar('?')) {
-                    scanPI();
-                }
-                else if (fEntityScanner.skipChar('!')) {
-                    if (fEntityScanner.skipChar('-')) {
-                        if (!fEntityScanner.skipChar('-')) {
-                            reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD",
-                                             null);
-                        } else {
-                            scanComment();
-                        }
-                    }
-                    else if (fEntityScanner.skipString("ELEMENT")) {
-                        scanElementDecl();
-                    }
-                    else if (fEntityScanner.skipString("ATTLIST")) {
-                        scanAttlistDecl();
-                    }
-                    else if (fEntityScanner.skipString("ENTITY")) {
-                        scanEntityDecl();
-                    }
-                    else if (fEntityScanner.skipString("NOTATION")) {
-                        scanNotationDecl();
-                    }
-                    else if (fEntityScanner.skipChar('[') &&
-                             !scanningInternalSubset()) {
-                        scanConditionalSect();
-                    }
-                    else {
-                        fMarkUpDepth--;
-                        reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD",
-                                         null);
-                    }
-                }
-                else {
-                    fMarkUpDepth--;
-                    reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", null);
-                }
-            }
-            else if (fIncludeSectDepth > 0 && fEntityScanner.skipChar(']')) {
-                // end of conditional section?
-                if (!fEntityScanner.skipChar(']')
-                    || !fEntityScanner.skipChar('>')) {
-                    reportFatalError("IncludeSectUnterminated", null);
-                }
-                // call handler
-                if (fDTDHandler != null) {
-                    fDTDHandler.endConditional();
-                }
-                // decreaseMarkupDepth();
-                fIncludeSectDepth--;
-                fMarkUpDepth--;
-            }
-            else if (scanningInternalSubset() &&
-                     fEntityScanner.peekChar() == ']') {
-                // this is the end of the internal subset, let's stop here
-                return false;
-            }
-            else if (fEntityScanner.skipSpaces()) {
-                // simply skip
-            }
-            else {
-                reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", null);
-            }
-            skipSeparator(false, true);
-        }
-        return fScannerState != SCANNER_STATE_END_OF_INPUT;
-    }
-
-    /**
-     * Skip separator. This is typically just whitespace but it can also be one
-     * or more parameter entity references.
-     * <p>
-     * If there are some it "expands them" by calling the corresponding entity
-     * from the entity manager.
-     * <p>
-     * This is recursive and will process has many refs as possible.
-     *
-     * @param spaceRequired Specify whether some leading whitespace should be
-     *                      found
-     * @param lookForPERefs Specify whether parameter entity references should
-     *                      be looked for
-     * @return True if any leading whitespace was found or the end of a
-     *         parameter entity was crossed.
-     */
-    private boolean skipSeparator(boolean spaceRequired, boolean lookForPERefs)
-        throws IOException, XNIException
-    {
-        int depth = fPEDepth;
-        boolean sawSpace = fEntityScanner.skipSpaces();
-        if (!lookForPERefs || !fEntityScanner.skipChar('%')) {
-            return !spaceRequired || sawSpace || (depth != fPEDepth);
-        }
-        while (true) {
-            String name = fEntityScanner.scanName();
-            if (name == null) {
-                reportFatalError("NameRequiredInPEReference", null);
-            }
-            else if (!fEntityScanner.skipChar(';')) {
-                reportFatalError("SemicolonRequiredInPEReference",
-                                 new Object[]{name});
-            }
-            startPE(name, false);
-            fEntityScanner.skipSpaces();
-            if (!fEntityScanner.skipChar('%'))
-                return true;
-        }
-    }
-
-
-    /*
-     * Element Children Content Stack
-     */
-    private final void pushContentStack(int c) {
-        if (fContentStack.length == fContentDepth) {
-            int[] newStack = new int[fContentDepth * 2];
-            System.arraycopy(fContentStack, 0, newStack, 0, fContentDepth);
-            fContentStack = newStack;
-        }
-        fContentStack[fContentDepth++] = c;
-    }
-
-    private final int popContentStack() {
-        return fContentStack[--fContentDepth];
-    }
-
-
-    /*
-     * Parameter Entity Stack
-     */
-    private final void pushPEStack(int depth, boolean report) {
-        if (fPEStack.length == fPEDepth) {
-            int[] newIntStack = new int[fPEDepth * 2];
-            System.arraycopy(fPEStack, 0, newIntStack, 0, fPEDepth);
-            fPEStack = newIntStack;
-            // report end/start calls
-            boolean[] newBooleanStack = new boolean[fPEDepth * 2];
-            System.arraycopy(fPEReport, 0, newBooleanStack, 0, fPEDepth);
-            fPEReport = newBooleanStack;
-
-        }
-        fPEReport[fPEDepth] = report;
-        fPEStack[fPEDepth++] = depth;
-    }
-
-    /** pop the stack */
-    private final int popPEStack() {
-        return fPEStack[--fPEDepth];
-    }
-
-    /** look at the top of the stack */
-    private final boolean peekReportEntity() {
-        return fPEReport[fPEDepth-1];
-    }
-
-
-    /*
-     * Utility method
-     */
-    private final void ensureEnumerationSize(int size) {
-        if (fEnumeration.length == size) {
-            String[] newEnum = new String[size * 2];
-            System.arraycopy(fEnumeration, 0, newEnum, 0, size);
-            fEnumeration = newEnum;
-        }
-    }
-
-} // class XMLDTDScannerImpl
diff --git a/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java b/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java
deleted file mode 100644
index 932a4d6..0000000
--- a/src/org/apache/xerces/impl/XMLDocumentFragmentScannerImpl.java
+++ /dev/null
@@ -1,1616 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.util.Stack;
-
-import org.apache.xerces.impl.XMLEntityManager;
-import org.apache.xerces.impl.XMLEntityScanner;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-
-import org.apache.xerces.util.XMLAttributesImpl;
-import org.apache.xerces.util.XMLStringBuffer;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.util.AugmentationsImpl;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLDocumentScanner;
-import org.apache.xerces.xni.parser.XMLDTDScanner;
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-/**
- * This class is responsible for scanning the structure and content
- * of document fragments. The scanner acts as the source for the 
- * document information which is communicated to the document handler.
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/namespaces</li>
- *  <li>http://xml.org/sax/features/validation</li>
- *  <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
- *  <li>http://apache.org/xml/features/scanner/notify-builtin-refs</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *  <li>http://apache.org/xml/properties/internal/entity-manager</li>
- * </ul>
- *
- * @author Glenn Marcy, IBM
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- * @author Arnaud  Le Hors, IBM
- * @author Eric Ye, IBM
- *
- * @version $Id$
- */
-public class XMLDocumentFragmentScannerImpl
-    extends XMLScanner
-    implements XMLDocumentScanner, XMLComponent, XMLEntityHandler {
-
-    //
-    // Constants
-    //
-
-    // scanner states
-
-    /** Scanner state: start of markup. */
-    protected static final int SCANNER_STATE_START_OF_MARKUP = 1;
-
-    /** Scanner state: comment. */
-    protected static final int SCANNER_STATE_COMMENT = 2;
-
-    /** Scanner state: processing instruction. */
-    protected static final int SCANNER_STATE_PI = 3;
-
-    /** Scanner state: DOCTYPE. */
-    protected static final int SCANNER_STATE_DOCTYPE = 4;
-
-    /** Scanner state: root element. */
-    protected static final int SCANNER_STATE_ROOT_ELEMENT = 6;
-
-    /** Scanner state: content. */
-    protected static final int SCANNER_STATE_CONTENT = 7;
-
-    /** Scanner state: reference. */
-    protected static final int SCANNER_STATE_REFERENCE = 8;
-
-    /** Scanner state: end of input. */
-    protected static final int SCANNER_STATE_END_OF_INPUT = 13;
-
-    /** Scanner state: terminated. */
-    protected static final int SCANNER_STATE_TERMINATED = 14;
-
-    /** Scanner state: CDATA section. */
-    protected static final int SCANNER_STATE_CDATA = 15;
-
-    /** Scanner state: Text declaration. */
-    protected static final int SCANNER_STATE_TEXT_DECL = 16;
-
-    // feature identifiers
-
-    /** Feature identifier: namespaces. */
-    protected static final String NAMESPACES = 
-        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
-    /** Feature identifier: notify built-in refereces. */
-    protected static final String NOTIFY_BUILTIN_REFS =
-        Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_BUILTIN_REFS_FEATURE;
-    
-    // recognized features and properties
-
-    /** Recognized features. */
-    private static final String[] RECOGNIZED_FEATURES = {
-        NAMESPACES, 
-        VALIDATION, 
-        NOTIFY_BUILTIN_REFS,
-        NOTIFY_CHAR_REFS, 
-    };
-
-    /** Recognized properties. */
-    private static final String[] RECOGNIZED_PROPERTIES = {
-        SYMBOL_TABLE,
-        ERROR_REPORTER,
-        ENTITY_MANAGER,
-    };
-
-    // debugging
-
-    /** Debug scanner state. */
-    private static final boolean DEBUG_SCANNER_STATE = false;
-
-    /** Debug dispatcher. */
-    private static final boolean DEBUG_DISPATCHER = false;
-
-    /** Debug content dispatcher scanning. */
-    private static final boolean DEBUG_CONTENT_SCANNING = false;
-
-    //
-    // Data
-    //
-
-    // protected data
-
-    /** Document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-
-    /** Entity stack. */
-    protected int[] fEntityStack = new int[4];
-
-    /** Markup depth. */
-    protected int fMarkupDepth;
-
-    /** Scanner state. */
-    protected int fScannerState;
-
-    /** has external dtd */
-    protected boolean fHasExternalDTD;
-    
-    /** Standalone. */
-    protected boolean fStandalone;
-
-    // element information
-
-    /** Current element. */
-    protected QName fCurrentElement;
-
-    /** Element stack. */
-    protected ElementStack fElementStack = new ElementStack();
-
-    // other info
-
-    /** Document system identifier. */
-    protected String fDocumentSystemId;
-
-    // features
-
-    /** Namespaces. */
-    protected boolean fNamespaces;
-
-    /** Notify built-in references. */
-    protected boolean fNotifyBuiltInRefs = false;
-
-    // dispatchers
-
-    /** Active dispatcher. */
-    protected Dispatcher fDispatcher;
-
-    /** Content dispatcher. */
-    protected Dispatcher fContentDispatcher = createContentDispatcher();
-
-    protected final Augmentations fAugmentations = new AugmentationsImpl();
-
-    // temporary variables
-
-    /** Array of 3 strings. */
-    private String[] fStrings = new String[3];
-
-    /** String. */
-    private XMLString fString = new XMLString();
-
-    /** String. */
-    private XMLString fString2 = new XMLString();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer = new XMLStringBuffer();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer();
-
-    /** Element QName. */
-    private QName fElementQName = new QName();
-
-    /** Attribute QName. */
-    private QName fAttributeQName = new QName();
-
-    /** Another QName. */
-    private QName fQName = new QName();
-
-    /** Element attributes. */
-    private XMLAttributesImpl fAttributes = new XMLAttributesImpl();
-
-    /** Single character array. */
-    private final char[] fSingleChar = new char[1];
-
-    /** External entity. */
-    private XMLEntityManager.ExternalEntity fExternalEntity = new XMLEntityManager.ExternalEntity();
-
-    // symbols
-
-    /** Symbol: "CDATA". */
-    private String fCDATASymbol;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLDocumentFragmentScannerImpl() {} // <init>()
-
-    //
-    // XMLDocumentScanner methods
-    //
-
-    /** 
-     * Sets the input source. 
-     *
-     * @param inputSource The input source.
-     *
-     * @throws IOException Thrown on i/o error.
-     */
-    public void setInputSource(XMLInputSource inputSource) throws IOException {
-        fEntityManager.setEntityHandler(this);
-        fEntityManager.startEntity("$fragment$", inputSource, false);
-        fDocumentSystemId = fEntityManager.expandSystemId(inputSource.getSystemId());
-    } // setInputSource(XMLInputSource)
-
-    /** 
-     * Scans a document.
-     *
-     * @param complete True if the scanner should scan the document
-     *                 completely, pushing all events to the registered
-     *                 document handler. A value of false indicates that
-     *                 that the scanner should only scan the next portion
-     *                 of the document and return. A scanner instance is
-     *                 permitted to completely scan a document if it does
-     *                 not support this "pull" scanning model.
-     *
-     * @returns True if there is more to scan, false otherwise.
-     */
-    public boolean scanDocument(boolean complete) 
-        throws IOException, XNIException {
-
-        // keep dispatching "events"
-        fEntityManager.setEntityHandler(this);
-        do {
-            if (!fDispatcher.dispatch(complete)) {
-                return false;
-            }
-        } while (complete);
-
-        // return success
-        return true;
-
-    } // scanDocument(boolean):boolean
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     * 
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Thrown by component on initialization error.
-     *                      For example, if a feature or property is
-     *                      required for the operation of the component, the
-     *                      component manager may throw a 
-     *                      SAXNotRecognizedException or a
-     *                      SAXNotSupportedException.
-     */
-    public void reset(XMLComponentManager componentManager)
-        throws XMLConfigurationException {
-
-        super.reset(componentManager);
-
-        // other settings
-        fDocumentSystemId = null;
-
-        // sax features
-        try {
-            fNamespaces = componentManager.getFeature(NAMESPACES);
-        }
-        catch (XMLConfigurationException e) {
-            fNamespaces = true;
-        }
-        fAttributes.setNamespaces(fNamespaces);
-
-        // xerces features
-        try {
-            fNotifyBuiltInRefs = componentManager.getFeature(NOTIFY_BUILTIN_REFS);
-        }
-        catch (XMLConfigurationException e) {
-            fNotifyBuiltInRefs = true;
-        }
-
-        // initialize vars
-        fMarkupDepth = 0;
-        fCurrentElement = null;
-        fElementStack.clear();
-        fHasExternalDTD = false;
-        fStandalone = false;
-
-        // create symbols
-        fCDATASymbol = fSymbolTable.addSymbol("CDATA");
-
-        // setup dispatcher
-        setScannerState(SCANNER_STATE_CONTENT);
-        setDispatcher(fContentDispatcher);
-        
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     * 
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-
-        super.setFeature(featureId, state);
-            
-        // Xerces properties
-        if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
-            String feature = featureId.substring(Constants.XERCES_FEATURE_PREFIX.length());
-            if (feature.equals(Constants.NOTIFY_BUILTIN_REFS_FEATURE)) {
-                fNotifyBuiltInRefs = state;
-            }
-        }
-
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     * 
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-        
-        super.setProperty(propertyId, value);
-
-        // Xerces properties
-        if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
-            String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
-            if (property.equals(Constants.ENTITY_MANAGER_PROPERTY)) {
-                fEntityManager = (XMLEntityManager)value;
-            }
-            return;
-        }
-
-    } // setProperty(String,Object)
-
-    //
-    // XMLDocumentSource methods
-    //
-
-    /**
-     * setDocumentHandler
-     * 
-     * @param documentHandler 
-     */
-    public void setDocumentHandler(XMLDocumentHandler documentHandler) {
-        fDocumentHandler = documentHandler;
-    } // setDocumentHandler(XMLDocumentHandler)
-
-    //
-    // XMLEntityHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
-     * general entities are just specified by their name.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-
-        // keep track of this entity before fEntityDepth is increased
-        if (fEntityDepth == fEntityStack.length) {
-            int[] entityarray = new int[fEntityStack.length * 2];
-            System.arraycopy(fEntityStack, 0, entityarray, 0, fEntityStack.length);
-            fEntityStack = entityarray;
-        }
-        fEntityStack[fEntityDepth] = fMarkupDepth;
-
-        super.startEntity(name, publicId, systemId, baseSystemId, encoding);
-
-        // call handler
-        if (fDocumentHandler != null) {
-            if (!name.equals("[xml]") && !fScanningAttribute) {
-                fDocumentHandler.startEntity(name, publicId, systemId, 
-                                             baseSystemId, encoding, fAugmentations);
-            }
-        }
-
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" parameter entity names start with '%'; and general entities 
-     * are just specified by their name.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-
-        super.endEntity(name);
-
-        // make sure markup is properly balanced
-        if (fMarkupDepth != fEntityStack[fEntityDepth]) {
-            reportFatalError("MarkupEntityMismatch", null);
-        }
-
-        // call handler
-        if (fDocumentHandler != null) {
-            if (!name.equals("[xml]") && !fScanningAttribute) {
-                fDocumentHandler.endEntity(name, fAugmentations);
-            }
-        }
-        
-    } // endEntity(String)
-
-    //
-    // Protected methods
-    //
-
-    // dispatcher factory methods
-
-    /** Creates a content dispatcher. */
-    protected Dispatcher createContentDispatcher() {
-        return new FragmentContentDispatcher();
-    } // createContentDispatcher():Dispatcher
-
-    // scanning methods
-
-    /**
-     * Scans an XML or text declaration.
-     * <p>
-     * <pre>
-     * [23] XMLDecl ::= '&lt;?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
-     * [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
-     * [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' |  "'" EncName "'" )
-     * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
-     * [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'")
-     *                 | ('"' ('yes' | 'no') '"'))
-     *
-     * [77] TextDecl ::= '&lt;?xml' VersionInfo? EncodingDecl S? '?>'
-     * </pre>
-     *
-     * @param scanningTextDecl True if a text declaration is to
-     *                         be scanned instead of an XML
-     *                         declaration.
-     */
-    protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) 
-        throws IOException, XNIException {
-
-        // scan decl
-        super.scanXMLDeclOrTextDecl(scanningTextDecl, fStrings);
-        fMarkupDepth--;
-
-        // pseudo-attribute values
-        String version = fStrings[0];
-        String encoding = fStrings[1];
-        String standalone = fStrings[2];
-
-        // set standalone
-        fStandalone = standalone != null && standalone.equals("yes");
-        fEntityManager.setStandalone(fStandalone);
-
-        // call handler
-        if (fDocumentHandler != null) {
-            if (scanningTextDecl) {
-                fDocumentHandler.textDecl(version, encoding, fAugmentations);
-            }
-            else {
-                fDocumentHandler.xmlDecl(version, encoding, standalone, fAugmentations);
-            }
-        }
-
-        // set encoding on reader
-        if (encoding != null) {
-            fEntityScanner.setEncoding(encoding);
-        }
-
-    } // scanXMLDeclOrTextDecl(boolean)
-
-    /**
-     * Scans a processing data. This is needed to handle the situation
-     * where a document starts with a processing instruction whose 
-     * target name <em>starts with</em> "xml". (e.g. xmlfoo)
-     *
-     * @param target The PI target
-     * @param data The string to fill in with the data
-     */
-    protected void scanPIData(String target, XMLString data) 
-        throws IOException, XNIException {
-
-        super.scanPIData(target, data);
-        fMarkupDepth--;
-
-        // call handler
-        if (fDocumentHandler != null) {
-            fDocumentHandler.processingInstruction(target, data, fAugmentations);
-        }
-
-    } // scanPIData(String)
-
-    /**
-     * Scans a comment.
-     * <p>
-     * <pre>
-     * [15] Comment ::= '&lt!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!--'
-     */
-    protected void scanComment() throws IOException, XNIException {
-
-        scanComment(fStringBuffer);
-        fMarkupDepth--;
-
-        // call handler
-        if (fDocumentHandler != null) {
-            fDocumentHandler.comment(fStringBuffer, fAugmentations);
-        }
-
-    } // scanComment()
-    
-    /** 
-     * Scans a start element. This method will handle the binding of
-     * namespace information and notifying the handler of the start
-     * of the element.
-     * <p>
-     * <pre>
-     * [44] EmptyElemTag ::= '&lt;' Name (S Attribute)* S? '/>'
-     * [40] STag ::= '&lt;' Name (S Attribute)* S? '>'
-     * </pre> 
-     * <p>
-     * <strong>Note:</strong> This method assumes that the leading
-     * '&lt;' character has been consumed.
-     * <p>
-     * <strong>Note:</strong> This method uses the fElementQName and
-     * fAttributes variables. The contents of these variables will be
-     * destroyed. The caller should copy important information out of
-     * these variables before calling this method.
-     *
-     * @returns True if element is empty. (i.e. It matches
-     *          production [44].
-     */
-    protected boolean scanStartElement() 
-        throws IOException, XNIException {
-        if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanStartElement()");
-
-        // name
-        if (fNamespaces) {
-            fEntityScanner.scanQName(fElementQName);
-        }
-        else {
-            String name = fEntityScanner.scanName();
-            fElementQName.setValues(null, name, name, null);
-        }
-        String rawname = fElementQName.rawname;
-
-        // push element stack
-        fCurrentElement = fElementStack.pushElement(fElementQName);
-
-        // attributes
-        boolean empty = false;
-        fAttributes.removeAllAttributes();
-        do {
-            // spaces
-            boolean sawSpace = fEntityScanner.skipSpaces();
-
-            // end tag?
-            int c = fEntityScanner.peekChar();
-            if (c == '>') {
-                fEntityScanner.scanChar();
-                break;
-            }
-            else if (c == '/') {
-                fEntityScanner.scanChar();
-                if (!fEntityScanner.skipChar('>')) {
-                    reportFatalError("ElementUnterminated",
-                                     new Object[]{rawname});
-                }
-                empty = true;
-                break;
-            }
-            else if (!XMLChar.isNameStart(c) || !sawSpace) {
-                reportFatalError("ElementUnterminated", new Object[]{rawname});
-            }
-
-            // attributes
-            scanAttribute(fAttributes);
-
-        } while (true);
-
-        // call handler
-        if (fDocumentHandler != null) {
-            if (empty) {
-                fDocumentHandler.emptyElement(fElementQName, fAttributes, fAugmentations);
-                handleEndElement(fElementQName, true);
-            }
-            else {
-                fDocumentHandler.startElement(fElementQName, fAttributes, fAugmentations);
-            }
-        }
-
-        if (DEBUG_CONTENT_SCANNING) System.out.println("<<< scanStartElement(): "+empty);
-        return empty;
-
-    } // scanStartElement():boolean
-
-    /** 
-     * Scans an attribute.
-     * <p>
-     * <pre>
-     * [41] Attribute ::= Name Eq AttValue
-     * </pre> 
-     * <p>
-     * <strong>Note:</strong> This method assumes that the next 
-     * character on the stream is the first character of the attribute
-     * name.
-     * <p>
-     * <strong>Note:</strong> This method uses the fAttributeQName and
-     * fQName variables. The contents of these variables will be
-     * destroyed.
-     *
-     * @param attributes The attributes list for the scanned attribute.
-     */
-    protected void scanAttribute(XMLAttributes attributes) 
-        throws IOException, XNIException {
-        if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanAttribute()");
-
-        // name
-        if (fNamespaces) {
-            fEntityScanner.scanQName(fAttributeQName);
-        }
-        else {
-            String name = fEntityScanner.scanName();
-            fAttributeQName.setValues(null, name, name, null);
-        }
-
-        // equals
-        fEntityScanner.skipSpaces();
-        if (!fEntityScanner.skipChar('=')) {
-            reportFatalError("EqRequiredInAttribute",
-                             new Object[]{fCurrentElement.rawname,
-                                          fAttributeQName.rawname});
-        }
-        fEntityScanner.skipSpaces();
-
-        // content
-        int oldLen = attributes.getLength();
-        attributes.addAttribute(fAttributeQName, fCDATASymbol, null);
-
-        // WFC: Unique Att Spec
-        if (oldLen == attributes.getLength()) {
-            reportFatalError("AttributeNotUnique",
-                             new Object[]{fCurrentElement.rawname,
-                                          fAttributeQName.rawname});
-        }
-        //REVISIT: one more case needs to be included: external PE and standalone is no
-        boolean isVC =  fHasExternalDTD && !fStandalone;        
-        scanAttributeValue(fString, fString2,
-                           fAttributeQName.rawname, attributes,
-                           oldLen, isVC);
-        attributes.setValue(oldLen, fString.toString());
-        attributes.setNonNormalizedValue(oldLen, fString2.toString());
-        attributes.setSpecified(oldLen, true);
-
-        if (DEBUG_CONTENT_SCANNING) System.out.println("<<< scanAttribute()");
-    } // scanAttribute(XMLAttributes)
-
-    /**
-     * Scans element content.
-     *
-     * @returns Returns the next character on the stream.
-     */
-    protected int scanContent() throws IOException, XNIException {
-
-        XMLString content = fString;
-        int c = fEntityScanner.scanContent(content);
-        if (c == '\r') {
-            // happens when there is the character reference &#13;
-            fEntityScanner.scanChar();
-            fStringBuffer.clear();
-            fStringBuffer.append(fString);
-            fStringBuffer.append((char)c);
-            content = fStringBuffer;
-            c = -1;
-        }
-        if (fDocumentHandler != null && content.length > 0) {
-            fDocumentHandler.characters(content, fAugmentations);
-        }
-
-        if (c == ']' && fString.length == 0) {
-            fStringBuffer.clear();
-            fStringBuffer.append((char)fEntityScanner.scanChar());
-            //
-            // We work on a single character basis to handle cases such as:
-            // ']]]>' which we might otherwise miss.
-            //
-            if (fEntityScanner.skipChar(']')) {
-                fStringBuffer.append(']');
-                while (fEntityScanner.skipChar(']')) {
-                    fStringBuffer.append(']');
-                }
-                if (fEntityScanner.skipChar('>')) {
-                    reportFatalError("CDEndInContent", null);
-                }
-            }
-            if (fDocumentHandler != null) {
-                fDocumentHandler.characters(fStringBuffer, fAugmentations);
-            }
-            c = -1;
-        }
-        return c;
-
-    } // scanContent():int
-
-
-    /** 
-     * Scans a CDATA section. 
-     * <p>
-     * <strong>Note:</strong> This method uses the fString and
-     * fStringBuffer variables.
-     *
-     * @param complete True if the CDATA section is to be scanned
-     *                 completely.
-     *
-     * @return True if CDATA is completely scanned.
-     */
-    protected boolean scanCDATASection(boolean complete) 
-        throws IOException, XNIException {
-        
-        // call handler
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startCDATA(fAugmentations);
-        }
-
-        while (true) {
-            if (!fEntityScanner.scanData("]]", fString)) {
-                if (fDocumentHandler != null && fString.length > 0) {
-                    fDocumentHandler.characters(fString, fAugmentations);
-                }
-                int brackets = 2;
-                while (fEntityScanner.skipChar(']')) {
-                    brackets++;
-                }
-                if (fDocumentHandler != null && brackets > 2) {
-                    fStringBuffer.clear();
-                    for (int i = 2; i < brackets; i++) {
-                        fStringBuffer.append(']');
-                    }
-                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
-                }
-                if (fEntityScanner.skipChar('>')) {
-                    break;
-                }
-                if (fDocumentHandler != null) {
-                    fStringBuffer.clear();
-                    fStringBuffer.append("]]");
-                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
-                }
-            }
-            else {
-                if (fDocumentHandler != null) {
-                    fDocumentHandler.characters(fString, fAugmentations);
-                }
-                int c = fEntityScanner.peekChar();
-                if (c != -1 && XMLChar.isInvalid(c)) {
-                    if (XMLChar.isHighSurrogate(c)) {
-                        fStringBuffer.clear();
-                        scanSurrogates(fStringBuffer);
-                        if (fDocumentHandler != null) {
-                            fDocumentHandler.characters(fStringBuffer, fAugmentations);
-                        }
-                    }
-                    else {
-                        reportFatalError("InvalidCharInCDSect",
-                                        new Object[]{Integer.toString(c,16)});
-                        fEntityScanner.scanChar();
-                    }
-                }
-            }
-        }
-        fMarkupDepth--;
-
-        // call handler
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endCDATA(fAugmentations);
-        }
-
-        return true;
-
-    } // scanCDATASection(boolean):boolean
-
-    /**
-     * Scans an end element.
-     * <p>
-     * <pre>
-     * [42] ETag ::= '&lt;/' Name S? '>'
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> This method uses the fElementQName variable.
-     * The contents of this variable will be destroyed. The caller should
-     * copy the needed information out of this variable before calling
-     * this method.
-     *
-     * @returns The element depth.
-     */
-    protected int scanEndElement() throws IOException, XNIException {
-        if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanEndElement()");
-
-        // name
-        if (fNamespaces) {
-            if (!fEntityScanner.scanQName(fElementQName)) {
-                fElementQName.clear();
-            }
-        }
-        else {
-            String name = fEntityScanner.scanName();
-            fElementQName.setValues(null, name, name, null);
-        }
-
-        // end
-        fEntityScanner.skipSpaces();
-        if (!fEntityScanner.skipChar('>')) {
-            reportFatalError("ETagUnterminated",
-                             new Object[]{fElementQName.rawname});
-        }
-        fMarkupDepth--;
-
-        // handle end element
-        int depth = handleEndElement(fElementQName, false);
-        if (DEBUG_CONTENT_SCANNING) System.out.println("<<< scanEndElement(): "+depth);
-        return depth;
-
-    } // scanEndElement():int
-
-    /**
-     * Scans a character reference.
-     * <p>
-     * <pre>
-     * [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
-     * </pre>
-     */
-    protected void scanCharReference() 
-        throws IOException, XNIException {
-
-        fStringBuffer2.clear();
-        int ch = scanCharReferenceValue(fStringBuffer2, null);
-        fMarkupDepth--;
-        if (ch != -1) {
-            // call handler
-            if (fDocumentHandler != null) {
-                if (fNotifyCharRefs) {
-                    fDocumentHandler.startEntity(fCharRefLiteral, null,
-                                                 null, null, null, fAugmentations);
-                }
-                fDocumentHandler.characters(fStringBuffer2, fAugmentations);
-                if (fNotifyCharRefs) {
-                    fDocumentHandler.endEntity(fCharRefLiteral, fAugmentations);
-                }
-            }
-        }
-
-    } // scanCharReference()
-
-    /**
-     * Scans an entity reference.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws XNIException Thrown if handler throws exception upon
-     *                      notification.
-     */
-    protected void scanEntityReference() throws IOException, XNIException {
-
-        // name
-        String name = fEntityScanner.scanName();
-        if (name == null) {
-            reportFatalError("NameRequiredInReference", null);
-        }
-
-        // end
-        if (!fEntityScanner.skipChar(';')) {
-            reportFatalError("SemicolonRequiredInReference", new Object []{name});
-        }
-        fMarkupDepth--;
-
-        // handle built-in entities
-        if (name == fAmpSymbol) {
-            handleCharacter('&', fAmpSymbol);
-        }
-        else if (name == fLtSymbol) {
-            handleCharacter('<', fLtSymbol);
-        }
-        else if (name == fGtSymbol) {
-            handleCharacter('>', fGtSymbol);
-        }
-        else if (name == fQuotSymbol) {
-            handleCharacter('"', fQuotSymbol);
-        }
-        else if (name == fAposSymbol) {
-            handleCharacter('\'', fAposSymbol);
-        }
-        // start general entity
-        else if (fEntityManager.isUnparsedEntity(name)) {
-            reportFatalError("ReferenceToUnparsedEntity", new Object[]{name});
-        }
-        else {
-            if (!fEntityManager.isDeclaredEntity(name)) {
-                //REVISIT: one more case needs to be included: external PE and standalone is no
-                if ( fHasExternalDTD && !fStandalone) {
-                    if (fValidation)
-                        fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,"EntityNotDeclared", 
-                                                    new Object[]{name}, XMLErrorReporter.SEVERITY_ERROR);
-                }
-                else 
-                    reportFatalError("EntityNotDeclared", new Object[]{name});
-            }
-            fEntityManager.startEntity(name, false);
-        }
-
-    } // scanEntityReference()
-
-    // utility methods
-
-    /** 
-     * Calls document handler with a single character resulting from
-     * built-in entity resolution. 
-     *
-     * @param c
-     * @param entity built-in name
-     */
-    private void handleCharacter(char c, String entity) throws XNIException {
-        if (fDocumentHandler != null) {
-            if (fNotifyBuiltInRefs) {
-                fDocumentHandler.startEntity(entity, null, null, null, null, fAugmentations);
-            }
-            
-            fSingleChar[0] = c;
-            fString.setValues(fSingleChar, 0, 1);
-            fDocumentHandler.characters(fString, fAugmentations);
-            
-            if (fNotifyBuiltInRefs) {
-                fDocumentHandler.endEntity(entity, fAugmentations);
-            }
-        }
-    } // handleCharacter(char)
-
-    /** 
-     * Handles the end element. This method will make sure that
-     * the end element name matches the current element and notify
-     * the handler about the end of the element and the end of any
-     * relevent prefix mappings.
-     * <p>
-     * <strong>Note:</strong> This method uses the fQName variable.
-     * The contents of this variable will be destroyed.
-     *
-     * @param element The element.
-     *
-     * @returns The element depth.
-     *
-     * @throws XNIException Thrown if the handler throws a SAX exception
-     *                      upon notification.
-     *
-     */
-    protected int handleEndElement(QName element, boolean isEmpty) 
-        throws XNIException {
-
-        fMarkupDepth--;
-        // check that this element was opened in the same entity
-        if (fMarkupDepth < fEntityStack[fEntityDepth - 1]) {
-            reportFatalError("ElementEntityMismatch",
-                             new Object[]{fCurrentElement.rawname});
-        }
-        // make sure the elements match
-        QName startElement = fQName;
-        fElementStack.popElement(startElement);
-        if (element.rawname != startElement.rawname) {
-            reportFatalError("ETagRequired",
-                             new Object[]{startElement.rawname});
-        }
-
-        // bind namespaces
-        if (fNamespaces) {
-            element.uri = startElement.uri;
-        }
-        
-        // call handler
-        if (fDocumentHandler != null && !isEmpty) {
-            fDocumentHandler.endElement(element, fAugmentations);
-        }
-
-        return fMarkupDepth;
-
-    } // callEndElement(QName,boolean):int
-
-    // helper methods
-
-    /**
-     * Sets the scanner state.
-     *
-     * @param state The new scanner state.
-     */
-    protected final void setScannerState(int state) {
-
-        fScannerState = state;
-        if (DEBUG_SCANNER_STATE) {
-            System.out.print("### setScannerState: ");
-            System.out.print(getScannerStateName(state));
-            System.out.println();
-        }
-
-    } // setScannerState(int)
-
-    /**
-     * Sets the dispatcher.
-     *
-     * @param dispatcher The new dispatcher.
-     */
-    protected final void setDispatcher(Dispatcher dispatcher) {
-        fDispatcher = dispatcher;
-        if (DEBUG_DISPATCHER) {
-            System.out.print("%%% setDispatcher: ");
-            System.out.print(getDispatcherName(dispatcher));
-            System.out.println();
-        }
-    }
-
-    //
-    // Private methods
-    //
-
-    /** Returns the scanner state name. */
-    protected String getScannerStateName(int state) {
-
-        switch (state) {
-            case SCANNER_STATE_DOCTYPE: return "SCANNER_STATE_DOCTYPE";
-            case SCANNER_STATE_ROOT_ELEMENT: return "SCANNER_STATE_ROOT_ELEMENT";
-            case SCANNER_STATE_START_OF_MARKUP: return "SCANNER_STATE_START_OF_MARKUP";
-            case SCANNER_STATE_COMMENT: return "SCANNER_STATE_COMMENT";
-            case SCANNER_STATE_PI: return "SCANNER_STATE_PI";
-            case SCANNER_STATE_CONTENT: return "SCANNER_STATE_CONTENT";
-            case SCANNER_STATE_REFERENCE: return "SCANNER_STATE_REFERENCE";
-            case SCANNER_STATE_END_OF_INPUT: return "SCANNER_STATE_END_OF_INPUT";
-            case SCANNER_STATE_TERMINATED: return "SCANNER_STATE_TERMINATED";
-            case SCANNER_STATE_CDATA: return "SCANNER_STATE_CDATA";
-            case SCANNER_STATE_TEXT_DECL: return "SCANNER_STATE_TEXT_DECL";
-        }
-
-        return "??? ("+state+')';
-
-    } // getScannerStateName(int):String
-
-    /** Returns the dispatcher name. */
-    public String getDispatcherName(Dispatcher dispatcher) {
-
-        if (DEBUG_DISPATCHER) {
-            if (dispatcher != null) {
-                String name = dispatcher.getClass().getName();
-                int index = name.lastIndexOf('.');
-                if (index != -1) {
-                    name = name.substring(index + 1);
-                    index = name.lastIndexOf('$');
-                    if (index != -1) {
-                        name = name.substring(index + 1);
-                    }
-                }
-                return name;
-            }
-        }
-        return "null";
-
-    } // getDispatcherName():String
-
-    //
-    // Classes
-    //
-
-    /**
-     * Element stack. This stack operates without synchronization, error
-     * checking, and it re-uses objects instead of throwing popped items
-     * away.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected static class ElementStack {
-
-        //
-        // Data
-        //
-
-        /** The stack data. */
-        protected QName[] fElements;
-
-        /** The size of the stack. */
-        protected int fSize;
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public ElementStack() {
-            fElements = new QName[10];
-            for (int i = 0; i < fElements.length; i++) {
-                fElements[i] = new QName();
-            }
-        } // <init>()
-
-        //
-        // Public methods
-        //
-
-        /** 
-         * Pushes an element on the stack. 
-         * <p>
-         * <strong>Note:</strong> The QName values are copied into the
-         * stack. In other words, the caller does <em>not</em> orphan
-         * the element to the stack. Also, the QName object returned
-         * is <em>not</em> orphaned to the caller. It should be 
-         * considered read-only.
-         *
-         * @param element The element to push onto the stack.
-         *
-         * @return Returns the actual QName object that stores the
-         */
-        public QName pushElement(QName element) {
-            if (fSize == fElements.length) {
-                QName[] array = new QName[fElements.length * 2];
-                System.arraycopy(fElements, 0, array, 0, fSize);
-                fElements = array;
-                for (int i = fSize; i < fElements.length; i++) {
-                    fElements[i] = new QName();
-                }
-            }
-            fElements[fSize].setValues(element);
-            return fElements[fSize++];
-        } // pushElement(QName):QName
-
-        /** 
-         * Pops an element off of the stack by setting the values of
-         * the specified QName.
-         * <p>
-         * <strong>Note:</strong> The object returned is <em>not</em>
-         * orphaned to the caller. Therefore, the caller should consider
-         * the object to be read-only.
-         */
-        public void popElement(QName element) {
-            element.setValues(fElements[--fSize]);
-        } // popElement(QName)
-
-        /** Clears the stack without throwing away existing QName objects. */
-        public void clear() {
-            fSize = 0;
-        } // clear()
-
-    } // class ElementStack
-
-    /** 
-     * This interface defines an XML "event" dispatching model. Classes
-     * that implement this interface are responsible for scanning parts
-     * of the XML document and dispatching callbacks.
-     *
-     * @author Glenn Marcy, IBM
-     */
-    protected interface Dispatcher {
-
-        //
-        // Dispatcher methods
-        //
-
-        /** 
-         * Dispatch an XML "event".
-         *
-         * @param complete True if this dispatcher is intended to scan
-         *                 and dispatch as much as possible.                 
-         *
-         * @returns True if there is more to dispatch either from this 
-         *          or a another dispatcher.
-         *
-         * @throws IOException  Thrown on i/o error.
-         * @throws XNIException Thrown on parse error.
-         */
-        public boolean dispatch(boolean complete) 
-            throws IOException, XNIException;
-
-    } // interface Dispatcher
-
-    /**
-     * Dispatcher to handle content scanning.
-     *
-     * @author Andy Clark, IBM
-     * @author Eric Ye, IBM
-     */
-    protected class FragmentContentDispatcher
-        implements Dispatcher {
-
-        //
-        // Dispatcher methods
-        //
-
-        /** 
-         * Dispatch an XML "event".
-         *
-         * @param complete True if this dispatcher is intended to scan
-         *                 and dispatch as much as possible.                 
-         *
-         * @returns True if there is more to dispatch either from this 
-         *          or a another dispatcher.
-         *
-         * @throws IOException  Thrown on i/o error.
-         * @throws XNIException Thrown on parse error.
-         */
-        public boolean dispatch(boolean complete) 
-            throws IOException, XNIException {
-
-            try {
-                boolean again;
-                do {
-                    again = false;
-                    switch (fScannerState) {
-                        case SCANNER_STATE_CONTENT: {
-                            if (fEntityScanner.skipChar('<')) {
-                                setScannerState(SCANNER_STATE_START_OF_MARKUP);
-                                again = true;
-                            }
-                            else if (fEntityScanner.skipChar('&')) {
-                                setScannerState(SCANNER_STATE_REFERENCE);
-                                again = true;
-                            }
-                            else {
-                                do {
-                                    int c = scanContent();
-                                    if (c == '<') {
-                                        fEntityScanner.scanChar();
-                                        setScannerState(SCANNER_STATE_START_OF_MARKUP);
-                                        break;
-                                    }
-                                    else if (c == '&') {
-                                        fEntityScanner.scanChar();
-                                        setScannerState(SCANNER_STATE_REFERENCE);
-                                        break;
-                                    }
-                                    else if (c != -1 && XMLChar.isInvalid(c)) {
-                                        if (XMLChar.isHighSurrogate(c)) {
-                                            // special case: surrogates
-                                            fStringBuffer.clear();
-                                            if (scanSurrogates(fStringBuffer)) {
-                                                // call handler
-                                                if (fDocumentHandler != null) {
-                                                    fDocumentHandler.characters(fStringBuffer, fAugmentations);
-                                                }
-                                            }
-                                        }
-                                        else {
-                                            reportFatalError("InvalidCharInContent",
-                                                             new Object[] {
-                                                Integer.toString(c, 16)});
-                                            fEntityScanner.scanChar();
-                                        }
-                                    }
-                                } while (complete);
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_START_OF_MARKUP: {
-                            fMarkupDepth++;
-                            if (fEntityScanner.skipChar('?')) {
-                                setScannerState(SCANNER_STATE_PI);
-                                again = true;
-                            }
-                            else if (fEntityScanner.skipChar('!')) {
-                                if (fEntityScanner.skipChar('-')) {
-                                    if (!fEntityScanner.skipChar('-')) {
-                                        reportFatalError("InvalidCommentStart",
-                                                         null);
-                                    }
-                                    setScannerState(SCANNER_STATE_COMMENT);
-                                    again = true;
-                                }
-                                else if (fEntityScanner.skipString("[CDATA[")) {
-                                    setScannerState(SCANNER_STATE_CDATA);
-                                    again = true;
-                                }
-                                else if (!scanForDoctypeHook()) {
-                                    reportFatalError("MarkupNotRecognizedInContent",
-                                                     null);
-                                }
-                            }
-                            else if (fEntityScanner.skipChar('/')) {
-                                if (scanEndElement() == 0) {
-                                    if (elementDepthIsZeroHook()) {
-                                        return true;
-                                    }
-                                }
-                                setScannerState(SCANNER_STATE_CONTENT);
-                            }
-                            else if (XMLChar.isNameStart(fEntityScanner.peekChar())) {
-                                scanStartElement();
-                                setScannerState(SCANNER_STATE_CONTENT);
-                            }
-                            else {
-                                reportFatalError("MarkupNotRecognizedInContent",
-                                                 null);
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_COMMENT: {
-                            scanComment();
-                            setScannerState(SCANNER_STATE_CONTENT);
-                            break;  
-                        }
-                        case SCANNER_STATE_PI: {
-                            scanPI();
-                            setScannerState(SCANNER_STATE_CONTENT);
-                            break;  
-                        }
-                        case SCANNER_STATE_CDATA: {
-                            scanCDATASection(complete);
-                            setScannerState(SCANNER_STATE_CONTENT);
-                            break;
-                        }
-                        case SCANNER_STATE_REFERENCE: {
-                            fMarkupDepth++;
-                            // NOTE: We need to set the state beforehand
-                            //       because the XMLEntityHandler#startEntity
-                            //       callback could set the state to
-                            //       SCANNER_STATE_TEXT_DECL and we don't want
-                            //       to override that scanner state.
-                            setScannerState(SCANNER_STATE_CONTENT);
-                            if (fEntityScanner.skipChar('#')) {
-                                scanCharReference();
-                            }
-                            else {
-                                scanEntityReference();
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_TEXT_DECL: {
-                            // scan text decl
-                            if (fEntityScanner.skipString("<?xml")) {
-                                fMarkupDepth++;
-                                // NOTE: special case where entity starts with a PI
-                                //       whose name starts with "xml" (e.g. "xmlfoo")
-                                if (XMLChar.isName(fEntityScanner.peekChar())) {
-                                    fStringBuffer.clear();
-                                    fStringBuffer.append("xml");
-                                    while (XMLChar.isName(fEntityScanner.peekChar())) {
-                                        fStringBuffer.append((char)fEntityScanner.scanChar());
-                                    }
-                                    String target = fSymbolTable.addSymbol(fStringBuffer.ch, fStringBuffer.offset, fStringBuffer.length);
-                                    scanPIData(target, fString);
-                                }
-                
-                                // standard text declaration
-                                else {
-                                    scanXMLDeclOrTextDecl(true);
-                                }
-                            }
-                            setScannerState(SCANNER_STATE_CONTENT);
-                            break;
-                        }
-                        case SCANNER_STATE_ROOT_ELEMENT: {
-                            if (scanRootElementHook()) {
-                                return true;
-                            }
-                            setScannerState(SCANNER_STATE_CONTENT);
-                            break;
-                        }
-                        case SCANNER_STATE_DOCTYPE: {
-                            reportFatalError("DoctypeIllegalInContent",
-                                             null);
-                        }
-                    }
-                } while (complete || again);
-            }
-    
-            // premature end of file
-            catch (EOFException e) {
-                endOfFileHook(e);
-                return false;
-            }
-
-            return true;
-
-        } // dispatch(boolean):boolean
-
-        //
-        // Protected methods
-        //
-
-        // hooks
-
-        // NOTE: These hook methods are added so that the full document
-        //       scanner can share the majority of code with this class.
-
-        /** 
-         * Scan for DOCTYPE hook. This method is a hook for subclasses
-         * to add code to handle scanning for a the "DOCTYPE" string 
-         * after the string "<!" has been scanned.
-         * 
-         * @returns True if the "DOCTYPE" was scanned; false if "DOCTYPE"
-         *          was not scanned.
-         */
-        protected boolean scanForDoctypeHook() 
-            throws IOException, XNIException {
-            return false;
-        } // scanForDoctypeHook():boolean
-
-        /** 
-         * Element depth iz zero. This methos is a hook for subclasses
-         * to add code to handle when the element depth hits zero. When
-         * scanning a document fragment, an element depth of zero is
-         * normal. However, when scanning a full XML document, the
-         * scanner must handle the trailing miscellanous section of
-         * the document after the end of the document's root element.
-         *
-         * @returns True if the caller should stop and return true which
-         *          allows the scanner to switch to a new scanning 
-         *          dispatcher. A return value of false indicates that
-         *          the content dispatcher should continue as normal.
-         */
-        protected boolean elementDepthIsZeroHook()
-            throws IOException, XNIException {
-            return false;
-        } // elementDepthIsZeroHook():boolean
-
-        /**
-         * Scan for root element hook. This method is a hook for
-         * subclasses to add code that handles scanning for the root
-         * element. When scanning a document fragment, there is no
-         * "root" element. However, when scanning a full XML document,
-         * the scanner must handle the root element specially.
-         *
-         * @returns True if the caller should stop and return true which
-         *          allows the scanner to switch to a new scanning 
-         *          dispatcher. A return value of false indicates that
-         *          the content dispatcher should continue as normal.
-         */
-        protected boolean scanRootElementHook()
-            throws IOException, XNIException {
-            return false;
-        } // scanRootElementHook():boolean
-
-        /**
-         * End of file hook. This method is a hook for subclasses to
-         * add code that handles the end of file. The end of file in
-         * a document fragment is OK if the markup depth is zero.
-         * However, when scanning a full XML document, an end of file
-         * is always premature.
-         */
-        protected void endOfFileHook(EOFException e) 
-            throws IOException, XNIException {
-
-            // NOTE: An end of file is only only an error if we were
-            //       in the middle of scanning some markup. -Ac
-            if (fMarkupDepth != 0) {
-                reportFatalError("PrematureEOF", null);
-                throw e;
-            }
-
-        } // endOfFileHook()
-
-    } // class FragmentContentDispatcher
-
-} // class XMLDocumentFragmentScannerImpl
diff --git a/src/org/apache/xerces/impl/XMLDocumentScannerImpl.java b/src/org/apache/xerces/impl/XMLDocumentScannerImpl.java
deleted file mode 100644
index bac0709..0000000
--- a/src/org/apache/xerces/impl/XMLDocumentScannerImpl.java
+++ /dev/null
@@ -1,1086 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.util.Stack;
-
-import org.apache.xerces.impl.XMLEntityManager;
-import org.apache.xerces.impl.XMLEntityScanner;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-
-import org.apache.xerces.util.XMLAttributesImpl;
-import org.apache.xerces.util.XMLStringBuffer;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.XMLChar;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLDocumentScanner;
-import org.apache.xerces.xni.parser.XMLDTDScanner;
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-/**
- * This class is responsible for scanning XML document structure
- * and content. The scanner acts as the source for the document
- * information which is communicated to the document handler.
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/namespaces</li>
- *  <li>http://xml.org/sax/features/validation</li>
- *  <li>http://apache.org/xml/features/nonvalidating/load-external-dtd</li>
- *  <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
- *  <li>http://apache.org/xml/features/scanner/notify-builtin-refs</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *  <li>http://apache.org/xml/properties/internal/entity-manager</li>
- *  <li>http://apache.org/xml/properties/internal/dtd-scanner</li>
- * </ul>
- *
- * @author Glenn Marcy, IBM
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- * @author Arnaud  Le Hors, IBM
- * @author Eric Ye, IBM
- *
- * @version $Id$
- */
-public class XMLDocumentScannerImpl
-    extends XMLDocumentFragmentScannerImpl {
-
-    //
-    // Constants
-    //
-
-    // scanner states
-
-    /** Scanner state: XML declaration. */
-    protected static final int SCANNER_STATE_XML_DECL = 0;
-
-    /** Scanner state: prolog. */
-    protected static final int SCANNER_STATE_PROLOG = 5;
-
-    /** Scanner state: trailing misc. */
-    protected static final int SCANNER_STATE_TRAILING_MISC = 12;
-
-    /** Scanner state: DTD internal declarations. */
-    protected static final int SCANNER_STATE_DTD_INTERNAL_DECLS = 17;
-
-    /** Scanner state: open DTD external subset. */
-    protected static final int SCANNER_STATE_DTD_EXTERNAL = 18;
-
-    /** Scanner state: DTD external declarations. */
-    protected static final int SCANNER_STATE_DTD_EXTERNAL_DECLS = 19;
-
-    // feature identifiers
-
-    /** Feature identifier: load external DTD. */
-    protected static final String LOAD_EXTERNAL_DTD =
-        Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE;
-
-    // property identifiers
-
-    /** Property identifier: DTD scanner. */
-    protected static final String DTD_SCANNER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_SCANNER_PROPERTY;
-
-    // recognized features and properties
-
-    /** Recognized features. */
-    private static final String[] RECOGNIZED_FEATURES = {
-        NAMESPACES,
-        VALIDATION,
-        LOAD_EXTERNAL_DTD,
-        NOTIFY_BUILTIN_REFS,
-        NOTIFY_CHAR_REFS,
-    };
-
-    /** Recognized properties. */
-    private static final String[] RECOGNIZED_PROPERTIES = {
-        SYMBOL_TABLE,
-        ERROR_REPORTER,
-        ENTITY_MANAGER,
-        DTD_SCANNER,
-    };
-
-    //
-    // Data
-    //
-
-    // properties
-
-    /** DTD scanner. */
-    protected XMLDTDScanner fDTDScanner;
-
-    // protected data
-
-    /** Scanning DTD. */
-    protected boolean fScanningDTD;
-
-    // other info
-
-    /** Doctype name. */
-    protected String fDoctypeName;
-
-    /** Doctype declaration public identifier. */
-    protected String fDoctypePublicId;
-
-    /** Doctype declaration system identifier. */
-    protected String fDoctypeSystemId;
-
-    // features
-
-    /** Load external DTD. */
-    protected boolean fLoadExternalDTD = true;
-
-    // state
-
-    /** Seen doctype declaration. */
-    protected boolean fSeenDoctypeDecl;
-
-    // dispatchers
-
-    /** XML declaration dispatcher. */
-    protected Dispatcher fXMLDeclDispatcher = new XMLDeclDispatcher();
-
-    /** Prolog dispatcher. */
-    protected Dispatcher fPrologDispatcher = new PrologDispatcher();
-
-    /** DTD dispatcher. */
-    protected Dispatcher fDTDDispatcher = new DTDDispatcher();
-
-    /** Trailing miscellaneous section dispatcher. */
-    protected Dispatcher fTrailingMiscDispatcher = new TrailingMiscDispatcher();
-
-    // temporary variables
-
-    /** Array of 3 strings. */
-    private String[] fStrings = new String[3];
-
-    /** String. */
-    private XMLString fString = new XMLString();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer = new XMLStringBuffer();
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLDocumentScannerImpl() {} // <init>()
-
-    //
-    // XMLDocumentScanner methods
-    //
-
-    /**
-     * Sets the input source.
-     *
-     * @param inputSource The input source.
-     *
-     * @throws IOException Thrown on i/o error.
-     */
-    public void setInputSource(XMLInputSource inputSource) throws IOException {
-        fEntityManager.setEntityHandler(this);
-        fEntityManager.startDocumentEntity(inputSource);
-        fDocumentSystemId = fEntityManager.expandSystemId(inputSource.getSystemId());
-    } // setInputSource(XMLInputSource)
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     *
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Thrown by component on initialization error.
-     *                      For example, if a feature or property is
-     *                      required for the operation of the component, the
-     *                      component manager may throw a
-     *                      SAXNotRecognizedException or a
-     *                      SAXNotSupportedException.
-     */
-    public void reset(XMLComponentManager componentManager)
-        throws XMLConfigurationException {
-
-        super.reset(componentManager);
-
-        // other settings
-        fDoctypeName = null;
-        fDoctypePublicId = null;
-        fDoctypeSystemId = null;
-        fSeenDoctypeDecl = false;
-
-        // xerces features
-        try {
-            fLoadExternalDTD = componentManager.getFeature(LOAD_EXTERNAL_DTD);
-        }
-        catch (XMLConfigurationException e) {
-            fLoadExternalDTD = true;
-        }
-
-        // xerces properties
-        fDTDScanner = (XMLDTDScanner)componentManager.getProperty(DTD_SCANNER);
-
-        // initialize vars
-        fScanningDTD = false;
-
-        // setup dispatcher
-        setScannerState(SCANNER_STATE_XML_DECL);
-        setDispatcher(fXMLDeclDispatcher);
-
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     *
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-
-        super.setFeature(featureId, state);
-
-        // Xerces properties
-        if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
-            String feature = featureId.substring(Constants.XERCES_FEATURE_PREFIX.length());
-            if (feature.equals(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
-                fLoadExternalDTD = state;
-                return;
-            }
-        }
-
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     *
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-
-        super.setProperty(propertyId, value);
-
-        // Xerces properties
-        if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
-            String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
-            if (property.equals(Constants.DTD_SCANNER_PROPERTY)) {
-                fDTDScanner = (XMLDTDScanner)value;
-            }
-            return;
-        }
-
-    } // setProperty(String,Object)
-
-    //
-    // XMLEntityHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
-     * general entities are just specified by their name.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name,
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-
-        super.startEntity(name, publicId, systemId, baseSystemId, encoding);
-
-        // prepare to look for a TextDecl if external general entity
-        if (!name.equals("[xml]") && fEntityScanner.isExternal()) {
-            setScannerState(SCANNER_STATE_TEXT_DECL);
-        }
-
-        // call handler
-        if (fDocumentHandler != null) {
-            if (name.equals("[xml]")) {
-                fDocumentHandler.startDocument(fEntityScanner, encoding, fAugmentations);
-            }
-        }
-
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" parameter entity names start with '%'; and general entities
-     * are just specified by their name.
-     *
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-
-        super.endEntity(name);
-
-        // call handler
-        if (fDocumentHandler != null) {
-            if (name.equals("[xml]")) {
-                fDocumentHandler.endDocument(fAugmentations);
-            }
-        }
-
-    } // endEntity(String)
-
-    //
-    // Protected methods
-    //
-
-    // dispatcher factory methods
-
-    /** Creates a content dispatcher. */
-    protected Dispatcher createContentDispatcher() {
-        return new ContentDispatcher();
-    } // createContentDispatcher():Dispatcher
-
-    // scanning methods
-
-    /** Scans a doctype declaration. */
-    protected boolean scanDoctypeDecl() throws IOException, XNIException {
-
-        // spaces
-        if (!fEntityScanner.skipSpaces()) {
-            reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL",
-                             null);
-        }
-
-        // root element name
-        fDoctypeName = fEntityScanner.scanName();
-        if (fDoctypeName == null) {
-            reportFatalError("MSG_ROOT_ELEMENT_TYPE_REQUIRED", null);
-        }
-
-        // external id
-        if (fEntityScanner.skipSpaces()) {
-            scanExternalID(fStrings, false);
-            fDoctypeSystemId = fStrings[0];
-            fDoctypePublicId = fStrings[1];
-            fEntityScanner.skipSpaces();
-        }
-
-        fHasExternalDTD = fDoctypeSystemId != null;
-
-        // call handler
-        if (fDocumentHandler != null) {
-            // NOTE: I don't like calling the doctypeDecl callback until
-            //       end of the *full* doctype line (including internal
-            //       subset) is parsed correctly but SAX2 requires that
-            //       it knows the root element name and public and system
-            //       identifier for the startDTD call. -Ac
-            fDocumentHandler.doctypeDecl(fDoctypeName, fDoctypePublicId, fDoctypeSystemId,
-                                         fAugmentations);
-        }
-
-        // is there an internal subset?
-        boolean internalSubset = true;
-        if (!fEntityScanner.skipChar('[')) {
-            internalSubset = false;
-            fEntityScanner.skipSpaces();
-            if (!fEntityScanner.skipChar('>')) {
-                reportFatalError("DoctypedeclUnterminated", new Object[]{fDoctypeName});
-            }
-            fMarkupDepth--;
-        }
-
-        return internalSubset;
-
-    } // scanDoctypeDecl():boolean
-
-    //
-    // Private methods
-    //
-
-    /** Returns the scanner state name. */
-    protected String getScannerStateName(int state) {
-
-        switch (state) {
-            case SCANNER_STATE_XML_DECL: return "SCANNER_STATE_XML_DECL";
-            case SCANNER_STATE_PROLOG: return "SCANNER_STATE_PROLOG";
-            case SCANNER_STATE_TRAILING_MISC: return "SCANNER_STATE_TRAILING_MISC";
-            case SCANNER_STATE_DTD_INTERNAL_DECLS: return "SCANNER_STATE_DTD_INTERNAL_DECLS";
-            case SCANNER_STATE_DTD_EXTERNAL: return "SCANNER_STATE_DTD_EXTERNAL";
-            case SCANNER_STATE_DTD_EXTERNAL_DECLS: return "SCANNER_STATE_DTD_EXTERNAL_DECLS";
-        }
-        return super.getScannerStateName(state);
-
-    } // getScannerStateName(int):String
-
-    //
-    // Classes
-    //
-
-    /**
-     * Dispatcher to handle XMLDecl scanning.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected final class XMLDeclDispatcher
-        implements Dispatcher {
-
-        //
-        // Dispatcher methods
-        //
-
-        /**
-         * Dispatch an XML "event".
-         *
-         * @param complete True if this dispatcher is intended to scan
-         *                 and dispatch as much as possible.
-         *
-         * @returns True if there is more to dispatch either from this
-         *          or a another dispatcher.
-         *
-         * @throws IOException  Thrown on i/o error.
-         * @throws XNIException Thrown on parse error.
-         */
-        public boolean dispatch(boolean complete)
-            throws IOException, XNIException {
-
-            // next dispatcher is prolog regardless of whether there
-            // is an XMLDecl in this document
-            setScannerState(SCANNER_STATE_PROLOG);
-            setDispatcher(fPrologDispatcher);
-
-            // scan XMLDecl
-            try {
-                if (fEntityScanner.skipString("<?xml")) {
-                    fMarkupDepth++;
-                    // NOTE: special case where document starts with a PI
-                    //       whose name starts with "xml" (e.g. "xmlfoo")
-                    if (XMLChar.isName(fEntityScanner.peekChar())) {
-                        fStringBuffer.clear();
-                        fStringBuffer.append("xml");
-                        while (XMLChar.isName(fEntityScanner.peekChar())) {
-                            fStringBuffer.append((char)fEntityScanner.scanChar());
-                        }
-                        String target = fSymbolTable.addSymbol(fStringBuffer.ch, fStringBuffer.offset, fStringBuffer.length);
-                        scanPIData(target, fString);
-                    }
-
-                    // standard XML declaration
-                    else {
-                        scanXMLDeclOrTextDecl(false);
-                    }
-                    return true;
-                }
-            }
-
-            // premature end of file
-            catch (EOFException e) {
-                reportFatalError("PrematureEOF", null);
-                throw e;
-            }
-
-            // if no XMLDecl, then scan piece of prolog
-            return true;
-
-        } // dispatch(boolean):boolean
-
-    } // class XMLDeclDispatcher
-
-    /**
-     * Dispatcher to handle prolog scanning.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected final class PrologDispatcher
-        implements Dispatcher {
-
-        //
-        // Dispatcher methods
-        //
-
-        /**
-         * Dispatch an XML "event".
-         *
-         * @param complete True if this dispatcher is intended to scan
-         *                 and dispatch as much as possible.
-         *
-         * @returns True if there is more to dispatch either from this
-         *          or a another dispatcher.
-         *
-         * @throws IOException  Thrown on i/o error.
-         * @throws XNIException Thrown on parse error.
-         */
-        public boolean dispatch(boolean complete)
-            throws IOException, XNIException {
-
-            try {
-                boolean again;
-                do {
-                    again = false;
-                    switch (fScannerState) {
-                        case SCANNER_STATE_PROLOG: {
-                            // if we're here then we're past the prolog decl!
-                            fEntityManager.fCurrentEntity.mayReadChunks = true;
-                            fEntityScanner.skipSpaces();
-                            if (fEntityScanner.skipChar('<')) {
-                                setScannerState(SCANNER_STATE_START_OF_MARKUP);
-                                again = true;
-                            }
-                            else if (fEntityScanner.skipChar('&')) {
-                                setScannerState(SCANNER_STATE_REFERENCE);
-                                again = true;
-                            }
-                            else {
-                                setScannerState(SCANNER_STATE_CONTENT);
-                                again = true;
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_START_OF_MARKUP: {
-                            fMarkupDepth++;
-                            if (fEntityScanner.skipChar('?')) {
-                                setScannerState(SCANNER_STATE_PI);
-                                again = true;
-                            }
-                            else if (fEntityScanner.skipChar('!')) {
-                                if (fEntityScanner.skipChar('-')) {
-                                    if (!fEntityScanner.skipChar('-')) {
-                                        reportFatalError("InvalidCommentStart",
-                                                         null);
-                                    }
-                                    setScannerState(SCANNER_STATE_COMMENT);
-                                    again = true;
-                                }
-                                else if (fEntityScanner.skipString("DOCTYPE")) {
-                                    setScannerState(SCANNER_STATE_DOCTYPE);
-                                    again = true;
-                                }
-                                else {
-                                    reportFatalError("MarkupNotRecognizedInProlog",
-                                                     null);
-                                }
-                            }
-                            else if (XMLChar.isNameStart(fEntityScanner.peekChar())) {
-                                setScannerState(SCANNER_STATE_ROOT_ELEMENT);
-                                setDispatcher(fContentDispatcher);
-                                return true;
-                            }
-                            else {
-                                reportFatalError("MarkupNotRecognizedInProlog",
-                                                 null);
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_COMMENT: {
-                            scanComment();
-                            setScannerState(SCANNER_STATE_PROLOG);
-                            break;
-                        }
-                        case SCANNER_STATE_PI: {
-                            scanPI();
-                            setScannerState(SCANNER_STATE_PROLOG);
-                            break;
-                        }
-                        case SCANNER_STATE_DOCTYPE: {
-                            if (fSeenDoctypeDecl) {
-                                reportFatalError("AlreadySeenDoctype", null);
-                            }
-                            fSeenDoctypeDecl = true;
-                            if (scanDoctypeDecl()) {
-                                setScannerState(SCANNER_STATE_DTD_INTERNAL_DECLS);
-                                setDispatcher(fDTDDispatcher);
-                                return true;
-                            }
-                            if (fDoctypeSystemId != null) {
-                                setScannerState(SCANNER_STATE_DTD_EXTERNAL);
-                                setDispatcher(fDTDDispatcher);
-                                return true;
-                            }
-                            setScannerState(SCANNER_STATE_PROLOG);
-                            break;
-                        }
-                        case SCANNER_STATE_CONTENT: {
-                            reportFatalError("ContentIllegalInProlog", null);
-                            fEntityScanner.scanChar();
-                        }
-                        case SCANNER_STATE_REFERENCE: {
-                            reportFatalError("ReferenceIllegalInProlog", null);
-                        }
-                    }
-                } while (complete || again);
-
-                if (complete) {
-                    if (fEntityScanner.scanChar() != '<') {
-                        reportFatalError("RootElementRequired", null);
-                    }
-                    setScannerState(SCANNER_STATE_ROOT_ELEMENT);
-                    setDispatcher(fContentDispatcher);
-                }
-            }
-
-            // premature end of file
-            catch (EOFException e) {
-                reportFatalError("PrematureEOF", null);
-                throw e;
-            }
-
-            return true;
-
-        } // dispatch(boolean):boolean
-
-    } // class PrologDispatcher
-
-    /**
-     * Dispatcher to handle the internal and external DTD subsets.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected final class DTDDispatcher
-        implements Dispatcher {
-
-        //
-        // Dispatcher methods
-        //
-
-        /**
-         * Dispatch an XML "event".
-         *
-         * @param complete True if this dispatcher is intended to scan
-         *                 and dispatch as much as possible.
-         *
-         * @returns True if there is more to dispatch either from this
-         *          or a another dispatcher.
-         *
-         * @throws IOException  Thrown on i/o error.
-         * @throws XNIException Thrown on parse error.
-         */
-        public boolean dispatch(boolean complete)
-            throws IOException, XNIException {
-
-            fEntityManager.setEntityHandler(null);
-            try {
-                boolean again;
-                do {
-                    again = false;
-                    switch (fScannerState) {
-                        case SCANNER_STATE_DTD_INTERNAL_DECLS: {
-                            // REVISIT: Should there be a feature for
-                            //          the "complete" parameter?
-                            boolean completeDTD = true;
-                            boolean moreToScan = fDTDScanner.scanDTDInternalSubset(completeDTD, fStandalone, fHasExternalDTD);
-                            if (!moreToScan) {
-                                // end doctype declaration
-                                if (!fEntityScanner.skipChar(']')) {
-                                    reportFatalError("EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET",
-                                                     null);
-                                }
-                                fEntityScanner.skipSpaces();
-                                if (!fEntityScanner.skipChar('>')) {
-                                    reportFatalError("DoctypedeclUnterminated", new Object[]{fDoctypeName});
-                                }
-                                fMarkupDepth--;
-
-                                // scan external subset next
-                                if (fDoctypeSystemId != null && (fValidation || fLoadExternalDTD)) {
-                                    setScannerState(SCANNER_STATE_DTD_EXTERNAL);
-                                }
-
-                                // break out of here
-                                else {
-                                    setScannerState(SCANNER_STATE_PROLOG);
-                                    setDispatcher(fPrologDispatcher);
-                                    fEntityManager.setEntityHandler(XMLDocumentScannerImpl.this);
-                                    return true;
-                                }
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_DTD_EXTERNAL: {
-                            XMLInputSource xmlInputSource =
-                                fEntityManager.resolveEntity(fDoctypePublicId, fDoctypeSystemId, fDocumentSystemId);
-                            fDTDScanner.setInputSource(xmlInputSource);
-                            setScannerState(SCANNER_STATE_DTD_EXTERNAL_DECLS);
-                            again = true;
-                            break;
-                        }
-                        case SCANNER_STATE_DTD_EXTERNAL_DECLS: {
-                            // REVISIT: Should there be a feature for
-                            //          the "complete" parameter?
-                            boolean completeDTD = true;
-                            boolean moreToScan = fDTDScanner.scanDTDExternalSubset(completeDTD);
-                            if (!moreToScan) {
-                                setScannerState(SCANNER_STATE_PROLOG);
-                                setDispatcher(fPrologDispatcher);
-                                fEntityManager.setEntityHandler(XMLDocumentScannerImpl.this);
-                                return true;
-                            }
-                            break;
-                        }
-                        default: {
-                            throw new XNIException("DTDDispatcher#dispatch: scanner state="+fScannerState+" ("+getScannerStateName(fScannerState)+')');
-                        }
-                    }
-                } while (complete || again);
-            }
-
-            // premature end of file
-            catch (EOFException e) {
-                reportFatalError("PrematureEOF", null);
-                throw e;
-            }
-
-            // cleanup
-            finally {
-                fEntityManager.setEntityHandler(XMLDocumentScannerImpl.this);
-            }
-
-            return true;
-
-        } // dispatch(boolean):boolean
-
-    } // class DTDDispatcher
-
-    /**
-     * Dispatcher to handle content scanning.
-     *
-     * @author Andy Clark, IBM
-     * @author Eric Ye, IBM
-     */
-    protected final class ContentDispatcher
-        extends FragmentContentDispatcher {
-
-        //
-        // Protected methods
-        //
-
-        // hooks
-
-        // NOTE: These hook methods are added so that the full document
-        //       scanner can share the majority of code with this class.
-
-        /**
-         * Scan for DOCTYPE hook. This method is a hook for subclasses
-         * to add code to handle scanning for a the "DOCTYPE" string
-         * after the string "<!" has been scanned.
-         *
-         * @returns True if the "DOCTYPE" was scanned; false if "DOCTYPE"
-         *          was not scanned.
-         */
-        protected boolean scanForDoctypeHook()
-            throws IOException, XNIException {
-
-            if (fEntityScanner.skipString("DOCTYPE")) {
-                setScannerState(SCANNER_STATE_DOCTYPE);
-                return true;
-            }
-            return false;
-
-        } // scanForDoctypeHook():boolean
-
-        /**
-         * Element depth iz zero. This methos is a hook for subclasses
-         * to add code to handle when the element depth hits zero. When
-         * scanning a document fragment, an element depth of zero is
-         * normal. However, when scanning a full XML document, the
-         * scanner must handle the trailing miscellanous section of
-         * the document after the end of the document's root element.
-         *
-         * @returns True if the caller should stop and return true which
-         *          allows the scanner to switch to a new scanning
-         *          dispatcher. A return value of false indicates that
-         *          the content dispatcher should continue as normal.
-         */
-        protected boolean elementDepthIsZeroHook()
-            throws IOException, XNIException {
-
-            setScannerState(SCANNER_STATE_TRAILING_MISC);
-            setDispatcher(fTrailingMiscDispatcher);
-            return true;
-
-        } // elementDepthIsZeroHook():boolean
-
-        /**
-         * Scan for root element hook. This method is a hook for
-         * subclasses to add code that handles scanning for the root
-         * element. When scanning a document fragment, there is no
-         * "root" element. However, when scanning a full XML document,
-         * the scanner must handle the root element specially.
-         *
-         * @returns True if the caller should stop and return true which
-         *          allows the scanner to switch to a new scanning
-         *          dispatcher. A return value of false indicates that
-         *          the content dispatcher should continue as normal.
-         */
-        protected boolean scanRootElementHook()
-            throws IOException, XNIException {
-
-            if (scanStartElement()) {
-                setScannerState(SCANNER_STATE_TRAILING_MISC);
-                setDispatcher(fTrailingMiscDispatcher);
-                return true;
-            }
-            return false;
-
-        } // scanRootElementHook():boolean
-
-        /**
-         * End of file hook. This method is a hook for subclasses to
-         * add code that handles the end of file. The end of file in
-         * a document fragment is OK if the markup depth is zero.
-         * However, when scanning a full XML document, an end of file
-         * is always premature.
-         */
-        protected void endOfFileHook(EOFException e)
-            throws IOException, XNIException {
-
-            reportFatalError("PrematureEOF", null);
-            throw e;
-
-        } // endOfFileHook()
-
-    } // class ContentDispatcher
-
-    /**
-     * Dispatcher to handle trailing miscellaneous section scanning.
-     *
-     * @author Andy Clark, IBM
-     * @author Eric Ye, IBM
-     */
-    protected final class TrailingMiscDispatcher
-        implements Dispatcher {
-
-        //
-        // Dispatcher methods
-        //
-
-        /**
-         * Dispatch an XML "event".
-         *
-         * @param complete True if this dispatcher is intended to scan
-         *                 and dispatch as much as possible.
-         *
-         * @returns True if there is more to dispatch either from this
-         *          or a another dispatcher.
-         *
-         * @throws IOException  Thrown on i/o error.
-         * @throws XNIException Thrown on parse error.
-         */
-        public boolean dispatch(boolean complete)
-            throws IOException, XNIException {
-
-            try {
-                boolean again;
-                do {
-                    again = false;
-                    switch (fScannerState) {
-                        case SCANNER_STATE_TRAILING_MISC: {
-                            fEntityScanner.skipSpaces();
-                            if (fEntityScanner.skipChar('<')) {
-                                setScannerState(SCANNER_STATE_START_OF_MARKUP);
-                                again = true;
-                            }
-                            else {
-                                setScannerState(SCANNER_STATE_CONTENT);
-                                again = true;
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_START_OF_MARKUP: {
-                            fMarkupDepth++;
-                            if (fEntityScanner.skipChar('?')) {
-                                setScannerState(SCANNER_STATE_PI);
-                                again = true;
-                            }
-                            else if (fEntityScanner.skipChar('!')) {
-                                setScannerState(SCANNER_STATE_COMMENT);
-                                again = true;
-                            }
-                            /***
-                            // REVISIT: Should we detect this?
-                            else if (XMLChar.isNameStart(fEntityScanner.peekChar())) {
-                                reportFatalError("MarkupNotRecognizedInMisc",
-                                                 null);
-                                // REVISIT: continue after fatal error
-                            }
-                            /***/
-                            else {
-                                reportFatalError("MarkupNotRecognizedInMisc",
-                                                 null);
-                            }
-                            break;
-                        }
-                        case SCANNER_STATE_PI: {
-                            scanPI();
-                            setScannerState(SCANNER_STATE_TRAILING_MISC);
-                            break;
-                        }
-                        case SCANNER_STATE_COMMENT: {
-                            if (!fEntityScanner.skipString("--")) {
-                                reportFatalError("InvalidCommentStart", null);
-                            }
-                            scanComment();
-                            setScannerState(SCANNER_STATE_TRAILING_MISC);
-                            break;
-                        }
-                        case SCANNER_STATE_CONTENT: {
-                            int ch = fEntityScanner.peekChar();
-                            if (ch == -1) {
-                                setScannerState(SCANNER_STATE_TERMINATED);
-                                return false;
-                            }
-                            reportFatalError("ContentIllegalInTrailingMisc",
-                                             null);
-                            fEntityScanner.scanChar();
-                            setScannerState(SCANNER_STATE_TRAILING_MISC);
-                            break;
-                        }
-                        case SCANNER_STATE_REFERENCE: {
-                            reportFatalError("ReferenceIllegalInTrailingMisc",
-                                             null);
-                            setScannerState(SCANNER_STATE_TRAILING_MISC);
-                            break;
-                        }
-                        case SCANNER_STATE_TERMINATED: {
-                            return false;
-                        }
-                    }
-                } while (complete || again);
-            }
-            catch (EOFException e) {
-                // NOTE: This is the only place we're allowed to reach
-                //       the real end of the document stream. Unless the
-                //       end of file was reached prematurely.
-                if (fMarkupDepth != 0) {
-                    reportFatalError("PrematureEOF", null);
-                    throw e;
-                }
-
-                setScannerState(SCANNER_STATE_TERMINATED);
-                return false;
-            }
-
-            return true;
-
-        } // dispatch(boolean):boolean
-
-    } // class TrailingMiscDispatcher
-
-} // class XMLDocumentScannerImpl
diff --git a/src/org/apache/xerces/impl/XMLEntityHandler.java b/src/org/apache/xerces/impl/XMLEntityHandler.java
deleted file mode 100644
index 85353f4..0000000
--- a/src/org/apache/xerces/impl/XMLEntityHandler.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import  org.apache.xerces.xni.XNIException;
-
-/**
- * The entity handler interface defines methods to report information
- * about the start and end of entities.
- *
- * @see org.apache.xerces.impl.XMLEntityScanner
- *
- * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLEntityHandler {
-
-    //
-    // XMLEntityHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the 
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and 
-     * general entities are just specified by their name.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException;
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" parameter entity names start with '%'; and general entities 
-     * are just specified by their name.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException;
-
-} // interface XMLEntityHandler
diff --git a/src/org/apache/xerces/impl/XMLEntityManager.java b/src/org/apache/xerces/impl/XMLEntityManager.java
deleted file mode 100644
index 3f16a97..0000000
--- a/src/org/apache/xerces/impl/XMLEntityManager.java
+++ /dev/null
@@ -1,3337 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.io.EOFException;
-import java.io.FileInputStream;
-import java.io.FilterReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.StringReader;
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.Stack;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.io.ASCIIReader;
-import org.apache.xerces.impl.io.UCSReader;
-import org.apache.xerces.impl.io.UTF8Reader;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-
-import org.apache.xerces.util.EncodingMap;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.URI;
-import org.apache.xerces.util.XMLChar;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-/**
- * The entity manager handles the registration of general and parameter
- * entities; resolves entities; and starts entities. The entity manager
- * is a central component in a standard parser configuration and this
- * class works directly with the entity scanner to manage the underlying
- * xni.
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/validation</li>
- *  <li>http://xml.org/sax/features/external-general-entities</li>
- *  <li>http://xml.org/sax/features/external-parameter-entities</li>
- *  <li>http://apache.org/xml/features/allow-java-encodings</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *  <li>http://apache.org/xml/properties/internal/entity-resolver</li>
- * </ul>
- *
- *
- * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
- * @author Andy Clark, IBM
- * @author Arnaud  Le Hors, IBM
- *
- * @version $Id$
- */
-public class XMLEntityManager
-    implements XMLComponent, XMLEntityResolver {
-
-    //
-    // Constants
-    //
-
-    /** Default buffer size (2048). */
-    public static final int DEFAULT_BUFFER_SIZE = 2048;
-
-    // feature identifiers
-
-    /** Feature identifier: validation. */
-    protected static final String VALIDATION =
-        Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
-    /** Feature identifier: external general entities. */
-    protected static final String EXTERNAL_GENERAL_ENTITIES =
-        Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-
-    /** Feature identifier: external parameter entities. */
-    protected static final String EXTERNAL_PARAMETER_ENTITIES =
-        Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-
-    /** Feature identifier: allow Java encodings. */
-    protected static final String ALLOW_JAVA_ENCODINGS =
-        Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
-
-    // property identifiers
-
-    /** Property identifier: symbol table. */
-    protected static final String SYMBOL_TABLE =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    /** Property identifier: error reporter. */
-    protected static final String ERROR_REPORTER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
-    /** Property identifier: entity resolver. */
-    protected static final String ENTITY_RESOLVER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
-
-    // recognized features and properties
-
-    /** Recognized features. */
-    private static final String[] RECOGNIZED_FEATURES = {
-        VALIDATION,
-        EXTERNAL_GENERAL_ENTITIES,
-        EXTERNAL_PARAMETER_ENTITIES,
-        ALLOW_JAVA_ENCODINGS,
-    };
-
-    /** Recognized properties. */
-    private static final String[] RECOGNIZED_PROPERTIES = {
-        SYMBOL_TABLE,
-        ERROR_REPORTER,
-        ENTITY_RESOLVER,
-    };
-
-    // debugging
-
-    /**
-     * Debug printing of buffer. This debugging flag works best when you
-     * resize the DEFAULT_BUFFER_SIZE down to something reasonable like
-     * 64 characters.
-     */
-    private static final boolean DEBUG_BUFFER = false;
-
-    /** Debug some basic entities. */
-    private static final boolean DEBUG_ENTITIES = false;
-
-    /** Debug switching readers for encodings. */
-    private static final boolean DEBUG_ENCODINGS = false;
-
-    // should be diplayed trace resolving messages
-    private static final boolean DEBUG_RESOLVER = false;
-
-    //
-    // Data
-    //
-
-    // features
-
-    /**
-     * Validation. This feature identifier is:
-     * http://xml.org/sax/features/validation
-     */
-    protected boolean fValidation;
-
-    /**
-     * External general entities. This feature identifier is:
-     * http://xml.org/sax/features/external-general-entities
-     */
-    protected boolean fExternalGeneralEntities;
-
-    /**
-     * External parameter entities. This feature identifier is:
-     * http://xml.org/sax/features/external-parameter-entities
-     */
-    protected boolean fExternalParameterEntities;
-
-    /**
-     * Allow Java encoding names. This feature identifier is:
-     * http://apache.org/xml/features/allow-java-encodings
-     */
-    protected boolean fAllowJavaEncodings;
-
-    // properties
-
-    /**
-     * Symbol table. This property identifier is:
-     * http://apache.org/xml/properties/internal/symbol-table
-     */
-    protected SymbolTable fSymbolTable;
-
-    /**
-     * Error reporter. This property identifier is:
-     * http://apache.org/xml/properties/internal/error-reporter
-     */
-    protected XMLErrorReporter fErrorReporter;
-
-    /**
-     * Entity resolver. This property identifier is:
-     * http://apache.org/xml/properties/internal/entity-resolver
-     */
-    protected XMLEntityResolver fEntityResolver;
-
-    // settings
-
-    /**
-     * Buffer size. This feature does not have a feature identifier, yet.
-     * Should it?
-     */
-    protected int fBufferSize = DEFAULT_BUFFER_SIZE;
-
-    /**
-     * True if the document entity is standalone. This should really
-     * only be set by the document source (e.g. XMLDocumentScanner).
-     */
-    protected boolean fStandalone;
-
-    // handlers
-
-    /** Entity handler. */
-    protected XMLEntityHandler fEntityHandler;
-
-    // scanner
-
-    /** Entity scanner. */
-    protected XMLEntityScanner fEntityScanner;
-
-    // entities
-
-    /** Entities. */
-    protected Hashtable fEntities = new Hashtable();
-
-    /** Entity stack. */
-    protected Stack fEntityStack = new Stack();
-
-    /** Current entity. */
-    protected ScannedEntity fCurrentEntity;
-
-    // shared context
-
-    /** Shared declared entities. */
-    protected Hashtable fDeclaredEntities;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLEntityManager() {
-        this(null);
-    } // <init>()
-
-    /**
-     * Constructs an entity manager that shares the specified entity
-     * declarations during each parse.
-     * <p>
-     * <strong>REVISIT:</strong> We might want to think about the "right"
-     * way to expose the list of declared entities. For now, the knowledge
-     * how to access the entity declarations is implicit.
-     */
-    public XMLEntityManager(XMLEntityManager entityManager) {
-
-        // create scanner
-        fEntityScanner = new EntityScanner();
-
-        // save shared entity declarations
-        fDeclaredEntities = entityManager != null
-                          ? entityManager.getDeclaredEntities() : null;
-
-    } // <init>(XMLEntityManager)
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Sets whether the document entity is standalone.
-     *
-     * @param standalone True if document entity is standalone.
-     */
-    public void setStandalone(boolean standalone) {
-        fStandalone = standalone;
-    } // setStandalone(boolean)
-
-    /** Returns true if the document entity is standalone. */
-    public boolean isStandalone() {
-        return fStandalone;
-    } // isStandalone():boolean
-
-    /**
-     * Sets the entity handler. When an entity starts and ends, the
-     * entity handler is notified of the change.
-     *
-     * @param entityHandler The new entity handler.
-     */
-    public void setEntityHandler(XMLEntityHandler entityHandler) {
-        fEntityHandler = entityHandler;
-    } // setEntityHandler(XMLEntityHandler)
-
-    /**
-     * Adds an internal entity declaration.
-     * <p>
-     * <strong>Note:</strong> This method ignores subsequent entity
-     * declarations.
-     * <p>
-     * <strong>Note:</strong> The name should be a unique symbol. The
-     * SymbolTable can be used for this purpose.
-     *
-     * @param name The name of the entity.
-     * @param text The text of the entity.
-     *
-     * @see SymbolTable
-     */
-    public void addInternalEntity(String name, String text) {
-        if (!fEntities.containsKey(name)) {
-            Entity entity = new InternalEntity(name, text);
-            fEntities.put(name, entity);
-        }
-    } // addInternalEntity(String,String)
-
-    /**
-     * Adds an external entity declaration.
-     * <p>
-     * <strong>Note:</strong> This method ignores subsequent entity
-     * declarations.
-     * <p>
-     * <strong>Note:</strong> The name should be a unique symbol. The
-     * SymbolTable can be used for this purpose.
-     *
-     * @param name         The name of the entity.
-     * @param publicId     The public identifier of the entity.
-     * @param systemId     The system identifier of the entity.
-     * @param baseSystemId The base system identifier of the entity.
-     *                     This is the system identifier of the entity
-     *                     where <em>the entity being added</em> and
-     *                     is used to expand the system identifier when
-     *                     the system identifier is a relative URI.
-     *                     When null the system identifier of the first
-     *                     external entity on the stack is used instead.
-     *
-     * @see SymbolTable
-     */
-    public void addExternalEntity(String name,
-                                  String publicId, String systemId,
-                                  String baseSystemId) {
-        if (!fEntities.containsKey(name)) {
-            if (baseSystemId == null) {
-                // search for the first external entity on the stack
-                int size = fEntityStack.size();
-                if (size == 0 && fCurrentEntity != null) {
-                    baseSystemId = fCurrentEntity.systemId;
-                }
-                for (int i = size - 1; i >= 0 ; i--) {
-                    ScannedEntity externalEntity =
-                        (ScannedEntity)fEntityStack.elementAt(i);
-                    if (externalEntity.systemId != null) {
-                        baseSystemId = externalEntity.systemId;
-                    }
-                }
-            }
-            Entity entity = new ExternalEntity(name, publicId, systemId,
-                                               baseSystemId, null);
-            fEntities.put(name, entity);
-        }
-    } // addExternalEntity(String,String,String,String)
-
-    /**
-     * Checks whether an entity given by name is external.
-     *
-     * @param entityName The name of the entity to check.
-     * @returns True if the entity is external, false otherwise
-     *           (including when the entity is not declared).
-     */
-    public boolean isExternalEntity(String entityName) {
-
-        Entity entity = (Entity)fEntities.get(entityName);
-        if (entity == null) {
-            return false;
-        }
-        return entity.isExternal();
-    }
-
-    /**
-     * Adds an unparsed entity declaration.
-     * <p>
-     * <strong>Note:</strong> This method ignores subsequent entity
-     * declarations.
-     * <p>
-     * <strong>Note:</strong> The name should be a unique symbol. The
-     * SymbolTable can be used for this purpose.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity.
-     * @param systemId The system identifier of the entity.
-     * @param notation The name of the notation.
-     *
-     * @see SymbolTable
-     */
-    public void addUnparsedEntity(String name,
-                                  String publicId, String systemId,
-                                  String notation) {
-        if (!fEntities.containsKey(name)) {
-            Entity entity = new ExternalEntity(name, publicId, systemId, null, notation);
-            fEntities.put(name, entity);
-        }
-    } // addUnparsedEntity(String,String,String,String)
-
-    /**
-     * Checks whether an entity given by name is unparsed.
-     *
-     * @param entityName The name of the entity to check.
-     * @returns True if the entity is unparsed, false otherwise
-     *          (including when the entity is not declared).
-     */
-    public boolean isUnparsedEntity(String entityName) {
-
-        Entity entity = (Entity)fEntities.get(entityName);
-        if (entity == null) {
-            return false;
-        }
-        return entity.isUnparsed();
-    }
-
-    /**
-     * Checks whether an entity given by name is declared.
-     *
-     * @param entityName The name of the entity to check.
-     * @returns True if the entity is declared, false otherwise.
-     */
-    public boolean isDeclaredEntity(String entityName) {
-
-        Entity entity = (Entity)fEntities.get(entityName);
-        return entity != null;
-    }
-
-    /**
-     * Resolves the specified public and system identifiers. This
-     * method first attempts to resolve the entity based on the
-     * EntityResolver registered by the application. If no entity
-     * resolver is registered or if the registered entity handler
-     * is unable to resolve the entity, then default entity
-     * resolution will occur.
-     *
-     * @param publicId     The public identifier of the entity.
-     * @param systemId     The system identifier of the entity.
-     * @param baseSystemId The base system identifier of the entity.
-     *                     This is the system identifier of the current
-     *                     entity and is used to expand the system
-     *                     identifier when the system identifier is a
-     *                     relative URI.
-     *
-     * @return Returns an input source that wraps the resolved entity.
-     *         This method will never return null.
-     *
-     * @throws IOException  Thrown on i/o error.
-     * @throws XNIException Thrown by entity resolver to signal an error.
-     */
-    public XMLInputSource resolveEntity(String publicId, String systemId,
-                                        String baseSystemId)
-        throws IOException, XNIException {
-
-        // if no base systemId given, assume that it's relative
-        // to the systemId of the current scanned entity
-        if (baseSystemId == null && fCurrentEntity != null) {
-            baseSystemId = fCurrentEntity.systemId;
-        }
-
-        // give the entity resolver a chance
-        XMLInputSource xmlInputSource = null;
-        if (fEntityResolver != null) {
-             xmlInputSource = fEntityResolver.resolveEntity(publicId, systemId, baseSystemId);
-        }
-
-        // do default resolution
-        // REVISIT: what's the correct behavior if the user provided an entity
-        // resolver (fEntityResolver != null), but resolveEntity doesn't return
-        // an input source (xmlInputSource == null)?
-        // do we do default resolution, or do we just return null? -SG
-        if (xmlInputSource == null) {
-            // REVISIT: when systemId is null, I think we should return null.
-            //          is this the right solution? -SG
-            //if (systemId != null)
-            xmlInputSource = new XMLInputSource(publicId, systemId, baseSystemId);
-        }
-
-        if (DEBUG_RESOLVER) {
-            System.err.println("XMLEntityManager.resolveEntity(" + publicId + ")");
-            System.err.println(" = " + xmlInputSource);
-        }
-
-        return xmlInputSource;
-
-    } // resolveEntity(String,String,String):XMLInputSource
-
-    /**
-     * Starts a named entity.
-     *
-     * @param entityName The name of the entity to start.
-     * @param literal    True if this entity is started within a literal
-     *                   value.
-     *
-     * @throws IOException  Thrown on i/o error.
-     * @throws XNIException Thrown by entity handler to signal an error.
-     */
-    public void startEntity(String entityName, boolean literal)
-        throws IOException, XNIException {
-
-        // was entity declared?
-        Entity entity = (Entity)fEntities.get(entityName);
-        if (entity == null) {
-            if (fEntityHandler != null) {
-                final String publicId = null;
-                final String systemId = null;
-                final String baseSystemId = null;
-                final String encoding = null;
-                fEntityHandler.startEntity(entityName,
-                                           publicId, systemId,
-                                           baseSystemId, encoding);
-                fEntityHandler.endEntity(entityName);
-            }
-            return;
-        }
-
-        // should we skip external entities?
-        boolean external = entity.isExternal();
-        if (external) {
-            boolean unparsed = entity.isUnparsed();
-            boolean parameter = entityName.startsWith("%");
-            boolean general = !parameter;
-            if (unparsed || (general && !fExternalGeneralEntities) ||
-                (parameter && !fExternalParameterEntities)) {
-                if (fEntityHandler != null) {
-                    String publicId = null;
-                    String systemId = null;
-                    String baseSystemId = null;
-                    final String encoding = null;
-                    if (external) {
-                        ExternalEntity externalEntity = (ExternalEntity)entity;
-                        publicId = externalEntity.publicId;
-                        systemId = externalEntity.systemId;
-                        baseSystemId = expandSystemId(systemId, externalEntity.baseSystemId);
-                    }
-                    fEntityHandler.startEntity(entityName,
-                                               publicId, systemId,
-                                               baseSystemId, encoding);
-                    fEntityHandler.endEntity(entityName);
-                }
-                return;
-            }
-        }
-
-        // is entity recursive?
-        int size = fEntityStack.size();
-        for (int i = size; i >= 0; i--) {
-            Entity activeEntity = i == size
-                                ? fCurrentEntity
-                                : (Entity)fEntityStack.elementAt(i);
-            if (activeEntity.name == entityName) {
-                String path = entityName;
-                for (int j = i + 1; j < size; j++) {
-                    activeEntity = (Entity)fEntityStack.elementAt(j);
-                    path = path + " -> " + activeEntity.name;
-                }
-                path = path + " -> " + fCurrentEntity.name;
-                path = path + " -> " + entityName;
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                           "RecursiveReference",
-                                           new Object[] { entityName, path },
-                                           XMLErrorReporter.SEVERITY_FATAL_ERROR);
-                if (fEntityHandler != null) {
-                    String publicId = null;
-                    String systemId = null;
-                    String baseSystemId = null;
-                    final String encoding = null;
-                    if (external) {
-                        ExternalEntity externalEntity = (ExternalEntity)entity;
-                        publicId = externalEntity.publicId;
-                        systemId = externalEntity.systemId;
-                        baseSystemId = expandSystemId(systemId, externalEntity.baseSystemId);
-                    }
-                    fEntityHandler.startEntity(entityName,
-                                               publicId, systemId,
-                                               baseSystemId, encoding);
-                    fEntityHandler.endEntity(entityName);
-                }
-                return;
-            }
-        }
-
-        // resolve external entity
-        XMLInputSource xmlInputSource = null;
-        if (external) {
-            ExternalEntity externalEntity = (ExternalEntity)entity;
-            String publicId = externalEntity.publicId;
-            String systemId = externalEntity.systemId;
-            String baseSystemId = externalEntity.baseSystemId;
-            xmlInputSource = resolveEntity(publicId, systemId, baseSystemId);
-        }
-
-        // wrap internal entity
-        else {
-            InternalEntity internalEntity = (InternalEntity)entity;
-            Reader reader = new StringReader(internalEntity.text);
-            xmlInputSource = new XMLInputSource(null, null, null, reader, null);
-        }
-
-        // start the entity
-        startEntity(entityName, xmlInputSource, literal);
-
-    } // startEntity(String,boolean)
-
-    /**
-     * Starts the document entity. The document entity has the "[xml]"
-     * pseudo-name.
-     *
-     * @param xmlInputSource The input source of the document entity.
-     *
-     * @throws IOException  Thrown on i/o error.
-     * @throws XNIException Thrown by entity handler to signal an error.
-     */
-    public void startDocumentEntity(XMLInputSource xmlInputSource)
-        throws IOException, XNIException {
-        final String entityName = fSymbolTable.addSymbol("[xml]");
-        startEntity(entityName, xmlInputSource, false);
-    } // startDocumentEntity(XMLInputSource)
-
-    /**
-     * Starts the DTD entity. The DTD entity has the "[dtd]"
-     * pseudo-name.
-     *
-     * @param xmlInputSource The input source of the DTD entity.
-     *
-     * @throws IOException  Thrown on i/o error.
-     * @throws XNIException Thrown by entity handler to signal an error.
-     */
-    public void startDTDEntity(XMLInputSource xmlInputSource)
-        throws IOException, XNIException {
-        final String entityName = fSymbolTable.addSymbol("[dtd]");
-        startEntity(entityName, xmlInputSource, false);
-    } // startDTDEntity(XMLInputSource)
-
-    /**
-     * Starts an entity.
-     * <p>
-     * This method can be used to insert an application defined XML
-     * entity stream into the parsing stream.
-     *
-     * @param name           The name of the entity.
-     * @param xmlInputSource The input source of the entity.
-     * @param literal        True if this entity is started within a
-     *                       literal value.
-     *
-     * @throws IOException  Thrown on i/o error.
-     * @throws XNIException Thrown by entity handler to signal an error.
-     */
-    public void startEntity(String name,
-                            XMLInputSource xmlInputSource,
-                            boolean literal)
-        throws IOException, XNIException {
-        // get information
-
-        final String publicId = xmlInputSource.getPublicId();
-        final String systemId = xmlInputSource.getSystemId();
-        String baseSystemId = xmlInputSource.getBaseSystemId();
-        String encoding = xmlInputSource.getEncoding();
-        Boolean isBigEndian = null;
-
-        // create reader
-        InputStream stream = null;
-        Reader reader = xmlInputSource.getCharacterStream();
-        if (reader == null) {
-            stream = xmlInputSource.getByteStream();
-            if (stream == null) {
-                String expandedSystemId = expandSystemId(systemId, baseSystemId);
-                if (baseSystemId == null) {
-                    baseSystemId = expandedSystemId;
-                }
-                stream = new URL(expandedSystemId).openStream();
-            }
-            // wrap this stream in RewindableInputStream
-            stream = new RewindableInputStream(stream);
-
-            // perform auto-detect of encoding
-            if (encoding == null) {
-                // read first four bytes and determine encoding
-                final byte[] b4 = new byte[4];
-                int count = 0;
-                for (; count<4; count++ ) {
-                    b4[count] = (byte)stream.read();
-                }
-                if (count == 4) {
-                    Object [] encodingDesc = getEncodingName(b4, count);
-                    encoding = (String)(encodingDesc[0]);
-                    isBigEndian = (Boolean)(encodingDesc[1]);
-
-                    // removed use of pushback inputstream--neilg
-                    /*****
-                    // push back the characters we read
-                    if (DEBUG_ENCODINGS) {
-                        System.out.println("$$$ wrapping input stream in PushbackInputStream");
-                    }
-                    PushbackInputStream pbstream = new PushbackInputStream(stream, 4);
-                    *****/
-                    stream.reset();
-                    int offset = 0;
-                    // Special case UTF-8 files with BOM created by Microsoft
-                    // tools. It's more efficient to consume the BOM than make
-                    // the reader perform extra checks. -Ac
-                    if (count > 2 && encoding.equals("UTF-8")) {
-                        int b0 = b4[0] & 0xFF;
-                        int b1 = b4[1] & 0xFF;
-                        int b2 = b4[2] & 0xFF;
-                        if (b0 == 0xEF && b1 == 0xBB && b2 == 0xBF) {
-                            // ignore first three bytes...
-                            stream.skip(3);
-                            /********
-                            offset = 3;
-                            count -= offset;
-                            ***/
-                        }
-                    }
-                    /******
-                    pbstream.unread(b4, offset, count);
-
-                    // REVISIT: Should save the original input stream instead of
-                    //          the pushback input stream so that when we swap out
-                    //          the OneCharReader, we don't still have a method
-                    //          indirection to get at the underlying bytes. -Ac
-
-                    // create reader from input stream
-                    reader = createReader(new RewindableInputStream(pbstream), encoding, isBigEndian);
-                    ******/
-                    reader = createReader(stream, encoding, isBigEndian);
-                }
-                else {
-                    reader = createReader(stream, encoding, isBigEndian);
-                }
-            }
-
-            // use specified encoding
-            else {
-                reader = createReader(stream, encoding, isBigEndian);
-            }
-
-            // read one character at a time so we don't jump too far
-            // ahead, converting characters from the byte stream in
-            // the wrong encoding
-            if (DEBUG_ENCODINGS) {
-                System.out.println("$$$ no longer wrapping reader in OneCharReader");
-            }
-            //reader = new OneCharReader(reader);
-        }
-
-        // push entity on stack
-        if (fCurrentEntity != null) {
-            fEntityStack.push(fCurrentEntity);
-        }
-
-        // create entity
-        String expandedSystemId = expandSystemId(systemId, baseSystemId);
-        fCurrentEntity = new ScannedEntity(name, publicId, systemId,
-                                           expandedSystemId, stream, reader,
-                                           encoding, literal, false);
-
-        // call handler
-        if (fEntityHandler != null) {
-            fEntityHandler.startEntity(name, publicId, systemId,
-                                       baseSystemId, encoding);
-        }
-
-    } // startEntity(String,XMLInputSource)
-
-    /** Returns the entity scanner. */
-    public XMLEntityScanner getEntityScanner() {
-        return fEntityScanner;
-    } // getEntityScanner():XMLEntityScanner
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     *
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Thrown by component on initialization error.
-     *                      For example, if a feature or property is
-     *                      required for the operation of the component, the
-     *                      component manager may throw a
-     *                      SAXNotRecognizedException or a
-     *                      SAXNotSupportedException.
-     */
-    public void reset(XMLComponentManager componentManager)
-        throws XMLConfigurationException {
-
-        // sax features
-        try {
-            fValidation = componentManager.getFeature(VALIDATION);
-        }
-        catch (XMLConfigurationException e) {
-            fValidation = false;
-        }
-        try {
-            fExternalGeneralEntities = componentManager.getFeature(EXTERNAL_GENERAL_ENTITIES);
-        }
-        catch (XMLConfigurationException e) {
-            fExternalGeneralEntities = true;
-        }
-        try {
-            fExternalParameterEntities = componentManager.getFeature(EXTERNAL_PARAMETER_ENTITIES);
-        }
-        catch (XMLConfigurationException e) {
-            fExternalParameterEntities = true;
-        }
-
-        // xerces features
-        try {
-            fAllowJavaEncodings = componentManager.getFeature(ALLOW_JAVA_ENCODINGS);
-        }
-        catch (XMLConfigurationException e) {
-            fAllowJavaEncodings = false;
-        }
-
-        // xerces properties
-        fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
-        fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
-        try {
-            fEntityResolver = (XMLEntityResolver)componentManager.getProperty(ENTITY_RESOLVER);
-        }
-        catch (XMLConfigurationException e) {
-            fEntityResolver = null;
-        }
-        // initialize state
-        fStandalone = false;
-        fEntities.clear();
-        fEntityStack.removeAllElements();
-
-        fCurrentEntity = null;
-
-        // DEBUG
-        if (DEBUG_ENTITIES) {
-            addInternalEntity("text", "Hello, World.");
-            addInternalEntity("empty-element", "<foo/>");
-            addInternalEntity("balanced-element", "<foo></foo>");
-            addInternalEntity("balanced-element-with-text", "<foo>Hello, World</foo>");
-            addInternalEntity("balanced-element-with-entity", "<foo>&text;</foo>");
-            addInternalEntity("unbalanced-entity", "<foo>");
-            addInternalEntity("recursive-entity", "<foo>&recursive-entity2;</foo>");
-            addInternalEntity("recursive-entity2", "<bar>&recursive-entity3;</bar>");
-            addInternalEntity("recursive-entity3", "<baz>&recursive-entity;</baz>");
-
-            addExternalEntity("external-text", null, "external-text.ent", "test/external-text.xml");
-            addExternalEntity("external-balanced-element", null, "external-balanced-element.ent", "test/external-balanced-element.xml");
-            addExternalEntity("one", null, "ent/one.ent", "test/external-entity.xml");
-            addExternalEntity("two", null, "ent/two.ent", "test/ent/one.xml");
-        }
-
-        // copy declared entities
-        if (fDeclaredEntities != null) {
-            java.util.Enumeration keys = fDeclaredEntities.keys();
-            while (keys.hasMoreElements()) {
-                Object key = keys.nextElement();
-                Object value = fDeclaredEntities.get(key);
-                fEntities.put(key, value);
-            }
-        }
-
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     *
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-
-        // xerces features
-        if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
-            String feature = featureId.substring(Constants.XERCES_FEATURE_PREFIX.length());
-            if (feature.equals(Constants.ALLOW_JAVA_ENCODINGS_FEATURE)) {
-                fAllowJavaEncodings = state;
-            }
-        }
-
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     *
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-
-        // Xerces properties
-        if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
-            String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
-            if (property.equals(Constants.SYMBOL_TABLE_PROPERTY)) {
-                fSymbolTable = (SymbolTable)value;
-                return;
-            }
-            if (property.equals(Constants.ERROR_REPORTER_PROPERTY)) {
-                fErrorReporter = (XMLErrorReporter)value;
-                return;
-            }
-            if (property.equals(Constants.ENTITY_RESOLVER_PROPERTY)) {
-                fEntityResolver = (XMLEntityResolver)value;
-                return;
-            }
-        }
-
-    } // setProperty(String,Object)
-
-    //
-    // Public static methods
-    //
-
-    /**
-     * Expands a system id and returns the system id as a URI, if
-     * it can be expanded. A return value of null means that the
-     * identifier is already expanded. An exception thrown
-     * indicates a failure to expand the id.
-     *
-     * @param systemId The systemId to be expanded.
-     *
-     * @return Returns the URI string representing the expanded system
-     *         identifier. A null value indicates that the given
-     *         system identifier is already expanded.
-     *
-     */
-    public static String expandSystemId(String systemId) {
-        return expandSystemId(systemId, null);
-    } // expandSystemId(String):String
-
-    /**
-     * Expands a system id and returns the system id as a URI, if
-     * it can be expanded. A return value of null means that the
-     * identifier is already expanded. An exception thrown
-     * indicates a failure to expand the id.
-     *
-     * @param systemId The systemId to be expanded.
-     *
-     * @return Returns the URI string representing the expanded system
-     *         identifier. A null value indicates that the given
-     *         system identifier is already expanded.
-     *
-     */
-    public static String expandSystemId(String systemId, String baseSystemId) {
-
-        // check for bad parameters id
-        if (systemId == null || systemId.length() == 0) {
-            return systemId;
-        }
-        // if id already expanded, return
-        try {
-            URI uri = new URI(systemId);
-            if (uri != null) {
-                return systemId;
-            }
-        }
-        catch (URI.MalformedURIException e) {
-            // continue on...
-        }
-        // normalize id
-        String id = fixURI(systemId);
-
-        // normalize base
-        URI base = null;
-        URI uri = null;
-        try {
-            if (baseSystemId == null || baseSystemId.length() == 0 ||
-                baseSystemId.equals(systemId)) {
-                String dir;
-                try {
-                    dir = fixURI(System.getProperty("user.dir"));
-                }
-                catch (SecurityException se) {
-                    dir = "";
-                }
-                if (!dir.endsWith("/")) {
-                    dir = dir + "/";
-                }
-                base = new URI("file", "", dir, null, null);
-            }
-            else {
-                try {
-                    base = new URI(fixURI(baseSystemId));
-                }
-                catch (URI.MalformedURIException e) {
-                    String dir;
-                    try {
-                        dir = fixURI(System.getProperty("user.dir"));
-                    }
-                    catch (SecurityException se) {
-                        dir = "";
-                    }
-                    if (baseSystemId.indexOf(':') != -1) {
-                        // for xml schemas we might have baseURI with
-                        // a specified drive
-                        base = new URI("file", "", fixURI(baseSystemId), null, null);
-                    }
-                    else {
-                        if (!dir.endsWith("/")) {
-                            dir = dir + "/";
-                        }
-                        dir = dir + fixURI(baseSystemId);
-                        base = new URI("file", "", dir, null, null);
-                    }
-                }
-             }
-             // expand id
-             uri = new URI(base, id);
-        }
-        catch (Exception e) {
-            // let it go through
-
-        }
-
-        if (uri == null) {
-            return systemId;
-        }
-        return uri.toString();
-
-    } // expandSystemId(String,String):String
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Ends an entity.
-     *
-     * @throws XNIException Thrown by entity handler to signal an error.
-     */
-    protected void endEntity() throws XNIException {
-
-        // call handler
-        if (DEBUG_BUFFER) {
-            System.out.print("(endEntity: ");
-            print();
-            System.out.println();
-        }
-        if (fEntityHandler != null) {
-            fEntityHandler.endEntity(fCurrentEntity.name);
-        }
-
-        // pop stack
-        fCurrentEntity = fEntityStack.size() > 0
-                       ? (ScannedEntity)fEntityStack.pop() : null;
-        if (DEBUG_BUFFER) {
-            System.out.print(")endEntity: ");
-            print();
-            System.out.println();
-        }
-
-    } // endEntity()
-
-    /**
-     * Returns the IANA encoding name that is auto-detected from
-     * the bytes specified, with the endian-ness of that encoding where appropriate.
-     *
-     * @param b4    The first four bytes of the input.
-     * @param count The number of bytes actually read.
-     * @return a 2-element array:  the first element, an IANA-encoding string, 
-     *  the second element a Boolean which is true iff the document is big endian, false
-     *  if it's little-endian, and null if the distinction isn't relevant.
-     */
-    protected Object[] getEncodingName(byte[] b4, int count) {
-
-        if (count < 2) {
-            return new Object[]{"UTF-8", null};
-        }
-
-        // UTF-16, with BOM
-        int b0 = b4[0] & 0xFF;
-        int b1 = b4[1] & 0xFF;
-        if (b0 == 0xFE && b1 == 0xFF) {
-            // UTF-16, big-endian
-            return new Object [] {"UTF-16BE", new Boolean(true)};
-        }
-        if (b0 == 0xFF && b1 == 0xFE) {
-            // UTF-16, little-endian
-            return new Object [] {"UTF-16LE", new Boolean(false)};
-        }
-
-        // default to UTF-8 if we don't have enough bytes to make a
-        // good determination of the encoding
-        if (count < 3) {
-            return new Object [] {"UTF-8", null};
-        }
-
-        // UTF-8 with a BOM
-        int b2 = b4[2] & 0xFF;
-        if (b0 == 0xEF && b1 == 0xBB && b2 == 0xBF) {
-            return new Object [] {"UTF-8", null};
-        }
-
-        // default to UTF-8 if we don't have enough bytes to make a
-        // good determination of the encoding
-        if (count < 4) {
-            return new Object [] {"UTF-8", null};
-        }
-
-        // other encodings
-        int b3 = b4[3] & 0xFF;
-        if (b0 == 0x00 && b1 == 0x00 && b2 == 0x00 && b3 == 0x3C) {
-            // UCS-4, big endian (1234)
-            return new Object [] {"ISO-10646-UCS-4", new Boolean(true)};
-        }
-        if (b0 == 0x3C && b1 == 0x00 && b2 == 0x00 && b3 == 0x00) {
-            // UCS-4, little endian (4321)
-            return new Object [] {"ISO-10646-UCS-4", new Boolean(false)};
-        }
-        if (b0 == 0x00 && b1 == 0x00 && b2 == 0x3C && b3 == 0x00) {
-            // UCS-4, unusual octet order (2143)
-            // REVISIT: What should this be?
-            return new Object [] {"ISO-10646-UCS-4", null};
-        }
-        if (b0 == 0x00 && b1 == 0x3C && b2 == 0x00 && b3 == 0x00) {
-            // UCS-4, unusual octect order (3412)
-            // REVISIT: What should this be?
-            return new Object [] {"ISO-10646-UCS-4", null};
-        }
-        if (b0 == 0x00 && b1 == 0x3C && b2 == 0x00 && b3 == 0x3F) {
-            // UTF-16, big-endian, no BOM
-            // (or could turn out to be UCS-2...
-            // REVISIT: What should this be?
-            return new Object [] {"UTF-16BE", new Boolean(true)};
-        }
-        if (b0 == 0x3C && b1 == 0x00 && b2 == 0x3F && b3 == 0x00) {
-            // UTF-16, little-endian, no BOM
-            // (or could turn out to be UCS-2...
-            return new Object [] {"UTF-16LE", new Boolean(false)};
-        }
-        if (b0 == 0x4C && b1 == 0x6F && b2 == 0xA7 && b3 == 0x94) {
-            // EBCDIC
-            // a la xerces1, return CP037 instead of EBCDIC here
-            return new Object [] {"CP037", null};
-        }
-
-        // default encoding
-        return new Object [] {"UTF-8", null};
-
-    } // getEncodingName(byte[],int):Object[]
-
-    /**
-     * Creates a reader capable of reading the given input stream in
-     * the specified encoding.
-     *
-     * @param inputStream  The input stream.
-     * @param encoding     The encoding name that the input stream is
-     *                     encoded using. If the user has specified that
-     *                     Java encoding names are allowed, then the
-     *                     encoding name may be a Java encoding name;
-     *                     otherwise, it is an ianaEncoding name.
-     * @param isBigEndian   For encodings (like uCS-4), whose names cannot
-     *                      specify a byte order, this tells whether the order is bigEndian.  null menas 
-     *                      unknown or not relevant.
-     *
-     * @return Returns a reader.
-     */
-    protected Reader createReader(InputStream inputStream, String encoding, Boolean isBigEndian)
-        throws IOException {
-
-        // normalize encoding name
-        if (encoding == null) {
-            encoding = "UTF-8";
-        }
-
-        // try to use an optimized reader
-        String ENCODING = encoding.toUpperCase();
-        if (ENCODING.equals("UTF-8")) {
-            if (DEBUG_ENCODINGS) {
-                System.out.println("$$$ creating UTF8Reader");
-            }
-            return new UTF8Reader(inputStream, fBufferSize);
-        }
-        if (ENCODING.equals("US-ASCII")) {
-            if (DEBUG_ENCODINGS) {
-                System.out.println("$$$ creating ASCIIReader");
-            }
-            return new ASCIIReader(inputStream, fBufferSize);
-        }
-        if(ENCODING.equals("ISO-10646-UCS-4")) {
-            if(isBigEndian != null) {
-                boolean isBE = isBigEndian.booleanValue();
-                if(isBE) {
-                    return new UCSReader(inputStream, UCSReader.UCS4BE);
-                } else {
-                    return new UCSReader(inputStream, UCSReader.UCS4LE);
-                }
-            } else {
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                       "EncodingByteOrderUnsupported",
-                                       new Object[] { encoding },
-                                       XMLErrorReporter.SEVERITY_FATAL_ERROR);
-            }
-        }
-        if(ENCODING.equals("ISO-10646-UCS-2")) {
-            if(isBigEndian != null) { // sould never happen with this encoding...
-                boolean isBE = isBigEndian.booleanValue();
-                if(isBE) {
-                    return new UCSReader(inputStream, UCSReader.UCS2BE);
-                } else {
-                    return new UCSReader(inputStream, UCSReader.UCS2LE);
-                }
-            } else {
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                       "EncodingByteOrderUnsupported",
-                                       new Object[] { encoding },
-                                       XMLErrorReporter.SEVERITY_FATAL_ERROR);
-            }
-        }
-
-        // check for valid name
-        boolean validIANA = XMLChar.isValidIANAEncoding(encoding);
-        boolean validJava = XMLChar.isValidJavaEncoding(encoding);
-        if (!validIANA || (fAllowJavaEncodings && !validJava)) {
-            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                       "EncodingDeclInvalid",
-                                       new Object[] { encoding },
-                                       XMLErrorReporter.SEVERITY_FATAL_ERROR);
-            // NOTE: AndyH suggested that, on failure, we use ISO Latin 1
-            //       because every byte is a valid ISO Latin 1 character.
-            //       It may not translate correctly but if we failed on
-            //       the encoding anyway, then we're expecting the content
-            //       of the document to be bad. This will just prevent an
-            //       invalid UTF-8 sequence to be detected. This is only
-            //       important when continue-after-fatal-error is turned
-            //       on. -Ac
-            encoding = "ISO-8859-1";
-        }
-
-        // try to use a Java reader
-        String javaEncoding = EncodingMap.getIANA2JavaMapping(ENCODING);
-        if (javaEncoding == null) {
-            if(fAllowJavaEncodings) {
-            javaEncoding = encoding;
-            } else {
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                       "EncodingDeclInvalid",
-                                       new Object[] { encoding },
-                                       XMLErrorReporter.SEVERITY_FATAL_ERROR);
-                // see comment above.
-                javaEncoding = "ISO8859_1";
-            }
-        }
-        if (DEBUG_ENCODINGS) {
-            System.out.print("$$$ creating Java InputStreamReader: encoding="+javaEncoding);
-            if (javaEncoding == encoding) {
-                System.out.print(" (IANA encoding)");
-            }
-            System.out.println();
-        }
-        return new InputStreamReader(inputStream, javaEncoding);
-
-    } // createReader(InputStream,String, Boolean): Reader
-
-    //
-    // Protected static methods
-    //
-
-    /**
-     * Fixes a platform dependent filename to standard URI form.
-     *
-     * @param str The string to fix.
-     *
-     * @return Returns the fixed URI string.
-     */
-    protected static String fixURI(String str) {
-
-        // handle platform dependent strings
-        str = str.replace(java.io.File.separatorChar, '/');
-
-        // Windows fix
-        if (str.length() >= 2) {
-            char ch1 = str.charAt(1);
-            if (ch1 == ':') {
-                char ch0 = Character.toUpperCase(str.charAt(0));
-                if (ch0 >= 'A' && ch0 <= 'Z') {
-                    str = "/" + str;
-                }
-            }
-        }
-
-        // done
-        return str;
-
-    } // fixURI(String):String
-
-    //
-    // Package visible methods
-    //
-
-    /**
-     * Returns the hashtable of declared entities.
-     * <p>
-     * <strong>REVISIT:</strong>
-     * This should be done the "right" way by designing a better way to
-     * enumerate the declared entities. For now, this method is needed
-     * by the constructor that takes an XMLEntityManager parameter.
-     */
-    Hashtable getDeclaredEntities() {
-        return fEntities;
-    } // getDeclaredEntities():Hashtable
-
-    /** Prints the contents of the buffer. */
-    final void print() {
-        if (DEBUG_BUFFER) {
-            if (fCurrentEntity != null) {
-                System.out.print('[');
-                System.out.print(fCurrentEntity.count);
-                System.out.print(' ');
-                System.out.print(fCurrentEntity.position);
-                if (fCurrentEntity.count > 0) {
-                    System.out.print(" \"");
-                    for (int i = 0; i < fCurrentEntity.count; i++) {
-                        if (i == fCurrentEntity.position) {
-                            System.out.print('^');
-                        }
-                        char c = fCurrentEntity.ch[i];
-                        switch (c) {
-                            case '\n': {
-                                System.out.print("\\n");
-                                break;
-                            }
-                            case '\r': {
-                                System.out.print("\\r");
-                                break;
-                            }
-                            case '\t': {
-                                System.out.print("\\t");
-                                break;
-                            }
-                            case '\\': {
-                                System.out.print("\\\\");
-                                break;
-                            }
-                            default: {
-                                System.out.print(c);
-                            }
-                        }
-                    }
-                    if (fCurrentEntity.position == fCurrentEntity.count) {
-                        System.out.print('^');
-                    }
-                    System.out.print('"');
-                }
-                System.out.print(']');
-                System.out.print(" @ ");
-                System.out.print(fCurrentEntity.lineNumber);
-                System.out.print(',');
-                System.out.print(fCurrentEntity.columnNumber);
-            }
-            else {
-                System.out.print("*NO CURRENT ENTITY*");
-            }
-        }
-    } // print()
-
-    //
-    // Classes
-    //
-
-    /**
-     * Entity information.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected static abstract class Entity {
-
-        //
-        // Data
-        //
-
-        /** Entity name. */
-        public String name;
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public Entity() {
-            clear();
-        } // <init>()
-
-        /** Constructs an entity. */
-        public Entity(String name) {
-            this.name = name;
-        } // <init>(String)
-
-        //
-        // Public methods
-        //
-
-        /** Returns true if this is an external entity. */
-        public abstract boolean isExternal();
-
-        /** Returns true if this is an unparsed entity. */
-        public abstract boolean isUnparsed();
-
-        /** Clears the entity. */
-        public void clear() {
-            name = null;
-        } // clear()
-
-        /** Sets the values of the entity. */
-        public void setValues(Entity entity) {
-            name = entity.name;
-        } // setValues(Entity)
-
-    } // class Entity
-
-    /**
-     * Internal entity.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected static class InternalEntity
-        extends Entity {
-
-        //
-        // Data
-        //
-
-        /** Text value of entity. */
-        public String text;
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public InternalEntity() {
-            clear();
-        } // <init>()
-
-        /** Constructs an internal entity. */
-        public InternalEntity(String name, String text) {
-            super(name);
-            this.text = text;
-        } // <init>(String,String)
-
-        //
-        // Entity methods
-        //
-
-        /** Returns true if this is an external entity. */
-        public final boolean isExternal() {
-            return false;
-        } // isExternal():boolean
-
-        /** Returns true if this is an unparsed entity. */
-        public final boolean isUnparsed() {
-            return false;
-        } // isUnparsed():boolean
-
-        /** Clears the entity. */
-        public void clear() {
-            super.clear();
-            text = null;
-        } // clear()
-
-        /** Sets the values of the entity. */
-        public void setValues(Entity entity) {
-            super.setValues(entity);
-            text = null;
-        } // setValues(Entity)
-
-        /** Sets the values of the entity. */
-        public void setValues(InternalEntity entity) {
-            super.setValues(entity);
-            text = entity.text;
-        } // setValues(InternalEntity)
-
-    } // class InternalEntity
-
-    /**
-     * External entity.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected static class ExternalEntity
-        extends Entity {
-
-        //
-        // Data
-        //
-
-        /** Public identifier. */
-        public String publicId;
-
-        /** System identifier. */
-        public String systemId;
-
-        /** Base system identifier. */
-        public String baseSystemId;
-
-        /** Notation name for unparsed entity. */
-        public String notation;
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public ExternalEntity() {
-            clear();
-        } // <init>()
-
-        /** Constructs an internal entity. */
-        public ExternalEntity(String name, String publicId, String systemId,
-                              String baseSystemId, String notation) {
-            super(name);
-            this.publicId = publicId;
-            this.systemId = systemId;
-            this.baseSystemId = baseSystemId;
-            this.notation = notation;
-        } // <init>(String,String,String,String,String)
-
-        //
-        // Entity methods
-        //
-
-        /** Returns true if this is an external entity. */
-        public final boolean isExternal() {
-            return true;
-        } // isExternal():boolean
-
-        /** Returns true if this is an unparsed entity. */
-        public final boolean isUnparsed() {
-            return notation != null;
-        } // isUnparsed():boolean
-
-        /** Clears the entity. */
-        public void clear() {
-            super.clear();
-            publicId = null;
-            systemId = null;
-            baseSystemId = null;
-            notation = null;
-        } // clear()
-
-        /** Sets the values of the entity. */
-        public void setValues(Entity entity) {
-            super.setValues(entity);
-            publicId = null;
-            systemId = null;
-            baseSystemId = null;
-            notation = null;
-        } // setValues(Entity)
-
-        /** Sets the values of the entity. */
-        public void setValues(ExternalEntity entity) {
-            super.setValues(entity);
-            publicId = entity.publicId;;
-            systemId = entity.systemId;
-            baseSystemId = entity.baseSystemId;
-            notation = entity.notation;
-        } // setValues(ExternalEntity)
-
-    } // class ExternalEntity
-
-    /**
-     * Entity state.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class ScannedEntity
-        extends Entity {
-
-        //
-        // Data
-        //
-
-        // i/o
-
-        /** Input stream. */
-        public InputStream stream;
-
-        /** Reader. */
-        public Reader reader;
-
-        // locator information
-
-        /** Public identifier. */
-        public String publicId;
-
-        /** System identifier. */
-        public String systemId;
-
-        /** Base system identifier. */
-        public String baseSystemId;
-
-        /** Line number. */
-        public int lineNumber = 1;
-
-        /** Column number. */
-        public int columnNumber = 1;
-
-        // encoding
-
-        /** Auto-detected encoding. */
-        public String encoding;
-
-        // status
-
-        /** True if in a literal.  */
-        public boolean literal;
-
-        // buffer
-
-        /** Character buffer. */
-        public char[] ch = new char[fBufferSize];
-
-        /** Position in character buffer. */
-        public int position;
-
-        /** Count of characters in buffer. */
-        public int count;
-
-        // to allow the reader/nputStream to behave efficiently:
-        public boolean mayReadChunks;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a scanned entity. */
-        public ScannedEntity(String name,
-                             String publicId, String systemId,
-                             String baseSystemId,
-                             InputStream stream, Reader reader,
-                             String encoding, boolean literal, boolean mayReadChunks) {
-            super(name);
-            this.publicId = publicId;
-            this.systemId = systemId;
-            this.baseSystemId = baseSystemId;
-            this.stream = stream;
-            this.reader = reader;
-            this.encoding = encoding;
-            this.literal = literal;
-            this.mayReadChunks = mayReadChunks;
-        } // <init>(String,String,String,InputStream,Reader,String,boolean)
-
-        //
-        // Entity methods
-        //
-
-        /** Returns true if this is an external entity. */
-        public final boolean isExternal() {
-            return systemId != null;
-        } // isExternal():boolean
-
-        /** Returns true if this is an unparsed entity. */
-        public final boolean isUnparsed() {
-            return false;
-        } // isUnparsed():boolean
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-
-            StringBuffer str = new StringBuffer();
-            str.append("name=\""+name+'"');
-            str.append(",ch="+ch);
-            str.append(",position="+position);
-            str.append(",count="+count);
-            return str.toString();
-
-        } // toString():String
-
-    } // class ScannedEntity
-
-    /**
-     * Implements the entity scanner methods.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class EntityScanner
-        extends XMLEntityScanner {
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public EntityScanner() {
-        } // <init>()
-
-        //
-        // XMLEntityScanner methods
-        //
-
-        /**
-         * Returns the base system identifier of the currently scanned
-         * entity, or null if none is available.
-         */
-        public String getBaseSystemId() {
-            return fCurrentEntity != null ? fCurrentEntity.baseSystemId : null;
-        } // getBaseSystemId():String
-
-        /**
-         * Sets the encoding of the scanner. This method is used by the
-         * scanners if the XMLDecl or TextDecl line contains an encoding
-         * pseudo-attribute.
-         * <p>
-         * <strong>Note:</strong> The underlying character reader on the
-         * current entity will be changed to accomodate the new encoding.
-         * However, the new encoding is ignored if the current reader was
-         * not constructed from an input stream (e.g. an external entity
-         * that is resolved directly to the appropriate java.io.Reader
-         * object).
-         *
-         * @param encoding The IANA encoding name of the new encoding.
-         *
-         * @throws IOException Thrown if the new encoding is not supported.
-         *
-         * @see org.apache.xerces.util.EncodingMap
-         */
-        public void setEncoding(String encoding) throws IOException {
-
-            if (DEBUG_ENCODINGS) {
-                System.out.println("$$$ setEncoding: "+encoding);
-            }
-
-            if (fCurrentEntity.stream != null) {
-                // if the encoding is the same, don't change the reader and
-                // re-use the original reader used by the OneCharReader
-                // NOTE: Besides saving an object, this overcomes deficiencies
-                //       in the UTF-16 reader supplied with the standard Java
-                //       distribution (up to and including 1.3). The UTF-16
-                //       decoder buffers 8K blocks even when only asked to read
-                //       a single char! -Ac
-                if (fCurrentEntity.encoding == null ||
-                    !fCurrentEntity.encoding.equals(encoding)) {
-                    // UTF-16 is a bit of a special case.  If the encoding is UTF-16,
-                    // and we know the endian-ness, we shouldn't change readers.
-                    // If it's ISO-10646-UCS-(2|4), then we'll have to deduce
-                    // the endian-ness from the encoding we presently have.
-                    if(fCurrentEntity.encoding != null && fCurrentEntity.encoding.startsWith("UTF-16")) {
-                        String ENCODING = encoding.toUpperCase();
-                        if(ENCODING.equals("UTF-16")) return;
-                        if(ENCODING.equals("ISO-10646-UCS-4")) {
-                            if(fCurrentEntity.encoding.equals("UTF-16BE")) {
-                                fCurrentEntity.reader = new UCSReader(fCurrentEntity.stream, UCSReader.UCS4BE);
-                            } else {
-                                fCurrentEntity.reader = new UCSReader(fCurrentEntity.stream, UCSReader.UCS4LE);
-                            }
-                            return;
-                        }
-                        if(ENCODING.equals("ISO-10646-UCS-2")) {
-                            if(fCurrentEntity.encoding.equals("UTF-16BE")) {
-                                fCurrentEntity.reader = new UCSReader(fCurrentEntity.stream, UCSReader.UCS2BE);
-                            } else {
-                                fCurrentEntity.reader = new UCSReader(fCurrentEntity.stream, UCSReader.UCS2LE);
-                            }
-                            return;
-                        }
-                    }
-                    // wrap a new reader around the input stream, changing
-                    // the encoding
-                    if (DEBUG_ENCODINGS) {
-                        System.out.println("$$$ creating new reader from stream: "+
-                                        fCurrentEntity.stream);
-                    }
-                    //fCurrentEntity.stream.reset();
-                    fCurrentEntity.reader = createReader(fCurrentEntity.stream, encoding, null);
-                } else {
-                    if (DEBUG_ENCODINGS) 
-                        System.out.println("$$$ reusing old reader on stream");
-                }
-            }
-
-        } // setEncoding(String)
-
-        /** Returns true if the current entity being scanned is external. */
-        public boolean isExternal() {
-            return fCurrentEntity.isExternal();
-        } // isExternal():boolean
-
-        /**
-         * Returns the next character on the input.
-         * <p>
-         * <strong>Note:</strong> The character is <em>not</em> consumed.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         */
-        public int peekChar() throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(peekChar: ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // peek at character
-            int c = fCurrentEntity.ch[fCurrentEntity.position];
-
-            // return peeked character
-            if (DEBUG_BUFFER) {
-                System.out.print(")peekChar: ");
-                print();
-                if (fCurrentEntity.isExternal()) {
-                    System.out.println(" -> '"+(c!='\r'?(char)c:'\n')+"'");
-                }
-                else {
-                    System.out.println(" -> '"+(char)c+"'");
-                }
-            }
-            if (fCurrentEntity.isExternal()) {
-                return c != '\r' ? c : '\n';
-            }
-            else {
-                return c;
-            }
-
-        } // peekChar():int
-
-        /**
-         * Returns the next character on the input.
-         * <p>
-         * <strong>Note:</strong> The character is consumed.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         */
-        public int scanChar() throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(scanChar: ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // scan character
-            int c = fCurrentEntity.ch[fCurrentEntity.position++];
-            boolean external = false;
-            if (c == '\n' ||
-                (c == '\r' && (external = fCurrentEntity.isExternal()))) {
-                fCurrentEntity.lineNumber++;
-                fCurrentEntity.columnNumber = 1;
-                if (fCurrentEntity.position == fCurrentEntity.count) {
-                    fCurrentEntity.ch[0] = (char)c;
-                    load(1, false);
-                }
-                if (c == '\r' && external) {
-                    if (fCurrentEntity.ch[fCurrentEntity.position++] != '\n') {
-                        fCurrentEntity.position--;
-                    }
-                    c = '\n';
-                }
-                /*** NEWLINE NORMALIZATION ***
-                else {
-                    if (fCurrentEntity.ch[fCurrentEntity.position] == '\r'
-                        && fCurrentEntity.isExternal()) {
-                        fCurrentEntity.position++;
-                    }
-                }
-                /***/
-            }
-
-            // return character that was scanned
-            if (DEBUG_BUFFER) {
-                System.out.print(")scanChar: ");
-                print();
-                System.out.println(" -> '"+(char)c+"'");
-            }
-            fCurrentEntity.columnNumber++;
-            return c;
-
-        } // scanChar():int
-
-        /**
-         * Returns a string matching the NMTOKEN production appearing immediately
-         * on the input as a symbol, or null if NMTOKEN Name string is present.
-         * <p>
-         * <strong>Note:</strong> The NMTOKEN characters are consumed.
-         * <p>
-         * <strong>Note:</strong> The string returned must be a symbol. The
-         * SymbolTable can be used for this purpose.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         *
-         * @see org.apache.xerces.util.SymbolTable
-         * @see org.apache.xerces.util.XMLChar#isName
-         */
-        public String scanNmtoken() throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(scanNmtoken: ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // scan nmtoken
-            int offset = fCurrentEntity.position;
-            while (XMLChar.isName(fCurrentEntity.ch[fCurrentEntity.position])) {
-                if (++fCurrentEntity.position == fCurrentEntity.count) {
-                    int length = fCurrentEntity.position - offset;
-                    if (length == fBufferSize) {
-                        // bad luck we have to resize our buffer
-                        char[] tmp = new char[fBufferSize * 2];
-                        System.arraycopy(fCurrentEntity.ch, offset,
-                                         tmp, 0, length);
-                        fCurrentEntity.ch = tmp;
-                        fBufferSize *= 2;
-                    }
-                    else {
-                        System.arraycopy(fCurrentEntity.ch, offset,
-                                         fCurrentEntity.ch, 0, length);
-                    }
-                    offset = 0;
-                    if (load(length, false)) {
-                        break;
-                    }
-                }
-            }
-            int length = fCurrentEntity.position - offset;
-            fCurrentEntity.columnNumber += length;
-
-            // return nmtoken
-            String symbol = null;
-            if (length > 0) {
-                symbol = fSymbolTable.addSymbol(fCurrentEntity.ch, offset, length);
-            }
-            if (DEBUG_BUFFER) {
-                System.out.print(")scanNmtoken: ");
-                print();
-                System.out.println(" -> "+String.valueOf(symbol));
-            }
-            return symbol;
-
-        } // scanNmtoken():String
-
-        /**
-         * Returns a string matching the Name production appearing immediately
-         * on the input as a symbol, or null if no Name string is present.
-         * <p>
-         * <strong>Note:</strong> The Name characters are consumed.
-         * <p>
-         * <strong>Note:</strong> The string returned must be a symbol. The
-         * SymbolTable can be used for this purpose.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         *
-         * @see org.apache.xerces.util.SymbolTable
-         * @see org.apache.xerces.util.XMLChar#isName
-         * @see org.apache.xerces.util.XMLChar#isNameStart
-         */
-        public String scanName() throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(scanName: ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // scan name
-            int offset = fCurrentEntity.position;
-            if (XMLChar.isNameStart(fCurrentEntity.ch[offset])) {
-                if (++fCurrentEntity.position == fCurrentEntity.count) {
-                    fCurrentEntity.ch[0] = fCurrentEntity.ch[offset];
-                    offset = 0;
-                    if (load(1, false)) {
-                        fCurrentEntity.columnNumber++;
-                        String symbol = fSymbolTable.addSymbol(fCurrentEntity.ch, 0, 1);
-                        if (DEBUG_BUFFER) {
-                            System.out.print(")scanName: ");
-                            print();
-                            System.out.println(" -> "+String.valueOf(symbol));
-                        }
-                        return symbol;
-                    }
-                }
-                while (XMLChar.isName(fCurrentEntity.ch[fCurrentEntity.position])) {
-                    if (++fCurrentEntity.position == fCurrentEntity.count) {
-                        int length = fCurrentEntity.position - offset;
-                        if (length == fBufferSize) {
-                            // bad luck we have to resize our buffer
-                            char[] tmp = new char[fBufferSize * 2];
-                            System.arraycopy(fCurrentEntity.ch, offset,
-                                             tmp, 0, length);
-                            fCurrentEntity.ch = tmp;
-                            fBufferSize *= 2;
-                        }
-                        else {
-                            System.arraycopy(fCurrentEntity.ch, offset,
-                                             fCurrentEntity.ch, 0, length);
-                        }
-                        offset = 0;
-                        if (load(length, false)) {
-                            break;
-                        }
-                    }
-                }
-            }
-            int length = fCurrentEntity.position - offset;
-            fCurrentEntity.columnNumber += length;
-
-            // return name
-            String symbol = null;
-            if (length > 0) {
-                symbol = fSymbolTable.addSymbol(fCurrentEntity.ch, offset, length);
-            }
-            if (DEBUG_BUFFER) {
-                System.out.print(")scanName: ");
-                print();
-                System.out.println(" -> "+String.valueOf(symbol));
-            }
-            return symbol;
-
-        } // scanName():String
-
-        /**
-         * Scans a qualified name from the input, setting the fields of the
-         * QName structure appropriately.
-         * <p>
-         * <strong>Note:</strong> The qualified name characters are consumed.
-         * <p>
-         * <strong>Note:</strong> The strings used to set the values of the
-         * QName structure must be symbols. The SymbolTable can be used for
-         * this purpose.
-         *
-         * @param qname The qualified name structure to fill.
-         *
-         * @return Returns true if a qualified name appeared immediately on
-         *         the input and was scanned, false otherwise.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         *
-         * @see org.apache.xerces.util.SymbolTable
-         * @see org.apache.xerces.util.XMLChar#isName
-         * @see org.apache.xerces.util.XMLChar#isNameStart
-         */
-        public boolean scanQName(QName qname) throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(scanQName, "+qname+": ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // scan qualified name
-            int offset = fCurrentEntity.position;
-            if (XMLChar.isNameStart(fCurrentEntity.ch[offset])) {
-                if (++fCurrentEntity.position == fCurrentEntity.count) {
-                    fCurrentEntity.ch[0] = fCurrentEntity.ch[offset];
-                    offset = 0;
-                    if (load(1, false)) {
-                        fCurrentEntity.columnNumber++;
-                        String name =
-                            fSymbolTable.addSymbol(fCurrentEntity.ch, 0, 1);
-                        qname.setValues(null, name, name, null);
-                        if (DEBUG_BUFFER) {
-                            System.out.print(")scanQName, "+qname+": ");
-                            print();
-                            System.out.println(" -> true");
-                        }
-                        return true;
-                    }
-                }
-                int index = -1;
-                while (XMLChar.isName(fCurrentEntity.ch[fCurrentEntity.position])) {
-                    char c = fCurrentEntity.ch[fCurrentEntity.position];
-                    if (c == ':') {
-                        if (index != -1) {
-                            break;
-                        }
-                        index = fCurrentEntity.position;
-                    }
-                    if (++fCurrentEntity.position == fCurrentEntity.count) {
-                        int length = fCurrentEntity.position - offset;
-                        if (length == fBufferSize) {
-                            // bad luck we have to resize our buffer
-                            char[] tmp = new char[fBufferSize * 2];
-                            System.arraycopy(fCurrentEntity.ch, offset,
-                                             tmp, 0, length);
-                            fCurrentEntity.ch = tmp;
-                            fBufferSize *= 2;
-                        }
-                        else {
-                            System.arraycopy(fCurrentEntity.ch, offset,
-                                             fCurrentEntity.ch, 0, length);
-                        }
-                        if (index != -1) {
-                            index = index - offset;
-                        }
-                        offset = 0;
-                        if (load(length, false)) {
-                            break;
-                        }
-                    }
-                }
-                int length = fCurrentEntity.position - offset;
-                fCurrentEntity.columnNumber += length;
-                if (length > 0) {
-                    String prefix = null;
-                    String localpart = null;
-                    String rawname = fSymbolTable.addSymbol(fCurrentEntity.ch,
-                                                            offset, length);
-                    if (index != -1) {
-                        int prefixLength = index - offset;
-                        prefix = fSymbolTable.addSymbol(fCurrentEntity.ch,
-                                                        offset, prefixLength);
-                        int len = length - prefixLength - 1;
-                        localpart = fSymbolTable.addSymbol(fCurrentEntity.ch,
-                                                           index + 1, len);
-
-                    }
-                    else {
-                        localpart = rawname;
-                    }
-                    qname.setValues(prefix, localpart, rawname, null);
-                    if (DEBUG_BUFFER) {
-                        System.out.print(")scanQName, "+qname+": ");
-                        print();
-                        System.out.println(" -> true");
-                    }
-                    return true;
-                }
-            }
-
-            // no qualified name found
-            if (DEBUG_BUFFER) {
-                System.out.print(")scanQName, "+qname+": ");
-                print();
-                System.out.println(" -> false");
-            }
-            return false;
-
-        } // scanQName(QName):boolean
-
-        /**
-         * Scans a range of parsed character data, setting the fields of the
-         * XMLString structure, appropriately.
-         * <p>
-         * <strong>Note:</strong> The characters are consumed.
-         * <p>
-         * <strong>Note:</strong> This method does not guarantee to return
-         * the longest run of parsed character data. This method may return
-         * before markup due to reaching the end of the input buffer or any
-         * other reason.
-         * <p>
-         * <strong>Note:</strong> The fields contained in the XMLString
-         * structure are not guaranteed to remain valid upon subsequent calls
-         * to the entity scanner. Therefore, the caller is responsible for
-         * immediately using the returned character data or making a copy of
-         * the character data.
-         *
-         * @param content The content structure to fill.
-         *
-         * @return Returns the next character on the input, if known. This
-         *         value may be -1 but this does <em>note</em> designate
-         *         end of file.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         */
-        public int scanContent(XMLString content) throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(scanContent: ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-            else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
-                fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
-                load(1, false);
-                fCurrentEntity.position = 0;
-            }
-
-            // normalize newlines
-            int offset = fCurrentEntity.position;
-            int c = fCurrentEntity.ch[offset];
-            int newlines = 0;
-            boolean external = fCurrentEntity.isExternal();
-            if (c == '\n' || (c == '\r' && external)) {
-                if (DEBUG_BUFFER) {
-                    System.out.print("[newline, "+offset+", "+fCurrentEntity.position+": ");
-                    print();
-                    System.out.println();
-                }
-                do {
-                    c = fCurrentEntity.ch[fCurrentEntity.position++];
-                    if (c == '\r' && external) {
-                        newlines++;
-                        fCurrentEntity.lineNumber++;
-                        fCurrentEntity.columnNumber = 1;
-                        if (fCurrentEntity.position == fCurrentEntity.count) {
-                            offset = 0;
-                            fCurrentEntity.position = newlines;
-                            if (load(newlines, false)) {
-                                break;
-                            }
-                        }
-                        if (fCurrentEntity.ch[fCurrentEntity.position] == '\n') {
-                            fCurrentEntity.position++;
-                            offset++;
-                        }
-                        /*** NEWLINE NORMALIZATION ***/
-                        else {
-                            newlines++;
-                        }
-                        /***/
-                    }
-                    else if (c == '\n') {
-                        newlines++;
-                        fCurrentEntity.lineNumber++;
-                        fCurrentEntity.columnNumber = 1;
-                        if (fCurrentEntity.position == fCurrentEntity.count) {
-                            offset = 0;
-                            fCurrentEntity.position = newlines;
-                            if (load(newlines, false)) {
-                                break;
-                            }
-                        }
-                        /*** NEWLINE NORMALIZATION ***
-                        if (fCurrentEntity.ch[fCurrentEntity.position] == '\r'
-                            && external) {
-                            fCurrentEntity.position++;
-                            offset++;
-                        }
-                        /***/
-                    }
-                    else {
-                        fCurrentEntity.position--;
-                        break;
-                    }
-                } while (fCurrentEntity.position < fCurrentEntity.count - 1);
-                for (int i = offset; i < fCurrentEntity.position; i++) {
-                    fCurrentEntity.ch[i] = '\n';
-                }
-                int length = fCurrentEntity.position - offset;
-                if (fCurrentEntity.position == fCurrentEntity.count - 1) {
-                    content.setValues(fCurrentEntity.ch, offset, length);
-                    if (DEBUG_BUFFER) {
-                        System.out.print("]newline, "+offset+", "+fCurrentEntity.position+": ");
-                        print();
-                        System.out.println();
-                    }
-                    return -1;
-                }
-                if (DEBUG_BUFFER) {
-                    System.out.print("]newline, "+offset+", "+fCurrentEntity.position+": ");
-                    print();
-                    System.out.println();
-                }
-            }
-
-            // inner loop, scanning for content
-            while (fCurrentEntity.position < fCurrentEntity.count) {
-                c = fCurrentEntity.ch[fCurrentEntity.position++];
-                if (!XMLChar.isContent(c)) {
-                    fCurrentEntity.position--;
-                    break;
-                }
-            }
-            int length = fCurrentEntity.position - offset;
-            fCurrentEntity.columnNumber += length - newlines;
-            content.setValues(fCurrentEntity.ch, offset, length);
-
-            // return next character
-            if (fCurrentEntity.position != fCurrentEntity.count) {
-                c = fCurrentEntity.ch[fCurrentEntity.position];
-                // REVISIT: Does this need to be updated to fix the
-                //          #x0D ^#x0A newline normalization problem? -Ac
-                if (c == '\r' && external) {
-                    c = '\n';
-                }
-            }
-            else {
-                c = -1;
-            }
-            if (DEBUG_BUFFER) {
-                System.out.print(")scanContent: ");
-                print();
-                System.out.println(" -> '"+(char)c+"'");
-            }
-            return c;
-
-        } // scanContent(XMLString):int
-
-        /**
-         * Scans a range of attribute value data, setting the fields of the
-         * XMLString structure, appropriately.
-         * <p>
-         * <strong>Note:</strong> The characters are consumed.
-         * <p>
-         * <strong>Note:</strong> This method does not guarantee to return
-         * the longest run of attribute value data. This method may return
-         * before the quote character due to reaching the end of the input
-         * buffer or any other reason.
-         * <p>
-         * <strong>Note:</strong> The fields contained in the XMLString
-         * structure are not guaranteed to remain valid upon subsequent calls
-         * to the entity scanner. Therefore, the caller is responsible for
-         * immediately using the returned character data or making a copy of
-         * the character data.
-         *
-         * @param quote   The quote character that signifies the end of the
-         *                attribute value data.
-         * @param content The content structure to fill.
-         *
-         * @return Returns the next character on the input, if known. This
-         *         value may be -1 but this does <em>note</em> designate
-         *         end of file.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         */
-        public int scanLiteral(int quote, XMLString content)
-            throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(scanLiteral, '"+(char)quote+"': ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-            else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
-                fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
-                load(1, false);
-                fCurrentEntity.position = 0;
-            }
-
-            // normalize newlines
-            int offset = fCurrentEntity.position;
-            int c = fCurrentEntity.ch[offset];
-            int newlines = 0;
-            boolean external = fCurrentEntity.isExternal();
-            if (c == '\n' || (c == '\r' && external)) {
-                if (DEBUG_BUFFER) {
-                    System.out.print("[newline, "+offset+", "+fCurrentEntity.position+": ");
-                    print();
-                    System.out.println();
-                }
-                do {
-                    c = fCurrentEntity.ch[fCurrentEntity.position++];
-                    if (c == '\r' && external) {
-                        newlines++;
-                        fCurrentEntity.lineNumber++;
-                        fCurrentEntity.columnNumber = 1;
-                        if (fCurrentEntity.position == fCurrentEntity.count) {
-                            offset = 0;
-                            fCurrentEntity.position = newlines;
-                            if (load(newlines, false)) {
-                                break;
-                            }
-                        }
-                        if (fCurrentEntity.ch[fCurrentEntity.position] == '\n') {
-                            fCurrentEntity.position++;
-                            offset++;
-                        }
-                        /*** NEWLINE NORMALIZATION ***/
-                        else {
-                            newlines++;
-                        }
-                        /***/
-                    }
-                    else if (c == '\n') {
-                        newlines++;
-                        fCurrentEntity.lineNumber++;
-                        fCurrentEntity.columnNumber = 1;
-                        if (fCurrentEntity.position == fCurrentEntity.count) {
-                            offset = 0;
-                            fCurrentEntity.position = newlines;
-                            if (load(newlines, false)) {
-                                break;
-                            }
-                        }
-                        /*** NEWLINE NORMALIZATION ***
-                        if (fCurrentEntity.ch[fCurrentEntity.position] == '\r'
-                            && external) {
-                            fCurrentEntity.position++;
-                            offset++;
-                        }
-                        /***/
-                    }
-                    else {
-                        fCurrentEntity.position--;
-                        break;
-                    }
-                } while (fCurrentEntity.position < fCurrentEntity.count - 1);
-                for (int i = offset; i < fCurrentEntity.position; i++) {
-                    fCurrentEntity.ch[i] = '\n';
-                }
-                int length = fCurrentEntity.position - offset;
-                if (fCurrentEntity.position == fCurrentEntity.count - 1) {
-                    content.setValues(fCurrentEntity.ch, offset, length);
-                    if (DEBUG_BUFFER) {
-                        System.out.print("]newline, "+offset+", "+fCurrentEntity.position+": ");
-                        print();
-                        System.out.println();
-                    }
-                    return -1;
-                }
-                if (DEBUG_BUFFER) {
-                    System.out.print("]newline, "+offset+", "+fCurrentEntity.position+": ");
-                    print();
-                    System.out.println();
-                }
-            }
-
-            // scan literal value
-            while (fCurrentEntity.position < fCurrentEntity.count) {
-                c = fCurrentEntity.ch[fCurrentEntity.position++];
-                if ((c == quote &&
-                     (!fCurrentEntity.literal || external))
-                    || c == '%' || !XMLChar.isContent(c)) {
-                    fCurrentEntity.position--;
-                    break;
-                }
-            }
-            int length = fCurrentEntity.position - offset;
-            fCurrentEntity.columnNumber += length - newlines;
-            content.setValues(fCurrentEntity.ch, offset, length);
-
-            // return next character
-            if (fCurrentEntity.position != fCurrentEntity.count) {
-                c = fCurrentEntity.ch[fCurrentEntity.position];
-                // NOTE: We don't want to accidentally signal the
-                //       end of the literal if we're expanding an
-                //       entity appearing in the literal. -Ac
-                if (c == quote && fCurrentEntity.literal) {
-                    c = -1;
-                }
-            }
-            else {
-                c = -1;
-            }
-            if (DEBUG_BUFFER) {
-                System.out.print(")scanLiteral, '"+(char)quote+"': ");
-                print();
-                System.out.println(" -> '"+(char)c+"'");
-            }
-            return c;
-
-        } // scanLiteral(int,XMLString):int
-
-        /**
-         * Scans a range of character data up to the specicied delimiter,
-         * setting the fields of the XMLString structure, appropriately.
-         * <p>
-         * <strong>Note:</strong> The characters are consumed.
-         * <p>
-         * <strong>Note:</strong> This assumes that the internal buffer is
-         * at least the same size, or bigger, than the length of the delimiter
-         * and that the delimiter contains at least one character.
-         * <p>
-         * <strong>Note:</strong> This method does not guarantee to return
-         * the longest run of character data. This method may return before
-         * the delimiter due to reaching the end of the input buffer or any
-         * other reason.
-         * <p>
-         * <strong>Note:</strong> The fields contained in the XMLString
-         * structure are not guaranteed to remain valid upon subsequent calls
-         * to the entity scanner. Therefore, the caller is responsible for
-         * immediately using the returned character data or making a copy of
-         * the character data.
-         *
-         * @param delimiter The string that signifies the end of the character
-         *                  data to be scanned.
-         * @param data      The data structure to fill.
-         *
-         * @return Returns true if there is more data to scan, false otherwise.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         */
-        public boolean scanData(String delimiter, XMLString data)
-            throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(scanData: ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            int delimLen = delimiter.length();
-            char charAt0 = delimiter.charAt(0);
-            //int limit = fCurrentEntity.count - delimLen + 1;
-
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-            else if (fCurrentEntity.position >= fCurrentEntity.count - delimLen) {
-                System.arraycopy(fCurrentEntity.ch, fCurrentEntity.position,
-                                 fCurrentEntity.ch, 0, fCurrentEntity.count - fCurrentEntity.position);
-                load(fCurrentEntity.count - fCurrentEntity.position, false);
-                fCurrentEntity.position = 0;
-            }
-
-            // normalize newlines
-            int offset = fCurrentEntity.position;
-            int c = fCurrentEntity.ch[offset];
-            int newlines = 0;
-            boolean external = fCurrentEntity.isExternal();
-            if (c == '\n' || (c == '\r' && external)) {
-                if (DEBUG_BUFFER) {
-                    System.out.print("[newline, "+offset+", "+fCurrentEntity.position+": ");
-                    print();
-                    System.out.println();
-                }
-                do {
-                    c = fCurrentEntity.ch[fCurrentEntity.position++];
-                    if (c == '\r' && external) {
-                        newlines++;
-                        fCurrentEntity.lineNumber++;
-                        fCurrentEntity.columnNumber = 1;
-                        /***/
-                        if (fCurrentEntity.position == fCurrentEntity.count) {
-                            offset = 0;
-                            fCurrentEntity.position = newlines;
-                            if (load(newlines, false)) {
-                                break;
-                            }
-                        }
-                        /***/
-                        if (fCurrentEntity.ch[fCurrentEntity.position] == '\n') {
-                            fCurrentEntity.position++;
-                            offset++;
-                        }
-                        /*** NEWLINE NORMALIZATION ***/
-                        else {
-                            newlines++;
-                        }
-                        /***/
-                    }
-                    else if (c == '\n') {
-                        newlines++;
-                        fCurrentEntity.lineNumber++;
-                        fCurrentEntity.columnNumber = 1;
-                        /***/
-                        if (fCurrentEntity.position == fCurrentEntity.count) {
-                            offset = 0;
-                            fCurrentEntity.position = newlines;
-                            fCurrentEntity.count = newlines;
-                            if (load(newlines, false)) {
-                                break;
-                            }
-                        }
-                        /***/
-                        /*** NEWLINE NORMALIZATION ***
-                        if (fCurrentEntity.ch[fCurrentEntity.position] == '\r'
-                            && external) {
-                            fCurrentEntity.position++;
-                            offset++;
-                        }
-                        /***/
-                    }
-                    else {
-                        fCurrentEntity.position--;
-                        break;
-                    }
-                } while (fCurrentEntity.position < fCurrentEntity.count - 1);
-                for (int i = offset; i < fCurrentEntity.position; i++) {
-                    fCurrentEntity.ch[i] = '\n';
-                }
-                int length = fCurrentEntity.position - offset;
-                if (fCurrentEntity.position == fCurrentEntity.count - 1) {
-                    data.setValues(fCurrentEntity.ch, offset, length);
-                    if (DEBUG_BUFFER) {
-                        System.out.print("]newline, "+offset+", "+fCurrentEntity.position+": ");
-                        print();
-                        System.out.println();
-                    }
-                    return true;
-                }
-                if (DEBUG_BUFFER) {
-                    System.out.print("]newline, "+offset+", "+fCurrentEntity.position+": ");
-                    print();
-                    System.out.println();
-                }
-            }
-
-            // iterate over buffer looking for delimiter
-            boolean done = false;
-            OUTER: while (fCurrentEntity.position < fCurrentEntity.count) {
-                c = fCurrentEntity.ch[fCurrentEntity.position++];
-                if (c == charAt0) {
-                    // looks like we just hit the delimiter
-                    int delimOffset = fCurrentEntity.position - 1;
-                    for (int i = 1; i < delimLen; i++) {
-                        if (fCurrentEntity.position == fCurrentEntity.count) {
-                            fCurrentEntity.position -= i;
-                            break OUTER;
-                        }
-                        c = fCurrentEntity.ch[fCurrentEntity.position++];
-                        if (delimiter.charAt(i) != c) {
-                            fCurrentEntity.position--;
-                            break;
-                        }
-                    }
-                    if (fCurrentEntity.position == delimOffset + delimLen) {
-                        done = true;
-                        break;
-                    }
-                }
-                else if (c == '\n' || (external && c == '\r')) {
-                    fCurrentEntity.position--;
-                    break;
-                }
-                else if (XMLChar.isInvalid(c)) {
-                    fCurrentEntity.position--;
-                    break;
-                }
-            }
-            int length = fCurrentEntity.position - offset;
-            fCurrentEntity.columnNumber += length - newlines;
-            if (done) {
-                length -= delimLen;
-            }
-            data.setValues(fCurrentEntity.ch, offset, length);
-
-            // return true if string was skipped
-            if (DEBUG_BUFFER) {
-                System.out.print(")scanData: ");
-                print();
-                System.out.println(" -> " + done);
-            }
-            return !done;
-
-        } // scanData(String,XMLString)
-
-        /**
-         * Skips a character appearing immediately on the input.
-         * <p>
-         * <strong>Note:</strong> The character is consumed only if it matches
-         * the specified character.
-         *
-         * @param c The character to skip.
-         *
-         * @return Returns true if the character was skipped.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         */
-        public boolean skipChar(int c) throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(skipChar, '"+(char)c+"': ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // skip character
-            int cc = fCurrentEntity.ch[fCurrentEntity.position];
-            if (cc == c) {
-                fCurrentEntity.position++;
-                if (c == '\n') {
-                    fCurrentEntity.lineNumber++;
-                    fCurrentEntity.columnNumber = 1;
-                }
-                else {
-                    fCurrentEntity.columnNumber++;
-                }
-                if (DEBUG_BUFFER) {
-                    System.out.print(")skipChar, '"+(char)c+"': ");
-                    print();
-                    System.out.println(" -> true");
-                }
-                return true;
-            }
-            else if (c == '\n' && cc == '\r' && fCurrentEntity.isExternal()) {
-                // handle newlines
-                if (fCurrentEntity.position == fCurrentEntity.count) {
-                    fCurrentEntity.ch[0] = (char)cc;
-                    load(1, false);
-                }
-                fCurrentEntity.position++;
-                if (fCurrentEntity.ch[fCurrentEntity.position] == '\n') {
-                    fCurrentEntity.position++;
-                }
-                fCurrentEntity.lineNumber++;
-                fCurrentEntity.columnNumber = 1;
-                if (DEBUG_BUFFER) {
-                    System.out.print(")skipChar, '"+(char)c+"': ");
-                    print();
-                    System.out.println(" -> true");
-                }
-                return true;
-            }
-
-            // character was not skipped
-            if (DEBUG_BUFFER) {
-                System.out.print(")skipChar, '"+(char)c+"': ");
-                print();
-                System.out.println(" -> false");
-            }
-            return false;
-
-        } // skipChar(int):boolean
-
-        /**
-         * Skips space characters appearing immediately on the input.
-         * <p>
-         * <strong>Note:</strong> The characters are consumed only if they are
-         * space characters.
-         *
-         * @return Returns true if at least one space character was skipped.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         *
-         * @see org.apache.xerces.util.XMLChar#isSpace
-         */
-        public boolean skipSpaces() throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(skipSpaces: ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // skip spaces
-            int c = fCurrentEntity.ch[fCurrentEntity.position];
-            if (XMLChar.isSpace(c)) {
-                boolean external = fCurrentEntity.isExternal();
-                do {
-                    boolean entityChanged = false;
-                    // handle newlines
-                    if (c == '\n' || (external && c == '\r')) {
-                        fCurrentEntity.lineNumber++;
-                        fCurrentEntity.columnNumber = 1;
-                        if (fCurrentEntity.position == fCurrentEntity.count - 1) {
-                            fCurrentEntity.ch[0] = (char)c;
-                            entityChanged = load(1, true);
-                            if (!entityChanged)
-                                // the load change the position to be 1,
-                                // need to restore it when entity not changed
-                                fCurrentEntity.position = 0;
-                        }
-                        if (c == '\r' && external) {
-                            // REVISIT: Does this need to be updated to fix the
-                            //          #x0D ^#x0A newline normalization problem? -Ac
-                            if (fCurrentEntity.ch[++fCurrentEntity.position] != '\n') {
-                                fCurrentEntity.position--;
-                            }
-                        }
-                        /*** NEWLINE NORMALIZATION ***
-                        else {
-                            if (fCurrentEntity.ch[fCurrentEntity.position + 1] == '\r'
-                                && external) {
-                                fCurrentEntity.position++;
-                            }
-                        }
-                        /***/
-                    }
-                    else {
-                        fCurrentEntity.columnNumber++;
-                    }
-                    // load more characters, if needed
-                    if (!entityChanged)
-                        fCurrentEntity.position++;
-                    if (fCurrentEntity.position == fCurrentEntity.count) {
-                        load(0, true);
-                    }
-                } while (XMLChar.isSpace(c = fCurrentEntity.ch[fCurrentEntity.position]));
-                if (DEBUG_BUFFER) {
-                    System.out.print(")skipSpaces: ");
-                    print();
-                    System.out.println(" -> true");
-                }
-                return true;
-            }
-
-            // no spaces were found
-            if (DEBUG_BUFFER) {
-                System.out.print(")skipSpaces: ");
-                print();
-                System.out.println(" -> false");
-            }
-            return false;
-
-        } // skipSpaces():boolean
-
-        /**
-         * Skips the specified string appearing immediately on the input.
-         * <p>
-         * <strong>Note:</strong> The characters are consumed only if they are
-         * space characters.
-         *
-         * @param s The string to skip.
-         *
-         * @return Returns true if the string was skipped.
-         *
-         * @throws IOException  Thrown if i/o error occurs.
-         * @throws EOFException Thrown on end of file.
-         */
-        public boolean skipString(String s) throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(skipString, \""+s+"\": ");
-                print();
-                System.out.println();
-            }
-
-            // load more characters, if needed
-            if (fCurrentEntity.position == fCurrentEntity.count) {
-                load(0, true);
-            }
-
-            // skip string
-            final int length = s.length();
-            for (int i = 0; i < length; i++) {
-                char c = fCurrentEntity.ch[fCurrentEntity.position++];
-                if (c != s.charAt(i)) {
-                    fCurrentEntity.position -= i + 1;
-                    if (DEBUG_BUFFER) {
-                        System.out.print(")skipString, \""+s+"\": ");
-                        print();
-                        System.out.println(" -> false");
-                    }
-                    return false;
-                }
-                if (i < length - 1 && fCurrentEntity.position == fCurrentEntity.count) {
-                    System.arraycopy(fCurrentEntity.ch, fCurrentEntity.count - i - 1, fCurrentEntity.ch, 0, i + 1);
-                    // REVISIT: Can a string to be skipped cross an
-                    //          entity boundary? -Ac
-                    if (load(i + 1, false)) {
-                        fCurrentEntity.position -= i + 1;
-                        if (DEBUG_BUFFER) {
-                            System.out.print(")skipString, \""+s+"\": ");
-                            print();
-                            System.out.println(" -> false");
-                        }
-                        return false;
-                    }
-                }
-            }
-            if (DEBUG_BUFFER) {
-                System.out.print(")skipString, \""+s+"\": ");
-                print();
-                System.out.println(" -> true");
-            }
-            fCurrentEntity.columnNumber += length;
-            return true;
-
-        } // skipString(String):boolean
-
-        //
-        // Locator methods
-        //
-
-        /**
-         * Return the public identifier for the current document event.
-         * <p>
-         * The return value is the public identifier of the document
-         * entity or of the external parsed entity in which the markup
-         * triggering the event appears.
-         *
-         * @return A string containing the public identifier, or
-         *         null if none is available.
-         */
-        public String getPublicId() {
-            return fCurrentEntity != null ? fCurrentEntity.publicId : null;
-        } // getPublicId():String
-
-        /**
-         * Return the system identifier for the current document event.
-         * <p>
-         * The return value is the system identifier of the document
-         * entity or of the external parsed entity in which the markup
-         * triggering the event appears.
-         * <p>
-         * If the system identifier is a URL, the parser must resolve it
-         * fully before passing it to the application.
-         *
-         * @return A string containing the system identifier, or null
-         *         if none is available.
-         */
-        public String getSystemId() {
-            if (fCurrentEntity != null) {
-                if (fCurrentEntity.systemId != null ) {
-                    return fCurrentEntity.systemId;
-                }
-                else {
-                    // search for the first external entity on the stack
-                    int size = fEntityStack.size();
-                    for (int i = size - 1; i >= 0 ; i--) {
-                        ScannedEntity externalEntity =
-                            (ScannedEntity)fEntityStack.elementAt(i);
-
-                        if (externalEntity.systemId != null) {
-                            return externalEntity.systemId;
-                        }
-                    }
-                }
-            }
-            return null;
-        } // getSystemId():String
-
-        /**
-         * Return the line number where the current document event ends.
-         * <p>
-         * <strong>Warning:</strong> The return value from the method
-         * is intended only as an approximation for the sake of error
-         * reporting; it is not intended to provide sufficient information
-         * to edit the character content of the original XML document.
-         * <p>
-         * The return value is an approximation of the line number
-         * in the document entity or external parsed entity where the
-         * markup triggering the event appears.
-         * <p>
-         * If possible, the SAX driver should provide the line position
-         * of the first character after the text associated with the document
-         * event.  The first line in the document is line 1.
-         *
-         * @return The line number, or -1 if none is available.
-         */
-        public int getLineNumber() {
-            //return fCurrentEntity != null ? fCurrentEntity.lineNumber : -1;
-            if (fCurrentEntity != null) {
-                if (fCurrentEntity.systemId != null ) {
-                    return fCurrentEntity.lineNumber;
-                }
-                else {
-                    // search for the first external entity on the stack
-                    int size = fEntityStack.size();
-                    for (int i=size-1; i>0 ; i--) {
-                        ScannedEntity firstExternalEntity = (ScannedEntity)fEntityStack.elementAt(i);
-
-                        if (firstExternalEntity.systemId != null) {
-                            return firstExternalEntity.lineNumber;
-                        }
-                    }
-                }
-            }
-
-            return -1;
-
-        } // getLineNumber():int
-
-        /**
-         * Return the column number where the current document event ends.
-         * <p>
-         * <strong>Warning:</strong> The return value from the method
-         * is intended only as an approximation for the sake of error
-         * reporting; it is not intended to provide sufficient information
-         * to edit the character content of the original XML document.
-         * <p>
-         * The return value is an approximation of the column number
-         * in the document entity or external parsed entity where the
-         * markup triggering the event appears.
-         * <p>
-         * If possible, the SAX driver should provide the line position
-         * of the first character after the text associated with the document
-         * event.
-         * <p>
-         * If possible, the SAX driver should provide the line position
-         * of the first character after the text associated with the document
-         * event.  The first column in each line is column 1.
-         *
-         * @return The column number, or -1 if none is available.
-         */
-        public int getColumnNumber() {
-            //return fCurrentEntity != null ? fCurrentEntity.columnNumber : -1;
-            if (fCurrentEntity != null) {
-                if (fCurrentEntity.systemId != null ) {
-                    return fCurrentEntity.columnNumber;
-                }
-                else {
-                    // search for the first external entity on the stack
-                    int size = fEntityStack.size();
-                    for (int i=size-1; i>0 ; i--) {
-                        ScannedEntity firstExternalEntity = (ScannedEntity)fEntityStack.elementAt(i);
-
-                        if (firstExternalEntity.systemId != null) {
-                            return firstExternalEntity.columnNumber;
-                        }
-                    }
-                }
-            }
-
-            return -1;
-        } // getColumnNumber():int
-
-        //
-        // Private methods
-        //
-
-        /**
-         * Loads a chunk of text.
-         *
-         * @param offset       The offset into the character buffer to
-         *                     read the next batch of characters.
-         * @param changeEntity True if the load should change entities
-         *                     at the end of the entity, otherwise leave
-         *                     the current entity in place and the entity
-         *                     boundary will be signaled by the return
-         *                     value.
-         *
-         * @returns Returns true if the entity changed as a result of this
-         *          load operation.
-         */
-        private final boolean load(int offset, boolean changeEntity)
-            throws IOException {
-            if (DEBUG_BUFFER) {
-                System.out.print("(load, "+offset+": ");
-                print();
-                System.out.println();
-            }
-
-            // read characters
-            int length = fCurrentEntity.ch.length - offset;
-            if (DEBUG_BUFFER) System.out.println("  length to try to read: "+length);
-            int count = fCurrentEntity.reader.read(fCurrentEntity.ch, offset, length);
-            if (DEBUG_BUFFER) System.out.println("  length actually read:  "+count);
-
-            // reset count and position
-            boolean entityChanged = false;
-            if (count != -1) {
-                if (count != 0) {
-                    fCurrentEntity.count = count + offset;
-                    fCurrentEntity.position = offset;
-                }
-            }
-
-            // end of this entity
-            else {
-                fCurrentEntity.count = offset;
-                fCurrentEntity.position = offset;
-                entityChanged = true;
-                if (changeEntity) {
-                    endEntity();
-                    if (fCurrentEntity == null) {
-                        throw new EOFException();
-                    }
-                    // handle the trailing edges
-                    if (fCurrentEntity.position == fCurrentEntity.count) {
-                        load(0, true);
-                    }
-                }
-            }
-            if (DEBUG_BUFFER) {
-                System.out.print(")load, "+offset+": ");
-                print();
-                System.out.println();
-            }
-
-            return entityChanged;
-
-        } // load(int):boolean
-
-    } // class EntityScanner
-
-
-    // This class wraps the byte inputstreams we're presented with.
-    // We need it because java.io.InputStreams don't provide
-    // functionality to reread processed bytes, and they have a habit
-    // of reading more than one character when you call their read()
-    // methods.  This means that, once we discover the true (declared)
-    // encoding of a document, we can neither backtrack to read the
-    // whole doc again nor start reading where we are with a new
-    // reader.  
-    //
-    // This class allows rewinding an inputStream by allowing a mark
-    // to be set, and the stream reset to that position.  <strong>The
-    // class assumes that it needs to read one character per
-    // invocation when it's read() method is inovked, but uses the
-    // underlying InputStream's read(char[], offset length) method--it
-    // won't buffer data read this way!</strong>
-    //
-    // @author Neil Graham, IBM
-    // @author Glenn Marcy, IBM
-
-    protected final class RewindableInputStream extends InputStream {
-
-        private InputStream fInputStream;
-        private byte[] fData;
-        private int fStartOffset;
-        private int fEndOffset;
-        private int fOffset;
-        private int fLength;
-        private int fMark;
-    
-        public RewindableInputStream(InputStream is) {
-            fData = new byte[DEFAULT_BUFFER_SIZE];
-            fInputStream = is;
-            fStartOffset = 0;
-            fEndOffset = -1;
-            fOffset = 0;
-            fLength = 0;
-            fMark = 0;
-        }
-
-        public void setStartOffset(int offset) {
-            fStartOffset = offset;
-        }
-        
-        public void rewind() {
-            fOffset = fStartOffset;
-        }
-    
-        public int read() throws IOException {
-            int b = 0;
-            if (fOffset < fLength) {
-                return fData[fOffset++] & 0xff;
-            }
-            if (fOffset == fEndOffset) {
-                return -1;
-            }
-            if (fOffset == fData.length) {
-                byte[] newData = new byte[fOffset << 1];
-                System.arraycopy(fData, 0, newData, 0, fOffset);
-                fData = newData;
-            }
-            b = fInputStream.read();
-            if (b == -1) {
-                fEndOffset = fOffset;
-                return -1;
-            }
-            fData[fLength++] = (byte)b;
-            fOffset++;
-            return b & 0xff;
-        }
-
-        public int read(byte[] b, int off, int len) throws IOException {
-            int bytesLeft = fLength - fOffset;
-            if (bytesLeft == 0) {
-                if (fOffset == fEndOffset) {
-                    return -1;
-                }
-                // better get some more for the voracious reader...
-                if(fCurrentEntity.mayReadChunks) {
-                    return fInputStream.read(b, off, len);
-                }
-                int returnedVal = read();
-                if(returnedVal == -1) {
-                    fEndOffset = fOffset;
-                    return -1;
-                }
-                b[off] = (byte)returnedVal;
-                return 1;
-            }
-            if (len < bytesLeft) {
-                if (len <= 0) {
-                    return 0;
-                }
-            }
-            else {
-                len = bytesLeft;
-            }
-            if (b != null) {
-                System.arraycopy(fData, fOffset, b, off, len);
-            }
-            fOffset += len;
-            return len;
-        }
-        
-        public long skip(long n)
-            throws IOException
-        {
-            int bytesLeft;
-            if (n <= 0) {
-                return 0;
-            }
-            bytesLeft = fLength - fOffset;
-            if (bytesLeft == 0) {
-                if (fOffset == fEndOffset) {
-                    return 0;
-                }
-                return fInputStream.skip(n);
-            }
-            if (n <= bytesLeft) {
-                fOffset += n;
-                return n;
-            }
-            fOffset += bytesLeft;
-            if (fOffset == fEndOffset) {
-                return bytesLeft;
-            }
-            n -= bytesLeft;
-            return fInputStream.skip(n) + bytesLeft;
-        }
-        
-        public int available() throws IOException {
-            int bytesLeft = fLength - fOffset;
-            if (bytesLeft == 0) {
-                if (fOffset == fEndOffset) {
-                    return -1;
-                }
-                return fInputStream.available();
-            }
-            if (fLength == fEndOffset) {
-                return bytesLeft;
-            }
-            return fInputStream.available() + bytesLeft;
-        }
-
-        public void mark(int howMuch) {
-            fMark = fOffset;
-        }
-
-        public void reset() {
-            fOffset = fMark;
-        }
-
-        public boolean markSupported() {
-            return true;
-        }
-
-        public void close() throws IOException {
-            if (fInputStream != null) {
-                fInputStream.close(); 
-                fInputStream = null;
-            }
-        }
-    } // end of RewindableInputStream class
-
-} // class XMLEntityManager
diff --git a/src/org/apache/xerces/impl/XMLEntityScanner.java b/src/org/apache/xerces/impl/XMLEntityScanner.java
deleted file mode 100644
index 481e853..0000000
--- a/src/org/apache/xerces/impl/XMLEntityScanner.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.io.EOFException;
-import java.io.IOException;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-
-/**
- * This class allows various parser scanners to scan basic XML constructs
- * from entities. This class works directly with the entity manager to
- * provide this functionality. 
- * <p>
- * There is only one entity scanner and entity manager per parser. The
- * entity manager <em>could</em> implement the methods to perform entity
- * scanning, but the entity scanner class allows a cleaner separation
- * between entity management API and entity scanning.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- *
- * @see XMLEntityHandler
- * @see XMLEntityManager
- */
-public abstract class XMLEntityScanner
-    implements XMLLocator {
-
-    //
-    // Public methods
-    //
-
-    /** 
-     * Returns the base system identifier of the currently scanned
-     * entity, or null if none is available.
-     */
-    public abstract String getBaseSystemId();
-
-    /**
-     * Sets the encoding of the scanner. This method is used by the
-     * scanners if the XMLDecl or TextDecl line contains an encoding
-     * pseudo-attribute. 
-     * <p>
-     * <strong>Note:</strong> The underlying character reader on the
-     * current entity will be changed to accomodate the new encoding. 
-     * However, the new encoding is ignored if the current reader was
-     * not constructed from an input stream (e.g. an external entity
-     * that is resolved directly to the appropriate java.io.Reader
-     * object).
-     *
-     * @param encoding The IANA encoding name of the new encoding.
-     *
-     * @throws IOException  Thrown if the new encoding is not supported.                     
-     *
-     * @see org.apache.xerces.util.EncodingMap
-     * @see org.apache.xerces.util.XMLChar#isValidIANAEncoding
-     * @see org.apache.xerces.util.XMLChar#isValidJavaEncoding
-     */
-    public abstract void setEncoding(String encoding) 
-        throws IOException;
-
-    /** Returns true if the current entity being scanned is external. */
-    public abstract boolean isExternal();
-
-    /**
-     * Returns the next character on the input.
-     * <p>
-     * <strong>Note:</strong> The character is <em>not</em> consumed.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     */
-    public abstract int peekChar() throws IOException;
-
-    /**
-     * Returns the next character on the input.
-     * <p>
-     * <strong>Note:</strong> The character is consumed.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     */
-    public abstract int scanChar() throws IOException;
-
-    /**
-     * Returns a string matching the NMTOKEN production appearing immediately
-     * on the input as a symbol, or null if NMTOKEN Name string is present.
-     * <p>
-     * <strong>Note:</strong> The NMTOKEN characters are consumed.
-     * <p>
-     * <strong>Note:</strong> The string returned must be a symbol. The
-     * SymbolTable can be used for this purpose.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     *
-     * @see org.apache.xerces.util.SymbolTable
-     * @see org.apache.xerces.util.XMLChar#isName
-     */
-    public abstract String scanNmtoken() throws IOException;
-
-    /**
-     * Returns a string matching the Name production appearing immediately
-     * on the input as a symbol, or null if no Name string is present.
-     * <p>
-     * <strong>Note:</strong> The Name characters are consumed.
-     * <p>
-     * <strong>Note:</strong> The string returned must be a symbol. The
-     * SymbolTable can be used for this purpose.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     *
-     * @see org.apache.xerces.util.SymbolTable
-     * @see org.apache.xerces.util.XMLChar#isName
-     * @see org.apache.xerces.util.XMLChar#isNameStart
-     */
-    public abstract String scanName() throws IOException;
-    
-    /**
-     * Scans a qualified name from the input, setting the fields of the
-     * QName structure appropriately.
-     * <p>
-     * <strong>Note:</strong> The qualified name characters are consumed.
-     * <p>
-     * <strong>Note:</strong> The strings used to set the values of the
-     * QName structure must be symbols. The SymbolTable can be used for
-     * this purpose.
-     *
-     * @param qname The qualified name structure to fill.
-     *
-     * @return Returns true if a qualified name appeared immediately on
-     *         the input and was scanned, false otherwise.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     *
-     * @see org.apache.xerces.util.SymbolTable
-     * @see org.apache.xerces.util.XMLChar#isName
-     * @see org.apache.xerces.util.XMLChar#isNameStart
-     */
-    public abstract boolean scanQName(QName qname) throws IOException;
-
-    /**
-     * Scans a range of parsed character data, setting the fields of the
-     * XMLString structure, appropriately.
-     * <p>
-     * <strong>Note:</strong> The characters are consumed.
-     * <p>
-     * <strong>Note:</strong> This method does not guarantee to return
-     * the longest run of parsed character data. This method may return
-     * before markup due to reaching the end of the input buffer or any
-     * other reason.
-     * <p>
-     * <strong>Note:</strong> The fields contained in the XMLString
-     * structure are not guaranteed to remain valid upon subsequent calls
-     * to the entity scanner. Therefore, the caller is responsible for
-     * immediately using the returned character data or making a copy of
-     * the character data.
-     *
-     * @param content The content structure to fill.
-     *
-     * @return Returns the next character on the input, if known. This
-     *         value may be -1 but this does <em>note</em> designate
-     *         end of file.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     */
-    public abstract int scanContent(XMLString content) throws IOException;
-
-    /**
-     * Scans a range of attribute value data, setting the fields of the
-     * XMLString structure, appropriately.
-     * <p>
-     * <strong>Note:</strong> The characters are consumed.
-     * <p>
-     * <strong>Note:</strong> This method does not guarantee to return
-     * the longest run of attribute value data. This method may return
-     * before the quote character due to reaching the end of the input
-     * buffer or any other reason.
-     * <p>
-     * <strong>Note:</strong> The fields contained in the XMLString
-     * structure are not guaranteed to remain valid upon subsequent calls
-     * to the entity scanner. Therefore, the caller is responsible for
-     * immediately using the returned character data or making a copy of
-     * the character data.
-     *
-     * @param quote   The quote character that signifies the end of the
-     *                attribute value data.
-     * @param content The content structure to fill.
-     *
-     * @return Returns the next character on the input, if known. This
-     *         value may be -1 but this does <em>note</em> designate
-     *         end of file.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     */
-    public abstract int scanLiteral(int quote, XMLString content) 
-        throws IOException;
-    
-    /**
-     * Scans a range of character data up to the specicied delimiter, 
-     * setting the fields of the XMLString structure, appropriately.
-     * <p>
-     * <strong>Note:</strong> The characters are consumed.
-     * <p>
-     * <strong>Note:</strong> This assumes that the internal buffer is
-     * at least the same size, or bigger, than the length of the delimiter
-     * and that the delimiter contains at least one character.
-     * <p>
-     * <strong>Note:</strong> This method does not guarantee to return
-     * the longest run of character data. This method may return before
-     * the delimiter due to reaching the end of the input buffer or any
-     * other reason.
-     * <p>
-     * <strong>Note:</strong> The fields contained in the XMLString
-     * structure are not guaranteed to remain valid upon subsequent calls
-     * to the entity scanner. Therefore, the caller is responsible for
-     * immediately using the returned character data or making a copy of
-     * the character data.
-     *
-     * @param delimiter The string that signifies the end of the character
-     *                  data to be scanned.
-     * @param data      The data structure to fill.
-     *
-     * @return Returns true if there is more data to scan, false otherwise.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     */
-    public abstract boolean scanData(String delimiter, XMLString data) 
-        throws IOException;
-
-    /**
-     * Skips a character appearing immediately on the input.
-     * <p>
-     * <strong>Note:</strong> The character is consumed only if it matches
-     * the specified character.
-     *
-     * @param c The character to skip.
-     *
-     * @return Returns true if the character was skipped.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     */
-    public abstract boolean skipChar(int c) throws IOException;
-
-    /**
-     * Skips space characters appearing immediately on the input.
-     * <p>
-     * <strong>Note:</strong> The characters are consumed only if they are
-     * space characters.
-     *
-     * @return Returns true if at least one space character was skipped.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     *
-     * @see org.apache.xerces.util.XMLChar#isSpace
-     */
-    public abstract boolean skipSpaces() throws IOException;
-
-    /**
-     * Skips the specified string appearing immediately on the input.
-     * <p>
-     * <strong>Note:</strong> The characters are consumed only if they are
-     * space characters.
-     *
-     * @param s The string to skip.
-     *
-     * @return Returns true if the string was skipped.
-     *
-     * @throws IOException  Thrown if i/o error occurs.
-     * @throws EOFException Thrown on end of file.
-     */
-    public abstract boolean skipString(String s) throws IOException;
-
-} // class XMLEntityScanner
diff --git a/src/org/apache/xerces/impl/XMLErrorReporter.java b/src/org/apache/xerces/impl/XMLErrorReporter.java
deleted file mode 100644
index dc29b2b..0000000
--- a/src/org/apache/xerces/impl/XMLErrorReporter.java
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.util.Hashtable;
-import java.util.Locale;
-
-import org.apache.xerces.util.DefaultErrorHandler;
-import org.apache.xerces.util.MessageFormatter;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParseException;
-
-/**
- * This class is a common element of all parser configurations and is
- * used to report errors that occur. This component can be queried by
- * parser components from the component manager using the following
- * property ID:
- * <pre>
- *   http://apache.org/xml/properties/internal/error-reporter
- * </pre>
- * <p>
- * Errors are separated into domains that categorize a class of errors.
- * In a parser configuration, the parser would register a
- * <code>MessageFormatter</code> for each domain that is capable of
- * localizing error messages and formatting them based on information 
- * about the error. Any parser component can invent new error domains
- * and register additional message formatters to localize messages in
- * those domains.
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://apache.org/xml/properties/internal/error-handler</li>
- * </ul>
- * <p>
- * This component can use the following features and properties but they
- * are not required:
- * <ul>
- *  <li>http://apache.org/xml/features/continue-after-fatal-error</li>
- * </ul>
- *
- * @see MessageFormatter
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Eric Ye, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XMLErrorReporter
-    implements XMLComponent {
-
-    //
-    // Constants
-    //
-
-    // severity
-
-    /** 
-     * Severity: warning. Warnings represent informational messages only
-     * that should not be considered serious enough to stop parsing or 
-     * indicate an error in the document's validity.
-     */
-    public static final short SEVERITY_WARNING = 0;
-
-    /**
-     * Severity: error. Common causes of errors are document structure and/or
-     * content that that does not conform to the grammar rules specified for
-     * the document. These are typically validation errors.
-     */
-    public static final short SEVERITY_ERROR = 1;
-
-    /** 
-     * Severity: fatal error. Fatal errors are errors in the syntax of the
-     * XML document or invalid byte sequences for a given encoding. The
-     * XML 1.0 Specification mandates that errors of this type are not
-     * recoverable.
-     * <p>
-     * <strong>Note:</strong> The parser does have a "continue after fatal
-     * error" feature but it should be used with extreme caution and care.
-     */
-    public static final short SEVERITY_FATAL_ERROR = 2;
-    
-    // feature identifiers
-
-    /** Feature identifier: continue after fatal error. */
-    protected static final String CONTINUE_AFTER_FATAL_ERROR =
-        Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
-
-    // property identifiers
-
-    /** Property identifier: error handler. */
-    protected static final String ERROR_HANDLER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
-
-    // recognized features and properties
-
-    /** Recognized features. */
-    protected static final String[] RECOGNIZED_FEATURES = {
-        CONTINUE_AFTER_FATAL_ERROR,
-    };
-
-    /** Recognized properties. */
-    protected static final String[] RECOGNIZED_PROPERTIES = {
-        ERROR_HANDLER,
-    };
-
-    //
-    // Data
-    //
-
-    /** The locale to be used to format error messages. */
-    protected Locale fLocale;
-
-    /** Mapping of Message formatters for domains. */
-    protected Hashtable fMessageFormatters;
-
-    /** Error handler. */
-    protected XMLErrorHandler fErrorHandler;
-
-    /** Document locator. */
-    protected XMLLocator fLocator;
-
-    /** Continue after fatal error feature. */
-    protected boolean fContinueAfterFatalError;
-
-    /** 
-     * Default error handler. This error handler is only used in the
-     * absence of a registered error handler so that errors are not
-     * "swallowed" silently. This is one of the most common "problems"
-     * reported by users of the parser.
-     */
-    protected XMLErrorHandler fDefaultErrorHandler;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs an error reporter with a locator. */
-    public XMLErrorReporter() {
-
-        // REVISIT: [Q] Should the locator be passed to the reportError
-        //              method? Otherwise, there is no way for a parser
-        //              component to store information about where an
-        //              error occurred so as to report it later. 
-        //
-        //              An example would be to record the location of
-        //              IDREFs so that, at the end of the document, if
-        //              there is no associated ID declared, the error
-        //              could report the location information of the
-        //              reference. -Ac
-        //
-        // NOTE: I added another reportError method that allows the
-        //       caller to specify the location of the error being
-        //       reported. -Ac
-
-        fMessageFormatters = new Hashtable();
-
-    } // <init>()
-
-    //
-    // Methods
-    //
-
-    /**
-     * Sets the current locale.
-     * 
-     * @param locale The new locale.
-     */
-    public void setLocale(Locale locale) {
-        fLocale = locale;
-    } // setLocale(Locale)
-
-    /**
-     * Sets the document locator.
-     *
-     * @param locator The locator.
-     */
-    public void setDocumentLocator(XMLLocator locator) {
-        fLocator = locator;
-    } // setDocumentLocator(XMLLocator)
-
-    /**
-     * Registers a message formatter for the specified domain.
-     * <p>
-     * <strong>Note:</strong> Registering a message formatter for a domain
-     * when there is already a formatter registered will cause the previous
-     * formatter to be lost. This method replaces any previously registered
-     * message formatter for the specified domain.
-     * 
-     * @param domain 
-     * @param messageFormatter 
-     */
-    public void putMessageFormatter(String domain, 
-                                    MessageFormatter messageFormatter) {
-        fMessageFormatters.put(domain, messageFormatter);
-    } // putMessageFormatter(String,MessageFormatter)
-
-    /**
-     * Returns the message formatter associated with the specified domain,
-     * or null if no message formatter is registered for that domain.
-     * 
-     * @param domain The domain of the message formatter.
-     */
-    public MessageFormatter getMessageFormatter(String domain) {
-        return (MessageFormatter)fMessageFormatters.get(domain);
-    } // getMessageFormatter(String):MessageFormatter
-
-    /**
-     * Removes the message formatter for the specified domain and
-     * returns the removed message formatter.
-     * 
-     * @param domain The domain of the message formatter.
-     */
-    public MessageFormatter removeMessageFormatter(String domain) {
-        return (MessageFormatter) fMessageFormatters.remove(domain);
-    } // removeMessageFormatter(String):MessageFormatter
-
-    /**
-     * Reports an error. The error message passed to the error handler
-     * is formatted for the locale by the message formatter installed
-     * for the specified error domain.
-     * 
-     * @param domain    The error domain.
-     * @param key       The key of the error message.
-     * @param arguments The replacement arguments for the error message,
-     *                  if needed.
-     * @param severity  The severity of the error.
-     *
-     * @see #SEVERITY_WARNING
-     * @see #SEVERITY_ERROR
-     * @see #SEVERITY_FATAL_ERROR
-     */
-    public void reportError(String domain, String key, Object[] arguments, 
-                            short severity) throws XNIException {
-        reportError(fLocator, domain, key, arguments, severity);
-    } // reportError(String,String,Object[],short)
-
-    /**
-     * Reports an error at a specific location.
-     * 
-     * @param location  The error location.
-     * @param domain    The error domain.
-     * @param key       The key of the error message.
-     * @param arguments The replacement arguments for the error message,
-     *                  if needed.
-     * @param severity  The severity of the error.
-     *
-     * @see #SEVERITY_WARNING
-     * @see #SEVERITY_ERROR
-     * @see #SEVERITY_FATAL_ERROR
-     */
-    public void reportError(XMLLocator location,
-                            String domain, String key, Object[] arguments, 
-                            short severity) throws XNIException {
-
-        // REVISIT: [Q] Should we do anything about invalid severity
-        //              parameter? -Ac
-        
-        // format error message and create parse exception
-        MessageFormatter messageFormatter = getMessageFormatter(domain);
-        String message;
-        if (messageFormatter != null) {
-            message = messageFormatter.formatMessage(fLocale, key, arguments);
-        }
-        else {
-            StringBuffer str = new StringBuffer();
-            str.append(domain);
-            str.append('#');
-            str.append(key);
-            int argCount = arguments != null ? arguments.length : 0;
-            if (argCount > 0) {
-                str.append('?');
-                for (int i = 0; i < argCount; i++) {
-                    str.append(arguments[i]);
-                    if (i < argCount -1) {
-                        str.append('&');
-                    }
-                }
-            }
-            message = str.toString();
-        }
-        XMLParseException parseException = 
-            new XMLParseException(location, message);
-
-        // get error handler
-        XMLErrorHandler errorHandler = fErrorHandler;
-        if (errorHandler == null) {
-            if (fDefaultErrorHandler == null) {
-                fDefaultErrorHandler = new DefaultErrorHandler();
-            }
-            errorHandler = fDefaultErrorHandler;
-        }
-
-        // call error handler
-        switch (severity) {
-            case SEVERITY_WARNING: {
-                errorHandler.warning(domain, key, parseException);
-                break;
-            }
-            case SEVERITY_ERROR: {
-                errorHandler.error(domain, key, parseException);
-                break;
-            }
-            case SEVERITY_FATAL_ERROR: {
-                errorHandler.fatalError(domain, key, parseException);
-                if (!fContinueAfterFatalError) {
-                    throw parseException;
-                }
-                break;
-            }
-        }
-
-    } // reportError(XMLLocator,String,String,Object[],short)
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     * 
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Thrown by component on initialization error.
-     *                      For example, if a feature or property is
-     *                      required for the operation of the component, the
-     *                      component manager may throw a 
-     *                      SAXNotRecognizedException or a
-     *                      SAXNotSupportedException.
-     */
-    public void reset(XMLComponentManager componentManager)
-        throws XNIException {
-
-        // features
-        try {
-            fContinueAfterFatalError = componentManager.getFeature(CONTINUE_AFTER_FATAL_ERROR);
-        }
-        catch (XNIException e) {
-            fContinueAfterFatalError = false;
-        }
-
-        // properties
-        fErrorHandler = (XMLErrorHandler)componentManager.getProperty(ERROR_HANDLER);
-
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     * 
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-
-        //
-        // Xerces features
-        //
-
-        if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
-            String feature = featureId.substring(Constants.XERCES_FEATURE_PREFIX.length());
-            //
-            // http://apache.org/xml/features/continue-after-fatal-error
-            //   Allows the parser to continue after a fatal error.
-            //   Normally, a fatal error would stop the parse.
-            //
-            if (feature.equals(Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE)) {
-                fContinueAfterFatalError = state;
-            }
-        }
-
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     * 
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-
-        //
-        // Xerces properties
-        //
-
-        if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
-            String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
-
-            if (property.equals(Constants.ERROR_HANDLER_PROPERTY)) {
-                fErrorHandler = (XMLErrorHandler)value;
-            }
-        }
-
-    } // setProperty(String,Object)
-    
-} // class XMLErrorReporter
diff --git a/src/org/apache/xerces/impl/XMLNamespaceBinder.java b/src/org/apache/xerces/impl/XMLNamespaceBinder.java
deleted file mode 100644
index 6989764..0000000
--- a/src/org/apache/xerces/impl/XMLNamespaceBinder.java
+++ /dev/null
@@ -1,869 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.util.Enumeration;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-
-import org.apache.xerces.util.NamespaceSupport;
-import org.apache.xerces.util.SymbolTable;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.NamespaceContext;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLDocumentFilter;
-
-/**
- * This class performs namespace binding on the startElement and endElement
- * method calls and passes all other methods through to the registered
- * document handler. This class can be configured to only pass the
- * start and end prefix mappings (start/endPrefixMapping).
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/namespaces</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- * </ul>
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XMLNamespaceBinder
-    implements XMLComponent, XMLDocumentFilter {
-
-    //
-    // Constants
-    //
-
-    // feature identifiers
-
-    /** Feature identifier: namespaces. */
-    protected static final String NAMESPACES =
-        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
-    // property identifiers
-
-    /** Property identifier: symbol table. */
-    protected static final String SYMBOL_TABLE =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    /** Property identifier: error reporter. */
-    protected static final String ERROR_REPORTER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
-    // recognized features and properties
-
-    /** Recognized features. */
-    protected static final String[] RECOGNIZED_FEATURES = {
-        NAMESPACES,
-    };
-
-    /** Recognized properties. */
-    protected static final String[] RECOGNIZED_PROPERTIES = {
-        SYMBOL_TABLE,
-        ERROR_REPORTER,
-    };
-
-    //
-    // Data
-    //
-
-    // features
-
-    /** Namespaces. */
-    protected boolean fNamespaces;
-
-    // properties
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    /** Error reporter. */
-    protected XMLErrorReporter fErrorReporter;
-
-    // handlers
-
-    /** Document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-
-    // namespaces
-
-    /** Namespace support. */
-    protected NamespaceSupport fNamespaceSupport = new NamespaceSupport();
-
-    // settings
-
-    /** Only pass start and end prefix mapping events. */
-    protected boolean fOnlyPassPrefixMappingEvents;
-
-    // shared context
-
-    /** Namespace context. */
-    private NamespaceContext fNamespaceContext;
-
-    // temp vars
-
-    /** Attribute QName. */
-    private QName fAttributeQName = new QName();
-
-    // symbols
-
-    /** Symbol: "". */
-    private String fEmptySymbol;
-
-    /** Symbol: "xml". */
-    private String fXmlSymbol;
-
-    /** Symbol: "xmlns". */
-    private String fXmlnsSymbol;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLNamespaceBinder() {
-        this(null);
-    } // <init>()
-
-    /**
-     * Constructs a namespace binder that shares the specified namespace
-     * context during each parse.
-     *
-     * @param namespaceContext The shared context.
-     */
-    public XMLNamespaceBinder(NamespaceContext namespaceContext) {
-        fNamespaceContext = namespaceContext;
-    } // <init>(NamespaceContext)
-
-
-    //
-    // Public methods
-    //
-
-    /** Returns the current namespace context. */
-    public NamespaceContext getNamespaceContext() {
-        return fNamespaceSupport;
-    } // getNamespaceContext():NamespaceContext
-
-    // settings
-
-    /**
-     * Sets whether the namespace binder only passes the prefix mapping
-     * events to the registered document handler or passes all document
-     * events.
-     *
-     * @param onlyPassPrefixMappingEvents True to pass only the prefix
-     *                                    mapping events; false to pass
-     *                                    all events.
-     */
-    public void setOnlyPassPrefixMappingEvents(boolean onlyPassPrefixMappingEvents) {
-        fOnlyPassPrefixMappingEvents = onlyPassPrefixMappingEvents;
-    } // setOnlyPassPrefixMappingEvents(boolean)
-
-    /**
-     * Returns true if the namespace binder only passes the prefix mapping
-     * events to the registered document handler; false if the namespace
-     * binder passes all document events.
-     */
-    public boolean getOnlyPassPrefixMappingEvents() {
-        return fOnlyPassPrefixMappingEvents;
-    } // getOnlyPassPrefixMappingEvents():boolean
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     *
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Thrown by component on initialization error.
-     *                      For example, if a feature or property is
-     *                      required for the operation of the component, the
-     *                      component manager may throw a
-     *                      SAXNotRecognizedException or a
-     *                      SAXNotSupportedException.
-     */
-    public void reset(XMLComponentManager componentManager)
-        throws XNIException {
-
-        // features
-        try {
-            fNamespaces = componentManager.getFeature(NAMESPACES);
-        }
-        catch (XMLConfigurationException e) {
-            fNamespaces = true;
-        }
-
-        // Xerces properties
-        fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
-        fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
-
-        // initialize vars
-        fNamespaceSupport.reset(fSymbolTable);
-
-        // save built-in entity names
-        fEmptySymbol = fSymbolTable.addSymbol("");
-        fXmlSymbol = fSymbolTable.addSymbol("xml");
-        fXmlnsSymbol = fSymbolTable.addSymbol("xmlns");
-
-        // use shared context
-        NamespaceContext context = fNamespaceContext;
-        while (context != null) {
-            int count = context.getDeclaredPrefixCount();
-            for (int i = 0; i < count; i++) {
-                String prefix = context.getDeclaredPrefixAt(i);
-                if (fNamespaceSupport.getURI(prefix) == null) {
-                    String uri = context.getURI(prefix);
-                    fNamespaceSupport.declarePrefix(prefix, uri);
-                }
-            }
-            context = context.getParentContext();
-        }
-
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     *
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property during parsing.
-     *
-     * @param propertyId
-     * @param value
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-
-        // Xerces properties
-        if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
-            String property =
-               propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
-            if (property.equals(Constants.SYMBOL_TABLE_PROPERTY)) {
-                fSymbolTable = (SymbolTable)value;
-            }
-            else if (property.equals(Constants.ERROR_REPORTER_PROPERTY)) {
-                fErrorReporter = (XMLErrorReporter)value;
-            }
-            return;
-        }
-
-    } // setProperty(String,Object)
-
-    //
-    // XMLDocumentSource methods
-    //
-
-    /**
-     * Sets the document handler to receive information about the document.
-     *
-     * @param documentHandler The document handler.
-     */
-    public void setDocumentHandler(XMLDocumentHandler documentHandler) {
-        fDocumentHandler = documentHandler;
-    } // setDocumentHandler(XMLDocumentHandler)
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * This method notifies the start of an entity. General entities are just
-     * specified by their name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name,
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding, 
-                            Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.startEntity(name, publicId, systemId,
-                                         baseSystemId, encoding, augs);
-        }
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.textDecl(version, encoding, augs);
-        }
-    } // textDecl(String,String)
-
-    /**
-     * The start of the document.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.startDocument(locator, encoding, augs);
-        }
-    } // startDocument(XMLLocator,String)
-
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     *
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
-        }
-    } // xmlDecl(String,String,String)
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     *
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     *                    otherwise.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement,
-                            String publicId, String systemId, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
-        }
-    } // doctypeDecl(String,String,String)
-
-    /**
-     * A comment.
-     *
-     * @param text The text in the comment.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.comment(text, augs);
-        }
-    } // comment(XMLString)
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     *
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.processingInstruction(target, data, augs);
-        }
-    } // processingInstruction(String,XMLString)
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-        throws XNIException {
-
-        // REVISIT: Should prefix mapping from previous stage in
-        //          the pipeline affect the namespaces?
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
-        }
-
-    } // startPrefixMapping(String,String)
-
-    /**
-     * Binds the namespaces. This method will handle calling the
-     * document handler to start the prefix mappings.
-     * <p>
-     * <strong>Note:</strong> This method makes use of the
-     * fAttributeQName variable. Any contents of the variable will
-     * be destroyed. Caller should copy the values out of this
-     * temporary variable before calling this method.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-
-        if (fNamespaces) {
-            handleStartElement(element, attributes, augs, false);
-        }
-        else if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(element, attributes, augs);
-        }
-
-
-    } // startElement(QName,XMLAttributes)
-
-    /**
-     * An empty element.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-
-        if (fNamespaces) {
-            handleStartElement(element, attributes, augs, true);
-            handleEndElement(element, augs, true);
-        }
-        else if (fDocumentHandler != null) {
-            fDocumentHandler.emptyElement(element, attributes, augs);
-        }
-
-    } // emptyElement(QName,XMLAttributes)
-
-    /**
-     * Character content.
-     *
-     * @param text The content.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.characters(text, augs);
-        }
-    } // characters(XMLString)
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     *
-     * @param text The ignorable whitespace.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.ignorableWhitespace(text, augs);
-        }
-    } // ignorableWhitespace(XMLString)
-
-    /**
-     * The end of an element.
-     *
-     * @param element The name of the element.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-
-        if (fNamespaces) {
-            handleEndElement(element, augs, false);
-        }
-        else if (fDocumentHandler != null) {
-            fDocumentHandler.endElement(element, augs);
-        }
-
-    } // endElement(QName)
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
-
-        // REVISIT: Should prefix mapping from previous stage in
-        //          the pipeline affect the namespaces?
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endPrefixMapping(prefix, augs);
-        }
-
-    } // endPrefixMapping(String)
-
-    /**
-     * The start of a CDATA section.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.startCDATA(augs);
-        }
-    } // startCDATA()
-
-    /**
-     * The end of a CDATA section.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.endCDATA(augs);
-        }
-    } // endCDATA()
-
-    /**
-     * The end of the document.     
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.endDocument(augs);
-        }
-    } // endDocument()
-
-    /**
-     * This method notifies the end of an entity. General entities are just
-     * specified by their name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name The name of the entity.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            fDocumentHandler.endEntity(name, augs);
-        }
-    } // endEntity(String)
-
-    //
-    // Protected methods
-    //
-
-    /** Handles start element. */
-    protected void handleStartElement(QName element, XMLAttributes attributes, 
-                                      Augmentations augs, 
-                                      boolean isEmpty) throws XNIException {
-
-        // add new namespace context
-        fNamespaceSupport.pushContext();
-
-        // search for new namespace bindings
-        int length = attributes.getLength();
-        for (int i = 0; i < length; i++) {
-            String localpart = attributes.getLocalName(i);
-            String prefix = attributes.getPrefix(i);
-            if (prefix == fXmlnsSymbol || localpart == fXmlnsSymbol) {
-                // check for duplicates
-                prefix = localpart != fXmlnsSymbol ? localpart : fEmptySymbol;
-                String uri = attributes.getValue(i);
-                uri = fSymbolTable.addSymbol(uri);
-
-                // http://www.w3.org/TR/1999/REC-xml-names-19990114/#dt-prefix
-                // We should only report an error if there is a prefix,
-                // that is, the local part is not "xmlns". -SG
-                if (uri == fEmptySymbol && localpart != fXmlnsSymbol) {
-                    fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN,
-                                               "EmptyPrefixedAttName",
-                                               new Object[]{attributes.getQName(i)},
-                                               XMLErrorReporter.SEVERITY_FATAL_ERROR);
-                    continue;
-                }
-
-                // declare prefix in context
-                fNamespaceSupport.declarePrefix(prefix, uri.length() != 0 ? uri : null);
-
-                // call handler
-                if (fDocumentHandler != null) {
-                    fDocumentHandler.startPrefixMapping(prefix, uri, augs);
-                }
-            }
-        }
-
-        // bind the element
-        String prefix = element.prefix != null
-                      ? element.prefix : fEmptySymbol;
-        element.uri = fNamespaceSupport.getURI(prefix);
-        if (element.prefix == null && element.uri != null) {
-            element.prefix = fEmptySymbol;
-        }
-        if (element.prefix != null && element.uri == null) {
-            fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN,
-                                       "ElementPrefixUnbound",
-                                       new Object[]{element.prefix, element.rawname},
-                                       XMLErrorReporter.SEVERITY_FATAL_ERROR);
-        }
-
-        // bind the attributes
-        for (int i = 0; i < length; i++) {
-            attributes.getName(i, fAttributeQName);
-            String aprefix = fAttributeQName.prefix != null
-                           ? fAttributeQName.prefix : fEmptySymbol;
-            String arawname = fAttributeQName.rawname;
-            if (aprefix == fXmlSymbol) {
-                fAttributeQName.uri = fNamespaceSupport.getURI(fXmlSymbol);
-                attributes.setName(i, fAttributeQName);
-            }
-            else if (arawname != fXmlnsSymbol && !arawname.startsWith("xmlns:")) {
-                if (aprefix != fEmptySymbol) {
-                    fAttributeQName.uri = fNamespaceSupport.getURI(aprefix);
-                    if (fAttributeQName.uri == null) {
-                        fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN,
-                                                   "AttributePrefixUnbound",
-                                                   new Object[]{aprefix, arawname},
-                                                   XMLErrorReporter.SEVERITY_FATAL_ERROR);
-                    }
-                    attributes.setName(i, fAttributeQName);
-                }
-            }
-        }
-
-        // verify that duplicate attributes don't exist
-        // Example: <foo xmlns:a='NS' xmlns:b='NS' a:attr='v1' b:attr='v2'/>
-        int attrCount = attributes.getLength();
-        for (int i = 0; i < attrCount - 1; i++) {
-            String alocalpart = attributes.getLocalName(i);
-            String auri = attributes.getURI(i);
-            for (int j = i + 1; j < attrCount; j++) {
-                String blocalpart = attributes.getLocalName(j);
-                String buri = attributes.getURI(j);
-                if (alocalpart == blocalpart && auri == buri) {
-                    fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN,
-                                               "AttributeNSNotUnique",
-                                               new Object[]{element.rawname,alocalpart, auri},
-                                               XMLErrorReporter.SEVERITY_FATAL_ERROR);
-                }
-            }
-        }
-       
-        // call handler
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            if (isEmpty) {
-                fDocumentHandler.emptyElement(element, attributes, augs);
-            }
-            else {
-                fDocumentHandler.startElement(element, attributes, augs);
-            }
-        }
-
-
-    } // handleStartElement(QName,XMLAttributes,boolean)
-
-    /** Handles end element. */
-    protected void handleEndElement(QName element, Augmentations augs, boolean isEmpty)
-        throws XNIException {
-
-        // bind element
-        String eprefix = element.prefix != null ? element.prefix : fEmptySymbol;
-        element.uri = fNamespaceSupport.getURI(eprefix);
-        if (element.uri != null) {
-            element.prefix = eprefix;
-        }
-
-        // call handlers
-        if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
-            if (!isEmpty) {
-                fDocumentHandler.endElement(element, augs);
-            }
-        }
-
-        // end prefix mappings
-        if (fDocumentHandler != null) {
-            int count = fNamespaceSupport.getDeclaredPrefixCount();
-            for (int i = count - 1; i >= 0; i--) {
-                String prefix = fNamespaceSupport.getDeclaredPrefixAt(i);
-                fDocumentHandler.endPrefixMapping(prefix, augs);
-            }
-        }
-
-        // pop context
-        fNamespaceSupport.popContext();
-
-    } // handleEndElement(QName,boolean)
-
-} // class XMLNamespaceBinder
diff --git a/src/org/apache/xerces/impl/XMLScanner.java b/src/org/apache/xerces/impl/XMLScanner.java
deleted file mode 100644
index 63d6c78..0000000
--- a/src/org/apache/xerces/impl/XMLScanner.java
+++ /dev/null
@@ -1,1243 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl;
-
-import java.io.EOFException;
-import java.io.IOException;
-
-import org.apache.xerces.impl.XMLEntityScanner;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.XMLStringBuffer;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-
-/**
- * This class is responsible for holding scanning methods common to
- * scanning the XML document structure and content as well as the DTD
- * structure and content. Both XMLDocumentScanner and XMLDTDScanner inherit
- * from this base class.
- *
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/validation</li>
- *  <li>http://apache.org/xml/features/scanner/notify-char-refs</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *  <li>http://apache.org/xml/properties/internal/entity-manager</li>
- * </ul>
- *
- * @author Andy Clark, IBM
- * @author Arnaud  Le Hors, IBM
- * @author Eric Ye, IBM
- *
- * @version $Id$
- */
-public abstract class XMLScanner 
-    implements XMLComponent {
-
-    //
-    // Constants
-    //
-
-    // feature identifiers
-
-    /** Feature identifier: validation. */
-    protected static final String VALIDATION =
-        Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
-    /** Feature identifier: notify character references. */
-    protected static final String NOTIFY_CHAR_REFS =
-        Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_CHAR_REFS_FEATURE;
-
-    // property identifiers
-
-    /** Property identifier: symbol table. */
-    protected static final String SYMBOL_TABLE = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    /** Property identifier: error reporter. */
-    protected static final String ERROR_REPORTER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
-    /** Property identifier: entity manager. */
-    protected static final String ENTITY_MANAGER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
-    // debugging
-
-    /** Debug attribute normalization. */
-    protected static final boolean DEBUG_ATTR_NORMALIZATION = false;
-
-    //
-    // Data
-    //
-
-    // features
-
-    /** 
-     * Validation. This feature identifier is:
-     * http://xml.org/sax/features/validation
-     */
-    protected boolean fValidation = false;
-    
-    /** Character references notification. */
-    protected boolean fNotifyCharRefs = false;
-
-    // properties
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    /** Error reporter. */
-    protected XMLErrorReporter fErrorReporter;
-
-    /** Entity manager. */
-    protected XMLEntityManager fEntityManager;
-
-    // protected data
-
-    /** Entity scanner. */
-    protected XMLEntityScanner fEntityScanner;
-
-    /** Entity depth. */
-    protected int fEntityDepth;
-
-    /** Literal value of the last character refence scanned. */
-    protected String fCharRefLiteral = null;
-
-    /** Scanning attribute. */
-    protected boolean fScanningAttribute;
-
-    // symbols
-
-    /** Symbol: "version". */
-    protected String fVersionSymbol;
-
-    /** Symbol: "encoding". */
-    protected String fEncodingSymbol;
-
-    /** Symbol: "standalone". */
-    protected String fStandaloneSymbol;
-
-    /** Symbol: "amp". */
-    protected String fAmpSymbol;
-
-    /** Symbol: "lt". */
-    protected String fLtSymbol;
-
-    /** Symbol: "gt". */
-    protected String fGtSymbol;
-
-    /** Symbol: "quot". */
-    protected String fQuotSymbol;
-
-    /** Symbol: "apos". */
-    protected String fAposSymbol;
-
-    // temporary variables
-
-    // NOTE: These objects are private to help prevent accidental modification
-    //       of values by a subclass. If there were protected *and* the sub-
-    //       modified the values, it would be difficult to track down the real
-    //       cause of the bug. By making these private, we avoid this 
-    //       possibility.
-
-    /** String. */
-    private XMLString fString = new XMLString();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer = new XMLStringBuffer();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer();
-
-    /** String buffer. */
-    private XMLStringBuffer fStringBuffer3 = new XMLStringBuffer();
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * 
-     * 
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Throws exception if required features and
-     *                      properties cannot be found.
-     */
-    public void reset(XMLComponentManager componentManager)
-        throws XMLConfigurationException {
-
-        // Xerces properties
-        fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
-        fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
-        fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER);
-
-        // initialize scanner
-        fEntityScanner = fEntityManager.getEntityScanner();
-        
-        // initialize vars
-        fEntityDepth = 0;
-
-        // save built-in entity names
-        fVersionSymbol = fSymbolTable.addSymbol("version");
-        fEncodingSymbol = fSymbolTable.addSymbol("encoding");
-        fStandaloneSymbol = fSymbolTable.addSymbol("standalone");
-        fAmpSymbol = fSymbolTable.addSymbol("amp");
-        fLtSymbol = fSymbolTable.addSymbol("lt");
-        fGtSymbol = fSymbolTable.addSymbol("gt");
-        fQuotSymbol = fSymbolTable.addSymbol("quot");
-        fAposSymbol = fSymbolTable.addSymbol("apos");
-        
-        // sax features
-        try {
-            fValidation = componentManager.getFeature(VALIDATION);
-        }
-        catch (XMLConfigurationException e) {
-            fValidation = false;
-        }
-        try {
-            fNotifyCharRefs = componentManager.getFeature(NOTIFY_CHAR_REFS);
-        }
-        catch (XMLConfigurationException e) {
-            fNotifyCharRefs = false;
-        }
-
-    } // reset(XMLComponentManager)
-
-    /**
-     * Sets the value of a property during parsing.
-     * 
-     * @param propertyId 
-     * @param value 
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-        
-        // Xerces properties
-        if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
-            String property =
-               propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
-            if (property.equals(Constants.SYMBOL_TABLE_PROPERTY)) {
-                fSymbolTable = (SymbolTable)value;
-            }
-            else if (property.equals(Constants.ERROR_REPORTER_PROPERTY)) {
-                fErrorReporter = (XMLErrorReporter)value;
-            }
-            else if (property.equals(Constants.ENTITY_MANAGER_PROPERTY)) {
-                fEntityManager = (XMLEntityManager)value;
-            }
-            return;
-        }
-
-    } // setProperty(String,Object)
-
-    /*
-     * Sets the feature of the scanner.
-     */
-    public void setFeature(String featureId, boolean value)
-        throws XMLConfigurationException {
-            
-        if (VALIDATION.equals(featureId)) {
-            fValidation = value;
-        } else if (NOTIFY_CHAR_REFS.equals(featureId)) {
-            fNotifyCharRefs = value;
-        }
-    }
-    
-    //
-    // Protected methods
-    //
-
-    // common scanning methods
-
-    /**
-     * Scans an XML or text declaration.
-     * <p>
-     * <pre>
-     * [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
-     * [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
-     * [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' |  "'" EncName "'" )
-     * [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
-     * [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'")
-     *                 | ('"' ('yes' | 'no') '"'))
-     *
-     * [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'
-     * </pre>
-     *
-     * @param scanningTextDecl True if a text declaration is to
-     *                         be scanned instead of an XML
-     *                         declaration.
-     * @param pseudoAttributeValues An array of size 3 to return the version,
-     *                         encoding and standalone pseudo attribute values
-     *                         (in that order).
-     *
-     * <strong>Note:</strong> This method uses fString, anything in it
-     * at the time of calling is lost.
-     */
-    protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl,
-                                         String[] pseudoAttributeValues) 
-        throws IOException, XNIException {
-
-        // pseudo-attribute values
-        String version = null;
-        String encoding = null;
-        String standalone = null;
-
-        // scan pseudo-attributes
-        final int STATE_VERSION = 0;
-        final int STATE_ENCODING = 1;
-        final int STATE_STANDALONE = 2;
-        final int STATE_DONE = 3;
-        int state = STATE_VERSION;
-        boolean sawSpace = fEntityScanner.skipSpaces();
-        while (fEntityScanner.peekChar() != '?') {
-            String name = scanPseudoAttribute(scanningTextDecl, fString);
-            switch (state) {
-                case STATE_VERSION: {
-                    if (name == fVersionSymbol) {
-                        if (!sawSpace) {
-                            reportFatalError(scanningTextDecl
-                                       ? "SpaceRequiredBeforeVersionInTextDecl"
-                                       : "SpaceRequiredBeforeVersionInXMLDecl",
-                                             null);
-                        }
-                        version = fString.toString();
-                        state = STATE_ENCODING;
-                        if (!version.equals("1.0")) {
-                            reportFatalError("VersionNotSupported", 
-                                             new Object[]{version});
-                        }
-                    }
-                    else if (name == fEncodingSymbol) {
-                        if (!scanningTextDecl) {
-                            reportFatalError("VersionInfoRequired", null);
-                        }
-                        if (!sawSpace) {
-                            reportFatalError(scanningTextDecl
-                                      ? "SpaceRequiredBeforeEncodingInTextDecl"
-                                      : "SpaceRequiredBeforeEncodingInXMLDecl",
-                                             null);
-                        }
-                        encoding = fString.toString();
-                        state = scanningTextDecl ? STATE_DONE : STATE_STANDALONE;
-                    }
-                    else {
-                        if (scanningTextDecl) {
-                            reportFatalError("EncodingDeclRequired", null);
-                        }
-                        else {
-                            reportFatalError("VersionInfoRequired", null);
-                        }
-                    }
-                    break;
-                }
-                case STATE_ENCODING: {
-                    if (name == fEncodingSymbol) {
-                        if (!sawSpace) {
-                            reportFatalError(scanningTextDecl
-                                      ? "SpaceRequiredBeforeEncodingInTextDecl"
-                                      : "SpaceRequiredBeforeEncodingInXMLDecl",
-                                             null);
-                        }
-                        encoding = fString.toString();
-                        state = scanningTextDecl ? STATE_DONE : STATE_STANDALONE;
-                        // TODO: check encoding name; set encoding on
-                        //       entity scanner
-                    }
-                    else if (!scanningTextDecl && name == fStandaloneSymbol) {
-                        if (!sawSpace) {
-                            reportFatalError("SpaceRequiredBeforeStandalone",
-                                             null);
-                        }
-                        standalone = fString.toString();
-                        state = STATE_DONE;
-                        if (!standalone.equals("yes") && !standalone.equals("no")) {
-                            reportFatalError("SDDeclInvalid", null);
-                        }
-                    }
-                    else {
-                        reportFatalError("EncodingDeclRequired", null);
-                    }
-                    break;
-                }
-                case STATE_STANDALONE: {
-                    if (name == fStandaloneSymbol) {
-                        if (!sawSpace) {
-                            reportFatalError("SpaceRequiredBeforeStandalone",
-                                             null);
-                        }
-                        standalone = fString.toString();
-                        state = STATE_DONE;
-                        if (!standalone.equals("yes") && !standalone.equals("no")) {
-                            reportFatalError("SDDeclInvalid", null);
-                        }
-                    }
-                    else {
-                        reportFatalError("EncodingDeclRequired", null);
-                    }
-                    break;
-                }
-                default: {
-                    reportFatalError("NoMorePseudoAttributes", null);
-                }
-            }
-            sawSpace = fEntityScanner.skipSpaces();
-        }
-        if (scanningTextDecl && state != STATE_DONE) {
-            reportFatalError("MorePseudoAttributes", null);
-        }
-
-        // end
-        if (!fEntityScanner.skipChar('?')) {
-            reportFatalError("XMLDeclUnterminated", null);
-        }
-        if (!fEntityScanner.skipChar('>')) {
-            reportFatalError("XMLDeclUnterminated", null);
-
-        }
-
-        // fill in return array
-        pseudoAttributeValues[0] = version;
-        pseudoAttributeValues[1] = encoding;
-        pseudoAttributeValues[2] = standalone;
-
-    } // scanXMLDeclOrTextDecl(boolean)
-
-    /**
-     * Scans a pseudo attribute.
-     *
-     * @param scanningTextDecl True if scanning this pseudo-attribute for a
-     *                         TextDecl; false if scanning XMLDecl. This 
-     *                         flag is needed to report the correct type of
-     *                         error.
-     * @param value            The string to fill in with the attribute 
-     *                         value.
-     *
-     * @return The name of the attribute
-     *
-     * <strong>Note:</strong> This method uses fStringBuffer2, anything in it
-     * at the time of calling is lost.
-     */
-    public String scanPseudoAttribute(boolean scanningTextDecl, 
-                                      XMLString value) 
-        throws IOException, XNIException {
-
-        String name = fEntityScanner.scanName();
-        if (name == null) {
-            reportFatalError("PseudoAttrNameExpected", null);
-        }
-        fEntityScanner.skipSpaces();
-        if (!fEntityScanner.skipChar('=')) {
-            reportFatalError(scanningTextDecl ? "EqRequiredInTextDecl"
-                             : "EqRequiredInXMLDecl", new Object[]{name});
-        }
-        fEntityScanner.skipSpaces();
-        int quote = fEntityScanner.peekChar();
-        if (quote != '\'' && quote != '"') {
-            reportFatalError(scanningTextDecl ? "QuoteRequiredInTextDecl"
-                             : "QuoteRequiredInXMLDecl" , new Object[]{name});
-        }
-        fEntityScanner.scanChar();
-        int c = fEntityScanner.scanLiteral(quote, value);
-        if (c != quote) {
-            fStringBuffer2.clear();
-            do {
-                fStringBuffer2.append(value);
-                if (c != -1) {
-                    if (c == '&' || c == '%' || c == '<' || c == ']') {
-                        fStringBuffer2.append((char)fEntityScanner.scanChar());
-                    }
-                    else if (XMLChar.isHighSurrogate(c)) {
-                        scanSurrogates(fStringBuffer2);
-                    }
-                    else if (XMLChar.isInvalid(c)) {
-                        String key = scanningTextDecl
-                            ? "InvalidCharInTextDecl" : "InvalidCharInXMLDecl";
-                        reportFatalError(key,
-                                       new Object[] {Integer.toString(c, 16)});
-                        fEntityScanner.scanChar();
-                    }
-                }
-                c = fEntityScanner.scanLiteral(quote, value);
-            } while (c != quote);
-            fStringBuffer2.append(value);
-            value.setValues(fStringBuffer2);
-        }
-        if (!fEntityScanner.skipChar(quote)) {
-            reportFatalError(scanningTextDecl ? "CloseQuoteMissingInTextDecl"
-                             : "CloseQuoteMissingInXMLDecl",
-                             new Object[]{name});
-        }
-
-        // return
-        return name;
-
-    } // scanPseudoAttribute(XMLString):String
-    
-    /**
-     * Scans a processing instruction.
-     * <p>
-     * <pre>
-     * [16] PI ::= '&lt;?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
-     * [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
-     * </pre>
-     * <strong>Note:</strong> This method uses fString, anything in it
-     * at the time of calling is lost.
-     */
-    protected void scanPI() throws IOException, XNIException {
-
-        // target
-        String target = fEntityScanner.scanName();
-        if (target == null) {
-            reportFatalError("PITargetRequired", null);
-        }
-
-        // scan data
-        scanPIData(target, fString);
-
-    } // scanPI()
-
-    /**
-     * Scans a processing data. This is needed to handle the situation
-     * where a document starts with a processing instruction whose 
-     * target name <em>starts with</em> "xml". (e.g. xmlfoo)
-     *
-     * <strong>Note:</strong> This method uses fStringBuffer, anything in it
-     * at the time of calling is lost.
-     *
-     * @param target The PI target
-     * @param data The string to fill in with the data
-     */
-    protected void scanPIData(String target, XMLString data) 
-        throws IOException, XNIException {
-
-        // check target
-        if (target.length() == 3) {
-            char c0 = Character.toLowerCase(target.charAt(0));
-            char c1 = Character.toLowerCase(target.charAt(1));
-            char c2 = Character.toLowerCase(target.charAt(2));
-            if (c0 == 'x' && c1 == 'm' && c2 == 'l') {
-                reportFatalError("ReservedPITarget", null);
-            }
-        }
-
-        // spaces
-        if (!fEntityScanner.skipSpaces()) {
-            if (fEntityScanner.skipString("?>")) {
-                // we found the end, there is no data
-                data.clear();
-                return;
-            }
-            else {
-                // if there is data there should be some space
-                reportFatalError("SpaceRequiredInPI", null);
-            }
-        }
-
-        // data
-        if (fEntityScanner.scanData("?>", data)) {
-            fStringBuffer.clear();
-            do {
-                fStringBuffer.append(data);
-                int c = fEntityScanner.peekChar();
-                if (c != -1) {
-                    if (XMLChar.isHighSurrogate(c)) {
-                        scanSurrogates(fStringBuffer);
-                    }
-                    else if (XMLChar.isInvalid(c)) {
-                        reportFatalError("InvalidCharInPI",
-                                         new Object[]{Integer.toHexString(c)});
-                        fEntityScanner.scanChar();
-                    }
-                }
-            } while (fEntityScanner.scanData("?>", data));
-            fStringBuffer.append(data);
-            data.setValues(fStringBuffer);
-        }
-
-    } // scanPIData(String,XMLString)
-
-    /**
-     * Scans a comment.
-     * <p>
-     * <pre>
-     * [15] Comment ::= '&lt!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
-     * </pre>
-     * <p>
-     * <strong>Note:</strong> Called after scanning past '&lt;!--'
-     * <strong>Note:</strong> This method uses fString, anything in it
-     * at the time of calling is lost.
-     *
-     * @param text The buffer to fill in with the text.
-     */
-    protected void scanComment(XMLStringBuffer text)
-        throws IOException, XNIException {
-
-        // text
-        // REVISIT: handle invalid character, eof
-        text.clear();
-        while (fEntityScanner.scanData("--", fString)) {
-            text.append(fString);
-            /***/
-            int c = fEntityScanner.peekChar();
-            if (c != -1) {
-                if (XMLChar.isHighSurrogate(c)) {
-                    scanSurrogates(text);
-                }
-                if (XMLChar.isInvalid(c)) {
-                    reportFatalError("InvalidCharInComment",
-                                     new Object[] { Integer.toHexString(c) }); 
-                    fEntityScanner.scanChar();
-                }
-            }
-        }
-        text.append(fString);
-        if (!fEntityScanner.skipChar('>')) {
-            reportFatalError("DashDashInComment", null);
-        }
-
-    } // scanComment()
-
-    /**
-     * Scans an attribute value and normalizes whitespace converting all
-     * whitespace characters to space characters.
-     * 
-     * [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
-     *
-     * @param value The XMLString to fill in with the value.
-     * @param nonNormalizedValue The XMLString to fill in with the 
-     *                           non-normalized value.
-     * @param atName The name of the attribute being parsed (for error msgs).
-     * @param attributes The attributes list for the scanned attribute.
-     * @param attrIndex The index of the attribute to use from the list.
-     * @param checkEntities true if undeclared entities should be reported as VC violation,  
-     *                      false if undeclared entities should be reported as WFC violation.
-     *
-     * <strong>Note:</strong> This method uses fStringBuffer2, anything in it
-     * at the time of calling is lost.
-     **/
-    protected void scanAttributeValue(XMLString value, 
-                                      XMLString nonNormalizedValue,
-                                      String atName,
-                                      XMLAttributes attributes, int attrIndex,
-                                      boolean checkEntities)
-        throws IOException, XNIException
-    {
-        // quote
-        int quote = fEntityScanner.peekChar();
-        if (quote != '\'' && quote != '"') {
-            reportFatalError("OpenQuoteExpected", new Object[]{atName});
-        }
-
-        fEntityScanner.scanChar();
-        int entityDepth = fEntityDepth;
-
-        int c = fEntityScanner.scanLiteral(quote, value);
-        if (DEBUG_ATTR_NORMALIZATION) {
-            System.out.println("** scanLiteral -> \""
-                               + value.toString() + "\"");
-        }
-        fStringBuffer2.clear();
-        fStringBuffer2.append(value);
-        normalizeWhitespace(value);
-        if (DEBUG_ATTR_NORMALIZATION) {
-            System.out.println("** normalizeWhitespace -> \""
-                               + value.toString() + "\"");
-        }
-        if (c != quote) {
-            fScanningAttribute = true;
-            fStringBuffer.clear();
-            do {
-                fStringBuffer.append(value);
-                if (DEBUG_ATTR_NORMALIZATION) {
-                    System.out.println("** value2: \""
-                                       + fStringBuffer.toString() + "\"");
-                }
-                if (c == '&') {
-                    fEntityScanner.skipChar('&');
-                    if (entityDepth == fEntityDepth) {
-                        fStringBuffer2.append('&');
-                    }
-                    if (fEntityScanner.skipChar('#')) {
-                        if (entityDepth == fEntityDepth) {
-                            fStringBuffer2.append('#');
-                        }
-                        int ch = scanCharReferenceValue(fStringBuffer, fStringBuffer2);
-                        if (ch != -1) {
-                            if (DEBUG_ATTR_NORMALIZATION) {
-                                System.out.println("** value3: \""
-                                                   + fStringBuffer.toString()
-                                                   + "\"");
-                            }
-                        }
-                    }
-                    else {
-                        String entityName = fEntityScanner.scanName();
-                        if (entityName == null) {
-                            reportFatalError("NameRequiredInReference", null);
-                        }
-                        else if (entityDepth == fEntityDepth) {
-                            fStringBuffer2.append(entityName);
-                        }
-                        if (!fEntityScanner.skipChar(';')) {
-                            reportFatalError("SemicolonRequiredInReference",
-                                             new Object []{entityName});
-                        }
-                        else if (entityDepth == fEntityDepth) {
-                            fStringBuffer2.append(';');
-                        }
-                        if (entityName == fAmpSymbol) {
-                            fStringBuffer.append('&');
-                            if (DEBUG_ATTR_NORMALIZATION) {
-                                System.out.println("** value5: \""
-                                                   + fStringBuffer.toString()
-                                                   + "\"");
-                            }
-                        }
-                        else if (entityName == fAposSymbol) {
-                            fStringBuffer.append('\'');
-                            if (DEBUG_ATTR_NORMALIZATION) {
-                                System.out.println("** value7: \""
-                                                   + fStringBuffer.toString()
-                                                   + "\"");
-                            }
-                        }
-                        else if (entityName == fLtSymbol) {
-                            fStringBuffer.append('<');
-                            if (DEBUG_ATTR_NORMALIZATION) {
-                                System.out.println("** value9: \""
-                                                   + fStringBuffer.toString()
-                                                   + "\"");
-                            }
-                        }
-                        else if (entityName == fGtSymbol) {
-                            fStringBuffer.append('>');
-                            if (DEBUG_ATTR_NORMALIZATION) {
-                                System.out.println("** valueB: \""
-                                                   + fStringBuffer.toString()
-                                                   + "\"");
-                            }
-                        }
-                        else if (entityName == fQuotSymbol) {
-                            fStringBuffer.append('"');
-                            if (DEBUG_ATTR_NORMALIZATION) {
-                                System.out.println("** valueD: \""
-                                                   + fStringBuffer.toString()
-                                                   + "\"");
-                            }
-                        }
-                        else {
-                            if (fEntityManager.isExternalEntity(entityName)) {
-                                reportFatalError("ReferenceToExternalEntity",
-                                                 new Object[] { entityName });
-                            }
-                            else {
-                                if (!fEntityManager.isDeclaredEntity(entityName)) {
-                                    //WFC & VC: Entity Declared
-                                    if (checkEntities) {
-                                        if (fValidation) {
-                                            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                                                       "EntityNotDeclared",
-                                                                       new Object[]{entityName},
-                                                                       XMLErrorReporter.SEVERITY_ERROR);
-                                        }
-                                    }
-                                    else {
-                                        reportFatalError("EntityNotDeclared",
-                                                         new Object[]{entityName});
-                                    }
-                                }
-                                fEntityManager.startEntity(entityName, true);
-                            }
-                        }
-                    }
-                }
-                else if (c == '<') {
-                    reportFatalError("LessthanInAttValue",
-                                     new Object[] { null, atName });
-                    fEntityScanner.scanChar();
-                    if (entityDepth == fEntityDepth) {
-                        fStringBuffer2.append((char)c);
-                    }
-                }
-                else if (c == '%' || c == ']') {
-                    fEntityScanner.scanChar();
-                    fStringBuffer.append((char)c);
-                    if (entityDepth == fEntityDepth) {
-                        fStringBuffer2.append((char)c);
-                    }
-                    if (DEBUG_ATTR_NORMALIZATION) {
-                        System.out.println("** valueF: \""
-                                           + fStringBuffer.toString() + "\"");
-                    }
-                }
-                else if (c == '\n' || c == '\r') {
-                    fEntityScanner.scanChar();
-                    fStringBuffer.append(' ');
-                    if (entityDepth == fEntityDepth) {
-                        fStringBuffer2.append('\n');
-                    }
-                }
-                else if (c != -1 && XMLChar.isHighSurrogate(c)) {
-                    if (scanSurrogates(fStringBuffer3)) {
-                        fStringBuffer.append(fStringBuffer3);
-                        if (entityDepth == fEntityDepth) {
-                            fStringBuffer2.append(fStringBuffer3);
-                        }
-                        if (DEBUG_ATTR_NORMALIZATION) {
-                            System.out.println("** valueI: \""
-                                               + fStringBuffer.toString()
-                                               + "\"");
-                        }
-                    }
-                }
-                else if (c != -1 && XMLChar.isInvalid(c)) {
-                    reportFatalError("InvalidCharInAttValue",
-                                     new Object[] {Integer.toString(c, 16)});
-                    fEntityScanner.scanChar();
-                    if (entityDepth == fEntityDepth) {
-                        fStringBuffer2.append((char)c);
-                    }
-                }
-                c = fEntityScanner.scanLiteral(quote, value);
-                if (entityDepth == fEntityDepth) {
-                    fStringBuffer2.append(value);
-                }
-                normalizeWhitespace(value);
-            } while (c != quote || entityDepth != fEntityDepth);
-            fStringBuffer.append(value);
-            if (DEBUG_ATTR_NORMALIZATION) {
-                System.out.println("** valueN: \""
-                                   + fStringBuffer.toString() + "\"");
-            }
-            value.setValues(fStringBuffer);
-            fScanningAttribute = false;
-        }
-        nonNormalizedValue.setValues(fStringBuffer2);
-
-        // quote
-        int cquote = fEntityScanner.scanChar();
-        if (cquote != quote) {
-            reportFatalError("CloseQuoteExpected", new Object[]{atName});
-        }
-    } // scanAttributeValue()
-
-
-    /**
-     * Scans External ID and return the public and system IDs.
-     *
-     * @param identifiers An array of size 2 to return the system id,
-     *                    and public id (in that order).
-     * @param optionalSystemId Specifies whether the system id is optional.
-     *
-     * <strong>Note:</strong> This method uses fString and fStringBuffer,
-     * anything in them at the time of calling is lost.
-     */
-    protected void scanExternalID(String[] identifiers,
-                                  boolean optionalSystemId)
-        throws IOException, XNIException {
-
-        String systemId = null;
-        String publicId = null;
-        if (fEntityScanner.skipString("PUBLIC")) {
-            if (!fEntityScanner.skipSpaces()) {
-                reportFatalError("SpaceRequiredAfterPUBLIC", null);
-            }
-            scanPubidLiteral(fString);
-            publicId = fString.toString();
-
-            if (!fEntityScanner.skipSpaces() && !optionalSystemId) {
-                reportFatalError("SpaceRequiredBetweenPublicAndSystem", null);
-            }
-        }
-
-        if (publicId != null || fEntityScanner.skipString("SYSTEM")) {
-            if (publicId == null && !fEntityScanner.skipSpaces()) {
-                reportFatalError("SpaceRequiredAfterSYSTEM", null);
-            }
-            int quote = fEntityScanner.peekChar();
-            if (quote != '\'' && quote != '"') {
-                if (publicId != null && optionalSystemId) {
-                    // looks like we don't have any system id
-                    // simply return the public id
-                    identifiers[0] = null;
-                    identifiers[1] = publicId;
-                    return;
-                }
-                reportFatalError("QuoteRequiredInSystemID", null);
-            }
-            fEntityScanner.scanChar();
-            XMLString ident = fString;
-            if (fEntityScanner.scanLiteral(quote, ident) != quote) {
-                fStringBuffer.clear();
-                do {
-                    fStringBuffer.append(ident);
-                    int c = fEntityScanner.peekChar();
-                    if (XMLChar.isMarkup(c) || c == ']') {
-                        fStringBuffer.append((char)fEntityScanner.scanChar());
-                    }
-                } while (fEntityScanner.scanLiteral(quote, ident) != quote);
-                fStringBuffer.append(ident);
-                ident = fStringBuffer;
-            }
-            systemId = ident.toString();
-            if (!fEntityScanner.skipChar(quote)) {
-                reportFatalError("SystemIDUnterminated", null);
-            }
-        }
-
-        // store result in array
-        identifiers[0] = systemId;
-        identifiers[1] = publicId;
-    }
-
-
-    /**
-     * Scans public ID literal.
-     *
-     * [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" 
-     * [13] PubidChar::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
-     *
-     * The returned string is normalized according to the following rule,
-     * from http://www.w3.org/TR/REC-xml#dt-pubid:
-     *
-     * Before a match is attempted, all strings of white space in the public
-     * identifier must be normalized to single space characters (#x20), and
-     * leading and trailing white space must be removed.
-     *
-     * @param literal The string to fill in with the public ID literal.
-     * @returns True on success.
-     *
-     * <strong>Note:</strong> This method uses fStringBuffer, anything in it at
-     * the time of calling is lost.
-     */
-    protected boolean scanPubidLiteral(XMLString literal)
-        throws IOException, XNIException
-    {
-        int quote = fEntityScanner.scanChar();
-        if (quote != '\'' && quote != '"') {
-            reportFatalError("QuoteRequiredInPublicID", null);
-            return false;
-        }
-
-        fStringBuffer.clear();
-        // skip leading whitespace
-        boolean skipSpace = true;
-        boolean dataok = true;
-        while (true) {
-            int c = fEntityScanner.scanChar();
-            if (c == ' ' || c == '\n' || c == '\r') {
-                if (!skipSpace) {
-                    // take the first whitespace as a space and skip the others
-                    fStringBuffer.append(' ');
-                    skipSpace = true;
-                }
-            }
-            else if (c == quote) {
-                if (skipSpace) {
-                    // if we finished on a space let's trim it
-                    fStringBuffer.length--;
-                }
-                literal.setValues(fStringBuffer);
-                break;
-            }
-            else if (XMLChar.isPubid(c)) {
-                fStringBuffer.append((char)c);
-                skipSpace = false;
-            }
-            else if (c == -1) {
-                reportFatalError("PublicIDUnterminated", null);
-                return false;
-            }
-            else {
-                dataok = false;
-                reportFatalError("InvalidCharInPublicID",
-                                 new Object[]{Integer.toHexString(c)});
-            }
-        }
-        return dataok;
-   }
-
-
-    /**
-     * Normalize whitespace in an XMLString converting all whitespace
-     * characters to space characters.
-     */
-    protected void normalizeWhitespace(XMLString value) {
-        int end = value.offset + value.length;
-        for (int i = value.offset; i < end; i++) {
-            int c = value.ch[i];
-            if (XMLChar.isSpace(c)) {
-                value.ch[i] = ' ';
-            }
-        }
-    }
-
-    //
-    // XMLEntityHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The document entity
-     * has the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" 
-     * parameter entity names start with '%'; and general entities are just
-     * specified by their name.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-
-        // keep track of the entity depth
-        fEntityDepth++;
-
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * This method notifies the end of an entity. The document entity has
-     * the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" 
-     * parameter entity names start with '%'; and general entities are just
-     * specified by their name.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-
-        // keep track of the entity depth
-        fEntityDepth--;
-
-    } // endEntity(String)
-
-    /**
-     * Scans a character reference and append the corresponding chars to the
-     * specified buffer.
-     *
-     * <p>
-     * <pre>
-     * [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
-     * </pre>
-     *
-     * <strong>Note:</strong> This method uses fStringBuffer, anything in it
-     * at the time of calling is lost.
-     *
-     * @param buf the character buffer to append chars to
-     * @param buf2 the character buffer to append non-normalized chars to
-     *
-     * @return the character value or (-1) on conversion failure
-     */
-    protected int scanCharReferenceValue(XMLStringBuffer buf, XMLStringBuffer buf2) 
-        throws IOException, XNIException {
-
-        // scan hexadecimal value
-        boolean hex = false;
-        if (fEntityScanner.skipChar('x')) {
-            if (buf2 != null) { buf2.append('x'); }
-            hex = true;
-            fStringBuffer3.clear();
-            boolean digit = true;
-            do {
-                int c = fEntityScanner.peekChar();
-                digit = (c >= '0' && c <= '9') ||
-                        (c >= 'a' && c <= 'f') ||
-                        (c >= 'A' && c <= 'F');
-                if (digit) {
-                    if (buf2 != null) { buf2.append((char)c); }
-                    fEntityScanner.scanChar();
-                    fStringBuffer3.append((char)c);
-                }
-            } while (digit);
-        }
-
-        // scan decimal value
-        else {
-            fStringBuffer3.clear();
-            boolean digit = true;
-            do {
-                int c = fEntityScanner.peekChar();
-                digit = c >= '0' && c <= '9';
-                if (digit) {
-                    if (buf2 != null) { buf2.append((char)c); }
-                    fEntityScanner.scanChar();
-                    fStringBuffer3.append((char)c);
-                }
-            } while (digit);
-        }
-
-        // end
-        if (!fEntityScanner.skipChar(';')) {
-            reportFatalError("SemicolonRequiredInCharRef", null);
-        }
-        if (buf2 != null) { buf2.append(';'); }
-        
-        // convert string to number
-        int value = -1;
-        try {
-            value = Integer.parseInt(fStringBuffer3.toString(),
-                                     hex ? 16 : 10);
-        }
-        catch (NumberFormatException e) {
-            // let -1 value drop through
-        }
-
-        // character reference must be a valid XML character
-        if (!XMLChar.isValid(value)) {
-            reportFatalError("InvalidCharRef",
-                             new Object[]{Integer.toString(value, 16)}); 
-        }
-
-        // append corresponding chars to the given buffer
-        if (!XMLChar.isSupplemental(value)) {
-            buf.append((char) value);
-        }
-        else {
-            // character is supplemental, split it into surrogate chars
-            buf.append(XMLChar.highSurrogate(value));
-            buf.append(XMLChar.lowSurrogate(value));
-        }
-
-        // char refs notification code
-        if (fNotifyCharRefs && value != -1) {
-            String literal = "#" + (hex ? "x" : "") + fStringBuffer3.toString();
-            if (!fScanningAttribute) {
-                fCharRefLiteral = literal;
-            }
-        }
-                
-        return value;
-    }
-
-
-    /**
-     * Scans surrogates and append them to the specified buffer.
-     * <p>
-     * <strong>Note:</strong> This assumes the current char has already been
-     * identified as a high surrogate.
-     *
-     * @param buf The StringBuffer to append the read surrogates to.
-     * @returns True if it succeeded.
-     */
-    protected boolean scanSurrogates(XMLStringBuffer buf)
-        throws IOException, XNIException {
-
-        int high = fEntityScanner.scanChar();
-        int low = fEntityScanner.peekChar();
-        if (!XMLChar.isLowSurrogate(low)) {
-            reportFatalError("InvalidCharInContent",
-                             new Object[] {Integer.toString(high, 16)});
-            return false;
-        }
-        fEntityScanner.scanChar();
-
-        // convert surrogates to supplemental character
-        int c = XMLChar.supplemental((char)high, (char)low);
-
-        // supplemental character must be a valid XML character
-        if (!XMLChar.isValid(c)) {
-            reportFatalError("InvalidCharInContent",
-                             new Object[]{Integer.toString(c, 16)}); 
-            return false;
-        }
-
-        // fill in the buffer
-        buf.append((char)high);
-        buf.append((char)low);
-
-        return true;
-
-    } // scanSurrogates():boolean
-
-
-    /**
-     * Convenience function used in all XML scanners.
-     */
-    protected void reportFatalError(String msgId, Object[] args)
-        throws XNIException {
-        fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                   msgId, args,
-                                   XMLErrorReporter.SEVERITY_FATAL_ERROR);
-    }
-
-} // class XMLScanner
diff --git a/src/org/apache/xerces/impl/dtd/DTDGrammar.java b/src/org/apache/xerces/impl/dtd/DTDGrammar.java
deleted file mode 100644
index 84df0ae..0000000
--- a/src/org/apache/xerces/impl/dtd/DTDGrammar.java
+++ /dev/null
@@ -1,1161 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactory;
-import org.apache.xerces.impl.dtd.Grammar;
-import org.apache.xerces.impl.dtd.models.ContentModelValidator;
-import org.apache.xerces.impl.dtd.XMLElementDecl;
-import org.apache.xerces.impl.dtd.XMLAttributeDecl;
-import org.apache.xerces.impl.dtd.XMLNotationDecl;
-import org.apache.xerces.impl.dtd.XMLEntityDecl;
-import org.apache.xerces.impl.dtd.XMLSimpleType;
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidator;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactoryImpl;
-import org.apache.xerces.util.SymbolTable;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-
-import org.xml.sax.SAXException;
-
-/**
- * A DTD grammar. This class implements the XNI handler interfaces
- * for DTD information so that it can build the approprate validation
- * structures automatically from the callbacks.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Eric Ye, IBM
- * @author Jeffrey Rodriguez, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class DTDGrammar
-    extends Grammar
-    implements XMLDTDHandler, XMLDTDContentModelHandler {
-
-    //
-    // Constants
-    //
-
-    /** Chunk shift (8). */
-    private static final int CHUNK_SHIFT = 8; // 2^8 = 256
-
-    /** Chunk size (1 << CHUNK_SHIFT). */
-    private static final int CHUNK_SIZE = (1 << CHUNK_SHIFT);
-
-    /** Chunk mask (CHUNK_SIZE - 1). */
-    private static final int CHUNK_MASK = CHUNK_SIZE - 1;
-
-    /** Initial chunk count (1 << (10 - CHUNK_SHIFT)). */
-    private static final int INITIAL_CHUNK_COUNT = (1 << (10 - CHUNK_SHIFT)); // 2^10 = 1k
-
-    // debugging
-
-    /** Debug DTDGrammar. */
-    private static final boolean DEBUG = false;
-
-    //
-    // Data
-    //
-
-    /** Datatype validator factory. */
-    protected DatatypeValidatorFactory fDatatypeValidatorFactory;
-
-    /** Current element index. */
-    protected int fCurrentElementIndex;
-
-    /** Current attribute index. */
-    protected int fCurrentAttributeIndex;
-
-    /** fReadingExternalDTD */
-    protected boolean fReadingExternalDTD = false;
-
-    // temp variables
-
-    /** Mixed. */
-    private boolean fMixed;
-
-    /** Element declaration. */
-    private XMLElementDecl fElementDecl = new XMLElementDecl();
-
-    /** Attribute declaration. */
-    private XMLAttributeDecl fAttributeDecl = new XMLAttributeDecl();
-
-    /** A qualified name. */
-    private QName fQName = new QName();
-
-    /** Entity declaration. */
-    private XMLEntityDecl fEntityDecl = new XMLEntityDecl();
-
-    /** Simple type. */
-    private XMLSimpleType fSimpleType = new XMLSimpleType();
-
-    /** Content spec node. */
-    private XMLContentSpec fContentSpec = new XMLContentSpec();
-
-    /** table of XMLAttributeDecl */
-    Hashtable  fAttributeDeclTab   = new Hashtable();
-
-    /** table of XMLElementDecl   */
-    Hashtable   fElementDeclTab     = new Hashtable();
-
-    /** table of XMLNotationDecl  */
-    Hashtable  fNotationDeclTab    = new Hashtable();
-
-    /** table of XMLSimplType     */
-    Hashtable   fSimpleTypeTab     = new Hashtable();
-
-    /** table of XMLEntityDecl    */
-    Hashtable   fEntityDeclTab     = new Hashtable();
-
-    /** Children content model operation stack. */
-    private short[] fOpStack = null;
-    
-    /** Children content model index stack. */
-    private int[] fNodeIndexStack = null;
-    
-    /** Children content model previous node index stack. */
-    private int[] fPrevNodeIndexStack = null;
-
-    /** Stack depth   */
-    private int fDepth = 0;
-
-    /** Entity stack. */
-    private boolean[] fPEntityStack = new boolean[4];
-    private int fPEDepth = 0;
-
-    // additional fields(columns) for the element Decl pool in the Grammar
-
-    /** flag if the elementDecl is External. */
-    private int fElementDeclIsExternal[][] = new int[INITIAL_CHUNK_COUNT][];
-
-
-    // additional fields(columns) for the attribute Decl pool in the Grammar
-
-    /** flag if the AttributeDecl is External. */
-    private int fAttributeDeclIsExternal[][] = new int[INITIAL_CHUNK_COUNT][];
-
-    // for mixedElement method
-
-    int valueIndex            = -1;
-    int prevNodeIndex         = -1;
-    int nodeIndex             = -1;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public DTDGrammar(SymbolTable symbolTable) {
-        super(symbolTable);
-        setTargetNamespace("");
-    } // <init>(SymbolTable)
-
-    //
-    // Public methods
-    //
-
-    /** Sets the datatype validator factory. */
-    public void setDatatypeValidatorFactory(DatatypeValidatorFactory factory) {
-        fDatatypeValidatorFactory = factory;
-    }
-
-    /**
-     * Returns true if the specified element declaration is external.
-     *
-     * @param elementDeclIndex The element declaration index.
-     */
-    public boolean getElementDeclIsExternal(int elementDeclIndex) {
-
-        if (elementDeclIndex < 0) {
-            return false;
-        }
-
-        int chunk = elementDeclIndex >> CHUNK_SHIFT;
-        int index = elementDeclIndex & CHUNK_MASK;
-        return (fElementDeclIsExternal[chunk][index] != 0);
-
-    } // getElementDeclIsExternal(int):boolean
-
-    /**
-     * Returns true if the specified attribute declaration is external.
-     *
-     * @param attributeDeclIndex Attribute declaration index.
-     */
-    public boolean getAttributeDeclIsExternal(int attributeDeclIndex) {
-
-        if (attributeDeclIndex < 0) {
-            return false;
-        }
-
-        int chunk = attributeDeclIndex >> CHUNK_SHIFT;
-        int index = attributeDeclIndex & CHUNK_MASK;
-        return (fAttributeDeclIsExternal[chunk][index] != 0);
-    }
-
-    public int getAttributeDeclIndex(int elementDeclIndex, String attributeDeclName) {
-        if (elementDeclIndex == -1) {
-            return -1;
-        }
-        int attDefIndex = getFirstAttributeDeclIndex(elementDeclIndex);
-        while (attDefIndex != -1) {
-            getAttributeDecl(attDefIndex, fAttributeDecl);
-
-            if (fAttributeDecl.name.rawname == attributeDeclName 
-                || attributeDeclName.equals(fAttributeDecl.name.rawname) ) {
-                return attDefIndex;
-            }
-            attDefIndex = getNextAttributeDeclIndex(attDefIndex);
-        }
-        return -1;
-    } // getAttributeDeclIndex (int,QName)
-
-    //
-    // XMLDTDHandler methods
-    //
-
-    /**
-     * The start of the DTD.
-     *
-     * @param locator  The document locator, or null if the document
-     *                 location cannot be reported during the parsing of 
-     *                 the document DTD. However, it is <em>strongly</em>
-     *                 recommended that a locator be supplied that can 
-     *                 at least report the base system identifier of the
-     *                 DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDTD(XMLLocator locator) throws XNIException {
-        //Initialize stack
-        fOpStack = null;
-        fNodeIndexStack = null;
-        fPrevNodeIndexStack = null;
-    } // startDTD(XMLLocator)
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the 
-     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * <strong>Note:</strong> Since the DTD is an entity, the handler
-     * will be notified of the start of the DTD entity by calling the
-     * startEntity method with the entity name "[dtd]" <em>before</em> calling
-     * the startDTD method.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId, 
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-
-        if (name.startsWith("%")) {
-            // keep track of this entity before fEntityDepth is increased
-            if (fPEDepth == fPEntityStack.length) {
-                boolean[] entityarray = new boolean[fPEntityStack.length * 2];
-                System.arraycopy(fPEntityStack, 0, entityarray, 0, fPEntityStack.length);
-                fPEntityStack = entityarray;
-            }
-            fPEntityStack[fPEDepth] = fReadingExternalDTD;
-            fPEDepth++;
-        }
-
-        if ( name.equals("[dtd]") || 
-            (name.startsWith("%") && systemId != null )) {
-            fReadingExternalDTD = true;
-        }
-
-    } // startEntity(String,String,String,String)
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * <strong>Note:</strong> Since the DTD is an entity, the handler
-     * will be notified of the end of the DTD entity by calling the
-     * endEntity method with the entity name "[dtd]" <em>after</em> calling
-     * the endDTD method.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-
-        if (name.equals("[dtd]")) {
-            fReadingExternalDTD = false;
-        }
-        if (name.startsWith("%")) {
-            fPEDepth--;
-            fReadingExternalDTD = fPEntityStack[fPEDepth];
-        }
-
-    } // endEntity(String)
-
-    /**
-     * An element declaration.
-     * 
-     * @param name         The name of the element.
-     * @param contentModel The element content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void elementDecl(String name, String contentModel)
-        throws XNIException {
-
-        XMLElementDecl tmpElementDecl = (XMLElementDecl) fElementDeclTab.get(name) ;
-
-        // check if it is already defined
-        if ( tmpElementDecl != null ) {
-            if (tmpElementDecl.type == -1) {
-                fCurrentElementIndex = getElementDeclIndex(name, -1);
-            }
-            else {
-                // duplicate element, ignored.
-                return;
-            }
-        }
-        else {
-            fCurrentElementIndex = createElementDecl();//create element decl
-        }
-
-        XMLElementDecl elementDecl       = new XMLElementDecl();
-        QName          elementName       = new QName(null, name, name, null);
-        //XMLSimpleType  elementSimpleType = new XMLSimpleType();
-
-        elementDecl.name.setValues(elementName);
-
-        elementDecl.contentModelValidator = null;
-        elementDecl.scope= -1;
-        if (contentModel.equals("EMPTY")) {
-            elementDecl.type = XMLElementDecl.TYPE_EMPTY;
-        }
-        else if (contentModel.equals("ANY")) {
-            elementDecl.type = XMLElementDecl.TYPE_ANY;
-        }
-        else if (contentModel.startsWith("(") ) {
-            if (contentModel.indexOf("#PCDATA") > 0 ) {
-                elementDecl.type = XMLElementDecl.TYPE_MIXED;
-            }
-            else {
-                elementDecl.type = XMLElementDecl.TYPE_CHILDREN;
-            }
-        }
-
-
-        //add(or set) this elementDecl to the local cache
-        this.fElementDeclTab.put(name, elementDecl );
-
-        fElementDecl         = elementDecl; 
-
-        if ((fDepth == 0 || 
-            (fDepth == 1 && elementDecl.type == XMLElementDecl.TYPE_MIXED)) &&
-            fNodeIndexStack != null) {
-            if (elementDecl.type == XMLElementDecl.TYPE_MIXED) {
-                int pcdata = addUniqueLeafNode(null);
-                if (fNodeIndexStack[0] == -1) {
-                    fNodeIndexStack[0] = pcdata;
-                }
-                else {
-                    fNodeIndexStack[0] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_CHOICE, 
-                                                            pcdata, fNodeIndexStack[0]);
-                }
-            }
-            setContentSpecIndex(fCurrentElementIndex, fNodeIndexStack[fDepth]);
-        }
-
-        if ( DEBUG ) {
-            System.out.println(  "name = " + fElementDecl.name.localpart );
-            System.out.println(  "Type = " + fElementDecl.type );
-        }
-
-        setElementDecl(fCurrentElementIndex, fElementDecl );//set internal structure
-
-        int chunk = fCurrentElementIndex >> CHUNK_SHIFT;
-        int index = fCurrentElementIndex & CHUNK_MASK;
-        ensureElementDeclCapacity(chunk);
-        fElementDeclIsExternal[chunk][index] = fReadingExternalDTD? 1 : 0;
-
-    } // elementDecl(String,String)
-
-    /**
-     * An attribute declaration.
-     * 
-     * @param elementName   The name of the element that this attribute
-     *                      is associated with.
-     * @param attributeName The name of the attribute.
-     * @param type          The attribute type. This value will be one of
-     *                      the following: "CDATA", "ENTITY", "ENTITIES",
-     *                      "ENUMERATION", "ID", "IDREF", "IDREFS", 
-     *                      "NMTOKEN", "NMTOKENS", or "NOTATION".
-     * @param enumeration   If the type has the value "ENUMERATION", this
-     *                      array holds the allowed attribute values;
-     *                      otherwise, this array is null.
-     * @param defaultType   The attribute default type. This value will be
-     *                      one of the following: "#FIXED", "#IMPLIED",
-     *                      "#REQUIRED", or null.
-     * @param defaultValue  The attribute default value, or null if no
-     *                      default value is specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void attributeDecl(String elementName, String attributeName, 
-                              String type, String[] enumeration, 
-                              String defaultType, XMLString defaultValue) 
-        throws XNIException {
-
-        if ( this.fElementDeclTab.containsKey( (String) elementName) ) {
-            //if ElementDecl has already being created in the Grammar then remove from table, 
-            //this.fElementDeclTab.remove( (String) elementName );
-        }
-        // then it is forward reference to a element decl, create the elementDecl first.
-        else {
-            fCurrentElementIndex = createElementDecl();//create element decl
-
-            XMLElementDecl elementDecl       = new XMLElementDecl();
-            elementDecl.name.setValues(null, elementName, elementName, null);
-          
-            elementDecl.scope= -1;
-          
-            //add(or set) this elementDecl to the local cache
-            this.fElementDeclTab.put(elementName, elementDecl );
-
-            //set internal structure
-            setElementDecl(fCurrentElementIndex, elementDecl );
-        }
-
-        //Get Grammar index to grammar array
-        int elementIndex       = getElementDeclIndex( elementName, -1 );
-        if (getAttributeDeclIndex(elementIndex, attributeName) != -1) {
-            // REVISIT: BUG - need warn-on-duplicate-attdef feature support
-            return;
-        }
-
-        fCurrentAttributeIndex = createAttributeDecl();// Create current Attribute Decl
-
-        fSimpleType.clear();
-        if ( defaultType != null ) {
-            if ( defaultType.equals( "#FIXED") ) {
-                fSimpleType.defaultType = fSimpleType.DEFAULT_TYPE_FIXED;
-            } else if ( defaultType.equals( "#IMPLIED") ) {
-                fSimpleType.defaultType = fSimpleType.DEFAULT_TYPE_IMPLIED;
-            } else if ( defaultType.equals( "#REQUIRED") ) {
-                fSimpleType.defaultType = fSimpleType.DEFAULT_TYPE_REQUIRED;
-            }
-        }
-        if ( DEBUG ) {
-            System.out.println("defaultvalue = " + defaultValue.toString() );
-        }
-        fSimpleType.defaultValue      = defaultValue!=null ?  defaultValue.toString() : null;
-        fSimpleType.enumeration       = enumeration;
-
-        Hashtable facets = new Hashtable();
-        if (type.equals("CDATA")) {
-            fSimpleType.type = XMLSimpleType.TYPE_CDATA;
-        }
-        else if ( type.equals("ID") ) {
-            fSimpleType.type = XMLSimpleType.TYPE_ID;
-        }
-        else if ( type.startsWith("IDREF") ) {
-            fSimpleType.type = XMLSimpleType.TYPE_IDREF;
-            if (type.indexOf("S") > 0) {
-                fSimpleType.list = true;
-            }
-        }
-        else if (type.equals("ENTITIES")) {
-            fSimpleType.type = XMLSimpleType.TYPE_ENTITY;
-            fSimpleType.list = true;
-        }
-        else if (type.equals("ENTITY")) {
-            fSimpleType.type = XMLSimpleType.TYPE_ENTITY;
-        }
-        else if (type.equals("NMTOKENS")) {
-            fSimpleType.type = XMLSimpleType.TYPE_NMTOKEN;
-            fSimpleType.list = true;
-        }
-        else if (type.equals("NMTOKEN")) {
-            fSimpleType.type = XMLSimpleType.TYPE_NMTOKEN;
-        }
-        else if (type.startsWith("NOTATION") ) {
-            fSimpleType.type = XMLSimpleType.TYPE_NOTATION;
-            /***
-            facets.put(SchemaSymbols.ELT_ENUMERATION, fSimpleType.enumeration);
-            /***/
-            // REVISIT: Is this a bug? -Ac
-            facets.put("enumeration", fSimpleType.enumeration);
-            /***/
-        }
-        else if (type.startsWith("ENUMERATION") ) {
-            fSimpleType.type = XMLSimpleType.TYPE_ENUMERATION;
-            /***
-            facets.put(SchemaSymbols.ELT_ENUMERATION, fSimpleType.enumeration);
-            /***/
-            facets.put("enumeration", fSimpleType.enumeration);
-            /***/
-        }
-        else {
-            // REVISIT: Report error message. -Ac
-            System.err.println("!!! unknown attribute type "+type);
-        }
-        // REVISIT: The datatype should be stored with the attribute value
-        //          and not special-cased in the XMLValidator. -Ac
-        //fSimpleType.datatypeValidator = fDatatypeValidatorFactory.createDatatypeValidator(type, null, facets, fSimpleType.list);
-
-        fQName.setValues(null, attributeName, attributeName, null);
-        fAttributeDecl.setValues( fQName, fSimpleType, false );
-
-        setAttributeDecl(elementIndex, fCurrentAttributeIndex, fAttributeDecl);
-
-        int chunk = fCurrentAttributeIndex >> CHUNK_SHIFT;
-        int index = fCurrentAttributeIndex & CHUNK_MASK;
-        ensureAttributeDeclCapacity(chunk);
-        fAttributeDeclIsExternal[chunk][index] = fReadingExternalDTD ?  1 : 0;
-
-    } // attributeDecl(String,String,String,String[],String,XMLString)
-
-    /**
-     * An internal entity declaration.
-     * 
-     * @param name The name of the entity. Parameter entity names start with
-     *             '%', whereas the name of a general entity is just the 
-     *             entity name.
-     * @param text The value of the entity.
-     * @param nonNormalizedText The non-normalized value of the entity. This
-     *             value contains the same sequence of characters that was in 
-     *             the internal entity declaration, without any entity
-     *             references expanded.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void internalEntityDecl(String name, XMLString text,
-                                   XMLString nonNormalizedText)
-        throws XNIException {
-
-        XMLEntityDecl  entityDecl = new XMLEntityDecl();
-        boolean isPE = name.startsWith("%");
-        boolean inExternal = fReadingExternalDTD;
-
-        entityDecl.setValues(name,null,null, null, null, 
-                             text.toString(), isPE, inExternal);
-        int entityIndex = getEntityDeclIndex(name);
-        if (entityIndex == -1) {
-            entityIndex = createEntityDecl();
-            setEntityDecl(entityIndex, entityDecl);
-        }
-
-    } // internalEntityDecl(String,XMLString,XMLString)
-
-    /**
-     * An external entity declaration.
-     * 
-     * @param name     The name of the entity. Parameter entity names start
-     *                 with '%', whereas the name of a general entity is just
-     *                 the entity name.
-     * @param publicId The public identifier of the entity or null if the
-     *                 the entity was specified with SYSTEM.
-     * @param systemId The system identifier of the entity.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void externalEntityDecl(String name, 
-                                   String publicId, String systemId,
-                                   String baseSystemId) throws XNIException {
-
-        XMLEntityDecl  entityDecl = new XMLEntityDecl();
-        boolean isPE = name.startsWith("%");
-        boolean inExternal = fReadingExternalDTD;
-       
-        entityDecl.setValues(name, publicId, systemId, baseSystemId, 
-                             null, null, isPE, inExternal);
-
-        int entityIndex = getEntityDeclIndex(name);
-        if (entityIndex == -1) {
-            entityIndex = createEntityDecl();
-            setEntityDecl(entityIndex, entityDecl);
-        }
-
-    } // externalEntityDecl(String,String,String)
-
-    /**
-     * An unparsed entity declaration.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the entity, or null if not
-     *                 specified.
-     * @param notation The name of the notation.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void unparsedEntityDecl(String name, String publicId, 
-                                   String systemId, String notation)
-        throws XNIException {
-
-        XMLEntityDecl  entityDecl = new XMLEntityDecl();
-        boolean isPE = name.startsWith("%");
-        boolean inExternal = fReadingExternalDTD;
-
-        entityDecl.setValues(name,publicId,systemId, null, notation, 
-                             null, isPE, inExternal);
-        int entityIndex = getEntityDeclIndex(name);
-        if (entityIndex == -1) {
-            entityIndex = createEntityDecl();
-            setEntityDecl(entityIndex, entityDecl);
-        }
-
-    } // unparsedEntityDecl(String,String,String,String)
-
-    /**
-     * A notation declaration
-     * 
-     * @param name     The name of the notation.
-     * @param publicId The public identifier of the notation, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the notation, or null if not
-     *                 specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws XNIException {
-
-        XMLNotationDecl  notationDecl = new XMLNotationDecl();
-        notationDecl.setValues(name,publicId,systemId);
-        int notationIndex = getNotationDeclIndex(name);
-        if (notationIndex == -1) {
-            notationIndex = createNotationDecl();
-            setNotationDecl(notationIndex, notationDecl);
-        }
-
-    } // notationDecl(String,String,String)
-
-    /**
-     * The end of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDTD() throws XNIException {
-
-        // REVISIT: What is this for? -Ac
-        /*
-        XMLElementDecl  elementDecl;
-        Enumeration     elements       = fElementDeclTab.elements();
-        int             elementDeclIdx = 0;
-        while( elements.hasMoreElements() == true ) {
-            elementDecl    = (XMLElementDecl) elements.nextElement();
-            elementDeclIdx = getElementDeclIndex( elementDecl.name );
-            System.out.println( "elementDeclIdx = " + elementDeclIndex );
-            if( elementDeclIndex != -1 ) {   
-                elementDecl.contentModelValidator = this.getElementContentModelValidator(elementDeclIdx );
-            }
-            fCurrentElementIndex = createElementDecl();//create element decl
-            if ( DEBUG == true ) {
-                System.out.println(  "name = " + fElementDecl.name.localpart );
-                System.out.println(  "Type = " + fElementDecl.type );
-            }
-            setElementDecl(fCurrentElementIndex, fElementDecl );//set internal structure
-        }
-        */
-
-    } // endDTD()
-
-    // no-op methods
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method is only called for external
-     * parameter entities referenced in the DTD.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding) throws XNIException {}
-
-    /**
-     * A comment.
-     * 
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text) throws XNIException {}
-    
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data) throws XNIException {}
-
-    /**
-     * The start of an attribute list.
-     * 
-     * @param elementName The name of the element that this attribute
-     *                    list is associated with.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startAttlist(String elementName) throws XNIException {}
-
-    /**
-     * The end of an attribute list.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endAttlist() throws XNIException {}
-
-    /**
-     * The start of a conditional section.
-     * 
-     * @param type The type of the conditional section. This value will
-     *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see XMLDTDHandler#CONDITIONAL_INCLUDE
-     * @see XMLDTDHandler#CONDITIONAL_IGNORE
-     */
-    public void startConditional(short type) throws XNIException {}
-
-    /**
-     * Characters within an IGNORE conditional section.
-     *
-     * @param text The ignored text.
-     */
-    public void characters(XMLString text) throws XNIException {}
-
-    /**
-     * The end of a conditional section.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endConditional() throws XNIException {}
-
-    //
-    // XMLDTDContentModelHandler methods
-    //
-
-    /**
-     * The start of a content model. Depending on the type of the content
-     * model, specific methods may be called between the call to the
-     * startContentModel method and the call to the endContentModel method.
-     * 
-     * @param elementName The name of the element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startContentModel(String elementName)
-        throws XNIException {
-      
-        XMLElementDecl elementDecl = (XMLElementDecl) this.fElementDeclTab.get( elementName);
-        if ( elementDecl != null ) {
-            fElementDecl = elementDecl;
-        }
-        fDepth = 0;
-        initializeContentModelStack();
-
-    } // startContentModel(String)
-
-    /**
-     * A start of either a mixed or children content model. A mixed
-     * content model will immediately be followed by a call to the
-     * <code>pcdata()</code> method. A children content model will
-     * contain additional groups and/or elements.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #any
-     * @see #empty
-     */
-    public void startGroup() throws XNIException {
-        fDepth++;
-        initializeContentModelStack();
-        fMixed = false;
-    } // startGroup()
-
-    /**
-     * The appearance of "#PCDATA" within a group signifying a
-     * mixed content model. This method will be the first called
-     * following the content model's <code>startGroup()</code>.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #startGroup
-     */
-    public void pcdata() throws XNIException {
-        fMixed = true;
-    } // pcdata()
-
-    /**
-     * A referenced element in a mixed or children content model.
-     * 
-     * @param elementName The name of the referenced element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void element(String elementName) throws XNIException {
-        if (fMixed) {
-            if (fNodeIndexStack[fDepth] == -1 ) {
-                fNodeIndexStack[fDepth] = addUniqueLeafNode(elementName);
-            }
-            else {
-                fNodeIndexStack[fDepth] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_CHOICE, 
-                                                             fNodeIndexStack[fDepth], 
-                                                             addUniqueLeafNode(elementName));
-            }
-        }
-        else {
-            fNodeIndexStack[fDepth] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_LEAF, elementName);
-        }
-    } // element(String)
-
-    /**
-     * The separator between choices or sequences of a mixed or children
-     * content model.
-     * 
-     * @param separator The type of children separator.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see org.apache.xerces.xni.XMLDTDContentModelHandler#SEPARATOR_CHOICE
-     * @see org.apache.xerces.xni.XMLDTDContentModelHandler#SEPARATOR_SEQUENCE
-     */
-    public void separator(short separator) throws XNIException {
-
-        if (!fMixed) {
-            if (fOpStack[fDepth] != XMLContentSpec.CONTENTSPECNODE_SEQ && separator == XMLDTDContentModelHandler.SEPARATOR_CHOICE ) {
-                if (fPrevNodeIndexStack[fDepth] != -1) {
-                    fNodeIndexStack[fDepth] = addContentSpecNode(fOpStack[fDepth], fPrevNodeIndexStack[fDepth], fNodeIndexStack[fDepth]);
-                }
-                fPrevNodeIndexStack[fDepth] = fNodeIndexStack[fDepth];
-                fOpStack[fDepth] = XMLContentSpec.CONTENTSPECNODE_CHOICE;
-            } else if (fOpStack[fDepth] != XMLContentSpec.CONTENTSPECNODE_CHOICE && separator == XMLDTDContentModelHandler.SEPARATOR_SEQUENCE) {
-                if (fPrevNodeIndexStack[fDepth] != -1) {
-                    fNodeIndexStack[fDepth] = addContentSpecNode(fOpStack[fDepth], fPrevNodeIndexStack[fDepth], fNodeIndexStack[fDepth]);
-                }
-                fPrevNodeIndexStack[fDepth] = fNodeIndexStack[fDepth];
-                fOpStack[fDepth] = XMLContentSpec.CONTENTSPECNODE_SEQ;
-            }
-        }
-
-    } // separator(short)
-
-    /**
-     * The occurrence count for a child in a children content model or
-     * for the mixed content model group.
-     * 
-     * @param occurrence The occurrence count for the last element
-     *                   or group.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ZERO_OR_ONE
-     * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ZERO_OR_MORE
-     * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ONE_OR_MORE
-     */
-    public void occurrence(short occurrence) throws XNIException {
-
-        if (!fMixed) {
-            if (occurrence == XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE ) {
-                fNodeIndexStack[fDepth] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE, fNodeIndexStack[fDepth], -1);
-            } else if ( occurrence == XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE ) {
-                fNodeIndexStack[fDepth] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE, fNodeIndexStack[fDepth], -1 );
-            } else if ( occurrence == XMLDTDContentModelHandler.OCCURS_ONE_OR_MORE) {
-                fNodeIndexStack[fDepth] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE, fNodeIndexStack[fDepth], -1 );
-            }
-        }
-
-    } // occurrence(short)
-
-    /**
-     * The end of a group for mixed or children content models.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endGroup() throws XNIException {
-
-        if (!fMixed) {
-            if (fPrevNodeIndexStack[fDepth] != -1) {
-                fNodeIndexStack[fDepth] = addContentSpecNode(fOpStack[fDepth], fPrevNodeIndexStack[fDepth], fNodeIndexStack[fDepth]);
-            }
-            int nodeIndex = fNodeIndexStack[fDepth--];
-            fNodeIndexStack[fDepth] = nodeIndex;
-        }
-
-    } // endGroup()
-
-    // no-op methods
-
-    /** 
-     * A content model of ANY. 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #empty
-     * @see #startGroup
-     */
-    public void any() throws XNIException {}
-
-    /**
-     * A content model of EMPTY.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #any
-     * @see #startGroup
-     */
-    public void empty() throws XNIException {}
-
-    /**
-     * The end of a content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endContentModel() throws XNIException {}
-
-    //
-    // Grammar methods
-    //
-
-    /** Returns true if this grammar is namespace aware. */
-    public boolean isNamespaceAware() {
-        return false;
-    } // isNamespaceAware():boolean
-
-    /** Returns the element decl index. */
-    public int getElementDeclIndex(QName elementDeclQName, int scope) {
-        return getElementDeclIndex(elementDeclQName.rawname, scope);
-    } // getElementDeclIndex(QName,int):int
-   
-    //
-    // Protected methods
-    //
-
-    /**
-     * Create an XMLContentSpec for a single non-leaf
-     * 
-     * @param nodeType the type of XMLContentSpec to create - from XMLContentSpec.CONTENTSPECNODE_*
-     * @param nodeValue handle to an XMLContentSpec
-     * @return handle to the newly create XMLContentSpec
-     */
-    protected int addContentSpecNode(short nodeType, String nodeValue) {
-
-        // create content spec node
-        int contentSpecIndex = createContentSpec();
-
-        // set content spec node values
-        fContentSpec.setValues(nodeType, nodeValue, null);
-        setContentSpec(contentSpecIndex, fContentSpec);
-
-        // return index 
-        return contentSpecIndex;
-
-    } // addContentSpecNode(short,String):int
-
-    /**
-     * create an XMLContentSpec for a leaf
-     *
-     * @param   elementName  the name (Element) for the node
-     * @return handle to the newly create XMLContentSpec
-     */
-    protected int addUniqueLeafNode(String elementName) {
-
-        // create content spec node
-        int contentSpecIndex = createContentSpec();
-
-        // set content spec node values
-        fContentSpec.setValues( XMLContentSpec.CONTENTSPECNODE_LEAF, 
-                                elementName, null);
-        setContentSpec(contentSpecIndex, fContentSpec);
-
-        // return index 
-        return contentSpecIndex;
-
-    } // addUniqueLeafNode(String):int
-
-    /**
-     * Create an XMLContentSpec for a two child leaf
-     *
-     * @param nodeType the type of XMLContentSpec to create - from XMLContentSpec.CONTENTSPECNODE_*
-     * @param leftNodeIndex handle to an XMLContentSpec
-     * @param rightNodeIndex handle to an XMLContentSpec
-     * @return handle to the newly create XMLContentSpec
-     */
-    protected int addContentSpecNode(short nodeType, 
-                                     int leftNodeIndex, int rightNodeIndex) {
-
-        // create content spec node
-        int contentSpecIndex = createContentSpec();
-
-        // set content spec node values
-        int[] leftIntArray  = new int[1]; 
-        int[] rightIntArray = new int[1];
-
-        leftIntArray[0]      = leftNodeIndex;
-        rightIntArray[0]    = rightNodeIndex;
-        fContentSpec.setValues(nodeType, leftIntArray, rightIntArray);
-        setContentSpec(contentSpecIndex, fContentSpec);
-
-        // return index 
-        return contentSpecIndex;
-
-    } // addContentSpecNode(short,int,int):int
-
-    /** Initialize content model stack. */
-    protected void initializeContentModelStack() {
-
-        if (fOpStack == null) {
-            fOpStack = new short[8];
-            fNodeIndexStack = new int[8];
-            fPrevNodeIndexStack = new int[8];
-        } else if (fDepth == fOpStack.length) {
-            short[] newStack = new short[fDepth * 2];
-            System.arraycopy(fOpStack, 0, newStack, 0, fDepth);
-            fOpStack = newStack;
-            int[]   newIntStack = new int[fDepth * 2];
-            System.arraycopy(fNodeIndexStack, 0, newIntStack, 0, fDepth);
-            fNodeIndexStack = newIntStack;
-            newIntStack = new int[fDepth * 2];
-            System.arraycopy(fPrevNodeIndexStack, 0, newIntStack, 0, fDepth);
-            fPrevNodeIndexStack = newIntStack;
-        }
-        fOpStack[fDepth] = -1;
-        fNodeIndexStack[fDepth] = -1;
-        fPrevNodeIndexStack[fDepth] = -1;
-
-    } // initializeContentModelStack()
-
-    
-    /** Ensures storage for element declaration mappings. */
-    protected boolean ensureElementDeclCapacity(int chunk) {
-        try {
-            return fElementDeclIsExternal[chunk][0] == 0;
-        } catch (ArrayIndexOutOfBoundsException ex) {
-            fElementDeclIsExternal = resize(fElementDeclIsExternal, 
-                                     fElementDeclIsExternal.length * 2);
-        } catch (NullPointerException ex) {
-            // ignore
-        }
-        fElementDeclIsExternal[chunk] = new int[CHUNK_SIZE];
-        return true;
-    }
-
-    /** Ensures storage for attribute declaration mappings. */
-    protected boolean ensureAttributeDeclCapacity(int chunk) {
-        try {
-            return fAttributeDeclIsExternal[chunk][0] == 0;
-        } catch (ArrayIndexOutOfBoundsException ex) {
-            fAttributeDeclIsExternal = resize(fAttributeDeclIsExternal, 
-                                       fAttributeDeclIsExternal.length * 2);
-        } catch (NullPointerException ex) {
-            // ignore
-        }
-        fAttributeDeclIsExternal[chunk] = new int[CHUNK_SIZE];
-        return true;
-    }
-
-    /** Resizes chunked integer arrays. */
-    protected int[][] resize(int array[][], int newsize) {
-        int newarray[][] = new int[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-} // class DTDGrammar
diff --git a/src/org/apache/xerces/impl/dtd/Grammar.java b/src/org/apache/xerces/impl/dtd/Grammar.java
deleted file mode 100644
index 4037778..0000000
--- a/src/org/apache/xerces/impl/dtd/Grammar.java
+++ /dev/null
@@ -1,1847 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-import java.lang.Integer;
-import java.util.Hashtable;
-
-import org.apache.xerces.impl.dtd.XMLAttributeDecl;
-import org.apache.xerces.impl.dtd.XMLNotationDecl;
-import org.apache.xerces.impl.dtd.XMLEntityDecl;
-import org.apache.xerces.impl.dtd.XMLSimpleType;
-import org.apache.xerces.impl.dtd.models.CMNode;
-import org.apache.xerces.impl.dtd.models.CMAny;
-import org.apache.xerces.impl.dtd.models.CMLeaf;
-import org.apache.xerces.impl.dtd.models.CMUniOp;
-import org.apache.xerces.impl.dtd.models.CMBinOp;
-import org.apache.xerces.impl.dtd.models.DFAContentModel;
-import org.apache.xerces.impl.dtd.models.MixedContentModel;
-import org.apache.xerces.impl.dtd.models.SimpleContentModel;
-import org.apache.xerces.impl.validation.EntityState;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidator;
-import org.apache.xerces.impl.dtd.models.ContentModelValidator;
-import org.apache.xerces.util.SymbolTable;
-
-import org.apache.xerces.xni.QName;
-
-/**
- * A generic grammar for use in validating XML documents. The Grammar
- * object stores the validation information in a compiled form. Specific
- * subclasses extend this class and "populate" the grammar by compiling 
- * the specific syntax (DTD, Schema, etc) into the data structures used
- * by this object.
- * <p>
- * <strong>Note:</strong> The Grammar object is not useful as a generic 
- * grammar access or query object. In other words, you cannot round-trip 
- * specific grammar syntaxes with the compiled grammar information in 
- * the Grammar object. You <em>can</em> create equivalent validation
- * rules in your choice of grammar syntax but there is no guarantee that
- * the input and output will be the same.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Jeffrey Rodriguez, IBM
- * @author Eric Ye, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public abstract class Grammar extends org.apache.xerces.impl.validation.Grammar implements EntityState {
-
-    //
-    // Constants
-    //
-
-    /** Top level scope (-1). */
-    public static final int TOP_LEVEL_SCOPE = -1;
-
-    // private
-
-    /** Chunk shift (8). */
-    private static final int CHUNK_SHIFT = 8; // 2^8 = 256
-
-    /** Chunk size (1 << CHUNK_SHIFT). */
-    private static final int CHUNK_SIZE = 1 << CHUNK_SHIFT;
-
-    /** Chunk mask (CHUNK_SIZE - 1). */
-    private static final int CHUNK_MASK = CHUNK_SIZE - 1;
-
-    /** Initial chunk count (). */
-    private static final int INITIAL_CHUNK_COUNT = (1 << (10 - CHUNK_SHIFT)); // 2^10 = 1k
-
-    /** List flag (0x80). */
-    private static final short LIST_FLAG = 0x80;
-
-    /** List mask (~LIST_FLAG). */
-    private static final short LIST_MASK = ~LIST_FLAG;
-
-    //
-    // Data
-    //
-
-    /** Symbol table. */
-    private SymbolTable fSymbolTable;
-
-    /** Target namespace of grammar. */
-    private String fTargetNamespace;
-
-    // element declarations
-
-    /** Number of element declarations. */
-    private int fElementDeclCount = 0;
-
-    /** Element declaration name. */
-    private QName fElementDeclName[][] = new QName[INITIAL_CHUNK_COUNT][];
-
-    /** 
-     * Element declaration type. 
-     * @see XMLElementDecl
-     */
-    private short fElementDeclType[][] = new short[INITIAL_CHUNK_COUNT][];
-
-    /** 
-     * Element declaration default value. This value is used when
-     * the element is of simple type.
-     */
-    private String fElementDeclDefaultValue[][] = new String[INITIAL_CHUNK_COUNT][];
-
-    /** 
-     * Element declaration default type. This value is used when
-     * the element is of simple type.
-     */
-    private short   fElementDeclDefaultType[][] = new short[INITIAL_CHUNK_COUNT][];
-
-    /** 
-     * Element declaration datatype validator. This value is used when
-     * the element is of simple type. 
-     */
-    private DatatypeValidator fElementDeclDatatypeValidator[][] = new DatatypeValidator[INITIAL_CHUNK_COUNT][];
-
-    /** 
-     * Element declaration content spec index. This index value is used
-     * to refer to the content spec information tables.
-     */
-    private int fElementDeclContentSpecIndex[][] = new int[INITIAL_CHUNK_COUNT][];
-
-    /** 
-     * Element declaration content model validator. This validator is
-     * constructed from the content spec nodes.
-     */
-    private ContentModelValidator fElementDeclContentModelValidator[][] = new ContentModelValidator[INITIAL_CHUNK_COUNT][];
-
-    /** First attribute declaration of an element declaration. */
-    private int fElementDeclFirstAttributeDeclIndex[][] = new int[INITIAL_CHUNK_COUNT][];
-
-    /** Last attribute declaration of an element declaration. */
-    private int fElementDeclLastAttributeDeclIndex[][] = new int[INITIAL_CHUNK_COUNT][];
-
-    // attribute declarations
-
-    /** Number of attribute declarations. */
-    private int fAttributeDeclCount = 0 ;
-
-    /** Attribute declaration name. */
-    private QName fAttributeDeclName[][] = new QName[INITIAL_CHUNK_COUNT][];
-
-    /** 
-     * Attribute declaration type.
-     * @see XMLAttributeDecl
-     */
-    private short fAttributeDeclType[][] = new short[INITIAL_CHUNK_COUNT][];
-
-    /** Attribute declaratoin enumeration values. */
-    private String[] fAttributeDeclEnumeration[][] = new String[INITIAL_CHUNK_COUNT][][];
-    private short fAttributeDeclDefaultType[][] = new short[INITIAL_CHUNK_COUNT][];
-    private DatatypeValidator fAttributeDeclDatatypeValidator[][] = new DatatypeValidator[INITIAL_CHUNK_COUNT][];
-    private String fAttributeDeclDefaultValue[][] = new String[INITIAL_CHUNK_COUNT][];
-    private int fAttributeDeclNextAttributeDeclIndex[][] = new int[INITIAL_CHUNK_COUNT][];
-
-    // content specs
-
-    // here saves the content spec binary trees for element decls, 
-    // each element with a content model will hold a pointer which is 
-    // the index of the head node of the content spec tree. 
-
-    private int fContentSpecCount = 0;
-    private short fContentSpecType[][] = new short[INITIAL_CHUNK_COUNT][];
-    private Object fContentSpecValue[][] = new Object[INITIAL_CHUNK_COUNT][];
-    private Object fContentSpecOtherValue[][] = new Object[INITIAL_CHUNK_COUNT][];
-
-    // entities
-
-    private int fEntityCount = 0;
-    private String fEntityName[][] = new String[INITIAL_CHUNK_COUNT][];
-    private String[][] fEntityValue = new String[INITIAL_CHUNK_COUNT][];
-    private String[][] fEntityPublicId = new String[INITIAL_CHUNK_COUNT][];
-    private String[][] fEntitySystemId = new String[INITIAL_CHUNK_COUNT][];
-    private String[][] fEntityBaseSystemId = new String[INITIAL_CHUNK_COUNT][];
-    private String[][] fEntityNotation = new String[INITIAL_CHUNK_COUNT][];
-    private byte[][] fEntityIsPE = new byte[INITIAL_CHUNK_COUNT][];
-    private byte[][] fEntityInExternal = new byte[INITIAL_CHUNK_COUNT][];
-
-    // notations
-
-    private int fNotationCount = 0;
-    private String fNotationName[][] = new String[INITIAL_CHUNK_COUNT][];
-    private String[][] fNotationPublicId = new String[INITIAL_CHUNK_COUNT][];
-    private String[][] fNotationSystemId = new String[INITIAL_CHUNK_COUNT][];
-
-    // other information
-
-    /** Scope mapping table. */
-    private TupleHashtable fScopeMapping = new TupleHashtable();
-
-    // temporary variables
-
-    /** Temporary qualified name. */
-    private QName fQName1 = new QName();
-    
-    /** Temporary qualified name. */
-    private QName fQName2 = new QName();
-
-    /** Temporary Attribute decl. */
-    protected XMLAttributeDecl fAttributeDecl = new XMLAttributeDecl();
-
-    // for buildSyntaxTree method
-
-    private int fLeafCount = 0;
-    private int fEpsilonIndex = -1;
-    
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    protected Grammar(SymbolTable symbolTable) {
-        fSymbolTable = symbolTable;
-    } // <init>(SymbolTable)
-
-    //
-    // Public methods
-    //
-
-    /** Returns true if this grammar is namespace aware. */
-    public abstract boolean isNamespaceAware();
-
-    /** Returns the symbol table. */
-    public SymbolTable getSymbolTable() {
-        return fSymbolTable;
-    } // getSymbolTable():SymbolTable
-
-    /** Returns this grammar's target namespace. */
-    public String getTargetNamespace() {
-        return fTargetNamespace;
-    } // getTargetNamespace():String
-
-    // REVISIT: Make this getElementDeclCount/getElementDeclAt. -Ac
-
-    /**
-     * Returns the index of the first element declaration. This index
-     * is then used to query more information about the element declaration.
-     *
-     * @see #getNextElementDeclIndex
-     * @see #getElementDecl
-     */
-    public int getFirstElementDeclIndex() {
-        return fElementDeclCount > 0 ? fElementDeclCount : -1;
-    } // getFirstElementDeclIndex():int
-
-    /**
-     * Returns the next index of the element declaration following the
-     * specified element declaration.
-     * 
-     * @param elementDeclIndex The element declaration index.
-     */
-    public int getNextElementDeclIndex(int elementDeclIndex) {
-        return elementDeclIndex < fElementDeclCount - 1 
-             ? elementDeclIndex + 1 : -1;
-    } // getNextElementDeclIndex(int):int
-
-    /**
-     * getElementDeclIndex
-     * 
-     * @param elementDeclName 
-     * @param scope 
-     * 
-     * @return 
-     */
-    public int getElementDeclIndex(String elementDeclName, int scope) {
-        int mapping = fScopeMapping.get(scope, elementDeclName, null);
-        //System.out.println("getElementDeclIndex("+elementDeclName+','+scope+") -> "+mapping);
-        return mapping;
-    } // getElementDeclIndex(String,int):int
-   
-    /**
-     * getElementDeclIndex
-     * 
-     * @param elementDeclQName 
-     * @param scope 
-     * 
-     * @return 
-     */
-    public int getElementDeclIndex(QName elementDeclQName, int scope) {
-        int mapping = fScopeMapping.get(scope, elementDeclQName.localpart, elementDeclQName.uri);
-        //System.out.println("getElementDeclIndex("+elementDeclQName+','+scope+") -> "+mapping);
-        return mapping;
-    } // getElementDeclIndex(QName,int):int
-
-    /**
-     * getElementDecl
-     * 
-     * @param elementDeclIndex 
-     * @param elementDecl The values of this structure are set by this call.
-     * 
-     * @return True if find the element, False otherwise. 
-     */
-    public boolean getElementDecl(int elementDeclIndex, 
-                                  XMLElementDecl elementDecl) {
-
-        if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) {
-            return false;
-        }
-
-        int chunk = elementDeclIndex >> CHUNK_SHIFT;
-        int index = elementDeclIndex &  CHUNK_MASK;
-
-        elementDecl.name.setValues(fElementDeclName[chunk][index]);
-
-        if (fElementDeclType[chunk][index] == -1) {
-            elementDecl.type                    = -1;
-            elementDecl.simpleType.list = false;
-        } else {
-            elementDecl.type            = (short) (fElementDeclType[chunk][index] & LIST_MASK);
-            elementDecl.simpleType.list = (fElementDeclType[chunk][index] & LIST_FLAG) != 0;
-        }
-
-        /* Validators are null until we add that code */
-        if (elementDecl.type == XMLElementDecl.TYPE_CHILDREN || elementDecl.type == XMLElementDecl.TYPE_MIXED) {
-            elementDecl.contentModelValidator = getElementContentModelValidator(elementDeclIndex);
-        }
-              
-        elementDecl.simpleType.datatypeValidator = fElementDeclDatatypeValidator[chunk][index];      
-        elementDecl.simpleType.defaultType       = fElementDeclDefaultType[chunk][index];
-        elementDecl.simpleType.defaultValue      = fElementDeclDefaultValue[chunk][index];
-
-        return true;
-
-    } // getElementDecl(int,XMLElementDecl):boolean
-
-    // REVISIT: Make this getAttributeDeclCount/getAttributeDeclAt. -Ac
-
-    /**
-     * getFirstAttributeDeclIndex
-     * 
-     * @param elementDeclIndex 
-     * 
-     * @return int
-     */
-    public int getFirstAttributeDeclIndex(int elementDeclIndex) {
-        int chunk = elementDeclIndex >> CHUNK_SHIFT;
-        int index = elementDeclIndex &  CHUNK_MASK;
-
-        return  fElementDeclFirstAttributeDeclIndex[chunk][index];
-    } // getFirstAttributeDeclIndex
-
-    /**
-     * getNextAttributeDeclIndex
-     * 
-     * @param attributeDeclIndex 
-     * 
-     * @return 
-     */
-    public int getNextAttributeDeclIndex(int attributeDeclIndex) {
-        int chunk = attributeDeclIndex >> CHUNK_SHIFT;
-        int index = attributeDeclIndex &  CHUNK_MASK;
-
-        return fAttributeDeclNextAttributeDeclIndex[chunk][index];
-    } // getNextAttributeDeclIndex
-
-    /**
-     * getAttributeDeclIndex
-     * 
-     * @param elementDeclIndex 
-     * @param attributeDeclName 
-     * 
-     * @return 
-     */
-    public int getAttributeDeclIndex(int elementDeclIndex, String attributeDeclName) {
-        // REVISIT: [Q] How is this supposed to be overridden efficiently by 
-        //          a subclass if all of the data structures are private? -Ac
-        return -1; // should be overide by sub classes
-    }
-
-    /**
-     * getAttributeDecl
-     * 
-     * @param attributeDeclIndex 
-     * @param attributeDecl The values of this structure are set by this call.
-     * 
-     * @return 
-     */
-    public boolean getAttributeDecl(int attributeDeclIndex, XMLAttributeDecl attributeDecl) {
-        if (attributeDeclIndex < 0 || attributeDeclIndex >= fAttributeDeclCount) {
-            return false;
-        }
-        int chunk = attributeDeclIndex >> CHUNK_SHIFT;
-        int index = attributeDeclIndex & CHUNK_MASK;
-
-        attributeDecl.name.setValues(fAttributeDeclName[chunk][index]);
-
-        short attributeType;
-        boolean isList;
-
-        if (fAttributeDeclType[chunk][index] == -1) {
-
-            attributeType = -1;
-            isList = false;
-        } else {
-            attributeType = (short) (fAttributeDeclType[chunk][index] & LIST_MASK);
-            isList = (fAttributeDeclType[chunk][index] & LIST_FLAG) != 0;
-        }
-        attributeDecl.simpleType.setValues(attributeType,fAttributeDeclName[chunk][index].localpart,
-                                           fAttributeDeclEnumeration[chunk][index],
-                                           isList, fAttributeDeclDefaultType[chunk][index],
-                                           fAttributeDeclDefaultValue[chunk][index], 
-                                           fAttributeDeclDatatypeValidator[chunk][index]);
-        return true;
-
-    } // getAttributeDecl
-
-
-    /**
-     * Returns whether the given attribute is of type CDATA or not
-     *
-     * @param elName The element name.
-     * @param atName The attribute name.
-     *
-     * @return true if the attribute is of type CDATA
-     */
-    public boolean isCDATAAttribute(QName elName, QName atName) {
-        int elDeclIdx = getElementDeclIndex(elName, -1);
-        int atDeclIdx = getAttributeDeclIndex(elDeclIdx, atName.rawname);
-        if (getAttributeDecl(elDeclIdx, fAttributeDecl)
-            && fAttributeDecl.simpleType.type != XMLSimpleType.TYPE_CDATA){
-            return false;
-        }
-        return true;
-    }
-
-
-    /**
-     * getFirstEntityDeclIndex
-     * 
-     * @return 
-     */
-    public int getFirstEntityDeclIndex() {
-        throw new RuntimeException("implement Grammar#getFirstEntityDeclIndex():int");
-    } // getFirstEntityDeclIndex
-
-    /**
-     * getNextEntityDeclIndex
-     * 
-     * @param elementDeclIndex 
-     * 
-     * @return 
-     */
-    public int getNextEntityDeclIndex(int elementDeclIndex) {
-        throw new RuntimeException("implement Grammar#getNextEntityDeclIndex(int):int");
-    } // getNextEntityDeclIndex
-
-    /**
-     * getEntityDeclIndex
-     * 
-     * @param entityDeclName 
-     * 
-     * @return 
-     */
-    public int getEntityDeclIndex(String entityDeclName) {
-        if (entityDeclName == null) {
-            return -1;
-        }
-        for (int i=0; i<fEntityCount; i++) {
-            int chunk = i >> CHUNK_SHIFT;
-            int index = i & CHUNK_MASK;
-            if ( fEntityName[chunk][index] == entityDeclName || entityDeclName.equals(fEntityName[chunk][index]) ) {
-                return i;
-            }
-        }
-    
-        return -1;
-    } // getEntityDeclIndex
-
-    /**
-     * getEntityDecl
-     * 
-     * @param entityDeclIndex 
-     * @param entityDecl 
-     * 
-     * @return 
-     */
-    public boolean getEntityDecl(int entityDeclIndex, XMLEntityDecl entityDecl) {
-        if (entityDeclIndex < 0 || entityDeclIndex >= fEntityCount) {
-            return false;
-        }
-        int chunk = entityDeclIndex >> CHUNK_SHIFT;
-        int index = entityDeclIndex & CHUNK_MASK;
-
-        entityDecl.setValues(fEntityName[chunk][index],
-                             fEntityPublicId[chunk][index],
-                             fEntitySystemId[chunk][index],
-                             fEntityBaseSystemId[chunk][index],
-                             fEntityNotation[chunk][index],
-                             fEntityValue[chunk][index],
-                             fEntityIsPE[chunk][index] == 0 ? false : true ,
-                             fEntityInExternal[chunk][index] == 0 ? false : true );
-
-        return true;
-    } // getEntityDecl
-
-    /**
-     * getFirstNotationDeclIndex
-     * 
-     * @return 
-     */
-    public int getFirstNotationDeclIndex() {
-        throw new RuntimeException("implement Grammar#getFirstNotationDeclIndex():int");
-    } // getFirstNotationDeclIndex
-
-    /**
-     * getNextNotationDeclIndex
-     * 
-     * @param elementDeclIndex 
-     * 
-     * @return 
-     */
-    public int getNextNotationDeclIndex(int elementDeclIndex) {
-        throw new RuntimeException("implement Grammar#getNextNotationDeclIndex(int):int");
-    } // getNextNotationDeclIndex
-
-    /**
-     * getNotationDeclIndex
-     * 
-     * @param notationDeclName 
-     * 
-     * @return the index if found a notation with the name, otherwise -1.
-     */
-    public int getNotationDeclIndex(String notationDeclName) {
-        if (notationDeclName == null) {
-            return -1;
-        }
-        for (int i=0; i<fNotationCount; i++) {
-            int chunk = i >> CHUNK_SHIFT;
-            int index = i & CHUNK_MASK;
-            if ( fNotationName[chunk][index] == notationDeclName || notationDeclName.equals(fNotationName[chunk][index]) ) {
-                return i;
-            }
-        }
-
-        return -1;
-    } // getNotationDeclIndex
-
-    /**
-     * getNotationDecl
-     * 
-     * @param notationDeclIndex 
-     * @param notationDecl 
-     * 
-     * @return 
-     */
-    public boolean getNotationDecl(int notationDeclIndex, XMLNotationDecl notationDecl) {
-        if (notationDeclIndex < 0 || notationDeclIndex >= fNotationCount) {
-            return false;
-        }
-        int chunk = notationDeclIndex >> CHUNK_SHIFT;
-        int index = notationDeclIndex & CHUNK_MASK;
-
-        notationDecl.setValues(fNotationName[chunk][index], 
-                               fNotationPublicId[chunk][index],
-                               fNotationSystemId[chunk][index]);
-
-        return true;
-
-    } // getNotationDecl
-
-    /**
-     * getContentSpec
-     * 
-     * @param contentSpecIndex 
-     * @param contentSpec
-     * 
-     * @return true if find the requested contentSpec node, false otherwise
-     */
-    public boolean getContentSpec(int contentSpecIndex, XMLContentSpec contentSpec) {
-        if (contentSpecIndex < 0 || contentSpecIndex >= fContentSpecCount )
-            return false;
-
-        int chunk = contentSpecIndex >> CHUNK_SHIFT;
-        int index = contentSpecIndex & CHUNK_MASK;
-
-        contentSpec.type       = fContentSpecType[chunk][index];
-        contentSpec.value      = fContentSpecValue[chunk][index];
-        contentSpec.otherValue = fContentSpecOtherValue[chunk][index];
-        return true;
-    }
-
-    /**
-     * getContentSpecAsString
-     *
-     * @param elementDeclIndex
-     *
-     * @ return String
-     */
-    public String getContentSpecAsString(int elementDeclIndex){
-
-        if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) {
-            return null;
-        }
-
-        int chunk = elementDeclIndex >> CHUNK_SHIFT;
-        int index = elementDeclIndex &  CHUNK_MASK;
-
-        int contentSpecIndex = fElementDeclContentSpecIndex[chunk][index];
-
-        // lookup content spec node
-        XMLContentSpec contentSpec = new XMLContentSpec();
-
-        if (getContentSpec(contentSpecIndex, contentSpec)) {
-
-            // build string
-            StringBuffer str = new StringBuffer();
-            int    parentContentSpecType = contentSpec.type & 0x0f;
-            int    nextContentSpec;
-            switch (parentContentSpecType) {
-                case XMLContentSpec.CONTENTSPECNODE_LEAF: {
-                    str.append('(');
-                    if (contentSpec.value == null && contentSpec.otherValue == null) {
-                        str.append("#PCDATA");
-                    }
-                    else {
-                        str.append(contentSpec.value);
-                    }
-                    str.append(')');
-                    break;
-                }
-                case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE: {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    nextContentSpec = contentSpec.type;
-
-                    if (nextContentSpec == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-                        str.append('(');
-                        str.append(contentSpec.value);
-                        str.append(')');
-                    } else if( nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE  ||
-                        nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE  ||
-                        nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE ) {
-                        str.append('(' );
-                        appendContentSpec(contentSpec, str, 
-                                          true, parentContentSpecType );
-                        str.append(')');
-                    } else {
-                        appendContentSpec(contentSpec, str, 
-                                          true, parentContentSpecType );
-                    }
-                    str.append('?');
-                    break;
-                }
-                case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE: {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    nextContentSpec = contentSpec.type;
-
-                    if ( nextContentSpec == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-                        str.append('(');
-                        if (contentSpec.value == null && contentSpec.otherValue == null) {
-                            str.append("#PCDATA");
-                        }
-                        else if (contentSpec.otherValue != null) {
-                            str.append("##any:uri="+contentSpec.otherValue);
-                        }
-                        else if (contentSpec.value == null) {
-                            str.append("##any");
-                        }
-                        else {
-                            appendContentSpec(contentSpec, str, 
-                                              true, parentContentSpecType );
-                        }
-                        str.append(')');
-                    } else if( nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE  ||
-                        nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE  ||
-                        nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE ) {
-                        str.append('(' );
-                        appendContentSpec(contentSpec, str, 
-                                          true, parentContentSpecType );
-                        str.append(')');
-                    } else {
-                        appendContentSpec(contentSpec, str, 
-                                          true, parentContentSpecType );
-                    }
-                    str.append('*');
-                    break;
-                }
-                case XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE: {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    nextContentSpec = contentSpec.type;
-
-                    if ( nextContentSpec == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-                        str.append('(');
-                        if (contentSpec.value == null && contentSpec.otherValue == null) {
-                            str.append("#PCDATA");
-                        }
-                        else if (contentSpec.otherValue != null) {
-                            str.append("##any:uri="+contentSpec.otherValue);
-                        }
-                        else if (contentSpec.value == null) {
-                            str.append("##any");
-                        }
-                        else {
-                            str.append(contentSpec.value);
-                        }
-                        str.append(')');
-                    } else if( nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE  ||
-                        nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE  ||
-                        nextContentSpec == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE ) {
-                        str.append('(' );
-                        appendContentSpec(contentSpec, str, 
-                                          true, parentContentSpecType );
-                        str.append(')');
-                    } else {
-                        appendContentSpec(contentSpec, str,
-                                          true, parentContentSpecType);
-                    }
-                    str.append('+');
-                    break;
-                }
-                case XMLContentSpec.CONTENTSPECNODE_CHOICE:
-                case XMLContentSpec.CONTENTSPECNODE_SEQ: {
-                    appendContentSpec(contentSpec, str, 
-                                      true, parentContentSpecType );
-                    break;
-                }
-                case XMLContentSpec.CONTENTSPECNODE_ANY: {
-                    str.append("##any");
-                    if (contentSpec.otherValue != null) {
-                        str.append(":uri=");
-                        str.append(contentSpec.otherValue);
-                    }
-                    break;
-                }
-                case XMLContentSpec.CONTENTSPECNODE_ANY_OTHER: {
-                    str.append("##other:uri=");
-                    str.append(contentSpec.otherValue);
-                    break;
-                }
-                case XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL: {
-                    str.append("##local");
-                    break;
-                }
-                default: {
-                    str.append("???");
-                }
-
-            } // switch type
-
-            // return string
-            return str.toString();
-        }
-
-        // not found
-        return null;
-
-    } // getContentSpecAsString(int):String
-
-    // debugging
-
-    public void printElements(  ) {
-        int elementDeclIndex = 0;
-        XMLElementDecl elementDecl = new XMLElementDecl();
-        while (getElementDecl(elementDeclIndex++, elementDecl)) {
-
-            System.out.println("element decl: "+elementDecl.name+
-                               ", "+ elementDecl.name.rawname  );
-
-            //                   ", "+ elementDecl.contentModelValidator.toString());
-        }
-    }
-
-    public void printAttributes(int elementDeclIndex) {
-        int attributeDeclIndex = getFirstAttributeDeclIndex(elementDeclIndex);
-        System.out.print(elementDeclIndex);
-        System.out.print(" [");
-        while (attributeDeclIndex != -1) {
-            System.out.print(' ');
-            System.out.print(attributeDeclIndex);
-            printAttribute(attributeDeclIndex);
-            attributeDeclIndex = getNextAttributeDeclIndex(attributeDeclIndex);
-            if (attributeDeclIndex != -1) {
-                System.out.print(",");
-            }
-        }
-        System.out.println(" ]");
-    }
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * getElementContentModelValidator
-     * 
-     * @param elementDeclIndex 
-     * 
-     * @return its ContentModelValidator if any.
-     */
-    protected ContentModelValidator getElementContentModelValidator(int elementDeclIndex) {
-
-        int chunk = elementDeclIndex >> CHUNK_SHIFT;
-        int index = elementDeclIndex & CHUNK_MASK;
-
-        ContentModelValidator contentModel    =  fElementDeclContentModelValidator[chunk][index];
-
-        // If we have one, just return that. Otherwise, gotta create one
-        if (contentModel != null) {
-            return contentModel;
-        }
-
-        int contentType = fElementDeclType[chunk][index];
-        if (contentType == XMLElementDecl.TYPE_SIMPLE) {
-            return null;
-        }
-
-        // Get the type of content this element has
-        int contentSpecIndex = fElementDeclContentSpecIndex[chunk][index]; 
-
-        /***
-        if ( contentSpecIndex == -1 )
-            return null;
-        /***/
-
-        XMLContentSpec  contentSpec = new XMLContentSpec();
-        getContentSpec( contentSpecIndex, contentSpec );
-
-        // And create the content model according to the spec type
-        if ( contentType == XMLElementDecl.TYPE_MIXED ) {
-            //
-            //  Just create a mixel content model object. This type of
-            //  content model is optimized for mixed content validation.
-            //
-            ChildrenList children = new ChildrenList();
-            contentSpecTree(contentSpecIndex, contentSpec, children);
-            contentModel = new MixedContentModel(children.qname,
-                                                 children.type,
-                                                 0, children.length, 
-                                                 false, isDTD());
-        } else if (contentType == XMLElementDecl.TYPE_CHILDREN) {
-            //  This method will create an optimal model for the complexity
-            //  of the element's defined model. If its simple, it will create
-            //  a SimpleContentModel object. If its a simple list, it will
-            //  create a SimpleListContentModel object. If its complex, it
-            //  will create a DFAContentModel object.
-            //
-            contentModel = createChildModel(contentSpecIndex);
-        } else {
-            throw new RuntimeException("Unknown content type for a element decl "
-                                     + "in getElementContentModelValidator() in Grammar class");
-        }
-
-        // Add the new model to the content model for this element
-        fElementDeclContentModelValidator[chunk][index] = contentModel;
-
-        return contentModel;
-
-    } // getElementContentModelValidator(int):ContentModelValidator
-
-   protected int createElementDecl() {
-      int chunk = fElementDeclCount >> CHUNK_SHIFT;
-      int index = fElementDeclCount & CHUNK_MASK;
-      ensureElementDeclCapacity(chunk);
-      fElementDeclName[chunk][index]                    = new QName(); 
-      fElementDeclType[chunk][index]                    = -1;  
-      fElementDeclDatatypeValidator[chunk][index]       = null;
-      fElementDeclContentModelValidator[chunk][index]   = null;
-      fElementDeclFirstAttributeDeclIndex[chunk][index] = -1;
-      fElementDeclLastAttributeDeclIndex[chunk][index]  = -1;
-      fElementDeclDefaultValue[chunk][index]            = null;
-      fElementDeclDefaultType[chunk][index]             = -1;
-      return fElementDeclCount++;
-   }
-
-   protected void setElementDecl(int elementDeclIndex, XMLElementDecl elementDecl) {
-      if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) {
-         return;
-      }
-      int     chunk       = elementDeclIndex >> CHUNK_SHIFT;
-      int     index       = elementDeclIndex &  CHUNK_MASK;
-
-      int     scope       = elementDecl.scope;
-
-
-      fElementDeclName[chunk][index].setValues(elementDecl.name);
-      fElementDeclType[chunk][index]                  = elementDecl.type; 
-      fElementDeclDatatypeValidator[chunk][index]     =
-                        elementDecl.simpleType.datatypeValidator;
-      fElementDeclDefaultType[chunk][index] = elementDecl.simpleType.defaultType;
-      fElementDeclDefaultValue[chunk][index] = elementDecl.simpleType.defaultValue;
-
-      fElementDeclContentModelValidator[chunk][index] = elementDecl.contentModelValidator;
-         
-
-      if (elementDecl.simpleType.list  == true ) {
-         fElementDeclType[chunk][index] |= LIST_FLAG;
-      }
-
-      if (isDTD()) {
-          fScopeMapping.put(scope, elementDecl.name.rawname, null, elementDeclIndex);
-      }
-      else {
-          fScopeMapping.put( scope, elementDecl.name.localpart, 
-                                             elementDecl.name.uri, elementDeclIndex);
-      }
-   }
-
-
-
-
-   protected void putElementNameMapping(QName name, int scope,
-                                        int elementDeclIndex) {
-   }
-
-   protected void setFirstAttributeDeclIndex(int elementDeclIndex, int newFirstAttrIndex){
-
-      if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) {
-         return;
-      }
-
-      int chunk = elementDeclIndex >> CHUNK_SHIFT;
-      int index = elementDeclIndex &  CHUNK_MASK;
-
-      fElementDeclFirstAttributeDeclIndex[chunk][index] = newFirstAttrIndex;
-   }
-   
-   protected void setContentSpecIndex(int elementDeclIndex, int contentSpecIndex){
-
-      if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) {
-         return;
-      }
-
-      int chunk = elementDeclIndex >> CHUNK_SHIFT;
-      int index = elementDeclIndex &  CHUNK_MASK;
-
-      fElementDeclContentSpecIndex[chunk][index] = contentSpecIndex;
-   }
-
-
-   protected int createAttributeDecl() {
-      int chunk = fAttributeDeclCount >> CHUNK_SHIFT;
-      int index = fAttributeDeclCount & CHUNK_MASK;
-
-      ensureAttributeDeclCapacity(chunk);
-      fAttributeDeclName[chunk][index]                    = new QName();
-      fAttributeDeclType[chunk][index]                    = -1;
-      fAttributeDeclDatatypeValidator[chunk][index]       = null;
-      fAttributeDeclEnumeration[chunk][index]             = null;
-      fAttributeDeclDefaultType[chunk][index]             = XMLSimpleType.DEFAULT_TYPE_IMPLIED;
-      fAttributeDeclDefaultValue[chunk][index]            = null;
-      fAttributeDeclNextAttributeDeclIndex[chunk][index]  = -1;
-      return fAttributeDeclCount++;
-   }
-
-
-   protected void setAttributeDecl(int elementDeclIndex, int attributeDeclIndex,
-                                   XMLAttributeDecl attributeDecl) {
-      int attrChunk = attributeDeclIndex >> CHUNK_SHIFT;
-      int attrIndex = attributeDeclIndex &  CHUNK_MASK; 
-      fAttributeDeclName[attrChunk][attrIndex].setValues(attributeDecl.name);
-      fAttributeDeclType[attrChunk][attrIndex]  =  attributeDecl.simpleType.type;
-
-      if (attributeDecl.simpleType.list) {
-         fAttributeDeclType[attrChunk][attrIndex] |= LIST_FLAG;
-      }
-      fAttributeDeclEnumeration[attrChunk][attrIndex]  =  attributeDecl.simpleType.enumeration;
-      fAttributeDeclDefaultType[attrChunk][attrIndex]  =  attributeDecl.simpleType.defaultType;
-      fAttributeDeclDatatypeValidator[attrChunk][attrIndex] =  attributeDecl.simpleType.datatypeValidator;
-
-      fAttributeDeclDefaultValue[attrChunk][attrIndex] = attributeDecl.simpleType.defaultValue;
-
-      int elemChunk     = elementDeclIndex >> CHUNK_SHIFT;
-      int elemIndex     = elementDeclIndex &  CHUNK_MASK;
-      int index         = fElementDeclFirstAttributeDeclIndex[elemChunk][elemIndex];
-      while (index != -1) {
-         if (index == attributeDeclIndex) {
-            break;
-         }
-         attrChunk = index >> CHUNK_SHIFT;
-         attrIndex = index & CHUNK_MASK;
-         index = fAttributeDeclNextAttributeDeclIndex[attrChunk][attrIndex];
-      }
-      if (index == -1) {
-         if (fElementDeclFirstAttributeDeclIndex[elemChunk][elemIndex] == -1) {
-            fElementDeclFirstAttributeDeclIndex[elemChunk][elemIndex] = attributeDeclIndex;
-         } else {
-            index = fElementDeclLastAttributeDeclIndex[elemChunk][elemIndex];
-            attrChunk = index >> CHUNK_SHIFT;
-            attrIndex = index & CHUNK_MASK;
-            fAttributeDeclNextAttributeDeclIndex[attrChunk][attrIndex] = attributeDeclIndex;
-         }
-         fElementDeclLastAttributeDeclIndex[elemChunk][elemIndex] = attributeDeclIndex;
-      }
-   }
-
-   protected int createContentSpec() {
-      int chunk = fContentSpecCount >> CHUNK_SHIFT;
-      int index = fContentSpecCount & CHUNK_MASK;
-
-      ensureContentSpecCapacity(chunk);
-      fContentSpecType[chunk][index]       = -1;
-      fContentSpecValue[chunk][index]      = null;
-      fContentSpecOtherValue[chunk][index] = null;
-
-      return fContentSpecCount++;
-   }
-
-   protected void setContentSpec(int contentSpecIndex, XMLContentSpec contentSpec) {
-      int   chunk = contentSpecIndex >> CHUNK_SHIFT;
-      int   index = contentSpecIndex & CHUNK_MASK;
-
-      fContentSpecType[chunk][index]       = contentSpec.type;
-      fContentSpecValue[chunk][index]      = contentSpec.value;
-      fContentSpecOtherValue[chunk][index] = contentSpec.otherValue;
-   }
-
-
-   protected int createEntityDecl() {
-       int chunk = fEntityCount >> CHUNK_SHIFT;
-       int index = fEntityCount & CHUNK_MASK;
-
-      ensureEntityDeclCapacity(chunk);
-      fEntityIsPE[chunk][index] = 0;
-      fEntityInExternal[chunk][index] = 0;
-
-      return fEntityCount++;
-   }
-
-   protected void setEntityDecl(int entityDeclIndex, XMLEntityDecl entityDecl) {
-       int chunk = entityDeclIndex >> CHUNK_SHIFT;
-       int index = entityDeclIndex & CHUNK_MASK;
-
-       fEntityName[chunk][index] = entityDecl.name;
-       fEntityValue[chunk][index] = entityDecl.value;
-       fEntityPublicId[chunk][index] = entityDecl.publicId;
-       fEntitySystemId[chunk][index] = entityDecl.systemId;
-       fEntityBaseSystemId[chunk][index] = entityDecl.baseSystemId;
-       fEntityNotation[chunk][index] = entityDecl.notation;
-       fEntityIsPE[chunk][index] = entityDecl.isPE ? (byte)1 : (byte)0;
-       fEntityInExternal[chunk][index] = entityDecl.inExternal ? (byte)1 : (byte)0;
-   }
-   
-
-   protected int createNotationDecl() {
-       int chunk = fNotationCount >> CHUNK_SHIFT;
-       int index = fNotationCount & CHUNK_MASK;
-
-       ensureNotationDeclCapacity(chunk);
-
-       return fNotationCount++;
-   }
-
-   protected void setNotationDecl(int notationDeclIndex, XMLNotationDecl notationDecl) {
-       int chunk = notationDeclIndex >> CHUNK_SHIFT;
-       int index = notationDeclIndex & CHUNK_MASK;
-
-       fNotationName[chunk][index] = notationDecl.name;
-       fNotationPublicId[chunk][index] = notationDecl.publicId;
-       fNotationSystemId[chunk][index] = notationDecl.systemId;
-   }
-
-   protected void setTargetNamespace( String targetNamespace ){
-      fTargetNamespace = targetNamespace;
-   }
-
-   // subclass shoudl overwrite this method to return the right value.
-   protected boolean isDTD() {
-      return true;
-   }
-
-    //
-    // Private methods
-    //
-
-    private void appendContentSpec(XMLContentSpec contentSpec, 
-                                   StringBuffer str, boolean parens,
-                                   int parentContentSpecType ) {
-
-        int thisContentSpec = contentSpec.type & 0x0f;
-        switch (thisContentSpec) {
-            case XMLContentSpec.CONTENTSPECNODE_LEAF: {
-                if (contentSpec.value == null && contentSpec.otherValue == null) {
-                    str.append("#PCDATA");
-                }
-                else if (contentSpec.value == null && contentSpec.otherValue != null) {
-                    str.append("##any:uri="+contentSpec.otherValue);
-                }
-                else if (contentSpec.value == null) {
-                    str.append("##any");
-                }
-                else {
-                    str.append(contentSpec.value);
-                }
-                break;
-            }
-            case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE: {
-                if (parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE  ||
-                    parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE ||
-                    parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE ) {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    str.append('(');
-                    appendContentSpec(contentSpec, str, true, thisContentSpec );
-                    str.append(')');
-                } 
-                else {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    appendContentSpec( contentSpec, str, true, thisContentSpec );
-                }
-                str.append('?');
-                break;
-            }
-            case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE: {
-                if (parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE ||
-                    parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE ||
-                    parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE ) {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    str.append('(');
-                    appendContentSpec(contentSpec, str, true, thisContentSpec);
-                    str.append(')' );
-                } 
-                else {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    appendContentSpec(contentSpec, str, true, thisContentSpec);
-                }
-                str.append('*');
-                break;
-            }
-            case XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE: {
-                if (parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE   ||
-                    parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE  ||
-                    parentContentSpecType == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE ) {
-
-                    str.append('(');
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    appendContentSpec(contentSpec, str, true, thisContentSpec);
-                    str.append(')' );
-                }
-                else {
-                    getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                    appendContentSpec(contentSpec, str, true, thisContentSpec);
-                }
-                str.append('+');
-                break;
-            }
-            case XMLContentSpec.CONTENTSPECNODE_CHOICE:
-            case XMLContentSpec.CONTENTSPECNODE_SEQ: {
-                if (parens) {
-                    str.append('(');
-                }
-                int type = contentSpec.type;
-                int otherValue = ((int[])contentSpec.otherValue)[0];
-                getContentSpec(((int[])contentSpec.value)[0], contentSpec);
-                appendContentSpec(contentSpec, str, contentSpec.type != type, thisContentSpec);
-                if (type == XMLContentSpec.CONTENTSPECNODE_CHOICE) {
-                    str.append('|');
-                }
-                else {
-                    str.append(',');
-                }
-                getContentSpec(otherValue, contentSpec);
-                appendContentSpec(contentSpec, str, true, thisContentSpec);
-                if (parens) {
-                    str.append(')');
-                }
-                break;
-            }
-            case XMLContentSpec.CONTENTSPECNODE_ANY: {
-                str.append("##any");
-                if (contentSpec.otherValue != null) {
-                    str.append(":uri=");
-                    str.append(contentSpec.otherValue);
-                }
-                break;
-            }
-            case XMLContentSpec.CONTENTSPECNODE_ANY_OTHER: {
-                str.append("##other:uri=");
-                str.append(contentSpec.otherValue);
-                break;
-            }
-            case XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL: {
-                str.append("##local");
-                break;
-            }
-            default: {
-                str.append("???");
-                break;
-            }
-
-        } // switch type
-
-    } // appendContentSpec(XMLContentSpec.Provider,StringPool,XMLContentSpec,StringBuffer,boolean)
-
-    //
-    // Private methods
-    //
-
-    // debugging
-
-    private void printAttribute(int attributeDeclIndex) {
-
-        XMLAttributeDecl attributeDecl = new XMLAttributeDecl();
-        if (getAttributeDecl(attributeDeclIndex, attributeDecl)) {
-            System.out.print(" { ");
-            System.out.print(attributeDecl.name.localpart);
-            System.out.print(" }");
-        }
-
-    } // printAttribute(int)
-
-    // content models
-
-    /**
-     * When the element has a 'CHILDREN' model, this method is called to
-     * create the content model object. It looks for some special case simple
-     * models and creates SimpleContentModel objects for those. For the rest
-     * it creates the standard DFA style model.
-     */
-    private ContentModelValidator createChildModel(int contentSpecIndex) {
-        
-        //
-        //  Get the content spec node for the element we are working on.
-        //  This will tell us what kind of node it is, which tells us what
-        //  kind of model we will try to create.
-        //
-        XMLContentSpec contentSpec = new XMLContentSpec();
-        getContentSpec(contentSpecIndex, contentSpec);
-
-        if ((contentSpec.type & 0x0f ) == XMLContentSpec.CONTENTSPECNODE_ANY ||
-            (contentSpec.type & 0x0f ) == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER ||
-            (contentSpec.type & 0x0f ) == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL) {
-            // let fall through to build a DFAContentModel
-        }
-
-        else if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-            //
-            //  Check that the left value is not -1, since any content model
-            //  with PCDATA should be MIXED, so we should not have gotten here.
-            //
-            if (contentSpec.value == null && contentSpec.otherValue == null)
-                throw new RuntimeException("ImplementationMessages.VAL_NPCD");
-
-            //
-            //  Its a single leaf, so its an 'a' type of content model, i.e.
-            //  just one instance of one element. That one is definitely a
-            //  simple content model.
-            //
-
-            fQName1.setValues(null, (String)contentSpec.value, 
-                              (String)contentSpec.value, (String)contentSpec.otherValue);
-            return new SimpleContentModel(contentSpec.type, fQName1, null, isDTD());
-        } else if ((contentSpec.type == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-                    ||  (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_SEQ)) {
-            //
-            //  Lets see if both of the children are leafs. If so, then it
-            //  it has to be a simple content model
-            //
-            XMLContentSpec contentSpecLeft  = new XMLContentSpec();
-            XMLContentSpec contentSpecRight = new XMLContentSpec();
-
-            getContentSpec( ((int[])contentSpec.value)[0], contentSpecLeft);
-            getContentSpec( ((int[])contentSpec.otherValue)[0], contentSpecRight);
-
-            if ((contentSpecLeft.type == XMLContentSpec.CONTENTSPECNODE_LEAF)
-                 &&  (contentSpecRight.type == XMLContentSpec.CONTENTSPECNODE_LEAF)) {
-                //
-                //  Its a simple choice or sequence, so we can do a simple
-                //  content model for it.
-                //
-                fQName1.setValues(null, (String)contentSpecLeft.value, 
-                                  (String)contentSpecLeft.value, (String)contentSpecLeft.otherValue);
-                fQName2.setValues(null, (String)contentSpecRight.value, 
-                                  (String)contentSpecRight.value, (String)contentSpecRight.otherValue);
-                return new SimpleContentModel(contentSpec.type, fQName1, fQName2, isDTD());
-            }
-        } else if ((contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
-                    ||  (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
-                    ||  (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)) {
-            //
-            //  Its a repetition, so see if its one child is a leaf. If so
-            //  its a repetition of a single element, so we can do a simple
-            //  content model for that.
-            //
-            XMLContentSpec contentSpecLeft = new XMLContentSpec();
-            getContentSpec(((int[])contentSpec.value)[0], contentSpecLeft);
-    
-            if (contentSpecLeft.type == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-                //
-                //  It is, so we can create a simple content model here that
-                //  will check for this repetition. We pass -1 for the unused
-                //  right node.
-                //
-                fQName1.setValues(null, (String)contentSpecLeft.value, 
-                                  (String)contentSpecLeft.value, (String)contentSpecLeft.otherValue);
-                return new SimpleContentModel(contentSpec.type, fQName1, null, isDTD());
-            }
-        } else {
-            throw new RuntimeException("ImplementationMessages.VAL_CST");
-        }
-
-        //
-        //  Its not a simple content model, so here we have to create a DFA
-        //  for this element. So we create a DFAContentModel object. He
-        //  encapsulates all of the work to create the DFA.
-        //
-
-        fLeafCount = 0;
-        //int leafCount = countLeaves(contentSpecIndex);
-        fLeafCount = 0;
-        CMNode cmn    = buildSyntaxTree(contentSpecIndex, contentSpec);
-
-        // REVISIT: has to be fLeafCount because we convert x+ to x,x*, one more leaf
-        return new DFAContentModel(  cmn, fLeafCount, isDTD(), false);
-
-    } // createChildModel(int):ContentModelValidator
-
-    private final CMNode buildSyntaxTree(int startNode, 
-                                         XMLContentSpec contentSpec) {
-
-        // We will build a node at this level for the new tree
-        CMNode nodeRet = null;
-        getContentSpec(startNode, contentSpec);
-        if ((contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY) {
-            //nodeRet = new CMAny(contentSpec.type, -1, fLeafCount++);
-            nodeRet = new CMAny(contentSpec.type, (String)contentSpec.otherValue, fLeafCount++);
-        }
-        else if ((contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
-            nodeRet = new CMAny(contentSpec.type, (String)contentSpec.otherValue, fLeafCount++);
-        }
-        else if ((contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL) {
-            nodeRet = new CMAny(contentSpec.type, null, fLeafCount++);
-        }
-        //
-        //  If this node is a leaf, then its an easy one. We just add it
-        //  to the tree.
-        //
-        else if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-            //
-            //  Create a new leaf node, and pass it the current leaf count,
-            //  which is its DFA state position. Bump the leaf count after
-            //  storing it. This makes the positions zero based since we
-            //  store first and then increment.
-            //
-            fQName1.setValues(null, (String)contentSpec.value, 
-                              (String)contentSpec.value, (String)contentSpec.otherValue);
-            nodeRet = new CMLeaf(fQName1, fLeafCount++);
-        } 
-        else {
-            //
-            //  Its not a leaf, so we have to recurse its left and maybe right
-            //  nodes. Save both values before we recurse and trash the node.
-            final int leftNode = ((int[])contentSpec.value)[0];
-            final int rightNode = ((int[])contentSpec.otherValue)[0];
-
-            if ((contentSpec.type == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-                ||  (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_SEQ)) {
-                //
-                //  Recurse on both children, and return a binary op node
-                //  with the two created sub nodes as its children. The node
-                //  type is the same type as the source.
-                //
-
-                nodeRet = new CMBinOp( contentSpec.type, buildSyntaxTree(leftNode, contentSpec)
-                                       , buildSyntaxTree(rightNode, contentSpec));
-            } 
-            else if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE) {
-                nodeRet = new CMUniOp( contentSpec.type, buildSyntaxTree(leftNode, contentSpec));
-            } 
-            else if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE
-		       || contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE
-		       || contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE) {
-                nodeRet = new CMUniOp(contentSpec.type, buildSyntaxTree(leftNode, contentSpec));
-            } 
-            else {
-		        throw new RuntimeException("ImplementationMessages.VAL_CST");
-            }
-        }
-        // And return our new node for this level
-        return nodeRet;
-    }
-   
-    /**
-     * Build a vector of valid QNames from Content Spec
-     * table.
-     * 
-     * @param contentSpecIndex
-     *               Content Spec index
-     * @param vectorQName
-     *               Array of QName
-     * @exception RuntimeException
-     */
-    private void contentSpecTree(int contentSpecIndex, 
-                                 XMLContentSpec contentSpec,
-                                 ChildrenList children) {
-
-        // Handle any and leaf nodes
-        getContentSpec( contentSpecIndex, contentSpec);
-        if ( contentSpec.type == XMLContentSpec.CONTENTSPECNODE_LEAF ||
-            (contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY ||
-            (contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL ||
-            (contentSpec.type & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
-
-            // resize arrays, if needed
-            if (children.length == children.qname.length) {
-                QName[] newQName = new QName[children.length * 2];
-                System.arraycopy(children.qname, 0, newQName, 0, children.length);
-                children.qname = newQName;
-                int[] newType = new int[children.length * 2];
-                System.arraycopy(children.type, 0, newType, 0, children.length);
-                children.type = newType;
-            }
-
-            // save values and return length
-            children.qname[children.length] = new QName(null, (String)contentSpec.value, 
-                                                     (String) contentSpec.value, 
-                                                     (String) contentSpec.otherValue);
-            children.type[children.length] = contentSpec.type;
-            children.length++;
-            return;
-        }
-
-        //
-        //  Its not a leaf, so we have to recurse its left and maybe right
-        //  nodes. Save both values before we recurse and trash the node.
-        //
-        final int leftNode = contentSpec.value != null 
-                           ? ((int[])(contentSpec.value))[0] : -1;
-        int rightNode = -1 ;
-        if (contentSpec.otherValue != null ) 
-            rightNode = ((int[])(contentSpec.otherValue))[0];
-        else 
-            return;
-
-        if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_CHOICE ||
-            contentSpec.type == XMLContentSpec.CONTENTSPECNODE_SEQ) {
-            contentSpecTree(leftNode, contentSpec, children);
-            contentSpecTree(rightNode, contentSpec, children);
-            return;
-        }
-
-        if (contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE ||
-            contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE ||
-            contentSpec.type == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE) {
-            contentSpecTree(leftNode, contentSpec, children);
-            return;
-        }
-
-        // error
-        throw new RuntimeException("Invalid content spec type seen in contentSpecTree() method of Grammar class : "+contentSpec.type);
-
-    } // contentSpecTree(int,XMLContentSpec,ChildrenList)
-
-    // ensure capacity
-
-    private boolean ensureElementDeclCapacity(int chunk) {
-        try {
-            return fElementDeclName[chunk][0] == null;
-        } catch (ArrayIndexOutOfBoundsException ex) {
-            fElementDeclName = resize(fElementDeclName, fElementDeclName.length * 2);
-            fElementDeclType = resize(fElementDeclType, fElementDeclType.length * 2);
-            fElementDeclDatatypeValidator = resize(fElementDeclDatatypeValidator, fElementDeclDatatypeValidator.length * 2);
-            fElementDeclContentModelValidator = resize(fElementDeclContentModelValidator, fElementDeclContentModelValidator.length * 2);
-            fElementDeclContentSpecIndex = resize(fElementDeclContentSpecIndex,fElementDeclContentSpecIndex.length * 2);
-            fElementDeclFirstAttributeDeclIndex = resize(fElementDeclFirstAttributeDeclIndex, fElementDeclFirstAttributeDeclIndex.length * 2);
-            fElementDeclLastAttributeDeclIndex = resize(fElementDeclLastAttributeDeclIndex, fElementDeclLastAttributeDeclIndex.length * 2);
-            fElementDeclDefaultValue = resize( fElementDeclDefaultValue, fElementDeclDefaultValue.length * 2 ); 
-            fElementDeclDefaultType  = resize( fElementDeclDefaultType, fElementDeclDefaultType.length *2 );
-        } catch (NullPointerException ex) {
-            // ignore
-        }
-        fElementDeclName[chunk] = new QName[CHUNK_SIZE];
-        fElementDeclType[chunk] = new short[CHUNK_SIZE];
-        fElementDeclDatatypeValidator[chunk] = new DatatypeValidator[CHUNK_SIZE];
-        fElementDeclContentModelValidator[chunk] = new ContentModelValidator[CHUNK_SIZE];
-        fElementDeclContentSpecIndex[chunk] = new int[CHUNK_SIZE];
-        fElementDeclFirstAttributeDeclIndex[chunk] = new int[CHUNK_SIZE];
-        fElementDeclLastAttributeDeclIndex[chunk] = new int[CHUNK_SIZE];
-        fElementDeclDefaultValue[chunk] = new String[CHUNK_SIZE]; 
-        fElementDeclDefaultType[chunk]  = new short[CHUNK_SIZE]; 
-        return true;
-    }
-
-    private boolean ensureAttributeDeclCapacity(int chunk) {
-        try {
-            return fAttributeDeclName[chunk][0] == null;
-        } catch (ArrayIndexOutOfBoundsException ex) {
-            fAttributeDeclName = resize(fAttributeDeclName, fAttributeDeclName.length * 2);
-            fAttributeDeclType = resize(fAttributeDeclType, fAttributeDeclType.length * 2);
-            fAttributeDeclEnumeration = resize(fAttributeDeclEnumeration, fAttributeDeclEnumeration.length * 2);
-            fAttributeDeclDefaultType = resize(fAttributeDeclDefaultType, fAttributeDeclDefaultType.length * 2);
-            fAttributeDeclDatatypeValidator = resize(fAttributeDeclDatatypeValidator, fAttributeDeclDatatypeValidator.length * 2);
-            fAttributeDeclDefaultValue = resize(fAttributeDeclDefaultValue, fAttributeDeclDefaultValue.length * 2);
-            fAttributeDeclNextAttributeDeclIndex = resize(fAttributeDeclNextAttributeDeclIndex, fAttributeDeclNextAttributeDeclIndex.length * 2);
-        } catch (NullPointerException ex) {
-            // ignore
-        }
-        fAttributeDeclName[chunk] = new QName[CHUNK_SIZE];
-        fAttributeDeclType[chunk] = new short[CHUNK_SIZE];
-        fAttributeDeclEnumeration[chunk] = new String[CHUNK_SIZE][];
-        fAttributeDeclDefaultType[chunk] = new short[CHUNK_SIZE];
-        fAttributeDeclDatatypeValidator[chunk] = new DatatypeValidator[CHUNK_SIZE];
-        fAttributeDeclDefaultValue[chunk] = new String[CHUNK_SIZE];
-        fAttributeDeclNextAttributeDeclIndex[chunk] = new int[CHUNK_SIZE];
-        return true;
-    }
-   
-    private boolean ensureEntityDeclCapacity(int chunk) {
-        try {
-            return fEntityName[chunk][0] == null;
-        } catch (ArrayIndexOutOfBoundsException ex) {
-            fEntityName = resize(fEntityName, fEntityName.length * 2);
-            fEntityValue = resize(fEntityValue, fEntityValue.length * 2);
-            fEntityPublicId = resize(fEntityPublicId, fEntityPublicId.length * 2);
-            fEntitySystemId = resize(fEntitySystemId, fEntitySystemId.length * 2);
-            fEntityBaseSystemId = resize(fEntityBaseSystemId, fEntityBaseSystemId.length * 2);
-            fEntityNotation = resize(fEntityNotation, fEntityNotation.length * 2);
-            fEntityIsPE = resize(fEntityIsPE, fEntityIsPE.length * 2);
-            fEntityInExternal = resize(fEntityInExternal, fEntityInExternal.length * 2);
-        } catch (NullPointerException ex) {
-            // ignore
-        }
-        fEntityName[chunk] = new String[CHUNK_SIZE];
-        fEntityValue[chunk] = new String[CHUNK_SIZE];
-        fEntityPublicId[chunk] = new String[CHUNK_SIZE];
-        fEntitySystemId[chunk] = new String[CHUNK_SIZE];
-        fEntityBaseSystemId[chunk] = new String[CHUNK_SIZE];
-        fEntityNotation[chunk] = new String[CHUNK_SIZE];
-        fEntityIsPE[chunk] = new byte[CHUNK_SIZE];
-        fEntityInExternal[chunk] = new byte[CHUNK_SIZE];
-        return true;
-    }
-      
-    private boolean ensureNotationDeclCapacity(int chunk) {
-        try {
-            return fNotationName[chunk][0] == null;
-        } catch (ArrayIndexOutOfBoundsException ex) {
-            fNotationName = resize(fNotationName, fNotationName.length * 2);
-            fNotationPublicId = resize(fNotationPublicId, fNotationPublicId.length * 2);
-            fNotationSystemId = resize(fNotationSystemId, fNotationSystemId.length * 2);
-        } catch (NullPointerException ex) {
-            // ignore
-        }
-        fNotationName[chunk] = new String[CHUNK_SIZE];
-        fNotationPublicId[chunk] = new String[CHUNK_SIZE];
-        fNotationSystemId[chunk] = new String[CHUNK_SIZE];
-        return true;
-    }
-
-    private boolean ensureContentSpecCapacity(int chunk) {
-        try {
-            return fContentSpecType[chunk][0] == 0;
-        } catch (ArrayIndexOutOfBoundsException ex) {
-            fContentSpecType = resize(fContentSpecType, fContentSpecType.length * 2);
-            fContentSpecValue = resize(fContentSpecValue, fContentSpecValue.length * 2);
-            fContentSpecOtherValue = resize(fContentSpecOtherValue, fContentSpecOtherValue.length * 2);
-        } catch (NullPointerException ex) {
-            // ignore
-        }
-        fContentSpecType[chunk] = new short[CHUNK_SIZE];
-        fContentSpecValue[chunk] = new Object[CHUNK_SIZE];
-        fContentSpecOtherValue[chunk] = new Object[CHUNK_SIZE];
-        return true;
-    }
-
-    //
-    // Private static methods
-    //
-
-    // resize chunks
-
-    private static byte[][] resize(byte array[][], int newsize) {
-        byte newarray[][] = new byte[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-   
-    private static short[][] resize(short array[][], int newsize) {
-        short newarray[][] = new short[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    private static int[][] resize(int array[][], int newsize) {
-        int newarray[][] = new int[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    private static DatatypeValidator[][] resize(DatatypeValidator array[][], int newsize) {
-        DatatypeValidator newarray[][] = new DatatypeValidator[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    private static ContentModelValidator[][] resize(ContentModelValidator array[][], int newsize) {
-        ContentModelValidator newarray[][] = new ContentModelValidator[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    private static Object[][] resize(Object array[][], int newsize) {
-        Object newarray[][] = new Object[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    private static QName[][] resize(QName array[][], int newsize) {
-        QName newarray[][] = new QName[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    private static String[][] resize(String array[][], int newsize) {
-        String newarray[][] = new String[newsize][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    private static String[][][] resize(String array[][][], int newsize) {
-        String newarray[][][] = new String[newsize] [][];
-        System.arraycopy(array, 0, newarray, 0, array.length);
-        return newarray;
-    }
-
-    //
-    // Classes
-    //
-    
-    /**
-     * Children list for <code>contentSpecTree</code> method.
-     *
-     * @author Eric Ye, IBM
-     */
-    private static class ChildrenList {
-        
-        //
-        // Data
-        //
-
-        /** Length. */
-        public int length = 0;
-
-        // NOTE: The following set of data is mutually exclusive. It is
-        //       written this way because Java doesn't have a native
-        //       union data structure. -Ac
-
-        /** Left and right children names. */
-        public QName[] qname = new QName[2];
-
-        /** Left and right children types. */
-        public int[] type = new int[2];
-
-    } // class ChildrenList
-
-    //
-    // Classes
-    //
-
-    /**
-     * A simple Hashtable implementation that takes a tuple (int, String, 
-     * String) as the key and a int as value.
-     *
-     * @author Eric Ye, IBM
-     * @author Andy Clark, IBM
-     */
-    protected static final class TupleHashtable {
-    
-        //
-        // Constants
-        //
-    
-        /** Initial bucket size (4). */
-        private static final int INITIAL_BUCKET_SIZE = 4;
-
-        // NOTE: Changed previous hashtable size from 512 to 101 so
-        //       that we get a better distribution for hashing. -Ac
-        /** Hashtable size (101). */
-        private static final int HASHTABLE_SIZE = 101;
-
-        //
-        // Data
-        //
-
-        private Object[][] fHashTable = new Object[HASHTABLE_SIZE][];
-
-        //
-        // Public methods
-        //
-
-        /** Associates the given value with the specified key tuple. */
-        public void put(int key1, String key2, String key3, int value) {
-
-            // REVISIT: Why +2? -Ac
-            int hash = (key1+hash(key2)+hash(key3)+2) % HASHTABLE_SIZE;
-            Object[] bucket = fHashTable[hash];
-
-            if (bucket == null) {
-                bucket = new Object[1 + 4*INITIAL_BUCKET_SIZE];
-                bucket[0] = new int[]{1};
-                bucket[1] = new int[]{key1};
-                bucket[2] = key2;
-                bucket[3] = key3;
-                bucket[4] = new int[]{value};
-                fHashTable[hash] = bucket;
-            } else {
-                int count = ((int[])bucket[0])[0];
-                int offset = 1 + 4*count;
-                if (offset == bucket.length) {
-                    int newSize = count + INITIAL_BUCKET_SIZE;
-                    Object[] newBucket = new Object[1 + 4*newSize];
-                    System.arraycopy(bucket, 0, newBucket, 0, offset);
-                    bucket = newBucket;
-                    fHashTable[hash] = bucket;
-                }
-                boolean found = false;
-                int j=1;
-                for (int i=0; i<count; i++){
-                    if ( ((int[])bucket[j])[0] == key1 && (String)bucket[j+1] == key2
-                         && (String)bucket[j+2] == key3 ) {
-                        ((int[])bucket[j+3])[0] = value;
-                        found = true;
-                        break;
-                    }
-                    j += 4;
-                }
-                if (! found) {
-                    bucket[offset++] = new int[]{key1};
-                    bucket[offset++] = key2;
-                    bucket[offset++] = key3;
-                    bucket[offset]= new int[]{value};
-                    ((int[])bucket[0])[0] = ++count;
-                }
-
-            }
-            //System.out.println("put("+key1+','+key2+','+key3+" -> "+value+')');
-            //System.out.println("get("+key1+','+key2+','+key3+") -> "+get(key1,key2,key3));
-
-        } // put(int,String,String,int)
-
-        /** Returns the value associated with the specified key tuple. */
-        public int get(int key1, String key2, String key3) {
-
-            int hash = (key1+hash(key2)+hash(key3)+2) % HASHTABLE_SIZE;
-            Object[] bucket = fHashTable[hash];
-
-            if (bucket == null) {
-                return -1;
-            }
-            int count = ((int[])bucket[0])[0];
-
-            int j=1;
-            for (int i=0; i<count; i++){
-                if ( ((int[])bucket[j])[0] == key1 && (String)bucket[j+1] == key2
-                     && (String)bucket[j+2] == key3) {
-                    return ((int[])bucket[j+3])[0];
-                }
-                j += 4;
-            }
-            return -1;
-
-        } // get(int,String,String)
-
-        //
-        // Protected methods
-        //
-
-        /** Returns a hash value for the specified symbol. */
-        protected int hash(String symbol) {
-
-            if (symbol == null) {
-                return 0;
-            }
-            int code = 0;
-            int length = symbol.length();
-            for (int i = 0; i < length; i++) {
-                code = code * 37 + symbol.charAt(i);
-            }
-            return code & 0x7FFFFFF;
-
-        } // hash(String):int
-
-    }  // class TupleHashtable
-
-    //
-    // EntityState methods
-    //
-    public boolean isEntityDeclared (String name){
-        return (getEntityDeclIndex(name)!=-1)?true:false;
-    }
-
-    public boolean isEntityUnparsed (String name){
-        int entityIndex = getEntityDeclIndex(name);
-        if (entityIndex >-1) {
-            int chunk = entityIndex >> CHUNK_SHIFT;
-            int index = entityIndex & CHUNK_MASK;
-            //for unparsed entity notation!=null
-            return (fEntityNotation[chunk][index]!=null)?true:false;
-        }
-        return false; 
-    }
-
-} // class Grammar
diff --git a/src/org/apache/xerces/impl/dtd/XMLAttributeDecl.java b/src/org/apache/xerces/impl/dtd/XMLAttributeDecl.java
deleted file mode 100644
index bc8afda..0000000
--- a/src/org/apache/xerces/impl/dtd/XMLAttributeDecl.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-import org.apache.xerces.xni.QName;
-
-/**
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @version $Id$
- */
-public class XMLAttributeDecl {
-
-    //
-    // Data
-    //
-
-    /** name */
-    public final QName name = new QName();
-
-    /** simpleType */
-    public final XMLSimpleType simpleType = new XMLSimpleType();
-
-    /** optional */
-    public boolean optional;
-
-    //
-    // Methods
-    //
-
-    /**
-     * setValues
-     * 
-     * @param name 
-     * @param simpleType 
-     * @param optional 
-     */
-    public void setValues(QName name, XMLSimpleType simpleType, boolean optional) {
-        this.name.setValues(name);
-        this.simpleType.setValues(simpleType);
-        this.optional   = optional;
-    } // setValues
-
-    /**
-     * clear
-     */
-    public void clear() {
-        this.name.clear();
-        this.simpleType.clear();
-        this.optional   = false;
-    } // clear
-
-} // class XMLAttributeDecl
diff --git a/src/org/apache/xerces/impl/dtd/XMLContentSpec.java b/src/org/apache/xerces/impl/dtd/XMLContentSpec.java
deleted file mode 100644
index 6fb2a71..0000000
--- a/src/org/apache/xerces/impl/dtd/XMLContentSpec.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-/**
- * ContentSpec really exists to aid the parser classes in implementing
- * access to the grammar.
- * <p>
- * This class is used by the DTD scanner and the validator classes,
- * allowing them to be used separately or together.  This "struct"
- * class is used to build content models for validation, where it
- * is more efficient to fetch all of the information for each of
- * these content model "fragments" than to fetch each field one at
- * a time.  Since configurations are allowed to have validators
- * without a DTD scanner (i.e. a schema validator) and a DTD scanner
- * without a validator (non-validating processor), this class can be
- * used by each without requiring the presence of the other.
- * <p>
- * When processing element declarations, the DTD scanner will build
- * up a representation of the content model using the node types that
- * are defined here.  Since a non-validating processor only needs to
- * remember the type of content model declared (i.e. ANY, EMPTY, MIXED,
- * or CHILDREN), it is free to discard the specific details of the
- * MIXED and CHILDREN content models described using this class.
- * <p>
- * In the typical case of a validating processor reading the grammar
- * of the document from a DTD, the information about the content model
- * declared will be preserved and later "compiled" into an efficient
- * form for use during element validation.  Each content spec node
- * that is saved is assigned a unique index that is used as a handle
- * for the "value" or "otherValue" fields of other content spec nodes.
- * A leaf node has a "value" that is either an index in the string
- * pool of the element type of that leaf, or a value of -1 to indicate
- * the special "#PCDATA" leaf type used in a mixed content model.
- * <p>
- * For a mixed content model, the content spec will be made up of
- * leaf and choice content spec nodes, with an optional "zero or more"
- * node.  For example, the mixed content declaration "(#PCDATA)" would
- * contain a single leaf node with a node value of -1.  A mixed content
- * declaration of "(#PCDATA|foo)*" would have a content spec consisting
- * of two leaf nodes, for the "#PCDATA" and "foo" choices, a choice node
- * with the "value" set to the index of the "#PCDATA" leaf node and the
- * "otherValue" set to the index of the "foo" leaf node, and a "zero or
- * more" node with the "value" set to the index of the choice node.  If
- * the content model has more choices, for example "(#PCDATA|a|b)*", then
- * there will be more corresponding choice and leaf nodes, the choice
- * nodes will be chained together through the "value" field with each
- * leaf node referenced by the "otherValue" field.
- * <p>
- * For element content models, there are sequence nodes and also "zero or
- * one" and "one or more" nodes.  The leaf nodes would always have a valid
- * string pool index, as the "#PCDATA" leaf is not used in the declarations
- * for element content models.
- *
- * @version $Id$
- */
-public class XMLContentSpec {
-
-    //
-    // Constants
-    //
-
-    /** 
-     * Name or #PCDATA. Leaf nodes that represent parsed character
-     * data (#PCDATA) have values of -1.
-     */
-    public static final short CONTENTSPECNODE_LEAF = 0;
-
-    /** Represents a zero or one occurence count, '?'. */
-    public static final short CONTENTSPECNODE_ZERO_OR_ONE = 1;
-
-    /** Represents a zero or more occurence count, '*'. */
-    public static final short CONTENTSPECNODE_ZERO_OR_MORE = 2;
-    
-    /** Represents a one or more occurence count, '+'. */
-    public static final short CONTENTSPECNODE_ONE_OR_MORE = 3;
-    
-    /** Represents choice, '|'. */
-    public static final short CONTENTSPECNODE_CHOICE = 4;
-    
-    /** Represents sequence, ','. */
-    public static final short CONTENTSPECNODE_SEQ = 5;
-
-    /** 
-     * Represents any namespace specified namespace. When the element
-     * found in the document must belong to a specific namespace, 
-     * <code>otherValue</code> will contain the name of the namespace.
-     * If <code>otherValue</code> is <code>-1</code> then the element
-     * can be from any namespace.
-     * <p>
-     * Lists of valid namespaces are created from choice content spec
-     * nodes that have any content spec nodes as children.
-     */
-    public static final short CONTENTSPECNODE_ANY = 6;
-
-    /** 
-     * Represents any other namespace (XML Schema: ##other). 
-     * <p>
-     * When the content spec node type is set to CONTENTSPECNODE_ANY_OTHER, 
-     * <code>value</code> will contain the namespace that <em>cannot</em>
-     * occur.
-     */
-    public static final short CONTENTSPECNODE_ANY_OTHER = 7;
-
-    /** Represents any local element (XML Schema: ##local). */
-    public static final short CONTENTSPECNODE_ANY_LOCAL = 8;
-
-    /** prcessContent is 'lax' **/
-    public static final short CONTENTSPECNODE_ANY_LAX = 22;
-
-    public static final short CONTENTSPECNODE_ANY_OTHER_LAX = 23;
-
-    public static final short CONTENTSPECNODE_ANY_LOCAL_LAX = 24;
-
-    /** processContent is 'skip' **/
-    
-    public static final short CONTENTSPECNODE_ANY_SKIP = 38;
-
-    public static final short CONTENTSPECNODE_ANY_OTHER_SKIP = 39;
-
-    public static final short CONTENTSPECNODE_ANY_LOCAL_SKIP = 40;
-    //
-    // Data
-    //
-
-    /** 
-     * The content spec node type. 
-     *
-     * @see #CONTENTSPECNODE_LEAF
-     * @see #CONTENTSPECNODE_ZERO_OR_ONE
-     * @see #CONTENTSPECNODE_ZERO_OR_MORE
-     * @see #CONTENTSPECNODE_ONE_OR_MORE
-     * @see #CONTENTSPECNODE_CHOICE
-     * @see #CONTENTSPECNODE_SEQ
-     */
-    public short type;
-
-    /**
-     * The "left hand" value object of the content spec node.
-     * leaf name.localpart, single child for unary ops, left child for binary ops.
-     */
-    public Object value;
-
-    /**
-     * The "right hand" value of the content spec node.
-     *  leaf name.uri, right child for binary ops
-     */
-    public Object otherValue;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLContentSpec() {
-        clear();
-    }
-
-    /** Constructs a content spec with the specified values. */
-    public XMLContentSpec(short type, Object value, Object otherValue) {
-        setValues(type, value, otherValue);
-    }
-
-    /** 
-     * Constructs a content spec from the values in the specified content spec.
-     */
-    public XMLContentSpec(XMLContentSpec contentSpec) {
-        setValues(contentSpec);
-    }
-
-    /**
-     * Constructs a content spec from the values specified by the given
-     * content spec provider and identifier.
-     */
-    public XMLContentSpec(XMLContentSpec.Provider provider,
-                          int contentSpecIndex) {
-        setValues(provider, contentSpecIndex);
-    }
-
-    //
-    // Public methods
-    //
-
-    /** Clears the values. */
-    public void clear() {
-        type = -1;
-        value = null;
-        otherValue = null;
-    }
-
-    /** Sets the values. */
-    public void setValues(short type, Object value, Object otherValue) {
-        this.type = type;
-        this.value = value;
-        this.otherValue = otherValue;
-    }
-    
-    /** Sets the values of the specified content spec. */
-    public void setValues(XMLContentSpec contentSpec) {
-        type = contentSpec.type;
-        value = contentSpec.value;
-        otherValue = contentSpec.otherValue;
-    }
-
-    /**
-     * Sets the values from the values specified by the given content spec
-     * provider and identifier. If the specified content spec cannot be
-     * provided, the values of this content spec are cleared.
-     */
-    public void setValues(XMLContentSpec.Provider provider,
-                          int contentSpecIndex) {
-        if (!provider.getContentSpec(contentSpecIndex, this)) {
-            clear();
-        }
-    }
-
-
-    //
-    // Object methods
-    //
-
-    /** Returns a hash code for this node. */
-    public int hashCode() {
-        return type << 16 | 
-               value.hashCode() << 8 |
-               otherValue.hashCode();
-    }
-
-    /** Returns true if the two objects are equal. */
-    public boolean equals(Object object) {
-        if (object != null && object instanceof XMLContentSpec) {
-            XMLContentSpec contentSpec = (XMLContentSpec)object;
-            return type == contentSpec.type &&
-                   value == contentSpec.value &&
-                   otherValue == contentSpec.otherValue;
-        }
-        return false;
-    }
-
-
-    //
-    // Interfaces
-    //
-
-    /**
-     * Provides a means for walking the structure built out of 
-     * content spec "nodes". The user of this provider interface is
-     * responsible for knowing what the content spec node values
-     * "mean". If those values refer to content spec identifiers,
-     * then the user can call back into the provider to get the
-     * next content spec node in the structure.
-     */
-    public interface Provider {
-
-        //
-        // XMLContentSpec.Provider methods
-        //
-
-        /**
-         * Fills in the provided content spec structure with content spec
-         * information for a unique identifier.
-         *
-         * @param contentSpecIndex The content spec identifier. All content
-         *                         spec "nodes" have a unique identifier.
-         * @param contentSpec      The content spec struct to fill in with
-         *                         the information.
-         *
-         * @return Returns true if the contentSpecIndex was found.
-         */
-        public boolean getContentSpec(int contentSpecIndex, XMLContentSpec contentSpec);
-
-    } // interface Provider
-
-} // class XMLContentSpec
-
diff --git a/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java b/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
deleted file mode 100644
index 052044f..0000000
--- a/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java
+++ /dev/null
@@ -1,2871 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.validation.ValidationManager;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-
-import org.apache.xerces.impl.validation.EntityState;
-import org.apache.xerces.impl.dtd.models.ContentModelValidator;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidator;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactory;
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactoryImpl;
-import org.apache.xerces.impl.dv.dtd.ENTITYDatatypeValidator;
-import org.apache.xerces.impl.dv.dtd.IDDatatypeValidator;
-import org.apache.xerces.impl.dv.dtd.IDREFDatatypeValidator;
-import org.apache.xerces.impl.dv.dtd.ListDatatypeValidator;
-import org.apache.xerces.impl.dv.dtd.NOTATIONDatatypeValidator;
-import org.apache.xerces.impl.dv.dtd.InvalidDatatypeFacetException;
-import org.apache.xerces.impl.dv.dtd.InvalidDatatypeValueException;
-
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.XMLChar;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLDocumentFilter;
-import org.apache.xerces.xni.parser.XMLDTDFilter;
-import org.apache.xerces.xni.parser.XMLDTDContentModelFilter;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.StringTokenizer;
-
-/**
- * The DTD validator. The validator implements a document
- * filter: receiving document events from the scanner; validating
- * the content and structure; augmenting the InfoSet, if applicable;
- * and notifying the parser of the information resulting from the
- * validation process.
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/namespaces</li>
- *  <li>http://xml.org/sax/features/validation</li>
- *  <li>http://apache.org/xml/features/validation/dynamic</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *  <li>http://apache.org/xml/properties/internal/grammar-pool</li>
- *  <li>http://apache.org/xml/properties/internal/datatype-validator-factory</li>
- * </ul>
- *
- * @author Eric Ye, IBM
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- * @author Jeffrey Rodriguez IBM
- *
- * @version $Id$
- */
-public class XMLDTDValidator
-implements XMLComponent, 
-XMLDocumentFilter, XMLDTDFilter, XMLDTDContentModelFilter {
-
-    //
-    // Constants
-    //
-
-    /** Top level scope (-1). */
-    private static final int TOP_LEVEL_SCOPE = -1;
-
-    // feature identifiers
-
-    /** Feature identifier: namespaces. */
-    protected static final String NAMESPACES =
-    Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
-    /** Feature identifier: validation. */
-    protected static final String VALIDATION =
-    Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
-    /** Feature identifier: dynamic validation. */
-    protected static final String DYNAMIC_VALIDATION = 
-    Constants.XERCES_FEATURE_PREFIX + Constants.DYNAMIC_VALIDATION_FEATURE;
-
-    /** Feature identifier: xml schema validation */
-    protected static final String SCHEMA_VALIDATION = 
-    Constants.XERCES_FEATURE_PREFIX +Constants.SCHEMA_VALIDATION_FEATURE;
-
-    // property identifiers
-
-    /** Property identifier: symbol table. */
-    protected static final String SYMBOL_TABLE =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    /** Property identifier: error reporter. */
-    protected static final String ERROR_REPORTER =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
-    /** Property identifier: grammar pool. */
-    protected static final String GRAMMAR_POOL =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.GRAMMAR_POOL_PROPERTY;
-
-    /** Property identifier: datatype validator factory. */
-    protected static final String DATATYPE_VALIDATOR_FACTORY =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
-
-
-    protected static final String VALIDATION_MANAGER =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-    // recognized features and properties
-
-    /** Recognized features. */
-    protected static final String[] RECOGNIZED_FEATURES = {
-        NAMESPACES,
-        VALIDATION,
-        DYNAMIC_VALIDATION,
-        SCHEMA_VALIDATION
-    };
-
-    /** Recognized properties. */
-    protected static final String[] RECOGNIZED_PROPERTIES = {
-        SYMBOL_TABLE,       
-        ERROR_REPORTER,
-        GRAMMAR_POOL,       
-        DATATYPE_VALIDATOR_FACTORY,
-        VALIDATION_MANAGER
-    };
-
-    // debugging
-
-    /** Compile to true to debug attributes. */
-    private static final boolean DEBUG_ATTRIBUTES = false;
-
-    /** Compile to true to debug element children. */
-    private static final boolean DEBUG_ELEMENT_CHILDREN = false;
-
-    //        
-    // Data
-    //
-
-    // updated during reset
-    protected ValidationManager fValidationManager = null;
-
-    // features
-
-    /** Namespaces. */
-    protected boolean fNamespaces;
-
-    /** Validation. */
-    protected boolean fValidation;
-
-    /** Validation against only DTD */
-    protected boolean fDTDValidation;
-
-    /** 
-     * Dynamic validation. This state of this feature is only useful when
-     * the validation feature is set to <code>true</code>.
-     */
-    protected boolean fDynamicValidation;
-
-    // properties
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    /** Error reporter. */
-    protected XMLErrorReporter fErrorReporter;
-
-    /** Grammar pool. */
-    protected GrammarPool fGrammarPool;
-
-    /** Datatype validator factory. */
-    protected DatatypeValidatorFactory fDatatypeValidatorFactory;
-
-    // handlers
-
-    /** Document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-
-    /** DTD handler. */
-    protected XMLDTDHandler fDTDHandler;
-
-    /** DTD content model handler. */
-    protected XMLDTDContentModelHandler fDTDContentModelHandler;
-
-    // grammars
-
-    /** DTD Grammar. */
-    protected DTDGrammar fDTDGrammar;
-
-    // state
-
-    /** Perform validation. */
-    private boolean fPerformValidation;
-
-    /** Skip validation. */
-    private boolean fSkipValidation;
-
-    /** True if in an ignore conditional section of the DTD. */
-    protected boolean fInDTDIgnore;
-
-    // information regarding the current element
-
-    /** Current element name. */
-    private final QName fCurrentElement = new QName();
-
-    /** Current element index. */
-    private int fCurrentElementIndex = -1;
-
-    /** Current content spec type. */
-    private int fCurrentContentSpecType = -1;
-
-    /** The root element name. */
-    private final QName fRootElement = new QName();
-
-    /** True if seen DOCTYPE declaration. */
-    private boolean fSeenDoctypeDecl = false;
-
-    private boolean fInCDATASection = false;
-    // element stack
-
-    /** Element index stack. */
-    private int[] fElementIndexStack = new int[8];
-
-    /** Content spec type stack. */
-    private int[] fContentSpecTypeStack = new int[8];
-
-    /** Element name stack. */
-    private QName[] fElementQNamePartsStack = new QName[8];
-
-    // children list and offset stack
-
-    /** 
-     * Element children. This data structure is a growing stack that
-     * holds the children of elements from the root to the current
-     * element depth. This structure never gets "deeper" than the
-     * deepest element. Space is re-used once each element is closed.
-     * <p>
-     * <strong>Note:</strong> This is much more efficient use of memory
-     * than creating new arrays for each element depth.
-     * <p>
-     * <strong>Note:</strong> The use of this data structure is for
-     * validation "on the way out". If the validation model changes to
-     * "on the way in", then this data structure is not needed.
-     */
-    private QName[] fElementChildren = new QName[32];
-
-    /** Element children count. */
-    private int fElementChildrenLength = 0;
-
-    /** 
-     * Element children offset stack. This stack refers to offsets
-     * into the <code>fElementChildren</code> array.
-     * @see #fElementChildren
-     */
-    private int[] fElementChildrenOffsetStack = new int[32];
-
-    /** Element depth. */
-    private int fElementDepth = -1;
-
-    // validation states
-
-    /** Validation of a standalone document. */
-    private boolean fStandaloneIsYes = false;
-
-    /** True if seen the root element. */
-    private boolean fSeenRootElement = false;
-
-    /** True if inside of element content. */
-    private boolean fInElementContent = false;
-
-    /** Mixed. */
-    private boolean fMixed;
-
-    // temporary variables
-
-    /** Temporary element declaration. */
-    private XMLElementDecl fTempElementDecl = new XMLElementDecl();
-
-    /** Temporary atribute declaration. */
-    private XMLAttributeDecl fTempAttDecl = new XMLAttributeDecl();
-
-    /** Temporary entity declaration. */
-    private XMLEntityDecl fEntityDecl = new XMLEntityDecl();
-
-    /** Temporary qualified name. */
-    private QName fTempQName = new QName();
-
-    /** Temporary string buffer for buffering datatype value. */
-    //private StringBuffer fDatatypeBuffer = new StringBuffer();
-
-    /** Notation declaration hash. */
-    private Hashtable fNDataDeclNotations = new Hashtable();
-
-    /** DTD element declaration name. */
-    private String fDTDElementDeclName = null;
-
-    /** Mixed element type "hash". */
-    private Vector fMixedElementTypes = new Vector();
-
-    /** Element declarations in DTD. */
-    private Vector fDTDElementDecls = new Vector();
-
-    /** Temporary string buffers. */
-    private StringBuffer fBuffer = new StringBuffer();
-
-    // symbols: general
-
-    /** Symbol: "EMPTY". */
-    private String fEMPTYSymbol;
-
-    /** Symbol: "ANY". */
-    private String fANYSymbol;
-
-    /** Symbol: "MIXED". */
-    private String fMIXEDSymbol;
-
-    /** Symbol: "CHILDREN". */
-    private String fCHILDRENSymbol;
-
-    // symbols: DTD datatype
-
-    /** Symbol: "CDATA". */
-    private String fCDATASymbol;
-
-    /** Symbol: "ID". */
-    private String fIDSymbol;
-
-    /** Symbol: "IDREF". */
-    private String fIDREFSymbol;
-
-    /** Symbol: "IDREFS". */
-    private String fIDREFSSymbol;
-
-    /** Symbol: "ENTITY". */
-    private String fENTITYSymbol;
-
-    /** Symbol: "ENTITIES". */
-    private String fENTITIESSymbol;
-
-    /** Symbol: "NMTOKEN". */
-    private String fNMTOKENSymbol;
-
-    /** Symbol: "NMTOKENS". */
-    private String fNMTOKENSSymbol;
-
-    /** Symbol: "NOTATION". */
-    private String fNOTATIONSymbol;
-
-    /** Symbol: "ENUMERATION". */
-    private String fENUMERATIONSymbol;
-
-    /** Symbol: "#IMPLIED. */
-    private String fIMPLIEDSymbol;
-
-    /** Symbol: "#REQUIRED". */
-    private String fREQUIREDSymbol;
-
-    /** Symbol: "#FIXED". */
-    private String fFIXEDSymbol;
-
-    /** Symbol: "&lt;&lt;datatypes>>". */
-    private String fDATATYPESymbol;
-
-    // attribute validators
-
-    /** Datatype validator: ID. */
-    private IDDatatypeValidator fValID;
-
-    /** Datatype validator: IDREF. */
-    private IDREFDatatypeValidator fValIDRef;
-
-    /** Datatype validator: IDREFS. */
-    private ListDatatypeValidator fValIDRefs;
-
-    /** Datatype validator: ENTITY. */
-    private ENTITYDatatypeValidator fValENTITY;
-
-    /** Datatype validator: ENTITIES. */
-    private ListDatatypeValidator fValENTITIES;
-
-    /** Datatype validator: NMTOKEN. */
-    private DatatypeValidator fValNMTOKEN;
-
-    /** Datatype validator: NMTOKENS. */
-    private DatatypeValidator fValNMTOKENS;
-
-    /** Datatype validator: NOTATION. */
-    private NOTATIONDatatypeValidator fValNOTATION;
-
-    /**
-     * This table has to be own by instance of XMLValidator and shared
-     * among ID, IDREF and IDREFS. 
-     * <p>
-     * <strong>Note:</strong> Only ID has read/write access.
-     * <p>
-     * <strong>Note:</strong> Should revisit and replace with a ligther
-     * structure.
-     */
-    private Hashtable fTableOfIDs; 
-
-    // to check for duplicate ID or ANNOTATION attribute declare in
-    // ATTLIST, and misc VCs
-
-    /** ID attribute names. */
-    private Hashtable fTableOfIDAttributeNames;
-
-    /** NOTATION attribute names. */
-    private Hashtable fTableOfNOTATIONAttributeNames;
-
-    /** NOTATION enumeration values. */
-    private Hashtable fNotationEnumVals;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLDTDValidator() {
-
-        // initialize data
-        for (int i = 0; i < fElementQNamePartsStack.length; i++) {
-            fElementQNamePartsStack[i] = new QName();
-        }
-
-    } // <init>()
-
-    //
-    // XMLComponent methods
-    //
-
-    /*
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     * 
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Thrown by component on finitialization error.
-     *                      For example, if a feature or property is
-     *                      required for the operation of the component, the
-     *                      component manager may throw a 
-     *                      SAXNotRecognizedException or a
-     *                      SAXNotSupportedException.
-     */
-    public void reset(XMLComponentManager componentManager)
-    throws XMLConfigurationException {
-
-        // clear grammars
-        fDTDGrammar = null;
-        fSeenDoctypeDecl = false;
-        fInCDATASection = false;
-        // initialize state
-        fInDTDIgnore = false;
-        fStandaloneIsYes = false;
-        fSeenRootElement = false;
-        fInElementContent = false;
-        fCurrentElementIndex = -1;
-        fCurrentContentSpecType = -1;
-        fSkipValidation=false;
-
-        fRootElement.clear();
-
-        fNDataDeclNotations.clear();
-
-        // sax features
-        try {
-            fNamespaces = componentManager.getFeature(NAMESPACES);
-        }
-        catch (XMLConfigurationException e) {
-            fNamespaces = true;
-        }
-        try {
-            fValidation = componentManager.getFeature(VALIDATION);
-        }
-        catch (XMLConfigurationException e) {
-            fValidation = false;
-        }
-        try {
-            fDTDValidation = !(componentManager.getFeature(SCHEMA_VALIDATION));
-        }
-        catch (XMLConfigurationException e) {
-            fValidation = false;
-        }
-
-        // Xerces features
-        try {
-            fDynamicValidation = componentManager.getFeature(DYNAMIC_VALIDATION);
-        }
-        catch (XMLConfigurationException e) {
-            fDynamicValidation = false;
-        }
-
-        fValidationManager= (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER);
-        fValidationManager.reset();
-        // get needed components
-        fErrorReporter = (XMLErrorReporter)componentManager.getProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.ERROR_REPORTER_PROPERTY);
-        fSymbolTable = (SymbolTable)componentManager.getProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY);
-        fGrammarPool = (GrammarPool)componentManager.getProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.GRAMMAR_POOL_PROPERTY);
-        fDatatypeValidatorFactory = (DatatypeValidatorFactory)componentManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY);
-
-        fElementDepth = -1;                      
-        init();
-
-    } // reset(XMLComponentManager)
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     * 
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-    throws XMLConfigurationException {
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     * 
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setProperty(String propertyId, Object value)
-    throws XMLConfigurationException {
-    } // setProperty(String,Object)
-
-    //
-    // XMLDocumentSource methods
-    //
-
-    /**
-     * Sets the document handler to receive information about the document.
-     * 
-     * @param documentHandler The document handler.
-     */
-    public void setDocumentHandler(XMLDocumentHandler documentHandler) {
-        fDocumentHandler = documentHandler;
-    } // setDocumentHandler(XMLDocumentHandler)
-
-    //
-    // XMLDTDSource methods
-    //
-
-    /**
-     * Sets the DTD handler.
-     * 
-     * @param dtdHandler The DTD handler.
-     */
-    public void setDTDHandler(XMLDTDHandler dtdHandler) {
-        fDTDHandler = dtdHandler;
-    } // setDTDHandler(XMLDTDHandler)
-
-    //
-    // XMLDTDContentModelSource methods
-    //
-
-    /**
-     * Sets the DTD content model handler.
-     * 
-     * @param dtdContentModelHandler The DTD content model handler.
-     */
-    public void setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler) {
-        fDTDContentModelHandler = dtdContentModelHandler;
-    } // setDTDContentModelHandler(XMLDTDContentModelHandler)
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * The start of the document.
-     *
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs   Additional information that may include infoset augmentations
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs) 
-    throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startDocument(locator, encoding, augs);
-        }
-
-    } // startDocument(XMLLocator,String)
-
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     * 
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.     
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
-    throws XNIException {
-
-        // save standalone state
-        fStandaloneIsYes = standalone != null && standalone.equals("yes");
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
-        }
-
-    } // xmlDecl(String,String,String)
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     * 
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     *                    otherwise.     
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement, String publicId, String systemId, 
-                            Augmentations augs)
-    throws XNIException {
-
-        // save root element state
-        fSeenDoctypeDecl = true;
-        fRootElement.setValues(null, rootElement, rootElement, null);
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
-        }
-
-    } // doctypeDecl(String,String,String)
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.     
-     * @param augs   Additional information that may include infoset augmentations
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-    throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
-        }
-
-    } // startPrefixMapping(String,String)
-
-    /**
-     * The start of an element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.     
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-    throws XNIException {
-
-        handleStartElement(element, attributes);
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(element, attributes, augs);
-
-        }
-
-    } // startElement(QName,XMLAttributes)
-
-    /**
-     * An empty element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.     
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-    throws XNIException {
-
-        handleStartElement(element, attributes);
-
-        if (fDocumentHandler !=null) {
-            fDocumentHandler.emptyElement(element, attributes, augs);
-        }
-
-        handleEndElement(element, augs, true);
-
-    } // emptyElement(QName,XMLAttributes)
-
-    /**
-     * Character content.
-     * 
-     * @param text The content.
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-
-        boolean callNextCharacters = true;
-
-        // REVISIT: [Q] Is there a more efficient way of doing this?
-        //          Perhaps if the scanner told us so we don't have to
-        //          look at the characters again. -Ac
-        boolean allWhiteSpace = true;
-        for (int i=text.offset; i< text.offset+text.length; i++) {
-            if (!XMLChar.isSpace(text.ch[i])) {
-                allWhiteSpace = false;
-                break;
-            }
-        }
-        // call the ignoreableWhiteSpace callback
-        // never call ignorableWhitespace if we are in cdata section
-        if (fInElementContent && allWhiteSpace && !fInCDATASection) {
-            if (fDocumentHandler != null) {
-                fDocumentHandler.ignorableWhitespace(text, augs);
-                callNextCharacters = false;
-            }
-        }
-
-        // validate
-        if (fPerformValidation) {
-            if (fInElementContent) {
-                if (fStandaloneIsYes &&
-                    fDTDGrammar.getElementDeclIsExternal(fCurrentElementIndex)) {
-                    if (allWhiteSpace) {
-                        fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
-                                                    "MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE",
-                                                    null, XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-                if (!allWhiteSpace) {
-                    charDataInContent();
-                }
-            }
-
-            if (fCurrentContentSpecType == XMLElementDecl.TYPE_EMPTY) {
-                charDataInContent();
-            }
-        }
-
-        // call handlers
-        if (callNextCharacters && fDocumentHandler != null) {
-            fDocumentHandler.characters(text, augs);
-        }
-
-    } // characters(XMLString)
-
-
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     * 
-     * @param text The ignorable whitespace.
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.ignorableWhitespace(text, augs);
-        }
-
-    } // ignorableWhitespace(XMLString)
-
-    /**
-     * The end of an element.
-     * 
-     * @param element The name of the element.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-
-        handleEndElement(element,  augs, false);
-
-    } // endElement(QName)
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endPrefixMapping(prefix, augs);
-        }
-
-    } // endPrefixMapping(String)
-
-    /** 
-     * The start of a CDATA section. 
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-
-        if (fPerformValidation && fInElementContent) {
-            charDataInContent();
-        }
-        fInCDATASection = true;
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startCDATA(augs);
-        }
-
-    } // startCDATA()
-
-    /**
-     * The end of a CDATA section. 
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException {
-
-        fInCDATASection = false;
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endCDATA(augs);
-        }
-
-    } // endCDATA()
-
-    /**
-     * The end of the document.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endDocument(augs);
-        }
-
-    } // endDocument()
-
-    //
-    // XMLDocumentHandler and XMLDTDHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and 
-     * general entity names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding, 
-                            Augmentations augs) throws XNIException {
-
-        // check VC: Standalone Document Declartion, entities references appear in the document.
-        if (fPerformValidation && fDTDGrammar != null) {
-            if (fStandaloneIsYes && !name.startsWith("[")) {
-                int entIndex = fDTDGrammar.getEntityDeclIndex(name);
-                if (entIndex > -1) {
-                    fDTDGrammar.getEntityDecl(entIndex, fEntityDecl);
-                    if (fEntityDecl.inExternal) {
-                        fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
-                                                    "MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE",
-                                                    new Object[]{name}, XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-            }
-        }
-
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startEntity(name, publicId, systemId, 
-                                         baseSystemId, encoding, augs);
-        }
-
-
-    } // startEntity(String,String,String,String,String, Augmentations)
-
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     * @param augs     Additional information that may include infoset augmentations
-     *                 
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
-
-        if (fDocumentHandler != null) {
-            fDocumentHandler.textDecl(version, encoding, augs);
-        }
-
-    } // textDecl(String,String)
-
-
-    /**
-     * A comment.
-     * 
-     * @param text The text in the comment.
-     *
-     * @param augs   Additional information that may include infoset augmentations
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.comment(text, augs);
-        }
-
-    } // comment(XMLString)
-
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.     
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-    throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.processingInstruction(target, data, augs);
-        }
-    } // processingInstruction(String,XMLString)
-
-
-    /**
-     * This method notifies the end of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name   The name of the entity.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endEntity(name, augs);
-        }
-
-    } // endEntity(String)
-
-
-
-    //
-    // XMLDTDHandler methods
-    //
-
-    /**
-     * The start of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDTD(XMLLocator locator) throws XNIException {
-
-        // initialize state
-        fNDataDeclNotations.clear();
-        fDTDElementDecls.removeAllElements();
-
-        // create DTD grammar
-        fDTDGrammar = createDTDGrammar();
-        //fDTDGrammar.setDatatypeValidatorFactory(fDatatypeValidatorFactory);
-        // REVISIT: should we use the systemId as the key instead?
-        fGrammarPool.putGrammar("", fDTDGrammar);
-
-        // call handlers
-        fDTDGrammar.startDTD(locator);
-        if (fDTDHandler != null) {
-            fDTDHandler.startDTD(locator);
-        }
-
-    } // startDTD(XMLLocator)
-
-    /**
- * A comment.
- * 
- * @param text The text in the comment.
- *
- * @throws XNIException Thrown by application to signal an error.
- */
-    public void comment(XMLString text) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.comment(text);
-        if (fDTDHandler != null) {
-            fDTDHandler.comment(text);
-        }
-    }  
-
-    /**
-     * Character content.
-     * 
-     * @param text The content.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text) throws XNIException {
-
-        // ignored characters in DTD
-        if (fDTDHandler != null) {
-            fDTDHandler.characters(text);
-        }
-    }
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method is only called for external
-     * parameter entities referenced in the DTD.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.textDecl(version, encoding);
-        if (fDTDHandler != null) {
-            fDTDHandler.textDecl(version, encoding);
-        }
-    }
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the 
-     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.startEntity(name, publicId, systemId, 
-                                baseSystemId, encoding);
-        if (fDTDHandler != null) {
-            fDTDHandler.startEntity(name, publicId, systemId, 
-                                    baseSystemId, encoding);
-        }
-    }
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" and parameter entity names start with '%'.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.endEntity(name);
-        if (fDTDHandler != null) {
-            fDTDHandler.endEntity(name);
-        }
-    } 
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data)
-    throws XNIException {
-
-        // call handlers
-        fDTDGrammar.processingInstruction(target, data);
-        if (fDTDHandler != null) {
-            fDTDHandler.processingInstruction(target, data);
-        }
-    } 
-    /**
-     * An element declaration.
-     * 
-     * @param name         The name of the element.
-     * @param contentModel The element content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void elementDecl(String name, String contentModel)
-    throws XNIException {
-
-        //check VC: Unique Element Declaration
-        if (fValidation) {
-            if (fDTDElementDecls.contains(name)) {
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                           "MSG_ELEMENT_ALREADY_DECLARED",
-                                           new Object[]{ name},
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }
-            else {
-                fDTDElementDecls.addElement(name);
-            }
-        }
-
-        // call handlers
-        fDTDGrammar.elementDecl(name, contentModel);
-        if (fDTDHandler != null) {
-            fDTDHandler.elementDecl(name, contentModel);
-        }
-
-    } // elementDecl(String,String)
-
-    /**
-     * The start of an attribute list.
-     * 
-     * @param elementName The name of the element that this attribute
-     *                    list is associated with.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startAttlist(String elementName) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.startAttlist(elementName);
-        if (fDTDHandler != null) {
-            fDTDHandler.startAttlist(elementName);
-        }
-
-    } // startAttlist(String)
-
-    /**
-     * An attribute declaration.
-     * 
-     * @param elementName   The name of the element that this attribute
-     *                      is associated with.
-     * @param attributeName The name of the attribute.
-     * @param type          The attribute type. This value will be one of
-     *                      the following: "CDATA", "ENTITY", "ENTITIES",
-     *                      "ENUMERATION", "ID", "IDREF", "IDREFS", 
-     *                      "NMTOKEN", "NMTOKENS", or "NOTATION".
-     * @param enumeration   If the type has the value "ENUMERATION", this
-     *                      array holds the allowed attribute values;
-     *                      otherwise, this array is null.
-     * @param defaultType   The attribute default type. This value will be
-     *                      one of the following: "#FIXED", "#IMPLIED",
-     *                      "#REQUIRED", or null.
-     * @param defaultValue  The attribute default value, or null if no
-     *                      default value is specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void attributeDecl(String elementName, String attributeName, 
-                              String type, String[] enumeration, 
-                              String defaultType, XMLString defaultValue)
-    throws XNIException {
-
-        if (type != fCDATASymbol && defaultValue != null) {
-            normalizeDefaultAttrValue(defaultValue);
-        }
-
-        if (fValidation) {
-            //
-            // a) VC: One ID per Element Type, If duplicate ID attribute
-            // b) VC: ID attribute Default. if there is a declareared attribute
-            //        default for ID it should be of type #IMPLIED or #REQUIRED
-            if (type == fIDSymbol) {
-                if (defaultValue != null && defaultValue.length != 0) {
-                    if (defaultType == null || 
-                        !(defaultType == fIMPLIEDSymbol ||
-                          defaultType == fREQUIREDSymbol)) {
-                        fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                                   "IDDefaultTypeInvalid",
-                                                   new Object[]{ attributeName},
-                                                   XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-
-                if (!fTableOfIDAttributeNames.containsKey(elementName)) {
-                    fTableOfIDAttributeNames.put(elementName, attributeName);
-                }
-                else {
-                    String previousIDAttributeName = (String)fTableOfIDAttributeNames.get( elementName );//rule a)
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_MORE_THAN_ONE_ID_ATTRIBUTE",
-                                               new Object[]{ elementName, previousIDAttributeName, attributeName},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-
-            //
-            //  VC: One Notaion Per Element Type, should check if there is a
-            //      duplicate NOTATION attribute
-
-            if (type == fNOTATIONSymbol) {
-                // VC: Notation Attributes: all notation names in the
-                //     (attribute) declaration must be declared.
-                for (int i=0; i<enumeration.length; i++) {
-                    fNotationEnumVals.put(enumeration[i], attributeName);
-                }
-
-                if (fTableOfNOTATIONAttributeNames.containsKey( elementName ) == false) {
-                    fTableOfNOTATIONAttributeNames.put( elementName, attributeName);
-                }
-                else {
-                    String previousNOTATIONAttributeName = (String) fTableOfNOTATIONAttributeNames.get( elementName );
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE",
-                                               new Object[]{ elementName, previousNOTATIONAttributeName, attributeName},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-
-            // VC: Attribute Default Legal
-            boolean ok = true;
-            if (defaultValue != null && 
-                (defaultType == null ||
-                 (defaultType != null && defaultType == fFIXEDSymbol))) {
-
-                String value = defaultValue.toString();
-                if (type == fNMTOKENSSymbol ||
-                    type == fENTITIESSymbol || type == fIDREFSSymbol) {
-
-                    StringTokenizer tokenizer = new StringTokenizer(value);
-                    if (tokenizer.hasMoreTokens()) {
-                        while (true) {
-                            String nmtoken = tokenizer.nextToken();
-                            if (type == fNMTOKENSSymbol) {
-                                if (!XMLChar.isValidNmtoken(nmtoken)) {
-                                    ok = false;
-                                    break;
-                                }
-                            }
-                            else if (type == fENTITIESSymbol ||
-                                     type == fIDREFSSymbol) {
-                                if (!XMLChar.isValidName(nmtoken)) {
-                                    ok = false;
-                                    break;
-                                }
-                            }
-                            if (!tokenizer.hasMoreTokens()) {
-                                break;
-                            }
-                        }
-                    }
-
-                }
-                else {
-                    if (type == fENTITYSymbol ||
-                        type == fIDSymbol ||
-                        type == fIDREFSymbol ||
-                        type == fNOTATIONSymbol) {
-
-                        if (!XMLChar.isValidName(value)) {
-                            ok = false;
-                        }
-
-                    }
-                    else if (type == fNMTOKENSymbol ||
-                             type == fENUMERATIONSymbol) {
-
-                        if (!XMLChar.isValidNmtoken(value)) {
-                            ok = false;
-                        }
-                    }
-
-                    if (type == fNOTATIONSymbol ||
-                        type == fENUMERATIONSymbol) {
-                        ok = false;
-                        for (int i=0; i<enumeration.length; i++) {
-                            if (defaultValue.equals(enumeration[i])) {
-                                ok = true;
-                            }
-                        }
-                    }
-
-                }
-                if (!ok) {
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_ATT_DEFAULT_INVALID",
-                                               new Object[]{attributeName, value},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-        }
-
-        // call handlers
-        fDTDGrammar.attributeDecl(elementName, attributeName, 
-                                  type, enumeration,
-                                  defaultType, defaultValue);
-        if (fDTDHandler != null) {
-            fDTDHandler.attributeDecl(elementName, attributeName, 
-                                      type, enumeration, 
-                                      defaultType, defaultValue);
-        }
-
-    } // attributeDecl(String,String,String,String[],String,XMLString)
-
-    /**
-     * The end of an attribute list.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endAttlist() throws XNIException {
-
-        // call handlers
-        fDTDGrammar.endAttlist();
-        if (fDTDHandler != null) {
-            fDTDHandler.endAttlist();
-        }
-
-    } // endAttlist()
-
-    /**
-     * An internal entity declaration.
-     * 
-     * @param name The name of the entity. Parameter entity names start with
-     *             '%', whereas the name of a general entity is just the 
-     *             entity name.
-     * @param text The value of the entity.
-     * @param nonNormalizedText The non-normalized value of the entity. This
-     *             value contains the same sequence of characters that was in 
-     *             the internal entity declaration, without any entity
-     *             references expanded.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void internalEntityDecl(String name, XMLString text,
-                                   XMLString nonNormalizedText) 
-    throws XNIException {
-
-        // call handlers
-        fDTDGrammar.internalEntityDecl(name, text, nonNormalizedText);
-        if (fDTDHandler != null) {
-            fDTDHandler.internalEntityDecl(name, text, nonNormalizedText);
-        }
-
-    } // internalEntityDecl(String,XMLString,XMLString)
-
-    /**
-     * An external entity declaration.
-     * 
-     * @param name     The name of the entity. Parameter entity names start
-     *                 with '%', whereas the name of a general entity is just
-     *                 the entity name.
-     * @param publicId The public identifier of the entity or null if the
-     *                 the entity was specified with SYSTEM.
-     * @param systemId The system identifier of the entity.
-     * @param baseSystemId The base system identifier of where the entity
-     *                     is declared.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void externalEntityDecl(String name, 
-                                   String publicId, String systemId,
-                                   String baseSystemId) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.externalEntityDecl(name, publicId, systemId, baseSystemId);
-        if (fDTDHandler != null) {
-            fDTDHandler.externalEntityDecl(name, publicId, systemId,
-                                           baseSystemId);
-        }
-
-    } // externalEntityDecl(String,String,String,String)
-
-    /**
-     * An unparsed entity declaration.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the entity, or null if not
-     *                 specified.
-     * @param notation The name of the notation.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void unparsedEntityDecl(String name, 
-                                   String publicId, String systemId, 
-                                   String notation) throws XNIException {
-
-        // VC: Notation declared,  in the production of NDataDecl
-        if (fValidation) {
-            fNDataDeclNotations.put(name, notation);
-        }
-
-        // call handlers
-        fDTDGrammar.unparsedEntityDecl(name, publicId, systemId, notation);
-        if (fDTDHandler != null) {
-            fDTDHandler.unparsedEntityDecl(name, publicId, systemId, notation);
-        }
-
-    } // unparsedEntityDecl(String,String,String,String)
-
-    /**
-     * A notation declaration
-     * 
-     * @param name     The name of the notation.
-     * @param publicId The public identifier of the notation, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the notation, or null if not
-     *                 specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void notationDecl(String name, String publicId, String systemId)
-    throws XNIException {
-
-        // call handlers
-        fDTDGrammar.notationDecl(name, publicId, systemId);
-        if (fDTDHandler != null) {
-            fDTDHandler.notationDecl(name, publicId, systemId);
-        }
-
-    } // notationDecl(String,String,String)
-
-    /**
-     * The start of a conditional section.
-     * 
-     * @param type The type of the conditional section. This value will
-     *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see XMLDTDHandler#CONDITIONAL_INCLUDE
-     * @see XMLDTDHandler#CONDITIONAL_IGNORE
-     */
-    public void startConditional(short type) throws XNIException {
-
-        // set state
-        fInDTDIgnore = type == XMLDTDHandler.CONDITIONAL_IGNORE;
-
-        // call handlers
-        fDTDGrammar.startConditional(type);
-        if (fDTDHandler != null) {
-            fDTDHandler.startConditional(type);
-        }
-
-    } // startConditional(short)
-
-    /**
-     * The end of a conditional section.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endConditional() throws XNIException {
-
-        // set state
-        fInDTDIgnore = false;
-
-        // call handlers
-        fDTDGrammar.endConditional();
-        if (fDTDHandler != null) {
-            fDTDHandler.endConditional();
-        }
-
-    } // endConditional()
-
-    /**
-     * The end of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDTD() throws XNIException {
-
-        // save grammar
-        fDTDGrammar.endDTD();
-
-        // check VC: Notation declared,  in the production of NDataDecl
-        if (fValidation) {
-
-            fValENTITY.initialize(fDTDGrammar);//Initialize ENTITY, ENTITIES validators 
-            fValENTITIES.initialize(fDTDGrammar);
-
-            // VC : Notation Declared. for external entity declaration [Production 76].
-            Enumeration entities = fNDataDeclNotations.keys();
-            while (entities.hasMoreElements()) {
-                String entity = (String) entities.nextElement();
-                String notation = (String) fNDataDeclNotations.get(entity);
-                if (fDTDGrammar.getNotationDeclIndex(notation) == -1) {
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL",
-                                               new Object[]{entity, notation},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-
-            // VC: Notation Attributes:
-            //     all notation names in the (attribute) declaration must be declared.
-            Enumeration notationVals = fNotationEnumVals.keys();
-            while (notationVals.hasMoreElements()) {
-                String notation = (String) notationVals.nextElement();
-                String attributeName = (String) fNotationEnumVals.get(notation);
-                if (fDTDGrammar.getNotationDeclIndex(notation) == -1) {
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE",
-                                               new Object[]{attributeName, notation},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-
-            fTableOfIDAttributeNames = null;//should be safe to release these references
-            fTableOfNOTATIONAttributeNames = null;
-        }
-
-        // call handlers
-        if (fDTDHandler != null) {
-            fDTDHandler.endDTD();
-        }
-
-    } // endDTD()
-
-    //
-    // XMLDTDContentModelHandler methods
-    //
-
-    /** Start content model. */
-    public void startContentModel(String elementName) throws XNIException {
-
-        if (fValidation) {
-            fDTDElementDeclName = elementName;
-            fMixedElementTypes.removeAllElements();
-        }
-
-        // call handlers
-        fDTDGrammar.startContentModel(elementName);
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.startContentModel(elementName);
-        }
-
-    } // startContentModel(String)
-
-    /** ANY. */
-    public void any() throws XNIException {
-        fDTDGrammar.any();
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.any();
-        }
-    } // any()
-
-    /** EMPTY. */
-    public void empty() throws XNIException {
-        fDTDGrammar.empty();
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.empty();
-        }
-    } // empty()
-
-    /** Start group. */
-    public void startGroup() throws XNIException {
-
-        fMixed = false;
-        // call handlers
-        fDTDGrammar.startGroup();
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.startGroup();
-        }
-
-    } // startGroup()
-
-    /** #PCDATA. */
-    public void pcdata() {
-        fMixed = true;
-        fDTDGrammar.pcdata();
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.pcdata();
-        }
-    } // pcdata()
-
-    /** Element. */
-    public void element(String elementName) throws XNIException {
-
-        // check VC: No duplicate Types, in a single mixed-content declaration
-        if (fMixed && fValidation) {
-            if (fMixedElementTypes.contains(elementName)) {
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                           "DuplicateTypeInMixedContent",
-                                           new Object[]{fDTDElementDeclName, elementName},
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }
-            else {
-                fMixedElementTypes.addElement(elementName);
-            }
-        }
-
-        // call handlers
-        fDTDGrammar.element(elementName);
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.element(elementName);
-        }
-
-    } // childrenElement(String)
-
-    /** Separator. */
-    public void separator(short separator) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.separator(separator);
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.separator(separator);
-        }
-
-    } // separator(short)
-
-    /** Occurrence. */
-    public void occurrence(short occurrence) throws XNIException {
-
-        // call handlers
-        fDTDGrammar.occurrence(occurrence);
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.occurrence(occurrence);
-        }
-
-    } // occurrence(short)
-
-    /** End group. */
-    public void endGroup() throws XNIException {
-
-        // call handlers
-        fDTDGrammar.endGroup();
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.endGroup();
-        }
-
-    } // endGroup()
-
-    /** End content model. */
-    public void endContentModel() throws XNIException {
-
-        // call handlers
-        fDTDGrammar.endContentModel();
-        if (fDTDContentModelHandler != null) {
-            fDTDContentModelHandler.endContentModel();
-        }
-
-    } // endContentModel()
-
-    //
-    // Private methods
-    //
-
-    /** Add default attributes and validate. */
-    private void addDTDDefaultAttrsAndValidate(int elementIndex, 
-                                               XMLAttributes attributes) 
-    throws XNIException {
-
-        // is there anything to do?
-        if (elementIndex == -1 || fDTDGrammar == null) {
-            return;
-        }
-
-        // get element info
-        fDTDGrammar.getElementDecl(elementIndex,fTempElementDecl);
-        QName element = fTempElementDecl.name;
-
-        //
-        // Check after all specified attrs are scanned
-        // (1) report error for REQUIRED attrs that are missing (V_TAGc)
-        // (2) add default attrs (FIXED and NOT_FIXED)
-        //
-        int attlistIndex = fDTDGrammar.getFirstAttributeDeclIndex(elementIndex);
-
-        while (attlistIndex != -1) {
-
-            fDTDGrammar.getAttributeDecl(attlistIndex, fTempAttDecl);
-
-            if (DEBUG_ATTRIBUTES) {
-                if (fTempAttDecl != null) {
-                    XMLElementDecl elementDecl = new XMLElementDecl();
-                    fDTDGrammar.getElementDecl(elementIndex, elementDecl);
-                    System.out.println("element: "+(elementDecl.name.localpart));
-                    System.out.println("attlistIndex " + attlistIndex + "\n"+
-                                       "attName : '"+(fTempAttDecl.name.localpart) + "'\n"
-                                       + "attType : "+fTempAttDecl.simpleType.type + "\n"
-                                       + "attDefaultType : "+fTempAttDecl.simpleType.defaultType + "\n"
-                                       + "attDefaultValue : '"+fTempAttDecl.simpleType.defaultValue + "'\n"
-                                       + attributes.getLength() +"\n"
-                                      );
-                }
-            }
-            String attPrefix = fTempAttDecl.name.prefix;
-            String attLocalpart = fTempAttDecl.name.localpart;
-            String attRawName = fTempAttDecl.name.rawname;
-            String attType = getAttributeTypeName(fTempAttDecl);
-            int attDefaultType =fTempAttDecl.simpleType.defaultType;
-            String attValue = null;
-
-            if (fTempAttDecl.simpleType.defaultValue != null) {
-                attValue = fTempAttDecl.simpleType.defaultValue;
-            }
-            boolean specified = false;
-            boolean required = attDefaultType == XMLSimpleType.DEFAULT_TYPE_REQUIRED;
-            boolean cdata = attType == fCDATASymbol;
-
-            if (!cdata || required || attValue != null) {
-                int attrCount = attributes.getLength();
-                for (int i = 0; i < attrCount; i++) {
-                    if (attributes.getQName(i) == attRawName) {
-                        specified = true;
-                        break;
-                    }
-                }
-            }
-
-            if (!specified) {
-                if (required) {
-                    if (fValidation) {
-                        Object[] args = {element.localpart, attRawName};
-                        fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                                   "MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED", args,
-                                                   XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-                else if (attValue != null) {
-                    if (fPerformValidation && fStandaloneIsYes) {
-                        if (fDTDGrammar.getAttributeDeclIsExternal(attlistIndex)) {
-
-                            Object[] args = { element.localpart, attRawName};
-                            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                                       "MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED", args,
-                                                       XMLErrorReporter.SEVERITY_ERROR);
-                        }
-                    }
-
-                    // add namespace information
-                    if (fNamespaces) {
-                        int index = attRawName.indexOf(':');
-                        if (index != -1) {
-                            attPrefix = attRawName.substring(0, index);
-                            attPrefix = fSymbolTable.addSymbol(attPrefix);
-                            attLocalpart = attRawName.substring(index + 1);
-                            attLocalpart = fSymbolTable.addSymbol(attLocalpart);
-                        }
-                    }
-
-                    // add attribute
-                    fTempQName.setValues(attPrefix, attLocalpart, attRawName, fTempAttDecl.name.uri);
-                    int newAttr = attributes.addAttribute(fTempQName, attType, attValue);
-                }
-            }
-            // get next att decl in the Grammar for this element
-            attlistIndex = fDTDGrammar.getNextAttributeDeclIndex(attlistIndex);
-        }
-
-        // now iterate through the expanded attributes for
-        // 1. if every attribute seen is declared in the DTD
-        // 2. check if the VC: default_fixed holds
-        // 3. validate every attribute.
-        int attrCount = attributes.getLength();
-        for (int i = 0; i < attrCount; i++) {
-            String attrRawName = attributes.getQName(i);
-            boolean declared = false;
-            if (fPerformValidation) {
-                if (fStandaloneIsYes) {
-                    // check VC: Standalone Document Declaration, entities
-                    // references appear in the document.
-                    // REVISIT: this can be combined to a single check in
-                    // startEntity if we add one more argument in
-                    // startEnity, inAttrValue
-                    String nonNormalizedValue = attributes.getNonNormalizedValue(i);
-                    if (nonNormalizedValue != null) {
-                        String entityName = getExternalEntityRefInAttrValue(nonNormalizedValue);
-                        if (entityName != null) {
-                            fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                                       "MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE",
-                                                       new Object[]{entityName},
-                                                       XMLErrorReporter.SEVERITY_ERROR);
-                        }
-                    }
-                }
-            }
-            int attDefIndex = -1;
-            int position =
-            fDTDGrammar.getFirstAttributeDeclIndex(elementIndex);
-            while (position != -1) {
-                fDTDGrammar.getAttributeDecl(position, fTempAttDecl);
-                if (fTempAttDecl.name.rawname == attrRawName) {
-                    // found the match att decl, 
-                    attDefIndex = position;
-                    declared = true;
-                    break;
-                }
-                position = fDTDGrammar.getNextAttributeDeclIndex(position);
-            }
-            if (!declared) {
-                if (fPerformValidation) {
-                    // REVISIT - cache the elem/attr tuple so that we only
-                    // give this error once for each unique occurrence
-                    Object[] args = { element.rawname, attrRawName};
-
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_ATTRIBUTE_NOT_DECLARED",
-                                               args,XMLErrorReporter.SEVERITY_ERROR);   
-                }
-                continue;
-            }
-            // attribute is declared
-
-            // fTempAttDecl should have the right value set now, so
-            // the following is not needed
-            // fGrammar.getAttributeDecl(attDefIndex,fTempAttDecl);
-
-            String type = getAttributeTypeName(fTempAttDecl);
-            attributes.setType(i, type);
-
-            boolean changedByNormalization = false;
-            String oldValue = attributes.getValue(i);
-            String attrValue = oldValue;
-            if (attributes.isSpecified(i) && type != fCDATASymbol) {
-                changedByNormalization = normalizeAttrValue(attributes, i);
-                attrValue = attributes.getValue(i);
-                if (fPerformValidation && fStandaloneIsYes
-                    && changedByNormalization 
-                    && fDTDGrammar.getAttributeDeclIsExternal(position)
-                   ) {
-                    // check VC: Standalone Document Declaration
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE",
-                                               new Object[]{attrRawName, oldValue, attrValue},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-            if (!fPerformValidation) {
-                continue;
-            }
-            if (fTempAttDecl.simpleType.defaultType ==
-                XMLSimpleType.DEFAULT_TYPE_FIXED) {
-                String defaultValue = fTempAttDecl.simpleType.defaultValue;
-
-                if (!attrValue.equals(defaultValue)) {
-                    Object[] args = {element.localpart,
-                        attrRawName,
-                        attrValue,
-                        defaultValue};
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               "MSG_FIXED_ATTVALUE_INVALID",
-                                               args, XMLErrorReporter.SEVERITY_ERROR);
-                }
-            }
-
-            if (fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_ENTITY ||
-                fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_ENUMERATION ||
-                fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_ID ||
-                fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_IDREF ||
-                fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_NMTOKEN ||
-                fTempAttDecl.simpleType.type == XMLSimpleType.TYPE_NOTATION
-               ) {
-                validateDTDattribute(element, attrValue, fTempAttDecl);
-            }
-        } // for all attributes
-
-    } // addDTDDefaultAttrsAndValidate(int,XMLAttrList)
-
-    /** Checks entities in attribute values for standalone VC. */
-    private String getExternalEntityRefInAttrValue(String nonNormalizedValue) {
-        int valLength = nonNormalizedValue.length();
-        int ampIndex = nonNormalizedValue.indexOf('&');
-        while (ampIndex != -1) {
-            if (ampIndex + 1 < valLength &&
-                nonNormalizedValue.charAt(ampIndex+1) != '#') {
-                int semicolonIndex = nonNormalizedValue.indexOf(';', ampIndex+1);
-                String entityName = nonNormalizedValue.substring(ampIndex+1, semicolonIndex);
-                entityName = fSymbolTable.addSymbol(entityName);
-                int entIndex = fDTDGrammar.getEntityDeclIndex(entityName);
-                if (entIndex > -1) {
-                    fDTDGrammar.getEntityDecl(entIndex, fEntityDecl);
-                    if (fEntityDecl.inExternal || 
-                        (entityName = getExternalEntityRefInAttrValue(fEntityDecl.value)) != null) {
-                        return entityName;
-                    }
-                }
-            }
-            ampIndex = nonNormalizedValue.indexOf('&', ampIndex+1);
-        }
-        return null;
-    } // isExternalEntityRefInAttrValue(String):String
-
-    /**
-     * Validate attributes in DTD fashion.
-     */
-    private void validateDTDattribute(QName element, String attValue,
-                                      XMLAttributeDecl attributeDecl) 
-    throws XNIException {
-
-        switch (attributeDecl.simpleType.type) {
-        case XMLSimpleType.TYPE_ENTITY: {                            
-                // NOTE: Save this information because invalidStandaloneAttDef
-                boolean isAlistAttribute = attributeDecl.simpleType.list;
-
-                try {
-                    if (isAlistAttribute) {
-                        fValENTITIES.validate(attValue, null);
-                    }
-                    else {
-                        fValENTITY.validate(attValue, null);
-                    }
-                }
-                catch (InvalidDatatypeValueException ex) {
-                    String  key = ex.getKeyIntoReporter();
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               key,
-                                               new Object[]{ ex.getMessage()},
-                                               XMLErrorReporter.SEVERITY_ERROR );
-
-                }
-                break;
-            }
-
-        case XMLSimpleType.TYPE_NOTATION:
-        case XMLSimpleType.TYPE_ENUMERATION: {
-                boolean found = false;
-                String [] enumVals = attributeDecl.simpleType.enumeration;
-                if (enumVals == null) {
-                    found = false;
-                }
-                else
-                    for (int i = 0; i < enumVals.length; i++) {
-                        if (attValue == enumVals[i] || attValue.equals(enumVals[i])) {
-                            found = true;
-                            break;
-                        }
-                    }
-
-                if (!found) {
-                    StringBuffer enumValueString = new StringBuffer();
-                    if (enumVals != null)
-                        for (int i = 0; i < enumVals.length; i++) {
-                            enumValueString.append(enumVals[i]+" ");
-                        }
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, 
-                                               "MSG_ATTRIBUTE_VALUE_NOT_IN_LIST",
-                                               new Object[]{attributeDecl.name.rawname, attValue, enumValueString},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                }
-                break;
-            }
-
-        case XMLSimpleType.TYPE_ID: {
-                try {
-                    fValID.validate(attValue, null);
-                }
-                catch (InvalidDatatypeValueException ex) {
-                    String  key = ex.getKeyIntoReporter();
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               key,
-                                               new Object[] { ex.getMessage()},
-                                               XMLErrorReporter.SEVERITY_ERROR );
-                }
-                break;
-            }
-
-        case XMLSimpleType.TYPE_IDREF: {
-                boolean isAlistAttribute = attributeDecl.simpleType.list;//Caveat - Save this information because invalidStandaloneAttDef
-
-                try {
-                    if (isAlistAttribute) {
-                        //System.out.println("values = >>" + value + "<<" );
-                        fValIDRefs.validate(attValue, null);
-                    }
-                    else {
-                        fValIDRef.validate(attValue, null);
-                    }
-                }
-                catch (InvalidDatatypeValueException ex) {
-                    String key = ex.getKeyIntoReporter();
-                    if (key == null) {
-                        key = "IDREFSInvalid";
-                    }
-                    fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                               key,
-                                               new Object[]{ ex.getMessage()},
-                                               XMLErrorReporter.SEVERITY_ERROR );
-
-                }
-                break;
-            }
-
-        case XMLSimpleType.TYPE_NMTOKEN: {
-                boolean isAlistAttribute = attributeDecl.simpleType.list;//Caveat - Save this information because invalidStandaloneAttDef
-                //changes fTempAttDef
-                try {
-                    if (isAlistAttribute) {
-                        fValNMTOKENS.validate(attValue, null);
-                    }
-                    else {
-                        fValNMTOKEN.validate(attValue, null);
-                    }
-                }
-                catch (InvalidDatatypeValueException ex) {
-                    if (isAlistAttribute) {
-                        fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                                   "NMTOKENSInvalid",
-                                                   new Object[] { attValue},
-                                                   XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                    else {
-                        fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
-                                                   "NMTOKENInvalid",
-                                                   new Object[] { attValue},
-                                                   XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-                break;
-            }
-
-        } // switch
-
-    } // validateDTDattribute(QName,String,XMLAttributeDecl)
-
-    /** Returns true if invalid standalone attribute definition. */
-    boolean invalidStandaloneAttDef(QName element, QName attribute) {
-        // REVISIT: This obviously needs to be fixed! -Ac
-        boolean state = true;
-        /*
-       if (fStandaloneReader == -1) {
-          return false;
-       }
-       // we are normalizing a default att value...  this ok?
-       if (element.rawname == -1) {
-          return false;
-       }
-       return getAttDefIsExternal(element, attribute);
-       */
-        return state;
-    }
-
-    /**
-     * Normalize the attribute value of a non CDATA attributes collapsing
-     * sequences of space characters (x20)
-     *
-     * @param attributes The list of attributes
-     * @param index The index of the attribute to normalize
-     */
-    private boolean normalizeAttrValue(XMLAttributes attributes, int index) {
-        // vars
-        boolean leadingSpace = true;
-        boolean spaceStart = false;
-        boolean readingNonSpace = false;
-        int count = 0;
-        int eaten = 0;
-        String attrValue = attributes.getValue(index);
-        char[] attValue = new char[attrValue.length()];
-
-        fBuffer.setLength(0);
-        attrValue.getChars(0, attrValue.length(), attValue, 0);
-        for (int i = 0; i < attValue.length; i++) {
-
-            if (attValue[i] == ' ') {
-
-                // now the tricky part
-                if (readingNonSpace) {
-                    spaceStart = true;
-                    readingNonSpace = false;
-                }
-
-                if (spaceStart && !leadingSpace) {
-                    spaceStart = false;
-                    fBuffer.append(attValue[i]);
-                    count++;
-                }
-                else {
-                    if (leadingSpace || !spaceStart) {
-                        eaten ++;
-                        /*** BUG #3512 ***
-                        int entityCount = attributes.getEntityCount(index);
-                        for (int j = 0;  j < entityCount; j++) {
-                            int offset = attributes.getEntityOffset(index, j);
-                            int length = attributes.getEntityLength(index, j);
-                            if (offset <= i-eaten+1) {
-                                if (offset+length >= i-eaten+1) {
-                                    if (length > 0)
-                                        length--;
-                                }
-                            } 
-                            else {
-                                if (offset > 0)
-                                    offset--;
-                            }
-                            attributes.setEntityOffset(index, j, offset);
-                            attributes.setEntityLength(index, j, length);
-                        }
-                        /***/
-                    }
-                }
-
-            }
-            else {
-                readingNonSpace = true;
-                spaceStart = false;
-                leadingSpace = false;
-                fBuffer.append(attValue[i]);
-                count++;
-            }
-        }
-
-        // check if the last appended character is a space.
-        if (count > 0 && fBuffer.charAt(count-1) == ' ') {
-            fBuffer.setLength(count-1);
-            /*** BUG #3512 ***
-            int entityCount = attributes.getEntityCount(index);
-            for (int j=0;  j < entityCount; j++) {
-                int offset = attributes.getEntityOffset(index, j);
-                int length = attributes.getEntityLength(index, j);
-                if (offset < count-1) {
-                    if (offset+length == count) {
-                        length--;
-                    }
-                } 
-                else {
-                    offset--;
-                }
-                attributes.setEntityOffset(index, j, offset);
-                attributes.setEntityLength(index, j, length);
-            }
-            /***/
-        }
-        String newValue = fBuffer.toString();
-        attributes.setValue(index, newValue);
-        return ! attrValue.equals(newValue);
-    }
-
-    /**
-     * Normalize the attribute value of a non CDATA default attribute
-     * collapsing sequences of space characters (x20)
-     *
-     * @param value The value to normalize
-     * @return Whether the value was changed or not.
-     */
-    private boolean normalizeDefaultAttrValue(XMLString value) {
-
-        int oldLength = value.length;
-
-        boolean skipSpace = true; // skip leading spaces
-        int current = value.offset;
-        int end = value.offset + value.length;
-        for (int i = value.offset; i < end; i++) {
-            if (value.ch[i] == ' ') {
-                if (!skipSpace) {
-                    // take the first whitespace as a space and skip the others
-                    value.ch[current++] = ' ';
-                    skipSpace = true;
-                }
-                else {
-                    // just skip it.
-                }
-            }
-            else {
-                // simply shift non space chars if needed
-                if (current != i) {
-                    value.ch[current] = value.ch[i];
-                }
-                current++;
-                skipSpace = false;
-            }
-        }
-        if (current != end) {
-            if (skipSpace) {
-                // if we finished on a space trim it
-                current--;
-            }
-            // set the new value length
-            value.length = current - value.offset;
-            return true;
-        }
-        return false;
-    }
-
-    /** Root element specified. */
-    private void rootElementSpecified(QName rootElement) throws XNIException {
-        if (fPerformValidation) {
-            String root1 = fRootElement.rawname;
-            String root2 = rootElement.rawname;
-            if (root1 == null || !root1.equals(root2)) {
-                fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN, 
-                                            "RootElementTypeMustMatchDoctypedecl", 
-                                            new Object[]{root1, root2}, 
-                                            XMLErrorReporter.SEVERITY_ERROR);
-            }
-        }
-    } // rootElementSpecified(QName)
-
-    /**
-     * Check that the content of an element is valid.
-     * <p>
-     * This is the method of primary concern to the validator. This method is called
-     * upon the scanner reaching the end tag of an element. At that time, the
-     * element's children must be structurally validated, so it calls this method.
-     * The index of the element being checked (in the decl pool), is provided as
-     * well as an array of element name indexes of the children. The validator must
-     * confirm that this element can have these children in this order.
-     * <p>
-     * This can also be called to do 'what if' testing of content models just to see
-     * if they would be valid.
-     * <p>
-     * Note that the element index is an index into the element decl pool, whereas
-     * the children indexes are name indexes, i.e. into the string pool.
-     * <p>
-     * A value of -1 in the children array indicates a PCDATA node. All other
-     * indexes will be positive and represent child elements. The count can be
-     * zero, since some elements have the EMPTY content model and that must be
-     * confirmed.
-     *
-     * @param elementIndex The index within the <code>ElementDeclPool</code> of this
-     *                     element.
-     * @param childCount The number of entries in the <code>children</code> array.
-     * @param children The children of this element.  
-     *
-     * @return The value -1 if fully valid, else the 0 based index of the child
-     *         that first failed. If the value returned is equal to the number
-     *         of children, then additional content is required to reach a valid
-     *         ending state.
-     *
-     * @exception Exception Thrown on error.
-     */
-    private int checkContent(int elementIndex, 
-                             QName[] children,
-                             int childOffset, 
-                             int childCount) throws XNIException {
-
-        fDTDGrammar.getElementDecl(elementIndex, fTempElementDecl);
-
-        // Get the element name index from the element
-        final String elementType = fCurrentElement.rawname;
-
-        // Get out the content spec for this element
-        final int contentType = fCurrentContentSpecType;
-
-
-        //
-        //  Deal with the possible types of content. We try to optimized here
-        //  by dealing specially with content models that don't require the
-        //  full DFA treatment.
-        //
-        if (contentType == XMLElementDecl.TYPE_EMPTY) {
-            //
-            //  If the child count is greater than zero, then this is
-            //  an error right off the bat at index 0.
-            //
-            if (childCount != 0) {
-                return 0;
-            }
-        }
-        else if (contentType == XMLElementDecl.TYPE_ANY) {
-            //
-            //  This one is open game so we don't pass any judgement on it
-            //  at all. Its assumed to fine since it can hold anything.
-            //
-        }
-        else if (contentType == XMLElementDecl.TYPE_MIXED ||  
-                 contentType == XMLElementDecl.TYPE_CHILDREN) {
-            // Get the content model for this element, faulting it in if needed
-            ContentModelValidator cmElem = null;
-            cmElem = fTempElementDecl.contentModelValidator;
-            int result = cmElem.validate(children, childOffset, childCount);
-            return result;
-        }
-        else if (contentType == -1) {
-            //REVISIT
-            /****
-            reportRecoverableXMLError(XMLMessages.MSG_ELEMENT_NOT_DECLARED,
-                                      XMLMessages.VC_ELEMENT_VALID,
-                                      elementType);
-            /****/
-        }
-        else if (contentType == XMLElementDecl.TYPE_SIMPLE) {
-
-            //REVISIT
-            // this should never be reached in the case of DTD validation.
-
-        }
-        else {
-            //REVISIT
-            /****
-            fErrorReporter.reportError(fErrorReporter.getLocator(),
-                                       ImplementationMessages.XERCES_IMPLEMENTATION_DOMAIN,
-                                       ImplementationMessages.VAL_CST,
-                                       0,
-                                       null,
-                                       XMLErrorReporter.ERRORTYPE_FATAL_ERROR);
-            /****/
-        }
-
-        // We succeeded
-        return -1;
-
-    } // checkContent(int,int,QName[]):int
-
-    /** Returns the content spec type for an element index. */
-    private int getContentSpecType(int elementIndex) {
-
-        int contentSpecType = -1;
-        if (elementIndex > -1) {
-            if (fDTDGrammar.getElementDecl(elementIndex,fTempElementDecl)) {
-                contentSpecType = fTempElementDecl.type;
-            }
-        }
-        return contentSpecType;
-    }
-
-    /** Character data in content. */
-    private void charDataInContent() {
-
-        if (DEBUG_ELEMENT_CHILDREN) {
-            System.out.println("charDataInContent()");
-        }
-        if (fElementChildren.length <= fElementChildrenLength) {
-            QName[] newarray = new QName[fElementChildren.length * 2];
-            System.arraycopy(fElementChildren, 0, newarray, 0, fElementChildren.length);
-            fElementChildren = newarray;
-        }
-        QName qname = fElementChildren[fElementChildrenLength];
-        if (qname == null) {
-            for (int i = fElementChildrenLength; i < fElementChildren.length; i++) {
-                fElementChildren[i] = new QName();
-            }
-            qname = fElementChildren[fElementChildrenLength];
-        }
-        qname.clear();
-        fElementChildrenLength++;
-
-    } // charDataInCount()
-
-    /** convert attribute type from ints to strings */
-    private String getAttributeTypeName(XMLAttributeDecl attrDecl) {
-
-        switch (attrDecl.simpleType.type) {
-        case XMLSimpleType.TYPE_ENTITY: {
-                return attrDecl.simpleType.list ? fENTITIESSymbol : fENTITYSymbol;
-            }
-        case XMLSimpleType.TYPE_ENUMERATION: {
-                StringBuffer buffer = new StringBuffer();
-                buffer.append('(');
-                for (int i=0; i<attrDecl.simpleType.enumeration.length ; i++) {
-                    if (i > 0) {
-                        buffer.append("|");
-                    }
-                    buffer.append(attrDecl.simpleType.enumeration[i]);
-                }
-                buffer.append(')');
-                return fSymbolTable.addSymbol(buffer.toString());
-            }
-        case XMLSimpleType.TYPE_ID: {
-                return fIDSymbol;
-            }
-        case XMLSimpleType.TYPE_IDREF: {
-                return attrDecl.simpleType.list ? fIDREFSSymbol : fIDREFSymbol;
-            }
-        case XMLSimpleType.TYPE_NMTOKEN: {
-                return attrDecl.simpleType.list ? fNMTOKENSSymbol : fNMTOKENSymbol;
-            }
-        case XMLSimpleType.TYPE_NOTATION: {
-                return fNOTATIONSymbol;
-            }
-        }
-        return fCDATASymbol;
-
-    } // getAttributeTypeName(XMLAttributeDecl):String
-
-    /** intialization */
-    private void init() {
-
-        // symbols
-        fEMPTYSymbol = fSymbolTable.addSymbol("EMPTY");
-        fANYSymbol = fSymbolTable.addSymbol("ANY");
-        fMIXEDSymbol = fSymbolTable.addSymbol("MIXED");
-        fCHILDRENSymbol = fSymbolTable.addSymbol("CHILDREN");
-
-        fCDATASymbol = fSymbolTable.addSymbol("CDATA");
-        fIDSymbol = fSymbolTable.addSymbol("ID");
-        fIDREFSymbol = fSymbolTable.addSymbol("IDREF");
-        fIDREFSSymbol = fSymbolTable.addSymbol("IDREFS");
-        fENTITYSymbol = fSymbolTable.addSymbol("ENTITY");
-        fENTITIESSymbol = fSymbolTable.addSymbol("ENTITIES");
-        fNMTOKENSymbol = fSymbolTable.addSymbol("NMTOKEN");
-        fNMTOKENSSymbol = fSymbolTable.addSymbol("NMTOKENS");
-        fNOTATIONSymbol = fSymbolTable.addSymbol("NOTATION");
-        fENUMERATIONSymbol = fSymbolTable.addSymbol("ENUMERATION");
-        fIMPLIEDSymbol = fSymbolTable.addSymbol("#IMPLIED");
-        fREQUIREDSymbol = fSymbolTable.addSymbol("#REQUIRED");
-        fFIXEDSymbol = fSymbolTable.addSymbol("#FIXED");
-        fDATATYPESymbol = fSymbolTable.addSymbol("<<datatype>>");
-
-        // datatype validators
-        if (fValidation) {
-            try {
-                //REVISIT: datatypeRegistry + initialization of datatype 
-                //         why do we cast to ListDatatypeValidator?
-                ((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).initializeDTDRegistry();
-                fValID       = (IDDatatypeValidator)((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("ID" );
-                fValIDRef    = (IDREFDatatypeValidator)((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("IDREF" );
-                fValIDRefs   = (ListDatatypeValidator)((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("IDREFS" );
-                fValENTITY   = (ENTITYDatatypeValidator)((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("ENTITY" );
-                fValENTITIES = (ListDatatypeValidator)((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("ENTITIES" );
-                fValNMTOKEN  = ((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("NMTOKEN");
-                fValNMTOKENS = ((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("NMTOKENS");
-                fValNOTATION = (NOTATIONDatatypeValidator)((DatatypeValidatorFactoryImpl)fDatatypeValidatorFactory).getDatatypeValidator("NOTATION" );
-
-            }
-            catch (Exception e) {
-                // should never happen
-                e.printStackTrace(System.err);
-            }
-
-            //Initialize ID, IDREF, IDREFS validators
-            if (fTableOfIDs == null) {
-                fTableOfIDs = new Hashtable();//Initialize table of IDs
-            }
-
-            fTableOfIDs.clear();
-            fValID.initialize(fTableOfIDs);
-            fValIDRef.initialize(fTableOfIDs);
-            fValIDRefs.initialize(fTableOfIDs);
-            if (fNotationEnumVals == null) {
-                fNotationEnumVals = new Hashtable(); 
-            }
-            fNotationEnumVals.clear();
-
-            fTableOfIDAttributeNames = new Hashtable();
-            fTableOfNOTATIONAttributeNames = new Hashtable();
-        }
-
-    } // init()
-
-    /** ensure element stack capacity */
-    private void ensureStackCapacity ( int newElementDepth) {
-        if (newElementDepth == fElementQNamePartsStack.length) {
-            int[] newStack = new int[newElementDepth * 2];
-
-            QName[] newStackOfQueue = new QName[newElementDepth * 2];
-            System.arraycopy(this.fElementQNamePartsStack, 0, newStackOfQueue, 0, newElementDepth );
-            fElementQNamePartsStack      = newStackOfQueue;
-
-            QName qname = fElementQNamePartsStack[newElementDepth];
-            if (qname == null) {
-                for (int i = newElementDepth; i < fElementQNamePartsStack.length; i++) {
-                    fElementQNamePartsStack[i] = new QName();
-                }
-            }
-
-            newStack = new int[newElementDepth * 2];
-            System.arraycopy(fElementIndexStack, 0, newStack, 0, newElementDepth);
-            fElementIndexStack = newStack;
-
-            newStack = new int[newElementDepth * 2];
-            System.arraycopy(fContentSpecTypeStack, 0, newStack, 0, newElementDepth);
-            fContentSpecTypeStack = newStack;
-
-        }
-    } // ensureStackCapacity
-
-    //
-    // Protected methods
-    //
-
-    /** Handle element. */
-    protected void handleStartElement(QName element, XMLAttributes attributes) throws XNIException {
-
-        // REVISIT: Here are current assumptions about validation features
-        //          given that XMLSchema validator is in the pipeline
-        //
-        // http://xml.org/sax/features/validation = true
-        // http://apache.org/xml/features/validation/schema = true
-        //
-        //[1] XML instance document only has reference to a DTD 
-        //  Outcome: report validation errors only against dtd.
-        //
-        //[2] XML instance document has only XML Schema grammars:
-        //  Outcome: report validation errors only against schemas (no errors produced from DTD validator)
-        //
-        // [3] XML instance document has DTD and XML schemas:
-        // Outcome: validation errors reported against both grammars: DTD and schemas.
-        //
-        //         
-        //         if dynamic validation is on
-        //            validate only against grammar we've found (depending on settings
-        //            for schema feature)
-        // 
-        // set wether we're performing validation
-        fPerformValidation = fValidation && (!fDynamicValidation || fSeenDoctypeDecl)  
-                             && (fDTDValidation || fSeenDoctypeDecl);
-
-        // VC: Root Element Type
-        // see if the root element's name matches the one in DoctypeDecl 
-        if (!fSeenRootElement) {
-            fSeenRootElement = true;
-            fValidationManager.getValidationState().setEntityState(fDTDGrammar);
-            fValidationManager.setGrammarFound(fSeenDoctypeDecl);
-            rootElementSpecified(element);
-        }
-
-        if (fDTDGrammar == null) {
-
-            if (!fPerformValidation) {
-                fCurrentElementIndex = -1;
-                fCurrentContentSpecType = -1;
-                fInElementContent = false;
-            }
-            if (fPerformValidation && !fSkipValidation) {
-                fSkipValidation = true;
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, 
-                                           "MSG_GRAMMAR_NOT_FOUND",
-                                           new Object[]{ element.rawname},
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }
-        }
-        else {
-            //  resolve the element
-            fCurrentElementIndex = fDTDGrammar.getElementDeclIndex(element, -1);
-
-            fCurrentContentSpecType = getContentSpecType(fCurrentElementIndex);
-            if (fCurrentElementIndex == -1 && fPerformValidation) {
-                fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, 
-                                           "MSG_ELEMENT_NOT_DECLARED",
-                                           new Object[]{ element.rawname},
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }
-            else {
-                //  0. insert default attributes
-                //  1. normalize the attributes
-                //  2. validate the attrivute list.
-                // TO DO: 
-                // 
-                addDTDDefaultAttrsAndValidate(fCurrentElementIndex, attributes);
-            }
-        }
-
-        // set element content state
-        fInElementContent = fCurrentContentSpecType == XMLElementDecl.TYPE_CHILDREN;
-
-        // increment the element depth, add this element's 
-        // QName to its enclosing element 's children list
-        fElementDepth++;
-        if (fPerformValidation) {
-            // push current length onto stack
-            if (fElementChildrenOffsetStack.length < fElementDepth) {
-                int newarray[] = new int[fElementChildrenOffsetStack.length * 2];
-                System.arraycopy(fElementChildrenOffsetStack, 0, newarray, 0, fElementChildrenOffsetStack.length);
-                fElementChildrenOffsetStack = newarray;
-            }
-            fElementChildrenOffsetStack[fElementDepth] = fElementChildrenLength;
-
-            // add this element to children
-            if (fElementChildren.length <= fElementChildrenLength) {
-                QName[] newarray = new QName[fElementChildrenLength * 2];
-                System.arraycopy(fElementChildren, 0, newarray, 0, fElementChildren.length);
-                fElementChildren = newarray;
-            }
-            QName qname = fElementChildren[fElementChildrenLength];
-            if (qname == null) {
-                for (int i = fElementChildrenLength; i < fElementChildren.length; i++) {
-                    fElementChildren[i] = new QName();
-                }
-                qname = fElementChildren[fElementChildrenLength];
-            }
-            qname.setValues(element);
-            fElementChildrenLength++;
-        }
-
-        // save current element information
-        fCurrentElement.setValues(element);
-        ensureStackCapacity(fElementDepth);
-        fElementQNamePartsStack[fElementDepth].setValues(fCurrentElement); 
-        fElementIndexStack[fElementDepth] = fCurrentElementIndex;
-        fContentSpecTypeStack[fElementDepth] = fCurrentContentSpecType;
-
-
-    } // handleStartElement(QName,XMLAttributes,boolean)
-
-    /** Handle end element. */
-    protected void handleEndElement(QName element,  Augmentations augs, boolean isEmpty)
-    throws XNIException {
-
-        // decrease element depth
-        fElementDepth--;
-
-        // validate
-        if (fPerformValidation) {
-            int elementIndex = fCurrentElementIndex;
-            if (elementIndex != -1 && fCurrentContentSpecType != -1) {
-                QName children[] = fElementChildren;
-                int childrenOffset = fElementChildrenOffsetStack[fElementDepth + 1] + 1;
-                int childrenLength = fElementChildrenLength - childrenOffset;
-                int result = checkContent(elementIndex, 
-                                          children, childrenOffset, childrenLength);
-
-                if (result != -1) {
-                    fDTDGrammar.getElementDecl(elementIndex, fTempElementDecl);
-                    if (fTempElementDecl.type == XMLElementDecl.TYPE_EMPTY) {
-                        fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, 
-                                                   "MSG_CONTENT_INVALID",
-                                                   new Object[]{ element.rawname, "EMPTY"},
-                                                   XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                    else {
-                        String messageKey = result != childrenLength ? 
-                                            "MSG_CONTENT_INVALID" : "MSG_CONTENT_INCOMPLETE";
-                        fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, 
-                                                   messageKey,
-                                                   new Object[]{ element.rawname, 
-                                                       fDTDGrammar.getContentSpecAsString(elementIndex)},
-                                                   XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-            }
-            fElementChildrenLength = fElementChildrenOffsetStack[fElementDepth + 1] + 1;
-        }
-        
-        // call handlers
-        if (fDocumentHandler != null && !isEmpty) {
-            // NOTE: The binding of the element doesn't actually happen
-            //       yet because the namespace binder does that. However,
-            //       if it does it before this point, then the endPrefix-
-            //       Mapping calls get made too soon! As long as the
-            //       rawnames match, we know it'll have a good binding,
-            //       so we can just use the current element. -Ac
-            fDocumentHandler.endElement(fCurrentElement, augs);
-        }
-        
-        // now pop this element off the top of the element stack
-        if (fElementDepth < -1) {
-            throw new RuntimeException("FWK008 Element stack underflow");
-        }
-        if (fElementDepth < 0) {
-            fCurrentElement.clear();
-            fCurrentElementIndex = -1;
-            fCurrentContentSpecType = -1;
-            fInElementContent = false;
-
-            // TO DO : fix this
-            //
-            // Check after document is fully parsed
-            // (1) check that there was an element with a matching id for every
-            //   IDREF and IDREFS attr (V_IDREF0)
-            //
-            if (fPerformValidation) {
-                try {
-                    fValIDRef.validate();//Do final validation of IDREFS against IDs
-                    fValIDRefs.validate();
-                }
-                catch (InvalidDatatypeValueException ex) {
-                    String  key = ex.getKeyIntoReporter();
-
-                    fErrorReporter.reportError( XMLMessageFormatter.XML_DOMAIN,
-                                                key,
-                                                new Object[]{ ex.getMessage()},
-                                                XMLErrorReporter.SEVERITY_ERROR );
-                }
-                fTableOfIDs.clear();//Clear table of IDs
-            }
-            return;
-        }
-
-        // If Namespace enable then localName != rawName
-        fCurrentElement.setValues(fElementQNamePartsStack[fElementDepth]);
-
-        fCurrentElementIndex = fElementIndexStack[fElementDepth];
-        fCurrentContentSpecType = fContentSpecTypeStack[fElementDepth];
-        fInElementContent = (fCurrentContentSpecType == XMLElementDecl.TYPE_CHILDREN);
-
-    } // handleEndElement(QName,boolean)
-
-    /** Factory method for creating a DTD grammar. */
-    protected DTDGrammar createDTDGrammar() {
-        return new DTDGrammar(fSymbolTable);
-    } // createDTDGrammar():DTDGrammar
-
-} // class XMLDTDValidator
diff --git a/src/org/apache/xerces/impl/dtd/XMLElementDecl.java b/src/org/apache/xerces/impl/dtd/XMLElementDecl.java
deleted file mode 100644
index 716e968..0000000
--- a/src/org/apache/xerces/impl/dtd/XMLElementDecl.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.dtd.models.ContentModelValidator;
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:54:05 PDT 2000
- * @version $Id$
- */
-public class XMLElementDecl {
-
-    //
-    // Constants  
-    //
-
-    /** TYPE_ANY */
-    public static final short TYPE_ANY = 0;
-
-    /** TYPE_EMPTY */
-    public static final short TYPE_EMPTY = 1;
-
-    /** TYPE_MIXED */
-    public static final short TYPE_MIXED = 2;
-
-    /** TYPE_CHILDREN */
-    public static final short TYPE_CHILDREN = 3;
-
-    /** TYPE_SIMPLE */
-    public static final short TYPE_SIMPLE = 4;
-
-    //
-    // Data
-    //
-
-    /** name */
-    public final QName name = new QName();
-
-    /** scope */
-    public int scope = -1;
-
-    /** type */
-    public short type = -1;
-
-    /** contentModelValidator */
-    public ContentModelValidator contentModelValidator;
-
-    /** simpleType */
-    public final XMLSimpleType simpleType = new XMLSimpleType();
-
-    //
-    // Methods
-    //
-
-    /**
-     * setValues
-     * 
-     * @param name 
-     * @param scope 
-     * @param type 
-     * @param contentModelValidator 
-     * @param simpleType 
-     */
-    public void setValues(QName name, int scope, short type, ContentModelValidator contentModelValidator, XMLSimpleType simpleType) {
-        this.name.setValues(name);
-        this.scope                 = scope;
-        this.type                  = type;
-        this.contentModelValidator = contentModelValidator;
-        this.simpleType.setValues(simpleType);
-    } // setValues
-
-    /**
-     * clear
-     */
-    public void clear() {
-        this.name.clear();
-        this.type          = -1;
-        this.scope         = -1;
-        this.contentModelValidator = null;
-        this.simpleType.clear();
-    } // clear
-
-} // class XMLElementDecl
diff --git a/src/org/apache/xerces/impl/dtd/XMLEntityDecl.java b/src/org/apache/xerces/impl/dtd/XMLEntityDecl.java
deleted file mode 100644
index 16907ed..0000000
--- a/src/org/apache/xerces/impl/dtd/XMLEntityDecl.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- */
-public class XMLEntityDecl {
-
-    //
-    // Data
-    //
-
-    /** name */
-    public String name;
-
-    /** publicId */
-    public String publicId;
-
-    /** systemId */
-    public String systemId;
-
-    /** baseSystemId */
-    public String baseSystemId;
-
-    /** notation */
-    public String notation;
-
-    /** isPE */
-    public boolean isPE;
-
-    /** inExternal */
-    /** <strong>Note:</strong> flag of where the entity is defined, not whether it is a external entity */
-    public boolean inExternal;
-
-    /** Value. */
-    public String value;
-
-    //
-    // Methods
-    //
-
-    /**
-     * setValues
-     * 
-     * @param name 
-     * @param publicId 
-     * @param systemId 
-     * @param baseSystemId 
-     * @param notation 
-     * @param isPE 
-     * @param inExternal
-     */
-    public void setValues(String name, String publicId, String systemId, 
-                          String baseSystemId, String notation, 
-                          boolean isPE, boolean inExternal) {
-        setValues(name, publicId, systemId, baseSystemId, notation, null, isPE, inExternal);
-    }
-
-    /**
-     * setValues
-     * 
-     * @param name 
-     * @param publicId 
-     * @param systemId 
-     * @param baseSystemId 
-     * @param value
-     * @param notation 
-     * @param isPE 
-     * @param inExternal
-     */
-    public void setValues(String name, String publicId, String systemId, 
-                          String baseSystemId, String notation, 
-                          String value, boolean isPE, boolean inExternal) {
-        this.name         = name;
-        this.publicId     = publicId;
-        this.systemId     = systemId;
-        this.baseSystemId = baseSystemId;
-        this.notation     = notation;
-        this.value        = value;
-        this.isPE         = isPE;
-        this.inExternal   = inExternal;
-    } // setValues(String,String,String,String,String,boolean,boolean)
-
-    /**
-     * clear
-     */
-    public void clear() {
-       this.name         = null;
-       this.publicId     = null;
-       this.systemId     = null;
-       this.baseSystemId = null;
-       this.notation     = null;
-       this.value        = null;
-       this.isPE         = false;
-       this.inExternal   = false;
-
-    } // clear
-
-} // class XMLEntityDecl
diff --git a/src/org/apache/xerces/impl/dtd/XMLNotationDecl.java b/src/org/apache/xerces/impl/dtd/XMLNotationDecl.java
deleted file mode 100644
index ee86049..0000000
--- a/src/org/apache/xerces/impl/dtd/XMLNotationDecl.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-
-/**
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @version $Id$
- */
-public class XMLNotationDecl {
-
-    //
-    // Data
-    //
-
-    /** name */
-    public String name;
-
-    /** publicId */
-    public String publicId;
-
-    /** systemId */
-    public String systemId;
-
-    //
-    // Methods
-    //
-
-    /**
-     * setValues
-     * 
-     * @param name 
-     * @param publicId 
-     * @param systemId 
-     */
-    public void setValues(String name, String publicId, String systemId) {
-        this.name     =   name;
-        this.publicId = publicId;
-        this.systemId = systemId;
-    } // setValues
-
-    /**
-     * clear
-     */
-    public void clear() {
-        this.name     = null;
-        this.publicId = null;
-        this.systemId = null;
-    } // clear
-
-} // class XMLNotationDecl
diff --git a/src/org/apache/xerces/impl/dtd/XMLSimpleType.java b/src/org/apache/xerces/impl/dtd/XMLSimpleType.java
deleted file mode 100644
index b404054..0000000
--- a/src/org/apache/xerces/impl/dtd/XMLSimpleType.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidator;
-/**
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @version $Id$
- */
-public class XMLSimpleType {
-
-    //
-    // Constants
-    //
-
-    /** TYPE_CDATA */
-    public static final short TYPE_CDATA = 0;
-
-    /** TYPE_ENTITY */
-    public static final short TYPE_ENTITY = 1;
-
-    /** TYPE_ENUMERATION */
-    public static final short TYPE_ENUMERATION = 2;
-
-    /** TYPE_ID */
-    public static final short TYPE_ID = 3;
-
-    /** TYPE_IDREF */
-    public static final short TYPE_IDREF = 4;
-
-    /** TYPE_NMTOKEN */
-    public static final short TYPE_NMTOKEN = 5;
-
-    /** TYPE_NOTATION */
-    public static final short TYPE_NOTATION = 6;
-
-    /** TYPE_NAMED */
-    public static final short TYPE_NAMED = 7;
-
-    /** DEFAULT_TYPE_DEFAULT */
-    public static final short DEFAULT_TYPE_DEFAULT = 3;
-
-    /** DEFAULT_TYPE_FIXED */
-    public static final short DEFAULT_TYPE_FIXED = 1;
-
-    /** DEFAULT_TYPE_IMPLIED */
-    public static final short DEFAULT_TYPE_IMPLIED = 0;
-
-    /** DEFAULT_TYPE_REQUIRED */
-    public static final short DEFAULT_TYPE_REQUIRED = 2;
-
-    //
-    // Data
-    //
-
-    /** type */
-    public short type;
-
-    /** name */
-    public String name;
-
-    /** enumeration */
-    public String[] enumeration;
-
-    /** list */
-    public boolean list;
-
-    /** defaultType */
-    public short defaultType;
-
-    /** defaultValue */
-    public String defaultValue;
-
-    /** datatypeValidator */
-    public DatatypeValidator datatypeValidator;
-
-    //
-    // Methods
-    //
-
-    /**
-     * setValues
-     * 
-     * @param type 
-     * @param name 
-     * @param enumeration 
-     * @param list 
-     * @param defaultType 
-     * @param defaultValue 
-     * @param datatypeValidator 
-     */
-    public void setValues(short type, String name, String[] enumeration, 
-                          boolean list, short defaultType, 
-                          String defaultValue, 
-                          DatatypeValidator datatypeValidator) {
-
-        this.type              = type;
-        this.name              = name;
-        // REVISIT: Should this be a copy? -Ac
-        if (enumeration != null && enumeration.length > 0) {
-            this.enumeration = new String[enumeration.length];
-            System.arraycopy(enumeration, 0, this.enumeration, 0, this.enumeration.length);
-        }
-        else {
-            this.enumeration = null;
-        }
-        this.list              = list;
-        this.defaultType       = defaultType;
-        this.defaultValue      = defaultValue;
-        this.datatypeValidator = datatypeValidator;
-
-    } // setValues(short,String,String[],boolean,short,String,DatatypeValidator)
-
-    /** Set values. */
-    public void setValues(XMLSimpleType simpleType) {
-
-        type = simpleType.type;
-        name = simpleType.name;
-        // REVISIT: Should this be a copy? -Ac
-        if (simpleType.enumeration != null && simpleType.enumeration.length > 0) {
-            enumeration = new String[simpleType.enumeration.length];
-            System.arraycopy(simpleType.enumeration, 0, enumeration, 0, enumeration.length);
-        }
-        else {
-            enumeration = null;
-        }
-        list = simpleType.list;
-        defaultType = simpleType.defaultType;
-        defaultValue = simpleType.defaultValue;
-        datatypeValidator = simpleType.datatypeValidator;
-
-    } // setValues(XMLSimpleType)
-
-    /**
-     * clear
-     */
-    public void clear() {
-        this.type              = -1;
-        this.name              = null;
-        this.enumeration       = null;
-        this.list              = false;
-        this.defaultType       = -1;
-        this.defaultValue      = null;
-        this.datatypeValidator = null;
-    } // clear
-
-} // class XMLSimpleType
diff --git a/src/org/apache/xerces/impl/dtd/models/CMAny.java b/src/org/apache/xerces/impl/dtd/models/CMAny.java
deleted file mode 100644
index f1707a7..0000000
--- a/src/org/apache/xerces/impl/dtd/models/CMAny.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-import org.apache.xerces.xni.QName;
-
-/**
- * Content model any node.
- *
- * @version $Id$
- */
-public class CMAny
-    extends CMNode {
-
-    //
-    // Data
-    //
-
-    /** 
-     * The any content model type. This value is one of the following:
-     * XMLContentSpec.CONTENTSPECNODE_ANY, 
-     * XMLContentSpec.CONTENTSPECNODE_ANY_OTHER,
-     * XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL.
-     */
-    private int fType;
-
-    /**
-     * URI of the any content model. This value is set if the type is
-     * of the following:
-     * XMLContentSpec.CONTENTSPECNODE_ANY, 
-     * XMLContentSpec.CONTENTSPECNODE_ANY_OTHER.
-     */
-    private String fURI;
-
-    /**
-     * Part of the algorithm to convert a regex directly to a DFA
-     * numbers each leaf sequentially. If its -1, that means its an
-     * epsilon node. Zero and greater are non-epsilon positions.
-     */
-    private int fPosition = -1;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a content model any. */
-    public CMAny(int type, String uri, int position)  {
-        super(type);
-
-        // Store the information
-        fType = type;
-        fURI = uri;
-        fPosition = position;
-    }
-
-    //
-    // Package methods
-    //
-
-    final int getType() {
-        return fType;
-    }
-
-    final String getURI() {
-        return fURI;
-    }
-
-    final int getPosition()
-    {
-        return fPosition;
-    }
-
-    final void setPosition(int newPosition)
-    {
-        fPosition = newPosition;
-    }
-
-    //
-    // CMNode methods
-    //
-
-    // package
-
-    public boolean isNullable() 
-    {
-        // Leaf nodes are never nullable unless its an epsilon node
-        return (fPosition == -1);
-    }
-
-    public String toString()
-    {
-        StringBuffer strRet = new StringBuffer();
-        strRet.append("(");
-        strRet.append("##any:uri=");
-        strRet.append(fURI);
-        strRet.append(')');
-        if (fPosition >= 0)
-        {
-            strRet.append
-            (
-                " (Pos:"
-                + new Integer(fPosition).toString()
-                + ")"
-            );
-        }
-        return strRet.toString();
-    }
-
-    // protected
-
-    protected void calcFirstPos(CMStateSet toSet) 
-    {
-        // If we are an epsilon node, then the first pos is an empty set
-        if (fPosition == -1)
-            toSet.zeroBits();
-
-        // Otherwise, its just the one bit of our position
-        else
-            toSet.setBit(fPosition);
-    }
-
-    protected void calcLastPos(CMStateSet toSet) 
-    {
-        // If we are an epsilon node, then the last pos is an empty set
-        if (fPosition == -1)
-            toSet.zeroBits();
-
-        // Otherwise, its just the one bit of our position
-        else
-            toSet.setBit(fPosition);
-    }
-
-} // class CMAny
-
diff --git a/src/org/apache/xerces/impl/dtd/models/CMBinOp.java b/src/org/apache/xerces/impl/dtd/models/CMBinOp.java
deleted file mode 100644
index e89d9eb..0000000
--- a/src/org/apache/xerces/impl/dtd/models/CMBinOp.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-
-/**
- *
- * Content model Bin-Op node.
- *
- * @version $Id$
- */
-public class CMBinOp extends CMNode
-{
-    // -------------------------------------------------------------------
-    //  Constructors
-    // -------------------------------------------------------------------
-    public CMBinOp(int type, CMNode leftNode, CMNode rightNode) 
-    {
-        super(type);
-
-        // Insure that its one of the types we require
-        if ((type() != XMLContentSpec.CONTENTSPECNODE_CHOICE)
-        &&  (type() != XMLContentSpec.CONTENTSPECNODE_SEQ))
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-        }
-
-        // Store the nodes and init any data that needs it
-        fLeftChild = leftNode;
-        fRightChild = rightNode;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, final methods
-    // -------------------------------------------------------------------
-    final CMNode getLeft()
-    {
-        return fLeftChild;
-    }
-
-    final CMNode getRight()
-    {
-        return fRightChild;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, inherited methods
-    // -------------------------------------------------------------------
-    public boolean isNullable() 
-    {
-        //
-        //  If its an alternation, then if either child is nullable then
-        //  this node is nullable. If its a concatenation, then both of
-        //  them have to be nullable.
-        //
-        if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-            return (fLeftChild.isNullable() || fRightChild.isNullable());
-        else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
-            return (fLeftChild.isNullable() && fRightChild.isNullable());
-        else
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Protected, inherited methods
-    // -------------------------------------------------------------------
-    protected void calcFirstPos(CMStateSet toSet) 
-    {
-        if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-        {
-            // Its the the union of the first positions of our children.
-            toSet.setTo(fLeftChild.firstPos());
-            toSet.union(fRightChild.firstPos());
-        }
-         else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
-        {
-            //
-            //  If our left child is nullable, then its the union of our
-            //  children's first positions. Else is our left child's first
-            //  positions.
-            //
-            toSet.setTo(fLeftChild.firstPos());
-            if (fLeftChild.isNullable())
-                toSet.union(fRightChild.firstPos());
-        }
-         else
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-        }
-    }
-
-    protected void calcLastPos(CMStateSet toSet) 
-    {
-        if (type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-        {
-            // Its the the union of the first positions of our children.
-            toSet.setTo(fLeftChild.lastPos());
-            toSet.union(fRightChild.lastPos());
-        }
-         else if (type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
-        {
-            //
-            //  If our right child is nullable, then its the union of our
-            //  children's last positions. Else is our right child's last
-            //  positions.
-            //
-            toSet.setTo(fRightChild.lastPos());
-            if (fRightChild.isNullable())
-                toSet.union(fLeftChild.lastPos());
-        }
-         else
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-        }
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Private data members
-    //
-    //  fLeftChild
-    //  fRightChild
-    //      These are the references to the two nodes that are on either
-    //      side of this binary operation.
-    // -------------------------------------------------------------------
-    private CMNode  fLeftChild;
-    private CMNode  fRightChild;
-};
-
diff --git a/src/org/apache/xerces/impl/dtd/models/CMLeaf.java b/src/org/apache/xerces/impl/dtd/models/CMLeaf.java
deleted file mode 100644
index a4cc63f..0000000
--- a/src/org/apache/xerces/impl/dtd/models/CMLeaf.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-import org.apache.xerces.xni.QName;
-
-/**
- * Content model leaf node.
- *
- * @version $Id$
- */
-public class CMLeaf 
-    extends CMNode {
-
-    //
-    // Data
-    //
-
-    /** This is the element that this leaf represents. */
-    private QName fElement = new QName();
-
-    /**
-     * Part of the algorithm to convert a regex directly to a DFA
-     * numbers each leaf sequentially. If its -1, that means its an
-     * epsilon node. Zero and greater are non-epsilon positions.
-     */
-    private int fPosition = -1;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a content model leaf. */
-    public CMLeaf(QName element, int position)  {
-        super(XMLContentSpec.CONTENTSPECNODE_LEAF);
-
-        // Store the element index and position
-        fElement.setValues(element);
-        fPosition = position;
-    }
-
-    /** Constructs a content model leaf. */
-    public CMLeaf(QName element)  {
-        super(XMLContentSpec.CONTENTSPECNODE_LEAF);
-
-        // Store the element index and position
-        fElement.setValues(element);
-    }
-
-    //
-    // Package methods
-    //
-
-    final QName getElement()
-    {
-        return fElement;
-    }
-
-    final int getPosition()
-    {
-        return fPosition;
-    }
-
-    final void setPosition(int newPosition)
-    {
-        fPosition = newPosition;
-    }
-
-    //
-    // CMNode methods
-    //
-
-    // package
-
-    public boolean isNullable() 
-    {
-        // Leaf nodes are never nullable unless its an epsilon node
-        return (fPosition == -1);
-    }
-
-    public String toString()
-    {
-        StringBuffer strRet = new StringBuffer(fElement.toString());
-        strRet.append(" (");
-        strRet.append(fElement.uri);
-        strRet.append(',');
-        strRet.append(fElement.localpart);
-        strRet.append(')');
-        if (fPosition >= 0)
-        {
-            strRet.append
-            (
-                " (Pos:"
-                + new Integer(fPosition).toString()
-                + ")"
-            );
-        }
-        return strRet.toString();
-    }
-
-    // protected
-
-    protected void calcFirstPos(CMStateSet toSet) 
-    {
-        // If we are an epsilon node, then the first pos is an empty set
-        if (fPosition == -1)
-            toSet.zeroBits();
-
-        // Otherwise, its just the one bit of our position
-        else
-            toSet.setBit(fPosition);
-    }
-
-    protected void calcLastPos(CMStateSet toSet) 
-    {
-        // If we are an epsilon node, then the last pos is an empty set
-        if (fPosition == -1)
-            toSet.zeroBits();
-
-        // Otherwise, its just the one bit of our position
-        else
-            toSet.setBit(fPosition);
-    }
-
-} // class CMLeaf
-
-
diff --git a/src/org/apache/xerces/impl/dtd/models/CMNode.java b/src/org/apache/xerces/impl/dtd/models/CMNode.java
deleted file mode 100644
index 34b4347..0000000
--- a/src/org/apache/xerces/impl/dtd/models/CMNode.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-/**
- * A content model node.
- *
- * @version $Id$
- */
-public abstract class CMNode
-{
-    // -------------------------------------------------------------------
-    //  Constructors
-    // -------------------------------------------------------------------
-    public CMNode(int type) 
-    {
-        fType = type;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, abstract methods
-    // -------------------------------------------------------------------
-    // made this public so it could be implemented and used outside this package -neilg.
-    public abstract boolean isNullable() ;
-
-
-    // -------------------------------------------------------------------
-    //  Package final methods
-    // -------------------------------------------------------------------
-    public final int type()
-    {
-        return fType;
-    }
-
-    // made this public so it could be implemented and used outside this package -neilg.
-    public final CMStateSet firstPos() 
-    {
-        if (fFirstPos == null)
-        {
-            fFirstPos = new CMStateSet(fMaxStates);
-            calcFirstPos(fFirstPos);
-        }
-        return fFirstPos;
-    }
-
-    // made this public so it could be implemented and used outside this package -neilg.
-    public final CMStateSet lastPos() 
-    {
-        if (fLastPos == null)
-        {
-            fLastPos = new CMStateSet(fMaxStates);
-            calcLastPos(fLastPos);
-        }
-        return fLastPos;
-    }
-
-    final void setFollowPos(CMStateSet setToAdopt)
-    {
-        fFollowPos = setToAdopt;
-    }
-
-    public final void setMaxStates(int maxStates)
-    {
-        fMaxStates = maxStates;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Protected, abstract methods
-    // -------------------------------------------------------------------
-    protected abstract void calcFirstPos(CMStateSet toSet) ;
-
-    protected abstract void calcLastPos(CMStateSet toSet) ;
-
-
-    // -------------------------------------------------------------------
-    //  Private data members
-    //
-    //  fType
-    //      The type of node. This indicates whether its a leaf or an
-    //      operation. Though we also do derived classes for these types,
-    //      it is too expensive to use runtime typing to find this out.
-    //      This is one of the ContentSpecNode.NODE_XXX types.
-    //
-    //  fFirstPos
-    //      The set of NFA states that represent the entry states of this
-    //      node in the DFA.
-    //
-    //  fFollowPos
-    //      The set of NFA states that can be gotten to from from this
-    //      node in the DFA.
-    //
-    //  fLastPos
-    //      The set of NFA states that represent the final states of this
-    //      node in the DFA.
-    //
-    //  fMaxStates
-    //      The maximum number of states that the NFA has, which means the
-    //      max number of NFA states that have to be traced in the state
-    //      sets during the building of the DFA. Its unfortunate that it
-    //      has to be stored redundantly, but we need to fault in the
-    //      state set members and they have to be sized to this size. We
-    //      init to to -1 so it will cause an error if its used without
-    //      being initialized.
-    // -------------------------------------------------------------------
-    private int         fType;
-    private CMStateSet  fFirstPos   = null;
-    private CMStateSet  fFollowPos  = null;
-    private CMStateSet  fLastPos    = null;
-    private int         fMaxStates  = -1;
-};
-
-
diff --git a/src/org/apache/xerces/impl/dtd/models/CMStateSet.java b/src/org/apache/xerces/impl/dtd/models/CMStateSet.java
deleted file mode 100644
index 1830686..0000000
--- a/src/org/apache/xerces/impl/dtd/models/CMStateSet.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-
-/**
- * This class is a very simple bitset class. The DFA content model code needs
- * to support a bit set, but the java BitSet class is way, way overkill. Our
- * bitset never needs to be expanded after creation, hash itself, etc...
- *
- * Since the vast majority of content models will never require more than 64
- * bits, and since allocation of anything in Java is expensive, this class
- * provides a hybrid implementation that uses two ints for instances that use
- * 64 bits or fewer. It has a byte array reference member which will only be
- * used if more than 64 bits are required.
- *
- * Note that the code that uses this class will never perform operations
- * on sets of different sizes, so that check does not have to be made here.
- *
- * @version $Id$
- */
-// made this class public so it can be accessed by
-// the XS content models from the schema package -neilg.
-public class CMStateSet
-{
-    // -------------------------------------------------------------------
-    //  Constructors
-    // -------------------------------------------------------------------
-    public CMStateSet(int bitCount) 
-    {
-        // Store the required bit count and insure its legal
-        fBitCount = bitCount;
-        if (fBitCount < 0)
-            throw new RuntimeException("ImplementationMessages.VAL_CMSI");
-
-        //
-        //  See if we need to allocate the byte array or whether we can live
-        //  within the 64 bit high performance scheme.
-        //
-        if (fBitCount > 64)
-        {
-            fByteCount = fBitCount / 8;
-            if (fBitCount % 8 != 0)
-                fByteCount++;
-            fByteArray = new byte[fByteCount];
-        }
-
-        // Init all the bits to zero
-        zeroBits();
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Public inherited methods
-    // -------------------------------------------------------------------
-    public String toString()
-    {
-        StringBuffer strRet = new StringBuffer();
-        try
-        {
-            strRet.append("{");
-            for (int index = 0; index < fBitCount; index++)
-            {
-                if (getBit(index))
-                    strRet.append(" " + index);
-            }
-            strRet.append(" }");
-        }
-
-        catch(RuntimeException exToCatch)
-        {
-            //
-            //  We know this won't happen but we have to catch it to avoid it
-            //  having to be in our 'throws' list.
-            //
-        }
-        return strRet.toString();
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package final methods
-    // -------------------------------------------------------------------
-// the XS content models from the schema package -neilg.
-    public final void intersection(CMStateSet setToAnd)
-    {
-        if (fBitCount < 65)
-        {
-            fBits1 &= setToAnd.fBits1;
-            fBits2 &= setToAnd.fBits2;
-        }
-         else
-        {
-            for (int index = fByteCount - 1; index >= 0; index--)
-                fByteArray[index] &= setToAnd.fByteArray[index];
-        }
-    }
-
-    public final boolean getBit(int bitToGet) 
-    {
-        if (bitToGet >= fBitCount)
-            throw new RuntimeException("ImplementationMessages.VAL_CMSI");
-
-        if (fBitCount < 65)
-        {
-            final int mask = (0x1 << (bitToGet % 32));
-            if (bitToGet < 32)
-                return (fBits1 & mask) != 0;
-            else
-                return (fBits2 & mask) != 0;
-        }
-         else
-        {
-            // Create the mask and byte values
-            final byte mask = (byte)(0x1 << (bitToGet % 8));
-            final int ofs = bitToGet >> 3;
-
-            // And access the right bit and byte
-            return ((fByteArray[ofs] & mask) != 0);
-        }
-    }
-
-    public final boolean isEmpty()
-    {
-        if (fBitCount < 65)
-        {
-            return ((fBits1 == 0) && (fBits2 == 0));
-        }
-         else
-        {
-            for (int index = fByteCount - 1; index >= 0; index--)
-            {
-                if (fByteArray[index] != 0)
-                    return false;
-            }
-        }
-        return true;
-    }
-
-    final boolean isSameSet(CMStateSet setToCompare)
-    {
-        if (fBitCount != setToCompare.fBitCount)
-            return false;
-
-        if (fBitCount < 65)
-        {
-            return ((fBits1 == setToCompare.fBits1)
-            &&      (fBits2 == setToCompare.fBits2));
-        }
-
-        for (int index = fByteCount - 1; index >= 0; index--)
-        {
-            if (fByteArray[index] != setToCompare.fByteArray[index])
-                return false;
-        }
-        return true;
-    }
-
-// the XS content models from the schema package -neilg.
-    public final void union(CMStateSet setToOr)
-    {
-        if (fBitCount < 65)
-        {
-            fBits1 |= setToOr.fBits1;
-            fBits2 |= setToOr.fBits2;
-        }
-         else
-        {
-            for (int index = fByteCount - 1; index >= 0; index--)
-                fByteArray[index] |= setToOr.fByteArray[index];
-        }
-    }
-
-    public final void setBit(int bitToSet) 
-    {
-        if (bitToSet >= fBitCount)
-            throw new RuntimeException("ImplementationMessages.VAL_CMSI");
-
-        if (fBitCount < 65)
-        {
-            final int mask = (0x1 << (bitToSet % 32));
-            if (bitToSet < 32)
-            {
-                fBits1 &= ~mask;
-                fBits1 |= mask;
-            }
-             else
-            {
-                fBits2 &= ~mask;
-                fBits2 |= mask;
-            }
-        }
-         else
-        {
-            // Create the mask and byte values
-            final byte mask = (byte)(0x1 << (bitToSet % 8));
-            final int ofs = bitToSet >> 3;
-
-            // And access the right bit and byte
-            fByteArray[ofs] &= ~mask;
-            fByteArray[ofs] |= mask;
-        }
-    }
-
-// the XS content models from the schema package -neilg.
-    public final void setTo(CMStateSet srcSet) 
-    {
-        // They have to be the same size
-        if (fBitCount != srcSet.fBitCount)
-            throw new RuntimeException("ImplementationMessages.VAL_CMSI");
-        
-        if (fBitCount < 65)
-        {
-            fBits1 = srcSet.fBits1;
-            fBits2 = srcSet.fBits2;
-        }
-         else
-        {
-            for (int index = fByteCount - 1; index >= 0; index--)
-                fByteArray[index] = srcSet.fByteArray[index];
-        }
-    }
-
-    // had to make this method public so it could be accessed from
-    // schema package - neilg.
-    public final void zeroBits()
-    {
-        if (fBitCount < 65)
-        {
-            fBits1 = 0;
-            fBits2 = 0;
-        }
-         else
-        {
-            for (int index = fByteCount - 1; index >= 0; index--)
-                fByteArray[index] = 0;
-        }
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Private data members
-    //
-    //  fBitCount
-    //      The count of bits that the outside world wants to support,
-    //      so its the max bit index plus one.
-    //
-    //  fByteCount
-    //      If the bit count is > 64, then we use the fByteArray member to
-    //      store the bits, and this indicates its size in bytes. Otherwise
-    //      its value is meaningless.
-    //
-    //  fBits1
-    //  fBits2
-    //      When the bit count is < 64 (very common), these hold the bits.
-    //      Otherwise, the fByteArray member holds htem.
-    // -------------------------------------------------------------------
-    int         fBitCount;
-    int         fByteCount;
-    int         fBits1;
-    int         fBits2;
-    byte[]      fByteArray;
-    /* Optimization(Jan, 2001) */
-    public boolean equals(Object o) {
-	if (!(o instanceof CMStateSet)) return false;
-	return isSameSet((CMStateSet)o);
-    }
-
-    public int hashCode() {
-        if (fBitCount < 65)
-        {
-            return fBits1+ fBits2 * 31;
-        }
-         else
-        {
-            int hash = 0;
-            for (int index = fByteCount - 1; index >= 0; index--)
-                hash = fByteArray[index] + hash * 31;
-            return hash;
-        }
-    }
-   /* Optimization(Jan, 2001) */
-};
diff --git a/src/org/apache/xerces/impl/dtd/models/CMUniOp.java b/src/org/apache/xerces/impl/dtd/models/CMUniOp.java
deleted file mode 100644
index 5932451..0000000
--- a/src/org/apache/xerces/impl/dtd/models/CMUniOp.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-
-/**
- *
- * Content model Uni-Op node.
- *
- * @version $Id$
- */
-public class CMUniOp extends CMNode
-{
-    // -------------------------------------------------------------------
-    //  Constructors
-    // -------------------------------------------------------------------
-    public CMUniOp(int type, CMNode childNode) 
-    {
-        super(type);
-
-        // Insure that its one of the types we require
-        if ((type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
-        &&  (type() != XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
-        &&  (type() != XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE))
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_UST");
-        }
-
-        // Store the node and init any data that needs it
-        fChild = childNode;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, final methods
-    // -------------------------------------------------------------------
-    final CMNode getChild()
-    {
-        return fChild;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, inherited methods
-    // -------------------------------------------------------------------
-    public boolean isNullable() 
-    {
-        //
-        //  For debugging purposes, make sure we got rid of all non '*'
-        //  repetitions. Otherwise, '*' style nodes are always nullable.
-        //
-        if (type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
-	    return fChild.isNullable();
-	else
-	    return true;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Protected, inherited methods
-    // -------------------------------------------------------------------
-    protected void calcFirstPos(CMStateSet toSet) 
-    {
-        // Its just based on our child node's first pos
-        toSet.setTo(fChild.firstPos());
-    }
-
-    protected void calcLastPos(CMStateSet toSet) 
-    {
-        // Its just based on our child node's last pos
-        toSet.setTo(fChild.lastPos());
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Private data members
-    //
-    //  fChild
-    //      This is the reference to the one child that we have for this
-    //      unary operation.
-    // -------------------------------------------------------------------
-    private CMNode  fChild;
-};
-
diff --git a/src/org/apache/xerces/impl/dtd/models/ContentModelValidator.java b/src/org/apache/xerces/impl/dtd/models/ContentModelValidator.java
deleted file mode 100644
index b23c401..0000000
--- a/src/org/apache/xerces/impl/dtd/models/ContentModelValidator.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.xni.QName;
-
-/**
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @version $Id$
- */
-public interface ContentModelValidator {
-
-    //
-    // Methods
-    //
-
-    /**
-     * validate
-     * 
-     * @param children 
-     * @param offset 
-     * @param length 
-     * 
-     * @return 
-     */
-    public int validate(QName[] children, int offset, int length);
-
-} // interface ContentModelValidator
diff --git a/src/org/apache/xerces/impl/dtd/models/DFAContentModel.java b/src/org/apache/xerces/impl/dtd/models/DFAContentModel.java
deleted file mode 100644
index e717ed1..0000000
--- a/src/org/apache/xerces/impl/dtd/models/DFAContentModel.java
+++ /dev/null
@@ -1,1061 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- *
- * DFAContentModel is the derivative of ContentModel that does
- * all of the non-trivial element content validation. This class does 
- * the conversion from the regular expression to the DFA that 
- * it then uses in its validation algorithm.
- * <p>
- * <b>Note:</b> Upstream work insures that this class will never see
- * a content model with PCDATA in it. Any model with PCDATA is 'mixed' 
- * and is handled via the MixedContentModel class since mixed models 
- * are very constrained in form and easily handled via a special case. 
- * This also makes implementation of this class much easier.
- *
- */
-public class DFAContentModel
-    implements ContentModelValidator {
-
-    //
-    // Constants
-    //
-    // special strings
-
-    /** Epsilon string. */
-    private static String fEpsilonString = "<<CMNODE_EPSILON>>";
-
-    /** End-of-content string. */
-    private static String fEOCString = "<<CMNODE_EOC>>";
-
-    /** initializing static members **/
-    static {
-        fEpsilonString = fEpsilonString.intern();
-        fEOCString = fEOCString.intern();
-    }
-
-    // debugging
-
-    /** Set to true to debug content model validation. */
-    private static final boolean DEBUG_VALIDATE_CONTENT = false;
-
-    //
-    // Data
-    //
-
-    /* this is the EquivClassComparator object */
-    //private EquivClassComparator comparator = null;
-
-    /**
-     * This is the map of unique input symbol elements to indices into
-     * each state's per-input symbol transition table entry. This is part
-     * of the built DFA information that must be kept around to do the
-     * actual validation.
-     */
-    private QName fElemMap[] = null;
-
-    /**
-     * This is a map of whether the element map contains information 
-     * related to ANY models.
-     */
-    private int fElemMapType[] = null;
-
-    /** The element map size. */
-    private int fElemMapSize = 0;
-
-    /** Boolean to allow DTDs to validate even with namespace support. */
-    private boolean fDTD;
-
-    /** Boolean to distinguish Schema Mixed Content */
-    private boolean fMixed;
-
-    /**
-     * The NFA position of the special EOC (end of content) node. This
-     * is saved away since it's used during the DFA build.
-     */
-    private int fEOCPos = 0;
-
-
-    /**
-     * This is an array of booleans, one per state (there are
-     * fTransTableSize states in the DFA) that indicates whether that
-     * state is a final state.
-     */
-    private boolean fFinalStateFlags[] = null;
-
-    /**
-     * The list of follow positions for each NFA position (i.e. for each
-     * non-epsilon leaf node.) This is only used during the building of
-     * the DFA, and is let go afterwards.
-     */
-    private CMStateSet fFollowList[] = null;
-
-    /**
-     * This is the head node of our intermediate representation. It is
-     * only non-null during the building of the DFA (just so that it
-     * does not have to be passed all around.) Once the DFA is built,
-     * this is no longer required so its nulled out.
-     */
-    private CMNode fHeadNode = null;
-
-    /**
-     * The count of leaf nodes. This is an important number that set some
-     * limits on the sizes of data structures in the DFA process.
-     */
-    private int fLeafCount = 0;
-
-    /**
-     * An array of non-epsilon leaf nodes, which is used during the DFA
-     * build operation, then dropped.
-     */
-    private CMLeaf fLeafList[] = null;
-
-    /** Array mapping ANY types to the leaf list. */
-    private int fLeafListType[] = null;
-
-    //private ContentLeafNameTypeVector fLeafNameTypeVector = null;
-
-    /**
-     * The string pool of our parser session. This is set during construction
-     * and kept around.
-     */
-    //private StringPool fStringPool = null;
-
-    /**
-     * This is the transition table that is the main by product of all
-     * of the effort here. It is an array of arrays of ints. The first
-     * dimension is the number of states we end up with in the DFA. The
-     * second dimensions is the number of unique elements in the content
-     * model (fElemMapSize). Each entry in the second dimension indicates
-     * the new state given that input for the first dimension's start
-     * state.
-     * <p>
-     * The fElemMap array handles mapping from element indexes to
-     * positions in the second dimension of the transition table.
-     */
-    private int fTransTable[][] = null;
-
-    /**
-     * The number of valid entries in the transition table, and in the other
-     * related tables such as fFinalStateFlags.
-     */
-    private int fTransTableSize = 0;
-
-    /**
-     * Flag that indicates that even though we have a "complicated"
-     * content model, it is valid to have no content. In other words,
-     * all parts of the content model are optional. For example:
-     * <pre>
-     *      &lt;!ELEMENT AllOptional (Optional*,NotRequired?)&gt;
-     * </pre>
-     */
-    private boolean fEmptyContentIsValid = false;
-
-    // temp variables
-
-    /** Temporary qualified name. */
-    private QName fQName = new QName();
-
-    //
-    // Constructors
-    //
-
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a DFA content model.
-     *
-     * @param syntaxTree    The syntax tree of the content model.
-     * @param leafCount     The number of leaves.
-     * @param dtd           if it is created for a DTDGrammar.
-     *
-     */
-
-    public DFAContentModel(CMNode syntaxTree, int leafCount, boolean dtd, boolean mixed) {
-        // Store away our index and pools in members
-        //fStringPool = stringPool;
-        fLeafCount = leafCount;
-
-
-        fDTD = dtd;
-
-        // this is for Schema Mixed Content
-        fMixed = mixed;
-
-        //
-        //  Ok, so lets grind through the building of the DFA. This method
-        //  handles the high level logic of the algorithm, but it uses a
-        //  number of helper classes to do its thing.
-        //
-        //  In order to avoid having hundreds of references to the error and
-        //  string handlers around, this guy and all of his helper classes
-        //  just throw a simple exception and we then pass it along.
-        //
-        buildDFA(syntaxTree);
-    }
-
-    //
-    // ContentModelValidator methods
-    //
-
-    /**
-     * Check that the specified content is valid according to this
-     * content model. This method can also be called to do 'what if' 
-     * testing of content models just to see if they would be valid.
-     * <p>
-     * A value of -1 in the children array indicates a PCDATA node. All other 
-     * indexes will be positive and represent child elements. The count can be
-     * zero, since some elements have the EMPTY content model and that must be 
-     * confirmed.
-     *
-     * @param children The children of this element.  Each integer is an index within
-     *                 the <code>StringPool</code> of the child element name.  An index
-     *                 of -1 is used to indicate an occurrence of non-whitespace character
-     *                 data.
-     * @param offset Offset into the array where the children starts.
-     * @param length The number of entries in the <code>children</code> array.
-     *
-     * @return The value -1 if fully valid, else the 0 based index of the child
-     *         that first failed. If the value returned is equal to the number
-     *         of children, then the specified children are valid but additional
-     *         content is required to reach a valid ending state.
-     *
-     */
-    public int validate(QName[] children, int offset, int length) {
-
-        if (DEBUG_VALIDATE_CONTENT) 
-            System.out.println("DFAContentModel#validateContent");
-
-        //
-        // A DFA content model must *always* have at least 1 child
-        // so a failure is given if no children present.
-        // 
-        // Defect 782: This is an incorrect statement because a DFA
-        // content model is also used for constructions such as:
-        //
-        //     (Optional*,NotRequired?)
-        //
-        // where a perfectly valid content would be NO CHILDREN.
-        // Therefore, if there are no children, we must check to
-        // see if the CMNODE_EOC marker is a valid start state! -Ac
-        //
-        if (length == 0) {
-            if (DEBUG_VALIDATE_CONTENT) {
-                System.out.println("!!! no children");
-                System.out.println("elemMap="+fElemMap);
-                for (int i = 0; i < fElemMap.length; i++) {
-                    String uri = fElemMap[i].uri;
-                    String localpart = fElemMap[i].localpart;
-                    
-                    System.out.println("fElemMap["+i+"]="+uri+","+
-                                       localpart+" ("+
-                                       uri+", "+
-                                       localpart+
-                                       ')');
-                                       
-                }
-                System.out.println("EOCIndex="+fEOCString);
-            }
-
-            return fEmptyContentIsValid ? -1 : 0;
-
-        } // if child count == 0
-
-        //
-        //  Lets loop through the children in the array and move our way
-        //  through the states. Note that we use the fElemMap array to map
-        //  an element index to a state index.
-        //
-        int curState = 0;
-        for (int childIndex = 0; childIndex < length; childIndex++)
-        {
-            // Get the current element index out
-            final QName curElem = children[offset + childIndex];
-            // ignore mixed text
-            if (fMixed && curElem.localpart == null) {
-                continue;
-            }
-
-            // Look up this child in our element map
-            int elemIndex = 0;
-            for (; elemIndex < fElemMapSize; elemIndex++)
-            {
-                int type = fElemMapType[elemIndex] & 0x0f ;
-                if (type == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-                    //System.out.println("fElemMap["+elemIndex+"]: "+fElemMap[elemIndex]);
-                    if (fDTD) {
-                        if (fElemMap[elemIndex].rawname == curElem.rawname) {
-                            break;
-                        }
-                    }
-                    else {
-                        if (fElemMap[elemIndex].uri==curElem.uri
-                             && fElemMap[elemIndex].localpart == curElem.localpart)
-                            break;
-                    }
-                }
-                else if (type == XMLContentSpec.CONTENTSPECNODE_ANY) {
-                    String uri = fElemMap[elemIndex].uri;
-                    if (uri == null || uri == curElem.uri) {
-                        break;
-                    }
-                }
-                else if (type == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL) {
-                    if (curElem.uri == null) {
-                        break;
-                    }
-                }
-                else if (type == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
-                    if (fElemMap[elemIndex].uri != curElem.uri) {
-                        break;
-                    }
-                }
-            }
-
-            // If we didn't find it, then obviously not valid
-            if (elemIndex == fElemMapSize) {
-                if (DEBUG_VALIDATE_CONTENT) {
-                    System.out.println("!!! didn't find it");
-
-                    System.out.println("curElem : " +curElem );
-                    for (int i=0; i<fElemMapSize; i++) {
-                        System.out.println("fElemMap["+i+"] = " +fElemMap[i] );
-                        System.out.println("fElemMapType["+i+"] = " +fElemMapType[i] );
-                    }
-                }
-
-                return childIndex;
-            }
-
-            //
-            //  Look up the next state for this input symbol when in the
-            //  current state.
-            //
-            curState = fTransTable[curState][elemIndex];
-
-            // If its not a legal transition, then invalid
-            if (curState == -1) {
-                if (DEBUG_VALIDATE_CONTENT) 
-                    System.out.println("!!! not a legal transition");
-                return childIndex;
-            }
-        }
-
-        //
-        //  We transitioned all the way through the input list. However, that
-        //  does not mean that we ended in a final state. So check whether
-        //  our ending state is a final state.
-        //
-        if (DEBUG_VALIDATE_CONTENT) 
-            System.out.println("curState="+curState+", childCount="+length);
-        if (!fFinalStateFlags[curState])
-            return length;
-
-        // success!
-        return -1;
-    } // validate
-
-
-    //
-    // Private methods
-    //
-
-    /** 
-     * Builds the internal DFA transition table from the given syntax tree.
-     *
-     * @param syntaxTree The syntax tree.
-     *
-     * @exception CMException Thrown if DFA cannot be built.
-     */
-    private void buildDFA(CMNode syntaxTree) 
-    {
-        //
-        //  The first step we need to take is to rewrite the content model
-        //  using our CMNode objects, and in the process get rid of any
-        //  repetition short cuts, converting them into '*' style repetitions
-        //  or getting rid of repetitions altogether.
-        //
-        //  The conversions done are:
-        //
-        //  x+ -> (x|x*)
-        //  x? -> (x|epsilon)
-        //
-        //  This is a relatively complex scenario. What is happening is that
-        //  we create a top level binary node of which the special EOC value
-        //  is set as the right side node. The the left side is set to the
-        //  rewritten syntax tree. The source is the original content model
-        //  info from the decl pool. The rewrite is done by buildSyntaxTree()
-        //  which recurses the decl pool's content of the element and builds
-        //  a new tree in the process.
-        //
-        //  Note that, during this operation, we set each non-epsilon leaf
-        //  node's DFA state position and count the number of such leafs, which
-        //  is left in the fLeafCount member.
-        //
-        //  The nodeTmp object is passed in just as a temp node to use during
-        //  the recursion. Otherwise, we'd have to create a new node on every
-        //  level of recursion, which would be piggy in Java (as is everything
-        //  for that matter.)
-        //
-
-	/* MODIFIED (Jan, 2001) 
-	 *
-	 * Use following rules.
-	 *   nullable(x+) := nullable(x), first(x+) := first(x),  last(x+) := last(x)
-	 *   nullable(x?) := true, first(x?) := first(x),  last(x?) := last(x)
-	 *
-	 * The same computation of follow as x* is applied to x+
-	 *
-	 * The modification drastically reduces computation time of
-	 * "(a, (b, a+, (c, (b, a+)+, a+, (d,  (c, (b, a+)+, a+)+, (b, a+)+, a+)+)+)+)+"
-	 */
-
-        fQName.setValues(null, fEOCString, fEOCString, null);
-        CMLeaf nodeEOC = new CMLeaf(fQName);
-        fHeadNode = new CMBinOp
-        (
-            XMLContentSpec.CONTENTSPECNODE_SEQ
-            , syntaxTree
-            , nodeEOC
-        );
-
-        //
-        //  And handle specially the EOC node, which also must be numbered
-        //  and counted as a non-epsilon leaf node. It could not be handled
-        //  in the above tree build because it was created before all that
-        //  started. We save the EOC position since its used during the DFA
-        //  building loop.
-        //
-        fEOCPos = fLeafCount;
-        nodeEOC.setPosition(fLeafCount++);
-
-        //
-        //  Ok, so now we have to iterate the new tree and do a little more
-        //  work now that we know the leaf count. One thing we need to do is
-        //  to calculate the first and last position sets of each node. This
-        //  is cached away in each of the nodes.
-        //
-        //  Along the way we also set the leaf count in each node as the
-        //  maximum state count. They must know this in order to create their
-        //  first/last pos sets.
-        //
-        //  We also need to build an array of references to the non-epsilon
-        //  leaf nodes. Since we iterate it in the same way as before, this
-        //  will put them in the array according to their position values.
-        //
-        fLeafList = new CMLeaf[fLeafCount];
-        fLeafListType = new int[fLeafCount];
-        postTreeBuildInit(fHeadNode, 0);
-
-        //
-        //  And, moving onward... We now need to build the follow position
-        //  sets for all the nodes. So we allocate an array of state sets,
-        //  one for each leaf node (i.e. each DFA position.)
-        //
-        fFollowList = new CMStateSet[fLeafCount];
-        for (int index = 0; index < fLeafCount; index++)
-            fFollowList[index] = new CMStateSet(fLeafCount);
-        calcFollowList(fHeadNode);
-        //
-        //  And finally the big push... Now we build the DFA using all the
-        //  states and the tree we've built up. First we set up the various
-        //  data structures we are going to use while we do this.
-        //
-        //  First of all we need an array of unique element names in our
-        //  content model. For each transition table entry, we need a set of
-        //  contiguous indices to represent the transitions for a particular
-        //  input element. So we need to a zero based range of indexes that
-        //  map to element types. This element map provides that mapping.
-        //
-        fElemMap = new QName[fLeafCount];
-        fElemMapType = new int[fLeafCount];
-        fElemMapSize = 0;
-        for (int outIndex = 0; outIndex < fLeafCount; outIndex++)
-        {
-            fElemMap[outIndex] = new QName();
-
-            /****
-            if ( (fLeafListType[outIndex] & 0x0f) != 0 ) {
-                if (fLeafNameTypeVector == null) {
-                    fLeafNameTypeVector = new ContentLeafNameTypeVector();
-                }
-            }
-            /****/
-
-            // Get the current leaf's element index
-            final QName element = fLeafList[outIndex].getElement();
-
-            // See if the current leaf node's element index is in the list
-            int inIndex = 0;
-            for (; inIndex < fElemMapSize; inIndex++)
-            {
-                if (fDTD) {
-                    if (fElemMap[inIndex].rawname == element.rawname) {
-                        break;
-                    }
-                }
-                else {
-                    if (fElemMap[inIndex].uri == element.uri &&
-                        fElemMap[inIndex].localpart == element.localpart && 
-                        fElemMapType[inIndex] == fLeafListType[outIndex] )
-                        break;
-                }
-            }
-
-            // If it was not in the list, then add it, if not the EOC node
-            if (inIndex == fElemMapSize) {
-                //if (fDTD) {
-                //    fElemMap[fElemMapSize].setValues(-1, element.rawname, element.rawname, -1);
-                //}
-                //else {
-                    fElemMap[fElemMapSize].setValues(element);
-                //}
-                fElemMapType[fElemMapSize] = fLeafListType[outIndex];
-                fElemMapSize++;
-            }
-        }
-        // set up the fLeafNameTypeVector object if there is one.
-        /*****
-        if (fLeafNameTypeVector != null) {
-            fLeafNameTypeVector.setValues(fElemMap, fElemMapType, fElemMapSize);
-        }
-
-	/*** 
-	* Optimization(Jan, 2001); We sort fLeafList according to 
-	* elemIndex which is *uniquely* associated to each leaf.  
-	* We are *assuming* that each element appears in at least one leaf.
-	**/
-
-	int[] fLeafSorter = new int[fLeafCount + fElemMapSize];
-	int fSortCount = 0;
-
-	for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
-	    for (int leafIndex = 0; leafIndex < fLeafCount; leafIndex++) {
-		final QName leaf = fLeafList[leafIndex].getElement();
-		final QName element = fElemMap[elemIndex];
-		if (fDTD) {
-		    if (leaf.rawname == element.rawname) {
-			fLeafSorter[fSortCount++] = leafIndex;
-		    }
-		}
-		else {
-		    if (leaf.uri == element.uri &&
-			leaf.localpart == element.localpart)
-			fLeafSorter[fSortCount++] = leafIndex;
-		}
-	    }
-	    fLeafSorter[fSortCount++] = -1;
-	}
-
-	/* Optimization(Jan, 2001) */
-
-        //
-        //  Next lets create some arrays, some that that hold transient
-        //  information during the DFA build and some that are permament.
-        //  These are kind of sticky since we cannot know how big they will
-        //  get, but we don't want to use any Java collections because of
-        //  performance.
-        //
-        //  Basically they will probably be about fLeafCount*2 on average,
-        //  but can be as large as 2^(fLeafCount*2), worst case. So we start
-        //  with fLeafCount*4 as a middle ground. This will be very unlikely
-        //  to ever have to expand, though it if does, the overhead will be
-        //  somewhat ugly.
-        //
-        int curArraySize = fLeafCount * 4;
-        CMStateSet[] statesToDo = new CMStateSet[curArraySize];
-        fFinalStateFlags = new boolean[curArraySize];
-        fTransTable = new int[curArraySize][];
-
-        //
-        //  Ok we start with the initial set as the first pos set of the
-        //  head node (which is the seq node that holds the content model
-        //  and the EOC node.)
-        //
-        CMStateSet setT = fHeadNode.firstPos();
-
-        //
-        //  Init our two state flags. Basically the unmarked state counter
-        //  is always chasing the current state counter. When it catches up,
-        //  that means we made a pass through that did not add any new states
-        //  to the lists, at which time we are done. We could have used a
-        //  expanding array of flags which we used to mark off states as we
-        //  complete them, but this is easier though less readable maybe.
-        //
-        int unmarkedState = 0;
-        int curState = 0;
-
-        //
-        //  Init the first transition table entry, and put the initial state
-        //  into the states to do list, then bump the current state.
-        //
-        fTransTable[curState] = makeDefStateList();
-        statesToDo[curState] = setT;
-        curState++;
-
-	    /* Optimization(Jan, 2001); This is faster for
-	     * a large content model such as, "(t001+|t002+|.... |t500+)".
-	     */
-
-	java.util.Hashtable stateTable = new java.util.Hashtable();
-
-	    /* Optimization(Jan, 2001) */
-
-        //
-        //  Ok, almost done with the algorithm... We now enter the
-        //  loop where we go until the states done counter catches up with
-        //  the states to do counter.
-        //
-        while (unmarkedState < curState)
-        {
-            //
-            //  Get the first unmarked state out of the list of states to do.
-            //  And get the associated transition table entry.
-            //
-            setT = statesToDo[unmarkedState];
-            int[] transEntry = fTransTable[unmarkedState];
-
-            // Mark this one final if it contains the EOC state
-            fFinalStateFlags[unmarkedState] = setT.getBit(fEOCPos);
-
-            // Bump up the unmarked state count, marking this state done
-            unmarkedState++;
-
-            // Loop through each possible input symbol in the element map
-            CMStateSet newSet = null;
-	    /* Optimization(Jan, 2001) */
-            int sorterIndex = 0;
-	    /* Optimization(Jan, 2001) */
-            for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++)
-            {
-                //
-                //  Build up a set of states which is the union of all of
-                //  the follow sets of DFA positions that are in the current
-                //  state. If we gave away the new set last time through then
-                //  create a new one. Otherwise, zero out the existing one.
-                //
-                if (newSet == null)
-                    newSet = new CMStateSet(fLeafCount);
-                else
-                    newSet.zeroBits();
-
-	    /* Optimization(Jan, 2001) */
-                int leafIndex = fLeafSorter[sorterIndex++];
-
-                while (leafIndex != -1) {
-	        // If this leaf index (DFA position) is in the current set...
-                    if (setT.getBit(leafIndex))
-                    {
-                        //
-                        //  If this leaf is the current input symbol, then we
-                        //  want to add its follow list to the set of states to
-                        //  transition to from the current state.
-                        //
-                                newSet.union(fFollowList[leafIndex]);
-                            }
-
-                   leafIndex = fLeafSorter[sorterIndex++];
-	}
-	    /* Optimization(Jan, 2001) */
-
-                //
-                //  If this new set is not empty, then see if its in the list
-                //  of states to do. If not, then add it.
-                //
-                if (!newSet.isEmpty())
-                {
-                    //
-                    //  Search the 'states to do' list to see if this new
-                    //  state set is already in there.
-                    //
-
-	    /* Optimization(Jan, 2001) */
-	    Integer stateObj = (Integer)stateTable.get(newSet);
-	    int stateIndex = (stateObj == null ? curState : stateObj.intValue());
-	    /* Optimization(Jan, 2001) */
-
-                    // If we did not find it, then add it
-                    if (stateIndex == curState)
-                    {
-                        //
-                        //  Put this new state into the states to do and init
-                        //  a new entry at the same index in the transition
-                        //  table.
-                        //
-                        statesToDo[curState] = newSet;
-                        fTransTable[curState] = makeDefStateList();
-
-	    /* Optimization(Jan, 2001) */
-                        stateTable.put(newSet, new Integer(curState));
-	    /* Optimization(Jan, 2001) */
-
-                        // We now have a new state to do so bump the count
-                        curState++;
-
-                        //
-                        //  Null out the new set to indicate we adopted it.
-                        //  This will cause the creation of a new set on the
-                        //  next time around the loop.
-                        //
-                        newSet = null;
-                    }
-
-                    //
-                    //  Now set this state in the transition table's entry
-                    //  for this element (using its index), with the DFA
-                    //  state we will move to from the current state when we
-                    //  see this input element.
-                    //
-                    transEntry[elemIndex] = stateIndex;
-
-                    // Expand the arrays if we're full
-                    if (curState == curArraySize)
-                    {
-                        //
-                        //  Yikes, we overflowed the initial array size, so
-                        //  we've got to expand all of these arrays. So adjust
-                        //  up the size by 50% and allocate new arrays.
-                        //
-                        final int newSize = (int)(curArraySize * 1.5);
-                        CMStateSet[] newToDo = new CMStateSet[newSize];
-                        boolean[] newFinalFlags = new boolean[newSize];
-                        int[][] newTransTable = new int[newSize][];
-
-                        // Copy over all of the existing content
-                        for (int expIndex = 0; expIndex < curArraySize; expIndex++)
-                        {
-                            newToDo[expIndex] = statesToDo[expIndex];
-                            newFinalFlags[expIndex] = fFinalStateFlags[expIndex];
-                            newTransTable[expIndex] = fTransTable[expIndex];
-                        }
-
-                        // Store the new array size
-                        curArraySize = newSize;
-                        statesToDo = newToDo;
-                        fFinalStateFlags = newFinalFlags;
-                        fTransTable = newTransTable;
-                    }
-                }
-            }
-        }
-
-        // Check to see if we can set the fEmptyContentIsValid flag.
-        fEmptyContentIsValid = ((CMBinOp)fHeadNode).getLeft().isNullable();
-
-        //
-        //  And now we can say bye bye to the temp representation since we've
-        //  built the DFA.
-        //
-        if (DEBUG_VALIDATE_CONTENT) 
-            dumpTree(fHeadNode, 0);
-        fHeadNode = null;
-        fLeafList = null;
-        fFollowList = null;
-
-    }
-
-    /**
-     * Calculates the follow list of the current node.
-     *
-     * @param nodeCur The curent node.
-     *
-     * @exception CMException Thrown if follow list cannot be calculated.
-     */
-    private void calcFollowList(CMNode nodeCur) 
-    {
-        // Recurse as required
-        if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-        {
-            // Recurse only
-            calcFollowList(((CMBinOp)nodeCur).getLeft());
-            calcFollowList(((CMBinOp)nodeCur).getRight());
-        }
-         else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_SEQ)
-        {
-            // Recurse first
-            calcFollowList(((CMBinOp)nodeCur).getLeft());
-            calcFollowList(((CMBinOp)nodeCur).getRight());
-
-            //
-            //  Now handle our level. We use our left child's last pos
-            //  set and our right child's first pos set, so go ahead and
-            //  get them ahead of time.
-            //
-            final CMStateSet last  = ((CMBinOp)nodeCur).getLeft().lastPos();
-            final CMStateSet first = ((CMBinOp)nodeCur).getRight().firstPos();
-
-            //
-            //  Now, for every position which is in our left child's last set
-            //  add all of the states in our right child's first set to the
-            //  follow set for that position.
-            //
-            for (int index = 0; index < fLeafCount; index++)
-            {
-                if (last.getBit(index))
-                    fFollowList[index].union(first);
-            }
-        }
-         /***
-         else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
-        {
-            // Recurse first
-            calcFollowList(((CMUniOp)nodeCur).getChild());
-
-            //
-            //  Now handle our level. We use our own first and last position
-            //  sets, so get them up front.
-            //
-            final CMStateSet first = nodeCur.firstPos();
-            final CMStateSet last  = nodeCur.lastPos();
-
-            //
-            //  For every position which is in our last position set, add all
-            //  of our first position states to the follow set for that
-            //  position.
-            //
-            for (int index = 0; index < fLeafCount; index++)
-            {
-                if (last.getBit(index))
-                    fFollowList[index].union(first);
-            }
-        }
-         else if ((nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
-              ||  (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE))
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_NIICM");
-        }
-        /***/
-         else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE
-	    || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
-        {
-            // Recurse first
-            calcFollowList(((CMUniOp)nodeCur).getChild());
-
-            //
-            //  Now handle our level. We use our own first and last position
-            //  sets, so get them up front.
-            //
-            final CMStateSet first = nodeCur.firstPos();
-            final CMStateSet last  = nodeCur.lastPos();
-
-            //
-            //  For every position which is in our last position set, add all
-            //  of our first position states to the follow set for that
-            //  position.
-            //
-            for (int index = 0; index < fLeafCount; index++)
-            {
-                if (last.getBit(index))
-                    fFollowList[index].union(first);
-            }
-        }
-       
-        else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE) {
-            // Recurse only
-            calcFollowList(((CMUniOp)nodeCur).getChild());
-        }
-         /***/
-    }
-
-    /**
-     * Dumps the tree of the current node to standard output.
-     *
-     * @param nodeCur The current node.
-     * @param level   The maximum levels to output.
-     *
-     * @exception CMException Thrown on error.
-     */
-    private void dumpTree(CMNode nodeCur, int level) 
-    {
-        for (int index = 0; index < level; index++)
-            System.out.print("   ");
-
-        int type = nodeCur.type();
-        if ((type == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-        ||  (type == XMLContentSpec.CONTENTSPECNODE_SEQ))
-        {
-            if (type == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-                System.out.print("Choice Node ");
-            else
-                System.out.print("Seq Node ");
-
-            if (nodeCur.isNullable())
-                System.out.print("Nullable ");
-
-            System.out.print("firstPos=");
-            System.out.print(nodeCur.firstPos().toString());
-            System.out.print(" lastPos=");
-            System.out.println(nodeCur.lastPos().toString());
-
-            dumpTree(((CMBinOp)nodeCur).getLeft(), level+1);
-            dumpTree(((CMBinOp)nodeCur).getRight(), level+1);
-        }
-         else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE)
-        {
-            System.out.print("Rep Node ");
-
-            if (nodeCur.isNullable())
-                System.out.print("Nullable ");
-
-            System.out.print("firstPos=");
-            System.out.print(nodeCur.firstPos().toString());
-            System.out.print(" lastPos=");
-            System.out.println(nodeCur.lastPos().toString());
-
-            dumpTree(((CMUniOp)nodeCur).getChild(), level+1);
-        }
-         else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_LEAF)
-        {
-            System.out.print
-            (
-                "Leaf: (pos="
-                + ((CMLeaf)nodeCur).getPosition()
-                + "), "
-                + ((CMLeaf)nodeCur).getElement()
-                + "(elemIndex="
-                + ((CMLeaf)nodeCur).getElement()
-                + ") "
-            );
-
-            if (nodeCur.isNullable())
-                System.out.print(" Nullable ");
-
-            System.out.print("firstPos=");
-            System.out.print(nodeCur.firstPos().toString());
-            System.out.print(" lastPos=");
-            System.out.println(nodeCur.lastPos().toString());
-        }
-         else
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_NIICM");
-        }
-    }
-
-
-    /**
-     * -1 is used to represent bad transitions in the transition table
-     * entry for each state. So each entry is initialized to an all -1
-     * array. This method creates a new entry and initializes it.
-     */
-    private int[] makeDefStateList()
-    {
-        int[] retArray = new int[fElemMapSize];
-        for (int index = 0; index < fElemMapSize; index++)
-            retArray[index] = -1;
-        return retArray;
-    }
-
-    /** Post tree build initialization. */
-    private int postTreeBuildInit(CMNode nodeCur, int curIndex) 
-    {
-        // Set the maximum states on this node
-        nodeCur.setMaxStates(fLeafCount);
-
-        // Recurse as required
-        if ((nodeCur.type() & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY ||
-            (nodeCur.type() & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL ||
-            (nodeCur.type() & 0x0f) == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
-            // REVISIT: Don't waste these structures.
-            QName qname = new QName(null, null, null, ((CMAny)nodeCur).getURI());
-            fLeafList[curIndex] = new CMLeaf(qname, ((CMAny)nodeCur).getPosition());
-            fLeafListType[curIndex] = nodeCur.type();
-            curIndex++;
-        }
-        else if ((nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_CHOICE)
-        ||  (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_SEQ))
-        {
-            curIndex = postTreeBuildInit(((CMBinOp)nodeCur).getLeft(), curIndex);
-            curIndex = postTreeBuildInit(((CMBinOp)nodeCur).getRight(), curIndex);
-        }
-         else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE
-	     || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE
-	     || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
-        {
-            curIndex = postTreeBuildInit(((CMUniOp)nodeCur).getChild(), curIndex);
-        }
-         else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_LEAF)
-        {
-            //
-            //  Put this node in the leaf list at the current index if its
-            //  a non-epsilon leaf.
-            //
-             final QName node = ((CMLeaf)nodeCur).getElement();
-            if (node.localpart != fEpsilonString) {
-                fLeafList[curIndex] = (CMLeaf)nodeCur;
-                fLeafListType[curIndex] = XMLContentSpec.CONTENTSPECNODE_LEAF;
-                curIndex++;
-            }
-        }
-         else
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_NIICM: type="+nodeCur.type());
-        }
-        return curIndex;
-    }
-
-} // class DFAContentModel
diff --git a/src/org/apache/xerces/impl/dtd/models/MixedContentModel.java b/src/org/apache/xerces/impl/dtd/models/MixedContentModel.java
deleted file mode 100644
index e50864c..0000000
--- a/src/org/apache/xerces/impl/dtd/models/MixedContentModel.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.xni.QName;
-
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- *
- * MixedContentModel is a derivative of the abstract content model base
- * class that handles the special case of mixed model elements. If an element
- * is mixed model, it has PCDATA as its first possible content, followed
- * by an alternation of the possible children. The children cannot have any
- * numeration or order, so it must look like this:
- * <pre>
- *   &lt;!ELEMENT Foo ((#PCDATA|a|b|c|)*)&gt;
- * </pre>
- * So, all we have to do is to keep an array of the possible children and
- * validate by just looking up each child being validated by looking it up
- * in the list.
- *
- */
-public class MixedContentModel
-    implements ContentModelValidator {
-
-    //
-    // Data
-    //
-
-    /** The count of possible children that we have to deal with. */
-    private int fCount;
-
-    /** The list of possible children that we have to accept. */
-    private QName fChildren[];
-
-    /** The type of the children to support ANY. */
-    private int fChildrenType[];
-
-    /* this is the EquivClassComparator object */
-    //private EquivClassComparator comparator = null;
-    
-    /** 
-     * True if mixed content model is ordered. DTD mixed content models
-     * are <em>always</em> unordered.
-     */
-    private boolean fOrdered;
-
-    /** Boolean to allow DTDs to validate even with namespace support. */
-    private boolean fDTD;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a mixed content model.
-     *
-     * @param children The list of allowed children.
-     * @param type The list of the types of the children.
-     * @param offset The start offset position in the children.
-     * @param length The child count.
-     * @param ordered True if content must be ordered.
-     * @param dtd True if it is for a DTDGrammar.
-     *
-     */
-    public MixedContentModel(QName[] children, int[] type, int offset, int length , boolean ordered, boolean dtd) {
-        // Make our own copy now, which is exactly the right size
-        fCount = length;
-        fChildren = new QName[fCount];
-        fChildrenType = new int[fCount];
-        for (int i = 0; i < fCount; i++) {
-            fChildren[i] = new QName(children[offset + i]);
-            fChildrenType[i] = type[offset + i];
-        }
-        fOrdered = ordered;
-
-        fDTD = dtd;
-
-    }
-
-    //
-    // ContentModelValidator methods
-    //
-
-    /**
-     * validate
-     * 
-     * @param children 
-     * @param offset 
-     * @param length 
-     * 
-     * @return 
-     */
-    
-    /**
-     * Check that the specified content is valid according to this
-     * content model. This method can also be called to do 'what if' 
-     * testing of content models just to see if they would be valid.
-     * <p>
-     * A value of -1 in the children array indicates a PCDATA node. All other 
-     * indexes will be positive and represent child elements. The count can be
-     * zero, since some elements have the EMPTY content model and that must be 
-     * confirmed.
-     *
-     * @param children The children of this element.  Each integer is an index within
-     *                 the <code>StringPool</code> of the child element name.  An index
-     *                 of -1 is used to indicate an occurrence of non-whitespace character
-     *                 data.
-     * @param offset Offset into the array where the children starts.
-     * @param length The number of entries in the <code>children</code> array.
-     *
-     * @return The value -1 if fully valid, else the 0 based index of the child
-     *         that first failed. If the value returned is equal to the number
-     *         of children, then the specified children are valid but additional
-     *         content is required to reach a valid ending state.
-     *
-     */
-    public int validate(QName[] children, int offset, int length) {
-        
-        // must match order
-        if (fOrdered) {
-            int inIndex = 0;
-            for (int outIndex = 0; outIndex < length; outIndex++) {
-
-                // ignore mixed text
-                final QName curChild = children[offset + outIndex];
-                if (curChild.localpart == null) {
-                    continue;
-                }
-
-                // element must match
-                int type = fChildrenType[inIndex];
-                if (type == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-                    if (fDTD) {
-                        if (fChildren[inIndex].rawname != children[offset + outIndex].rawname) {
-                            return outIndex;
-                        }
-                    }
-                    else {
-                        if (fChildren[inIndex].uri != children[offset + outIndex].uri &&
-                            fChildren[inIndex].localpart != children[offset + outIndex].localpart) {
-                            return outIndex;
-                        }
-                    }
-                }
-                else if (type == XMLContentSpec.CONTENTSPECNODE_ANY) {
-                    String uri = fChildren[inIndex].uri;
-                    if (uri != null && uri != children[outIndex].uri) {
-                        return outIndex;
-                    }
-                }
-                else if (type == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL) {
-                    if (children[outIndex].uri != null) {
-                        return outIndex;
-                    }
-                }
-                else if (type == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
-                    if (fChildren[inIndex].uri == children[outIndex].uri) {
-                        return outIndex;
-                    }
-                }
-                
-                // advance index
-                inIndex++;
-            }
-        }
-
-        // can appear in any order
-        else {
-            for (int outIndex = 0; outIndex < length; outIndex++)
-            {
-                // Get the current child out of the source index
-                final QName curChild = children[offset + outIndex];
-    
-                // If its PCDATA, then we just accept that
-                if (curChild.localpart == null)
-                    continue;
-    
-                // And try to find it in our list
-                int inIndex = 0;
-                for (; inIndex < fCount; inIndex++)
-                {
-                    int type = fChildrenType[inIndex];
-                    if (type == XMLContentSpec.CONTENTSPECNODE_LEAF) {
-                        if (fDTD) {
-                            if (curChild.rawname == fChildren[inIndex].rawname) {
-                                break;
-                            }
-                        }
-                        else {
-                            if (curChild.uri == fChildren[inIndex].uri &&
-                                curChild.localpart == fChildren[inIndex].localpart)
-                                break;
-                        }
-                    }
-                    else if (type == XMLContentSpec.CONTENTSPECNODE_ANY) {
-                        String uri = fChildren[inIndex].uri;
-                        if (uri == null || uri == children[outIndex].uri) {
-                            break;
-                        }
-                    }
-                    else if (type == XMLContentSpec.CONTENTSPECNODE_ANY_LOCAL) {
-                        if (children[outIndex].uri == null) {
-                            break;
-                        }
-                    }
-                    else if (type == XMLContentSpec.CONTENTSPECNODE_ANY_OTHER) {
-                        if (fChildren[inIndex].uri != children[outIndex].uri) {
-                            break;
-                        }
-                    }
-                    // REVISIT: What about checking for multiple ANY matches?
-                    //          The content model ambiguity *could* be checked
-                    //          by the caller before constructing the mixed
-                    //          content model.
-                }
-
-                // We did not find this one, so the validation failed
-                if (inIndex == fCount)
-                    return outIndex;
-            }
-        }
-
-        // Everything seems to be in order, so return success
-        return -1;
-    } // validate
-
-} // class MixedContentModel
diff --git a/src/org/apache/xerces/impl/dtd/models/SimpleContentModel.java b/src/org/apache/xerces/impl/dtd/models/SimpleContentModel.java
deleted file mode 100644
index ec0ee17..0000000
--- a/src/org/apache/xerces/impl/dtd/models/SimpleContentModel.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dtd.models;
-
-import org.apache.xerces.xni.QName;
-
-import org.apache.xerces.impl.dtd.XMLContentSpec;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- *
- * SimpleContentModel is a derivative of the abstract content model base
- * class that handles a small set of simple content models that are just
- * way overkill to give the DFA treatment.
- * <p>
- * This class handles the following scenarios:
- * <ul>
- * <li> a
- * <li> a?
- * <li> a*
- * <li> a+
- * <li> a,b
- * <li> a|b
- * </ul>
- * <p>
- * These all involve a unary operation with one element type, or a binary
- * operation with two elements. These are very simple and can be checked
- * in a simple way without a DFA and without the overhead of setting up a
- * DFA for such a simple check.
- *
- */
-public class SimpleContentModel
-    implements ContentModelValidator {
-
-    //
-    // Constants
-    //
-
-    /** CHOICE */
-    public static final short CHOICE = -1;
-
-    /** SEQUENCE */
-    public static final short SEQUENCE = -1;
-
-    //
-    // Data
-    //
-
-
-    /**
-     * The element decl pool indices of the first (and optional second)
-     * child node. The operation code tells us whether the second child
-     * is used or not.
-     */
-    private QName fFirstChild = new QName();
-
-    /**
-     * The element decl pool indices of the first (and optional second)
-     * child node. The operation code tells us whether the second child
-     * is used or not.
-     */
-    private QName fSecondChild = new QName();
-
-    /**
-     * The operation that this object represents. Since this class only
-     * does simple contents, there is only ever a single operation
-     * involved (i.e. the children of the operation are always one or
-     * two leafs.) This is one of the XMLDTDParams.CONTENTSPECNODE_XXX values.
-     */
-    private int fOperator;
-
-    /** Boolean to allow DTDs to validate even with namespace support. */
-    private boolean fDTD;
-
-    /* this is the EquivClassComparator object */
-    //private EquivClassComparator comparator = null;
-    
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a simple content model.
-     *
-     * @param operator The content model operator.
-     * @param firstChild The first child index.
-     * @param secondChild The second child index.
-     * @param dtd if it is for a DTDGrammar.
-     *
-     */
-    public SimpleContentModel(short operator, QName firstChild, QName secondChild, boolean dtd) {
-        //
-        //  Store away the children and operation. This is all we need to
-        //  do the content model check.
-        //
-        //  The operation is one of the ContentSpecNode.NODE_XXX values!
-        //
-        fFirstChild.setValues(firstChild);
-        if (secondChild != null) {
-            fSecondChild.setValues(secondChild);
-        }
-        else {
-            fSecondChild.clear();
-        }
-        fOperator = operator;
-        fDTD = dtd;
-    }
-
-    //
-    // ContentModelValidator methods
-    //
-
-    /**
-     * Check that the specified content is valid according to this
-     * content model. This method can also be called to do 'what if' 
-     * testing of content models just to see if they would be valid.
-     * <p>
-     * A value of -1 in the children array indicates a PCDATA node. All other 
-     * indexes will be positive and represent child elements. The count can be
-     * zero, since some elements have the EMPTY content model and that must be 
-     * confirmed.
-     *
-     * @param children The children of this element.  Each integer is an index within
-     *                 the <code>StringPool</code> of the child element name.  An index
-     *                 of -1 is used to indicate an occurrence of non-whitespace character
-     *                 data.
-     * @param offset Offset into the array where the children starts.
-     * @param length The number of entries in the <code>children</code> array.
-     *
-     * @return The value -1 if fully valid, else the 0 based index of the child
-     *         that first failed. If the value returned is equal to the number
-     *         of children, then the specified children are valid but additional
-     *         content is required to reach a valid ending state.
-     *
-     */
-    public int validate(QName[] children, int offset, int length) {
-
-        //
-        //  According to the type of operation, we do the correct type of
-        //  content check.
-        //
-        switch(fOperator)
-        {
-            case XMLContentSpec.CONTENTSPECNODE_LEAF :
-                // If there is not a child, then report an error at index 0
-                if (length == 0)
-                    return 0;
-
-                // If the 0th child is not the right kind, report an error at 0
-                if (fDTD) {
-                    if (children[offset].rawname != fFirstChild.rawname) {
-                        return 0;
-                    }
-                }
-                else {
-                    if (children[offset].uri != fFirstChild.uri || 
-                        children[offset].localpart != fFirstChild.localpart)
-                        return 0;
-                }
-
-                // If more than one child, report an error at index 1
-                if (length > 1)
-                    return 1;
-                break;
-
-            case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE :
-                //
-                //  If there is one child, make sure its the right type. If not,
-                //  then its an error at index 0.
-                //
-                if (length == 1) {
-                    if (fDTD) {
-                        if (children[offset].rawname != fFirstChild.rawname) {
-                            return 0;
-                        }
-                    }
-                    else {
-                        if (children[offset].uri != fFirstChild.uri || 
-                         children[offset].localpart != fFirstChild.localpart)
-                        return 0;
-                    }
-                }
-
-                //
-                //  If the child count is greater than one, then obviously
-                //  bad, so report an error at index 1.
-                //
-                if (length > 1)
-                    return 1;
-                break;
-
-            case XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE :
-                //
-                //  If the child count is zero, that's fine. If its more than
-                //  zero, then make sure that all children are of the element
-                //  type that we stored. If not, report the index of the first
-                //  failed one.
-                //
-                if (length > 0)
-                {
-                    if (fDTD) {
-                        for (int index = 0; index < length; index++) {
-                            if (children[offset + index].rawname != fFirstChild.rawname) {
-                                return index;
-                            }
-                        }
-                    }
-                    else {
-                        for (int index = 0; index < length; index++)
-                        {
-                            if (children[offset + index].uri != fFirstChild.uri || 
-                                children[offset + index].localpart != fFirstChild.localpart)
-                                return index;
-                        }
-                    }
-                }
-                break;
-
-            case XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE :
-                //
-                //  If the child count is zero, that's an error so report
-                //  an error at index 0.
-                //
-                if (length == 0)
-                    return 0;
-
-                //
-                //  Otherwise we have to check them all to make sure that they
-                //  are of the correct child type. If not, then report the index
-                //  of the first one that is not.
-                //
-                if (fDTD) {
-                    for (int index = 0; index < length; index++) {
-                        if (children[offset + index].rawname != fFirstChild.rawname) {
-                            return index;
-                        }
-                    }
-                }
-                else {
-                    for (int index = 0; index < length; index++)
-                    {
-                        if (children[offset + index].uri != fFirstChild.uri || 
-                            children[offset + index].localpart != fFirstChild.localpart)
-                            return index;
-                    }
-                }
-                break;
-
-            case XMLContentSpec.CONTENTSPECNODE_CHOICE :
-                //
-                //  There must be one and only one child, so if the element count
-                //  is zero, return an error at index 0.
-                //
-                if (length == 0)
-                    return 0;
-
-                // If the zeroth element isn't one of our choices, error at 0
-                if (fDTD) {
-                    if ((children[offset].rawname != fFirstChild.rawname) &&
-                        (children[offset].rawname != fSecondChild.rawname)) {
-                        return 0;
-                    }
-                }
-                else {
-                    if ((children[offset].uri != fFirstChild.uri || children[offset].localpart != fFirstChild.localpart) &&
-                        (children[offset].uri != fSecondChild.uri || children[offset].localpart != fSecondChild.localpart))
-                        return 0;
-                }
-
-                // If there is more than one element, then an error at 1
-                if (length > 1)
-                    return 1;
-                break;
-
-            case XMLContentSpec.CONTENTSPECNODE_SEQ :
-                //
-                //  There must be two children and they must be the two values
-                //  we stored, in the stored order.
-                //
-                if (length == 2) {
-                    if (fDTD) {
-                        if (children[offset].rawname != fFirstChild.rawname) {
-                            return 0;
-                        }
-                        if (children[offset + 1].rawname != fSecondChild.rawname) {
-                            return 1;
-                        }
-                    }
-                    else {
-                        if (children[offset].uri != fFirstChild.uri || children[offset].localpart != fFirstChild.localpart)
-                            return 0;
-
-                        if (children[offset + 1].uri != fSecondChild.uri || children[offset + 1].localpart != fSecondChild.localpart)
-                            return 1;
-                    }
-                }
-                else {
-                    if (length > 2) {
-                        return 2;
-                    }
-
-                    return length;
-                }
-
-                break;
-
-            default :
-                throw new RuntimeException("ImplementationMessages.VAL_CST");
-        }
-
-        // We survived, so return success status
-        return -1;
-    } // validate
-
-} // class SimpleContentModel
diff --git a/src/org/apache/xerces/impl/dv/DTDDVFactory.java b/src/org/apache/xerces/impl/dv/DTDDVFactory.java
deleted file mode 100644
index f63a94f..0000000
--- a/src/org/apache/xerces/impl/dv/DTDDVFactory.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-import java.util.Hashtable;
-
-/**
- * The factory to create and return DTD types. The implementation should
- * store the created datatypes in static data, so that they can be shared by
- * multiple parser instance, and multiple threads.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-interface DTDDVFactory {
-
-    /**
-     * return a dtd type of the given name
-     *
-     * @param name  the name of the datatype
-     * @return      the datatype validator of the given name
-     */
-    public DatatypeValidator getBuiltInDV(String name);
-
-    /**
-     * get all built-in DVs, which are stored in a hashtable keyed by the name
-     *
-     * @return      a hashtable which contains all datatypes
-     */
-    public Hashtable getBuiltInTypes();
-
-}
diff --git a/src/org/apache/xerces/impl/dv/DVFactoryException.java b/src/org/apache/xerces/impl/dv/DVFactoryException.java
deleted file mode 100644
index ece3078..0000000
--- a/src/org/apache/xerces/impl/dv/DVFactoryException.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * A runtime exception that's thrown if an error happens when the applicatoin
- * try to get a DV factory instance.
- */
-public class DVFactoryException extends RuntimeException {
-    public DVFactoryException() {
-        super();
-    }
-
-    public DVFactoryException(String msg) {
-        super(msg);
-    }
-}
diff --git a/src/org/apache/xerces/impl/dv/DatatypeException.java b/src/org/apache/xerces/impl/dv/DatatypeException.java
deleted file mode 100644
index cf42bae..0000000
--- a/src/org/apache/xerces/impl/dv/DatatypeException.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * Base class for datatype exceptions. For DTD types, the exception can be
- * created from an error message. For Schema types, it needs an error code
- * (as defined in Appendix C of the structure spec), plus an array of arguents,
- * for error message substitution.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class DatatypeException extends Exception {
-
-    // in case the exception is thrown from a Schema DV, but the DTD constructor
-    // is used, we treat it as a general schema error, and use the "general"
-    // error code.
-    private static final String GENERAL_ERROR = "general";
-
-    /**
-     * Create a new datatype exception by providing an error message.
-     *
-     * @param msg  error message
-     */
-    public DatatypeException(String msg) {
-        super(msg);
-        this.key = GENERAL_ERROR;
-        this.args = new Object[]{msg};
-    }
-
-    // used to store error code and error substitution arguments
-    protected String key;
-    protected Object[] args;
-
-    /**
-     * Create a new datatype exception by providing an error code and a list
-     * of error message substitution arguments.
-     *
-     * @param key  error code
-     * @param args error arguments
-     */
-    public DatatypeException(String key, Object[] args) {
-        super(key);
-        this.key = key;
-        this.args = args;
-    }
-
-    /**
-     * Return the error code
-     *
-     * @return  error code
-     */
-    public String getKey() {
-        return key;
-    }
-
-    /**
-     * Return the list of error arguments
-     *
-     * @return  error arguments
-     */
-    public Object[] getArgs() {
-        return args;
-    }
-}
diff --git a/src/org/apache/xerces/impl/dv/DatatypeMessageProvider.java b/src/org/apache/xerces/impl/dv/DatatypeMessageProvider.java
deleted file mode 100644
index 9d685bf..0000000
--- a/src/org/apache/xerces/impl/dv/DatatypeMessageProvider.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.MissingResourceException;
-import org.apache.xerces.util.MessageFormatter;
-
-/**
- * REVISIT: Do we still use message provider in Xerces2-J? Shouldn't we use
- *          property files instead?
- *
- * @author Jeffrey Rodriguez
- *
- * @version $Id$
- */
-public class DatatypeMessageProvider implements MessageFormatter {
-    /**
-     * The domain of messages concerning the XML Schema: Datatypes specification.
-     */
-    public static final String DATATYPE_DOMAIN = "http://www.w3.org/TR/xml-schema-2";
-
-    /**
-     * Set the locale used for error messages
-     *
-     * @param locale the new locale
-     */
-    public void setLocale(Locale locale) {
-        fLocale = locale;
-    }
-    /**
-     * get the local used for error messages
-     *
-     * @return the locale
-     */
-    public Locale getLocale() {
-        return fLocale;
-    }
-
-    //
-    // MessageFormatter methods
-    //
-
-    /**
-     * Formats a message with the specified arguments using the given
-     * locale information.
-     *
-     * @param locale    The locale of the message.
-     * @param key       The message key.
-     * @param arguments The message replacement text arguments. The order
-     *                  of the arguments must match that of the placeholders
-     *                  in the actual message.
-     *
-     * @return Returns the formatted message.
-     *
-     * @throws MissingResourceException Thrown if the message with the
-     *                                  specified key cannot be found.
-     */
-    public String formatMessage(Locale locale, String key, Object[] args)
-        throws MissingResourceException {
-        boolean throwex = false;
-        if ( fResourceBundle == null || locale != fLocale ) {
-            if ( locale != null )
-                fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.impl.msg.DatatypeMessages", locale);
-            if ( fResourceBundle == null )
-                fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.impl.msg.DatatypeMessages");
-        }
-        int majorCode = -1;
-        for (int i = 0; i < fgMessageKeys.length; i++) {
-            if (fgMessageKeys[i].equals(key)) {
-                majorCode = i;
-                break;
-            }
-        }
-        if (majorCode == -1) {
-            majorCode = MSG_BAD_MAJORCODE;
-            throwex = true;
-        }
-        String msgKey = fgMessageKeys[majorCode];
-        String msg = fResourceBundle.getString(msgKey);
-        if ( args != null ) {
-            try {
-                msg = java.text.MessageFormat.format(msg, args);
-            }
-            catch ( Exception e ) {
-                msg = fResourceBundle.getString(fgMessageKeys[MSG_FORMAT_FAILURE]);
-                msg += " " + fResourceBundle.getString(msgKey);
-            }
-        }
-
-        if ( throwex ) {
-            throw new RuntimeException(msg);
-        }
-        return msg;
-    }
-    //
-    //
-    //
-    private Locale fLocale = null;
-    private ResourceBundle fResourceBundle = null;
-    //
-    // Major Codes
-    //
-    private static int counter = 0;
-    public static final int
-    MSG_BAD_MAJORCODE  = counter++,              //  majorCode parameter to createMessage was out of bounds
-    MSG_FORMAT_FAILURE = counter++,             //  exception thrown during messageFormat call
-    NOT_BOOLEAN        = counter++,
-    NOT_DECIMAL        = counter++,
-    NOT_FLOAT          = counter++,
-    NOT_DOUBLE         = counter++,
-    INVALID_ENUM_VALUE = counter++,
-    OUT_OF_BOUNDS      = counter++,
-    NOT_ENUM_VALUE      = counter++,
-    FRACTION_GREATER_TOTALDIGITS   = counter++,
-    FRACTION_EXCEEDED      = counter++,
-    TOTALDIGITS_EXCEEDED   = counter++,
-    ILLEGAL_FACET_VALUE    = counter++,
-    ILLEGAL_ANYURI_FACET   = counter++,
-    ILLEGAL_BOOLEAN_FACET  = counter++,
-    ILLEGAL_BASE64_FACET   = counter++,
-    ILLEGAL_DATETIME_FACET = counter++,
-    ILLEGAL_DECIMAL_FACET  = counter++,
-    ILLEGAL_DOUBLE_FACET   = counter++,
-    ILLEGAL_FLOAT_FACET    = counter++,
-    ILLEGAL_HEXBINARY_FACET  = counter++,
-    ILLEGAL_NOTATION_FACET   = counter++,
-    ILLEGAL_QNAME_FACET      = counter++,
-    ILLEGAL_STRING_FACET     = counter++,
-    ILLEGAL_LIST_FACET       = counter++,
-    ILLEGAL_UNION_FACET      = counter++,
-    ILLEGAL_ANYSIMPLETYPE_FACET  = counter++,
-
-    MSG_MAX_CODE = counter;
-
-    //
-    // Minor Codes
-    //
-    public static final int
-    MSG_NONE = 0;
-
-    public static final String[] fgMessageKeys = {
-        "BadMajorCode",
-        "FormatFailed",
-        "NotBoolean",
-        "NotDecimal",
-        "NotFloat",
-        "NotDouble",
-        "InvalidEnumValue",
-        "OutOfBounds",
-        "NotAnEnumValue",
-        "FractionDigitsLargerThanTotalDigits",
-        "FractionDigitsExceeded",
-        "TotalDigitsExceeded",
-        "IllegalFacetValue",
-        "IllegalAnyURIFacet",
-        "IllegalBooleanFacet",
-        "IllegalBase64Facet",
-        "IllegalDateTimeFacet",
-        "IllegalDecimalFacet",
-        "IllegalDoubleFacet",
-        "IllegalFloatFacet",
-        "IllegalHexBinaryFacet",
-        "IllegalNotationFacet",
-        "IllegalQNameFacet",
-        "IllegalStringFacet",
-        "IllegalListFacet",
-        "IllegalUnionFacet",
-        "IllegalAnySimpleTypeFacet"
-    };
-}
diff --git a/src/org/apache/xerces/impl/dv/DatatypeValidator.java b/src/org/apache/xerces/impl/dv/DatatypeValidator.java
deleted file mode 100644
index 64fb3a4..0000000
--- a/src/org/apache/xerces/impl/dv/DatatypeValidator.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * The interface that a DTD datatype must implement. The implementation of this
- * interface must be thread-safe.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public interface DatatypeValidator {
-
-    /**
-     * validate a given string against this DV
-     *
-     * @param content       the string value that needs to be validated
-     * @param context       the validation context
-     *
-     * @return              the actual value of the string value
-     *                      (most likely a normalized string, since all types
-     *                       in DTD are string types.)
-     */
-    public Object validate(String content, ValidationContext context)
-        throws InvalidDatatypeValueException;
-
-}
diff --git a/src/org/apache/xerces/impl/dv/InvalidDatatypeFacetException.java b/src/org/apache/xerces/impl/dv/InvalidDatatypeFacetException.java
deleted file mode 100644
index 3e51ecc..0000000
--- a/src/org/apache/xerces/impl/dv/InvalidDatatypeFacetException.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * Datatype exception for invalid facet. This exception is only used by
- * schema datatypes.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class InvalidDatatypeFacetException extends DatatypeException {
-
-    /**
-     * Create a new datatype exception by providing an error message.
-     * NOTE: this message shouldn't be called, after we provide complete
-     *       schema error code support.
-     *
-     * @param msg  error message
-     */
-    public InvalidDatatypeFacetException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Create a new datatype exception by providing an error code and a list
-     * of error message substitution arguments.
-     *
-     * @param key  error code
-     * @param args error arguments
-     */
-    public InvalidDatatypeFacetException(String key, Object[] args) {
-        super(key, args);
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/dv/InvalidDatatypeValueException.java b/src/org/apache/xerces/impl/dv/InvalidDatatypeValueException.java
deleted file mode 100644
index 371d63e..0000000
--- a/src/org/apache/xerces/impl/dv/InvalidDatatypeValueException.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * Datatype exception for invalid values.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class InvalidDatatypeValueException extends DatatypeException {
-
-    /**
-     * Create a new datatype exception by providing an error message.
-     *
-     * @param msg  error message
-     */
-    public InvalidDatatypeValueException(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Create a new datatype exception by providing an error code and a list
-     * of error message substitution arguments.
-     *
-     * @param key  error code
-     * @param args error arguments
-     */
-    public InvalidDatatypeValueException(String key, Object[] args) {
-        super(key, args);
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/dv/SchemaDVFactory.java b/src/org/apache/xerces/impl/dv/SchemaDVFactory.java
deleted file mode 100644
index 2813fa9..0000000
--- a/src/org/apache/xerces/impl/dv/SchemaDVFactory.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-import java.util.Hashtable;
-
-/**
- * Defines a factory API that enables applications to <p>
- * 1. to get the instance of specified SchemaDVFactory implementation <p>
- * 2. to create/return built-in schema simple types <p>
- * 3. to create user defined simple types. <p>
- *
- * Implementations of this abstract class can be used to get built-in simple
- * types and create user-defined simle types. <p>
- *
- * The implementation should store the built-in datatypes in static data, so
- * that they can be shared by multiple parser instance, and multiple threads.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public abstract class SchemaDVFactory {
-
-    private static final String DEFAULT_FACTORY_CLASS = "org.apache.xerces.impl.dv.xs_new.SchemaDVFactoryImpl";
-
-    private static String          fFactoryClass    = null;
-    private static SchemaDVFactory fFactoryInstance = null;
-
-    /**
-     * Set the class name of the schema dv factory implementation. This method
-     * can only be called before the first time the method <code>getInstance</code>
-     * successfully returns, otherwise a DVFactoryException will be thrown.
-     *
-     * @param className  the class name of the SchemaDVFactory implementation
-     * @exception DVFactoryException  the method cannot be called at this time
-     */
-    public static final void setFactoryClass(String factoryClass) throws DVFactoryException {
-        // if the factory instance has been created, it's an error.
-        if (fFactoryInstance != null)
-            throw new DVFactoryException("Cannot set the class name now. The class name '"+fFactoryClass+"' is already used.");
-
-        // synchronize on the string value
-        synchronized (DEFAULT_FACTORY_CLASS) {
-            // in case this thread was waiting for another thread
-            if (fFactoryInstance != null)
-                throw new DVFactoryException("Cannot set the class name now. The class name '"+fFactoryClass+"' is already used.");
-
-            fFactoryClass = factoryClass;
-        }
-    }
-
-    /**
-     * Get an instance of SchemaDVFactory implementation.
-     *
-     * If <code>setFactoryClass</code> is called before this method,
-     * the passed-in class name will be used to create the factory instance.
-     * Otherwise, a default implementation is used.
-     *
-     * After the first time this method successfully returns, any subsequent
-     * invocation to this method returns the same instance.
-     *
-     * @return  an instance of SchemaDVFactory implementation
-     * @exception DVFactoryException  cannot create an instance of the specified
-     *                                class name or the default class name
-     */
-    public static final SchemaDVFactory getInstance() throws DVFactoryException {
-        // if the factory instance has been created, just return it.
-        if (fFactoryInstance != null)
-            return fFactoryInstance;
-
-        // synchronize on the string value, to make sure that we don't create
-        // two instance of the dv factory class
-        synchronized (DEFAULT_FACTORY_CLASS) {
-            // in case this thread was waiting for another thread to create
-            // the factory instance, just return the instance created by the
-            // other thread.
-            if (fFactoryInstance != null)
-                return fFactoryInstance;
-
-            try {
-                // if the class name is not specified, use the default one
-                if (fFactoryClass == null)
-                    fFactoryClass = DEFAULT_FACTORY_CLASS;
-                fFactoryInstance = (SchemaDVFactory)(Class.forName(fFactoryClass).newInstance());
-            } catch (ClassNotFoundException e1) {
-                throw new DVFactoryException("Schema factory class " + fFactoryClass + " not found.");
-            } catch (IllegalAccessException e2) {
-                throw new DVFactoryException("Schema factory class " + fFactoryClass + " found but cannot be loaded.");
-            } catch (InstantiationException e3) {
-                throw new DVFactoryException("Schema factory class " + fFactoryClass + " loaded but cannot be instantiated (no empty public constructor?).");
-            } catch (ClassCastException e4) {
-                throw new DVFactoryException("Schema factory class " + fFactoryClass + " does not extend from SchemaDVFactory.");
-            }
-        }
-
-        // return the newly created dv factory instance
-        return fFactoryInstance;
-    }
-
-    // can't create a new object of this class
-    protected SchemaDVFactory(){}
-
-    /**
-     * Get a built-in simple type of the given name
-     * REVISIT: its still not decided within the Schema WG how to define the
-     *          ur-types and if all simple types should be derived from a
-     *          complex type, so as of now we ignore the fact that anySimpleType
-     *          is derived from anyType, and pass 'null' as the base of
-     *          anySimpleType. It needs to be changed as per the decision taken.
-     *
-     * @param name  the name of the datatype
-     * @return      the datatype validator of the given name
-     */
-    public abstract XSSimpleType getBuiltInType(String name);
-
-    /**
-     * get all built-in simple types, which are stored in a hashtable keyed by
-     * the name
-     *
-     * @return      a hashtable which contains all built-in simple types
-     */
-    public abstract Hashtable getBuiltInTypes();
-
-    /**
-     * Create a new simple type which is derived by restriction from another
-     * simple type.
-     *
-     * @param name              name of the new type, could be null
-     * @param targetNamespace   target namespace of the new type, could be null
-     * @param finalSet          value of "final"
-     * @param base              base type of the new type
-     * @return                  the newly created simple type
-     */
-    public abstract XSSimpleType createTypeRestriction(String name, String targetNamespace,
-                                                       short finalSet, XSSimpleType base);
-
-    /**
-     * Create a new simple type which is derived by list from another simple
-     * type.
-     *
-     * @param name              name of the new type, could be null
-     * @param targetNamespace   target namespace of the new type, could be null
-     * @param finalSet          value of "final"
-     * @param itemType          item type of the list type
-     * @return                  the newly created simple type
-     */
-    public abstract XSListSimpleType createTypeList(String name, String targetNamespace,
-                                                    short finalSet, XSSimpleType itemType);
-
-    /**
-     * Create a new simple type which is derived by union from a list of other
-     * simple types.
-     *
-     * @param name              name of the new type, could be null
-     * @param targetNamespace   target namespace of the new type, could be null
-     * @param finalSet          value of "final"
-     * @param base              member types of the union type
-     * @return                  the newly created simple type
-     */
-    public abstract XSUnionSimpleType createTypeUnion(String name, String targetNamespace,
-                                                      short finalSet, XSSimpleType[] memberTypes);
-
-}
diff --git a/src/org/apache/xerces/impl/dv/ValidatedInfo.java b/src/org/apache/xerces/impl/dv/ValidatedInfo.java
deleted file mode 100644
index d75c0e9..0000000
--- a/src/org/apache/xerces/impl/dv/ValidatedInfo.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * Class to get the information back after content is validated. This info
- * would be filled by validate().
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- *
- * @version $Id$
- */
-public class ValidatedInfo {
-
-    /**
-     * The normalized value of a string value
-     */
-    public String normalizedValue;
-
-    /**
-     * The actual value from a string value (QName, Boolean, etc.)
-     * An array of Objects if the type is a list.
-     */
-    public Object actualValue;
-
-    /**
-     * If the type is a union type, then the member type which
-     * actually validated the string value.
-     */
-    public XSSimpleType memberType;
-
-    /**
-     * If
-     * 1. the type is a union type where one of the member types is a list, or
-     *    if the type is a list; and
-     * 2. the item type of the list is a union type
-     * then an array of member types used to validate the values.
-     */
-    public XSSimpleType[] memberTypes;
-
-}
diff --git a/src/org/apache/xerces/impl/dv/XSAtomicSimpleType.java b/src/org/apache/xerces/impl/dv/XSAtomicSimpleType.java
deleted file mode 100644
index a52a931..0000000
--- a/src/org/apache/xerces/impl/dv/XSAtomicSimpleType.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * Any atomic simple type will implement this interface. It inherits the methods
- * of generic <code>XSSimpleType</code> interface.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public interface XSAtomicSimpleType extends XSSimpleType {
-
-    /**
-     * return the built-in primitive type
-     *
-     * @return   the built-in primitive type
-     */
-    //public XSSimpleType getPrimitiveType();
-
-    /**
-     * return an ID representing the built-in primitive type
-     *
-     * @return   an ID representing the built-in primitive type
-     */
-    //public int getPrimitiveKind();
-}
diff --git a/src/org/apache/xerces/impl/dv/XSFacets.java b/src/org/apache/xerces/impl/dv/XSFacets.java
deleted file mode 100644
index cd68f24..0000000
--- a/src/org/apache/xerces/impl/dv/XSFacets.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-import java.util.Vector;
-
-/**
- * The class used to pass all facets to {@link XSSimpleType#applyFacets}.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class XSFacets {
-
-    /**
-     * value of length facet.
-     */
-    public int length;
-
-    /**
-     * value of minLength facet.
-     */
-    public int minLength;
-
-    /**
-     * value of maxLength facet.
-     */
-    public int maxLength;
-
-    /**
-     * value of whiteSpace facet.
-     */
-    public short whiteSpace;
-
-    /**
-     * value of totalDigits facet.
-     */
-    public int totalDigits;
-
-    /**
-     * value of fractionDigits facet.
-     */
-    public int fractionDigits;
-
-    /**
-     * string containing value of pattern facet, for multiple patterns values
-     * are ORed together.
-     */
-    public String pattern;
-
-    /**
-     * Vector containing values of Enumeration facet.
-     */
-    public Vector enumeration;
-
-    /**
-     * value of maxInclusive facet.
-     */
-    public String maxInclusive;
-
-    /**
-     * value of maxExclusive facet.
-     */
-    public String maxExclusive;
-
-    /**
-     * value of minInclusive facet.
-     */
-    public String minInclusive;
-
-    /**
-     * value of minExclusive facet.
-     */
-    public String minExclusive;
-}
diff --git a/src/org/apache/xerces/impl/dv/XSListSimpleType.java b/src/org/apache/xerces/impl/dv/XSListSimpleType.java
deleted file mode 100644
index 08dab13..0000000
--- a/src/org/apache/xerces/impl/dv/XSListSimpleType.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * Any list simple type will implement this interface. It inherits the methods
- * of generic <code>XSSimpleType</code> interface.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public interface XSListSimpleType extends XSSimpleType {
-
-    /**
-     * return the item type definiton of List simple type schema component.
-     *
-     * @return the item type definition.
-     */
-    public XSSimpleType getItemType();
-
-}
diff --git a/src/org/apache/xerces/impl/dv/XSSimpleType.java b/src/org/apache/xerces/impl/dv/XSSimpleType.java
deleted file mode 100644
index a122aa3..0000000
--- a/src/org/apache/xerces/impl/dv/XSSimpleType.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-
-/**
- * This interface <code>XSSimpleType</code> represents the simple type
- * definition of schema component and defines methods to query the information
- * contained.
- * Any simple type (atomic, list or union) will implement this interface.
- * It inherits from <code>XSTypeDecl</code>.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public interface XSSimpleType extends XSTypeDecl {
-
-    /**
-     * Constant defined for the constraining facets as defined in schema.
-     * see <a href='http://www.w3.org/TR/xmlschema-2/#rf-facets'> XML Schema
-     * Part 2: Datatypes </a>
-     * The bit combination of the following constants are used to tell
-     * which facets are fixed, and which ones are present
-     */
-    /** the length facet */
-    public static final short FACET_LENGTH         = 1<<0;
-    /** the minLength facet */
-    public static final short FACET_MINLENGTH      = 1<<1;
-    /** the maxLength facet */
-    public static final short FACET_MAXLENGTH      = 1<<2;
-    /** the pattern facet */
-    public static final short FACET_PATTERN        = 1<<3;
-    /** the enumeration facet */
-    public static final short FACET_ENUMERATION    = 1<<4;
-    /** the whiteSpace facet */
-    public static final short FACET_WHITESPACE     = 1<<5;
-    /** the maxInclusive facet */
-    public static final short FACET_MAXINCLUSIVE   = 1<<6;
-    /** the maxExclusive facet */
-    public static final short FACET_MAXEXCLUSIVE   = 1<<7;
-    /** the minExclusive facet */
-    public static final short FACET_MINEXCLUSIVE   = 1<<8;
-    /** the minInclusive facet */
-    public static final short FACET_MININCLUSIVE   = 1<<9;
-    /** the totalDigits facet */
-    public static final short FACET_TOTALDIGITS    = 1<<10;
-    /** the fractionDigits facet */
-    public static final short FACET_FRACTIONDIGITS = 1<<11;
-
-    /**
-     * constants defined for the 'variety' property of Simple Type schema component.
-     * see <a href='http://www.w3.org/TR/xmlschema-2/#defn-variety'> XML Schema
-     * Part 2: Datatypes </a>
-     */
-    /** the atomic variety */
-    public static final short VARIETY_ATOMIC    = 1;
-    /** the list variety */
-    public static final short VARIETY_LIST      = 2;
-    /** the union variety */
-    public static final short VARIETY_UNION     = 3;
-
-    /**
-     * constants defined for the values of 'whitespace' facet.
-     * see <a href='http://www.w3.org/TR/xmlschema-2/#dt-whiteSpace'> XML Schema
-     * Part 2: Datatypes </a>
-     */
-    /** preserve the white spaces */
-    public static final short WS_PRESERVE = 0;
-    /** replace the white spaces */
-    public static final short WS_REPLACE  = 1;
-    /** collapse the white spaces */
-    public static final short WS_COLLAPSE = 2;
-
-    /**
-     * constants defined for the 'ordered' fundamental facet.
-     * see <a href='http://www.w3.org/TR/xmlschema-2/#rf-fund-facets'> XML
-     * Schema Part 2: Datatypes </a>
-     */
-    /** not ordered */
-    public static final short ORDERED_FALSE     = 1;
-    /** partically ordered */
-    public static final short ORDERED_PARTIAL   = 2;
-    /** totally ordered */
-    public static final short ORDERED_TOTAL     = 3;
-
-    /**
-     * constants defined for the 'cardinality' fundamental facet.
-     * see <a href='http://www.w3.org/TR/xmlschema-2/#rf-fund-facets'> XML
-     * Schema Part 2: Datatypes </a>
-     */
-    /** finite cardinality */
-    public static final short CARDINALITY_FINITE             = 1;
-    /** countably infinite cardinality */
-    public static final short CARDINALITY_COUNTABLY_INFINITE = 2;
-
-    /**
-     * validate a given string against this simple type.
-     *
-     * @param content       the string value that needs to be validated
-     * @param context       the validation context
-     * @param validatedInfo used to store validation result
-     *
-     * @return              the actual value (QName, Boolean) of the string value
-     */
-    public Object validate(String content, ValidationContext context, ValidatedInfo validatedInfo)
-        throws InvalidDatatypeValueException;
-
-    /**
-     * validate an actual value against this simple type.
-     *
-     * @param value         the actual value that needs to be validated
-     * @param context       the validation context
-     * @param validatedInfo used to provide the actual value and member types
-     * @exception InvalidDatatypeValueException  exception for invalid values.
-     */
-    public void validate(ValidationContext context, ValidatedInfo validatedInfo)
-        throws InvalidDatatypeValueException;
-
-    /**
-     * If this type is created from restriction, then some facets can be applied
-     * to the simple type. <code>XSFacets</code> is used to pass the value of
-     * different facets.
-     *
-     * @param facets        the value of all the facets
-     * @param presentFacets bit combination value of the costraining facet
-     *                      constants which are present.
-     * @param fixedFacets   bit combination value of the costraining facet
-     *                      constants which are fixed.
-     * @param ValidationContext the validation context
-     * @exception InvalidDatatypeFacetException  exception for invalid facet values.
-     */
-    public void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context)
-        throws InvalidDatatypeFacetException;
-
-    /**
-     * Get the variety of the simple type: atomic, list or union.
-     *
-     * @return  a constant corresponding to the variety, as defined above.
-     */
-    public short getVariety();
-
-    /**
-     * Check whether two actual values are equal.
-     *
-     * @param value1  the first value
-     * @prarm value2  the second value
-     * @return        true if the two value are equal
-     */
-    public boolean isEqual(Object value1, Object value2);
-
-    /**
-     * Check the order of the two actual values. (May not be supported by all
-     * simple types.
-     * REVISIT: Andy believes that a compare() method is necessary.
-     *          I don't see the necessity for schema (the only place where we
-     *          need to compare two values is to check min/maxIn/Exclusive
-     *          facets, but we only need a private method for this case.)
-     *          But Andy thinks XPATH potentially needs this compare() method.
-     *
-     * @param value1  the first value
-     * @prarm value2  the second value
-     * @return        > 0 if value1 > value2
-     *                = 0 if value1 == value2
-     *                < = if value1 < value2
-     */
-    //public short compare(Object value1, Object value2);
-
-    /**
-     * bit combination of the constants defined in this simple type.
-     *
-     * @return  the bit combination of the constants corresponding to the
-     *          constraining facets, as defined above.
-     */
-    public short getDefinedFacets();
-
-    /**
-     * Check whether this type is or is derived from ID.
-     * REVISIT: this method makes ID special, which is not a good design.
-     *          but since ID is not a primitive, there doesn't seem to be a
-     *          clean way of doing it except to define special method like this.
-     * 
-     * @return  whether this simple type is or is derived from ID.
-     */
-    public boolean isIDType();
-
-    /**
-     * Check whether this type is or is derived from NOTATION.
-     * REVISIT: this method makes NOTATION special, which is not a good design.
-     * 
-     * @return  whether this simple type is or is derived from NOTATION.
-     */
-    public boolean isNOTATIONType();
-
-    // REVISIT: it's not decided yet how to return the facets,
-    //          as String's or as values (Object's).
-    //public XSFacet[] getFacets();
-    
-    /**
-     * Return the value of the "ordered" fundamental facet.
-     * 
-     * @return  a constant corresponding to the "ordered" facet.
-     */
-    public short getOrderedFacet();
-    
-    /**
-     * Return the value of the "bounded" fundamental facet.
-     * 
-     * @return  whether the this type is bounded.
-     */
-    public boolean isBounded();
-    
-    /**
-     * Return the value of the "numeric" fundamental facet.
-     * 
-     * @return  whether the this type is numeric.
-     */
-    public boolean isNumeric();
-    
-    /**
-     * Return the value of the "cardinality" fundamental facet.
-     * 
-     * @return  a constant corresponding to the "cardinality" facet.
-     */
-    public short getCardinalityFacet();
-}
diff --git a/src/org/apache/xerces/impl/dv/XSUnionSimpleType.java b/src/org/apache/xerces/impl/dv/XSUnionSimpleType.java
deleted file mode 100644
index 6e8e2db..0000000
--- a/src/org/apache/xerces/impl/dv/XSUnionSimpleType.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv;
-
-/**
- * Any union simple type will implement this interface. It inherits the methods
- * of generic <code>XSSimpleType</code> interface.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public interface XSUnionSimpleType extends XSSimpleType {
-
-    /**
-     * return the member type definitions of Union Simple Type schema component.
-     *
-     * @return the member type definitions
-     */
-    public XSSimpleType[] getMemberTypes();
-
-}
diff --git a/src/org/apache/xerces/impl/dv/dtd/AbstractDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/AbstractDatatypeValidator.java
deleted file mode 100644
index 9da3c9e..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/AbstractDatatypeValidator.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Hashtable;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- */
-public class AbstractDatatypeValidator
-    implements DatatypeValidator {
-
-    //
-    // Data
-    //
-
-    /** fFacets */
-    protected Hashtable fFacets;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * 
-     * Constructor for  Native datatype, No Facets defined, derived by Restriction
-     */
-
-    protected AbstractDatatypeValidator()
-       throws InvalidDatatypeFacetException {
-    }
-
-    /**
-     * 
-     * 
-     * @param base 
-     * @param facets 
-     * @param list 
-     */
-    protected AbstractDatatypeValidator(DatatypeValidator base, Hashtable facets, boolean list)
-        throws InvalidDatatypeFacetException {
-    }
-
-    //
-    // DatatypeValidator methods
-    //
-
-    /**
-     * getFacets
-     * 
-     * @return 
-     */
-    public Hashtable getFacets() {
-        return null;
-    } // getFacets
-
-    /**
-     * validate
-     * 
-     * @param data 
-     * @param state 
-     */
-    public void validate(String data, Object state)
-        throws InvalidDatatypeValueException {
-    } // validate
-
-    /**
-     * compare
-     * 
-     * @param value1 
-     * @param value2 
-     * 
-     * @return 
-     */
-    public int compare(String value1, String value2)
-        throws InvalidDatatypeValueException {
-        return -1;
-    } // compare
-
-} // class AbstractDatatypeValidator
diff --git a/src/org/apache/xerces/impl/dv/dtd/DatatypeMessageProvider.java b/src/org/apache/xerces/impl/dv/dtd/DatatypeMessageProvider.java
deleted file mode 100644
index bfb72c0..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/DatatypeMessageProvider.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.MissingResourceException;
-import org.apache.xerces.util.MessageFormatter;
-
-
-/**
- * 
- * @author Jeffrey Rodriguez
- * @version $Id$
- */
-public class DatatypeMessageProvider implements MessageFormatter {
-    /**
-     * The domain of messages concerning the XML Schema: Datatypes specification.
-     */
-    public static final String DATATYPE_DOMAIN = "http://www.w3.org/TR/xml-schema-2";
-
-    /**
-     * Set the locale used for error messages
-     *
-     * @param locale the new locale
-     */
-    public void setLocale(Locale locale) {
-        fLocale = locale;
-    }
-    /**
-     * get the local used for error messages
-     *
-     * @return the locale
-     */
-    public Locale getLocale() {
-        return fLocale;
-    }
-
-    public String formatMessage(Locale locale, String key, Object[] arguments)
-       throws MissingResourceException{
-       //TODO
-       return "TODO: "+key;
-    }
-
-    /**
-     * Creates a message from the specified key and replacement
-     * arguments, localized to the given locale.
-     *
-     * @param locale    The requested locale of the message to be
-     *                  created.
-     * @param key       The key for the message text.
-     * @param args      The arguments to be used as replacement text
-     *                  in the message created.
-     */
-    /*
-    public String createMessage(Locale locale, int majorCode, int minorCode, Object args[]) {
-        boolean throwex = false;
-        if (fResourceBundle == null || locale != fLocale) {
-            if (locale != null)
-                fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.msg.DatatypeMessages", locale);
-            if (fResourceBundle == null)
-                fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.msg.DatatypeMessages");
-        }
-        if (majorCode < 0 || majorCode >= fgMessageKeys.length) {
-            majorCode = MSG_BAD_MAJORCODE;
-            throwex = true;
-        }
-        String msgKey = fgMessageKeys[majorCode];
-        String msg = fResourceBundle.getString(msgKey);
-        if (args != null) {
-            try {
-                msg = java.text.MessageFormat.format(msg, args);
-            } catch (Exception e) {
-                msg = fResourceBundle.getString(fgMessageKeys[MSG_FORMAT_FAILURE]);
-                msg += " " + fResourceBundle.getString(msgKey);
-            }
-        }
-
-        if (throwex) {
-            throw new RuntimeException(msg);
-        }
-        return msg;
-    }
-    */
-    //
-    //
-    //
-    private Locale fLocale = null;
-    private ResourceBundle fResourceBundle = null;
-    //
-    // Major Codes
-    //
-    public static final int 
-        MSG_BAD_MAJORCODE = 0,              //  majorCode parameter to createMessage was out of bounds
-        MSG_FORMAT_FAILURE = 1,             //  exception thrown during messageFormat call
-        NotBoolean = 2,
-        NotDecimal = 3,
-        FacetsInconsistent = 4,
-        IllegalFacetValue = 5,
-        IllegalDecimalFacet = 6,
-        UnknownFacet = 7,
-        InvalidEnumValue = 8,
-        OutOfBounds = 9,
-        NotAnEnumValue = 10,
-        NotInteger = 11,
-        IllegalIntegerFacet = 12,
-        NotReal = 13,
-        IllegalRealFacet = 14,
-        ScaleLargerThanPrecision = 15,
-        PrecisionExceeded = 16,
-        ScaleExceeded = 17,
-        NotFloat = 18,
-       // ...
-        MSG_MAX_CODE = 19;
-
-    //
-    // Minor Codes
-    //
-    public static final int
-        MSG_NONE = 0;
-
-    public static final String[] fgMessageKeys = {
-        "BadMajorCode",                 //   0, "The majorCode parameter to createMessage was out of bounds."
-        "FormatFailed",                 //   1, "An internal error occurred while formatting the following message:"
-        "NotBoolean",                   //   2, "{0} is not a boolean"
-        "NotDecimal",                   //   3, "{0} is not a decimal"
-        "FacetsInconsistent",           //   4, "Facets are inconsistent with base type"
-        "IllegalFacetValue",            //   5, "Illegal value {0} for facet {1}."
-        "IllegalDecimalFacet",          //   6, "Illegal Facet for decimal type"
-        "UnknownFacet",                 //   7, "Unknown Facet: {0}"
-        "InvalidEnumValue",             //   8, "Invalid value for Enum constant: {0}"
-        "OutOfBounds",                  //   9, "{0} is out of bounds."
-        "NotAnEnumValue",               //  10, "{0} is not one of the specified enum values."
-        "NotInteger",                   //  11, "{0} is not an integer."
-        "IllegalIntegerFacet",          //  12, "Illegal Facet for Integer type."
-        "NotReal",                      //  13, "{0} is not a double."
-        "IllegalRealFacet",             //  14, "Illegal Facet for Real type."
-        "ScaleLargerThanPrecision",     //  15, "Scale Facet must be less than or equal to Precision Facet"
-        "PrecisionExceeded",            //  16, "{0} has exceeded the precision Facet {1}"},
-        "ScaleExceeded",                //  17, "{0} has execeed the scale Facet {1}"},
-        "NotFloat"                     //  18, "{0} is not a float."
-
-    };
-
-}
diff --git a/src/org/apache/xerces/impl/dv/dtd/DatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/DatatypeValidator.java
deleted file mode 100644
index 9a49fe7..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/DatatypeValidator.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Hashtable;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- */
-public interface DatatypeValidator {
-    //
-    // Data
-    //
-    public static final int FACET_LENGTH       = 1;
-    public static final int FACET_MINLENGTH    = 1<<1;
-    public static final int FACET_MAXLENGTH    = 1<<2;
-    public static final int FACET_PATTERN      = 1<<3; 
-    public static final int FACET_ENUMERATION  = 1<<4;
-    public static final int FACET_WHITESPACE   = 1<<5;
-    public static final int FACET_MAXINCLUSIVE = 1<<6;
-    public static final int FACET_MAXEXCLUSIVE = 1<<7;
-    public static final int FACET_MININCLUSIVE = 1<<8;
-    public static final int FACET_MINEXCLUSIVE = 1<<9;
-    public static final int FACET_PRECISSION   = 1<<10;
-    public static final int FACET_SCALE        = 1<<11;
-    public static final int FACET_ENCODING     = 1<<12;
-    public static final int FACET_DURATION     = 1<<13;
-    public static final int FACET_PERIOD       = 1<<14;
-
-    public static final short WHITESPACE_NONE     =0;
-    public static final short WHITESPACE_PRESERVE =1;
-    public static final short WHITESPACE_REPLACE  =2;
-    public static final short WHITESPACE_COLLAPSE =3;
-
-    //
-    // Methods
-    //
-
-    /**
-     * getFacets
-     * 
-     * @return 
-     */
-    public Hashtable getFacets();
-
-    /**
-     * validate
-     * 
-     * @param data 
-     * @param state 
-     */
-    public void validate(String data, Object state)
-        throws InvalidDatatypeValueException;
-
-    /**
-     * compare
-     * 
-     * @param value1 
-     * @param value2 
-     * 
-     * @return 
-     */
-    public int compare(String value1, String value2)
-        throws InvalidDatatypeValueException;
-
-} // interface DatatypeValidator
diff --git a/src/org/apache/xerces/impl/dv/dtd/DatatypeValidatorFactory.java b/src/org/apache/xerces/impl/dv/dtd/DatatypeValidatorFactory.java
deleted file mode 100644
index 779fe1c..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/DatatypeValidatorFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Hashtable;
-
-/**
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @version $Id$
- */
-public interface DatatypeValidatorFactory {
-
-    //
-    // Methods
-    //
-
-    /**
-     * Create datatype validator.
-     * 
-     * @param name Name of type.
-     * @param base The base type, or null if there is no base type.
-     * @param facets The facets.
-     * @param list True if this type is a list.
-     * 
-     * @return The new datatype validator.
-     */
-    public DatatypeValidator createDatatypeValidator(String name, DatatypeValidator base, Hashtable facets, boolean list)
-        throws InvalidDatatypeFacetException, InvalidDatatypeValueException;
-
-} // interface DatatypeValidatorFactory
diff --git a/src/org/apache/xerces/impl/dv/dtd/DatatypeValidatorFactoryImpl.java b/src/org/apache/xerces/impl/dv/dtd/DatatypeValidatorFactoryImpl.java
deleted file mode 100644
index fe1114a..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/DatatypeValidatorFactoryImpl.java
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-import java.lang.reflect.*;
-import org.apache.xerces.impl.dtd.Grammar;
-
-
-
-/**
- * 
- * This class implements a factory of Datatype Validators. Internally the
- * DatatypeValidators are kept in a registry.<BR>
- * There is one instance of DatatypeValidatorFactoryImpl per Parser.<BR>
- * There is one datatype Registry per instance of DatatypeValidatorFactoryImpl,
- * such registry is first allocated with the number DatatypeValidators needed.<BR>
- * e.g.
- * If Parser finds an XML document with a DTD, a registry of DTD validators (only
- * 9 validators) get initialized in the registry.
- * The initialization process consist of instantiating the Datatype and
- * facets and registering the Datatype into registry table.
- * This implementatio uses a Hahtable as a registry table but future implementation
- * should use a lighter object, maybe a Map class ( not use a derived Map class
- * because of JDK 1.1.8 no supporting Map).<BR>
- * <BR>
- * As the Parser parses an instance document it knows if validation needs
- * to be checked. If no validation is necesary we should not instantiate a
- * DatatypeValidatorFactoryImpl.<BR>
- * If validation is needed, we need to instantiate a DatatypeValidatorFactoryImpl.<BR>
- * 
- * @author Jeffrey Rodriguez
- * @version $Id$
- */
-public class DatatypeValidatorFactoryImpl implements DatatypeValidatorFactory {
-    private static final boolean   fDebug = false;
-    //private Hashtable fgBaseTypes = new Hashtable();
-    //private boolean   fRegistryExpanded = false;
-
-    protected static final Hashtable fgBaseTypes = new Hashtable();
-    protected static boolean fgRegistryExpanded = false;
-
-    protected Hashtable fUserDefinedTypes = new Hashtable();
-
-    /***
-    private static DatatypeValidatorFactoryImpl    fRegistryOfDatatypes = 
-    new DatatypeValidatorFactoryImpl();//comment this in when switching to no Singleton
-
-    public DatatypeValidatorFactoryImpl() {
-    }
-    /***/
-
-    /* comment this out when change to no singleton.
-    public  DatatypeValidatorFactoryImpl() {
-    }
-    */
-
-
-    //Register Primitive Datatypes
-
-    /***
-    public void expandRegistryToFullSchemaSet() {
-
-        //Register Primitive Datatypes 
-        if (fgRegistryExpanded == false) {
-            fgRegistryExpanded = true;
-            DatatypeValidator v;
-            try {
-                fgBaseTypes.put("string",            new StringDatatypeValidator() );
-                fgBaseTypes.put("boolean",           new BooleanDatatypeValidator()  );
-                fgBaseTypes.put("float",             new FloatDatatypeValidator());
-                fgBaseTypes.put("double",            new DoubleDatatypeValidator());
-                fgBaseTypes.put("decimal",           new DecimalDatatypeValidator());
-                fgBaseTypes.put("timeDuration",      new TimeDurationDatatypeValidator());
-                fgBaseTypes.put("recurringDuration", new RecurringDurationDatatypeValidator());
-                fgBaseTypes.put("binary",            new BinaryDatatypeValidator());
-                fgBaseTypes.put("uriReference",      new URIReferenceDatatypeValidator());
-                fgBaseTypes.put("ID",                new IDDatatypeValidator());
-                fgBaseTypes.put("IDREF",             new IDREFDatatypeValidator());
-                fgBaseTypes.put("ENTITY",            new ENTITYDatatypeValidator());
-                fgBaseTypes.put("NOTATION",          new NOTATIONDatatypeValidator());
-                fgBaseTypes.put("QName",             new QNameDatatypeValidator()); 
-
-
-                Hashtable facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_PATTERN , "([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]+)(-[a-zA-Z]+)*" );
-
-                createDatatypeValidator("language", new StringDatatypeValidator() , facets,
-                                        false );
-
-                createDatatypeValidator( "IDREFS", new IDREFDatatypeValidator(), null , true );
-
-                createDatatypeValidator( "ENTITIES", new ENTITYDatatypeValidator(),  null, true );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_PATTERN , "\\c+" );
-                createDatatypeValidator("NMTOKEN", new StringDatatypeValidator(), facets, false );
-
-                createDatatypeValidator("NMTOKENS",  
-                                        getDatatypeValidator( "NMTOKEN" ), null, true );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_PATTERN , "\\i\\c*" );
-                createDatatypeValidator("Name", new StringDatatypeValidator(), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_PATTERN , "[\\i-[:]][\\c-[:]]*"  );
-                createDatatypeValidator("NCName", new StringDatatypeValidator(), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_SCALE, "0");
-                createDatatypeValidator("integer", new DecimalDatatypeValidator(), facets, false);
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE , "0" );
-                createDatatypeValidator("nonPositiveInteger", 
-                                        getDatatypeValidator("integer"), facets, false );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE , "-1" );
-                createDatatypeValidator("negativeInteger", 
-                                        getDatatypeValidator( "nonPositiveInteger"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE , "9223372036854775807");
-                facets.put(SchemaSymbols.ELT_MININCLUSIVE,  "-9223372036854775808");
-                createDatatypeValidator("long", getDatatypeValidator( "integer"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE , "2147483647");
-                facets.put(SchemaSymbols.ELT_MININCLUSIVE,  "-2147483648");
-                createDatatypeValidator("int", getDatatypeValidator( "long"), facets,false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE , "32767");
-                facets.put(SchemaSymbols.ELT_MININCLUSIVE,  "-32768");
-                createDatatypeValidator("short", getDatatypeValidator( "int"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE , "127");
-                facets.put(SchemaSymbols.ELT_MININCLUSIVE,  "-128");
-                createDatatypeValidator("byte",
-                                        getDatatypeValidator( "short"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MININCLUSIVE, "0" );
-                createDatatypeValidator("nonNegativeInteger", 
-                                        getDatatypeValidator( "integer"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE, "18446744073709551615" );
-                createDatatypeValidator("unsignedLong",
-                                        getDatatypeValidator( "nonNegativeInteger"), facets, false );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE, "4294967295" );
-                createDatatypeValidator("unsignedInt",
-                                        getDatatypeValidator( "unsignedLong"), facets, false );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE, "65535" );
-                createDatatypeValidator("unsignedShort", 
-                                        getDatatypeValidator( "unsignedInt"), facets, false );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MAXINCLUSIVE, "255" );
-                createDatatypeValidator("unsignedByte",
-                                        getDatatypeValidator( "unsignedShort"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_MININCLUSIVE, "1" );
-                createDatatypeValidator("positiveInteger",
-                                        getDatatypeValidator( "nonNegativeInteger"), facets, false );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_DURATION, "P0Y" );
-                facets.put(SchemaSymbols.ELT_PERIOD,   "P0Y" );
-                createDatatypeValidator("timeInstant", 
-                                        getDatatypeValidator( "recurringDuration"),facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_DURATION, "P0Y" );
-                //            facets.put(SchemaSymbols.ELT_PERIOD,   "PY24H" ); Bug -- WORK TODO
-                createDatatypeValidator("time", 
-                                        getDatatypeValidator( "recurringDuration"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_PERIOD,   "P0Y" );
-                createDatatypeValidator("timePeriod", 
-                                        getDatatypeValidator( "recurringDuration"), facets, false );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_DURATION, "PT24H" );
-                createDatatypeValidator("date",
-                                        getDatatypeValidator( "timePeriod"), facets, false );
-
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_DURATION, "P1M" );
-                createDatatypeValidator("month",
-                                        getDatatypeValidator( "timePeriod"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_DURATION, "P1Y" );
-                createDatatypeValidator("year", 
-                                        getDatatypeValidator( "timePeriod"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_DURATION, "P100Y" );
-                createDatatypeValidator("century", 
-                                        getDatatypeValidator( "timePeriod"), facets, false );
-
-                facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_PERIOD, "P1Y" );
-                facets.put(SchemaSymbols.ELT_DURATION, "PT24H" );
-                createDatatypeValidator("recurringDate",
-                                        getDatatypeValidator( "recurringDuration"),facets, false );
-            } catch (InvalidDatatypeFacetException ex) {
-                ex.printStackTrace();
-            } catch (InvalidDatatypeValueException ex) {
-                ex.printStackTrace();
-            }
-        }
-    }
-    /***/
-
-
-
-    /**
-     * Initializes registry with primitive and derived
-     * Simple types.
-     * 
-     * This method does not clear the registry to clear
-     * the registry you have to call resetRegistry.
-     * 
-     * The net effect of this method is to start with
-     * a the smallest set of datatypes needed by the
-     * validator.
-     * 
-     * If we start with DTD's then we initialize the
-     * table to only the 9 validators needed by DTD Validation.
-     * 
-     * If we start with Schema's then we initialize to
-     * to full set of validators.
-     * 
-     * @param registrySet
-     */
-    public void initializeDTDRegistry() {
-
-        if (fgRegistryExpanded == false) { //Core datatypes shared by DTD attributes and Schema
-
-            try {
-                fgBaseTypes.put("string",            new StringDatatypeValidator() );
-                fgBaseTypes.put("ID",                new IDDatatypeValidator());
-                fgBaseTypes.put("IDREF",             new IDREFDatatypeValidator());
-                fgBaseTypes.put("ENTITY",            new ENTITYDatatypeValidator());
-                fgBaseTypes.put("NOTATION",          new NOTATIONDatatypeValidator());
-
-                createDatatypeValidator( "IDREFS", new IDREFDatatypeValidator(), null , true );
-
-                createDatatypeValidator( "ENTITIES", new ENTITYDatatypeValidator(),  null, true );
-
-                /***
-                Hashtable facets = new Hashtable();
-                facets.put(SchemaSymbols.ELT_PATTERN , "\\c+" );
-                createDatatypeValidator("NMTOKEN", new StringDatatypeValidator(), facets, false );
-                /***/
-                createDatatypeValidator("NMTOKEN", new NMTOKENDatatypeValidator(), null, false );
-                /***/
-
-                createDatatypeValidator("NMTOKENS",  
-                                        getDatatypeValidator( "NMTOKEN" ), null, true );
-            } catch (InvalidDatatypeFacetException ex) {
-                ex.printStackTrace();
-            } catch (InvalidDatatypeValueException ex) {
-                ex.printStackTrace();
-            }
-        }
-    }
-
-
-    public void resetRegistry() {
-        if (fgBaseTypes != null) {
-            fgBaseTypes.clear();
-            fgRegistryExpanded = false;
-            //initializeDTDRegistry();
-        }
-    }
-
-    /**
-     * Create datatype validator.
-     * 
-     * @param name Name of type.
-     * @param base The base type, or null if there is no base type.
-     * @param facets The facets.
-     * @param list True if this type is a list.
-     * 
-     * @return The new datatype validator.
-     */
-    public DatatypeValidator createDatatypeValidator(String name, DatatypeValidator base, Hashtable facets, boolean list)
-    throws InvalidDatatypeFacetException, InvalidDatatypeValueException {
-
-        DatatypeValidator simpleType = null;
-
-        if (this.fDebug == true) {
-            System.out.println("type name = " + name );
-        }
-
-        if (base == null) {
-            synchronized (DatatypeValidatorFactoryImpl.class) {
-                if (!fgBaseTypes.containsKey(name)) {
-                    // lazily construct DTD base types
-                    if (!fgBaseTypes.containsKey("NMTOKEN")) {
-                        initializeDTDRegistry();
-                    }
-                    /***
-                    if (!fgBaseTypes.containsKey(name)) {
-                        // lazily construct Schema base types
-                        if (!fgBaseTypes.containsKey("boolean")) {
-                            expandRegistryToFullSchemaSet();
-                        }
-                    }
-                    /***/
-                }
-            }
-            base = getDatatypeValidator(name);
-        }
-        if (base != null) {
-            if (list) {
-                simpleType = new ListDatatypeValidator(base, facets, list);    
-            } else {
-                try {
-                    Class validatorDef = base.getClass();
-
-                    Class [] validatorArgsClass = new Class[] {  
-                        org.apache.xerces.impl.dv.dtd.DatatypeValidator.class,
-                        java.util.Hashtable.class,
-                        boolean.class};
-
-
-
-                    Object [] validatorArgs     = new Object[] {
-                        base, facets, Boolean.FALSE};
-
-
-
-
-                    Constructor validatorConstructor =
-                    validatorDef.getConstructor( validatorArgsClass );
-
-
-                    simpleType = 
-                    ( DatatypeValidator ) createDatatypeValidator (
-                                                                  validatorConstructor, validatorArgs );
-                } catch (NoSuchMethodException e) {
-                    e.printStackTrace();
-                }
-            }
-
-            if (simpleType != null) {
-                addValidator( name, simpleType );//register validator
-            }
-
-
-        }
-
-        return simpleType;// return it
-    }
-
-
-
-    private static Object createDatatypeValidator(Constructor validatorConstructor, 
-                                                  Object[] arguments)  throws  InvalidDatatypeFacetException {
-        Object validator = null;
-        try {
-            validator = validatorConstructor.newInstance(arguments);
-            return validator;
-        } catch (InstantiationException e) {
-            if (fDebug) {
-                e.printStackTrace();
-            } else {
-                return null;
-            }
-        } catch (IllegalAccessException e) {
-            if (fDebug) {
-                e.printStackTrace();
-            } else {
-                return null;
-            }
-        } catch (IllegalArgumentException e) {
-            if (fDebug) {
-                e.printStackTrace();
-            } else {
-                return null;
-            }
-        } catch (InvocationTargetException e) {
-            if (fDebug) {
-                System.out.println("!! The original error message is: " + e.getTargetException().getMessage() );
-                e.getTargetException().printStackTrace();
-            } else {
-                throw new InvalidDatatypeFacetException( e.getTargetException().getMessage() );
-                //System.out.println("Exception: " + e.getTargetException
-                //validator = null;
-            }
-        }
-        return validator;
-    }
-
-
-    public DatatypeValidator getDatatypeValidator(String type) {
-        DatatypeValidator validator = (DatatypeValidator)fUserDefinedTypes.get(type);
-        if (validator == null) {
-            validator = (DatatypeValidator)fgBaseTypes.get(type);
-        }
-        return validator;
-    }
-
-    private void addValidator(String name, DatatypeValidator v) {
-        fUserDefinedTypes.put(name,v);
-    }
-
-    /***
-    static public DatatypeValidatorFactoryImpl getDatatypeRegistry() {
-
-        return fRegistryOfDatatypes;
-    }//this method needs to be deleted or commented in once we change to no Singleton
-
-    static public void main( String argv[] ) {
-        DatatypeValidatorFactoryImpl  tstRegistry = DatatypeValidatorFactoryImpl.getDatatypeRegistry();//this needs to ne commented out or deleted once we go to no singleton
-        // This needs to be commented out
-        //DatatypeValidatorFactoryImpl  tstRegistry = new DatatypeValidatorFactoryImpl();
-
-        System.out.println("tstRegistry = " + tstRegistry );
-
-        DatatypeValidator   tstData1            = tstRegistry.getDatatypeValidator( "string" );
-        DatatypeValidator   tstData2            = tstRegistry.getDatatypeValidator( "boolean" );
-        DatatypeValidator   tstData3            = tstRegistry.getDatatypeValidator( "NOTATION" );
-        DatatypeValidator   tstData4            = tstRegistry.getDatatypeValidator( "float" );
-
-        System.out.println( "string = " + tstData1 );
-        System.out.println( "boolean = " + tstData2 );
-        System.out.println( "NOTATION = " + tstData3 );
-
-        System.out.println( "registry = " + tstRegistry );
-        System.out.println( "basetypes registered are " );
-        Enumeration  listOfDatatypes = tstRegistry.fBaseTypes.keys();
-        int index = 0;
-        while (listOfDatatypes.hasMoreElements()) {
-            System.out.println( "Datatype[ " + (index++) + "] =" + listOfDatatypes.nextElement() ); 
-        }
-        String value = "3.444";
-        try {
-            tstData4.validate( value, null ); 
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-        System.out.println("Value = " + value + " is valid " ); 
-
-
-        value = "b344.3";
-        try {
-            tstData4.validate( value, null ); 
-        } catch (Exception ex) {
-            System.out.println("float value = " + value + " is Not valid " );
-        }
-
-        DatatypeValidator  idData = tstRegistry.getDatatypeValidator( "ID" );
-
-        if (idData != null) {
-            ((IDDatatypeValidator) idData).initialize(null);
-            try {
-                idData.validate( "a1", null );
-                idData.validate( "a2", null );
-            } catch (Exception ex) {
-                ex.printStackTrace();
-            }
-            Hashtable tst = (Hashtable)((IDDatatypeValidator) idData).getInternalStateInformation();
-            if (tst != null) {
-                System.out.println("Table of ID = " + tst.toString());
-            }
-            //try {
-            //   idData.validate( "a1", null );
-            //} catch ( Exception ex ) {
-            //   ex.printStackTrace();// Should throw a unique exception
-            //}
-
-        }
-
-        DatatypeValidator idRefData = tstRegistry.getDatatypeValidator("IDREF" );
-        if (idRefData != null) {
-            IDREFDatatypeValidator refData = (IDREFDatatypeValidator) idRefData;
-            refData.initialize( ((IDDatatypeValidator) idData).getInternalStateInformation());
-            try {
-                refData.validate( "a1", null );
-                refData.validate( "a2", null );
-                //refData.validate( "a3", null );//Should throw exception at validate()
-                refData.validate();
-            } catch (Exception ex) {
-                ex.printStackTrace();
-            }
-        }
-        Grammar grammar             = new Grammar();
-        if (grammar != null) {
-            ENTITYDatatypeValidator entityValidator
-            = (ENTITYDatatypeValidator) tstRegistry.getDatatypeValidator("ENTITY");
-            entityValidator.initialize( grammar );
-            try {
-                entityValidator.validate( "a1", null );//Should throw exception
-            } catch (Exception ex) {
-                ex.printStackTrace();
-            }
-        }
-
-    }
-    /***/
-
-}
-
-
diff --git a/src/org/apache/xerces/impl/dv/dtd/ENTITYDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/ENTITYDatatypeValidator.java
deleted file mode 100644
index 53dd155..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/ENTITYDatatypeValidator.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.StringTokenizer;
-
-
-import org.apache.xerces.impl.dtd.XMLEntityDecl;
-import org.apache.xerces.impl.dtd.Grammar;
-
-
-/**
- * <P>ENTITYDatatypeValidator implements the
- * DatattypeValidator interface.
- * This validator embodies the ENTITY attribute type
- * from XML1.0 recommendation.
- * The Value space of ENTITY is the set of all strings
- * that match the NCName production and have been
- * declared as an unparsed entity in a document
- * type definition.
- * The Lexical space of Entity is the set of all
- * strings that match the NCName production.
- * The value space of ENTITY is scoped to a specific
- * instance document.</P>
- * <P>This is a statefull datatype validator and it
- * needs access to a valid Grammar structure to being 
- * able to validate entities.</P>
- * 
- * @author Jeffrey Rodriguez-
- * @version $Id$
- * @see org.apache.xerces.impl.dtd.Grammar
- * @see org.apache.xerces.impl.dtd.DTDGrammar
- * @see org.apache.xerces.impl.xs.SchemaGrammar
- */
-public class ENTITYDatatypeValidator extends AbstractDatatypeValidator 
-implements StatefullDatatypeValidator {
-    private DatatypeValidator        fBaseValidator    = null;
-    private Grammar                  fGrammar          = null;
-    private XMLEntityDecl            fEntityDecl       = new XMLEntityDecl();
-
-    public ENTITYDatatypeValidator () throws InvalidDatatypeFacetException {
-        this( null, null, false ); // Native, No Facets defined, Restriction
-    }
-
-    public ENTITYDatatypeValidator ( DatatypeValidator base, Hashtable facets,
-                                     boolean derivedByList  ) throws InvalidDatatypeFacetException {
-        setBasetype( base ); // Set base type
-    }
-
-
-    /**
-     * <P>Checks that "content" string is valid
-     * datatype.
-     * If invalid a Datatype validation exception is thrown.</P>
-     * <P>The following constrain is checked:
-     * ENTITY values must match an unparsed entity 
-     * name that is declared in the schema.</P> 
-     * 
-     * @param content A string containing the content to be validated
-     * @param state
-     * @exception throws InvalidDatatypeException if the content is
-     *                   invalid according to the rules for the validators
-     * @exception InvalidDatatypeValueException
-     * @see InvalidDatatypeValueException
-     */
-    public void validate(String content, Object state ) throws InvalidDatatypeValueException{
-        int entityDeclIndex = -1;
-        if (fGrammar == null) {
-            InvalidDatatypeValueException error = 
-            new InvalidDatatypeValueException();//Need Message
-            error.setKeyIntoReporter( "ENTITYFailedInitializeGrammar");
-            throw error;
-        }
-
-        fEntityDecl.clear();//Reset Entity Decl struct
-
-        entityDeclIndex = fGrammar.getEntityDeclIndex( content );
-
-        if (entityDeclIndex > -1) {
-            fGrammar.getEntityDecl( entityDeclIndex, fEntityDecl );
-            if (fEntityDecl.notation == null) {// not unparsed entity
-                InvalidDatatypeValueException error = 
-                new InvalidDatatypeValueException( content );
-                error.setKeyIntoReporter( "ENTITYNotUnparsed" );
-                throw error;
-            }
-        } else {
-            InvalidDatatypeValueException error = 
-            new InvalidDatatypeValueException( content );
-            error.setKeyIntoReporter( "ENTITYNotValid" );
-            throw error;
-        }
-    }
-
-    /**
-     * A no-op method in this Datatype
-     */
-    public void validate(){
-    }
-
-
-
-    /**
-     * <P>Initializes internal Grammar reference
-     * This method is unique to ENTITYDatatypeValidator.</P>
-     * <P>This method should  be called before calling the
-     * validate method</P>
-     * 
-     * @param grammar
-     */
-    public void initialize( Object grammar ) {
-        //System.out.println("ENTITYDatatypeValidator initialized" );
-        fGrammar = (Grammar) grammar;
-        //System.out.println("grammar = " + fGrammar );
-    }
-
-    /**
-     * REVISIT
-     * Compares two Datatype for order
-     * 
-     * @return 
-     */
-    public int compare( String  content1, String content2) {
-        return -1;
-    }
-
-    public Hashtable getFacets() {
-        return null;
-    }
-
-    // Private methods start here
-
-    /**
-       * Returns a copy of this object.
-       */
-    public Object clone() throws CloneNotSupportedException {
-        throw new CloneNotSupportedException("clone() is not supported in "+this.getClass().getName());
-    }
-
-
-   /**
-    * A no-op method in this validator
-    */
-    public Object getInternalStateInformation() {
-    return null;
-    }
-
-    /**
-     * 
-     * @param base   the validator for this type's base type
-     */
-    private void setBasetype(DatatypeValidator base) {
-        fBaseValidator = base;
-    }
-
-
-
-}
diff --git a/src/org/apache/xerces/impl/dv/dtd/IDDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/IDDatatypeValidator.java
deleted file mode 100644
index 285cf5f..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/IDDatatypeValidator.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.Vector;
-import java.util.StringTokenizer;
-import org.apache.xerces.util.XMLChar;
-import java.util.NoSuchElementException;
-
-
-/**
- * <P>IDDatatypeValidator - ID represents the ID attribute
- * type from XML 1.0 Recommendation. The value space
- * od ID is the set of all strings that match the
- * NCName production and have been used in an XML
- * document. The lexical space of ID is the set of all
- * strings that match the NCName production.</P>
- * <P>The value space of ID is scoped to a specific
- * instance document.</P>
- * <P>The following constraint applies:
- * An ID must not appear more than once in an XML
- * document as a value of this type; i.e., ID values
- * must uniquely identify the elements which bear
- * them.</P>
- * <P>An ID validator is a statefull validator, it needs
- * read/write access to the associated instant document
- * table of IDs.</P>
- * <P>
- * The following snippet shows typical use of the
- * the IDDatatype:</P>
- * <CODE>
- * <PRE>
- *  DatatypeValidator  idData = tstRegistry.getDatatypeValidator( "ID" );
- * 
- *       if (  idData != null ) {
- *          ((IDDatatypeValidator) idData).initialize();
- *          try {
- *             idData.validate( "a1", null );
- *             idData.validate( "a2", null );
- *          } catch ( Exception ex ) {
- *             ex.printStackTrace();
- *          }
- *          Hashtable tst = (Hashtable)((IDDatatypeValidator) idData).getTableIds();
- *          if (tst != null) {
- *             System.out.println("Table of ID = " + tst.toString());
- *          }
- * 
- *       }
- * 
- *       DatatypeValidator idRefData = tstRegistry.getDatatypeValidator("IDREF" );
- *       if( idRefData != null ){
- *          IDREFDatatypeValidator refData = (IDREFDatatypeValidator) idRefData;
- *          refData.initialize( ((IDDatatypeValidator) idData).getTableIds());
- *          try {
- *             refData.validate( "a1", null );
- *             refData.validate( "a2", null );
- *             //refData.validate( "a3", null );//Should throw exception at validate()
- *             refData.validate();
- *          } catch( Exception ex ){
- *             ex.printStackTrace();
- *          }
- *       }
- *       </PRE>
- * </CODE>
- * 
- * @author Jeffrey Rodriguez
- * @version $Id$
- * @see AbstractDatatypeValidator
- * @see DatatypeValidator
- * @see IDREFDatatypeValidator
- */
-public class IDDatatypeValidator extends AbstractDatatypeValidator 
-implements StatefullDatatypeValidator {
-    private DatatypeValidator       fBaseValidator;
-    private Object                  fNullValue;
-    private DatatypeMessageProvider fMessageProvider = new DatatypeMessageProvider();
-    private Hashtable               fTableOfId;
-    private Locale                  fLocale;
-
-
-
-    public IDDatatypeValidator () throws InvalidDatatypeFacetException {
-        this( null, null, false ); // Native, No Facets defined, Restriction
-    }
-
-    public IDDatatypeValidator ( DatatypeValidator base, Hashtable facets, 
-                                 boolean derivedByList ) throws InvalidDatatypeFacetException  {
-    }
-
-
-
-    /**
-     * Checks that "content" string is valid
-     * datatype.
-     * If invalid a Datatype validation exception is thrown.
-     * 
-     * @param content A string containing the content to be validated
-     * @param state  Generic Object state that can be use to pass
-     *               Structures
-     * @return 
-     * @exception throws InvalidDatatypeException if the content is
-     *                   invalid according to the rules for the validators
-     * @exception InvalidDatatypeValueException
-     * @see InvalidDatatypeValueException
-     */
-    public void validate(String content, Object state ) throws InvalidDatatypeValueException{
-
-        boolean status;
-        if ((status = XMLChar.isValidName(content) ) == false) {//Check if is valid key-[81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
-            InvalidDatatypeValueException error =  new
-                                                   InvalidDatatypeValueException( content );
-            error.setKeyIntoReporter( "IDInvalid" );
-            throw error;
-        }
-        if (!addId( content)) { //It is OK to pass a null here
-            InvalidDatatypeValueException error = 
-            new InvalidDatatypeValueException( content );
-            error.setKeyIntoReporter( "IDNotUnique" );
-            throw error;
-        }
-    }
-
-    /**
-     * A no-op method in this Datatype
-     */
-    public void validate() throws InvalidDatatypeValueException{
-    }
-
-
-    /**
-     * Initializes internal table of IDs used
-     * by ID datatype validator to keep track
-     * of ID's.
-     * This method is unique to IDDatatypeValidator.
-     * 
-     * @param state  This is a dummy parameter.
-     */
-    public void initialize( Object tableOfIDs) {
-        fTableOfId = (Hashtable) tableOfIDs;
-    }
-
-    /**
-     * REVISIT
-     * Compares two Datatype for order
-     * 
-     * @param o1
-     * @param o2
-     * @return 
-     */
-    public int compare( String content1, String content2) {
-        return -1;
-    }
-
-    public Hashtable getFacets() {
-        return null;
-    }
-
-    /**
-       * Return a copy of this object.
-       */
-    public Object clone() throws CloneNotSupportedException {
-        throw new CloneNotSupportedException("clone() is not supported in "+this.getClass().getName());
-    }
-
-    /**
-     * This method is unique to IDDatatypeValidator.
-     * It returns a reference to the internal ID table.
-     * This method should be used by the IDREF datatype
-     * validator which needs read access to ID table.
-     * 
-     * @return 
-     */
-    public Object getInternalStateInformation() {
-        return fTableOfId;
-    }
-
-
-    /**
-     * Name of base type as a string.
-     * A Native datatype has the string "native"  as its
-     * base type.
-     * 
-     * @param base   the validator for this type's base type
-     */
-    private void setBasetype(DatatypeValidator base) {
-        fBaseValidator = base;
-    }
-
-    /**
-     * Adds validated ID to internal table of ID's.
-     * We check ID uniqueness constraint.
-     * 
-     * @param content
-     * @return    If ID validated is not unique we return a false and
-     *         then validate method throws a validation exception.
-     */
-    private boolean addId(String content) {
-        if (fTableOfId.containsKey( content ) == true ) {
-            return false;
-        }
-        if (this.fNullValue == null) {
-            fNullValue = new Object();
-        }
-        try {
-            fTableOfId.put( content, fNullValue ); 
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-        return true;
-    } // addId(int):boolean
-
-
-
-    /**
-     * set the locate to be used for error messages
-     */
-    public void setLocale(Locale locale) {
-        fLocale = locale;
-    }
-
-
-    private String getErrorString(int major, int minor, Object args[]) {
-        //return fMessageProvider.createMessage(fLocale, major, minor, args);
-        return fMessageProvider.formatMessage(fLocale, null, null );
-    }
-
-
-}
diff --git a/src/org/apache/xerces/impl/dv/dtd/IDREFDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/IDREFDatatypeValidator.java
deleted file mode 100644
index 836dc1c..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/IDREFDatatypeValidator.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.StringTokenizer;
-import org.apache.xerces.util.XMLChar;
-import java.util.NoSuchElementException;
-/**
- * <P>IDREFDatatypeValidator - represents the IDREFS
- * attribute type from XML 1.0 recommendation. The
- * Value Space of IDREF is the set of all strings
- * that match the NCName production and have been
- * used in an XML Document as the value of an element 
- * or attribute of Type ID. The Lexical space of
- * IDREF is the set of strings that match the NCName
- * production.</P>
- * <P>The Value space of IDREF is scoped to a specific
- * instance document</P>
- * <P>This datatatype checks the following constraint:
- * An IDREF must match the value of an ID in the XML
- * document in which it occurs.
- * </P>
- * The following snippet shows typical use of the
- * the IDDatatype:</P>
- * <CODE>
- * <PRE>
- *       DatatypeValidator idRefData = tstRegistry.getDatatypeValidator("IDREF" );
- *       if( idRefData != null ){
- *          IDREFDatatypeValidator refData = (IDREFDatatypeValidator) idRefData;
- *          refData.initialize( ((IDDatatypeValidator) idData).getTableIds());
- *          try {
- *             refData.validate( "a1", null );
- *             refData.validate( "a2", null );
- *             //refData.validate( "a3", null );//Should throw exception at validate()
- *             refData.validate();
- *          } catch( Exception ex ){
- *             ex.printStackTrace();
- *          }
- *       }
- *       </PRE>
- * </CODE>
- * 
- * @author Jeffrey Rodriguez-
- * @version $Id$
- * @see IDDatatypeValidator
- * @see DatatypeValidator
- * @see DatatypeValidator
- */
-public class IDREFDatatypeValidator extends AbstractDatatypeValidator
-implements StatefullDatatypeValidator{
-   private DatatypeValidator fBaseValidator    = null;
-   private Hashtable              fTableOfId   = null; //This is pass to us through the state object
-   private Hashtable              fTableIDRefs = null;
-   private Object                   fNullValue = null;
-   private Locale            fLocale           = null;
-   private DatatypeMessageProvider fMessageProvider = new DatatypeMessageProvider();
-
-
-   public IDREFDatatypeValidator () throws InvalidDatatypeFacetException {
-      this( null, null, false ); // Native, No Facets defined, Restriction
-   }
-
-   public IDREFDatatypeValidator ( DatatypeValidator base, Hashtable facets, 
-                                   boolean derivedByList ) throws InvalidDatatypeFacetException { 
-
-      setBasetype( base ); // Set base type 
-
-   }
-
-
-   /**
-    * Checks that "content" string is valid 
-    * datatype.
-    * If invalid a Datatype validation exception is thrown.
-    * 
-    * @param content A string containing the content to be validated
-    * @param derivedBylist
-    *                Flag which is true when type
-    *                is derived by list otherwise it
-    *                it is derived by extension.
-    *                
-    * @exception throws InvalidDatatypeException if the content is
-    *                   invalid according to the rules for the validators
-    * @exception InvalidDatatypeValueException
-    * @see         InvalidDatatypeValueException
-    */
-   public void validate(String content, Object state ) throws InvalidDatatypeValueException{
-      //Pass content as a String
-      if (!XMLChar.isValidName(content)) {//Check if is valid key
-         InvalidDatatypeValueException error = new InvalidDatatypeValueException( content );//Need Message
-         error.setKeyIntoReporter( "IDREFInvalid" );
-         throw error;//Need Message
-      }
-      addIdRef( content, state);// We are storing IDs 
-   }
-
-   /**
-    * <P>This method is unique to IDREFDatatypeValidator</P>
-    * <P>Validator should call this method at the EndDocument
-    * call to start IDREF constraint validation. This validation
-    * rule checks IDREF values accumulated in internal
-    * table against read table passed to IDREF validator
-    * at instantiation time.</P>
-    * <P>Caveats -
-    * <LI>
-    * Do not call this validator method until
-    * you are sure that all ID values have been found since
-    * this method contains a live reference to an internal
-    * ID table which the ID validator could still be
-    * updating.</LI>
-    * <LI>Do not call this method before the initialize method
-    * since the initialize method will set the reference
-    * to ID table used by this method to validate the
-    * IDREFs.</LI></P>
-    * 
-    * @exception InvalidDatatypeValueException
-    */
-   public void validate() throws InvalidDatatypeValueException{
-      checkIdRefs();
-   }
-
-
-   /**
-    * <P>This method is unique to IDREFDatatypeValidator</P>
-    * <P>This method initializes the internal reference
-    * to the ID table of ID's and IDREF internal table
-    * of IDREFs.</P>
-    * <P>This method should be called before the valid()
-    * method</P>
-    * 
-    * @param tableOfIDs
-    */
-   public void initialize( Object tableOfIDs ){
-      //System.out.println("IDREF datatype initialized" );
-         
-      if ( this.fTableIDRefs != null) {
-         this.fTableIDRefs.clear();
-      } else {
-        this.fTableIDRefs = new Hashtable();
-      }
-      fTableOfId = (Hashtable) tableOfIDs; //set reference to table of Ids.
-   }
-
-
-
-   /**
-    * REVISIT
-    * Compares two Datatype for order
-    * 
-    * @param o1
-    * @param o2
-    * @return 
-    */
-   public int compare( String content1, String content2){
-      return -1;
-   }
-
-
-   public Hashtable getFacets(){
-      return null;
-   }
-   /**
-      * Returns a copy of this object.
-      */
-   public Object clone() throws CloneNotSupportedException {
-      throw new CloneNotSupportedException("clone() is not supported in "+this.getClass().getName());
-   }
-
-   /**
-     * Name of base type as a string.
-     * A Native datatype has the string "native"  as its
-     * base type.
-     * 
-     * @param base   the validator for this type's base type
-     */
-   private void setBasetype(DatatypeValidator base){
-      fBaseValidator = base;
-   }
-
-   /** addId. */
-   private void addIdRef(String content, Object state) {
-      if ( fTableOfId != null &&  fTableOfId.containsKey( content ) ) {
-         return;
-      }
-      if ( fTableIDRefs == null ) {
-         fTableIDRefs = new Hashtable();
-      } else if ( fTableIDRefs.containsKey( content ) ) {
-         return;
-      }
-      if ( this.fNullValue == null ) {
-         fNullValue = new Object();
-      }
-      try {
-         this.fTableIDRefs.put( content, fNullValue ); 
-      } catch ( OutOfMemoryError ex ) {
-         System.out.println( "Out of Memory: Hashtable of ID's has " + this.fTableIDRefs.size() + " Elements" );
-         ex.printStackTrace();
-      }
-   } // addId(int):boolean
-
-
-   /**
-    * <P>Private method used to check the IDREF valid
-    * ID constraint</P>
-    * 
-    * @exception InvalidDatatypeValueException
-    */
-   private void checkIdRefs() throws InvalidDatatypeValueException {
-
-      if ( fTableIDRefs == null)
-         return;
-
-      Enumeration en = this.fTableIDRefs.keys();
-
-      while (en.hasMoreElements()) {
-         String key = (String)en.nextElement();
-         if ( this.fTableOfId == null || ! this.fTableOfId.containsKey(key)) {
-
-            InvalidDatatypeValueException error =  new
-                                                   InvalidDatatypeValueException( key );
-            error.setKeyIntoReporter("MSG_ELEMENT_WITH_ID_REQUIRED" );
-            throw error;
-         }
-      }
-
-   } // checkIdRefs()
-
-
-   /**
-   * set the locate to be used for error messages
-   */
-   public void setLocale(Locale locale) {
-      fLocale = locale;
-   }
-
-   /**
-    * A no-op method in this validator
-    */
-   public Object getInternalStateInformation(){
-       return null;
-   }
-
-   private String getErrorString(int major, int minor, Object args[]) {
-      //return fMessageProvider.createMessage(fLocale, major, minor, args);
-      return fMessageProvider.formatMessage( fLocale, null, null);
-   }
-
-
-}
-
diff --git a/src/org/apache/xerces/impl/dv/dtd/InvalidDatatypeFacetException.java b/src/org/apache/xerces/impl/dv/dtd/InvalidDatatypeFacetException.java
deleted file mode 100644
index 9aa0bd9..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/InvalidDatatypeFacetException.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @version $Id$
- */
-public class InvalidDatatypeFacetException
-    extends SAXException {
-
-    //
-    // Constructors
-    //
-
-    /**
-     * 
-     */
-    public InvalidDatatypeFacetException() {
-        super("");
-    }
-
-    /**
-     * 
-     * 
-     * @param message 
-     */
-    public InvalidDatatypeFacetException(String message) {
-        super(message);
-    }
-
-    /**
-     * 
-     * 
-     * @param exception 
-     */
-    public InvalidDatatypeFacetException(Exception exception) {
-        super(exception);
-    }
-
-    /**
-     * 
-     * 
-     * @param message 
-     * @param exception 
-     */
-    public InvalidDatatypeFacetException(String message, Exception exception) {
-        super(message, exception);
-    }
-
-} // class InvalidDatatypeFacetException
diff --git a/src/org/apache/xerces/impl/dv/dtd/InvalidDatatypeValueException.java b/src/org/apache/xerces/impl/dv/dtd/InvalidDatatypeValueException.java
deleted file mode 100644
index df2edd8..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/InvalidDatatypeValueException.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import org.xml.sax.SAXException;
-
-/**
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @version $Id$
- */
-public class InvalidDatatypeValueException
-    extends SAXException {
-    //
-    //data
-    //
-   private int majorCode = -1;
-   private int minorCode  = -1;
-   private String keyIntoReporter;
-      //
-    // Constructors
-    //
-
-
-
-    /**
-     * 
-     */
-    public InvalidDatatypeValueException() {
-        super("");
-    }
-
-    /**
-     * 
-     * 
-     * @param message 
-     */
-    public InvalidDatatypeValueException(String message) {
-        super(message);
-    }
-
-    /**
-     * 
-     * 
-     * @param exception 
-     */
-    public InvalidDatatypeValueException(Exception exception) {
-        super(exception);
-    }
-
-    /**
-     * 
-     * 
-     * @param message 
-     * @param exception 
-     */
-    public InvalidDatatypeValueException(String message, Exception exception) {
-        super(message, exception);
-    }
-
-    //methods
-public  int getMinorCode(){
-    return  minorCode;
-}
-public  int getMajorCode(){
-    return  majorCode;
-}
-
-public  String getKeyIntoReporter(){
-    return keyIntoReporter;
-}
-
-public  void setMinorCode(int code ){
-    majorCode = code;
-}
-public  void setMajorCode(int code ){
-    minorCode = code;
-}
-public void setKeyIntoReporter( String key ){
-    keyIntoReporter = key;
-
-}
-
-
-} // class InvalidDatatypeValueException
diff --git a/src/org/apache/xerces/impl/dv/dtd/ListDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/ListDatatypeValidator.java
deleted file mode 100644
index f5ab51b..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/ListDatatypeValidator.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.text.Collator;
-import java.util.Enumeration;
-import java.util.StringTokenizer;
-import java.util.NoSuchElementException;
-
-
-
-/**
- * StringValidator validates that XML content is a W3C string type.
- */
-public class ListDatatypeValidator extends AbstractDatatypeValidator
-implements  StatefullDatatypeValidator {
-    private Locale     fLocale          = null;
-    DatatypeValidator  fBaseValidator   = null; // Native datatypes have null
-
-    private int        fLength           = 0;
-    private int        fMaxLength        = Integer.MAX_VALUE;
-    private int        fMinLength        = 0;
-    private String     fPattern          = null;
-    private Vector     fEnumeration      = null;
-    private int        fFacetsDefined    = 0;
-    private boolean    fDerivedByList    = false;//default
-
-    //private RegularExpression fRegex         = null;
-
-
-
-
-    public  ListDatatypeValidator () throws InvalidDatatypeFacetException{
-        this( null, null, false ); // Native, No Facets defined, Restriction
-
-    }
-
-    public ListDatatypeValidator ( DatatypeValidator base, Hashtable facets, 
-                                   boolean derivedByList ) throws InvalidDatatypeFacetException {
-
-        setBasetype( base ); // Set base type 
-
-        fDerivedByList = derivedByList;
-
-        if (facets != null) {
-            for (Enumeration e = facets.keys(); e.hasMoreElements();) {
-                String key = (String) e.nextElement();
-                if (key.equals("length")) {
-                    fFacetsDefined += DatatypeValidator.FACET_LENGTH;
-                    String lengthValue = (String)facets.get(key);
-                    try {
-                        fLength     = Integer.parseInt( lengthValue );
-                    } catch (NumberFormatException nfe) {
-                        throw new InvalidDatatypeFacetException("Length value '"+lengthValue+"' is invalid.");
-                    }
-                    if (fLength < 0)
-                        throw new InvalidDatatypeFacetException("Length value '"+lengthValue+"'  must be a nonNegativeInteger.");
-
-                } else if (key.equals("minlength")) {
-                    fFacetsDefined += DatatypeValidator.FACET_MINLENGTH;
-                    String minLengthValue = (String)facets.get(key);
-                    try {
-                        fMinLength     = Integer.parseInt( minLengthValue );
-                    } catch (NumberFormatException nfe) {
-                        throw new InvalidDatatypeFacetException("maxLength value '"+minLengthValue+"' is invalid.");
-                    }
-                } else if (key.equals("maxlength")) {
-                    fFacetsDefined += DatatypeValidator.FACET_MAXLENGTH;
-                    String maxLengthValue = (String)facets.get(key);
-                    try {
-                        fMaxLength     = Integer.parseInt( maxLengthValue );
-                    } catch (NumberFormatException nfe) {
-                        throw new InvalidDatatypeFacetException("maxLength value '"+maxLengthValue+"' is invalid.");
-                    }
-                } else if (key.equals("enumeration")) {
-                    fFacetsDefined += DatatypeValidator.FACET_ENUMERATION;
-                    fEnumeration    = (Vector)facets.get(key);
-                } else {
-                    throw new InvalidDatatypeFacetException("invalid facet tag : " + key);
-                }
-            }
-            if (((fFacetsDefined & DatatypeValidator.FACET_LENGTH ) != 0 )) {
-                if (((fFacetsDefined & DatatypeValidator.FACET_MAXLENGTH ) != 0 )) {
-                    throw new InvalidDatatypeFacetException(
-                                                           "It is an error for both length and maxLength to be members of facets." );  
-                } else if (((fFacetsDefined & DatatypeValidator.FACET_MINLENGTH ) != 0 )) {
-                    throw new InvalidDatatypeFacetException(
-                                                           "It is an error for both length and minLength to be members of facets." );
-                }
-            }
-
-            if (( (fFacetsDefined & ( DatatypeValidator.FACET_MINLENGTH |
-                                      DatatypeValidator.FACET_MAXLENGTH) ) != 0 )) {
-                if (fMinLength > fMaxLength) {
-                    throw new InvalidDatatypeFacetException( "Value of minLength = " + fMinLength +
-                                                             "must be greater that the value of maxLength" + fMaxLength );
-                }
-            }
-        }// End of Facets Setting
-    }
-
-
-
-
-    /**
-     * validate that a string is a W3C string type
-     * 
-     * @param content A string containing the content to be validated
-     * @param list
-     * @exception throws InvalidDatatypeException if the content is
-     *                   not a W3C string type
-     * @exception InvalidDatatypeValueException
-     */
-    public void validate(String content, Object state)  throws InvalidDatatypeValueException
-    {
-        checkContent( content, state );
-    }
-
-
-    /**
-     * set the locate to be used for error messages
-     */
-    public void setLocale(Locale locale) {
-        fLocale = locale;
-    }
-
-
-    /**
-     * 
-     * @return                          A Hashtable containing the facets
-     *         for this datatype.
-     */
-    public Hashtable getFacets() {
-        return null;
-    }
-
-    public int compare( String content, String facetValue ) {
-        // if derive by list then this should iterate through
-        // the tokens in each string and compare using the base type
-        // compare function.
-        // if not derived by list just pass the compare down to the
-        // base type.
-        return 0;
-    }
-
-    /**
-   * Returns a copy of this object.
-   */
-    public Object clone() throws CloneNotSupportedException  {
-        ListDatatypeValidator newObj = null;
-        try {
-            newObj = new ListDatatypeValidator();
-
-            newObj.fLocale           =  this.fLocale;
-            newObj.fBaseValidator    =  this.fBaseValidator;
-            newObj.fLength           =  this.fLength;
-            newObj.fMaxLength        =  this.fMaxLength;
-            newObj.fMinLength        =  this.fMinLength;
-            newObj.fPattern          =  this.fPattern;
-            newObj.fEnumeration      =  this.fEnumeration;
-            newObj.fFacetsDefined    =  this.fFacetsDefined;
-            newObj.fDerivedByList    =  this.fDerivedByList;
-        } catch (InvalidDatatypeFacetException ex) {
-            ex.printStackTrace();
-        }
-        return newObj;
-    }
-
-    // Private methods
-    private void checkContent( String content,  Object state )throws InvalidDatatypeValueException
-    {
-        StringTokenizer parsedList = new StringTokenizer( content );
-        try {
-            int numberOfTokens =  parsedList.countTokens();
-            if ((fFacetsDefined & DatatypeValidator.FACET_MAXLENGTH) != 0) {
-                if (numberOfTokens > fMaxLength) {
-                    throw new InvalidDatatypeValueException("Value '"+content+
-                                                            "' with length ='"+  numberOfTokens + "' tokens"+
-                                                            "' exceeds maximum length facet of '"+fMaxLength+"' tokens.");
-                }
-            }
-            if ((fFacetsDefined & DatatypeValidator.FACET_MINLENGTH) != 0) {
-                if (numberOfTokens < fMinLength) {
-                    throw new InvalidDatatypeValueException("Value '"+content+
-                                                            "' with length ='"+ numberOfTokens+ "' tokens" +
-                                                            "' is less than minimum length facet of '"+fMinLength+"' tokens." );
-                }
-            }
-
-            if ((fFacetsDefined & DatatypeValidator.FACET_LENGTH) != 0) {
-                if (numberOfTokens != fLength) {
-                    throw new InvalidDatatypeValueException("Value '"+content+
-                                                            "' with length ='"+ numberOfTokens+ "' tokens" +
-                                                            "' is not equal to length facet of '"+fLength+"' tokens.");
-                }
-            }
-
-            if ((fFacetsDefined & DatatypeValidator.FACET_ENUMERATION) != 0) {
-                // Enumerations are defined in the value space so the contains method
-                // of vector doesn't really do the right thing, we really should check using compare
-                if (fEnumeration.contains( content ) == false)
-                    throw new InvalidDatatypeValueException("Value '"+
-                                                            content+"' must be one of "+fEnumeration);
-            }
-            try {
-                if (this.fDerivedByList) {
-                    if( numberOfTokens == 0 ){
-                        InvalidDatatypeValueException error = new InvalidDatatypeValueException( content );
-                        throw error;
-                    }
-                    while (parsedList.hasMoreTokens()) {       //Check each token in list against base type
-                        if (this.fBaseValidator != null) {//validate against parent type if any
-                            this.fBaseValidator.validate( parsedList.nextToken(), state );
-                        }
-                    }
-                } else {
-                    if (this.fBaseValidator != null) {//validate against parent type if any
-                        this.fBaseValidator.validate( content, state );
-                    }
-                }
-            } catch (InvalidDatatypeValueException ex) { //Keep bubbling up exception but change content to list content
-                                                         //Unfortunately we need to throw a new Exception
-                InvalidDatatypeValueException error = new InvalidDatatypeValueException( content );//Need Message
-                error.setKeyIntoReporter( ex.getKeyIntoReporter() );
-                throw error;//type message repacked with the List content message
-            }
-
-        } catch (NoSuchElementException e) {
-            e.printStackTrace();
-        }
-    }
-
-    private void setBasetype( DatatypeValidator base) {
-        fBaseValidator = base;
-    }
-
-    /**
-     * <P>Initializes the internal datattype state with documentInstance state information</P>
-     * <P>This method should  be called before calling the
-     * validate method</P>
-     * 
-     * @param documentInstanceState
-     */
-    public void initialize( Object documentInstanceState ) {
-        if (fBaseValidator instanceof StatefullDatatypeValidator) {
-            ((StatefullDatatypeValidator)fBaseValidator).initialize( documentInstanceState ); 
-        }
-    }
-
-    /**
-     * <P>Initializes the internal datatype state 
-     */
-
-    public void validate()throws InvalidDatatypeValueException {
-        if ((fBaseValidator instanceof 
-             org.apache.xerces.impl.dv.dtd.IDREFDatatypeValidator )) {
-            ((StatefullDatatypeValidator)fBaseValidator).validate(); 
-        }
-
-    }
-    /**
-     * <P>This method returns some internal state of a statefull validator</P>
-     * It returns a reference to the internal state
-     *
-     * @return  Object
-     */
-    public Object getInternalStateInformation() {
-        Object value = null;
-        if (fBaseValidator instanceof 
-            org.apache.xerces.impl.dv.dtd.IDDatatypeValidator) {
-            value = ((StatefullDatatypeValidator)fBaseValidator).getInternalStateInformation();
-        }
-        return value;
-    }
-
-
-
-}
-
diff --git a/src/org/apache/xerces/impl/dv/dtd/NMTOKENDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/NMTOKENDatatypeValidator.java
deleted file mode 100644
index 130e137..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/NMTOKENDatatypeValidator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*                                                                                   :q
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Hashtable;
-
-import org.apache.xerces.util.XMLChar;
-
-/**
- * NMTOKEN datatype validator.
- *
- * @version $Id$
- */
-public class NMTOKENDatatypeValidator 
-    extends AbstractDatatypeValidator {
-
-   public  NMTOKENDatatypeValidator() throws InvalidDatatypeFacetException{
-        // Native, No Facets defined, Restriction
-      this( null, null, false );
-
-   }
-
-   public NMTOKENDatatypeValidator( DatatypeValidator base, Hashtable facets, 
-                                    boolean derivedByList ) throws InvalidDatatypeFacetException {
-       // ignore everything -- just do NMTOKEN validation
-   }
-
-   /**
-    * validate that a string is a W3C string type
-    * 
-    * @param content A string containing the content to be validated
-    * @param list
-    * @exception throws InvalidDatatypeException if the content is
-    *                   not a W3C string type
-    * @exception InvalidDatatypeValueException
-    */
-   public void validate(String content, Object state)  
-        throws InvalidDatatypeValueException {
-       if (!XMLChar.isValidNmtoken(content)) {
-           throw new InvalidDatatypeValueException(content+" is not a NMTOKEN");
-       }
-   }
-
-   public Hashtable getFacets() { return null; }
-
-   public int compare( String content, String facetValue){
-       return content.compareTo(facetValue);
-   }
-
-   public Object clone() throws CloneNotSupportedException  {
-      return this;
-   }
-
-} // class NMTOKENDatatypeValidator
diff --git a/src/org/apache/xerces/impl/dv/dtd/NOTATIONDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/NOTATIONDatatypeValidator.java
deleted file mode 100644
index cfda389..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/NOTATIONDatatypeValidator.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.StringTokenizer;
-import org.apache.xerces.util.XMLChar;
-import java.util.NoSuchElementException;
-
-
-/**
- * NOTATIONValidator defines the interface that data type validators must obey.
- * These validators can be supplied by the application writer and may be useful as
- * standalone code as well as plugins to the validator architecture.
- * 
- * @author Jeffrey Rodriguez-
- * @version $Id$
- */
- public class NOTATIONDatatypeValidator extends AbstractDatatypeValidator {
-    private DatatypeValidator fBaseValidator = null;
-
-    public NOTATIONDatatypeValidator () throws InvalidDatatypeFacetException {
-        this( null, null, false ); // Native, No Facets defined, Restriction
-    }
-
-    public NOTATIONDatatypeValidator ( DatatypeValidator base, Hashtable facets, 
-         boolean derivedByList ) throws InvalidDatatypeFacetException {
-         setBasetype( base ); // Set base type 
-    }
-
-
-    /**
-     * Checks that "content" string is valid 
-     * datatype.
-     * If invalid a Datatype validation exception is thrown.
-     * 
-     * @param content A string containing the content to be validated
-     * @param derivedBylist
-     *                Flag which is true when type
-     *                is derived by list otherwise it
-     *                it is derived by extension.
-     *                
-     * @exception throws InvalidDatatypeException if the content is
-     *                   invalid according to the rules for the validators
-     * @exception InvalidDatatypeValueException
-     * @see        InvalidDatatypeValueException
-     */
-    public void validate(String content, Object state ) throws InvalidDatatypeValueException{
-    }
-
-    public Hashtable getFacets(){
-        return null;
-    }
-
-
-
-    /**
-    * set the locate to be used for error messages
-    */
-    public void setLocale(Locale locale){
-    }
-
-    /**
-     * REVISIT
-     * Compares two Datatype for order
-     * 
-     * @param o1
-     * @param o2
-     * @return 
-     */
-    public int compare( String content1, String content2){
-        return -1;
-    }
-  /**
-     * Returns a copy of this object.
-     */
-    public Object clone() throws CloneNotSupportedException {
-        throw new CloneNotSupportedException("clone() is not supported in "+this.getClass().getName());
-    }
-
-    /**
-     * Name of base type as a string.
-     * A Native datatype has the string "native"  as its
-     * base type.
-     * 
-     * @param base   the validator for this type's base type
-     */
-
-    private void setBasetype(DatatypeValidator base){
-        fBaseValidator = base;
-    }
-
-
-}
diff --git a/src/org/apache/xerces/impl/dv/dtd/StatefullDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/StatefullDatatypeValidator.java
deleted file mode 100644
index d3c809b..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/StatefullDatatypeValidator.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.dtd;
-
-
-/**
- * <P>StatefullDatatypeValidator validates that XML content is a W3C string type.</P>
- * <P>This interface is implemented by classes that
- * need to use statefull datatypes</P>
- * <P>Most datatype are stateless in the sense that
- * after instantiation all the information required for
- * validation is passed to the datatype in the validate
- * method as content</P>
- * <P>A statefull datatype needs initialization, and 
- * other stages of validation as well as information about
- * the instance document<P>
- * 
- * @author Jeffrey Rodriguez
- * @version $Id$
- * @see ListDatatypeValidator
- * @see IDDatatypeValidator
- * @see IDREFDatatypeValidator
- * @see ENTITYDatatypeValidator
- * @see DatatypeValidator
- */
-public interface StatefullDatatypeValidator{
-     public void   validate() throws InvalidDatatypeValueException;
-     public void   initialize( Object documentInstanceInformation );
-     public Object getInternalStateInformation();
-}
-
diff --git a/src/org/apache/xerces/impl/dv/dtd/StringDatatypeValidator.java b/src/org/apache/xerces/impl/dv/dtd/StringDatatypeValidator.java
deleted file mode 100644
index fa7e468..0000000
--- a/src/org/apache/xerces/impl/dv/dtd/StringDatatypeValidator.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*                                                                                  
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.impl.dv.dtd;
-
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.text.Collator;
-import java.util.Enumeration;
-import java.util.StringTokenizer;
-import java.util.NoSuchElementException;
-
-
-
-/**
- * <P>StringValidator validates that XML content is a W3C string type.</P>
- * <P>The string datatype represents character strings in XML. The
- * value space of string is the set of finite-length sequences 
- * of characters (as defined in [XML 1.0 Recommendation 
- * (Second Edition)]) that match the Char production 
- * from [XML 1.0 Recommendation (Second Edition)].
- * A character is an atomic unit of communication; it
- * is not further specified except to note that every
- * character has a corresponding Universal Code Set
- * code point ([ISO 10646],[Unicode] and [Unicode3]),
- * which is an integer.</P>
- * @version $Id$
- */
-public class StringDatatypeValidator extends AbstractDatatypeValidator {
-private Locale     fLocale          = null;
-   DatatypeValidator  fBaseValidator   = null; // Native datatypes have null
-
-   private int        fLength           = 0;
-   private int        fMaxLength        = Integer.MAX_VALUE;
-   private int        fMinLength        = 0;
-   private String     fPattern          = null;
-   private Vector     fEnumeration      = null;
-   private short      fWhiteSpace       = DatatypeValidator.WHITESPACE_NONE;
-
-
-   /* per Schema CR
-   private String     fMaxInclusive     = null;
-   private String     fMaxExclusive     = null;
-   private String     fMinInclusive     = null;
-   private String     fMinExclusive     = null;
-   */
-   private int        fFacetsDefined    = 0;
-
-   private boolean    isMaxExclusiveDefined = false;
-   private boolean    isMaxInclusiveDefined = false;
-   private boolean    isMinExclusiveDefined = false;
-   private boolean    isMinInclusiveDefined = false;
-   //private RegularExpression fRegex         = null;
-
-
-
-
-
-   public  StringDatatypeValidator () throws InvalidDatatypeFacetException{
-      this( null, null, false ); // Native, No Facets defined, Restriction
-
-   }
-
-   public StringDatatypeValidator ( DatatypeValidator base, Hashtable facets, 
-                                    boolean derivedByList ) throws InvalidDatatypeFacetException {
-
-      setBasetype( base ); // Set base type 
-
-
-      // Set Facets if any defined
-      //fFacetsDefined = 0;
-      if ( facets != null  ) {
-         for (Enumeration e = facets.keys(); e.hasMoreElements();) {
-            String key = (String) e.nextElement();
-
-            if ( key.equals("length") ) {
-               fFacetsDefined += DatatypeValidator.FACET_LENGTH;
-               String lengthValue = (String)facets.get(key);
-               try {
-                  fLength     = Integer.parseInt( lengthValue );
-               } catch (NumberFormatException nfe) {
-                  throw new InvalidDatatypeFacetException("Length value '"+lengthValue+"' is invalid.");
-               }
-               if ( fLength < 0 )
-                  throw new InvalidDatatypeFacetException("Length value '"+lengthValue+"'  must be a nonNegativeInteger.");
-
-            } else if (key.equals("minlength") ) {
-               fFacetsDefined += DatatypeValidator.FACET_MINLENGTH;
-               String minLengthValue = (String)facets.get(key);
-               try {
-                  fMinLength     = Integer.parseInt( minLengthValue );
-               } catch (NumberFormatException nfe) {
-                  throw new InvalidDatatypeFacetException("minLength value '"+minLengthValue+"' is invalid.");
-               }
-            } else if (key.equals("maxlength") ) {
-               fFacetsDefined += DatatypeValidator.FACET_MAXLENGTH;
-               String maxLengthValue = (String)facets.get(key);
-               try {
-                  fMaxLength     = Integer.parseInt( maxLengthValue );
-               } catch (NumberFormatException nfe) {
-                  throw new InvalidDatatypeFacetException("maxLength value '"+maxLengthValue+"' is invalid.");
-               }
-            } 
-            /***
-            else if (key.equals(SchemaSymbols.ELT_PATTERN)) {
-               fFacetsDefined += DatatypeValidator.FACET_PATTERN;
-               fPattern = (String)facets.get(key);
-               fRegex   = new RegularExpression(fPattern, "X");
-            } 
-            /***/
-            else if (key.equals("enumeration")) {
-               fFacetsDefined += DatatypeValidator.FACET_ENUMERATION;
-               fEnumeration = (Vector)facets.get(key);
-               /* Per Schema CR - October 23 spec we don't have this facets in String datatype
-           } else if (key.equals(SchemaSymbols.ELT_MAXINCLUSIVE)) {
-               fFacetsDefined += DatatypeValidator.FACET_MAXINCLUSIVE;
-               fMaxInclusive = (String)facets.get(key);
-           } else if (key.equals(SchemaSymbols.ELT_MAXEXCLUSIVE)) {
-               fFacetsDefined += DatatypeValidator.FACET_MAXEXCLUSIVE;
-               fMaxExclusive = (String)facets.get(key);
-           } else if (key.equals(SchemaSymbols.ELT_MININCLUSIVE)) {
-               fFacetsDefined += DatatypeValidator.FACET_MININCLUSIVE;
-               fMinInclusive = (String)facets.get(key);
-           } else if (key.equals(SchemaSymbols.ELT_MINEXCLUSIVE)) {
-               fFacetsDefined += DatatypeValidator.FACET_MINEXCLUSIVE;
-               fMinExclusive = (String)facets.get(key);
-               */
-            } else if (key.equals("whitespace")) {
-               String         whiteSpaceChoice = (String)facets.get(key); 
-               fFacetsDefined += DatatypeValidator.FACET_WHITESPACE;
-               if ( whiteSpaceChoice.equals("preserve" ) ) {
-                  fWhiteSpace = DatatypeValidator.WHITESPACE_PRESERVE;
-               } else if ( whiteSpaceChoice.equals("replace") ) {
-                  fWhiteSpace = DatatypeValidator.WHITESPACE_REPLACE;
-               } else if ( whiteSpaceChoice.equals("collapse") ) {
-                  fWhiteSpace = DatatypeValidator.WHITESPACE_COLLAPSE;
-               }
-            } else {
-               throw new InvalidDatatypeFacetException("invalid facet tag : " + key);
-            }
-         }
-
-         if (((fFacetsDefined & DatatypeValidator.FACET_LENGTH ) != 0 ) ) {
-            if (((fFacetsDefined & DatatypeValidator.FACET_MAXLENGTH ) != 0 ) ) {
-               throw new InvalidDatatypeFacetException(
-                                                      "It is an error for both length and maxLength to be members of facets." );  
-            } else if (((fFacetsDefined & DatatypeValidator.FACET_MINLENGTH ) != 0 ) ) {
-               throw new InvalidDatatypeFacetException(
-                                                      "It is an error for both length and minLength to be members of facets." );
-            }
-         }
-
-         if ( ( (fFacetsDefined & ( DatatypeValidator.FACET_MINLENGTH |
-                                    DatatypeValidator.FACET_MAXLENGTH) ) != 0 ) ) {
-            if ( fMinLength > fMaxLength ) {
-               throw new InvalidDatatypeFacetException( "Value of minLength = '" + fMinLength +
-                                                        "'must be less than the value of maxLength = '" + fMaxLength + "'.");
-            }
-         }
-
-         isMaxExclusiveDefined = ((fFacetsDefined & 
-                                   DatatypeValidator.FACET_MAXEXCLUSIVE ) != 0 )?true:false;
-         isMaxInclusiveDefined = ((fFacetsDefined & 
-                                   DatatypeValidator.FACET_MAXINCLUSIVE ) != 0 )?true:false;
-         isMinExclusiveDefined = ((fFacetsDefined &
-                                   DatatypeValidator.FACET_MINEXCLUSIVE ) != 0 )?true:false;
-         isMinInclusiveDefined = ((fFacetsDefined &
-                                   DatatypeValidator.FACET_MININCLUSIVE ) != 0 )?true:false;
-
-         if ( isMaxExclusiveDefined && isMaxInclusiveDefined ) {
-            throw new InvalidDatatypeFacetException(
-                                                   "It is an error for both maxInclusive and maxExclusive to be specified for the same datatype." ); 
-         }
-         if ( isMinExclusiveDefined && isMinInclusiveDefined ) {
-            throw new InvalidDatatypeFacetException(
-                                                   "It is an error for both minInclusive and minExclusive to be specified for the same datatype." ); 
-         }
-
-      }// End of Facets Setting
-   }
-
-
-
-
-   /**
-    * validate that a string is a W3C string type
-    * 
-    * @param content A string containing the content to be validated
-    * @param list
-    * @exception throws InvalidDatatypeException if the content is
-    *                   not a W3C string type
-    * @exception InvalidDatatypeValueException
-    */
-   public void validate(String content, Object state)  throws InvalidDatatypeValueException
-   {
-      checkContent( content, state );
-   }
-
-
-   /**
-    * set the locate to be used for error messages
-    */
-   public void setLocale(Locale locale) {
-      fLocale = locale;
-   }
-
-
-   /**
-    * 
-    * @return                          A Hashtable containing the facets
-    *         for this datatype.
-    */
-   public Hashtable getFacets(){
-      return null;
-   }
-
-   private void checkContent( String content, Object state )throws InvalidDatatypeValueException
-   {
-
-      if ( this.fBaseValidator != null ) {//validate against parent type if any
-         this.fBaseValidator.validate( content, state );
-      }
-
-      if ( (fFacetsDefined & DatatypeValidator.FACET_MAXLENGTH) != 0 ) {
-         if ( content.length() > fMaxLength ) {
-            throw new InvalidDatatypeValueException("Value '"+content+
-                                                    "' with length '"+content.length()+
-                                                    "' exceeds maximum length facet of '"+fMaxLength+"'.");
-         }
-      }
-      if ( (fFacetsDefined & DatatypeValidator.FACET_MINLENGTH) != 0 ) {
-         if ( content.length() < fMinLength ) {
-            throw new InvalidDatatypeValueException("Value '"+content+
-                                                    "' with length '"+content.length()+
-                                                    "' is less than minimum length facet of '"+fMinLength+"'." );
-         }
-      }
-
-      if ( (fFacetsDefined & DatatypeValidator.FACET_LENGTH) != 0 ) {
-         if ( content.length() != fLength ) {
-            throw new InvalidDatatypeValueException("Value '"+content+
-                                                    "' with length '"+content.length()+
-                                                    "' is not equal to length facet '"+fLength+"'.");
-         }
-      }
-
-
-
-      if ( (fFacetsDefined & DatatypeValidator.FACET_ENUMERATION) != 0 ) {
-         if ( fEnumeration.contains( content ) == false )
-            throw new InvalidDatatypeValueException("Value '"+content+"' must be one of "+fEnumeration);
-      }
-      /*  Per October 23 CR - facets don't apply to StringValidator
-      if ( isMaxExclusiveDefined == true ) {
-          int comparisonResult;
-          comparisonResult  = compare( content, fMaxExclusive );
-          if ( comparisonResult >= 0 ) {
-              throw new InvalidDatatypeValueException( "MaxExclusive:Value '"+content+ "'  must be " +
-                                                       "lexicographically less than" + fMaxExclusive );
-
-          }
-
-      }
-      if ( isMaxInclusiveDefined == true ) {
-          int comparisonResult;
-          comparisonResult  = compare( content, fMaxInclusive );
-          if ( comparisonResult > 0 )
-              throw new InvalidDatatypeValueException( "MaxInclusive:Value '"+content+ "' must be " +
-                                                       "lexicographically less or equal than" + fMaxInclusive );
-      }
-
-      if ( isMinExclusiveDefined == true ) {
-          int comparisonResult;
-          comparisonResult  = compare( content, fMinExclusive );
-
-          //System.out.println( "exclusive = " + comparisonResult );
-
-          if ( comparisonResult <= 0 )
-              throw new InvalidDatatypeValueException( "MinExclusive:Value '"+content+ "' must be " +
-                                                       "lexicographically greater than" + fMinExclusive );
-      }
-      if ( isMinInclusiveDefined == true ) {
-          int comparisonResult;
-          comparisonResult = compare( content, fMinInclusive );
-          //System.out.println( "inclusive = " + comparisonResult );
-          if ( comparisonResult < 0 )
-              throw new InvalidDatatypeValueException( "MinInclusive:Value '"+content+ "' must be " +
-                                                       "lexicographically greater or equal than '" + fMinInclusive  + "'." );
-      }
-
-        */
-
-      /***
-      if ( (fFacetsDefined & DatatypeValidator.FACET_PATTERN ) != 0 ) {
-         //RegularExpression regex = new RegularExpression(fPattern );
-         if ( fRegex == null || fRegex.matches( content) == false )
-            throw new InvalidDatatypeValueException("Value '"+content+
-                                                    "' does not match regular expression facet '" + fPattern + "'." );
-      }
-      /***/
-
-   }
-   public int compare( String content, String facetValue ){
-      Locale    loc       = Locale.getDefault();
-      Collator  collator  = Collator.getInstance( loc );
-      return collator.compare( content, facetValue );
-   }
-
-   /**
-  * Returns a copy of this object.
-  */
-   public Object clone() throws CloneNotSupportedException  {
-      StringDatatypeValidator newObj = null;
-      try {
-         newObj = new StringDatatypeValidator();
-
-         newObj.fLocale           =  this.fLocale;
-         newObj.fBaseValidator    =  this.fBaseValidator;
-         newObj.fLength           =  this.fLength;
-         newObj.fMaxLength        =  this.fMaxLength;
-         newObj.fMinLength        =  this.fMinLength;
-         newObj.fPattern          =  this.fPattern;
-         newObj.fEnumeration      =  this.fEnumeration;
-         /* October 23 - per XML Datatype Spec 
-         newObj.fMaxInclusive     =  this.fMaxInclusive;
-         newObj.fMaxExclusive     =  this.fMaxExclusive;
-         newObj.fMinInclusive     =  this.fMinInclusive;
-         newObj.fMinExclusive     =  this.fMinExclusive;
-         */
-         newObj.fFacetsDefined    =  this.fFacetsDefined;
-         newObj.isMaxExclusiveDefined = this.isMaxExclusiveDefined;
-         newObj.isMaxInclusiveDefined = this.isMaxInclusiveDefined;
-         newObj.isMinExclusiveDefined = this.isMinExclusiveDefined;
-         newObj.isMinInclusiveDefined = this.isMinInclusiveDefined;
-      } catch ( InvalidDatatypeFacetException ex) {
-         ex.printStackTrace();
-      }
-      return newObj;
-   }
-
-   private void setBasetype( DatatypeValidator base) {
-      fBaseValidator = base;
-   }
-}
diff --git a/src/org/apache/xerces/impl/dv/util/Base64.java b/src/org/apache/xerces/impl/dv/util/Base64.java
deleted file mode 100644
index 49fe7fc..0000000
--- a/src/org/apache/xerces/impl/dv/util/Base64.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.util;
-
-/**
- * This class provides encode/decode for RFC 2045 Base64 as
- * defined by RFC 2045, N. Freed and N. Borenstein.
- * RFC 2045: Multipurpose Internet Mail Extensions (MIME)
- * Part One: Format of Internet Message Bodies. Reference
- * 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt
- * This class is used by XML Schema binary format validation
- *
- * This implementation does not encode/decode streaming
- * data. You need the data that you will encode/decode
- * already on a byte arrray.
- *
- * @author Jeffrey Rodriguez
- * @author Sandy Gao
- * @version $Id$
- */
-public final class  Base64 {
-
-    static private final int  BASELENGTH         = 255;
-    static private final int  LOOKUPLENGTH       = 64;
-    static private final int  TWENTYFOURBITGROUP = 24;
-    static private final int  EIGHTBIT           = 8;
-    static private final int  SIXTEENBIT         = 16;
-    static private final int  SIXBIT             = 6;
-    static private final int  FOURBYTE           = 4;
-    static private final int  SIGN               = -128;
-    static private final byte PAD                = ( byte ) '=';
-    static private final boolean fDebug          = false;
-    static private byte [] base64Alphabet        = new byte[BASELENGTH];
-    static private byte [] lookUpBase64Alphabet  = new byte[LOOKUPLENGTH];
-
-    static {
-
-        for (int i = 0; i<BASELENGTH; i++) {
-            base64Alphabet[i] = -1;
-        }
-        for (int i = 'Z'; i >= 'A'; i--) {
-            base64Alphabet[i] = (byte) (i-'A');
-        }
-        for (int i = 'z'; i>= 'a'; i--) {
-            base64Alphabet[i] = (byte) ( i-'a' + 26);
-        }
-
-        for (int i = '9'; i >= '0'; i--) {
-            base64Alphabet[i] = (byte) (i-'0' + 52);
-        }
-
-        base64Alphabet['+']  = 62;
-        base64Alphabet['/']  = 63;
-
-        for (int i = 0; i<=25; i++)
-            lookUpBase64Alphabet[i] = (byte) ('A'+i );
-
-        for (int i = 26,  j = 0; i<=51; i++, j++)
-            lookUpBase64Alphabet[i] = (byte) ('a'+ j );
-
-        for (int i = 52,  j = 0; i<=61; i++, j++)
-            lookUpBase64Alphabet[i] = (byte) ('0' + j );
-        lookUpBase64Alphabet[62] = (byte) '+';
-        lookUpBase64Alphabet[63] = (byte) '/';
-
-    }
-
-    protected static boolean isWhiteSpace(byte octect) {
-        return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9);
-    }
-
-    protected static boolean isPad(byte octect) {
-        return (octect == PAD);
-    }
-
-    protected static boolean isData(byte octect) {
-        return (base64Alphabet[octect] != -1);
-    }
-
-    protected static boolean isBase64(byte octect) {
-        return (isWhiteSpace(octect) || isPad(octect) || isData(octect));
-    }
-
-    /**
-     * Encodes hex octects into Base64
-     *
-     * @param binaryData Array containing binaryData
-     * @return Encoded Base64 array
-     */
-    public static byte[] encode(byte[] binaryData) {
-
-        if (binaryData == null)
-            return null;
-
-        int      lengthDataBits    = binaryData.length*EIGHTBIT;
-        int      fewerThan24bits   = lengthDataBits%TWENTYFOURBITGROUP;
-        int      numberTriplets    = lengthDataBits/TWENTYFOURBITGROUP;
-        byte     encodedData[]     = null;
-
-        if (fewerThan24bits != 0) //data not divisible by 24 bit
-            encodedData = new byte[ (numberTriplets + 1 )*4  ];
-        else // 16 or 8 bit
-            encodedData = new byte[ numberTriplets*4 ];
-
-        byte k=0, l=0, b1=0,b2=0,b3=0;
-
-        int encodedIndex = 0;
-        int dataIndex   = 0;
-        int i           = 0;
-        if (fDebug) {
-            System.out.println("number of triplets = " + numberTriplets );
-        }
-        for (i = 0; i<numberTriplets; i++) {
-
-            dataIndex = i*3;
-            b1 = binaryData[dataIndex];
-            b2 = binaryData[dataIndex + 1];
-            b3 = binaryData[dataIndex + 2];
-
-            if (fDebug) {
-                System.out.println( "b1= " + b1 +", b2= " + b2 + ", b3= " + b3 );
-            }
-
-            l  = (byte)(b2 & 0x0f);
-            k  = (byte)(b1 & 0x03);
-
-            encodedIndex = i*4;
-            byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
-
-            byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
-            byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);
-
-            encodedData[encodedIndex]   = lookUpBase64Alphabet[ val1 ];
-            if (fDebug) {
-                System.out.println( "val2 = " + val2 );
-                System.out.println( "k4   = " + (k<<4));
-                System.out.println( "vak  = " + (val2 | (k<<4)));
-            }
-
-            encodedData[encodedIndex+1] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
-            encodedData[encodedIndex+2] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];
-            encodedData[encodedIndex+3] = lookUpBase64Alphabet[ b3 & 0x3f ];
-        }
-
-        // form integral number of 6-bit groups
-        dataIndex    = i*3;
-        encodedIndex = i*4;
-        if (fewerThan24bits == EIGHTBIT) {
-            b1 = binaryData[dataIndex];
-            k = (byte) ( b1 &0x03 );
-            if (fDebug) {
-                System.out.println("b1=" + b1);
-                System.out.println("b1<<2 = " + (b1>>2) );
-            }
-            byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
-            encodedData[encodedIndex]     = lookUpBase64Alphabet[ val1 ];
-            encodedData[encodedIndex + 1] = lookUpBase64Alphabet[ k<<4 ];
-            encodedData[encodedIndex + 2] = PAD;
-            encodedData[encodedIndex + 3] = PAD;
-        } else if (fewerThan24bits == SIXTEENBIT) {
-
-            b1 = binaryData[dataIndex];
-            b2 = binaryData[dataIndex +1 ];
-            l = ( byte ) ( b2 &0x0f );
-            k = ( byte ) ( b1 &0x03 );
-
-            byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
-            byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
-
-            encodedData[encodedIndex]     = lookUpBase64Alphabet[ val1 ];
-            encodedData[encodedIndex + 1] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
-            encodedData[encodedIndex + 2] = lookUpBase64Alphabet[ l<<2 ];
-            encodedData[encodedIndex + 3] = PAD;
-        }
-
-        return encodedData;
-    }
-
-    /**
-     * Decodes Base64 data into octects
-     *
-     * @param binaryData Byte array containing Base64 data
-     * @return Array containind decoded data.
-     */
-    public static byte[] decode(byte[] base64Data) {
-
-        if (base64Data == null)
-            return null;
-
-        if (base64Data.length%FOURBYTE != 0) {
-            return null;//should be divisible by four
-        }
-
-        int      numberQuadruple    = (base64Data.length/FOURBYTE );
-
-        if (numberQuadruple == 0)
-            return new byte[0];
-
-        byte     decodedData[]      = null;
-        byte     b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0;
-        byte     d1=0,d2=0,d3=0,d4=0;
-
-        // Throw away anything not in normalizedBase64Data
-        // Adjust size
-        int i = 0;
-        int encodedIndex = 0;
-        int dataIndex    = 0;
-        decodedData      = new byte[ (numberQuadruple)*3];
-
-        for (; i<numberQuadruple-1; i++) {
-
-            if (!isData( (d1 = base64Data[dataIndex++]) )||
-                !isData( (d2 = base64Data[dataIndex++]) )||
-                !isData( (d3 = base64Data[dataIndex++]) )||
-                !isData( (d4 = base64Data[dataIndex++]) ))
-                return null;//if found "no data" just return null
-
-            b1 = base64Alphabet[d1];
-            b2 = base64Alphabet[d2];
-            b3 = base64Alphabet[d3];
-            b4 = base64Alphabet[d4];
-
-            decodedData[encodedIndex++] = (byte)(  b1 <<2 | b2>>4 ) ;
-            decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
-            decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );
-        }
-
-        if (!isData( (d1 = base64Data[dataIndex++]) ) ||
-            !isData( (d2 = base64Data[dataIndex++]) )) {
-            return null;//if found "no data" just return null
-        }
-
-        b1 = base64Alphabet[d1];
-        b2 = base64Alphabet[d2];
-
-        d3 = base64Data[dataIndex++];
-        d4 = base64Data[dataIndex++];
-        if (!isData( (d3 ) ) ||
-            !isData( (d4 ) )) {//Check if they are PAD characters
-            if (isPad( d3 ) && isPad( d4)) {               //Two PAD e.g. 3c[Pad][Pad]
-                if ((b2 & 0xf) != 0)//last 4 bits should be zero
-                    return null;
-                byte[] tmp = new byte[ i*3 + 1 ];
-                System.arraycopy( decodedData, 0, tmp, 0, i*3 );
-                tmp[encodedIndex]   = (byte)(  b1 <<2 | b2>>4 ) ;
-                return tmp;
-            } else if (!isPad( d3) && isPad(d4)) {               //One PAD  e.g. 3cQ[Pad]
-                b3 = base64Alphabet[ d3 ];
-                if ((b3 & 0x3 ) != 0)//last 2 bits should be zero
-                    return null;
-                byte[] tmp = new byte[ i*3 + 2 ];
-                System.arraycopy( decodedData, 0, tmp, 0, i*3 );
-                tmp[encodedIndex++] = (byte)(  b1 <<2 | b2>>4 );
-                tmp[encodedIndex]   = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
-                return tmp;
-            } else {
-                return null;//an error  like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data
-            }
-        } else { //No PAD e.g 3cQl
-            b3 = base64Alphabet[ d3 ];
-            b4 = base64Alphabet[ d4 ];
-            decodedData[encodedIndex++] = (byte)(  b1 <<2 | b2>>4 ) ;
-            decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
-            decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );
-
-        }
-
-        return decodedData;
-    }
-
-    /**
-     * Decodes Base64 data into octects
-     *
-     * @param base64Data String containing Base64 data
-     * @return string containing decoded data.
-     */
-    public static String decode(String base64Data) {
-        if (base64Data == null)
-            return null;
-
-        byte[] decoded = decode(base64Data.getBytes());
-
-        return decoded == null ? null : new String(decoded);
-    }
-}
diff --git a/src/org/apache/xerces/impl/dv/util/HexBin.java b/src/org/apache/xerces/impl/dv/util/HexBin.java
deleted file mode 100644
index a0710f4..0000000
--- a/src/org/apache/xerces/impl/dv/util/HexBin.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.util;
-
-/**
- * format validation
- *
- * This class encodes/decodes hexadecimal data
- * @author Jeffrey Rodriguez
- * @version $Id$
- */
-public final class  HexBin {
-    static private final int  BASELENGTH   = 255;
-    static private final int  LOOKUPLENGTH = 16;
-    static private byte [] hexNumberTable    = new byte[BASELENGTH];
-    static private byte [] lookUpHexAlphabet = new byte[LOOKUPLENGTH];
-
-
-    static {
-        for (int i = 0; i<BASELENGTH; i++ ) {
-            hexNumberTable[i] = -1;
-        }
-        for ( int i = '9'; i >= '0'; i--) {
-            hexNumberTable[i] = (byte) (i-'0');
-        }
-        for ( int i = 'F'; i>= 'A'; i--) {
-            hexNumberTable[i] = (byte) ( i-'A' + 10 );
-        }
-        for ( int i = 'f'; i>= 'a'; i--) {
-           hexNumberTable[i] = (byte) ( i-'a' + 10 );
-        }
-
-        for(int i = 0; i<10; i++ )
-            lookUpHexAlphabet[i] = (byte) ('0'+i );
-        for(int i = 10; i<=15; i++ )
-            lookUpHexAlphabet[i] = (byte) ('A'+i -10);
-    }
-
-    /**
-     * byte to be tested if it is Base64 alphabet
-     *
-     * @param octect
-     * @return
-     */
-    static boolean isHex(byte octect) {
-        return (hexNumberTable[octect] != -1);
-    }
-
-    /**
-     * array of byte to encode
-     *
-     * @param binaryData
-     * @return return encode binary array
-     */
-    static public byte[] encode(byte[] binaryData) {
-        if (binaryData == null)
-            return null;
-        int lengthData   = binaryData.length;
-        int lengthEncode = lengthData * 2;
-        byte[] encodedData = new byte[lengthEncode];
-        for( int i = 0; i<lengthData; i++ ){
-            encodedData[i*2] = lookUpHexAlphabet[ binaryData[i] >> 4];
-            encodedData[i*2+1] = lookUpHexAlphabet[ binaryData[i] & 0xf];
-        }
-        return encodedData;
-    }
-
-    static public byte[] decode(byte[] binaryData) {
-        if (binaryData == null)
-            return null;
-        int lengthData   = binaryData.length;
-        if (lengthData % 2 != 0)
-            return null;
-
-        int lengthDecode = lengthData / 2;
-        byte[] decodedData = new byte[lengthDecode];
-        for( int i = 0; i<lengthDecode; i++ ){
-            if (!isHex(binaryData[i*2]) || !isHex(binaryData[i*2+1])) {
-                return null;
-            }
-            decodedData[i] = (byte)((hexNumberTable[binaryData[i*2]] << 4) | hexNumberTable[binaryData[i*2+1]]);
-        }
-        return decodedData;
-    }
-
-    /**
-     * Decodes Hex data into octects
-     *
-     * @param binaryData String containing Hex data
-     * @return string containing decoded data.
-     */
-    public static String decode(String binaryData) {
-        if (binaryData == null)
-            return null;
-
-        byte[] decoded = decode(binaryData.getBytes());
-
-        return decoded == null ? null : new String(decoded);
-    }
-}
diff --git a/src/org/apache/xerces/impl/dv/xs_new/AbstractDateTimeDV.java b/src/org/apache/xerces/impl/dv/xs_new/AbstractDateTimeDV.java
deleted file mode 100644
index 3a0d00e..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/AbstractDateTimeDV.java
+++ /dev/null
@@ -1,811 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-
-/**
- * This is the base class of all date/time datatype validators.
- * It implements common code for parsing, validating and comparing datatypes.
- * Classes that extend this class, must implement parse() method.
- *
- * REVISIT: There are many instance variables, which would cause problems
- *          when we support grammar caching. A grammar is possibly used by
- *          two parser instances at the same time, then the same simple type
- *          decl object can be used to validate two strings at the same time.
- *          -SG
- *
- * @author Elena Litani
- * @author Len Berman
- * @author Gopal Sharma, SUN Microsystems Inc.
- *
- * @version $Id$
- */
-public abstract class AbstractDateTimeDV extends TypeValidator {
-
-    //debugging
-    private static final boolean DEBUG=false;
-
-    //define shared variables for date/time
-
-    //define constants
-    protected final static int CY = 0,  M = 1, D = 2, h = 3,
-    m = 4, s = 5, ms = 6, utc=7, hh=0, mm=1;
-
-    //size for all objects must have the same fields:
-    //CCYY, MM, DD, h, m, s, ms + timeZone
-    protected final static int TOTAL_SIZE = 8;
-
-    //date obj size for gMonth datatype (without time zone): --09--
-    protected final static int MONTH_SIZE = 6;
-
-    //date obj must have at least 6 chars after year (without time zone): "-MM-DD"
-    private final static int YEARMONTH_SIZE = 7;
-
-    //define constants to be used in assigning default values for
-    //all date/time excluding duration
-    protected final static int YEAR=2001;
-    protected final static int MONTH=01;
-    protected final static int DAY = 15;
-
-    //obj to store timeZone for date/time object excluding duration
-    protected int[] timeZone;
-
-    //size of enumeration if any
-    protected int  fEnumSize;
-
-    //size of string buffer
-    protected int fEnd;
-    protected int fStart;
-
-    //storage for string value of date/time object
-    protected StringBuffer fBuffer;
-
-    //obj to store all date/time objects with fields:
-    // {CY, M, D, h, m, s, ms, utc}
-    protected int[] fDateValue;
-    private int[] fTempDate;
-
-    //error message buffer
-    protected StringBuffer message;
-
-    public AbstractDateTimeDV(){
-        initializeValues();
-    }
-
-    protected void initializeValues(){
-        fDateValue = new int[TOTAL_SIZE];
-        fTempDate = new int[TOTAL_SIZE];
-        fEnd = 30;
-        fStart = 0;
-        message = new StringBuffer(TOTAL_SIZE);
-        fBuffer = new StringBuffer(fEnd);
-        timeZone = new int[2];
-    }
-
-    public short getAllowedFacets(){
-        return ( XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION |XSSimpleTypeDecl.FACET_MAXINCLUSIVE |XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE  | XSSimpleTypeDecl.FACET_MINEXCLUSIVE  );
-    }//getAllowedFacets()
-
-
-    // the parameters are in compiled form (from getActualValue)
-    public boolean isEqual(Object value1, Object value2){
-        if (!(value1 instanceof int[]) || !(value2 instanceof int[]))
-            return false;
-        return compareDates((int[])value1,(int[])value2, true)==0;
-    }//IsEqual()
-
-    // the parameters are in compiled form (from getActualValue)
-    public int compare (Object value1, Object value2) {
-        return compareDates((int[])value1, (int[])value2, true);
-    }//compare()
-
-    /**
-     * Implemented by each subtype, calling appropriate function to parse
-     * given date/time
-     *
-     * @param content String value of the date/time
-     * @param date    Storage to represent date/time object.
-     *                If null - new object will be created, otherwise
-     *                date will be reset and reused
-     * @return updated date/time object
-     * @exception Exception
-     */
-     abstract protected int[] parse (String content, int[] date) throws SchemaDateTimeException;
-
-     /**
-     * Compare algorithm described in dateDime (3.2.7).
-     * Duration datatype overwrites this method
-     *
-     * @param date1  normalized date representation of the first value
-     * @param date2  normalized date representation of the second value
-     * @param strict
-     * @return less, greater, less_equal, greater_equal, equal
-     */
-    protected short compareDates(int[] date1, int[] date2, boolean strict) {
-        if ( date1[utc]==date2[utc] ) {
-            return compareOrder(date1, date2);
-        }
-        short c1, c2;
-
-        if ( date1[utc]=='Z' ) {
-
-            //compare date1<=date1<=(date2 with time zone -14)
-            //
-            cloneDate(date2); //clones date1 value to global temporary storage: fTempDate
-            timeZone[hh]=14;
-            timeZone[mm]=0;
-            fTempDate[utc]='+';
-            normalize(fTempDate);
-            c1 = compareOrder(date1, fTempDate);
-
-            //compare date1>=(date2 with time zone +14)
-            //
-            cloneDate(date2); //clones date1 value to global temporary storage: fTempDate
-            timeZone[hh]=14;
-            timeZone[mm]=0;
-            fTempDate[utc]='-';
-            normalize(fTempDate);
-            c2 = compareOrder(date1, fTempDate);
-
-            if ( (c1 < 0 && c2 > 0) ||
-                 (c1 == 0 && c2 == 0) ) {
-                return INDETERMINATE;
-            }
-            //REVISIT: wait for clarification on this case from schema
-            return(c1!=INDETERMINATE)?c1:c2;
-        }
-        else if ( date2[utc]=='Z' ) {
-
-            //compare (date1 with time zone -14)<=date2
-            //
-            cloneDate(date1); //clones date1 value to global temporary storage: fTempDate
-            timeZone[hh]=14;
-            timeZone[mm]=0;
-
-            fTempDate[utc]='-';
-            if (DEBUG) {
-               System.out.println("fTempDate=" + dateToString(fTempDate));
-            }
-            normalize(fTempDate);
-            c1 = compareOrder(fTempDate, date2);
-            if (DEBUG) {
-                System.out.println("date=" + dateToString(date2));
-                System.out.println("fTempDate=" + dateToString(fTempDate));
-            }
-            //compare (date1 with time zone +14)<=date2
-            //
-            cloneDate(date1); //clones date1 value to global temporary storage: fTempDate
-            timeZone[hh]=14;
-            timeZone[mm]=0;
-            fTempDate[utc]='+';
-            normalize(fTempDate);
-            c2 = compareOrder(fTempDate, date2);
-            if (DEBUG) {
-               System.out.println("fTempDate=" + dateToString(fTempDate));
-            }
-            if ( (c1 < 0 && c2 > 0) ||
-                 (c1 == 0 && c2 == 0) ) {
-                return INDETERMINATE;
-            }
-            //REVISIT: wait for clarification on this case from schema
-            return(c1!=INDETERMINATE)?c1:c2;
-        }
-        return INDETERMINATE;
-
-    }
-
-    /**
-     * Given normalized values, determines order-relation
-     * between give date/time objects.
-     *
-     * @param date1  date/time object
-     * @param date2  date/time object
-     * @return
-     */
-    protected short compareOrder (int[] date1, int[] date2) {
-
-        for ( int i=0;i<TOTAL_SIZE;i++ ) {
-            if ( date1[i]<date2[i] ) {
-                return -1;
-            }
-            else if ( date1[i]>date2[i] ) {
-                return 1;
-            }
-        }
-        return 0;
-    }
-
-    /**
-     * Parses time hh:mm:ss.sss and time zone if any
-     *
-     * @param start
-     * @param end
-     * @param data
-     * @return
-     * @exception Exception
-     */
-    protected  void getTime (int start, int end, int[] data) throws RuntimeException{
-
-        int stop = start+2;
-
-        //get hours (hh)
-        data[h]=parseInt(start,stop);
-
-        //get minutes (mm)
-
-        if (fBuffer.charAt(stop++)!=':') {
-                throw new RuntimeException("Error in parsing time zone" );
-        }
-        start = stop;
-        stop = stop+2;
-        data[m]=parseInt(start,stop);
-
-        //get seconds (ss)
-        if (fBuffer.charAt(stop++)!=':') {
-                throw new RuntimeException("Error in parsing time zone" );
-        }
-        start = stop;
-        stop = stop+2;
-        data[s]=parseInt(start,stop);
-
-        //get miliseconds (ms)
-        int milisec = indexOf(start, end, '.');
-
-        //find UTC sign if any
-        int sign = findUTCSign((milisec!=-1)?milisec:start, end);
-
-        //parse miliseconds
-        if ( milisec != -1 ) {
-
-            if ( sign<0 ) {
-
-                //get all digits after "."
-                data[ms]=parseInt(milisec+1,fEnd);
-            }
-            else {
-
-                //get ms before UTC sign
-                data[ms]=parseInt(milisec+1,sign);
-            }
-
-        }
-
-        //parse UTC time zone (hh:mm)
-        if ( sign>0 ) {
-            getTimeZone(data,sign);
-        }
-    }
-
-    /**
-     * Parses date CCYY-MM-DD
-     *
-     * @param start
-     * @param end
-     * @param data
-     * @return
-     * @exception Exception
-     */
-    protected void getDate (int start, int end, int[] date) throws RuntimeException{
-
-        getYearMonth(start, end, date);
-
-        if (fBuffer.charAt(fStart++) !='-') {
-            throw new RuntimeException("CCYY-MM must be followed by '-' sign");
-        }
-        int stop = fStart + 2;
-        date[D]=parseInt(fStart, stop);
-        fStart = stop;  //fStart points right after the Day
-    }
-
-    /**
-     * Parses date CCYY-MM
-     *
-     * @param start
-     * @param end
-     * @param data
-     * @return
-     * @exception Exception
-     */
-    protected void getYearMonth (int start, int end, int[] date) throws RuntimeException{
-
-        if ( fBuffer.charAt(0)=='-' ) {
-            // REVISIT: date starts with preceding '-' sign
-            //          do we have to do anything with it?
-            //
-            start++;
-        }
-        int i = indexOf(start, end, '-');
-        if ( i==-1 ) throw new RuntimeException("Year separator is missing or misplaced");
-        int length = i-start;
-        if (length<4) {
-            throw new RuntimeException("Year must have 'CCYY' format");
-        }
-        else if (length > 4 && fBuffer.charAt(start)=='0'){
-            throw new RuntimeException("Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden");
-        }
-        date[CY]= parseIntYear(i);
-        if (fBuffer.charAt(i)!='-') {
-            throw new RuntimeException("CCYY must be followed by '-' sign");
-        }
-        start = ++i;
-        i = start +2;
-        date[M]=parseInt(start, i);
-        fStart = i; //fStart points right after the MONTH
-    }
-
-    /**
-     * Shared code from Date and YearMonth datatypes.
-     * Finds if time zone sign is present
-     *
-     * @param end
-     * @param date
-     * @return
-     * @exception Exception
-     */
-    protected void parseTimeZone (int end, int[] date) throws RuntimeException{
-
-        //fStart points right after the date
-
-        if ( fStart<fEnd ) {
-            int sign = findUTCSign(fStart, fEnd);
-            if ( sign<0 ) {
-                throw new RuntimeException ("Error in month parsing");
-            }
-            else {
-                getTimeZone(date, sign);
-            }
-        }
-    }
-
-    /**
-     * Parses time zone: 'Z' or {+,-} followed by  hh:mm
-     *
-     * @param data
-     * @param sign
-     * @return
-     */
-    protected void getTimeZone (int[] data, int sign) throws RuntimeException{
-        data[utc]=fBuffer.charAt(sign);
-
-        if ( fBuffer.charAt(sign) == 'Z' ) {
-            if (fEnd>(++sign)) {
-                throw new RuntimeException("Error in parsing time zone");
-            }
-            return;
-        }
-        if ( sign<=(fEnd-6) ) {
-
-            //parse [hh]
-            int stop = ++sign+2;
-            timeZone[hh]=parseInt(sign, stop);
-            if (fBuffer.charAt(stop++)!=':') {
-                throw new RuntimeException("Error in parsing time zone" );
-            }
-
-            //parse [ss]
-            timeZone[mm]=parseInt(stop, stop+2);
-
-            if ( stop+2!=fEnd ) {
-                throw new RuntimeException("Error in parsing time zone");
-            }
-
-        }
-        else {
-            throw new RuntimeException("Error in parsing time zone");
-        }
-        if ( DEBUG ) {
-            System.out.println("time[hh]="+timeZone[hh] + " time[mm]=" +timeZone[mm]);
-        }
-    }
-
-    /**
-     * Computes index of given char within StringBuffer
-     *
-     * @param start
-     * @param end
-     * @param ch     character to look for in StringBuffer
-     * @return index of ch within StringBuffer
-     */
-    protected  int indexOf (int start, int end, char ch) {
-        for ( int i=start;i<end;i++ ) {
-            if ( fBuffer.charAt(i) == ch ) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Validates given date/time object accoring to W3C PR Schema
-     * [D.1 ISO 8601 Conventions]
-     *
-     * @param data
-     * @return
-     */
-    protected void validateDateTime (int[]  data) {
-
-        //REVISIT: should we throw an exception for not valid dates
-        //          or reporting an error message should be sufficient?
-        if ( data[CY]==0 ) {
-            throw new RuntimeException("The year \"0000\" is an illegal year value");
-
-        }
-
-        if ( data[M]<1 || data[M]>12 ) {
-            throw new RuntimeException("The month must have values 1 to 12");
-
-        }
-
-        //validate days
-        if ( data[D]>maxDayInMonthFor(data[CY], data[M]) || data[D]<1 ) {
-            throw new RuntimeException("The day must have values 1 to 31");
-        }
-
-        //validate hours
-        if ( data[h]>23 || data[h]<0 ) {
-            throw new RuntimeException("Hour must have values 0-23");
-        }
-
-        //validate
-        if ( data[m]>59 || data[m]<0 ) {
-            throw new RuntimeException("Minute must have values 0-59");
-        }
-
-        //validate
-        if ( data[s]>60 || data[s]<0 ) {
-            throw new RuntimeException("Second must have values 0-60");
-
-        }
-
-        //validate
-        if ( timeZone[hh]>14 || timeZone[hh]<-14 ) {
-            throw new RuntimeException("Time zone should have range -14..+14");
-        }
-
-        //validate
-        if ( timeZone[mm]>59 || timeZone[mm]<-59 ) {
-            throw new RuntimeException("Minute must have values 0-59");
-        }
-    }
-
-    /**
-     * Return index of UTC char: 'Z', '+', '-'
-     *
-     * @param start
-     * @param end
-     * @return
-     */
-    protected int findUTCSign (int start, int end) {
-        int c;
-        for ( int i=start;i<end;i++ ) {
-            c=fBuffer.charAt(i);
-            if ( c == 'Z' || c=='+' || c=='-' ) {
-                return i;
-            }
-
-        }
-        return -1;
-    }
-
-    /**
-     * Given start and end position, parses string value
-     *
-     * @param value  string to parse
-     * @param start  Start position
-     * @param end    end position
-     * @return  return integer representation of characters
-     */
-    protected  int parseInt (int start, int end)
-    throws NumberFormatException{
-        //REVISIT: more testing on this parsing needs to be done.
-        int radix=10;
-        int result = 0;
-        int digit=0;
-        int limit = -Integer.MAX_VALUE;
-        int multmin = limit / radix;
-        int i = start;
-        do {
-            digit = Character.digit(fBuffer.charAt(i),radix);
-            if ( digit < 0 ) throw new NumberFormatException("'"+fBuffer.toString()+"' has wrong format");
-            if ( result < multmin ) throw new NumberFormatException("'"+fBuffer.toString()+"' has wrong format");
-            result *= radix;
-            if ( result < limit + digit ) throw new NumberFormatException("'"+fBuffer.toString()+"' has wrong format");
-            result -= digit;
-
-        }while ( ++i < end );
-        return -result;
-    }
-
-    // parse Year differently to support negative value.
-    protected int parseIntYear (int end){
-        int radix=10;
-        int result = 0;
-        boolean negative = false;
-        int i=0;
-        int limit;
-        int multmin;
-        int digit=0;
-
-        if (fBuffer.charAt(0) == '-'){
-            negative = true;
-            limit = Integer.MIN_VALUE;
-            i++;
-
-        }
-        else{
-            limit = -Integer.MAX_VALUE;
-        }
-        multmin = limit / radix;
-        while (i < end)
-        {
-            digit = Character.digit(fBuffer.charAt(i++),radix);
-            if (digit < 0) throw new NumberFormatException("'"+fBuffer.toString()+"' has wrong format");
-            if (result < multmin) throw new NumberFormatException("'"+fBuffer.toString()+"' has wrong format");
-            result *= radix;
-            if (result < limit + digit) throw new NumberFormatException("'"+fBuffer.toString()+"' has wrong format");
-            result -= digit;
-        }
-
-        if (negative)
-        {
-            if (i > 1) return result;
-            else throw new NumberFormatException("'"+fBuffer.toString()+"' has wrong format");
-        }
-        return -result;
-
-    }
-
-    /**
-     * If timezone present - normalize dateTime  [E Adding durations to dateTimes]
-     *
-     * @param date   CCYY-MM-DDThh:mm:ss+03
-     * @return CCYY-MM-DDThh:mm:ssZ
-     */
-    protected  void normalize (int[] date) {
-
-        // REVISIT: we have common code in addDuration() for durations
-        //          should consider reorganizing it.
-        //
-
-        //add minutes (from time zone)
-        int negate = 1;
-        if (date[utc]=='+') {
-            negate = -1;
-        }
-        if ( DEBUG ) {
-            System.out.println("==>date[m]"+date[m]);
-            System.out.println("==>timeZone[mm]" +timeZone[mm]);
-        }
-        int temp = date[m] + negate*timeZone[mm];
-        int carry = fQuotient (temp, 60);
-        date[m]= mod(temp, 60, carry);
-
-        if ( DEBUG ) {
-            System.out.println("==>carry: " + carry);
-        }
-        //add hours
-        temp = date[h] + negate*timeZone[hh] + carry;
-        carry = fQuotient(temp, 24);
-        date[h]=mod(temp, 24, carry);
-        if ( DEBUG ) {
-            System.out.println("==>date[h]"+date[h]);
-            System.out.println("==>carry: " + carry);
-        }
-
-        date[D]=date[D]+carry;
-
-        while ( true ) {
-            temp=maxDayInMonthFor(date[CY], date[M]);
-            if (date[D]<1) {
-                date[D] = date[D] + maxDayInMonthFor(date[CY], date[M]-1);
-                carry=-1;
-            }
-            else if ( date[D]>temp ) {
-                date[D]=date[D]-temp;
-                carry=1;
-            }
-            else {
-                break;
-            }
-            temp=date[M]+carry;
-            date[M]=modulo(temp, 1, 13);
-            date[CY]=date[CY]+fQuotient(temp, 1, 13);
-        }
-        date[utc]='Z';
-    }
-
-
-    /**
-     * Resets fBuffer to store string representation of
-     * date/time
-     *
-     * @param str    Lexical representation of date/time
-     */
-    protected void resetBuffer (String str) {
-        fBuffer.setLength(0);
-        fStart=fEnd=0;
-        timeZone[hh]=timeZone[mm]=0;
-        fBuffer.append(str);
-        fEnd = fBuffer.length();
-
-    }
-
-    /**
-     * Resets object representation of date/time
-     *
-     * @param data   date/time object
-     */
-    protected void resetDateObj (int[] data) {
-        for ( int i=0;i<TOTAL_SIZE;i++ ) {
-            data[i]=0;
-        }
-    }
-
-    /**
-     * Given {year,month} computes maximum
-     * number of days for given month
-     *
-     * @param year
-     * @param month
-     * @return
-     */
-    protected int maxDayInMonthFor(int year, int month) {
-        //validate days
-        if ( month==4 || month==6 || month==9 || month==11 ) {
-            return 30;
-        }
-        else if ( month==2 ) {
-            if ( isLeapYear(year) ) {
-                return 29;
-            }
-            else {
-                return 28;
-            }
-        }
-        else {
-            return 31;
-        }
-    }
-
-    private boolean isLeapYear(int year) {
-
-        //REVISIT: should we take care about Julian calendar?
-        return((year%4 == 0) && ((year%100 != 0) || (year%400 == 0)));
-    }
-
-    //
-    // help function described in W3C PR Schema [E Adding durations to dateTimes]
-    //
-    protected int mod (int a, int b, int quotient) {
-        //modulo(a, b) = a - fQuotient(a,b)*b
-        return (a - quotient*b) ;
-    }
-
-    //
-    // help function described in W3C PR Schema [E Adding durations to dateTimes]
-    //
-    protected int fQuotient (int a, int b) {
-
-        //fQuotient(a, b) = the greatest integer less than or equal to a/b
-        return (int)Math.floor((float)a/b);
-    }
-
-    //
-    // help function described in W3C PR Schema [E Adding durations to dateTimes]
-    //
-    protected int modulo (int temp, int low, int high) {
-        //modulo(a - low, high - low) + low
-        int a = temp - low;
-        int b = high - low;
-        return (mod (a, b, fQuotient(a, b)) + low) ;
-    }
-
-    //
-    // help function described in W3C PR Schema [E Adding durations to dateTimes]
-    //
-    protected int fQuotient (int temp, int low, int high) {
-        //fQuotient(a - low, high - low)
-
-        return fQuotient(temp - low, high - low);
-    }
-
-
-    protected String dateToString(int[] date) {
-        message.setLength(0);
-        message.append(date[CY]);
-        message.append('-');
-        message.append(date[M]);
-        message.append('-');
-        message.append(date[D]);
-        message.append('T');
-        message.append(date[h]);
-        message.append(':');
-        message.append(date[m]);
-        message.append(':');
-        message.append(date[s]);
-        message.append('.');
-        message.append(date[ms]);
-        message.append((char)date[utc]);
-        return message.toString();
-    }
-
-
-    /**
-     * Use this function to report errors in constructor
-     *
-     * @param msg
-     * @param value
-     */
-    protected void reportError(String msg, String value) {
-        System.err.println("[Error]: " +msg+": Value  '"+value+"' is not legal for current datatype");
-    }
-
-
-    //
-    //Private help functions
-    //
-
-    private void cloneDate (int[] finalValue) {
-        resetDateObj(fTempDate);
-        for ( int i=0;i<TOTAL_SIZE;i++ ) {
-            fTempDate[i]=finalValue[i];
-        }
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/dv/xs_new/AnySimpleDV.java b/src/org/apache/xerces/impl/dv/xs_new/AnySimpleDV.java
deleted file mode 100644
index 43b0b44..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/AnySimpleDV.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "anySimpleType"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class AnySimpleDV extends TypeValidator {
-
-    public short getAllowedFacets() {
-        // anySimpleType doesn't allow any facet, not even whiteSpace
-        return 0;
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        return content;
-    }
-
-} // class AnySimpleDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/AnyURIDV.java b/src/org/apache/xerces/impl/dv/xs_new/AnyURIDV.java
deleted file mode 100644
index 6dc7dee..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/AnyURIDV.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.util.URI;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "anyURI"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class AnyURIDV extends TypeValidator {
-
-    private static URI BASE_URI = null;
-    static {
-        try {
-            BASE_URI = new URI("http://www.template.com");
-        } catch (URI.MalformedURIException ex) {
-        }
-    }
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    // before we return string we have to make sure it is correct URI as per spec.
-    // for some types (string and derived), they just return the string itself
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        // check 3.2.17.c0 must: URI (rfc 2396/2723)
-        try {
-            if( content.length() != 0 ) {
-                // Support for relative URLs
-                // According to Java 1.1: URLs may also be specified with a
-                // String and the URL object that it is related to.
-                new URI(BASE_URI, content );
-            }
-        } catch (URI.MalformedURIException ex) {
-            throw new InvalidDatatypeValueException("Value '"+content+"' is a Malformed URI");
-        }
-
-        // REVISIT: do we need to return the new URI object?
-        return content;
-    }
-
-    // REVISIT: do we need to compare based on URI, or based on String?
-    // public boolean isEqual(Object value1, Object value2);
-
-} // class AnyURIDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/Base64BinaryDV.java b/src/org/apache/xerces/impl/dv/xs_new/Base64BinaryDV.java
deleted file mode 100644
index 6416e8f..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/Base64BinaryDV.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.impl.dv.util.Base64;
-
-/**
- * Represent the schema type "base64Binary"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class Base64BinaryDV extends TypeValidator {
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        String decoded = Base64.decode(content);
-        if (decoded == null)
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not encoded in base64");
-
-        return decoded;
-    }
-
-} // class Base64BinaryDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/BooleanDV.java b/src/org/apache/xerces/impl/dv/xs_new/BooleanDV.java
deleted file mode 100644
index 40e8ffd..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/BooleanDV.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "boolean"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class BooleanDV extends TypeValidator{
-
-    private static final String fValueSpace[] = {"false", "true", "0", "1"};
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE);
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        Boolean ret = null;
-
-        if (content.equals(fValueSpace[0]) || content.equals(fValueSpace[2]))
-            ret = Boolean.FALSE;
-        else if (content.equals(fValueSpace[1]) || content.equals(fValueSpace[3]))
-            ret = Boolean.TRUE;
-        else
-            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_BOOLEAN],
-            //                                        new Object[]{content});
-            throw new InvalidDatatypeValueException("'" + content + "' is not a valid boolean value");
-        return ret;
-    }
-
-} // class BooleanDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/DateDV.java b/src/org/apache/xerces/impl/dv/xs_new/DateDV.java
deleted file mode 100644
index 361eec9..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/DateDV.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <date> datatype (W3C Schema datatypes)
- *
- * @author Elena Litani
- * @Gopal Sharma, SUN Microsystems Inc.
- *
- * @version $Id$
- */
-public class DateDV extends DateTimeDV {
-
-    public Object getActualValue(String content) throws InvalidDatatypeValueException {
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid date");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of dateTime object
-     *
-     * @param str    The lexical representation of dateTime object CCYY-MM-DD
-     *               with possible time zone Z or (-),(+)hh:mm
-     * @param date   uninitialized date object
-     * @return normalized dateTime representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException{
-        resetBuffer(str);
-        //create structure to hold an object
-
-        if ( date == null ) {
-            date = new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-        // get date
-
-        getDate(fStart, fEnd, date);
-        parseTimeZone (fEnd, date);
-
-        //validate and normalize
-        //REVISIT: do we need SchemaDateTimeException?
-        validateDateTime(date);
-
-        if ( date[utc]!=0 && date[utc]!='Z' ) {
-            normalize(date);
-        }
-        return date;
-    }
-
-}
-
-
diff --git a/src/org/apache/xerces/impl/dv/xs_new/DateTimeDV.java b/src/org/apache/xerces/impl/dv/xs_new/DateTimeDV.java
deleted file mode 100644
index b62186e..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/DateTimeDV.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <dateTime> datatype (W3C Schema Datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- *
- * @version $Id$
- */
-public class DateTimeDV extends AbstractDateTimeDV {
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid dataTime");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of dateTime object
-     *
-     * @param str    The lexical representation of dateTime object CCYY-MM-DDThh:mm:ss.sss
-     *               with possible time zone Z or (-),(+)hh:mm
-     * @param date   uninitialized date object
-     * @return normalized dateTime representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException {
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date == null ) {
-            date = new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-        int end = indexOf (fStart, fEnd, 'T');
-
-        // both time and date
-        getDate(fStart, end, date);
-        getTime(end+1, fEnd, date);
-
-        //validate and normalize
-
-        //REVISIT: do we need SchemaDateTimeException?
-        validateDateTime(date);
-
-        if ( date[utc]!=0 && date[utc]!='Z') {
-            normalize(date);
-        }
-        return date;
-    }
-
-}
-
-
diff --git a/src/org/apache/xerces/impl/dv/xs_new/DayDV.java b/src/org/apache/xerces/impl/dv/xs_new/DayDV.java
deleted file mode 100644
index 1beb748..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/DayDV.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <gDay> datatype (W3C Schema datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- * @version $Id$
- */
-public class DayDV extends AbstractDateTimeDV {
-
-    //size without time zone: ---09
-    private final static int DAY_SIZE=5;
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid day");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of gDay object
-     *
-     * @param str    The lexical representation of gDay object ---DD
-     *               with possible time zone Z or (-),(+)hh:mm
-     *               Pattern: ---(\\d\\d)(Z|(([-+])(\\d\\d)(:(\\d\\d))?
-     * @param date   uninitialized date object
-     * @return normalized date representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException {
-
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date== null ) {
-            date=new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-        if (fBuffer.charAt(0)!='-' || fBuffer.charAt(1)!='-' || fBuffer.charAt(2)!='-') {
-            throw new SchemaDateTimeException ("Error in day parsing");
-        }
-
-        //initialize values
-        date[CY]=YEAR;
-        date[M]=MONTH;
-
-        date[D]=parseInt(fStart+3,fStart+5);
-
-
-        if ( DAY_SIZE<fEnd ) {
-            int sign = findUTCSign(DAY_SIZE, fEnd);
-            if ( sign<0 ) {
-                throw new SchemaDateTimeException ("Error in day parsing");
-            }
-            else {
-                getTimeZone(date, sign);
-            }
-        }
-
-       //validate and normalize
-        validateDateTime(date);
-
-        if ( date[utc]!=0 && date[utc]!='Z' ) {
-            normalize(date);
-        }
-        return date;
-    }
-
-    /**
-     * Converts gDay object representation to String
-     *
-     * @param date   gDay object
-     * @return lexical representation of gDay: ---DD with an optional time zone sign
-     */
-    protected String dateToString(int[] date) {
-        message.setLength(0);
-        message.append('-');
-        message.append('-');
-        message.append('-');
-        message.append(date[D]);
-        message.append((char)date[utc]);
-        return message.toString();
-    }
-
-}
-
diff --git a/src/org/apache/xerces/impl/dv/xs_new/DecimalDV.java b/src/org/apache/xerces/impl/dv/xs_new/DecimalDV.java
deleted file mode 100644
index 2aa1cae..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/DecimalDV.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-import java.math.BigDecimal;
-
-/**
- * Represent the schema type "decimal"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class DecimalDV extends TypeValidator {
-
-    public short getAllowedFacets(){
-        return ( XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION |XSSimpleTypeDecl.FACET_MAXINCLUSIVE |XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE  | XSSimpleTypeDecl.FACET_MINEXCLUSIVE | XSSimpleTypeDecl.FACET_TOTALDIGITS | XSSimpleTypeDecl.FACET_FRACTIONDIGITS);
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        try {
-            return new BigDecimal( stripPlusIfPresent( content));
-        } catch (Exception nfe) {
-            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_DECIMAL],
-            //                                        new Object[]{content});
-            throw new InvalidDatatypeValueException("'" + content + "' is not a valid decimal value");
-        }
-    } //getActualValue()
-
-    public boolean isEqual(Object value1, Object value2) {
-        if (!(value1 instanceof BigDecimal) || !(value2 instanceof BigDecimal))
-            return false;
-        return ((BigDecimal)value1).compareTo((BigDecimal)value2) == 0;
-    }
-
-    public int compare(Object value1, Object value2){
-        return ((BigDecimal)value1).compareTo((BigDecimal)value2);
-    }
-
-    public int getTotalDigits(Object value){
-        return ((BigDecimal)value).movePointRight(((BigDecimal)value).scale()).toString().length() -
-                ((((BigDecimal)value).signum() < 0) ? 1 : 0); // account for minus sign
-    }
-
-    public int getFractionDigits(Object value){
-        return ((BigDecimal)value).scale();
-    }
-
-    /**
-     * This class deals with a bug in BigDecimal class
-     * present up to version 1.1.2. 1.1.3 knows how
-     * to deal with the + sign.
-     *
-     * This method strips the first '+' if it found
-     * alone such as.
-     * +33434.344
-     *
-     * If we find +- then nothing happens we just
-     * return the string passed
-     *
-     * @param value
-     * @return
-     */
-    static private String stripPlusIfPresent(String value) {
-        String strippedPlus = value;
-
-        if (value.length() >= 2 && value.charAt(0) == '+' && value.charAt(1) != '-') {
-            strippedPlus = value.substring(1);
-        }
-        return strippedPlus;
-    }//getStripPlusIfPresent()
-
-} // class DecimalDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/DoubleDV.java b/src/org/apache/xerces/impl/dv/xs_new/DoubleDV.java
deleted file mode 100644
index ebdfc93..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/DoubleDV.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "double"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class DoubleDV extends TypeValidator {
-
-    public short getAllowedFacets(){
-        return ( XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION |XSSimpleTypeDecl.FACET_MAXINCLUSIVE |XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE  | XSSimpleTypeDecl.FACET_MINEXCLUSIVE  );
-    }//getAllowedFacets()
-
-    //convert a String to Double form, we have to take care of cases specified in spec like INF, -INF and NaN
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        try{
-            return dValueOf(content);
-        } catch (Exception ex){
-            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_DOUBLE ],
-            //                                        new Object[]{content});
-            throw new InvalidDatatypeValueException("'" + content + "' is not a valid double value");
-        }
-    }//getActualValue()
-
-    // Can't call Double#compareTo method, because it's introduced in jdk 1.2
-    public int compare(Object value1, Object value2) {
-        return compareDoubles((Double)value1, (Double)value2);
-    }//compare()
-
-    //
-    // private methods
-    //
-    private static Double dValueOf(String s) throws NumberFormatException {
-        Double d;
-        try {
-            d = Double.valueOf(s);
-        }
-        catch ( NumberFormatException nfe ) {
-            if ( s.equals("INF") ) {
-                d = new Double(Double.POSITIVE_INFINITY);
-            }
-            else if ( s.equals("-INF") ) {
-                d = new Double (Double.NEGATIVE_INFINITY);
-            }
-            else if ( s.equals("NaN" ) ) {
-                d = new Double (Double.NaN);
-            }
-            else {
-                throw nfe;
-            }
-        }
-        return d;
-    }//dValueOf()
-
-    private int compareDoubles(Double value, Double anotherValue) {
-        double thisVal = value.doubleValue();
-        double anotherVal = anotherValue.doubleValue();
-
-        if (thisVal < anotherVal)
-            return -1;		 // Neither val is NaN, thisVal is smaller
-        if (thisVal > anotherVal)
-            return 1;		 // Neither val is NaN, thisVal is larger
-
-        long thisBits = Double.doubleToLongBits(thisVal);
-        long anotherBits = Double.doubleToLongBits(anotherVal);
-
-        return (thisBits == anotherBits ?  0 : // Values are equal
-                (thisBits < anotherBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)
-                 1));                          // (0.0, -0.0) or (NaN, !NaN)
-    }
-
-} // class DoubleDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/DurationDV.java b/src/org/apache/xerces/impl/dv/xs_new/DurationDV.java
deleted file mode 100644
index 67cbcfd..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/DurationDV.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <duration> datatype (W3C Schema Datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- * @version $Id$
- */
-public class DurationDV extends AbstractDateTimeDV {
-
-    // order-relation on duration is a partial order. The dates below are used to
-    // for comparison of 2 durations, based on the fact that
-    // duration x and y is x<=y iff s+x<=s+y
-    // see 3.2.6 duration W3C schema datatype specs
-    //
-    // the dates are in format: {CCYY,MM,DD, H, S, M, MS, timezone}
-    private final static int[][] DATETIMES= {
-        {1696, 9, 1, 0, 0, 0, 0, 'Z'},
-        {1697, 2, 1, 0, 0, 0, 0, 'Z'},
-        {1903, 3, 1, 0, 0, 0, 0, 'Z'},
-        {1903, 7, 1, 0, 0, 0, 0, 'Z'}};
-
-    private int[][] fDuration = null;
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
-        try{
-            return parse(content, null);
-        } catch (Exception ex) {
-            throw new InvalidDatatypeValueException("not a valid duration");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of duration object
-     *
-     * @param str    The lexical representation of duration object PnYn MnDTnH nMnS
-     * @param date   uninitialized date object
-     * @return normalized date representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException{
-
-        //PnYn MnDTnH nMnS: -P1Y2M3DT10H30M
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date== null ) {
-            date=new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-
-
-        char c=fBuffer.charAt(fStart++);
-        if ( c!='P' && c!='-' ) {
-            throw new SchemaDateTimeException();
-        }
-        else {
-            date[utc]=(c=='-')?'-':0;
-            if ( c=='-' && fBuffer.charAt(fStart++)!='P' ) {
-                throw new SchemaDateTimeException();
-            }
-        }
-
-        int negate = 1;
-        //negative duration
-        if ( date[utc]=='-' ) {
-            negate = -1;
-
-        }
-        //at least one number and designator must be seen after P
-        boolean designator = false;
-
-        int endDate = indexOf (fStart, fEnd, 'T');
-        if ( endDate == -1 ) {
-            endDate = fEnd;
-        }
-        //find 'Y'
-        int end = indexOf (fStart, endDate, 'Y');
-        if ( end!=-1 ) {
-            //scan year
-            date[CY]=negate * parseInt(fStart,end);
-            fStart = end+1;
-            designator = true;
-        }
-
-        end = indexOf (fStart, endDate, 'M');
-        if ( end!=-1 ) {
-            //scan month
-            date[M]=negate * parseInt(fStart,end);
-            fStart = end+1;
-            designator = true;
-        }
-
-        end = indexOf (fStart, endDate, 'D');
-        if ( end!=-1 ) {
-            //scan day
-            date[D]=negate * parseInt(fStart,end);
-            fStart = end+1;
-            designator = true;
-        }
-
-        if ( fEnd == endDate && fStart!=fEnd ) {
-            throw new SchemaDateTimeException();
-        }
-        if ( fEnd !=endDate ) {
-
-            //scan hours, minutes, seconds
-            //REVISIT: can any item include a decimal fraction or only seconds?
-            //
-
-            end = indexOf (++fStart, fEnd, 'H');
-            if ( end!=-1 ) {
-                //scan hours
-                date[h]=negate * parseInt(fStart,end);
-                fStart=end+1;
-                designator = true;
-            }
-
-            end = indexOf (fStart, fEnd, 'M');
-            if ( end!=-1 ) {
-                //scan min
-                date[m]=negate * parseInt(fStart,end);
-                fStart=end+1;
-                designator = true;
-            }
-
-            end = indexOf (fStart, fEnd, 'S');
-            if ( end!=-1 ) {
-                //scan seconds
-                int mlsec = indexOf (fStart, end, '.');
-                if ( mlsec >0 ) {
-                    date[s]  = negate * parseInt (fStart, mlsec);
-                    date[ms] = negate * parseInt (mlsec+1, end);
-                }
-                else {
-                    date[s]=negate * parseInt(fStart,end);
-                }
-                fStart=end+1;
-                designator = true;
-            }
-            // no additional data shouls appear after last item
-            // P1Y1M1DT is illigal value as well
-            if ( fStart != fEnd || fBuffer.charAt(--fStart)=='T' ) {
-                throw new SchemaDateTimeException();
-            }
-        }
-
-        if ( !designator ) {
-            throw new SchemaDateTimeException();
-        }
-
-        return date;
-    }
-
-    /**
-     * Compares 2 given durations. (refer to W3C Schema Datatypes "3.2.6 duration")
-     *
-     * @param date1  Unnormalized duration
-     * @param date2  Unnormalized duration
-     * @param strict (min/max)Exclusive strict == true ( LESS_THAN ) or ( GREATER_THAN )
-     *               (min/max)Inclusive strict == false (LESS_EQUAL) or (GREATER_EQUAL)
-     * @return
-     */
-    protected  short compareDates(int[] date1, int[] date2, boolean strict) {
-
-        //REVISIT: this is unoptimazed vs of comparing 2 durations
-        //         Algorithm is described in 3.2.6.2 W3C Schema Datatype specs
-        //
-
-        //add constA to both durations
-        short resultA, resultB= INDETERMINATE;
-
-        //try and see if the objects are equal
-        resultA = compareOrder (date1, date2);
-        if ( resultA == 0 ) {
-            return 0;
-        }
-        if ( fDuration == null ) {
-            fDuration = new int[2][TOTAL_SIZE];
-        }
-        //long comparison algorithm is required
-        int[] tempA = addDuration (date1, 0, fDuration[0]);
-        int[] tempB = addDuration (date2, 0, fDuration[1]);
-        resultA =  compareOrder(tempA, tempB);
-        if ( resultA == INDETERMINATE ) {
-            return INDETERMINATE;
-        }
-
-        tempA = addDuration(date1, 1, fDuration[0]);
-        tempB = addDuration(date2, 1, fDuration[1]);
-        resultB = compareOrder(tempA, tempB);
-        resultA = compareResults(resultA, resultB, strict);
-        if (resultA == INDETERMINATE) {
-            return INDETERMINATE;
-        }
-
-        tempA = addDuration(date1, 2, fDuration[0]);
-        tempB = addDuration(date2, 2, fDuration[1]);
-        resultB = compareOrder(tempA, tempB);
-        resultA = compareResults(resultA, resultB, strict);
-        if (resultA == INDETERMINATE) {
-            return INDETERMINATE;
-        }
-
-        tempA = addDuration(date1, 3, fDuration[0]);
-        tempB = addDuration(date2, 3, fDuration[1]);
-        resultB = compareOrder(tempA, tempB);
-        resultA = compareResults(resultA, resultB, strict);
-
-        return resultA;
-    }
-
-    private short compareResults(short resultA, short resultB, boolean strict){
-
-      if ( resultB == INDETERMINATE ) {
-            return INDETERMINATE;
-        }
-        else if ( resultA!=resultB && strict ) {
-            return INDETERMINATE;
-        }
-        else if ( resultA!=resultB && !strict ) {
-            if ( resultA!=0 && resultB!=0 ) {
-                return INDETERMINATE;
-            }
-            else {
-                return (resultA!=0)?resultA:resultB;
-            }
-        }
-        return resultA;
-    }
-
-    private int[] addDuration(int[] date, int index, int[] duration) {
-
-        //REVISIT: some code could be shared between normalize() and this method,
-        //         however is it worth moving it? The structures are different...
-        //
-
-        resetDateObj(duration);
-        //add months (may be modified additionaly below)
-        int temp = DATETIMES[index][M] + date[M];
-        duration[M] = modulo (temp, 1, 13);
-        int carry = fQuotient (temp, 1, 13);
-
-        //add years (may be modified additionaly below)
-        duration[CY]=DATETIMES[index][CY] + date[CY] + carry;
-
-        //add seconds
-        temp = DATETIMES[index][s] + date[s];
-        carry = fQuotient (temp, 60);
-        duration[s] =  mod(temp, 60, carry);
-
-        //add minutes
-        temp = DATETIMES[index][m] +date[m] + carry;
-        carry = fQuotient (temp, 60);
-        duration[m]= mod(temp, 60, carry);
-
-        //add hours
-        temp = DATETIMES[index][h] + date[h] + carry;
-        carry = fQuotient(temp, 24);
-        duration[h] = mod(temp, 24, carry);
-
-
-        duration[D]=DATETIMES[index][D] + date[D] + carry;
-
-        while ( true ) {
-
-            temp=maxDayInMonthFor(duration[CY], duration[M]);
-            if ( duration[D] < 1 ) { //original duration was negative
-                duration[D] = duration[D] + maxDayInMonthFor(duration[CY], duration[M]-1);
-                carry=-1;
-            }
-            else if ( duration[D] > temp ) {
-                duration[D] = duration[D] - temp;
-                carry=1;
-            }
-            else {
-                break;
-            }
-            temp = duration[M]+carry;
-            duration[M] = modulo(temp, 1, 13);
-            duration[CY] = duration[CY]+fQuotient(temp, 1, 13);
-        }
-
-        duration[utc]='Z';
-        return duration;
-    }
-
-    protected String dateToString(int[] date) {
-        message.setLength(0);
-        int negate = 1;
-        if ( date[CY]<0 ) {
-            message.append('-');
-            negate=-1;
-        }
-        message.append('P');
-        message.append(negate * date[CY]);
-        message.append('Y');
-        message.append(negate * date[M]);
-        message.append('M');
-        message.append(negate * date[D]);
-        message.append('D');
-        message.append('T');
-        message.append(negate * date[h]);
-        message.append('H');
-        message.append(negate * date[m]);
-        message.append('M');
-        message.append(negate * date[s]);
-        message.append('.');
-        message.append(negate * date[ms]);
-        message.append('S');
-
-        return message.toString();
-    }
-}
diff --git a/src/org/apache/xerces/impl/dv/xs_new/EntityDV.java b/src/org/apache/xerces/impl/dv/xs_new/EntityDV.java
deleted file mode 100644
index 0d2590a..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/EntityDV.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.util.XMLChar;
-
-/**
- * Represent the schema type "entity"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class EntityDV extends TypeValidator {
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        if (!XMLChar.isValidNCName(content)) {
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
-        }
-
-        return content;
-    }
-
-    public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException {
-        if (!context.isEntityDeclared((String)value)) {
-            throw new InvalidDatatypeValueException("entity not declared");
-        }
-    }
-
-} // class EntityDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/FloatDV.java b/src/org/apache/xerces/impl/dv/xs_new/FloatDV.java
deleted file mode 100644
index 626dd3d..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/FloatDV.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "float"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class FloatDV extends TypeValidator {
-
-    public short getAllowedFacets(){
-        return ( XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION |XSSimpleTypeDecl.FACET_MAXINCLUSIVE |XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE  | XSSimpleTypeDecl.FACET_MINEXCLUSIVE  );
-    }//getAllowedFacets()
-
-    //convert a String to Float form, we have to take care of cases specified in spec like INF, -INF and NaN
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        try{
-            return fValueOf(content);
-        } catch (Exception ex){
-            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_FLOAT ],
-            //                                        new Object[]{content});
-            throw new InvalidDatatypeValueException("'" + content + "' is not a valid float value");
-        }
-    }//getActualValue()
-
-    // Can't call Float#compareTo method, because it's introduced in jdk 1.2
-    public int compare(Object value1, Object value2){
-        return compareFloats((Float)value1, (Float)value2);
-    }//compare()
-
-    //takes care of special values positive, negative infinity and Not a Number as per the spec.
-    private static Float fValueOf(String s) throws NumberFormatException {
-        Float f=null;
-        try {
-            f = Float.valueOf(s);
-        }
-        catch ( NumberFormatException nfe ) {
-            if ( s.equals("INF") ) {
-                f = new Float(Float.POSITIVE_INFINITY);
-            }
-            else if ( s.equals("-INF") ) {
-                f = new Float (Float.NEGATIVE_INFINITY);
-            }
-            else if ( s.equals("NaN" ) ) {
-                f = new Float (Float.NaN);
-            }
-            else {
-                throw nfe;
-            }
-        }
-        return f;
-    }
-
-    private int compareFloats(Float value, Float anotherValue){
-        float thisVal = value.floatValue();
-        float anotherVal = anotherValue.floatValue();
-
-        if (thisVal < anotherVal)
-            return -1;		 // Neither val is NaN, thisVal is smaller
-        if (thisVal > anotherVal)
-            return 1;		 // Neither val is NaN, thisVal is larger
-
-        int thisBits = Float.floatToIntBits(thisVal);
-        int anotherBits = Float.floatToIntBits(anotherVal);
-
-        return (thisBits == anotherBits ?  0 : // Values are equal
-                (thisBits < anotherBits ? -1 : // (-0.0, 0.0) or (!NaN, NaN)
-                 1));                          // (0.0, -0.0) or (NaN, !NaN)
-    }
-
-} // class FloatDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/HexBinaryDV.java b/src/org/apache/xerces/impl/dv/xs_new/HexBinaryDV.java
deleted file mode 100644
index d09b41e..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/HexBinaryDV.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.impl.dv.util.HexBin;
-
-/**
- * Represent the schema type "hexBinary"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class HexBinaryDV extends TypeValidator {
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        String decoded = HexBin.decode(content);
-        if (decoded == null)
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not encoded in Hex");
-
-        return decoded;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/dv/xs_new/IDDV.java b/src/org/apache/xerces/impl/dv/xs_new/IDDV.java
deleted file mode 100644
index fcf1499..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/IDDV.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "ID"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class IDDV extends TypeValidator{
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        if (!XMLChar.isValidNCName(content)) {
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
-        }
-        return content;
-    }
-
-    public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException {
-        String content = (String)value;
-        if (context.isIdDeclared(content))
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
-        context.addId(content);
-    }
-} // class IDDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/IDREFDV.java b/src/org/apache/xerces/impl/dv/xs_new/IDREFDV.java
deleted file mode 100644
index 29b958a..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/IDREFDV.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.util.XMLChar;
-
-/**
- * Represent the schema type "IDREF"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class IDREFDV extends TypeValidator{
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        if (!XMLChar.isValidNCName(content)) {
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
-        }
-        return content;
-    }
-
-    public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException {
-        context.addIdRef((String)value);
-    }
-
-}//IDREF class
\ No newline at end of file
diff --git a/src/org/apache/xerces/impl/dv/xs_new/ListDV.java b/src/org/apache/xerces/impl/dv/xs_new/ListDV.java
deleted file mode 100644
index 4c08ded..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/ListDV.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema list types
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class ListDV extends TypeValidator{
-
-    public short getAllowedFacets(){
-          return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    // this method should never be called: XSSimpleTypeDecl is responsible for
-    // calling the item type for the convertion
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
-        return content;
-    }
-
-    // length of a list type is the number of items in the list
-    public int getDataLength(Object value) {
-        return ((Object[])value).length;
-    }
-} // class ListDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/MonthDV.java b/src/org/apache/xerces/impl/dv/xs_new/MonthDV.java
deleted file mode 100644
index 5cbb641..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/MonthDV.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <gMonth> datatype (W3C Schema Datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- *
- * @version $Id$
- */
-
-public class MonthDV extends AbstractDateTimeDV {
-
-    /**
-     * Convert a string to a compiled form
-     *
-     * @param  content The lexical representation of gMonth
-     * @return a valid and normalized gMonth object
-     */
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid month");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of gMonth object
-     *
-     * @param str    The lexical representation of gMonth object --MM--
-     *               with possible time zone Z or (-),(+)hh:mm
-     * @param date   uninitialized date object
-     * @return normalized date representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException{
-
-        //REVISIT: change --MM-- to --MM
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date== null ) {
-            date=new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-
-        //set constants
-        date[CY]=YEAR;
-        date[D]=DAY;
-        if (fBuffer.charAt(0)!='-' || fBuffer.charAt(1)!='-') {
-            throw new SchemaDateTimeException("Invalid format for gMonth: "+str);
-        }
-        int stop = fStart +4;
-        date[M]=parseInt(fStart+2,stop);
-
-        if (fBuffer.charAt(stop++)!='-' || fBuffer.charAt(stop)!='-') {
-            throw new SchemaDateTimeException("Invalid format for gMonth: "+str);
-        }
-        if ( MONTH_SIZE<fEnd ) {
-            int sign = findUTCSign(MONTH_SIZE, fEnd);
-            if ( sign<0 ) {
-                throw new SchemaDateTimeException ("Error in month parsing: "+str);
-            }
-            else {
-                getTimeZone(date, sign);
-            }
-        }
-        //validate and normalize
-        validateDateTime(date);
-
-        if ( date[utc]!=0 && date[utc]!='Z' ) {
-            normalize(date);
-        }
-        return date;
-    }
-
-    /**
-     * Overwrite compare algorithm to optimize month comparison
-     *
-     * REVISIT: this one is lack of the third parameter: boolean strict, so it
-     *          doesn't override the method in the base. But maybe this method
-     *          is not correctly implemented, and I did encounter errors when
-     *          trying to add the extra parameter. I'm leaving it as is. -SG
-     *
-     * @param date1
-     * @param date2
-     * @return
-     */
-    protected  short compareDates(int[] date1, int[] date2) {
-
-        if ( date1[utc]==date2[utc] ) {
-            return (short)((date1[M]>=date2[M])?(date1[M]>date2[M])?1:0:-1);
-        }
-
-        if ( date1[utc]=='Z' || date2[utc]=='Z' ) {
-
-            if ( date1[M]==date2[M] ) {
-                //--05--Z and --05--
-                return INDETERMINATE;
-            }
-            if ( (date1[M]+1 == date2[M] || date1[M]-1 == date2[M]) ) {
-                //--05--Z and (--04-- or --05--)
-                //REVISIT: should this case be less than or equal?
-                //         maxExclusive should fail but what about maxInclusive
-                //
-                return INDETERMINATE;
-            }
-        }
-
-        if ( date1[M]<date2[M] ) {
-            return -1;
-        }
-        else {
-            return 1;
-        }
-
-    }
-
-    /**
-     * Converts month object representation to String
-     *
-     * @param date   month object
-     * @return lexical representation of month: --MM-- with an optional time zone sign
-     */
-    protected String dateToString(int[] date) {
-
-        message.setLength(0);
-        message.append('-');
-        message.append('-');
-        message.append(date[M]);
-        message.append('-');
-        message.append('-');
-        message.append((char)date[utc]);
-        return message.toString();
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/dv/xs_new/MonthDayDV.java b/src/org/apache/xerces/impl/dv/xs_new/MonthDayDV.java
deleted file mode 100644
index 9a73a04..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/MonthDayDV.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <gMonthDay> datatype (W3C Schema Datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- *
- * @version $Id$
- */
-
-public class MonthDayDV extends AbstractDateTimeDV {
-
-    //size without time zone: --MM-DD
-    private final static int MONTHDAY_SIZE = 7;
-
-    /**
-     * Convert a string to a compiled form
-     *
-     * @param  content The lexical representation of gMonthDay
-     * @return a valid and normalized gMonthDay object
-     */
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid monthDay");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of gMonthDay object
-     *
-     * @param str    The lexical representation of gMonthDay object --MM-DD
-     *               with possible time zone Z or (-),(+)hh:mm
-     * @param date   uninitialized date object
-     * @return normalized date representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException{
-
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date== null ) {
-            date=new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-
-        //initialize
-        date[CY]=YEAR;
-
-        if (fBuffer.charAt(0)!='-' || fBuffer.charAt(1)!='-') {
-            throw new SchemaDateTimeException("Invalid format for gMonthDay: "+str);
-        }
-        date[M]=parseInt(fStart+2,fStart+4);
-        fStart+=4;
-
-        if (fBuffer.charAt(fStart++)!='-') {
-            throw new SchemaDateTimeException("Invalid format for gMonthDay: " + str);
-        }
-
-        date[D]=parseInt(fStart, fStart+2);
-
-        if ( MONTHDAY_SIZE<fEnd ) {
-            int sign = findUTCSign(MONTHDAY_SIZE, fEnd);
-            if ( sign<0 ) {
-                throw new SchemaDateTimeException ("Error in month parsing:" +str);
-            }
-            else {
-                getTimeZone(date, sign);
-            }
-        }
-        //validate and normalize
-
-        validateDateTime(date);
-
-        if ( date[utc]!=0 && date[utc]!='Z' ) {
-            normalize(date);
-        }
-        return date;
-    }
-
-    /**
-     * Converts gMonthDay object representation to String
-     *
-     * @param date   gmonthDay object
-     * @return lexical representation of month: --MM-DD with an optional time zone sign
-     */
-    protected String dateToString(int[] date) {
-        message.setLength(0);
-        message.append('-');
-        message.append('-');
-        message.append(date[M]);
-        message.append('-');
-        message.append(date[D]);
-        message.append((char)date[utc]);
-        return message.toString();
-    }
-
-}
-
diff --git a/src/org/apache/xerces/impl/dv/xs_new/QNameDV.java b/src/org/apache/xerces/impl/dv/xs_new/QNameDV.java
deleted file mode 100644
index f7a65cb..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/QNameDV.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "QName" and "NOTATION"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class QNameDV extends TypeValidator {
-
-    private static final String EMPTY_STRING = "";
-
-    public short getAllowedFacets() {
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE);
-    }
-
-    public Object getActualValue(String content, ValidationContext context)
-        throws InvalidDatatypeValueException {
-
-        // "prefix:localpart" or "localpart"
-        // get prefix and local part out of content
-        String prefix, localpart;
-        int colonptr = content.indexOf(":");
-        if (colonptr > 0) {
-            prefix = context.getSymbol(content.substring(0,colonptr));
-            localpart = content.substring(colonptr+1);
-        } else {
-            prefix = context.getSymbol(EMPTY_STRING);
-            localpart = content;
-        }
-
-        // both prefix (if any) and localpart must be valid NCName
-        if (prefix.length() > 0 && !XMLChar.isValidNCName(prefix))
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid QName: '" + prefix + "' is not an NCName");
-
-        if(!XMLChar.isValidNCName(localpart))
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid QName: '" + localpart + "' is not an NCName");
-
-        // resove prefix to a uri, report an error if failed
-        String uri = context.getURI(prefix);
-        if (prefix.length() > 0 && uri == null)
-            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid QName: cannot resolve the prefix to a namespace uri");
-
-        return new QName(prefix, context.getSymbol(localpart), context.getSymbol(content), uri);
-
-    }
-
-    // REVISIT: qname and notation shouldn't support length facets.
-    //          now we just return the length of the rawname
-    public int getDataLength(Object value) {
-        return ((QName)value).rawname.length();
-    }
-
-} // class QNameDVDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/SchemaDVFactoryImpl.java b/src/org/apache/xerces/impl/dv/xs_new/SchemaDVFactoryImpl.java
deleted file mode 100644
index e2bff01..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/SchemaDVFactoryImpl.java
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.SchemaDVFactory;
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.XSAtomicSimpleType;
-import org.apache.xerces.impl.dv.XSListSimpleType;
-import org.apache.xerces.impl.dv.XSUnionSimpleType;
-import org.apache.xerces.impl.dv.XSFacets;
-import java.util.Hashtable;
-
-/**
- * the factory to create/return built-in schema DVs and create user-defined DVs
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class SchemaDVFactoryImpl extends SchemaDVFactory {
-
-    static final String URI_SCHEMAFORSCHEMA = "http://www.w3.org/2001/XMLSchema";
-
-    static Hashtable fBuiltInTypes = null;
-
-    /**
-     * Get a built-in simple type of the given name
-     * REVISIT: its still not decided within the Schema WG how to define the
-     *          ur-types and if all simple types should be derived from a
-     *          complex type, so as of now we ignore the fact that anySimpleType
-     *          is derived from anyType, and pass 'null' as the base of
-     *          anySimpleType. It needs to be changed as per the decision taken.
-     *
-     * @param name  the name of the datatype
-     * @return      the datatype validator of the given name
-     */
-    public XSSimpleType getBuiltInType(String name) {
-        prepareBuiltInTypes();
-        return (XSSimpleType)fBuiltInTypes.get(name);
-    }
-
-    /**
-     * get all built-in simple types, which are stored in a hashtable keyed by
-     * the name
-     *
-     * @return      a hashtable which contains all built-in simple types
-     */
-    public Hashtable getBuiltInTypes() {
-        prepareBuiltInTypes();
-        return (Hashtable)fBuiltInTypes.clone();
-    }
-
-    /**
-     * Create a new simple type which is derived by restriction from another
-     * simple type.
-     *
-     * @param name              name of the new type, could be null
-     * @param targetNamespace   target namespace of the new type, could be null
-     * @param finalSet          value of "final"
-     * @param base              base type of the new type
-     * @return                  the newly created simple type
-     */
-    public XSSimpleType createTypeRestriction(String name, String targetNamespace,
-                                              short finalSet, XSSimpleType base) {
-        return new XSSimpleTypeDecl((XSSimpleTypeDecl)base, name, targetNamespace, finalSet);
-    }
-
-    /**
-     * Create a new simple type which is derived by list from another simple
-     * type.
-     *
-     * @param name              name of the new type, could be null
-     * @param targetNamespace   target namespace of the new type, could be null
-     * @param finalSet          value of "final"
-     * @param itemType          item type of the list type
-     * @return                  the newly created simple type
-     */
-    public XSListSimpleType createTypeList(String name, String targetNamespace,
-                                           short finalSet, XSSimpleType itemType) {
-        prepareBuiltInTypes();
-        return new XSSimpleTypeDecl(name, targetNamespace, finalSet, (XSSimpleTypeDecl)itemType);
-    }
-
-    /**
-     * Create a new simple type which is derived by union from a list of other
-     * simple types.
-     *
-     * @param name              name of the new type, could be null
-     * @param targetNamespace   target namespace of the new type, could be null
-     * @param finalSet          value of "final"
-     * @param base              member types of the union type
-     * @return                  the newly created simple type
-     */
-    public XSUnionSimpleType createTypeUnion(String name, String targetNamespace,
-                                             short finalSet, XSSimpleType[] memberTypes) {
-        prepareBuiltInTypes();
-        int typeNum = memberTypes.length;
-        XSSimpleTypeDecl[] mtypes = new XSSimpleTypeDecl[typeNum];
-        System.arraycopy(memberTypes, 0, mtypes, 0, typeNum);
-        return new XSSimpleTypeDecl(name, targetNamespace, finalSet, mtypes);
-    }
-
-    // make sure the built-in types are created
-    // the types are supposed to be reused for all factory objects,
-    // so we synchorinize on the class object.
-    void prepareBuiltInTypes() {
-        if (fBuiltInTypes == null) {
-            synchronized (this.getClass()) {
-                // check again, in case I'm waiting for another thread to create
-                // the types.
-                if (fBuiltInTypes == null) {
-                    createBuiltInTypes();
-                }
-            }
-        }
-    }
-
-    // create all built-in types
-    // we are assumeing that fBuiltInTypes == null
-    void createBuiltInTypes() {
-
-        // all schema simple type names
-        final String ANYSIMPLETYPE     = "anySimpleType";
-        final String ANYURI            = "anyURI";
-        final String BASE64BINARY      = "base64Binary";
-        final String BOOLEAN           = "boolean";
-        final String BYTE              = "byte";
-        final String DATE              = "date";
-        final String DATETIME          = "dateTime";
-        final String DAY               = "gDay";
-        final String DECIMAL           = "decimal";
-        final String DOUBLE            = "double";
-        final String DURATION          = "duration";
-        final String ENTITY            = "ENTITY";
-        final String ENTITIES          = "ENTITIES";
-        final String FLOAT             = "float";
-        final String HEXBINARY         = "hexBinary";
-        final String ID                = "ID";
-        final String IDREF             = "IDREF";
-        final String IDREFS            = "IDREFS";
-        final String INT               = "int";
-        final String INTEGER           = "integer";
-        final String LONG              = "long";
-        final String NAME              = "Name";
-        final String NEGATIVEINTEGER   = "negativeInteger";
-        final String MONTH             = "gMonth";
-        final String MONTHDAY          = "gMonthDay";
-        final String NCNAME            = "NCName";
-        final String NMTOKEN           = "NMTOKEN";
-        final String NMTOKENS          = "NMTOKENS";
-        final String LANGUAGE          = "language";
-        final String NONNEGATIVEINTEGER= "nonNegativeInteger";
-        final String NONPOSITIVEINTEGER= "nonPositiveInteger";
-        final String NORMALIZEDSTRING  = "normalizedString";
-        final String NOTATION          = "NOTATION";
-        final String POSITIVEINTEGER   = "positiveInteger";
-        final String QNAME             = "QName";
-        final String SHORT             = "short";
-        final String STRING            = "string";
-        final String TIME              = "time";
-        final String TOKEN             = "token";
-        final String UNSIGNEDBYTE      = "unsignedByte";
-        final String UNSIGNEDINT       = "unsignedInt";
-        final String UNSIGNEDLONG      = "unsignedLong";
-        final String UNSIGNEDSHORT     = "unsignedShort";
-        final String YEAR              = "gYear";
-        final String YEARMONTH         = "gYearMonth";
-
-        final XSFacets facets = new XSFacets();
-
-        fBuiltInTypes = new Hashtable();
-        //REVISIT: passing "anyType" here.
-        XSSimpleTypeDecl anySimpleType = XSSimpleTypeDecl.fAnySimpleType;
-        fBuiltInTypes.put(ANYSIMPLETYPE, anySimpleType);
-        XSSimpleTypeDecl stringDV = new XSSimpleTypeDecl(anySimpleType, STRING, XSSimpleTypeDecl.DV_STRING, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false );
-        fBuiltInTypes.put(STRING, stringDV);
-        fBuiltInTypes.put(BOOLEAN, new XSSimpleTypeDecl(anySimpleType, STRING, XSSimpleTypeDecl.DV_BOOLEAN, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_FINITE, false));
-        XSSimpleTypeDecl decimalDV = new XSSimpleTypeDecl(anySimpleType, DECIMAL, XSSimpleTypeDecl.DV_DECIMAL, XSSimpleType.ORDERED_TOTAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, true);
-        fBuiltInTypes.put(DECIMAL, decimalDV);
-
-        fBuiltInTypes.put(ANYURI, new XSSimpleTypeDecl(anySimpleType, ANYURI, XSSimpleTypeDecl.DV_ANYURI, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(BASE64BINARY, new XSSimpleTypeDecl(anySimpleType, BASE64BINARY, XSSimpleTypeDecl.DV_BASE64BINARY, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(DURATION, new XSSimpleTypeDecl(anySimpleType, DURATION, XSSimpleTypeDecl.DV_DURATION, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(DATETIME, new XSSimpleTypeDecl(anySimpleType, DATETIME, XSSimpleTypeDecl.DV_DATETIME, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(TIME, new XSSimpleTypeDecl(anySimpleType, TIME, XSSimpleTypeDecl.DV_TIME, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(DATE, new XSSimpleTypeDecl(anySimpleType, DATE, XSSimpleTypeDecl.DV_DATE, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(YEARMONTH, new XSSimpleTypeDecl(anySimpleType, YEARMONTH, XSSimpleTypeDecl.DV_GYEARMONTH, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(YEAR, new XSSimpleTypeDecl(anySimpleType, YEAR, XSSimpleTypeDecl.DV_GYEAR, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(MONTHDAY, new XSSimpleTypeDecl(anySimpleType, MONTHDAY, XSSimpleTypeDecl.DV_GMONTHDAY, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(DAY, new XSSimpleTypeDecl(anySimpleType, DAY, XSSimpleTypeDecl.DV_GDAY, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(MONTH, new XSSimpleTypeDecl(anySimpleType, MONTH, XSSimpleTypeDecl.DV_GMONTH, XSSimpleType.ORDERED_PARTIAL, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-
-        facets.fractionDigits = 0;
-        XSSimpleTypeDecl integerDV = new XSSimpleTypeDecl(decimalDV, INTEGER, URI_SCHEMAFORSCHEMA, (short)0);
-        integerDV.applyFacets1(facets , XSSimpleType.FACET_FRACTIONDIGITS, (short)0);
-        fBuiltInTypes.put(INTEGER, integerDV);
-
-        facets.maxInclusive = "0";
-        XSSimpleTypeDecl nonPositiveDV = new XSSimpleTypeDecl(integerDV, NONPOSITIVEINTEGER, URI_SCHEMAFORSCHEMA, (short)0);
-        nonPositiveDV.applyFacets1(facets , XSSimpleType.FACET_MAXINCLUSIVE, (short)0);
-        fBuiltInTypes.put(NONPOSITIVEINTEGER, nonPositiveDV);
-
-        facets.maxInclusive = "-1";
-        XSSimpleTypeDecl negativeDV = new XSSimpleTypeDecl(integerDV, NEGATIVEINTEGER, URI_SCHEMAFORSCHEMA, (short)0);
-        negativeDV.applyFacets1(facets , XSSimpleType.FACET_MAXINCLUSIVE, (short)0);
-        fBuiltInTypes.put(NEGATIVEINTEGER, negativeDV);
-
-        facets.maxInclusive = "9223372036854775807";
-        facets.minInclusive = "-9223372036854775808";
-        XSSimpleTypeDecl longDV = new XSSimpleTypeDecl(integerDV, LONG, URI_SCHEMAFORSCHEMA, (short)0);
-        longDV.applyFacets1(facets , (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 );
-        fBuiltInTypes.put(LONG, longDV);
-
-
-        facets.maxInclusive = "2147483647";
-        facets.minInclusive =  "-2147483648";
-        XSSimpleTypeDecl intDV = new XSSimpleTypeDecl(longDV, INT, URI_SCHEMAFORSCHEMA, (short)0);
-        intDV.applyFacets1(facets, (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 );
-        fBuiltInTypes.put(INT, intDV);
-
-        facets.maxInclusive = "32767";
-        facets.minInclusive = "-32768";
-        XSSimpleTypeDecl shortDV = new XSSimpleTypeDecl(intDV, SHORT , URI_SCHEMAFORSCHEMA, (short)0);
-        shortDV.applyFacets1(facets, (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 );
-        fBuiltInTypes.put(SHORT, shortDV);
-
-        facets.maxInclusive = "127";
-        facets.minInclusive = "-128";
-        XSSimpleTypeDecl byteDV = new XSSimpleTypeDecl(shortDV, BYTE , URI_SCHEMAFORSCHEMA, (short)0);
-        byteDV.applyFacets1(facets, (short)(XSSimpleType.FACET_MAXINCLUSIVE | XSSimpleType.FACET_MININCLUSIVE), (short)0 );
-        fBuiltInTypes.put(BYTE, byteDV);
-
-        facets.minInclusive =  "0" ;
-        XSSimpleTypeDecl nonNegativeDV = new XSSimpleTypeDecl(integerDV, NONNEGATIVEINTEGER , URI_SCHEMAFORSCHEMA, (short)0);
-        nonNegativeDV.applyFacets1(facets, XSSimpleType.FACET_MININCLUSIVE, (short)0 );
-        fBuiltInTypes.put(NONNEGATIVEINTEGER, nonNegativeDV);
-
-        facets.maxInclusive = "18446744073709551615" ;
-        XSSimpleTypeDecl unsignedLongDV = new XSSimpleTypeDecl(nonNegativeDV, UNSIGNEDLONG , URI_SCHEMAFORSCHEMA, (short)0);
-        unsignedLongDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 );
-        fBuiltInTypes.put(UNSIGNEDLONG, unsignedLongDV);
-
-        facets.maxInclusive = "4294967295" ;
-        XSSimpleTypeDecl unsignedIntDV = new XSSimpleTypeDecl(unsignedLongDV, UNSIGNEDINT , URI_SCHEMAFORSCHEMA, (short)0);
-        unsignedIntDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 );
-        fBuiltInTypes.put(UNSIGNEDINT, unsignedIntDV);
-
-        facets.maxInclusive = "65535" ;
-        XSSimpleTypeDecl unsignedShortDV = new XSSimpleTypeDecl(unsignedIntDV, UNSIGNEDSHORT , URI_SCHEMAFORSCHEMA, (short)0);
-        unsignedShortDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 );
-        fBuiltInTypes.put(UNSIGNEDSHORT, unsignedShortDV);
-
-        facets.maxInclusive = "255" ;
-        XSSimpleTypeDecl unsignedByteDV = new XSSimpleTypeDecl(unsignedShortDV, UNSIGNEDBYTE , URI_SCHEMAFORSCHEMA, (short)0);
-        unsignedByteDV.applyFacets1(facets, XSSimpleType.FACET_MAXINCLUSIVE, (short)0 );
-        fBuiltInTypes.put(UNSIGNEDBYTE, unsignedByteDV);
-
-        facets.minInclusive = "1" ;
-        XSSimpleTypeDecl positiveIntegerDV = new XSSimpleTypeDecl(nonNegativeDV, POSITIVEINTEGER , URI_SCHEMAFORSCHEMA, (short)0);
-        positiveIntegerDV.applyFacets1(facets, XSSimpleType.FACET_MININCLUSIVE, (short)0 );
-        fBuiltInTypes.put(POSITIVEINTEGER, positiveIntegerDV);
-
-
-        fBuiltInTypes.put(FLOAT, new XSSimpleTypeDecl(anySimpleType, FLOAT, XSSimpleTypeDecl.DV_FLOAT, XSSimpleType.ORDERED_TOTAL, true, XSSimpleType.CARDINALITY_FINITE, true));
-        fBuiltInTypes.put(DOUBLE, new XSSimpleTypeDecl(anySimpleType, DOUBLE, XSSimpleTypeDecl.DV_DOUBLE, XSSimpleType.ORDERED_TOTAL, true, XSSimpleType.CARDINALITY_FINITE, true));
-        fBuiltInTypes.put(HEXBINARY, new XSSimpleTypeDecl(anySimpleType, HEXBINARY, XSSimpleTypeDecl.DV_HEXBINARY, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-        fBuiltInTypes.put(NOTATION, new XSSimpleTypeDecl(anySimpleType, NOTATION, XSSimpleTypeDecl.DV_NOTATION, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-
-
-        facets.whiteSpace =  XSSimpleType.WS_REPLACE;
-        XSSimpleTypeDecl normalizedDV = new XSSimpleTypeDecl(stringDV, NORMALIZEDSTRING , URI_SCHEMAFORSCHEMA, (short)0);
-        normalizedDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0 );
-        fBuiltInTypes.put(NORMALIZEDSTRING, normalizedDV);
-
-        facets.whiteSpace = XSSimpleType.WS_COLLAPSE;
-        XSSimpleTypeDecl tokenDV = new XSSimpleTypeDecl(normalizedDV, TOKEN , URI_SCHEMAFORSCHEMA, (short)0);
-        tokenDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0 );
-        fBuiltInTypes.put(TOKEN, tokenDV);
-
-        facets.whiteSpace = XSSimpleType.WS_COLLAPSE;
-        facets.pattern  = "([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]+)(-[a-zA-Z]+)*";
-        XSSimpleTypeDecl languageDV = new XSSimpleTypeDecl(tokenDV, LANGUAGE , URI_SCHEMAFORSCHEMA, (short)0);
-        languageDV.applyFacets1(facets, (short)(XSSimpleType.FACET_WHITESPACE | XSSimpleType.FACET_PATTERN) ,(short)0);
-        fBuiltInTypes.put(LANGUAGE, languageDV);
-
-
-        facets.whiteSpace =  XSSimpleType.WS_COLLAPSE;
-        XSSimpleTypeDecl nameDV = new XSSimpleTypeDecl(tokenDV, NAME , URI_SCHEMAFORSCHEMA, (short)0);
-        nameDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0, XSSimpleTypeDecl.SPECIAL_TOKEN_NAME);
-        fBuiltInTypes.put(NAME, nameDV);
-
-        facets.whiteSpace = XSSimpleType.WS_COLLAPSE;
-        XSSimpleTypeDecl ncnameDV = new XSSimpleTypeDecl(nameDV, NCNAME , URI_SCHEMAFORSCHEMA, (short)0) ;
-        ncnameDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0, XSSimpleTypeDecl.SPECIAL_TOKEN_NCNAME);
-        fBuiltInTypes.put(NCNAME, ncnameDV);
-
-        fBuiltInTypes.put(QNAME, new XSSimpleTypeDecl(anySimpleType, QNAME, XSSimpleTypeDecl.DV_QNAME, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false));
-
-        fBuiltInTypes.put(ID, new XSSimpleTypeDecl(ncnameDV,  ID, XSSimpleTypeDecl.DV_ID, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false ));
-        XSSimpleTypeDecl idrefDV = new XSSimpleTypeDecl(ncnameDV,  IDREF , XSSimpleTypeDecl.DV_IDREF, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false);
-        fBuiltInTypes.put(IDREF, idrefDV);
-
-        facets.minLength = 1;
-        XSSimpleTypeDecl tempDV = new XSSimpleTypeDecl(null, URI_SCHEMAFORSCHEMA, (short)0, idrefDV);
-        XSSimpleTypeDecl idrefsDV = new XSSimpleTypeDecl(tempDV, IDREFS, URI_SCHEMAFORSCHEMA, (short)0);
-        idrefsDV.applyFacets1(facets, XSSimpleType.FACET_MINLENGTH, (short)0);
-        fBuiltInTypes.put(IDREFS, idrefsDV);
-
-        XSSimpleTypeDecl entityDV = new XSSimpleTypeDecl(ncnameDV, ENTITY , XSSimpleTypeDecl.DV_ENTITY, XSSimpleType.ORDERED_FALSE, false, XSSimpleType.CARDINALITY_COUNTABLY_INFINITE, false);
-        fBuiltInTypes.put(ENTITY, entityDV);
-
-        facets.minLength = 1;
-        tempDV = new XSSimpleTypeDecl(null, URI_SCHEMAFORSCHEMA, (short)0, entityDV);
-        XSSimpleTypeDecl entitiesDV = new XSSimpleTypeDecl(tempDV, ENTITIES, URI_SCHEMAFORSCHEMA, (short)0);
-        entitiesDV.applyFacets1(facets, XSSimpleType.FACET_MINLENGTH, (short)0);
-        fBuiltInTypes.put(ENTITIES, entitiesDV);
-
-
-        facets.whiteSpace  = XSSimpleType.WS_COLLAPSE;
-        XSSimpleTypeDecl nmtokenDV = new XSSimpleTypeDecl(tokenDV, NMTOKEN, URI_SCHEMAFORSCHEMA, (short)0);
-        nmtokenDV.applyFacets1(facets, XSSimpleType.FACET_WHITESPACE, (short)0, XSSimpleTypeDecl.SPECIAL_TOKEN_NMTOKEN);
-        fBuiltInTypes.put(NMTOKEN, nmtokenDV);
-
-        facets.minLength = 1;
-        tempDV = new XSSimpleTypeDecl(null, URI_SCHEMAFORSCHEMA, (short)0, nmtokenDV);
-        XSSimpleTypeDecl nmtokensDV = new XSSimpleTypeDecl(tempDV, NMTOKENS, URI_SCHEMAFORSCHEMA, (short)0);
-        nmtokensDV.applyFacets1(facets, XSSimpleType.FACET_MINLENGTH, (short)0);
-        fBuiltInTypes.put(NMTOKENS, nmtokensDV);
-
-    }//createBuiltInTypes()
-
-}//SchemaDVFactory
diff --git a/src/org/apache/xerces/impl/dv/xs_new/SchemaDateTimeException.java b/src/org/apache/xerces/impl/dv/xs_new/SchemaDateTimeException.java
deleted file mode 100644
index b0a6ffb..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/SchemaDateTimeException.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000, 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-/**
- * @version $Id$
- */
-public class SchemaDateTimeException extends RuntimeException {
-    public SchemaDateTimeException () {
-        super();
-    }
-
-    public SchemaDateTimeException (String s) {
-        super (s);
-    }
-}
diff --git a/src/org/apache/xerces/impl/dv/xs_new/StringDV.java b/src/org/apache/xerces/impl/dv/xs_new/StringDV.java
deleted file mode 100644
index f2f7145..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/StringDV.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema type "string"
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class StringDV extends TypeValidator {
-
-    public short getAllowedFacets(){
-        return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
-    }
-
-    public Object getActualValue(String content, ValidationContext context)
-        throws InvalidDatatypeValueException {
-        return content;
-    }
-
-} // class StringDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/TimeDV.java b/src/org/apache/xerces/impl/dv/xs_new/TimeDV.java
deleted file mode 100644
index c49cdf7..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/TimeDV.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <time> datatype (W3C Schema Datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- *
- * @version $Id$
- */
-public class TimeDV extends AbstractDateTimeDV {
-
-    /**
-     * Convert a string to a compiled form
-     *
-     * @param  content The lexical representation of time
-     * @return a valid and normalized time object
-     */
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid time");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of time object
-     *
-     * @param str    The lexical representation of time object hh:mm:ss.sss
-     *               with possible time zone Z or (-),(+)hh:mm
-     *               Pattern: "(\\d\\d):(\\d\\d):(\\d\\d)(\\.(\\d)*)?(Z|(([-+])(\\d\\d)(:(\\d\\d))?))?")
-     * @param date   uninitialized date object
-     * @return normalized time representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException{
-
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date == null ) {
-            date = new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-
-        // time
-        // initialize to default values
-        date[CY]=YEAR;
-        date[M]=MONTH;
-        date[D]=DAY;
-        getTime(fStart, fEnd, date);
-
-        //validate and normalize
-
-        validateDateTime(date);
-
-        if ( date[utc]!=0 ) {
-            normalize(date);
-        }
-                return date;
-    }
-
-    /**
-     * Converts time object representation to String
-     *
-     * @param date   time object
-     * @return lexical representation of time: hh:mm:ss.sss with an optional time zone sign
-     */
-    protected String dateToString(int[] date) {
-        message.setLength(0);
-        message.append(date[h]);
-        message.append(':');
-        message.append(date[m]);
-        message.append(':');
-        message.append(date[s]);
-        message.append('.');
-        message.append(date[ms]);
-        message.append((char)date[utc]);
-        return message.toString();
-    }
-
-}
-
-
diff --git a/src/org/apache/xerces/impl/dv/xs_new/TypeValidator.java b/src/org/apache/xerces/impl/dv/xs_new/TypeValidator.java
deleted file mode 100644
index a39d61e..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/TypeValidator.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * All primitive types plus ID/IDREF/ENTITY are derived from this abstract
- * class. It provides extra information XSSimpleTypeDecl requires from each
- * type: allowed facets, converting String to actual value, check equality,
- * comparison, etc.
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public abstract class TypeValidator {
-
-    // which facets are allowed for this type
-    public abstract short getAllowedFacets();
-
-    // convert a string to an actual value. for example,
-    // for number types (decimal, double, float, and types derived from them),
-    // get the BigDecimal, Double, Flout object.
-    // for some types (string and derived), they just return the string itself
-    public abstract Object getActualValue(String content, ValidationContext context)
-        throws InvalidDatatypeValueException;
-
-    // for ID/IDREF/ENTITY types, do some extra checking after the value is
-    // checked to be valid with respect to both lexical representation and
-    // facets
-    public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException {
-    }
-
-    // whether two values are equal
-    // the parameters are in compiled form (from getActualValue)
-    public boolean isEqual(Object value1, Object value2) {
-        return value1.equals(value2);
-    }
-
-    // the following methods might not be supported by every DV.
-    // but XSSimpleTypeDecl should know which type supports which methods,
-    // and it's an *internal* error if a method is called on a DV that
-    // doesn't support it.
-
-    //order constants
-    public static final short LESS_THAN     = -1;
-    public static final short EQUAL         = 0;
-    public static final short GREATER_THAN  = 1;
-    public static final short INDETERMINATE = 2;
-
-    // check the order relation between the two values
-    // the parameters are in compiled form (from getActualValue)
-    public int compare(Object value1, Object value2) {
-        return -1;
-    }
-
-    // get the length of the value
-    // the parameters are in compiled form (from getActualValue)
-    public int getDataLength(Object value) {
-        return (value instanceof String) ? ((String)value).length() : -1;
-    }
-
-    // get the number of digits of the value
-    // the parameters are in compiled form (from getActualValue)
-    public int getTotalDigits(Object value) {
-        return -1;
-    }
-
-    // get the number of fraction digits of the value
-    // the parameters are in compiled form (from getActualValue)
-    public int getFractionDigits(Object value) {
-        return -1;
-    }
-
-} // interface TypeValidator
diff --git a/src/org/apache/xerces/impl/dv/xs_new/UnionDV.java b/src/org/apache/xerces/impl/dv/xs_new/UnionDV.java
deleted file mode 100644
index 73c8afa..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/UnionDV.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Represent the schema union types
- *
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class UnionDV extends TypeValidator{
-
-    public short getAllowedFacets(){
-          return (XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION );
-    }
-
-    // this method should never be called: XSSimpleTypeDecl is responsible for
-    // calling the member types for the convertion
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
-        return content;
-    }
-
-} // class UnionDV
diff --git a/src/org/apache/xerces/impl/dv/xs_new/XSSimpleTypeDecl.java b/src/org/apache/xerces/impl/dv/xs_new/XSSimpleTypeDecl.java
deleted file mode 100644
index 0023f1e..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/XSSimpleTypeDecl.java
+++ /dev/null
@@ -1,1660 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.XSAtomicSimpleType;
-import org.apache.xerces.impl.dv.XSListSimpleType;
-import org.apache.xerces.impl.dv.XSUnionSimpleType;
-import org.apache.xerces.impl.dv.XSFacets;
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
-import org.apache.xerces.impl.dv.ValidatedInfo;
-import org.apache.xerces.impl.dv.DatatypeMessageProvider;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.impl.xpath.regex.RegularExpression;
-import java.util.Vector;
-import java.util.StringTokenizer;
-
-/**
- * @author Sandy Gao, IBM
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- *
- * @version $Id$
- */
-class XSSimpleTypeDecl implements XSAtomicSimpleType, XSListSimpleType, XSUnionSimpleType {
-
-    static final short DV_ANYSIMPLETYPE = 0;
-    static final short DV_STRING        = 1;
-    static final short DV_BOOLEAN       = 2;
-    static final short DV_DECIMAL       = 3;
-    static final short DV_FLOAT         = 4;
-    static final short DV_DOUBLE        = 5;
-    static final short DV_DURATION      = 6;
-    static final short DV_DATETIME      = 7;
-    static final short DV_TIME          = 8;
-    static final short DV_DATE          = 9;
-    static final short DV_GYEARMONTH    = 10;
-    static final short DV_GYEAR         = 11;
-    static final short DV_GMONTHDAY     = 12;
-    static final short DV_GDAY          = 13;
-    static final short DV_GMONTH        = 14;
-    static final short DV_HEXBINARY     = 15;
-    static final short DV_BASE64BINARY  = 16;
-    static final short DV_ANYURI        = 17;
-    static final short DV_QNAME         = 18;
-    static final short DV_NOTATION      = 19;
-    static final short DV_ID            = 20;
-    static final short DV_IDREF         = 21;
-    static final short DV_ENTITY        = 22;
-    static final short DV_LIST          = 23;
-    static final short DV_UNION         = 24;
-
-    static final TypeValidator[] fDVs = {
-        new AnySimpleDV(),
-        new StringDV(),
-        new BooleanDV(),
-        new DecimalDV(),
-        new FloatDV(),
-        new DoubleDV(),
-        new DurationDV(),
-        new DateTimeDV(),
-        new TimeDV(),
-        new DateDV(),
-        new YearMonthDV(),
-        new YearDV(),
-        new MonthDayDV(),
-        new DayDV(),
-        new MonthDV(),
-        new HexBinaryDV(),
-        new Base64BinaryDV(),
-        new AnyURIDV(),
-        new QNameDV(),
-        new QNameDV(),   // notation use the same one as qname
-        new IDDV(),
-        new IDREFDV(),
-        new EntityDV(),
-        new ListDV(),
-        new UnionDV()
-    };
-
-    static final short SPECIAL_TOKEN_NONE        = 0;
-    static final short SPECIAL_TOKEN_NMTOKEN     = 1;
-    static final short SPECIAL_TOKEN_NAME        = 2;
-    static final short SPECIAL_TOKEN_NCNAME      = 3;
-
-    static final String[] SPECIAL_TOKEN_STRING   = {
-        "NONE", "NMTOKEN", "Name", "NCName",
-    };
-
-    static final String[] WS_FACET_STRING = {
-        "preserve", "collapse", "replace",
-    };
-
-    private XSSimpleTypeDecl fItemType;
-    private XSSimpleTypeDecl[] fMemberTypes;
-
-    private String fTypeName;
-    private String fTargetNamespace;
-    private short fFinalSet = 0;
-    private XSSimpleTypeDecl fBase;
-    private short fVariety = -1;
-    private short fValidationDV = -1;
-
-    private short fFacetsDefined = 0;
-    private short fFixedFacet = 0;
-
-    //for constraining facets
-    private short fWhiteSpace = 0;
-    private int fLength = -1;
-    private int fMinLength = -1;
-    private int fMaxLength = -1;
-    private int fTotalDigits = -1;
-    private int fFractionDigits = -1;
-    private Vector fPattern;
-    private Vector fEnumeration;
-    private Object fMaxInclusive;
-    private Object fMaxExclusive;
-    private Object fMinExclusive;
-    private Object fMinInclusive;
-
-    private short fTokenType = SPECIAL_TOKEN_NONE;
-
-    // for fundamental facets
-    private short fOrdered;
-    private short fCardinality;
-    private boolean fBounded;
-    private boolean fNumeric;
-
-    private ValidatedInfo fTempInfo = new ValidatedInfo();
-
-    //Create a new built-in primitive types (and id/idref/entity)
-    protected XSSimpleTypeDecl(XSSimpleTypeDecl base, String name, short validateDV,
-                               short ordered, boolean bounded,
-                               short cardinality, boolean numeric) {
-        fBase = base;
-        fTypeName = name;
-        fTargetNamespace = SchemaDVFactoryImpl.URI_SCHEMAFORSCHEMA;
-        fVariety = VARIETY_ATOMIC;
-        fValidationDV = validateDV;
-        fFacetsDefined = FACET_WHITESPACE;
-        if (validateDV == DV_STRING) {
-            fWhiteSpace = WS_PRESERVE;
-        } else {
-            fWhiteSpace = WS_COLLAPSE;
-            fFixedFacet = FACET_WHITESPACE;
-        }
-    }
-
-    //Create a new simple type for restriction.
-    protected XSSimpleTypeDecl(XSSimpleTypeDecl base, String name, String uri, short finalSet) {
-        fBase = base;
-        fTypeName = name;
-        fTargetNamespace = uri;
-        fFinalSet = finalSet;
-
-        fVariety = fBase.fVariety;
-        fValidationDV = fBase.fValidationDV;
-        switch (fVariety) {
-        case VARIETY_ATOMIC:
-            break;
-        case VARIETY_LIST:
-            fItemType = fBase.fItemType;
-            break;
-        case VARIETY_UNION:
-            fMemberTypes = fBase.fMemberTypes;
-            break;
-        }
-
-        // always inherit facets from the base.
-        // in case a type is created, but applyFacets is not called
-        fLength = fBase.fLength;
-        fMinLength = fBase.fMinLength;
-        fMaxLength = fBase.fMaxLength;
-        fPattern = fBase.fPattern;
-        fEnumeration = fBase.fEnumeration;
-        fWhiteSpace = fBase.fWhiteSpace;
-        fMaxExclusive = fBase.fMaxExclusive;
-        fMaxInclusive = fBase.fMaxInclusive;
-        fMinExclusive = fBase.fMinExclusive;
-        fMinInclusive = fBase.fMinInclusive;
-        fTotalDigits = fBase.fTotalDigits;
-        fFractionDigits = fBase.fFractionDigits;
-        fTokenType = fBase.fTokenType;
-        fFixedFacet = fBase.fFixedFacet;
-        fFacetsDefined = fBase.fFacetsDefined;
-
-        //we also set fundamental facets information in case applyFacets is not called.
-        caclFundamentalFacets();
-    }
-
-    //Create a new simple type for list.
-    protected XSSimpleTypeDecl(String name, String uri, short finalSet, XSSimpleTypeDecl itemType) {
-        fBase = fAnySimpleType;
-        fTypeName = name;
-        fTargetNamespace = uri;
-        fFinalSet = finalSet;
-
-        fVariety = VARIETY_LIST;
-        fItemType = (XSSimpleTypeDecl)itemType;
-        fValidationDV = DV_LIST;
-        fFacetsDefined = FACET_WHITESPACE;
-        fFixedFacet = FACET_WHITESPACE;
-        fWhiteSpace = WS_COLLAPSE;
-
-        //setting fundamental facets
-        caclFundamentalFacets();
-    }
-
-    //Create a new simple type for union.
-    protected XSSimpleTypeDecl(String name, String uri, short finalSet, XSSimpleTypeDecl[] memberTypes) {
-        fBase = fAnySimpleType;
-        fTypeName = name;
-        fTargetNamespace = uri;
-        fFinalSet = finalSet;
-
-        fVariety = VARIETY_UNION;
-        fMemberTypes = memberTypes;
-        fValidationDV = DV_UNION;
-        // even for union, we set whitespace to something
-        // this will never be used, but we can use fFacetsDefined to check
-        // whether applyFacets() is allwwed: it's not allowed
-        // if fFacetsDefined != 0
-        fFacetsDefined = FACET_WHITESPACE;
-        fWhiteSpace = WS_COLLAPSE;
-
-        //setting fundamental facets
-        caclFundamentalFacets();
-    }
-
-    public short getXSType () {
-        return XSTypeDecl.SIMPLE_TYPE;
-    }
-
-    public String getTypeName() {
-        return fTypeName;
-    }
-
-    public String getTargetNamespace() {
-        return fTargetNamespace;
-    }
-
-    public short getFinalSet(){
-        return fFinalSet;
-    }
-
-    public XSTypeDecl getBaseType(){
-        return fBase;
-    }
-
-    public boolean isAnonymous() {
-        return fTypeName == null;
-    }
-
-    public short getVariety(){
-        return fVariety;
-    }
-
-    public short getDefinedFacets() {
-        return fFacetsDefined;
-    }
-
-    public boolean isIDType(){
-        return (fValidationDV == DV_ID);
-    }
-
-    public boolean isNOTATIONType(){
-        return (fValidationDV == DV_NOTATION);
-    }
-
-    // REVISIT
-    public XSSimpleType getPrimitiveType() {
-        if (fVariety == VARIETY_ATOMIC)
-            return null;
-        else
-            return null;
-    }
-
-    public XSSimpleType getItemType() {
-        if (fVariety == VARIETY_LIST)
-            return fItemType;
-        else
-            return null;
-    }
-
-    public XSSimpleType[] getMemberTypes() {
-        if (fVariety == VARIETY_UNION)
-            return fMemberTypes;
-        else
-            return null;
-    }
-
-    /**
-     * If <restriction> is chosen
-     */
-    public void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, ValidationContext context)
-        throws InvalidDatatypeFacetException {
-        applyFacets(facets, presentFacet, fixedFacet, (short)0, context);
-    }
-
-    /**
-     * built-in derived types by restriction
-     */
-    void applyFacets1(XSFacets facets, short presentFacet, short fixedFacet) {
-
-        try {
-            applyFacets(facets, presentFacet, fixedFacet, (short)0, null);
-        } catch (InvalidDatatypeFacetException e) {
-            // should never gets here, internel error
-            throw new RuntimeException("internal error");
-        }
-    }
-
-    /**
-     * built-in derived types by restriction
-     */
-    void applyFacets1(XSFacets facets, short presentFacet, short fixedFacet, short tokenType) {
-
-        try {
-            applyFacets(facets, presentFacet, fixedFacet, tokenType, null);
-        } catch (InvalidDatatypeFacetException e) {
-            // should never gets here, internel error
-            throw new RuntimeException("internal error");
-        }
-    }
-
-    /**
-     * If <restriction> is chosen, or built-in derived types by restriction
-     */
-    void applyFacets(XSFacets facets, short presentFacet, short fixedFacet, short tokenType, ValidationContext context)
-        throws InvalidDatatypeFacetException {
-
-        // clear facets. because we always inherit facets in the constructor
-        // REVISIT: in fact, we don't need to clear them.
-        // we can convert 5 string values (4 bounds + 1 enum) to actual values,
-        // store them somewhere, then do facet checking at once, instead of
-        // going through the following steps. (lots of checking are redundant:
-        // for example, ((presentFacet & FACET_XXX) != 0))
-
-        fFacetsDefined = 0;
-        fFixedFacet = 0;
-
-        int result = 0 ;
-
-        // step 1: parse present facets
-        short allowedFacet = fDVs[fValidationDV].getAllowedFacets();
-
-        // length
-        if ((presentFacet & FACET_LENGTH) != 0) {
-            if ((allowedFacet & FACET_LENGTH) == 0) {
-                reportError("non-supported facet");
-            } else {
-                fLength = facets.length;
-                fFacetsDefined |= FACET_LENGTH;
-                if ((fixedFacet & FACET_LENGTH) != 0)
-                    fFixedFacet |= FACET_LENGTH;
-                // check 4.3.1.c0 must: length >= 0
-                if (fLength < 0)
-                    reportError("length value '"+facets.length+"' must be a nonNegativeInteger");
-            }
-        }
-        // minLength
-        if ((presentFacet & FACET_MINLENGTH) != 0) {
-            if ((allowedFacet & FACET_MINLENGTH) == 0) {
-                reportError("non-supported facet");
-            } else {
-                fMinLength = facets.minLength;
-                fFacetsDefined |= FACET_MINLENGTH;
-                if ((fixedFacet & FACET_MINLENGTH) != 0)
-                    fFixedFacet |= FACET_MINLENGTH;
-                // check 4.3.2.c0 must: minLength >= 0
-                if (fMinLength < 0)
-                    reportError("minLength value '"+facets.minLength+"' must be a nonNegativeInteger");
-            }
-        }
-        // maxLength
-        if ((presentFacet & FACET_MAXLENGTH) != 0) {
-            if ((allowedFacet & FACET_MAXLENGTH) == 0) {
-                reportError("non-supported facet");
-            } else {
-                fMaxLength = facets.maxLength;
-                fFacetsDefined |= FACET_MAXLENGTH;
-                if ((fixedFacet & FACET_MAXLENGTH) != 0)
-                    fFixedFacet |= FACET_MAXLENGTH;
-                // check 4.3.3.c0 must: maxLength >= 0
-                if (fMaxLength < 0)
-                    reportError("maxLength value '"+facets.maxLength+"' must be a nonNegativeInteger");
-            }
-        }
-        // pattern
-        if ((presentFacet & FACET_PATTERN) != 0) {
-            if ((allowedFacet & FACET_PATTERN) == 0) {
-                reportError("non-supported facet");
-            } else {
-                RegularExpression regex = null;
-                try {
-                    regex = new RegularExpression(facets.pattern, "X");
-                } catch (Exception e) {
-                    reportError("pattern value '"+facets.pattern+"' is not valid: " + e.getLocalizedMessage());
-                }
-                if (regex != null) {
-                    fPattern = new Vector();
-                    fPattern.addElement(regex);
-                    fFacetsDefined |= FACET_PATTERN;
-                    if ((fixedFacet & FACET_PATTERN) != 0)
-                        fFixedFacet |= FACET_PATTERN;
-                }
-            }
-        }
-
-        // enumeration
-        if ((presentFacet & FACET_ENUMERATION) != 0) {
-            if ((allowedFacet & FACET_ENUMERATION) == 0) {
-                reportError("non-supported facet");
-            } else {
-                fEnumeration = new Vector();
-                Vector enumVals = facets.enumeration;
-                for (int i = 0; i < enumVals.size(); i++) {
-                    try {
-                        // check 4.3.5.c0 must: enumeration values from the value space of base
-                        fEnumeration.addElement(this.fBase.validate((String)enumVals.elementAt(i), context, fTempInfo));
-                    } catch (InvalidDatatypeValueException ide) {
-                        reportError("Value of enumeration '" + enumVals.elementAt(i) + "' must be from the value space of base");
-                    }
-                }
-                fFacetsDefined |= FACET_ENUMERATION;
-                if ((fixedFacet & FACET_ENUMERATION) != 0)
-                    fFixedFacet |= FACET_ENUMERATION;
-            }
-        }
-        // whiteSpace
-        if ((presentFacet & FACET_WHITESPACE) != 0) {
-            if ((allowedFacet & FACET_WHITESPACE) == 0) {
-                reportError("non-supported facet");
-            } else {
-                fWhiteSpace = facets.whiteSpace;
-                fFacetsDefined |= FACET_WHITESPACE;
-                if ((fixedFacet & FACET_WHITESPACE) != 0)
-                    fFixedFacet |= FACET_WHITESPACE;
-            }
-        }
-        // maxInclusive
-        if ((presentFacet & FACET_MAXINCLUSIVE) != 0) {
-            if ((allowedFacet & FACET_MAXINCLUSIVE) == 0) {
-                reportError("non-supported facet");
-            } else {
-                try {
-                    fMaxInclusive = getActualValue(facets.maxInclusive, context, fTempInfo);
-                    fFacetsDefined |= FACET_MAXINCLUSIVE;
-                    if ((fixedFacet & FACET_MAXINCLUSIVE) != 0)
-                        fFixedFacet |= FACET_MAXINCLUSIVE;
-                } catch (InvalidDatatypeValueException ide) {
-                    reportError("maxInclusive value '"+facets.maxInclusive+"' is invalid");
-                }
-            }
-        }
-        // maxExclusive
-        if ((presentFacet & FACET_MAXEXCLUSIVE) != 0) {
-            if ((allowedFacet & FACET_MAXEXCLUSIVE) == 0) {
-                reportError("non-supported facet");
-            } else {
-                try {
-                    fMaxExclusive = getActualValue(facets.maxExclusive, context, fTempInfo);
-                    fFacetsDefined |= FACET_MAXEXCLUSIVE;
-                    if ((fixedFacet & FACET_MAXEXCLUSIVE) != 0)
-                        fFixedFacet |= FACET_MAXEXCLUSIVE;
-                } catch (InvalidDatatypeValueException ide) {
-                    reportError("maxExclusive value '"+facets.maxExclusive+"' is invalid");
-                }
-            }
-        }
-        // minExclusive
-        if ((presentFacet & FACET_MINEXCLUSIVE) != 0) {
-            if ((allowedFacet & FACET_MINEXCLUSIVE) == 0) {
-                reportError("non-supported facet");
-            } else {
-                try {
-                    fMinExclusive = getActualValue(facets.minExclusive, context, fTempInfo);
-                    fFacetsDefined |= FACET_MINEXCLUSIVE;
-                    if ((fixedFacet & FACET_MINEXCLUSIVE) != 0)
-                        fFixedFacet |= FACET_MINEXCLUSIVE;
-                } catch (InvalidDatatypeValueException ide) {
-                    reportError("minExclusive value '"+facets.minExclusive+"' is invalid");
-                }
-            }
-        }
-        // minInclusive
-        if ((presentFacet & FACET_MININCLUSIVE) != 0) {
-            if ((allowedFacet & FACET_MININCLUSIVE) == 0) {
-                reportError("non-supported facet");
-            } else {
-                try {
-                    fMinInclusive = getActualValue(facets.minInclusive, context, fTempInfo);
-                    fFacetsDefined |= FACET_MININCLUSIVE;
-                    if ((fixedFacet & FACET_MININCLUSIVE) != 0)
-                        fFixedFacet |= FACET_MININCLUSIVE;
-                } catch (InvalidDatatypeValueException ide) {
-                    reportError("minInclusive value '"+facets.minInclusive+"' is invalid");
-                }
-            }
-        }
-        // totalDigits
-        if ((presentFacet & FACET_TOTALDIGITS) != 0) {
-            if ((allowedFacet & FACET_TOTALDIGITS) == 0) {
-                reportError("non-supported facet");
-            } else {
-                fTotalDigits = facets.totalDigits;
-                fFacetsDefined |= FACET_TOTALDIGITS;
-                if ((fixedFacet & FACET_TOTALDIGITS) != 0)
-                    fFixedFacet |= FACET_TOTALDIGITS;
-                // check 4.3.11.c0 must: totalDigits > 0
-                if (fTotalDigits <= 0)
-                    reportError("totalDigits value '"+facets.totalDigits+"' must be a positiveInteger");
-            }
-        }
-        // fractionDigits
-        if ((presentFacet & FACET_FRACTIONDIGITS) != 0) {
-            if ((allowedFacet & FACET_FRACTIONDIGITS) == 0) {
-                reportError("non-supported facet");
-            } else {
-                fFractionDigits = facets.fractionDigits;
-                fFacetsDefined |= FACET_FRACTIONDIGITS;
-                if ((fixedFacet & FACET_FRACTIONDIGITS) != 0)
-                    fFixedFacet |= FACET_FRACTIONDIGITS;
-                // check 4.3.12.c0 must: fractionDigits >= 0
-                if (fFractionDigits < 0)
-                    reportError("fractionDigits value '"+facets.fractionDigits+"' must be a positiveInteger");
-            }
-        }
-
-        // token type: internal use, so do less checking
-        if (tokenType != SPECIAL_TOKEN_NONE) {
-            fTokenType = tokenType;
-        }
-
-        // step 2: check facets against each other: length, bounds
-        if(fFacetsDefined != 0) {
-
-            // check 4.3.1.c1 error: length & (maxLength | minLength)
-            if((fFacetsDefined & FACET_LENGTH) != 0 ){
-              if( (fFacetsDefined & FACET_MINLENGTH) != 0 ){
-                reportError("it is an error for both length and min length to be present" );
-              }
-              else if((fFacetsDefined & FACET_MAXLENGTH) != 0 ){
-                reportError("it is an error for both length and max length to be present" );
-              }
-            }
-
-            // check 4.3.2.c1 must: minLength <= maxLength
-            if(((fFacetsDefined & FACET_MINLENGTH ) != 0 ) && ((fFacetsDefined & FACET_MAXLENGTH) != 0))
-            {
-              if(fMinLength > fMaxLength)
-                reportError("value of minLength = " + fMinLength + "must  be less than value of maxLength = "+ fMaxLength);
-            }
-
-            // check 4.3.8.c1 error: maxInclusive + maxExclusive
-            if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-                reportError( "It is an error for both maxInclusive and maxExclusive to be specified for the same datatype" );
-            }
-
-            // check 4.3.9.c1 error: minInclusive + minExclusive
-            if (((fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-                reportError("It is an error for both minInclusive and minExclusive to be specified for the same datatype" );
-            }
-
-            // check 4.3.7.c1 must: minInclusive <= maxInclusive
-            if (((fFacetsDefined &  FACET_MAXINCLUSIVE) != 0) && ((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-              result = fDVs[fValidationDV].compare(fMinInclusive, fMaxInclusive);
-              if (result != -1 && result != 0)
-                reportError("minInclusive value ='" + getStringValue(fMinInclusive) + "'must be <= maxInclusive value ='" +
-                    getStringValue(fMaxInclusive) + "'. " );
-            }
-
-            // check 4.3.8.c2 must: minExclusive <= maxExclusive ??? minExclusive < maxExclusive
-            if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
-              result = fDVs[fValidationDV].compare(fMinExclusive, fMaxExclusive);
-              if (result != -1 && result != 0)
-                reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be <= maxExclusive value ='" +
-                                                        getStringValue(fMaxExclusive) + "'. " );
-            }
-
-            // check 4.3.9.c2 must: minExclusive < maxInclusive
-            if (((fFacetsDefined & FACET_MAXINCLUSIVE) != 0) && ((fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
-              if (fDVs[fValidationDV].compare(fMinExclusive, fMaxInclusive) != -1)
-                reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be < maxInclusive value ='" +
-                                                                     getStringValue(fMaxInclusive) + "'. " );
-            }
-
-            // check 4.3.10.c1 must: minInclusive < maxExclusive
-            if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-              if (fDVs[fValidationDV].compare(fMinInclusive, fMaxExclusive) != -1)
-                reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be < maxExclusive value ='" +
-                                                                     getStringValue(fMaxExclusive) + "'. " );
-            }
-
-            // check 4.3.12.c1 must: fractionDigits <= totalDigits
-            if (((fFacetsDefined & FACET_FRACTIONDIGITS) != 0) &&
-                ((fFacetsDefined & FACET_TOTALDIGITS) != 0)) {
-                if (fFractionDigits > fTotalDigits)
-                    reportError( "fractionDigits value ='" + this.fFractionDigits + "' must be <= totalDigits value ='" +
-                                                             this.fTotalDigits + "'. " );
-            }
-
-            // step 3: check facets against base
-            // check 4.3.1.c1 error: length & (fBase.maxLength | fBase.minLength)
-            if ( ((fFacetsDefined & FACET_LENGTH ) != 0 ) ) {
-
-                if ( ((fBase.fFacetsDefined & FACET_MAXLENGTH ) != 0 ) ) {
-                    reportError("It is an error for both length and maxLength to be members of facets" );
-                }
-                else if ( ((fBase.fFacetsDefined & FACET_MINLENGTH ) != 0 ) ) {
-                    reportError("It is an error for both length and minLength to be members of facets" );
-                }
-                else if ( (fBase.fFacetsDefined & FACET_LENGTH) != 0 ) {
-                    // check 4.3.1.c2 error: length != fBase.length
-                    if ( fLength != fBase.fLength )
-                        reportError( "Value of length = '" + fLength +
-                                                                 "' must be = the value of fBase.length = '" + fBase.fLength + "'");
-                }
-            }
-
-            // check 4.3.1.c1 error: fBase.length & (maxLength | minLength)
-            if ( ((fBase.fFacetsDefined & FACET_LENGTH ) != 0 ) ) {
-                if ( ((fFacetsDefined & FACET_MAXLENGTH ) != 0 ) ) {
-                    reportError("It is an error for both length and maxLength to be members of facets" );
-                }
-                else if ( ((fFacetsDefined & FACET_MINLENGTH ) != 0 ) ) {
-                    reportError("It is an error for both length and minLength to be members of facets" );
-                }
-            }
-
-            // check 4.3.2.c1 must: minLength <= fBase.maxLength
-            if ( ((fFacetsDefined & FACET_MINLENGTH ) != 0 ) ) {
-                if ( (fBase.fFacetsDefined & FACET_MAXLENGTH ) != 0 ) {
-                    if ( fMinLength > fBase.fMaxLength ) {
-                        reportError( "Value of minLength = '" + fMinLength +
-                                                                 "' must be <= the value of maxLength = '" + fMaxLength + "'");
-                    }
-                }
-                else if ( (fBase.fFacetsDefined & FACET_MINLENGTH) != 0 ) {
-                    if ( (fBase.fFixedFacet & FACET_MINLENGTH) != 0 && fMinLength != fBase.fMinLength ) {
-                        reportError( "minLength value = '" + fMinLength +
-                                                                 "' must be equal to fBase.minLength value = '" +
-                                                                 fBase.fMinLength + "' with attribute {fixed} = true" );
-                    }
-
-                    // check 4.3.2.c2 error: minLength < fBase.minLength
-                    if ( fMinLength < fBase.fMinLength ) {
-                        reportError( "Value of minLength = '" + fMinLength +
-                                                                 "' must be >= the value of fBase.minLength = '" + fBase.fMinLength + "'");
-                    }
-                }
-            }
-
-
-            // check 4.3.2.c1 must: maxLength < fBase.minLength
-            if ( ((fFacetsDefined & FACET_MAXLENGTH ) != 0 ) && ((fBase.fFacetsDefined & FACET_MINLENGTH ) != 0 ))
-            {
-                if ( fMaxLength < fBase.fMinLength) {
-                    reportError( "Value of maxLength = '" + fMaxLength +
-                                                             "' must be >= the value of fBase.minLength = '" + fBase.fMinLength + "'");
-                }
-            }
-
-            // check 4.3.3.c1 error: maxLength > fBase.maxLength
-            if ( (fFacetsDefined & FACET_MAXLENGTH) != 0 ) {
-                if ( (fBase.fFacetsDefined & FACET_MAXLENGTH) != 0 ){
-                    if(( (fBase.fFixedFacet & FACET_MAXLENGTH) != 0 )&& fMaxLength != fBase.fMaxLength ) {
-                        reportError( "maxLength value = '" + fMaxLength +
-                                                             "' must be equal to fBase.maxLength value = '" +
-                                                             fBase.fMaxLength + "' with attribute {fixed} = true" );
-                    }
-                    if ( fMaxLength > fBase.fMaxLength ) {
-                        reportError( "Value of maxLength = '" + fMaxLength +
-                                                                 "' must be <= the value of fBase.maxLength = '" + fBase.fMaxLength + "'");
-                    }
-                }
-            }
-
-
-            // check 4.3.7.c2 error:
-            // maxInclusive > fBase.maxInclusive
-            // maxInclusive >= fBase.maxExclusive
-            // maxInclusive < fBase.minInclusive
-            // maxInclusive <= fBase.minExclusive
-
-            if (((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-                if (((fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-                    result = fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMaxInclusive);
-
-                    if ((fBase.fFixedFacet & FACET_MAXINCLUSIVE) != 0 && result != 0) {
-                            reportError( "maxInclusive value = '" + getStringValue(fMaxInclusive) +
-                                                                 "' must be equal to fBase.maxInclusive value = '" +
-                                                                 getStringValue(fBase.fMaxInclusive) + "' with attribute {fixed} = true" );
-                    }
-                    if (result != -1 && result != 0) {
-                        reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be <= fBase.maxInclusive value ='" +
-                                                                 getStringValue(fBase.fMaxInclusive) + "'" );
-                    }
-                }
-                if (((fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) &&
-                    fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMaxExclusive) != -1){
-                        reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be < fBase.maxExclusive value ='" +
-                                                           getStringValue(fBase.fMaxExclusive) + "'" );
-                }
-
-                if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-                    result = fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMinInclusive);
-                    if (result != 1 && result != 0) {
-                        reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be >= fBase.minInclusive value ='" +
-                                                                 getStringValue(fBase.fMinInclusive) + "'" );
-                    }
-                }
-
-                if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) &&
-                    fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMinExclusive ) != 1)
-                    reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be > fBase.minExclusive value ='" +
-                                                           getStringValue(fBase.fMinExclusive) + "'" );
-            }
-
-            // check 4.3.8.c3 error:
-            // maxExclusive > fBase.maxExclusive
-            // maxExclusive > fBase.maxInclusive
-            // maxExclusive <= fBase.minInclusive
-            // maxExclusive <= fBase.minExclusive
-            if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0)) {
-                if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0)) {
-                    result= fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMaxExclusive);
-
-                    if ((fBase.fFixedFacet & FACET_MAXEXCLUSIVE) != 0 &&  result != 0) {
-                        reportError( "maxExclusive value = '" + getStringValue(fMaxExclusive) +
-                                                                 "' must be equal to fBase.maxExclusive value = '" +
-                                                                 getStringValue(fBase.fMaxExclusive) + "' with attribute {fixed} = true" );
-                    }
-                    if (result != -1 && result != 0) {
-                        reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be < fBase.maxExclusive value ='" +
-                                                                 getStringValue(fBase.fMaxExclusive) + "'" );
-                    }
-                }
-
-                if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-                    result= fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMaxInclusive);
-                    if (result != -1 && result != 0) {
-                        reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be <= fBase.maxInclusive value ='" +
-                                                                 getStringValue(fBase.fMaxInclusive) + "'" );
-                    }
-                }
-
-                if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) &&
-                    fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMinExclusive ) != 1)
-                    reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be > fBase.minExclusive value ='" +
-                                                             getStringValue(fBase.fMinExclusive) + "'" );
-
-                if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0) &&
-                    fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMinInclusive) != 1)
-                    reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be > fBase.minInclusive value ='" +
-                                                             getStringValue(fBase.fMinInclusive) + "'" );
-            }
-
-            // check 4.3.9.c3 error:
-            // minExclusive < fBase.minExclusive
-            // maxInclusive > fBase.maxInclusive
-            // minInclusive < fBase.minInclusive
-            // maxExclusive >= fBase.maxExclusive
-            if (((fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
-                if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
-
-                    result= fDVs[fValidationDV].compare(fMinExclusive, fBase.fMinExclusive);
-                    if ((fBase.fFixedFacet & FACET_MINEXCLUSIVE) != 0 &&
-                        result != 0) {
-                        reportError( "minExclusive value = '" + getStringValue(fMinExclusive) +
-                                                                 "' must be equal to fBase.minExclusive value = '" +
-                                                                 getStringValue(fBase.fMinExclusive) + "' with attribute {fixed} = true" );
-                    }
-                    if (result != 1 && result != 0) {
-                        reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be >= fBase.minExclusive value ='" +
-                                                                 getStringValue(fBase.fMinExclusive) + "'" );
-                    }
-                }
-
-                if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-                    result=fDVs[fValidationDV].compare(fMinExclusive, fBase.fMaxInclusive);
-
-                    if (result != -1 && result != 0) {
-                        reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be <= fBase.maxInclusive value ='" +
-                                                               getStringValue(fBase.fMaxInclusive) + "'" );
-                    }
-                }
-
-                if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-                    result = fDVs[fValidationDV].compare(fMinExclusive, fBase.fMinInclusive);
-
-                    if (result != 1 && result != 0) {
-                        reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be >= fBase.minInclusive value ='" +
-                                                               getStringValue(fBase.fMinInclusive) + "'" );
-                    }
-                }
-
-                if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) &&
-                    fDVs[fValidationDV].compare(fMinExclusive, fBase.fMaxExclusive) != -1)
-                    reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be < fBase.maxExclusive value ='" +
-                                                             getStringValue(fBase.fMaxExclusive) + "'" );
-            }
-
-            // check 4.3.10.c2 error:
-            // minInclusive < fBase.minInclusive
-            // minInclusive > fBase.maxInclusive
-            // minInclusive <= fBase.minExclusive
-            // minInclusive >= fBase.maxExclusive
-            if (((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-                if (((fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-                    result = fDVs[fValidationDV].compare(fMinInclusive, fBase.fMinInclusive);
-
-                    if ((fBase.fFixedFacet & FACET_MININCLUSIVE) != 0 && result != 0) {
-                        reportError( "minInclusive value = '" + getStringValue(fMinInclusive) +
-                                                                 "' must be equal to fBase.minInclusive value = '" +
-                                                                 getStringValue(fBase.fMinInclusive) + "' with attribute {fixed} = true" );
-                    }
-                    if (result != 1 && result != 0) {
-                        reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be >= fBase.minInclusive value ='" +
-                                                                 getStringValue(fBase.fMinInclusive) + "'" );
-                    }
-                }
-                if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-                    result=fDVs[fValidationDV].compare(fMinInclusive, fBase.fMaxInclusive);
-                    if (result != -1 && result != 0) {
-                        reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be <= fBase.maxInclusive value ='" +
-                                                                 getStringValue(fBase.fMaxInclusive) + "'" );
-                    }
-                }
-                if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) &&
-                    fDVs[fValidationDV].compare(fMinInclusive, fBase.fMinExclusive ) != 1)
-                    reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be > fBase.minExclusive value ='" +
-                                                             getStringValue(fBase.fMinExclusive) + "'" );
-                if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) &&
-                    fDVs[fValidationDV].compare(fMinInclusive, fBase.fMaxExclusive) != -1)
-                    reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be < fBase.maxExclusive value ='" +
-                                                             getStringValue(fBase.fMaxExclusive) + "'" );
-            }
-
-            // check 4.3.11.c1 error: totalDigits > fBase.totalDigits
-            if (((fFacetsDefined & FACET_TOTALDIGITS) != 0)) {
-                if ((( fBase.fFacetsDefined & FACET_TOTALDIGITS) != 0)) {
-                    if (fTotalDigits > fBase.fTotalDigits) {
-                        reportError("totalDigits value = '" + fTotalDigits +
-                                                                "' must be equal to fBase.totalDigits value = '" +
-                                                                fBase.fTotalDigits +
-                                                                "' with attribute {fixed} = true" );
-                    }
-                    if (fTotalDigits > fBase.fTotalDigits) {
-                        reportError( "totalDigits value ='" + fTotalDigits + "' must be <= fBase.totalDigits value ='" +
-                                                                 fBase.fTotalDigits + "'" );
-                    }
-                }
-            }
-
-            // check fixed value for fractionDigits
-            if (((fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) {
-                if ((( fBase.fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) {
-                    if ((fBase.fFixedFacet & FACET_FRACTIONDIGITS) != 0 && fFractionDigits != fBase.fFractionDigits) {
-                        reportError("fractionDigits value = '" + fFractionDigits +
-                                                                "' must be equal to fBase.fractionDigits value = '" +
-                                                                fBase.fFractionDigits +
-                                                                "' with attribute {fixed} = true" );
-                    }
-                }
-            }
-
-            // check 4.3.6.c1 error:
-            // (whiteSpace = preserve || whiteSpace = replace) && fBase.whiteSpace = collapese or
-            // whiteSpace = preserve && fBase.whiteSpace = replace
-
-            if ( (fFacetsDefined & FACET_WHITESPACE) != 0 && (fBase.fFacetsDefined & FACET_WHITESPACE) != 0 ){
-                if ( (fBase.fFixedFacet & FACET_WHITESPACE) != 0 &&  fWhiteSpace != fBase.fWhiteSpace ) {
-                    reportError( "whiteSpace value = '" + whiteSpaceValue(fWhiteSpace) +
-                                 "' must be equal to fBase.whiteSpace value = '" +
-                                 whiteSpaceValue(fBase.fWhiteSpace) + "' with attribute {fixed} = true" );
-                }
-
-                if ( (fWhiteSpace == WS_PRESERVE || fWhiteSpace == WS_REPLACE) &&  fBase.fWhiteSpace == WS_COLLAPSE ){
-                    reportError( "It is an error if whiteSpace = 'preserve' or 'replace' and fBase.whiteSpace = 'collapse'");
-                }
-                if ( fWhiteSpace == WS_PRESERVE &&  fBase.fWhiteSpace == WS_REPLACE ){
-                    reportError( "It is an error if whiteSpace = 'preserve' and fBase.whiteSpace = 'replace'");
-                }
-            }
-        }//fFacetsDefined != null
-
-        // step 4: inherit other facets from base (including fTokeyType)
-
-        // inherit length
-        if ( (fFacetsDefined & FACET_LENGTH) == 0  && (fBase.fFacetsDefined & FACET_LENGTH) != 0 ) {
-            fFacetsDefined |= FACET_LENGTH;
-            fLength = fBase.fLength;
-        }
-        // inherit minLength
-        if ( (fFacetsDefined & FACET_MINLENGTH) == 0 && (fBase.fFacetsDefined & FACET_MINLENGTH) != 0 ) {
-            fFacetsDefined |= FACET_MINLENGTH;
-            fMinLength = fBase.fMinLength;
-        }
-        // inherit maxLength
-        if ((fFacetsDefined & FACET_MAXLENGTH) == 0 &&  (fBase.fFacetsDefined & FACET_MAXLENGTH) != 0 ) {
-            fFacetsDefined |= FACET_MAXLENGTH;
-            fMaxLength = fBase.fMaxLength;
-        }
-        // inherit pattern //???
-        if ( (fBase.fFacetsDefined & FACET_PATTERN) != 0 ) {
-            if ((fFacetsDefined & FACET_PATTERN) == 0) {
-                fPattern = new Vector();
-                fFacetsDefined |= FACET_PATTERN;
-            }
-            for (int i = fBase.fPattern.size()-1; i >= 0; i--)
-                fPattern.addElement(fBase.fPattern.elementAt(i));
-
-        }
-        // inherit whiteSpace
-        if ( (fFacetsDefined & FACET_WHITESPACE) == 0 &&  (fBase.fFacetsDefined & FACET_WHITESPACE) != 0 ) {
-            fFacetsDefined |= FACET_WHITESPACE;
-            fWhiteSpace = fBase.fWhiteSpace;
-        }
-        // inherit enumeration
-        if ((fFacetsDefined & FACET_ENUMERATION) == 0 && (fBase.fFacetsDefined & FACET_ENUMERATION) != 0) {
-            fFacetsDefined |= FACET_ENUMERATION;
-            fEnumeration = fBase.fEnumeration;
-        }
-        // inherit maxExclusive
-        if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) &&
-            !((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-            fFacetsDefined |= FACET_MAXEXCLUSIVE;
-            fMaxExclusive = fBase.fMaxExclusive;
-        }
-        // inherit maxInclusive
-        if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0) &&
-            !((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
-            fFacetsDefined |= FACET_MAXINCLUSIVE;
-            fMaxInclusive = fBase.fMaxInclusive;
-        }
-        // inherit minExclusive
-        if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) &&
-            !((fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-            fFacetsDefined |= FACET_MINEXCLUSIVE;
-            fMinExclusive = fBase.fMinExclusive;
-        }
-        // inherit minExclusive
-        if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0) &&
-            !((fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && !((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
-            fFacetsDefined |= FACET_MININCLUSIVE;
-            fMinInclusive = fBase.fMinInclusive;
-        }
-        // inherit totalDigits
-        if ((( fBase.fFacetsDefined & FACET_TOTALDIGITS) != 0) &&
-            !((fFacetsDefined & FACET_TOTALDIGITS) != 0)) {
-            fFacetsDefined |= FACET_TOTALDIGITS;
-            fTotalDigits = fBase.fTotalDigits;
-        }
-        // inherit fractionDigits
-        if ((( fBase.fFacetsDefined & FACET_FRACTIONDIGITS) != 0)
-            && !((fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) {
-            fFacetsDefined |= FACET_FRACTIONDIGITS;
-            fFractionDigits = fBase.fFractionDigits;
-        }
-        //inherit tokeytype
-        if ((fTokenType == SPECIAL_TOKEN_NONE ) && (fBase.fTokenType != SPECIAL_TOKEN_NONE)) {
-            fTokenType = fBase.fTokenType ;
-        }
-
-        // step 5: mark fixed values
-        fFixedFacet |= fBase.fFixedFacet;
-
-        //step 6: setting fundamental facets
-        caclFundamentalFacets();
-
-    } //applyFacets()
-
-    /**
-     * validate a value, and return the compiled form
-     */
-    public Object validate(String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException {
-
-        // first normalize string value, and convert it to actual value
-        Object ob = getActualValue(content, context, fTempInfo);
-
-        validate(context, fTempInfo);
-
-        if (validatedInfo != null) {
-            validatedInfo.actualValue = fTempInfo.actualValue;
-            validatedInfo.normalizedValue = fTempInfo.normalizedValue;
-            validatedInfo.memberType = fTempInfo.memberType;
-            validatedInfo.memberTypes = fTempInfo.memberTypes;
-        }
-
-        return ob;
-
-    }
-
-    /**
-     * validate an actual value against this DV
-     *
-     * @param value         the actual value that needs to be validated
-     * @param context       the validation context
-     * @param validatedInfo used to provide the actual value and member types
-     */
-    public void validate(ValidationContext context, ValidatedInfo validatedInfo)
-        throws InvalidDatatypeValueException {
-
-        // then validate the actual value against the facets
-        if (context.needFacetChecking() &&
-            (fFacetsDefined != 0 && fFacetsDefined != FACET_WHITESPACE)) {
-            checkFacets(validatedInfo);
-        }
-
-        // now check extra rules: for ID/IDREF/ENTITY
-        if (context.needExtraChecking()) {
-            checkExtraRules(context, validatedInfo);
-        }
-
-    }
-
-    private void checkFacets(ValidatedInfo validatedInfo) throws InvalidDatatypeValueException {
-
-        Object ob = validatedInfo.actualValue;
-        String content = validatedInfo.normalizedValue;
-
-        int length = fDVs[fValidationDV].getDataLength(ob);
-
-        // maxLength
-        if ( (fFacetsDefined & FACET_MAXLENGTH) != 0 ) {
-            if ( length > fMaxLength ) {
-                throw new InvalidDatatypeValueException("Value '"+content+
-                                                        "' with length '"+length+
-                                                        "' exceeds maximum length facet of '"+fMaxLength+"'");
-            }
-        }
-
-        //minLength
-        if ( (fFacetsDefined & FACET_MINLENGTH) != 0 ) {
-            if ( length < fMinLength ) {
-                throw new InvalidDatatypeValueException("Value '"+content+
-                                                        "' with length '"+length+
-                                                        "' is less than minimum length facet of '"+fMinLength+"'" );
-            }
-        }
-
-        //length
-        if ( (fFacetsDefined & FACET_LENGTH) != 0 ) {
-            if ( length != fLength ) {
-                throw new InvalidDatatypeValueException("Value '"+content+
-                                                        "' with length '"+length+
-                                                        "' is not equal to length facet '"+fLength+"'");
-            }
-        }
-
-        //enumeration
-        if ( ((fFacetsDefined & FACET_ENUMERATION) != 0 ) ) {
-            boolean present = false;
-            for (int i = 0; i < fEnumeration.size(); i++) {
-                if (isEqual(ob, fEnumeration.elementAt(i))) {
-                    present = true;
-                    break;
-                }
-            }
-            if(!present){
-                throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_ENUM_VALUE],
-                                                        new Object [] {content});
-            }
-        }
-
-        //fractionDigits
-        if ((fFacetsDefined & FACET_FRACTIONDIGITS) != 0) {
-            int scale = fDVs[fValidationDV].getFractionDigits(ob);
-            if (scale > fFractionDigits) {
-                throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.FRACTION_EXCEEDED],
-                                           new Object[] {
-                                               "'" + content + "'" + " with fractionDigits = '"+ scale +"'",
-                                               "'" + fFractionDigits + "'"
-                                           });
-            }
-        }
-
-        //totalDigits
-        if ((fFacetsDefined & FACET_TOTALDIGITS)!=0) {
-            int totalDigits = fDVs[fValidationDV].getTotalDigits(ob);
-            if (totalDigits > fTotalDigits) {
-                throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.TOTALDIGITS_EXCEEDED],
-                                           new Object[] {
-                                               "'" + content + "'" + " with totalDigits = '"+ totalDigits +"'",
-                                               "'" + fTotalDigits + "'"
-                                           });
-            }
-        }
-
-
-        // REVISIT this part for error reporting
-
-        boolean minOk = true;
-        boolean maxOk = true;
-        String  upperBound="";
-
-        String  lowerBound="";
-        String  lowerBoundIndicator = "";
-        String  upperBoundIndicator = "";
-        int compare;
-
-        //maxinclusive
-        if ( (fFacetsDefined & FACET_MAXINCLUSIVE) != 0 ) {
-            compare = fDVs[fValidationDV].compare(ob, fMaxInclusive);
-            maxOk = (compare == -1 || compare == 0);
-            upperBound   = fMaxInclusive.toString();
-            if ( upperBound != null ) {
-                upperBoundIndicator = "<=";
-            }
-            else {
-                upperBound="";
-            }
-        }
-
-        //maxExclusive
-        if ( (fFacetsDefined & FACET_MAXEXCLUSIVE) != 0 ) {
-            compare = fDVs[fValidationDV].compare(ob,  fMaxExclusive );
-            maxOk = (compare == -1);
-            upperBound = fMaxExclusive.toString();
-            if ( upperBound != null ) {
-                upperBoundIndicator = "<";
-            }
-            else {
-                upperBound = "";
-            }
-        }
-
-        //minInclusive
-        if ( (fFacetsDefined & FACET_MININCLUSIVE) != 0 ) {
-            compare = fDVs[fValidationDV].compare(ob, fMinInclusive);
-            minOk = (compare == 1 || compare == 0);
-            lowerBound = fMinInclusive.toString();
-            if ( lowerBound != null ) {
-                lowerBoundIndicator = "<=";
-            }
-            else {
-                lowerBound = "";
-            }
-        }
-
-        //minExclusive
-        if ( (fFacetsDefined & FACET_MINEXCLUSIVE) != 0 ) {
-            compare = fDVs[fValidationDV].compare(ob, fMinExclusive);
-            minOk = (compare == 1);
-            lowerBound = fMinExclusive.toString();
-            if ( lowerBound != null ) {
-                lowerBoundIndicator = "<";
-            }
-            else {
-                lowerBound = "";
-            }
-        }
-
-        if ( !(minOk && maxOk) ){
-            throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.OUT_OF_BOUNDS],
-                new Object [] { ob.toString(), lowerBound, upperBound, lowerBoundIndicator, upperBoundIndicator});
-        }
-
-    }
-
-    private void checkExtraRules(ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException {
-
-        Object ob = validatedInfo.actualValue;
-
-        if (fVariety == VARIETY_ATOMIC) {
-
-            fDVs[fValidationDV].checkExtraRules(ob, context);
-
-        } else if (fVariety == VARIETY_LIST) {
-
-            Object[] values = (Object[])ob;
-            if (fItemType.fVariety == VARIETY_UNION) {
-                XSSimpleTypeDecl[] memberTypes = (XSSimpleTypeDecl[])validatedInfo.memberTypes;
-                XSSimpleType memberType = validatedInfo.memberType;
-                for (int i = values.length-1; i >= 0; i--) {
-                    validatedInfo.actualValue = values[i];
-                    validatedInfo.memberType = memberTypes[i];
-                    fItemType.checkExtraRules(context, validatedInfo);
-                }
-                validatedInfo.memberType = memberType;
-            } else { // (fVariety == VARIETY_ATOMIC)
-                for (int i = values.length-1; i >= 0; i--) {
-                    validatedInfo.actualValue = values[i];
-                    fItemType.checkExtraRules(context, validatedInfo);
-                }
-            }
-            validatedInfo.actualValue = values;
-
-        } else { // (fVariety == VARIETY_UNION)
-
-            ((XSSimpleTypeDecl)validatedInfo.memberType).checkExtraRules(context, validatedInfo);
-
-        }
-
-    }// checkExtraRules()
-
-    //we can still return object for internal use.
-    private Object getActualValue(String content, ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException{
-
-        if (fVariety == VARIETY_ATOMIC) {
-
-            String nvalue = normalize(content, fWhiteSpace);
-
-            // validate special kinds of token, in place of old pattern matching
-            if (fTokenType != SPECIAL_TOKEN_NONE) {
-
-                boolean seenErr = false;
-                if (fTokenType == SPECIAL_TOKEN_NMTOKEN) {
-                    // PATTERN "\\c+"
-                    seenErr = !XMLChar.isValidNmtoken(nvalue);
-                }
-                else if (fTokenType == SPECIAL_TOKEN_NAME) {
-                    // PATTERN "\\i\\c*"
-                    seenErr = !XMLChar.isValidName(nvalue);
-                }
-                else if (fTokenType == SPECIAL_TOKEN_NCNAME) {
-                    // PATTERN "[\\i-[:]][\\c-[:]]*"
-                    // REVISIT: !!!NOT IMPLEMENTED in XMLChar
-                    seenErr = !XMLChar.isValidNCName(nvalue);
-                }
-                if (seenErr) {
-                    throw new InvalidDatatypeValueException("Value '"+nvalue+"' is not a valid " +
-                                                            SPECIAL_TOKEN_STRING[fTokenType]);
-                }
-            }
-
-            if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
-                RegularExpression regex;
-                for (int idx = fPattern.size()-1; idx >= 0; idx--) {
-                    regex = (RegularExpression)fPattern.elementAt(idx);
-                    if (!regex.matches(nvalue)){
-                        throw new InvalidDatatypeValueException("Value '"+content+
-                                                                "' does not match regular expression facet '" + regex + "'" );
-                    }
-                }
-            }
-
-            Object avalue = fDVs[fValidationDV].getActualValue(nvalue, context);
-
-            validatedInfo.actualValue = avalue;
-            validatedInfo.normalizedValue = nvalue;
-
-            return avalue;
-
-        } else if (fVariety == VARIETY_LIST) {
-
-            String nvalue = normalize(content, fWhiteSpace);
-            StringTokenizer parsedList = new StringTokenizer(nvalue);
-            int countOfTokens = parsedList.countTokens() ;
-            Object[] avalue = new Object[countOfTokens];
-            XSSimpleTypeDecl[] memberTypes = new XSSimpleTypeDecl[countOfTokens];
-            for(int i = 0 ; i < countOfTokens ; i ++){
-                // we can't call fItemType.validate(), otherwise checkExtraRules()
-                // will be called twice: once in fItemType.validate, once in
-                // validate method of this type.
-                // so we take two steps to get the actual value:
-                // 1. fItemType.getActualValue()
-                // 2. fItemType.chekcFacets()
-                avalue[i] = fItemType.getActualValue(parsedList.nextToken(), context, validatedInfo);
-                if (context.needFacetChecking() &&
-                    (fItemType.fFacetsDefined != 0 && fItemType.fFacetsDefined != FACET_WHITESPACE)) {
-                    fItemType.checkFacets(validatedInfo);
-                }
-                memberTypes[i] = (XSSimpleTypeDecl)validatedInfo.memberType;
-            }
-
-            validatedInfo.actualValue = avalue;
-            validatedInfo.normalizedValue = nvalue;
-            validatedInfo.memberTypes = memberTypes;
-
-            return avalue;
-
-        } else { // (fVariety == VARIETY_UNION)
-            for(int i = 0 ; i < fMemberTypes.length; i++) {
-                try {
-                    // we can't call fMemberType[i].validate(), otherwise checkExtraRules()
-                    // will be called twice: once in fMemberType[i].validate, once in
-                    // validate method of this type.
-                    // so we take two steps to get the actual value:
-                    // 1. fMemberType[i].getActualValue()
-                    // 2. fMemberType[i].chekcFacets()
-                    Object aValue = fMemberTypes[i].getActualValue(content, context, validatedInfo);
-                    if (context.needFacetChecking() &&
-                        (fMemberTypes[i].fFacetsDefined != 0 && fMemberTypes[i].fFacetsDefined != FACET_WHITESPACE)) {
-                        fMemberTypes[i].checkFacets(validatedInfo);
-                    }
-                    validatedInfo.memberType = fMemberTypes[i];
-                    return aValue;
-                } catch(InvalidDatatypeValueException invalidValue) {
-                }
-            }
-
-            String msg  = " content = " + content + " doesnt't match any of the member types " ;
-            throw new InvalidDatatypeValueException(msg);
-        }
-
-    }//getActualValue()
-
-
-    public boolean isEqual(Object value1, Object value2) {
-
-        if (fVariety == VARIETY_ATOMIC)
-            return fDVs[fValidationDV].isEqual(value1,value2);
-
-        else if (fVariety == VARIETY_LIST) {
-            if (!(value1 instanceof Object[]) || !(value2 instanceof Object[]))
-                return false;
-
-            Object[] v1 = (Object[])value1;
-            Object[] v2 = (Object[])value2;
-
-            int count = v1.length;
-            if (count != v2.length)
-                return false;
-
-            for (int i = 0 ; i < count ; i++) {
-                if (!fItemType.isEqual(v1[i], v2[i]))
-                    return false;
-            }//end of loop
-
-            //everything went fine.
-            return true;
-
-        } else if (fVariety == VARIETY_UNION) {
-            for (int i = fMemberTypes.length-1; i >= 0; i--) {
-                if (fMemberTypes[i].isEqual(value1,value2)){
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        return false;
-    }//isEqual()
-
-    // normalize the string according to the whiteSpace facet
-    public static String normalize(String content, short ws) {
-        int len = content == null ? 0 : content.length();
-        if (len == 0 || ws == WS_PRESERVE)
-            return content;
-
-        StringBuffer sb = new StringBuffer();
-        if (ws == WS_REPLACE) {
-            char ch;
-            // when it's replace, just replace #x9, #xa, #xd by #x20
-            for (int i = 0; i < len; i++) {
-                ch = content.charAt(i);
-                if (ch != 0x9 && ch != 0xa && ch != 0xd)
-                    sb.append(ch);
-                else
-                    sb.append((char)0x20);
-            }
-        } else {
-            char ch;
-            int i;
-            boolean isLeading = true;
-            // when it's collapse
-            for (i = 0; i < len; i++) {
-                ch = content.charAt(i);
-                // append real characters, so we passed leading ws
-                if (ch != 0x9 && ch != 0xa && ch != 0xd && ch != 0x20) {
-                    sb.append(ch);
-                    isLeading = false;
-                }
-                else {
-                    // for whitespaces, we skip all following ws
-                    for (; i < len-1; i++) {
-                        ch = content.charAt(i+1);
-                        if (ch != 0x9 && ch != 0xa && ch != 0xd && ch != 0x20)
-                            break;
-                    }
-                    // if it's not a leading or tailing ws, then append a space
-                    if (i < len - 1 && !isLeading)
-                        sb.append((char)0x20);
-                }
-            }
-        }
-
-        return sb.toString();
-    }
-
-    void reportError(String msg) throws InvalidDatatypeFacetException {
-        throw new InvalidDatatypeFacetException(msg);
-    }
-
-
-    private String whiteSpaceValue(short ws){
-        return WS_FACET_STRING[ws];
-    }
-
-    public String getStringValue(Object value){
-        if(value != null) {
-            if (fDVs[fValidationDV] instanceof AbstractDateTimeDV)
-                return ((AbstractDateTimeDV)fDVs[fValidationDV]).dateToString((int[])value);
-            else
-                return value.toString();
-        } else {
-            return null;
-        }
-    }
-
-    public short getOrderedFacet() {
-        return fOrdered;
-    }
-
-    public boolean isBounded(){
-        return fBounded;
-    }
-
-    public short getCardinalityFacet(){
-        return fCardinality;
-    }
-
-    public boolean isNumeric(){
-        return fNumeric;
-    }
-
-    private void caclFundamentalFacets() {
-        setOrdered();
-        setNumeric();
-        setBounded();
-        setCardinality();
-    }
-
-    private void setOrdered(){
-
-        // When {variety} is atomic, {value} is inherited from {value} of {base type definition}. For all ·primitive· types {value} is as specified in the table in Fundamental Facets (C.1).
-        if(fVariety == VARIETY_ATOMIC){
-            this.fOrdered = fBase.fOrdered;
-        }
-
-        // When {variety} is list, {value} is false.
-        else if(fVariety == VARIETY_LIST){
-            this.fOrdered = ORDERED_FALSE;
-        }
-
-        // When {variety} is union, the {value} is partial unless one of the following:
-        // 1. If every member of {member type definitions} is derived from a common ancestor other than the simple ur-type, then {value} is the same as that ancestor's ordered facet.
-        // 2. If every member of {member type definitions} has a {value} of false for the ordered facet, then {value} is false.
-        else if(fVariety == VARIETY_UNION){
-            int length = fMemberTypes.length;
-            // REVISIT: is the length possible to be 0?
-            if (length == 0) {
-                this.fOrdered = ORDERED_PARTIAL;
-                return;
-            }
-            // we need to process the first member type before entering the loop
-            short ancestorId = getPrimitiveDV(fMemberTypes[0].fValidationDV);
-            boolean commonAnc = ancestorId != DV_ANYSIMPLETYPE;
-            boolean allFalse = fMemberTypes[0].fOrdered == ORDERED_FALSE;
-            // for the other member types, check whether the value is false
-            // and whether they have the same ancestor as the first one
-            for (int i = 1; i < fMemberTypes.length && (commonAnc || allFalse); i++) {
-                if (commonAnc)
-                    commonAnc = ancestorId == getPrimitiveDV(fMemberTypes[i].fValidationDV);
-                if (allFalse)
-                    allFalse = fMemberTypes[i].fOrdered == ORDERED_FALSE;
-            }
-            if (commonAnc) {
-                // REVISIT: all member types should have the same ordered value
-                //          just use the first one. Can we assume this?
-                this.fOrdered = fMemberTypes[0].fOrdered;
-            } else if (allFalse) {
-                this.fOrdered = ORDERED_FALSE;
-            } else {
-                this.fOrdered = ORDERED_PARTIAL;
-            }
-        }
-
-    }//setOrdered
-
-    private void setNumeric(){
-        if(fVariety == VARIETY_ATOMIC){
-            this.fNumeric = fBase.fNumeric;
-        }
-        else if(fVariety == VARIETY_LIST){
-            this.fNumeric = false;
-        }
-        else if(fVariety == VARIETY_UNION){
-            XSSimpleType [] memberTypes = this.getMemberTypes();
-            for(int i = 0 ; i < memberTypes.length ; i++){
-                if( ! memberTypes[i].isNumeric() ){
-                    this.fNumeric = false;
-                    return;
-                }
-            }
-            this.fNumeric = true;
-        }
-
-    }//setNumeric
-
-    private void setBounded(){
-        if(fVariety == VARIETY_ATOMIC){
-            if( (((this.fFacetsDefined & FACET_MININCLUSIVE) != 0)  || ((this.fFacetsDefined & FACET_MINEXCLUSIVE) != 0))
-                &&  (((this.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)  || ((this.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0)) ){
-                this.fBounded = true;
-            }
-            else{
-                this.fBounded = false;
-            }
-        }
-        else if(fVariety == VARIETY_LIST){
-            if( ((this.fFacetsDefined & FACET_LENGTH) != 0 ) || ( ((this.fFacetsDefined & FACET_MINLENGTH) != 0 )
-                                                            &&  ((this.fFacetsDefined & FACET_MAXLENGTH) != 0 )) ){
-                this.fBounded = true;
-            }
-            else{
-                this.fBounded = false;
-            }
-
-        }
-        else if(fVariety == VARIETY_UNION){
-
-            XSSimpleTypeDecl [] memberTypes = this.fMemberTypes;
-            short ancestorId = 0 ;
-
-            if(memberTypes.length > 0){
-                ancestorId = getPrimitiveDV(memberTypes[0].fValidationDV);
-            }
-
-            for(int i = 0 ; i < memberTypes.length ; i++){
-                if( ! memberTypes[i].isBounded() || (ancestorId != getPrimitiveDV(memberTypes[i].fValidationDV)) ){
-                    this.fBounded = false;
-                    return;
-                }
-            }
-            this.fBounded = true;
-        }
-
-    }//setBounded
-
-    private boolean specialCardinalityCheck(){
-        if( (fBase.fValidationDV == XSSimpleTypeDecl.DV_DATE) || (fBase.fValidationDV == XSSimpleTypeDecl.DV_GYEARMONTH)
-            || (fBase.fValidationDV == XSSimpleTypeDecl.DV_GYEAR) || (fBase.fValidationDV == XSSimpleTypeDecl.DV_GMONTHDAY)
-            || (fBase.fValidationDV == XSSimpleTypeDecl.DV_GDAY) || (fBase.fValidationDV == XSSimpleTypeDecl.DV_GMONTH) ){
-            return true;
-        }
-        return false;
-
-    } //specialCardinalityCheck()
-
-    private void setCardinality(){
-        if(fVariety == VARIETY_ATOMIC){
-            if(fBase.fCardinality == CARDINALITY_FINITE){
-                this.fCardinality = CARDINALITY_FINITE;
-            }
-            else {// (fBase.fCardinality == CARDINALITY_COUNTABLY_INFINITE)
-                if ( ((this.fFacetsDefined & FACET_LENGTH) != 0 ) || ((this.fFacetsDefined & FACET_MAXLENGTH) != 0 )
-                     || ((this.fFacetsDefined & FACET_TOTALDIGITS) != 0 ) ){
-                    this.fCardinality = CARDINALITY_FINITE;
-                }
-                else if( (((this.fFacetsDefined & FACET_MININCLUSIVE) != 0 ) || ((this.fFacetsDefined & FACET_MINEXCLUSIVE) != 0 ))
-                        && (((this.fFacetsDefined & FACET_MAXINCLUSIVE) != 0 ) || ((this.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0 )) ){
-                    if( ((this.fFacetsDefined & FACET_FRACTIONDIGITS) != 0 ) || specialCardinalityCheck()){
-                        this.fCardinality = CARDINALITY_FINITE;
-                    }
-                    else{
-                        this.fCardinality = CARDINALITY_COUNTABLY_INFINITE;
-                    }
-                }
-                else{
-                    this.fCardinality = CARDINALITY_COUNTABLY_INFINITE;
-                }
-            }
-        }
-        else if(fVariety == VARIETY_LIST){
-            if( ((this.fFacetsDefined & FACET_LENGTH) != 0 ) || ( ((this.fFacetsDefined & FACET_MINLENGTH) != 0 )
-                                                            && ((this.fFacetsDefined & FACET_MAXLENGTH) != 0 )) ){
-                this.fCardinality = CARDINALITY_FINITE;
-            }
-            else{
-                this.fCardinality = CARDINALITY_COUNTABLY_INFINITE;
-            }
-
-        }
-        else if(fVariety == VARIETY_UNION){
-            XSSimpleType [] memberTypes = this.getMemberTypes();
-            for(int i = 0 ; i < memberTypes.length ; i++){
-                if( ! (memberTypes[i].getCardinalityFacet() == CARDINALITY_FINITE) ){
-                    this.fCardinality = CARDINALITY_COUNTABLY_INFINITE;
-                    return;
-                }
-            }
-            this.fCardinality = CARDINALITY_FINITE;
-        }
-
-    }//setCardinality
-
-    private short getPrimitiveDV(short validationDV){
-
-        if (validationDV == DV_ID || validationDV == DV_IDREF || validationDV == DV_ENTITY){
-            return DV_STRING;
-        }
-        else{
-            return validationDV;
-        }
-
-    }//getPrimitiveDV()
-
-    static final XSSimpleTypeDecl fAnySimpleType = new XSSimpleTypeDecl(null, "anySimpleType", DV_ANYSIMPLETYPE, ORDERED_FALSE, false, CARDINALITY_FINITE, false);
-
-} // class XSComplexTypeDecl
diff --git a/src/org/apache/xerces/impl/dv/xs_new/YearDV.java b/src/org/apache/xerces/impl/dv/xs_new/YearDV.java
deleted file mode 100644
index 5e66449..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/YearDV.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <gYear> datatype (W3C Schema Datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- *
- * @version $Id$
- */
-
-public class YearDV extends AbstractDateTimeDV {
-
-    /**
-     * Convert a string to a compiled form
-     *
-     * @param  content The lexical representation of time
-     * @return a valid and normalized time object
-     */
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid year");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of gYear object
-     *
-     * @param str    The lexical representation of year object CCYY
-     *               with possible time zone Z or (-),(+)hh:mm
-     * @param date   uninitialized date object
-     * @return normalized date representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException{
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date == null ) {
-            date = new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-
-        // check for preceding '-' sign
-        int start = 0;
-        if (fBuffer.charAt(0)=='-') {
-            start = 1;
-        }
-        int sign = findUTCSign(start, fEnd);
-        if (sign == -1) {
-            date[CY]=parseIntYear(fEnd);
-        }
-        else {
-            date[CY]=parseIntYear(sign);
-            getTimeZone (date, sign);
-        }
-
-        //initialize values
-        date[M]=MONTH;
-        date[D]=1;
-
-        //validate and normalize
-        validateDateTime(date);
-
-        if ( date[utc]!=0 && date[utc]!='Z' ) {
-            normalize(date);
-        }
-        return date;
-    }
-
-    /**
-     * Converts year object representation to String
-     *
-     * @param date   year object
-     * @return lexical representation of month: CCYY with optional time zone sign
-     */
-    protected String dateToString(int[] date) {
-
-        message.setLength(0);
-        message.append(date[CY]);
-        message.append((char)date[utc]);
-        return message.toString();
-    }
-
-}
-
-
diff --git a/src/org/apache/xerces/impl/dv/xs_new/YearMonthDV.java b/src/org/apache/xerces/impl/dv/xs_new/YearMonthDV.java
deleted file mode 100644
index 010c1e4..0000000
--- a/src/org/apache/xerces/impl/dv/xs_new/YearMonthDV.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999, 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.dv.xs_new;
-
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-
-/**
- * Validator for <gYearMonth> datatype (W3C Schema Datatypes)
- *
- * @author Elena Litani
- * @author Gopal Sharma, SUN Microsystem Inc.
- *
- * @version $Id$
- */
-public class YearMonthDV extends AbstractDateTimeDV{
-
-    /**
-     * Convert a string to a compiled form
-     *
-     * @param  content The lexical representation of gYearMonth
-     * @return a valid and normalized gYearMonth object
-     */
-    public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
-        try{
-            return parse(content, null);
-        } catch(Exception ex){
-            throw new InvalidDatatypeValueException("not a valid yearMonth");
-        }
-    }
-
-    /**
-     * Parses, validates and computes normalized version of gYearMonth object
-     *
-     * @param str    The lexical representation of gYearMonth object CCYY-MM
-     *               with possible time zone Z or (-),(+)hh:mm
-     * @param date   uninitialized date object
-     * @return normalized date representation
-     * @exception Exception Invalid lexical representation
-     */
-    protected int[] parse(String str, int[] date) throws SchemaDateTimeException{
-        resetBuffer(str);
-
-        //create structure to hold an object
-        if ( date == null ) {
-            date = new int[TOTAL_SIZE];
-        }
-        resetDateObj(date);
-
-        // get date
-        getYearMonth(fStart, fEnd, date);
-        date[D] = DAY;
-        parseTimeZone (fEnd, date);
-
-        //validate and normalize
-
-        validateDateTime(date);
-
-        if ( date[utc]!=0 && date[utc]!='Z' ) {
-            normalize(date);
-        }
-        return date;
-    }
-
-}
-
-
diff --git a/src/org/apache/xerces/impl/io/ASCIIReader.java b/src/org/apache/xerces/impl/io/ASCIIReader.java
deleted file mode 100644
index b8d765e..0000000
--- a/src/org/apache/xerces/impl/io/ASCIIReader.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.io;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-
-/**
- * A simple ASCII byte reader. This is an optimized reader for reading
- * byte streams that only contain 7-bit ASCII characters.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class ASCIIReader
-    extends Reader {
-
-    //
-    // Constants
-    //
-
-    /** Default byte buffer size (2048). */
-    public static final int DEFAULT_BUFFER_SIZE = 2048;
-
-    //
-    // Data
-    //
-
-    /** Input stream. */
-    protected InputStream fInputStream;
-
-    /** Byte buffer. */
-    protected byte[] fBuffer;
-
-    //
-    // Constructors
-    //
-
-    /** 
-     * Constructs an ASCII reader from the specified input stream 
-     * using the default buffer size.
-     *
-     * @param inputStream The input stream.
-     */
-    public ASCIIReader(InputStream inputStream) {
-        this(inputStream, DEFAULT_BUFFER_SIZE);
-    } // <init>(InputStream)
-
-    /** 
-     * Constructs an ASCII reader from the specified input stream 
-     * and buffer size.
-     *
-     * @param inputStream The input stream.
-     * @param size        The initial buffer size.
-     */
-    public ASCIIReader(InputStream inputStream, int size) {
-        fInputStream = inputStream;
-        fBuffer = new byte[size];
-    } // <init>(InputStream,int)
-
-    //
-    // Reader methods
-    //
-
-    /**
-     * Read a single character.  This method will block until a character is
-     * available, an I/O error occurs, or the end of the stream is reached.
-     *
-     * <p> Subclasses that intend to support efficient single-character input
-     * should override this method.
-     *
-     * @return     The character read, as an integer in the range 0 to 127
-     *             (<tt>0x00-0x7f</tt>), or -1 if the end of the stream has
-     *             been reached
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public int read() throws IOException {
-        int b0 = fInputStream.read();
-        if (b0 > 0x80) {
-            throw new IOException("character not 7-bit ASCII");
-        }
-        return b0;
-    } // read():int
-
-    /**
-     * Read characters into a portion of an array.  This method will block
-     * until some input is available, an I/O error occurs, or the end of the
-     * stream is reached.
-     *
-     * @param      ch     Destination buffer
-     * @param      offset Offset at which to start storing characters
-     * @param      length Maximum number of characters to read
-     *
-     * @return     The number of characters read, or -1 if the end of the
-     *             stream has been reached
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public int read(char ch[], int offset, int length) throws IOException {
-        if (length > fBuffer.length) {
-            length = fBuffer.length;
-        }
-        int count = fInputStream.read(fBuffer, 0, length);
-        for (int i = 0; i < count; i++) {
-            int b0 = fBuffer[i];
-            if (b0 > 0x80) {
-                throw new IOException("character not 7-bit ASCII");
-            }
-            ch[offset + i] = (char)b0;
-        }
-        return count;
-    } // read(char[],int,int)
-
-    /**
-     * Skip characters.  This method will block until some characters are
-     * available, an I/O error occurs, or the end of the stream is reached.
-     *
-     * @param  n  The number of characters to skip
-     *
-     * @return    The number of characters actually skipped
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public long skip(long n) throws IOException {
-        return fInputStream.skip(n);
-    } // skip(long):long
-
-    /**
-     * Tell whether this stream is ready to be read.
-     *
-     * @return True if the next read() is guaranteed not to block for input,
-     * false otherwise.  Note that returning false does not guarantee that the
-     * next read will block.
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public boolean ready() throws IOException {
-	    return false;
-    } // ready()
-
-    /**
-     * Tell whether this stream supports the mark() operation.
-     */
-    public boolean markSupported() {
-	    return fInputStream.markSupported();
-    } // markSupported()
-
-    /**
-     * Mark the present position in the stream.  Subsequent calls to reset()
-     * will attempt to reposition the stream to this point.  Not all
-     * character-input streams support the mark() operation.
-     *
-     * @param  readAheadLimit  Limit on the number of characters that may be
-     *                         read while still preserving the mark.  After
-     *                         reading this many characters, attempting to
-     *                         reset the stream may fail.
-     *
-     * @exception  IOException  If the stream does not support mark(),
-     *                          or if some other I/O error occurs
-     */
-    public void mark(int readAheadLimit) throws IOException {
-	    fInputStream.mark(readAheadLimit);
-    } // mark(int)
-
-    /**
-     * Reset the stream.  If the stream has been marked, then attempt to
-     * reposition it at the mark.  If the stream has not been marked, then
-     * attempt to reset it in some way appropriate to the particular stream,
-     * for example by repositioning it to its starting point.  Not all
-     * character-input streams support the reset() operation, and some support
-     * reset() without supporting mark().
-     *
-     * @exception  IOException  If the stream has not been marked,
-     *                          or if the mark has been invalidated,
-     *                          or if the stream does not support reset(),
-     *                          or if some other I/O error occurs
-     */
-    public void reset() throws IOException {
-        fInputStream.reset();
-    } // reset()
-
-    /**
-     * Close the stream.  Once a stream has been closed, further read(),
-     * ready(), mark(), or reset() invocations will throw an IOException.
-     * Closing a previously-closed stream, however, has no effect.
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-     public void close() throws IOException {
-         fInputStream.close();
-     } // close()
-
-} // class ASCIIReader
diff --git a/src/org/apache/xerces/impl/io/UCSReader.java b/src/org/apache/xerces/impl/io/UCSReader.java
deleted file mode 100644
index 4c3ccbf..0000000
--- a/src/org/apache/xerces/impl/io/UCSReader.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.io;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-
-/** 
- * Reader for UCS-2 and UCS-4 encodings.
- * (i.e., encodings from ISO-10646-UCS-(2|4)).
- *
- * @author Neil Graham, IBM
- *
- * @version $Id$
- */
-public class UCSReader extends Reader {
-
-    //
-    // Constants
-    //
-
-    /** Default byte buffer size (8192, larger than that of ASCIIReader
-     * since it's reasonable to surmise that the average UCS-4-encoded
-     * file should be 4 times as large as the average ASCII-encoded file). 
-     */
-    public static final int DEFAULT_BUFFER_SIZE = 8192;
-
-    public static short UCS2LE = 1;
-    public static short UCS2BE = 2;
-    public static short UCS4LE = 4;
-    public static short UCS4BE = 8;
-
-    //
-    // Data
-    //
-
-    /** Input stream. */
-    protected InputStream fInputStream;
-
-    /** Byte buffer. */
-    protected byte[] fBuffer;
-
-    // what kind of data we're dealing with
-    protected short fEncoding;
-
-    //
-    // Constructors
-    //
-
-    /** 
-     * Constructs an ASCII reader from the specified input stream 
-     * using the default buffer size.  The Endian-ness and whether this is
-     * UCS-2 or UCS-4 needs also to be known in advance.
-     *
-     * @param inputStream The input stream.
-     * @param encoding One of UCS2LE, UCS2BE, UCS4LE or UCS4BE.
-     */
-    public UCSReader(InputStream inputStream, short encoding) {
-        this(inputStream, DEFAULT_BUFFER_SIZE, encoding);
-    } // <init>(InputStream, short)
-
-    /** 
-     * Constructs an ASCII reader from the specified input stream 
-     * and buffer size.  The Endian-ness and whether this is
-     * UCS-2 or UCS-4 needs also to be known in advance.
-     *
-     * @param inputStream The input stream.
-     * @param size        The initial buffer size.
-     * @param encoding One of UCS2LE, UCS2BE, UCS4LE or UCS4BE.
-     */
-    public UCSReader(InputStream inputStream, int size, short encoding) {
-        fInputStream = inputStream;
-        fBuffer = new byte[size];
-        fEncoding = encoding;
-    } // <init>(InputStream,int,short)
-
-    //
-    // Reader methods
-    //
-
-    /**
-     * Read a single character.  This method will block until a character is
-     * available, an I/O error occurs, or the end of the stream is reached.
-     *
-     * <p> Subclasses that intend to support efficient single-character input
-     * should override this method.
-     *
-     * @return     The character read, as an integer in the range 0 to 127
-     *             (<tt>0x00-0x7f</tt>), or -1 if the end of the stream has
-     *             been reached
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public int read() throws IOException { 
-        int b0 = fInputStream.read() & 0xff;
-        if (b0 == 0xff)
-            return -1;
-        int b1 = fInputStream.read() & 0xff;
-        if (b1 == 0xff)
-            return -1;
-        if(fEncoding >=4) {
-            int b2 = fInputStream.read() & 0xff;
-            if (b2 == 0xff)
-                return -1;
-            int b3 = fInputStream.read() & 0xff;
-            if (b3 == 0xff)
-                return -1;
-            System.err.println("b0 is " + (b0 & 0xff) + " b1 " + (b1 & 0xff) + " b2 " + (b2 & 0xff) + " b3 " + (b3 & 0xff));
-            if (fEncoding == UCS4BE)
-                return (b0<<24)+(b1<<16)+(b2<<8)+b3;
-            else
-                return (b3<<24)+(b2<<16)+(b1<<8)+b0;
-        } else { // UCS-2
-            if (fEncoding == UCS2BE)
-                return (b0<<8)+b1;
-            else
-                return (b1<<8)+b0;
-        }
-    } // read():int
-
-    /**
-     * Read characters into a portion of an array.  This method will block
-     * until some input is available, an I/O error occurs, or the end of the
-     * stream is reached.
-     *
-     * @param      ch     Destination buffer
-     * @param      offset Offset at which to start storing characters
-     * @param      length Maximum number of characters to read
-     *
-     * @return     The number of characters read, or -1 if the end of the
-     *             stream has been reached
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public int read(char ch[], int offset, int length) throws IOException {
-        int byteLength = length << ((fEncoding >= 4)?2:1);
-        if (byteLength > fBuffer.length) {
-            byteLength = fBuffer.length;
-        }
-        int count = fInputStream.read(fBuffer, 0, byteLength);
-        if(count == -1) return -1;
-        // try and make count be a multiple of the number of bytes we're looking for
-        if(fEncoding >= 4) { // BigEndian
-            // this looks ugly, but it avoids an if at any rate...
-            int numToRead = (4 - (count & 3) & 3);
-            for(int i=0; i<numToRead; i++) {
-                int charRead = fInputStream.read();
-                if(charRead == -1) { // end of input; something likely went wrong!A  Pad buffer with nulls.
-                    for (int j = i;j<numToRead; j++)
-                        fBuffer[count+j] = 0;
-                    break;
-                } else {
-                    fBuffer[count+i] = (byte)charRead; 
-                }
-            }
-            count += numToRead;
-        } else {
-            int numToRead = count & 1;
-            if(numToRead != 0) {
-                count++;
-                int charRead = fInputStream.read();
-                if(charRead == -1) { // end of input; something likely went wrong!A  Pad buffer with nulls.
-                    fBuffer[count] = 0;
-                } else {
-                    fBuffer[count] = (byte)charRead;
-                }
-            }
-        }
-
-        // now count is a multiple of the right number of bytes
-        int numChars = count >> ((fEncoding >= 4)?2:1);
-        int curPos = 0;
-        for (int i = 0; i < numChars; i++) {
-            int b0 = fBuffer[curPos++] & 0xff;
-            int b1 = fBuffer[curPos++] & 0xff;
-            if(fEncoding >=4) {
-                int b2 = fBuffer[curPos++] & 0xff;
-                int b3 = fBuffer[curPos++] & 0xff;
-                if (fEncoding == UCS4BE)
-                    ch[offset+i] = (char)((b0<<24)+(b1<<16)+(b2<<8)+b3);
-                else
-                    ch[offset+i] = (char)((b3<<24)+(b2<<16)+(b1<<8)+b0);
-            } else { // UCS-2
-                if (fEncoding == UCS2BE)
-                    ch[offset+i] = (char)((b0<<8)+b1);
-                else
-                    ch[offset+i] = (char)((b1<<8)+b0);
-            }
-        }
-        return numChars;
-    } // read(char[],int,int)
-
-    /**
-     * Skip characters.  This method will block until some characters are
-     * available, an I/O error occurs, or the end of the stream is reached.
-     *
-     * @param  n  The number of characters to skip
-     *
-     * @return    The number of characters actually skipped
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public long skip(long n) throws IOException {
-        // charWidth will represent the number of bits to move
-        // n leftward to get num of bytes to skip, and then move the result rightward
-        // to get num of chars effectively skipped.
-        // The trick with &'ing, as with elsewhere in this dcode, is
-        // intended to avoid an expensive use of / that might not be optimized
-        // away.
-        int charWidth = (fEncoding >=4)?2:1;
-        long bytesSkipped = fInputStream.skip(n<<charWidth);
-        if((bytesSkipped & (charWidth | 1)) == 0) return bytesSkipped >> charWidth;
-        return (bytesSkipped >> charWidth) + 1;
-    } // skip(long):long
-
-    /**
-     * Tell whether this stream is ready to be read.
-     *
-     * @return True if the next read() is guaranteed not to block for input,
-     * false otherwise.  Note that returning false does not guarantee that the
-     * next read will block.
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public boolean ready() throws IOException {
-	    return false;
-    } // ready()
-
-    /**
-     * Tell whether this stream supports the mark() operation.
-     */
-    public boolean markSupported() {
-	    return fInputStream.markSupported();
-    } // markSupported()
-
-    /**
-     * Mark the present position in the stream.  Subsequent calls to reset()
-     * will attempt to reposition the stream to this point.  Not all
-     * character-input streams support the mark() operation.
-     *
-     * @param  readAheadLimit  Limit on the number of characters that may be
-     *                         read while still preserving the mark.  After
-     *                         reading this many characters, attempting to
-     *                         reset the stream may fail.
-     *
-     * @exception  IOException  If the stream does not support mark(),
-     *                          or if some other I/O error occurs
-     */
-    public void mark(int readAheadLimit) throws IOException {
-	    fInputStream.mark(readAheadLimit);
-    } // mark(int)
-
-    /**
-     * Reset the stream.  If the stream has been marked, then attempt to
-     * reposition it at the mark.  If the stream has not been marked, then
-     * attempt to reset it in some way appropriate to the particular stream,
-     * for example by repositioning it to its starting point.  Not all
-     * character-input streams support the reset() operation, and some support
-     * reset() without supporting mark().
-     *
-     * @exception  IOException  If the stream has not been marked,
-     *                          or if the mark has been invalidated,
-     *                          or if the stream does not support reset(),
-     *                          or if some other I/O error occurs
-     */
-    public void reset() throws IOException {
-        fInputStream.reset();
-    } // reset()
-
-    /**
-     * Close the stream.  Once a stream has been closed, further read(),
-     * ready(), mark(), or reset() invocations will throw an IOException.
-     * Closing a previously-closed stream, however, has no effect.
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-     public void close() throws IOException {
-         fInputStream.close();
-     } // close()
-
-} // class UCSReader
diff --git a/src/org/apache/xerces/impl/io/UTF8Reader.java b/src/org/apache/xerces/impl/io/UTF8Reader.java
deleted file mode 100644
index 0c2b068..0000000
--- a/src/org/apache/xerces/impl/io/UTF8Reader.java
+++ /dev/null
@@ -1,694 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.io;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-import java.io.UTFDataFormatException;
-
-/**
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class UTF8Reader
-    extends Reader {
-
-    //
-    // Constants
-    //
-
-    /** Default byte buffer size (2048). */
-    public static final int DEFAULT_BUFFER_SIZE = 2048;
-
-    // debugging
-
-    /** Debug read. */
-    private static final boolean DEBUG_READ = false;
-
-    //
-    // Data
-    //
-
-    /** Input stream. */
-    protected InputStream fInputStream;
-
-    /** Byte buffer. */
-    protected byte[] fBuffer;
-
-    /** Offset into buffer. */
-    protected int fOffset;
-
-    /** Surrogate character. */
-    private int fSurrogate = -1;
-
-    //
-    // Constructors
-    //
-
-    /** 
-     * Constructs a UTF-8 reader from the specified input stream 
-     * using the default buffer size.
-     *
-     * @param inputStream The input stream.
-     */
-    public UTF8Reader(InputStream inputStream) {
-        this(inputStream, DEFAULT_BUFFER_SIZE);
-    } // <init>(InputStream)
-
-    /** 
-     * Constructs a UTF-8 reader from the specified input stream 
-     * and buffer size.
-     *
-     * @param inputStream The input stream.
-     * @param size        The initial buffer size.
-     */
-    public UTF8Reader(InputStream inputStream, int size) {
-        fInputStream = inputStream;
-        fBuffer = new byte[size];
-    } // <init>(InputStream,int)
-
-    //
-    // Reader methods
-    //
-
-    /**
-     * Read a single character.  This method will block until a character is
-     * available, an I/O error occurs, or the end of the stream is reached.
-     *
-     * <p> Subclasses that intend to support efficient single-character input
-     * should override this method.
-     *
-     * @return     The character read, as an integer in the range 0 to 16383
-     *             (<tt>0x00-0xffff</tt>), or -1 if the end of the stream has
-     *             been reached
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public int read() throws IOException {
-
-        // decode character
-        int c = fSurrogate;
-        if (fSurrogate == -1) {
-            // NOTE: We use the index into the buffer if there are remaining
-            //       bytes from the last block read. -Ac
-            int index = 0;
-
-            // get first byte
-            int b0 = index == fOffset 
-                   ? fInputStream.read() : fBuffer[index++] & 0x00FF;
-            if (b0 == -1) {
-                return -1;
-            }
-
-            // UTF-8:   [0xxx xxxx]
-            // Unicode: [0000 0000] [0xxx xxxx]
-            if (b0 < 0x80) {
-                c = (char)b0;
-            }
-
-            // UTF-8:   [110y yyyy] [10xx xxxx]
-            // Unicode: [0000 0yyy] [yyxx xxxx]
-            else if ((b0 & 0xE0) == 0xC0) {
-                int b1 = index == fOffset 
-                       ? fInputStream.read() : fBuffer[index++] & 0x00FF;
-                if (b1 == -1) {
-                    expectedByte(2, 2);
-                }
-                if ((b1 & 0xC0) != 0x80) {
-                    invalidByte(2, 2, b1);
-                }
-                c = ((b0 << 6) & 0x07C0) | (b1 & 0x003F);
-            }
-
-            // UTF-8:   [1110 zzzz] [10yy yyyy] [10xx xxxx]
-            // Unicode: [zzzz yyyy] [yyxx xxxx]
-            else if ((b0 & 0xF0) == 0xE0) {
-                int b1 = index == fOffset
-                       ? fInputStream.read() : fBuffer[index++] & 0x00FF;
-                if (b1 == -1) {
-                    expectedByte(2, 3);
-                }
-                if ((b1 & 0xC0) != 0x80) {
-                    invalidByte(2, 3, b1);
-                }
-                int b2 = index == fOffset 
-                       ? fInputStream.read() : fBuffer[index++] & 0x00FF;
-                if (b2 == -1) {
-                    expectedByte(3, 3);
-                }
-                if ((b2 & 0xC0) != 0x80) {
-                    invalidByte(3, 3, b2);
-                }
-                c = ((b0 << 12) & 0xF000) | ((b1 << 6) & 0x0FC0) |
-                    (b2 & 0x003F);
-            }
-
-            // UTF-8:   [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
-            // Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
-            //          [1101 11yy] [yyxx xxxx] (low surrogate)
-            //          * uuuuu = wwww + 1
-            else if ((b0 & 0xF8) == 0xF0) {
-                int b1 = index == fOffset 
-                       ? fInputStream.read() : fBuffer[index++] & 0x00FF;
-                if (b1 == -1) {
-                    expectedByte(2, 4);
-                }
-                if ((b1 & 0xC0) != 0x80) {
-                    invalidByte(2, 3, b1);
-                }
-                int b2 = index == fOffset 
-                       ? fInputStream.read() : fBuffer[index++] & 0x00FF;
-                if (b2 == -1) {
-                    expectedByte(3, 4);
-                }
-                if ((b2 & 0xC0) != 0x80) {
-                    invalidByte(3, 3, b2);
-                }
-                int b3 = index == fOffset 
-                       ? fInputStream.read() : fBuffer[index++] & 0x00FF;
-                if (b3 == -1) {
-                    expectedByte(4, 4);
-                }
-                if ((b3 & 0xC0) != 0x80) {
-                    invalidByte(4, 4, b3);
-                }
-                int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003);
-                if (uuuuu > 0x10) {
-                    invalidSurrogate(uuuuu);
-                }
-                int wwww = uuuuu - 1;
-                int hs = 0xD800 | 
-                         ((wwww << 6) & 0x03C0) | ((b1 << 2) & 0x003C) | 
-                         ((b2 >> 4) & 0x0003);
-                int ls = 0xDC00 | ((b2 << 6) & 0x03C0) | (b3 & 0x003F);
-                c = hs;
-                fSurrogate = ls;
-            }
-
-            // error
-            else {
-                invalidByte(1, 1, b0);
-            }
-        }
-
-        // use surrogate
-        else {
-            fSurrogate = -1;
-        }
-
-        // return character
-        if (DEBUG_READ) {
-            System.out.println("read(): 0x"+Integer.toHexString(c));
-        }
-        return c;
-
-    } // read():int
-
-    /**
-     * Read characters into a portion of an array.  This method will block
-     * until some input is available, an I/O error occurs, or the end of the
-     * stream is reached.
-     *
-     * @param      ch     Destination buffer
-     * @param      offset Offset at which to start storing characters
-     * @param      length Maximum number of characters to read
-     *
-     * @return     The number of characters read, or -1 if the end of the
-     *             stream has been reached
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public int read(char ch[], int offset, int length) throws IOException {
-
-        // handle surrogate
-        int out = offset;
-        if (fSurrogate != -1) {
-            ch[offset + 1] = (char)fSurrogate;
-            fSurrogate = -1;
-            length--;
-            out++;
-        }
-
-        // read bytes
-        int count = 0;
-        if (fOffset == 0) {
-            // adjust length to read
-            if (length > fBuffer.length) {
-                length = fBuffer.length;
-            }
-
-            // perform read operation
-            count = fInputStream.read(fBuffer, 0, length);
-            if (count == -1) {
-                return -1;
-            }
-            count += out - offset;
-        }
-
-        // skip read; last character was in error
-        // NOTE: Having an offset value other than zero means that there was
-        //       an error in the last character read. In this case, we have
-        //       skipped the read so we don't consume any bytes past the 
-        //       error. By signalling the error on the next block read we
-        //       allow the method to return the most valid characters that
-        //       it can on the previous block read. -Ac
-        else {
-            count = fOffset;
-            fOffset = 0;
-        }
-
-        // convert bytes to characters
-        final int total = count;
-        for (int in = 0; in < total; in++) {
-            int b0 = fBuffer[in] & 0x00FF;
-
-            // UTF-8:   [0xxx xxxx]
-            // Unicode: [0000 0000] [0xxx xxxx]
-            if (b0 < 0x80) {
-                ch[out++] = (char)b0;
-                continue;
-            }
-
-            // UTF-8:   [110y yyyy] [10xx xxxx]
-            // Unicode: [0000 0yyy] [yyxx xxxx]
-            if ((b0 & 0xE0) == 0xC0) {
-                int b1 = -1;
-                if (++in < total) { 
-                    b1 = fBuffer[in] & 0x00FF; 
-                }
-                else {
-                    b1 = fInputStream.read();
-                    if (b1 == -1) {
-                        if (out > offset) {
-                            fBuffer[0] = (byte)b0;
-                            fOffset = 1;
-                            return out - offset;
-                        }
-                        expectedByte(2, 2);
-                    }
-                    count++;
-                }
-                if ((b1 & 0xC0) != 0x80) {
-                    if (out > offset) {
-                        fBuffer[0] = (byte)b0;
-                        fBuffer[1] = (byte)b1;
-                        fOffset = 2;
-                        return out - offset;
-                    }
-                    invalidByte(2, 2, b1);
-                }
-                int c = ((b0 << 6) & 0x07C0) | (b1 & 0x003F);
-                ch[out++] = (char)c;
-                count -= 1;
-                continue;
-            }
-
-            // UTF-8:   [1110 zzzz] [10yy yyyy] [10xx xxxx]
-            // Unicode: [zzzz yyyy] [yyxx xxxx]
-            if ((b0 & 0xF0) == 0xE0) {
-                int b1 = -1;
-                if (++in < total) { 
-                    b1 = fBuffer[in] & 0x00FF; 
-                }
-                else {
-                    b1 = fInputStream.read();
-                    if (b1 == -1) {
-                        if (out > offset) {
-                            fBuffer[0] = (byte)b0;
-                            fOffset = 1;
-                            return out - offset;
-                        }
-                        expectedByte(2, 3);
-                    }
-                    count++;
-                }
-                if ((b1 & 0xC0) != 0x80) {
-                    if (out > offset) {
-                        fBuffer[0] = (byte)b0;
-                        fBuffer[1] = (byte)b1;
-                        fOffset = 2;
-                        return out - offset;
-                    }
-                    invalidByte(2, 3, b1);
-                }
-                int b2 = -1;
-                if (++in < total) { 
-                    b2 = fBuffer[in] & 0x00FF; 
-                }
-                else {
-                    b2 = fInputStream.read();
-                    if (b2 == -1) {
-                        if (out > offset) {
-                            fBuffer[0] = (byte)b0;
-                            fBuffer[1] = (byte)b1;
-                            fOffset = 2;
-                            return out - offset;
-                        }
-                        expectedByte(3, 3);
-                    }
-                    count++;
-                }
-                if ((b2 & 0xC0) != 0x80) {
-                    if (out > offset) {
-                        fBuffer[0] = (byte)b0;
-                        fBuffer[1] = (byte)b1;
-                        fBuffer[2] = (byte)b2;
-                        fOffset = 3;
-                        return out - offset;
-                    }
-                    invalidByte(3, 3, b2);
-                }
-                int c = ((b0 << 12) & 0xF000) | ((b1 << 6) & 0x0FC0) |
-                        (b2 & 0x003F);
-                ch[out++] = (char)c;
-                count -= 2;
-                continue;
-            }
-
-            // UTF-8:   [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
-            // Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
-            //          [1101 11yy] [yyxx xxxx] (low surrogate)
-            //          * uuuuu = wwww + 1
-            if ((b0 & 0xF8) == 0xF0) {
-                int b1 = -1;
-                if (++in < total) { 
-                    b1 = fBuffer[in] & 0x00FF; 
-                }
-                else {
-                    b1 = fInputStream.read();
-                    if (b1 == -1) {
-                        if (out > offset) {
-                            fBuffer[0] = (byte)b0;
-                            fOffset = 1;
-                            return out - offset;
-                        }
-                        expectedByte(2, 4);
-                    }
-                    count++;
-                }
-                if ((b1 & 0xC0) != 0x80) {
-                    if (out > offset) {
-                        fBuffer[0] = (byte)b0;
-                        fBuffer[1] = (byte)b1;
-                        fOffset = 2;
-                        return out - offset;
-                    }
-                    invalidByte(2, 4, b1);
-                }
-                int b2 = -1;
-                if (++in < total) { 
-                    b2 = fBuffer[in] & 0x00FF; 
-                }
-                else {
-                    b2 = fInputStream.read();
-                    if (b2 == -1) {
-                        if (out > offset) {
-                            fBuffer[0] = (byte)b0;
-                            fBuffer[1] = (byte)b1;
-                            fOffset = 2;
-                            return out - offset;
-                        }
-                        expectedByte(3, 4);
-                    }
-                    count++;
-                }
-                if ((b2 & 0xC0) != 0x80) {
-                    if (out > offset) {
-                        fBuffer[0] = (byte)b0;
-                        fBuffer[1] = (byte)b1;
-                        fBuffer[2] = (byte)b2;
-                        fOffset = 3;
-                        return out - offset;
-                    }
-                    invalidByte(3, 4, b2);
-                }
-                int b3 = -1;
-                if (++in < total) { 
-                    b3 = fBuffer[in] & 0x00FF; 
-                }
-                else {
-                    b3 = fInputStream.read();
-                    if (b3 == -1) {
-                        if (out > offset) {
-                            fBuffer[0] = (byte)b0;
-                            fBuffer[1] = (byte)b1;
-                            fBuffer[2] = (byte)b2;
-                            fOffset = 3;
-                            return out - offset;
-                        }
-                        expectedByte(4, 4);
-                    }
-                    count++;
-                }
-                if ((b3 & 0xC0) != 0x80) {
-                    if (out > offset) {
-                        fBuffer[0] = (byte)b0;
-                        fBuffer[1] = (byte)b1;
-                        fBuffer[2] = (byte)b2;
-                        fBuffer[3] = (byte)b3;
-                        fOffset = 4;
-                        return out - offset;
-                    }
-                    invalidByte(4, 4, b2);
-                }
-
-                // decode bytes into surrogate characters
-                int uuuuu = ((b0 << 2) & 0x001C) | ((b1 >> 4) & 0x0003);
-                if (uuuuu > 0x10) {
-                    invalidSurrogate(uuuuu);
-                }
-                int wwww = uuuuu - 1;
-                int zzzz = b1 & 0x000F;
-                int yyyyyy = b2 & 0x003F;
-                int xxxxxx = b3 & 0x003F;
-                int hs = 0xD800 | ((wwww << 6) & 0x03C0) | (zzzz << 2) | (yyyyyy >> 4);
-                int ls = 0xDC00 | ((yyyyyy << 6) & 0x03C0) | xxxxxx;
-
-                // set characters
-                ch[out++] = (char)hs;
-                ch[out++] = (char)ls;
-                count -= 2;
-                continue;
-            }
-
-            // error
-            if (out > offset) {
-                fBuffer[0] = (byte)b0;
-                fOffset = 1;
-                return out - offset;
-            }
-            invalidByte(1, 1, b0);
-        }
-
-        // return number of characters converted
-        if (DEBUG_READ) {
-            System.out.println("read(char[],"+offset+','+length+"): count="+count);
-        }
-        return count;
-
-    } // read(char[],int,int)
-
-    /**
-     * Skip characters.  This method will block until some characters are
-     * available, an I/O error occurs, or the end of the stream is reached.
-     *
-     * @param  n  The number of characters to skip
-     *
-     * @return    The number of characters actually skipped
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public long skip(long n) throws IOException {
-
-        long remaining = n;
-        final char[] ch = new char[fBuffer.length];
-        do {
-            int length = ch.length < remaining ? ch.length : (int)remaining;
-            int count = read(ch, 0, length);
-            if (count > 0) {
-                remaining -= count;
-            }
-            else {
-                break;
-            }
-        } while (remaining > 0);
-
-        long skipped = n - remaining;
-        return skipped;
-
-    } // skip(long):long
-
-    /**
-     * Tell whether this stream is ready to be read.
-     *
-     * @return True if the next read() is guaranteed not to block for input,
-     * false otherwise.  Note that returning false does not guarantee that the
-     * next read will block.
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public boolean ready() throws IOException {
-	    return false;
-    } // ready()
-
-    /**
-     * Tell whether this stream supports the mark() operation.
-     */
-    public boolean markSupported() {
-	    return false;
-    } // markSupported()
-
-    /**
-     * Mark the present position in the stream.  Subsequent calls to reset()
-     * will attempt to reposition the stream to this point.  Not all
-     * character-input streams support the mark() operation.
-     *
-     * @param  readAheadLimit  Limit on the number of characters that may be
-     *                         read while still preserving the mark.  After
-     *                         reading this many characters, attempting to
-     *                         reset the stream may fail.
-     *
-     * @exception  IOException  If the stream does not support mark(),
-     *                          or if some other I/O error occurs
-     */
-    public void mark(int readAheadLimit) throws IOException {
-	    throw new IOException("mark not supported");
-    } // mark(int)
-
-    /**
-     * Reset the stream.  If the stream has been marked, then attempt to
-     * reposition it at the mark.  If the stream has not been marked, then
-     * attempt to reset it in some way appropriate to the particular stream,
-     * for example by repositioning it to its starting point.  Not all
-     * character-input streams support the reset() operation, and some support
-     * reset() without supporting mark().
-     *
-     * @exception  IOException  If the stream has not been marked,
-     *                          or if the mark has been invalidated,
-     *                          or if the stream does not support reset(),
-     *                          or if some other I/O error occurs
-     */
-    public void reset() throws IOException {
-        fOffset = 0;
-        fSurrogate = -1;
-    } // reset()
-
-    /**
-     * Close the stream.  Once a stream has been closed, further read(),
-     * ready(), mark(), or reset() invocations will throw an IOException.
-     * Closing a previously-closed stream, however, has no effect.
-     *
-     * @exception  IOException  If an I/O error occurs
-     */
-    public void close() throws IOException {
-        fInputStream.close();
-    } // close()
-
-    //
-    // Private methods
-    //
-
-    /** Throws an exception for expected byte. */
-    private void expectedByte(int position, int count)
-        throws UTFDataFormatException {
-
-        StringBuffer str = new StringBuffer();
-        str.append("expected byte ");
-        str.append(position);
-        str.append(" of ");
-        str.append(count);
-        str.append("-byte UTF-8 sequence");
-
-        String message = str.toString();
-        throw new UTFDataFormatException(message);
-
-    } // expectedByte(int,int,int)
-
-    /** Throws an exception for invalid byte. */
-    private void invalidByte(int position, int count, int c) 
-        throws UTFDataFormatException {
-
-        StringBuffer str = new StringBuffer();
-        str.append("invalid byte ");
-        str.append(position);
-        str.append(" of ");
-        str.append(count);
-        str.append("-byte UTF-8 sequence (0x");
-        str.append(Integer.toHexString(c));
-        str.append(')');
-
-        String message = str.toString();
-        throw new UTFDataFormatException(message);
-
-    } // invalidByte(int,int,int,int)
-
-    /** Throws an exception for invalid surrogate bits. */
-    private void invalidSurrogate(int uuuuu) throws UTFDataFormatException {
-        
-        StringBuffer str = new StringBuffer();
-        str.append("high surrogate bits in UTF-8 sequence must not exceed 0x10 but found 0x");
-        str.append(Integer.toHexString(uuuuu));
-
-        String message = str.toString();
-        throw new UTFDataFormatException(message);
-
-    } // invalidSurrogate(int)
-
-} // class UTF8Reader
diff --git a/src/org/apache/xerces/impl/msg/DatatypeMessages.java b/src/org/apache/xerces/impl/msg/DatatypeMessages.java
deleted file mode 100644
index 8532b1a..0000000
--- a/src/org/apache/xerces/impl/msg/DatatypeMessages.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.msg;
-
-import java.util.ListResourceBundle;
-
-/**
- * This file contains error and warning messages for the schema datatype validator
- * The messages are arranged in key and value tuples in a ListResourceBundle.
- *
- *
- * @version $Id$
- */
-public class DatatypeMessages extends ListResourceBundle {
-    /** The list resource bundle contents. */
-    public static final Object CONTENTS[][] = {
-// Internal message formatter messages
-        { "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." },
-        { "FormatFailed", "An internal error occurred while formatting the following message:\n  " },
-        { "NotBoolean", "{0} is not a boolean." },
-        { "NotDecimal", "{0} is not a decimal." },
-        { "FacetsInconsistent", "Facets are inconsistent with base type." },
-        { "IllegalFacetValue", "Illegal value {0} for facet {1}." },
-        { "IllegalDecimalFacet", "Illegal Facet for decimal type." },
-        { "UnknownFacet", "Unknown Facet: {0}." },
-        { "InvalidEnumValue", "Invalid value for Enum constant: {0}." },
-        { "OutOfBounds", "{0} is out of bounds." },
-        { "NotAnEnumValue", "{0} is not one of the specified enum values." },
-        { "NotInteger", "{0} is not an integer." },
-        { "IllegalIntegerFacet", "Illegal Facet for Integer type." },
-        { "NotReal", "{0} is not a double." },
-        { "IllegalRealFacet", "Illegal Facet for Real type." },
-        { "ScaleLargerThanPrecision", "Scale Facet must be less than or equal to Precision Facet" },
-        { "PrecisionExceeded", "{0} has exceeded the precision Facet {1}"},
-        { "ScaleExceeded", "{0} has execeed the scale Facet {1}"},
-    };
-
-    /** Returns the list resource bundle contents. */
-    public Object[][] getContents() {
-        return CONTENTS;
-    }
-}
diff --git a/src/org/apache/xerces/impl/msg/ExceptionMessages.java b/src/org/apache/xerces/impl/msg/ExceptionMessages.java
deleted file mode 100644
index b62f356..0000000
--- a/src/org/apache/xerces/impl/msg/ExceptionMessages.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.msg;
-
-import java.util.ListResourceBundle;
-
-/**
- * This file contains error and warning messages to be localized
- * The messages are arranged in key and value tuples in a ListResourceBundle.
- *
- * @version $Id$
- */
-public class ExceptionMessages extends ListResourceBundle {
-    /** The list resource bundle contents. */
-    public static final Object CONTENTS[][] = {
-    
-    // org.apache.xerces.impl.msg.ExceptionMessageLocalizer
-    { "FMT001", "Message Formatting Error." },
-    
-
-    // org.apache.html
-
-    { "HTM001", "State error: startDocument fired twice on one builder." },
-    { "HTM002", "State error: document never started or missing document element." },
-    { "HTM003", "State error: document ended before end of document element." },
-    { "HTM004", "Argument ''tagName'' is null." },
-    { "HTM005", "State error: Document.getDocumentElement returns null." },
-    { "HTM006", "State error: startElement called after end of document element." },
-    { "HTM007", "State error: endElement called with no current node." },
-    { "HTM008", "State error: mismatch in closing tag name {0}" },
-    { "HTM009", "State error: character data found outside of root element." },
-    { "HTM010", "State error: character data found outside of root element." },
-    { "HTM011", "Argument ''topLevel'' is null." },
-    { "HTM012", "Argument ''index'' is negative." },
-    { "HTM013", "Argument ''name'' is null." },
-    { "HTM014", "Argument ''title'' is null." },
-    { "HTM015", "Tag ''{0}'' associated with an Element class that failed to construct." },
-    { "HTM016", "Argument ''caption'' is not an element of type <CAPTION>." },
-    { "HTM017", "Argument ''tHead'' is not an element of type <THEAD>." },
-    { "HTM018", "Argument ''tFoot'' is not an element of type <TFOOT>." },
-    { "HTM019", "OpenXML Error: Could not find class {0} implementing HTML element {1}" },
-
-    // org.apache.xml.serialize
-
-    { "SER001", "Argument ''output'' is null." },
-    { "SER002", "No writer supplied for serializer" },
-    { "SER003", "The resource [{0}] could not be found." },
-    { "SER004", "The resource [{0}] could not load: {1}" },
-    { "SER005", "The method ''{0}'' is not supported by this factory" },
-
-    // org.apache.xerces.dom
-
-    { "DOM001", "Modification not allowed" },
-    { "DOM002", "Illegal character" },
-    { "DOM003", "Namespace error" },
-    { "DOM004", "Index out of bounds" },
-    { "DOM005", "Wrong document" },
-    { "DOM006", "Hierarchy request error" },
-    { "DOM007", "Not supported" },
-    { "DOM008", "Not found" },
-    { "DOM009", "Attribute already in use" },
-    { "DOM010", "Unspecified event type" },
-    { "DOM011", "Invalid state" },
-    { "DOM012", "Invalid node type" },
-    { "DOM013", "Bad boundary points" },
-
-    // org.apache.xerces.framework
-    { "FWK001", "{0}] scannerState: {1}" },
-    { "FWK002", "{0}] popElementType: fElementDepth-- == 0." },
-    { "FWK003", "TrailingMiscDispatcher.endOfInput moreToFollow" },
-    { "FWK004", "cannot happen: {0}" },
-    { "FWK005", "parse may not be called while parsing." },
-    { "FWK006", "setLocale may not be called while parsing." },
-    { "FWK007", "Unknown error domain \"{0}\"." },
-    { "FWK008", "Element stack underflow." },
-        
-    // org.apache.xerces.parsers
-    { "PAR001", "Fatal error constructing DOMParser." },
-    { "PAR002", "Class, \"{0}\", is not of type org.w3c.dom" },
-    { "PAR003", "Class, \"{0}\", not found." },
-    { "PAR004", "Cannot setFeature({0}): parse is in progress." },
-    { "PAR005", "Property, \"{0}\" is read-only." },
-    { "PAR006", "Property value must be of type java.lang.String." },
-    { "PAR007", "Current element node cannot be queried when node expansion is deferred." },
-    { "PAR008", "Fatal error getting document factory." },
-    { "PAR009", "Fatal error reading expansion mode." },
-    { "PAR010", "Can''t copy node type, {0} ({1})." },
-    { "PAR011", "Feature {0} not supported during parse." },
-    { "PAR012", "For propertyId \"{0}\", the value \""+
-                "{1}\" cannot be cast to {2}." },
-    { "PAR013", "Property \"{0}\" is read only." },
-    { "PAR014", "Cannot getProperty(\"{0}\". No DOM tree exists." },
-    { "PAR015", "startEntityReference(): ENTITYTYPE_UNPARSED" },
-    { "PAR016", "endEntityReference(): ENTITYTYPE_UNPARSED" },
-    { "PAR017", "cannot happen: {0}" },
-    
-    // org.apache.xerces.readers
-
-    { "RDR001", "untested" },
-    { "RDR002", "cannot happen" },
-            
-    //org.apache.xerces.util
-    { "UTL001", "untested" },
-    { "UTL002", "cannot happen" },
-
-    //org.apache.xerces.validators
-
-    { "VAL001", "Element stack underflow" },
-    { "VAL002", "getValidatorForAttType ({0})" },
-    { "VAL003",  "cannot happen" }
-
-        
-    };
-    /** Returns the list resource bundle contents. */
-
-    public Object[][] getContents() {
-        return CONTENTS;
-    }
-}
diff --git a/src/org/apache/xerces/impl/msg/ExceptionMessagesLocalizer.java b/src/org/apache/xerces/impl/msg/ExceptionMessagesLocalizer.java
deleted file mode 100644
index 27b2256..0000000
--- a/src/org/apache/xerces/impl/msg/ExceptionMessagesLocalizer.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.msg;
-
-import java.util.Locale;
-import java.util.ListResourceBundle;
-import java.util.ResourceBundle;
-import java.util.StringTokenizer;
-
-
-public class ExceptionMessagesLocalizer {
-    
-    static final String FMT001 = "FMT001";
-    
-    
-    //REVIST: Do we make this an object and have a set, getLocale,
-    // and cache the bundle?
-    
-    /** This method returns the localized message */
-    public static String localizeMessage(String string, Locale locale) {
-        
-        ResourceBundle fResourceBundle = null;
-        if (locale != null)
-            fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.impl.msg.ExceptionMessages", locale);
-        if (fResourceBundle == null || locale == null)
-            fResourceBundle = ListResourceBundle.getBundle("org.apache.xerces.impl.msg.ExceptionMessages");
-        
-        int keyIndex = string.indexOf(' ');
-        String key = string.substring(0, keyIndex);
-        // newline index
-        int nlIndex = string.indexOf('\n');
-        if (nlIndex == 0 || key == null || key.equals("")) return null; // REVIST: should never happen
- 
-        String msg = fResourceBundle.getString(key);
-        if (nlIndex < 0) {
-            return msg;
-        }
-       
-        StringTokenizer st = new StringTokenizer(string.substring(nlIndex+1), "\t");
-        int count = st.countTokens();
-        String [] args = new String[count];
-        for(int i=0; i < count; i++) {
-            args[i] = st.nextToken();
-        }
-        
-        if (args != null) {
-            try {
-                msg = java.text.MessageFormat.format(msg, args);
-            } catch (Exception e) {
-                msg = fResourceBundle.getString(FMT001)+ ": " + msg;
-            }
-        } 
-        return msg;
-    }
-    
-}
\ No newline at end of file
diff --git a/src/org/apache/xerces/impl/msg/ImplementationMessages.java b/src/org/apache/xerces/impl/msg/ImplementationMessages.java
deleted file mode 100644
index db3ec97..0000000
--- a/src/org/apache/xerces/impl/msg/ImplementationMessages.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.msg;
-
-/**
- * <p>
- * This file contains error and warning messages used by the Apache
- * Xerces parser. The messages are arranged in key and value
- * tuples in a ListResourceBundle.
- *
- * @version $Id$
- */
-public class ImplementationMessages
-    extends java.util.ListResourceBundle
-    {
-    /** The list resource bundle contents. */
-    public static final Object CONTENTS[][] = {
-// Internal message formatter messages
-        { "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." },
-        { "FormatFailed", "An internal error occurred while formatting the following message:\n  " },
-// Xerces implementation defined errors
-        { "ENC4", "Invalid UTF-8 code. (byte: 0x{0})" },
-        { "ENC5", "Invalid UTF-8 code. (bytes: 0x{0} 0x{1})" },
-        { "ENC6", "Invalid UTF-8 code. (bytes: 0x{0} 0x{1} 0x{2})" },
-        { "ENC7", "Invalid UTF-8 code. (bytes: 0x{0} 0x{1} 0x{2} 0x{3})" },
-        { "FileNotFound", "File \"{0}\" not found." },
-        { "VAL_BST", "Invalid ContentSpecNode.NODE_XXX value for binary op CMNode" },
-        { "VAL_CMSI", "Invalid CMStateSet bit index" },
-        { "VAL_CST", "Unknown ContentSpecNode.NODE_XXX value" },
-        { "VAL_LST", "Invalid ContentSpecNode.NODE_XXX value for leaf CMNode" },
-        { "VAL_NIICM", "Only * unary ops should be in the internal content model tree"},
-        { "VAL_NPCD", "PCData node found in non-mixed model content" },
-        { "VAL_UST", "Invalid ContentSpecNode.NODE_XXX value for unary op CMNode" },
-        { "VAL_WCGHI", "The input to whatCanGoHere() is inconsistent" },
-        { "INT_DCN", "Internal Error: dataChunk == NULL" },
-        { "INT_PCN", "Internal Error: fPreviousChunk == NULL" },
-        { "FatalError", "Stopping after fatal error: {0}" },
-    };
-
-    /** Returns the list resource bundle contents. */
-    public Object[][] getContents() {
-        return CONTENTS;
-    }
-
-} // class Message
diff --git a/src/org/apache/xerces/impl/msg/XMLMessageFormatter.java b/src/org/apache/xerces/impl/msg/XMLMessageFormatter.java
deleted file mode 100644
index a26797c..0000000
--- a/src/org/apache/xerces/impl/msg/XMLMessageFormatter.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.msg;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.PropertyResourceBundle;
-
-import org.apache.xerces.util.MessageFormatter;
-
-/**
- * XMLMessageFormatter provides error messages for the XML 1.0 Recommendation and for 
- * the Namespaces Recommendation
- *
- * @author Eric Ye, IBM
- * @version $Id$
- *
- */
-public class XMLMessageFormatter implements MessageFormatter {
-    /**
-     * The domain of messages concerning the XML 1.0 specification.
-     */
-    public static final String XML_DOMAIN = "http://www.w3.org/TR/1998/REC-xml-19980210";
-    public static final String XMLNS_DOMAIN = "http://www.w3.org/TR/1999/REC-xml-names-19990114";
-
-    // private objects to cache the locale and resource bundle
-    private Locale fLocale = null;
-    private ResourceBundle fResourceBundle = null;
-    
-    //
-    // MessageFormatter methods
-    //
-
-    /**
-     * Formats a message with the specified arguments using the given
-     * locale information.
-     * 
-     * @param locale    The locale of the message.
-     * @param key       The message key.
-     * @param arguments The message replacement text arguments. The order
-     *                  of the arguments must match that of the placeholders
-     *                  in the actual message.
-     * 
-     * @return Returns the formatted message.
-     *
-     * @throws MissingResourceException Thrown if the message with the
-     *                                  specified key cannot be found.
-     */
-    public String formatMessage(Locale locale, String key, Object[] arguments) 
-        throws MissingResourceException {
-        
-        if (fResourceBundle == null || locale != fLocale) {
-            if (locale != null) {
-                fResourceBundle = PropertyResourceBundle.getBundle("org.apache.xerces.impl.msg.XMLMessages", locale);
-                // memorize the most-recent locale
-                fLocale = locale;
-            }
-            if (fResourceBundle == null)
-                fResourceBundle = PropertyResourceBundle.getBundle("org.apache.xerces.impl.msg.XMLMessages");
-        }
-        
-        // format message
-        String msg;
-        try {
-            msg = fResourceBundle.getString(key);
-            if (arguments != null) {
-                try {
-                    msg = java.text.MessageFormat.format(msg, arguments);
-                } 
-                catch (Exception e) {
-                    msg = fResourceBundle.getString("FormatFailed");
-                    msg += " " + fResourceBundle.getString(key);
-                }
-            } 
-        }
-
-        // error
-        catch (MissingResourceException e) {
-            msg = fResourceBundle.getString("BadMessageKey");
-            throw new MissingResourceException(key, msg, key);
-        }
-
-        // no message
-        if (msg == null) {
-            msg = key;
-            if (arguments.length > 0) {
-                StringBuffer str = new StringBuffer(msg);
-                str.append('?');
-                for (int i = 0; i < arguments.length; i++) {
-                    if (i > 0) {
-                        str.append('&');
-                    }
-                    str.append(String.valueOf(arguments[i]));
-                }
-            }
-        }
-
-        return msg;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/msg/XMLMessages.properties b/src/org/apache/xerces/impl/msg/XMLMessages.properties
deleted file mode 100644
index 3ef4baf..0000000
--- a/src/org/apache/xerces/impl/msg/XMLMessages.properties
+++ /dev/null
@@ -1,262 +0,0 @@
-# This file contains error and warning messages related to XML
-# The messages are arranged in key and value tuples in a ListResourceBundle.
-#
-# @version
-
-        BadMessageKey = The error message corresponding to the message key can not be found.
-        FormatFailed = An internal error occurred while formatting the following message:\n  
-	
-# Document messages
-	PrematureEOF=Premature end of file.
-# 2.1 Well-Formed XML Documents
-        RootElementRequired = The root element is required in a well-formed document.
-# 2.2 Characters
-        InvalidCharInCDSect = An invalid XML character (Unicode: 0x{0}) was found in the CDATA section.
-        InvalidCharInContent = An invalid XML character (Unicode: 0x{0}) was found in the element content of the document.
-        TwoColonsInQName = An invalid second ':' was found in the element type or attribute name.
-        InvalidCharInMisc = An invalid XML character (Unicode: 0x{0}) was found in markup after the end of the element content.
-        InvalidCharInProlog = An invalid XML character (Unicode: 0x{0}) was found in the prolog of the document.
-        InvalidCharInXMLDecl = An invalid XML character (Unicode: 0x{0}) was found in the XML declaration.
-# 2.4 Character Data and Markup
-        CDEndInContent = The character sequence \"]]>\" must not appear in content unless used to mark the end of a CDATA section.
-# 2.7 CDATA Sections
-        CDSectUnterminated = The CDATA section must end with \"]]>\".
-# 2.8 Prolog and Document Type Declaration
-        XMLDeclMustBeFirst = The XML declaration may only appear at the very beginning of the document.
-        EqRequiredInXMLDecl = The '' = '' character must follow \"{0}\" in the XML declaration.
-        QuoteRequiredInXMLDecl = The value following \"{0}\" in the XML declaration must be a quoted string.
-        XMLDeclUnterminated = The XML declaration must end with \"?>\".
-        VersionInfoRequired = The version is required in the XML declaration.
-        SpaceRequiredBeforeVersionInXMLDecl = White space is required before the version pseudo attribute in the XML declaration.
-        SpaceRequiredBeforeEncodingInXMLDecl = White space is required before the encoding pseudo attribute in the XML declaration.
-        SpaceRequiredBeforeStandalone = White space is required before the encoding pseudo attribute in the XML declaration.
-        MarkupNotRecognizedInProlog = The markup in the document preceding the root element must be well-formed.
-        MarkupNotRecognizedInMisc = The markup in the document following the root element must be well-formed.
-	AlreadySeenDoctype = Already seen doctype.
-	ContentIllegalInProlog = Content is not allowed in prolog.
-	ReferenceIllegalInProlog = Reference is not allowed in prolog.
-# Trailing Misc
-	ContentIllegalInTrailingMisc=Content is not allowed in trailing section.
-	ReferenceIllegalInTrailingMisc=Reference is not allowed in trailing section.
-	
-# 2.9 Standalone Document Declaration
-        SDDeclInvalid = The standalone document declaration value must be \"yes\" or \"no\", not \"{0}\".
-# 2.12 Language Identification
-        XMLLangInvalid = The xml:lang attribute value \"{0}\" is an invalid language identifier.
-# 3. Logical Structures
-        ETagRequired = The element type \"{0}\" must be terminated by the matching end-tag \"</{0}>\".
-# 3.1 Start-Tags, End-Tags, and Empty-Element Tags
-        ElementUnterminated = Element type \"{0}\" must be followed by either attribute specifications, \">\" or \"/>\".
-        EqRequiredInAttribute = Attribute name \"{0}\" must be followed by the '' = '' character.
-	OpenQuoteExpected = Open quote is expected for attribute \"{0}|\".
-	CloseQuoteExpected = Close quote is expected for attribute \"{0}|\".
-        AttributeNotUnique = Attribute \"{1}\" was already specified for element \"{0}\".
-        AttributeNSNotUnique = Attribute \"{1}\" bound to namespace \"{2}\" was already specified for element \"{0}\".
-        ETagUnterminated = The end-tag for element type \"{0}\" must end with a ''>'' delimiter.
-        MarkupNotRecognizedInContent = The content of elements must consist of well-formed character data or markup.
-	DoctypeIllegalInContent = doctype not allowed in content.
-# 4.1 Character and Entity References
-        ReferenceUnterminated = The reference must be terminated by a ';' delimiter.
-# 4.3.2 Well-Formed Parsed Entities
-        ReferenceNotInOneEntity = The reference must be entirely contained within the same parsed entity.
-        ElementEntityMismatch = The element \"{0}\" must start and end within the same entity.
-	MarkupEntityMismatch=XML document structures must start and end within the same entity.
-	
-# Messages common to Document and DTD
-# 2.2 Characters
-        InvalidCharInAttValue = An invalid XML character (Unicode: 0x{2}) was found in the value of attribute \"{1}\".
-        InvalidCharInComment = An invalid XML character (Unicode: 0x{0}) was found in the comment.
-        InvalidCharInPI = An invalid XML character (Unicode: 0x{0}) was found in the processing instruction.
-        InvalidCharInInternalSubset = An invalid XML character (Unicode: 0x{0}) was found in the internal subset of the DTD.
-        InvalidCharInTextDecl = An invalid XML character (Unicode: 0x{0}) was found in the text declaration.
-# 2.3 Common Syntactic Constructs
-        QuoteRequiredInAttValue = The value of attribute \"{1}\" must begin with either a single or double quote character.
-        LessthanInAttValue = The value of attribute \"{1}\" must not contain the ''<'' character.
-        AttributeValueUnterminated = The value for attribute \"{1}\" must end with the matching quote character.
-# 2.5 Comments
-        InvalidCommentStart = Comment must start with \"<!--\".
-        DashDashInComment = The string \"--\" is not permitted within comments.
-        CommentUnterminated = The comment must end with \"-->\".
-	COMMENT_NOT_IN_ONE_ENTITY = The comment is not enclosed xin the same entity.
-# 2.6 Processing Instructions
-        PITargetRequired = The processing instruction must begin with the name of the target.
-        SpaceRequiredInPI = White space is required between the processing instruction target and data.
-        PIUnterminated = The processing instruction must end with \"?>\".
-        ReservedPITarget = The processing instruction target matching \"[xX][mM][lL]\" is not allowed.
-	PI_NOT_IN_ONE_ENTITY = The processing instruction is not enclosed in the same entity.
-# 2.8 Prolog and Document Type Declaration
-        VersionInfoInvalid = Invalid version \"{0}\".
-        VersionNotSupported = XML version \"{0}\" is not supported, only XML 1.0 is supported.
-# 4.1 Character and Entity References
-        DigitRequiredInCharRef = A decimal representation must immediately follow the \"&#\" in a character reference.
-        HexdigitRequiredInCharRef = A hexadecimal representation must immediately follow the \"&#x\" in a character reference.
-        SemicolonRequiredInCharRef = The character reference must end with the ';' delimiter.
-        InvalidCharRef = Character reference \"&#{0}\" is an invalid XML character.
-        NameRequiredInReference = The entity name must immediately follow the '&' in the entity reference.
-        SemicolonRequiredInReference = The reference to entity \"{0}\" must end with the '';'' delimiter.
-# 4.3.1 The Text Declaration
-        TextDeclMustBeFirst = The text declaration may only appear at the very beginning of the external parsed entity.
-        EqRequiredInTextDecl = The '' = '' character must follow \"{0}\" in the text declaration.
-        QuoteRequiredInTextDecl = The value following \"{0}\" in the text declaration must be a quoted string.
-        CloseQuoteMissingInTextDecl = closing quote in the value following \"{0}\" in the text declaration is missing.
-        SpaceRequiredBeforeVersionInTextDecl = White space is required before the version pseudo attribute in the text declaration.
-        SpaceRequiredBeforeEncodingInTextDecl = White space is required before the encoding pseudo attribute in the text declaration.
-        TextDeclUnterminated = The text declaration must end with \"?>\".
-        EncodingDeclRequired = The encoding declaration is required in the text declaration.
-	NoMorePseudoAttributes = no more pseudo attributes is allowed.
-	MorePseudoAttributes = more pseudo attributes is expected.
-	PseudoAttrNameExpected = a pseudo attribute name is expected. 
-# 4.3.2 Well-Formed Parsed Entities
-        CommentNotInOneEntity = The comment must be entirely contained within the same parsed entity.
-        PINotInOneEntity = The processing instruction must be entirely contained within the same parsed entity.
-# 4.3.3 Character Encoding in Entities
-        EncodingDeclInvalid = Invalid encoding name \"{0}\".
-        EncodingByteOrderUnsupported = Given byte order for encoding \"{0}\" is not supported.
-	
-# DTD Messages
-# 2.2 Characters
-        InvalidCharInEntityValue = An invalid XML character (Unicode: 0x{0}) was found in the literal entity value.
-        InvalidCharInExternalSubset = An invalid XML character (Unicode: 0x{0}) was found in the external subset of the DTD.
-        InvalidCharInIgnoreSect = An invalid XML character (Unicode: 0x{0}) was found in the excluded conditional section.
-        InvalidCharInPublicID = An invalid XML character (Unicode: 0x{0}) was found in the public identifier.
-        InvalidCharInSystemID = An invalid XML character (Unicode: 0x{0}) was found in the system identifier.
-# 2.3 Common Syntactic Constructs
-        SpaceRequiredAfterSYSTEM = White space is required after keyword SYSTEM in DOCTYPE decl.
-        QuoteRequiredInSystemID = The system identifier must begin with either a single or double quote character.
-        SystemIDUnterminated = The system identifier must end with the matching quote character.
-        SpaceRequiredAfterPUBLIC = White spaces are required after keyword PUBLIC in DOCTYPE decl.
-        QuoteRequiredInPublicID = The public identifier must begin with either a single or double quote character.
-        PublicIDUnterminated = The public identifier must end with the matching quote character.
-        PubidCharIllegal = The character (Unicode: 0x{0}) is not permitted in the public identifier.
-        SpaceRequiredBetweenPublicAndSystem = White spaces are required between publicId and systemId.
-# 2.8 Prolog and Document Type Declaration
-        MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = White space is required after \"<!DOCTYPE\" in the document type declaration.
-        MSG_ROOT_ELEMENT_TYPE_REQUIRED = The root element type must appear after \"<!DOCTYPE\" in the document type declaration.
-        DoctypedeclUnterminated = The document type declaration for root element type \"{0}\" must end with ''>''.
-        PEReferenceWithinMarkup = The parameter entity reference \"%{0};\" cannot occur within markup in the internal subset of the DTD.
-        MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = The markup declarations contained or pointed to by the document type declaration must be well-formed.
-# 2.10 White Space Handling
-        MSG_XML_SPACE_DECLARATION_ILLEGAL = The attribute declaration for \"xml:space\" must be given as an enumerated type whose only possible values are \"default\" and \"preserve\".
-# 3.2 Element Type Declarations
-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = White space is required after \"<!ELEMENT\" in the element type declaration.
-        MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL = The element type is required in the element type declaration.
-        MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = White space is required after the element type \"{0}\" in the element type declaration.
-        MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = The constraint is required after the element type \"{0}\" in the element type declaration.
-        ElementDeclUnterminated = The declaration for element type \"{0}\" must end with ''>''.
-# 3.2.1 Element Content
-        MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = A ''('' character or an element type is required in the declaration of element type \"{0}\".
-        MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = A '')'' is required in the declaration of element type \"{0}\".
-# 3.2.2 Mixed Content
-        MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = An element type is required in the declaration of element type \"{0}\".
-        MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = A '')'' is required in the declaration of element type \"{0}\".
-        MixedContentUnterminated = The mixed content model \"{0}\" must end with \")*\" when the types of child elements are constrained.
-# 3.3 Attribute-List Declarations
-        MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = White space is required after \"<!ATTLIST\" in the attribute-list declaration.
-        MSG_ELEMENT_TYPE_REQUIRED_IN_ATTLISTDECL = The element type is required in the attribute-list declaration.
-        MSG_SPACE_REQUIRED_BEFORE_ATTRIBUTE_NAME_IN_ATTDEF = White space is required before the attribute name in the attribute-list declaration for element \"{0}\".
-        AttNameRequiredInAttDef = The attribute name must be specified in the attribute-list declaration for element \"{0}\".
-        MSG_SPACE_REQUIRED_BEFORE_ATTTYPE_IN_ATTDEF = White space is required before the attribute type in the declaration of attribute \"{1}\" for element \"{0}\".
-        AttTypeRequiredInAttDef = The attribute type is required in the declaration of attribute \"{1}\" for element \"{0}\".
-        MSG_SPACE_REQUIRED_BEFORE_DEFAULTDECL_IN_ATTDEF = White space is required before the attribute default in the declaration of attribute \"{1}\" for element \"{0}\".
-# 3.3.1 Attribute Types
-        MSG_SPACE_REQUIRED_AFTER_NOTATION_IN_NOTATIONTYPE = White space must appear after \"NOTATION\" in the \"{1}\" attribute declaration.
-        MSG_OPEN_PAREN_REQUIRED_IN_NOTATIONTYPE = The ''('' character must follow \"NOTATION\" in the \"{1}\" attribute declaration.
-        MSG_NAME_REQUIRED_IN_NOTATIONTYPE = The notation name is required in the notation type list for the \"{1}\" attribute declaration.
-        NotationTypeUnterminated = The notation type list must end with '')'' in the \"{1}\" attribute declaration.
-        MSG_NMTOKEN_REQUIRED_IN_ENUMERATION = The name token is required in the enumerated type list for the \"{1}\" attribute declaration.
-        EnumerationUnterminated = The enumerated type list must end with '')'' in the \"{1}\" attribute declaration.
-# 3.3.2 Attribute Defaults
-        MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL = White space must appear after \"FIXED\" in the \"{1}\" attribute declaration.
-# 3.4 Conditional Sections
-        IncludeSectUnterminated = The included conditional section must end with \"]]>\".
-        IgnoreSectUnterminated = The excluded conditional section must end with \"]]>\".
-# 4.1 Character and Entity References
-        NameRequiredInPEReference = The entity name must immediately follow the '%' in the parameter entity reference.
-        SemicolonRequiredInPEReference = The parameter entity reference \"%{0};\" must end with the '';'' delimiter.
-# 4.2 Entity Declarations
-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = White space is required after \"<!ENTITY\" in the entity declaration.
-        MSG_SPACE_REQUIRED_BEFORE_PERCENT_IN_PEDECL = White space is required between \"<!ENTITY\" and the '%' character in the parameter entity declaration.
-        MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_PEDECL = White space is required between the '%' and the entity name in the parameter entity declaration.
-        MSG_ENTITY_NAME_REQUIRED_IN_ENTITYDECL = The name of the entity is required in the entity declaration.
-        MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = White space is required between the entity name \"{0}\" and the definition in the entity declaration.
-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = White space is required between \"NDATA\" and the notation name in the declaration for the entity \"{0}\".
-        MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = White space is required before \"NDATA\" in the declaration for the entity \"{0}\".
-        MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = The notation name is required after \"NDATA\" in the declaration for the entity \"{0}\".
-        EntityDeclUnterminated = The declaration for the entity \"{0}\" must end with ''>''.
-# 4.2.2 External Entities
-        ExternalIDRequired = The external entity declaration must begin with either \"SYSTEM\" or \"PUBLIC\".
-        MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = White space is required between \"PUBLIC\" and the public identifier.
-        MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = White space is required between the public identifier and the system identifier.
-	MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = White space is required between \"SYSTEM\" and the system identifier.
-        MSG_URI_FRAGMENT_IN_SYSTEMID = The fragment identifier should not be specified as part of the system identifier \"{0}\".
-# 4.7 Notation Declarations
-        MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = White space is required after \"<!NOTATION\" in the notation declaration.
-        MSG_NOTATION_NAME_REQUIRED_IN_NOTATIONDECL = The name of the notation is required in the notation declaration.
-        MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = White space is required after the notation name \"{0}\" in the notation declaration.
-        ExternalIDorPublicIDRequired = The declaration for the notation \"{0}\" must include a system or public identifier.
-        NotationDeclUnterminated = The declaration for the notation \"{0}\" must end with ''>''.
-	
-# Validation messages
-        DuplicateTypeInMixedContent = The element type \"{1}\" was already specified in the content model of the element decl \"{0}\".
-        ENTITIESInvalid = Attribute value \"{1}\" of type ENTITIES must be the names of one or more unparsed entities.
-        ENTITYInvalid = Attribute value \"{1}\" of type ENTITY must be the name of an unparsed entity.
-        IDDefaultTypeInvalid = The ID attribute \"{0}\" must have a declared default of \"#IMPLIED\" or \"#REQUIRED\".
-        IDInvalid = Attribute value \"{0}\" of type ID must be a name.
-        IDNotUnique = Attribute value \"{0}\" of type ID must be unique within the document.
-        IDREFInvalid = Attribute value \"{0}\" of type IDREF must be a name.
-        IDREFSInvalid = Attribute value \"{0}\" of type IDREFS must be one or more names.
-        ImproperDeclarationNesting = The replacement text of parameter entity \"{0}\" must include properly nested declarations.
-        ImproperGroupNesting = The replacement text of parameter entity \"{0}\" must include properly nested pairs of parentheses.
-        MSG_ATTRIBUTE_NOT_DECLARED = Attribute \"{1}\" must be declared for element type \"{0}\".
-        MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attribute \"{0}\" with value \"{1}\" must have a value from the list \"{2}\".
-        MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = The value \"{1}\" of attribute \"{0}\" must not be changed by normalization (to \"{2}\") in a standalone document.
-        MSG_CONTENT_INCOMPLETE = The content of element type \"{0}\" is incomplete, it must match \"{1}\".
-        MSG_CONTENT_INVALID = The content of element type \"{0}\" must match \"{1}\".
-        MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attribute \"{1}\" for element type \"{0}\" has a default value and must be specified in a standalone document.
-        MSG_DUPLICATE_ATTDEF = Attribute \"{1}\" is already declared for element type \"{0}\".
-        MSG_ELEMENT_ALREADY_DECLARED = Element type \"{0}\" must not be declared more than once.
-        MSG_ELEMENT_NOT_DECLARED = Element type \"{0}\" must be declared.
-        MSG_GRAMMAR_NOT_FOUND = Document is invalid: no grammar found.
-        MSG_ELEMENT_WITH_ID_REQUIRED = An element with the identifier \"{0}\" must appear in the document.
-        MSG_EXTERNAL_ENTITY_NOT_PERMITTED = The reference to external entity \"{0}\" is not permitted in a standalone document.
-        MSG_FIXED_ATTVALUE_INVALID = Attribute \"{1}\" with value \"{2}\" must have a value of \"{3}\".
-        MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Element type \"{0}\" already has attribute \"{1}\" of type ID, a second attribute \"{2}\" of type ID is not permitted.
-        MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Element type \"{0}\" already has attribute \"{1}\" of type NOTATION, a second attribute \"{2}\" of type NOTATION is not permitted.
-        MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = The notation \"{1}\" must be declared when referenced in the notation type list for attribute \"{0}\".
-        MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = The notation \"{1}\" must be declared when referenced in the unparsed entity declaration for \"{0}\".
-        MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = The reference to entity \"{0}\" declared in an external parsed entity is not permitted in a standalone document.
-        MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attribute \"{1}\" is required and must be specified for element type \"{0}\".
-        MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = White space must not occur between elements declared in an external parsed entity with element content in a standalone document.
-        NMTOKENInvalid = Attribute value \"{0}\" of type NMTOKEN must be a name token.
-        NMTOKENSInvalid = Attribute value \"{0}\" of type NMTOKENS must be one or more name tokens.
-        RootElementTypeMustMatchDoctypedecl = Document root element \"{1}\", must match DOCTYPE root \"{0}\".
-        UndeclaredElementInContentSpec = The content model of element \"{0}\" refers to the undeclared element \"{1}\".
-        ENTITYFailedInitializeGrammar =  ENTITYDatatype Validator: Failed Need to call initialize method with a valid Grammar reference. 	
-        ENTITYNotUnparsed = ENTITY \"{0}\" is not unparsed.
-        ENTITYNotValid = ENTITY \"{0}\" is not valid.
-
-# Entity related messages
-# 3.1 Start-Tags, End-Tags, and Empty-Element Tags
-        ReferenceToExternalEntity = The external entity reference \"&{0};\" is not permitted in an attribute value.
-# 4.1 Character and Entity References
-        EntityNotDeclared = The entity \"{0}\" was referenced, but not declared.
-        ReferenceToUnparsedEntity = The unparsed entity reference \"&{0};\" is not permitted.
-        RecursiveReference = Recursive entity reference \"{0}\". (Reference path: {1}),
-        RecursiveGeneralReference = Recursive general entity reference \"&{0};\". (Reference path: {1}),
-        RecursivePEReference = Recursive parameter entity reference \"%{0};\". (Reference path: {1}),
-# 4.3.3 Character Encoding in Entities
-        EncodingNotSupported = The encoding \"{0}\" is not supported.
-        EncodingRequired = A parsed entity not encoded in either UTF-8 or UTF-16 must contain an encoding declaration.
-	
-# Namespaces support
-# 4. Using Qualified Names
-        ElementPrefixUnbound = The prefix \"{0}\" for element \"{1}\" is not bound.
-        AttributePrefixUnbound = The prefix \"{0}\" for attribute \"{1}\" is not bound.
-	EmptyPrefixedAttName = The value of the attribute \"{0}\" is invalid. Prefixed namespace bindings may not be empty.
-        PrefixDeclared = The namespace prefix \"{0}\" was not declared.
-        MSG_ATT_DEFAULT_INVALID = The defaultValue \"{1}\" of attribute \"{0}\" is not legal as for the lexical constraints of this attribute type.
-
-# REVISIT: These need messages
-        MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
-	OpenQuoteMissingInDecl=OpenQuoteMissingInDecl
-	InvalidCharInLiteral=InvalidCharInLiteral
diff --git a/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties b/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
deleted file mode 100644
index fb7c574..0000000
--- a/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
+++ /dev/null
@@ -1,352 +0,0 @@
-# This file contains error and warning messages related to XML Schema
-# The messages are arranged in key and value tuples in a ListResourceBundle.
-#
-# @version
-
-        BadMessageKey = The error message corresponding to the message key can not be found.
-        FormatFailed = An internal error occurred while formatting the following message:\n
-
-# old stuff
-
-        NoValidatorFor = No validator for datatype {0}.
-        IncorrectDatatype = Incorrect datatype: {0}.
-        NotADatatype = {0} is not a datatype.
-        TextOnlyContentWithType = The content attribute must be 'textOnly' if you specify a type attribute.
-        NestedOnlyInElemOnly = Nested Element decls only allowed in elementOnly content.
-        EltRefOnlyInMixedElemOnly = Element references only allowed in mixed or elementOnly content.
-        OnlyInEltContent = {0} only allowed in elementOnly content.
-        OrderIsAll = {0} not allowed if the order is all.
-        DatatypeWithType = Datatype qualifiers can only be used if you specify a type attribute.
-        DatatypeQualUnsupported = The datatype qualifier {0} is not supported.
-        GroupContentRestricted = Error: {0} content must be one of choice, all or sequence.  Saw {1}.
-        UnknownBaseDatatype = Unknown base type {0} for type {1}.
-        BadAttWithRef = cannot use ref with any of type, block, final, abstract, nillable, default or fixed.
-        NoContentForRef = Cannot have child content for an element declaration that has a ref attribute.
-        IncorrectDefaultType = Incorrect type for {0}'s default value: {1} .
-        IllegalAttContent = Illegal content {0} in attribute group.
-        ValueNotInteger = Value of {0} is not an integer.
-        DatatypeError = Datatype error: {0}.
-        TypeAlreadySet = The type of the element has already been declared.
-        GenericError = Schema error: {0}.
-        UnexpectedError = UnexpectedError.
-        ContentError = Content (annotation?,..) is incorrect for type {0}.
-        AnnotationError = Annotation can only appear once: type {0}.
-        ListUnionRestrictionError","List | Union | Restriction content is invalid for type {0}.
-        ProhibitedAttributePresent = An attribute declared \"prohibited\" is present in this element definition.
-
-# Identity constraints
-        UniqueNotEnoughValues = Not enough values specified for <unique> identity constraint specified for element \"{0}\".
-        KeyNotEnoughValues = Not enough values specified for <key name=\"{1}\"> identity constraint specified for element \"{0}\".
-        KeyRefNotEnoughValues = Not enough values specified for <keyref name=\"{1}\"> identity constraint specified for element \"{0}\".
-        DuplicateField = Duplicate match in scope for field \"{0}\".
-        DuplicateUnique = Duplicate unique value [{0}] declared for identity constraint of element \"{1}\".
-        DuplicateKey = Duplicate key value [{0}] declared for identity constraint of element \"{1}\".
-        KeyNotFound = Key with value [{0}] not found for identity constraint of element \"{1}\".
-        UnknownField = Internal identity constraint error; unknown field \"{0}\
-        KeyRefReferNotFound = Key reference declaration \"{0}\" refers to unknown key with name \"{1}\".
-        FixedDiffersFromActual = The content of this element is not equivalent to the value of the \"fixed\" attribute in the element's declaration in the schema.
-
-
-# SimpleType
-
-
-        InvalidBaseType = itemType \"{0}\" must have a variety of atomic or union.
-        FieldMultipleMatch = Identity constraint error:  field \"{0}\" matches more than one value within the scope of its selector; fields must match unique values.
-        KeyRefOutOfScope = Identity Constraint error:  identity constraint \"{0}\" has a keyref which refers to a key or unique that is out of scope.
-        AbsentKeyValue = Identity Constraint error (cvc-identity-constraint.4.2.1):  element \"{0}\" has a key with no value.
-        KeyMatchesNillable = Identity Constraint error (cvc-identity-constraint.4.2.3):  element \"{0}\" has a key which matches an element which has nillable set to true.
-        BadMinMaxForAllElem = cos-all-limited.2:  The {0} attribute of an element in an all schema component must have the value zero or one.  The value \"{1}\" is incorrect.
-        BadMinMaxForGroupWithAll = Error:  cos-all-limited.1.2:  The {0} attribute in a reference to a named model group whose content model is \"all\" must have the value one.  The value \"{1}\" is incorrect.
-        SeqChoiceContentRestricted = Error:  {0} content must be zero or more of element, group, choice, sequence or any.  Saw \"{1}\".
-        AllContentRestricted = Error:  The content of all is restricted to zero or more elements.  Saw \"{0}\".
-        AllContentLimited = Error:  cos-all-limited.1.2: A group whose content is \"all\" must only appear as the content type of a complex type definition.  Saw group in \"{0}\".
-        MinMaxOnGroupChild = Error:  The child ''{1}'' of the named group definition ''{0}'' must not specify either the minOccurs or maxOccurs attribute.
-        BadMinMaxForAllGp = Error:  cos-all-limited.1.2:  The {0} attribute of a model group with \"all\" compositor that is part of a pair that is the content type of a complex type definition must have the value one.  The value \"{1}\" is incorrect.
-        SchemaLocation = Value \"{0}\" is not valid 'schemaLocation' syntax. anyURI must be followed by schema file.
-        UniqueParticleAttribution = Error: cos-nonambig: ({0}) and ({1}) violate the \"Unique Particle Attribution\" rule.
-        Con3X3ElementAppearance = Error: constraint 3.x.3: Element ''{0}'' cannot appear here.
-        Con3X3AttributeAppearance = Error: constraint 3.x.3: Attribute ''{1}'' cannot appear in element ''{0}''.
-        Con3X3AttributeMustAppear = Error: constraint 3.x.3: Attribute ''{1}'' must appear in element ''{0}''.
-        Con3X3AttributeInvalidValue = Error: constraint 3.x.3: Invalid attribute value for ''{1}'' in element ''{0}'': {2}.
-
-# ideally, we should only use the following error keys, not the ones
-# under "old stuff". and we should cover all of the following errors.
-
-        General = schema error: {0}.
-        Internal-Error = Internal error: {0}.
-
-#validation (3.X.4)
-
-        cvc-assess-attr = cvc-assess-attr: error.
-        cvc-assess-elt = cvc-assess-elt: error.
-        cvc-attribute.1 = cvc-attribute.1: error.
-        cvc-attribute.2 = cvc-attribute.2: error.
-        cvc-attribute.3 = cvc-attribute.3: The value ''{2}'' of attribute ''{1}'' on element ''{0}'' is not valid with respect to its type.
-        cvc-attribute.4 = cvc-attribute.4: The value ''{2}'' of attribute ''{1}'' on element ''{0}'' is not valid with respect to its fixed '{'value constraint'}'.
-        cvc-au = cvc-au: error.
-        cvc-complex-type.1 = cvc-complex-type.1: error.
-        cvc-complex-type.2.1 = cvc-complex-type.2.1: Element ''{0}'' must have no character or element information item [children], becaues the type's content type is empty.
-        cvc-complex-type.2.2 = cvc-complex-type.2.2: Element ''{0}'' must have no element [children], and the value must be valid.
-        cvc-complex-type.2.3 = cvc-complex-type.2.3: Element ''{0}'' must have no character [children], because the type's content type is element-only.
-        cvc-complex-type.2.4.a = cvc-complex-type.2.4.a: Invalid content starting with element ''{0}''. The content must match ''{1}''.
-        cvc-complex-type.2.4.b = cvc-complex-type.2.4.b: The content of element ''{0}'' is not complete. It must match ''{1}''.
-        cvc-complex-type.2.4.c = cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaratoin can be found for element ''{0}''.
-        cvc-complex-type.3.1 = cvc-complex-type.3.1: Value ''{2}'' of attribute ''{1}'' of element ''{0}'' is not valid with repect to the corresponding attribute use.
-        cvc-complex-type.3.2.1 = cvc-complex-type.3.2.1: Elment ''{0}'' does not have an attribute wildcard for attribute ''{1}''.
-        cvc-complex-type.3.2.2 = cvc-complex-type.3.2.2: Attribute ''{1}'' is not valid respect to the attribute wildcard of Elment ''{0}''.
-        cvc-complex-type.4 = cvc-complex-type.4: Attribute ''{1}'' must appear on element ''{0}''.
-        cvc-complex-type.5.1 = cvc-complex-type.5.1: In element ''{0}'', attribute ''{1}'' is a Wild ID. But there is already a Wild ID ''{2}''.
-        cvc-complex-type.5.2 = cvc-complex-type.5.2: In element ''{0}'', attribute ''{1}'' is a Wild ID. But there is already a attribute ''{2}'' from the attribute uses.
-        cvc-datatype-valid.1.1 = cvc-datatype-valid.1.1: error.
-        cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: error.
-        cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: error.
-        cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: error.
-        cvc-datatype-valid.2 = cvc-datatype-valid.2: error.
-        cvc-elt.1 = cvc-elt.1: Cannot find the declaration of element ''{0}''.
-        cvc-elt.2 = cvc-elt.2: '{'abstract'}' of the element declaration of ''{0}'' must be false.
-        cvc-elt.3.1 = cvc-elt.3.1: Attribute ''{1}'' must not apprear on element ''{0}'', because '{'nillable'}' is false.
-        cvc-elt.3.2.1 = cvc-elt.3.2.1: Element ''{0}'' must have no character or element information [children], because ''{1}'' is specified.
-        cvc-elt.3.2.2 = cvc-elt.3.2.2: There must be no fixed '{'value constraint'}' for element ''{0}'', because ''{1}'' is specified.
-        cvc-elt.4.1 = cvc-elt.4.1: The value ''{2}'' of attribute ''{1}'' is not a valid QName on element ''{0}''.
-        cvc-elt.4.2 = cvc-elt.4.2: Cannot resolve ''{1}'' to a type definition for element ''{0}''.
-        cvc-elt.4.3 = cvc-elt.4.3: Type ''{1}'' is not validly derived from the type definition of element ''{0}''.
-        cvc-elt.5.1.1 = cvc-elt.5.1.1: '{'value constraint'}' ''{2}'' of element ''{0}'' is not a valid default for type ''{1}''.
-        cvc-elt.5.1.2 = cvc-elt.5.1.2: error.
-        cvc-elt.5.2.2.1 = cvc-elt.5.2.2.1: Element ''{0}'' must have no element information item [children].
-        cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: The value ''{1}'' of element ''{0}'' does not match the fixed value constrinat value ''{2}''.
-        cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: The value ''{1}'' of element ''{0}'' does not match the value constrinat value ''{2}''.
-        cvc-elt = cvc-elt: error.
-        cvc-enumeration-valid = cvc-enumeration-valid: error.
-        cvc-facet-valid = cvc-facet-valid: error.
-        cvc-fractionDigits-valid = cvc-fractionDigits-valid: error.
-        cvc-id.1 = cvc-id.1: There is no ID/IDREF binding for IDREF ''{0}''.
-        cvc-id.2 = cvc-id.2: There are multiple occurrences of ID value ''{0}''.
-        cvc-identity-constraint = cvc-identity-constraint: error.
-        cvc-length-valid = cvc-length-valid: error.
-        cvc-maxExclusive-valid = cvc-maxExclusive-valid: error.
-        cvc-maxInclusive-valid = cvc-maxInclusive-valid: error.
-        cvc-maxLength-valid = cvc-maxLength-valid: error.
-        cvc-minExclusive-valid = cvc-minExclusive-valid: error.
-        cvc-minInclusive-valid = cvc-minInclusive-valid: error.
-        cvc-minLength-valid = cvc-minLength-valid: error.
-        cvc-model-group = cvc-model-group: error.
-        cvc-particle = cvc-particle: error.
-        cvc-pattern-valid = cvc-pattern-valid: error.
-        cvc-resolve-instance = cvc-resolve-instance: error.
-        cvc-simple-type = cvc-simple-type: error.
-        cvc-totalDigits-valid = cvc-totalDigits-valid: error.
-        cvc-type.1 = cvc-type.1: error.
-        cvc-type.2 = cvc-type.2: The type definition must not be abstract.
-        cvc-type.3.1.1 = cvc-type.3.1.1: [attributes] of element ''{0}'' must be empty, excepting those whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is one of type, nil, schemaLocation or noNamespaceSchemaLocation.
-        cvc-type.3.1.2 = cvc-type.3.1.2: Element ''{0}'' must have no element information item [children].
-        cvc-type.3.1.3 = cvc-type.3.1.3: The value ''{1}'' of element ''{0}'' is not valid.
-        cvc-type.3.2 = cvc-type.3.2: error.
-        cvc-type = cvc-type: error.
-        cvc-wildcard = cvc-wildcard: error.
-        cvc-wildcard-namespace = cvc-wildcard-namespace: error.
-
-#schema for Schemas
-
-        s4s-att-not-allowed = s4s-att-not-allowed: Attribute ''{1}'' cannot appear in element ''{0}''.
-        s4s-att-must-appear = s4s-att-must-appear: Attribute ''{1}'' must appear in element ''{0}''.
-        s4s-att-invalid-value = s4s-att-invalid-value: Invalid attribute value for ''{1}'' in element ''{0}'': {2}.
-        s4s-elt-schema-ns = s4s-elt-schema-ns: The namespace of element ''{0}'' must be from the schema namespace.
-        s4s-elt-invalid = s4s-elt-invalid: Element ''{0}'' is not a valid element in schema document.
-        s4s-elt-must-match = s4s-elt-must-match: The content of ''{0}'' must match {1}.
-
-#schema valid (3.X.3)
-
-        sch-props-correct = Duplicate declaration for an element ''{0}''
-        schema_reference = schema_reference: error.
-        src-annotation = src-annotation: error.
-        src-attribute.1 = src-attribute.1: ''default'' and ''fixed'' must not both be present in attribute declaration ''{0}''.
-        src-attribute.2 = src-attribute.2: : ''default'' is present in attribute ''{0}'', so ''use'' must be ''optional''.
-        src-attribute.3.1 = src-attribute.3.1: One of ''ref'' or ''name'' must be present in a local attribute declaration..
-        src-attribute.3.2 = src-attribute.3.2: The content must match (annotation?) for the attribute reference ''{0}''..
-        src-attribute.4 = src-attribute.4: Attribute ''{0}'' have both a type attribute and a annoymous simpleType child..
-        src-attribute.5 = src-attribute.5: error.
-        src-attribute_group = src-attribute_group: Attribute group ''{0}'' does not conform to the schema for schemas.  Element ''{1}'' is invalid or misplaced.
-        src-ct.0.1 = src-ct.0.1: Complex Type Definition Representation Error for type ''{0}''.  Element ''{1}'' is invalid, misplaced, or occurs too often.
-        src-element.1 = src-element.1: ''default'' and ''fixed'' must not both be present in element declaration ''{0}''.
-        src-ct.0.2 = src-ct.0.2: Complex Type Definition Representation Error for type ''{0}''.  Element ''{1}'' must not be empty.
-        src-ct.0.3 = src-ct.0.3: Complex Type Definition Representation Error for type ''{0}''.  A base type must be specified.
-        src-ct.1 = src-ct.1: Complex Type Definition Representation Error for type ''{0}''.  When complexContent is used, the base type must be a complexType.
-        src-ct.2 = src-ct.2: Complex Type Definition Representation Error for type ''{0}''.  When simpleContent is used, the base type must be a complexType whose content type is simple, or, only if extension is specified, a simple type.
-        src-element.2.1 = src-element.2.1: : One of ''ref'' or ''name'' must be present in a local element declaration.
-        src-element.2.2 = src-element.2.2: The content must match (annotation?) for the element reference ''{0}''.
-        src-element.3 = src-element.3: Element ''{0}'' have both a type attribute and a annoymous type child.
-        src-element.4 = src-element.4: error.
-        src-expredef = src-expredef: error.
-        src-identity-constraint.1 = src-identity-constraint.1: a ''<selector>'' or a ''<field>'' element can contain at most one ''<annotation>'' in its content; identity constraint ''{0}'' violates this constraint.
-        src-import.1.1 = src-import.1.1: The namespace attribute ''{0}'' of an <import> element information item must not be the same as the targetNamespace of the schema it exists in.
-        src-include.2 = src-include.2: the targetNamespace of the schema ''{0}'' must be identical to that of the including or redefining schema (''{1}'').
-        src-list-itemType-or-simpleType = src-list-itemType-or-simpleType: error.
-        src-model_group = src-model_group: error.
-        src-model_group_defn = src-model_group_defn: error.
-        src-multiple-enumerations = src-multiple-enumerations: error.
-        src-multiple-patterns = src-multiple-patterns: error.
-        src-notation = src-notation: error.
-        src-qname = src-qname: error.
-        src-redefine.1 = src-redefine.1: the component ''{0}'' occurs in a schema different from that which was redefined.
-        src-redefine.5 = src-redefine.5: <simpleType> or <complexType> children of <redefine> elements must have <extension> or <restriction> descendants referring to themselves.
-        src-redefine = src-redefine: A <redefine> element cannot contain a child of type ''{0}''.
-        src-redefine.6.1.1 = src-redefine.6.1.1:  if a group child of a <redefine> element contains a group ref'ing itself, it must have exactly 1; this one has ''{0}''.
-        src-redefine.6.1.2 = src-redefine.6.1.2:  the group ''{0}'' which contains a reference to a group being redefined must have minOccurs = maxOccurs = 1.
-        src-redefine.6.2.1 = src-redefine.6.2.1: no group in the redefined schema with a name matching ''{0}''.
-        src-redefine.6.2.2 = src-redefine.6.2.2: group ''{0}'' does not properly restrict the group it redefines; constraint violated:  ''{1}''.
-        src-redefine.7.1 = src-redefine.7.1:  if an attributeGroup child of a <redefine> element contains an attributeGroup ref'ing itself, it must have exactly 1; this one has ''{0}''.
-        src-redefine.7.2.1 = src-redefine.7.2.1: no attributeGroup in the redefined schema with a name matching ''{0}''.
-        src-redefine.7.2.2 = src-redefine.7.2.2: attributeGroup ''{0}'' does not properly restrict the attributeGroup it redefines; constraint violated:  ''{1}''.
-        src-resolve = src-resolve: Cannot resolve the name ''{0}'' to a(n) {1} component.
-        src-resolve.4 = src-resolve.4: Components from namespace ''{1}'' are not referenceable from schema document ''{0}''.
-        src-restriction-base-or-simpleType = src-restriction-base-or-simpleType: error.
-        src-simple-type = src-simple-type: error.
-        src-single-facet-value = src-single-facet-value: error.
-        src-union-memberTypes-or-simpleTypes = src-union-memberTypes-or-simpleTypes: error.
-        src-wildcard = src-wildcard: error.
-        st-restrict-facets = st-restrict-facets: error.
-
-#constraint valid (3.X.6)
-
-        ag-props-correct = ag-props-correct: error.
-        an-props-correct = an-props-correct: error.
-        a-props-correct.1 = a-props-correct.1: error.
-        a-props-correct.2 = a-props-correct.2: Invalid value constraint value ''{1}'' in attribute ''{0}''..
-        a-props-correct.3 = a-props-correct.3: There must not be a '{'value constraint'}' on attribute ''{0}'', because its '{'type definition'}' is or is derived from ID.
-        au-props-correct.1 = au-props-correct.1: error.
-        au-props-correct.2 = au-props-correct.2: The '{'value constraint'}' of the reference to attribute ''{0}'' must be fixed and its value must match the '{'value constraint'}' of ''{0}''.
-        c-fields-xpaths = c-fields-xpaths: error.
-        cos-all-limited = cos-all-limited: error.
-        cos-all-limited.1.2 = cos-all-limited.1.2:  Error for type ''{0}''.  An all group must comprise the content of the model group.
-        cos-applicable-facets = cos-applicable-facets: error.
-        cos-aw-intersect = cos-aw-intersect: error.
-        cos-aw-union = cos-aw-union: error.
-        cos-choice-range = cos-choice-range: error.
-        cos-ct-derived-ok = cos-ct-derived-ok: error.
-        cos-ct-extends = cos-ct-extends: error.
-        cos-ct-extends.1.1 = cos-ct-extends.1.1: Error for type ''{0}''.  Extension must not be in the final set of the base type.
-        cos-ct-extends.1.4.2.2.2.2.1 = cos-ct-extends.1.4.2.2.2.2.1: Error for type ''{0}''.  The content type of a derived type and that of its base must both be mixed or element-only.
-        cos-element-consistent = cos-element-consistent: Error for type ''{0}''.  Multiple elements with name ''{1}'', with different types, appear in the model group.  
-        cos-equiv-class = cos-equiv-class: error.
-        cos-equiv-derived-ok-rec = cos-equiv-derived-ok-rec: error.
-        cos-group-emptiable = cos-group-emptiable: error.
-        cos-list-of-atomic = cos-list-of-atomic: type ''{0}''.
-        cos-no-circular-unions = cos-no-circular-unions: error.
-        cos-nonambig = cos-nonambig: {0} and {1} (or elements from their substitution group) violate \"Unique Particle Attribution\".
-        cos-ns-subset = cos-ns-subset: error.
-        cos-particle-extend = cos-particle-extend: error.
-        cos-particle-restrict = cos-particle-restrict: error.
-        cos-particle-restrict.2 = cos-particle-restrict.2: Forbidden particle restriction:  ''{0}''.
-        cos-seq-range = cos-seq-range: error.
-        cos-st-derived-ok = cos-st-derived-ok: error.
-        cos-st-restricts = cos-st-restricts: error.
-        cos-valid-default.1 = cos-valid-default.1: error.
-        cos-valid-default.2.1 = cos-valid-default.2.1: Element ''{0}'' has a value constraint and must have a mixed or simple content model.
-        cos-valid-default.2.2.1 = cos-valid-default.2.2.1: error.
-        cos-valid-default.2.2.2 = cos-valid-default.2.2.2: For element ''{0}'', the '{'content type'}' is mixed, then the '{'content type'}'''s particle must be emptiable.
-        c-props-correct.1 = c-props-correct.1: error.
-        c-props-correct.2 = c-props-correct.2: Cardinality of Fields for keyref ''{0}'' and key ''{1}'' must match.
-        c-selector-xpath = c-selector-xpath: error.
-        ct-props-correct = ct-props-correct: error.
-        ct-props-correct.4 = ct-props-correct.4: Error for type ''{0}''.  Duplicate attribute uses with the same name and target namespace are specified.  Name of duplicate attribute use is ''{1}''.
-        ct-props-correct.5 = ct-props-correct.5: Error for type ''{0}''.  Two attribute declarations, ''{1}'' and ''{2}'' have types which derived from ID.
-        derivation-ok-restriction = derivation-ok-restriction: error.
-        derivation-ok-restriction.1 = derivation-ok-restriction.1: Error for type ''{0}''.  Restriction must not be in the final set of the base type.
-        derivation-ok-restriction.2.1.1= derivation-ok-restriction.2.1.1: Error for type ''{0}''.  An attibute use in this type has a REQUIRED setting which is inconsistent with a matching attribute use in the base type.
-        derivation-ok-restriction.2.1.2= derivation-ok-restriction.2.1.2: Error for type ''{0}''.  An attribute use in this type has a type which is not validly derived from the type of the matching attribute use in the base type.
-        derivation-ok-restriction.2.1.3= derivation-ok-restriction.2.1.3: Error for type ''{0}''.  An attribute use in this type has an effective value constraint which is not consistent with the effective value constraint of the matching attribute use in the base type.
-        derivation-ok-restriction.2.2= derivation-ok-restriction.2.2: Error for type ''{0}''.  An attribute use in this type does not have a matching attribute use in the base, and, the base type does not have a wildcard which matches this attribute use.
-        derivation-ok-restriction.3= derivation-ok-restriction.3: Error for type ''{0}''.  There is an attribute use in the base type with REQUIRED as true, which does not have a matching attribute use in the derived type.
-        derivation-ok-restriction.4= derivation-ok-restriction.4: Error for type ''{0}''.  The wildcard in the derivation is not a valid wildcard subset of the one in the base.
-        derivation-ok-restriction.5.1.1 = derivation-ok-restriction.5.1.1: Error for type ''{0}''.  The content type is not a valid restriction of the content type of the base.
-        derivation-ok-restriction.5.2 = derivation-ok-restriction.5.2: Error for type ''{0}''.  The content type of this type is empty, but the content type of the base is not.
-        derivation-ok-restriction.5.3 = derivation-ok-restriction.5.3: Error for type ''{0}''.  The particle of the type is not a valid restriction of the particle of the base.
-        enumeration-required-notation = enumeration-required-notation: error.
-        enumeration-valid-restriction = enumeration-valid-restriction: error.
-        e-props-correct.1 = e-props-correct.1: error.
-        e-props-correct.2 = e-props-correct.2: Invalid value constraint value ''{1}'' in element ''{0}''.
-        e-props-correct.3 = e-props-correct.3: The '{'type definition'}' of element ''{0}'' must be validly derived from the '{'type definition'}' of the substitutionHead ''{1}''.
-        e-props-correct.4 = e-props-correct.4: There must not be a '{'value constraint'}' on element ''{0}'', because its '{'type definition'}' or '{'type definition'}'''s '{'content type'}' is or is derived from ID.
-        fractionDigits-totalDigits = fractionDigits-totalDigits: error.
-        length-minLength-maxLength = length-minLength-maxLength: error.
-        length-valid-restriction = length-valid-restriction: error.
-        maxExclusive-valid-restriction = maxExclusive-valid-restriction: error.
-        maxInclusive-maxExclusive = maxInclusive-maxExclusive: error.
-        maxInclusive-valid-restriction = maxInclusive-valid-restriction: error.
-        maxLength-valid-restriction = maxLength-valid-restriction: error.
-        mgd-props-correct = mgd-props-correct: error.
-        mg-props-correct = mg-props-correct: error.
-        minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: error.
-        minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: error.
-        minExclusive-valid-restriction = minExclusive-valid-restriction: error.
-        minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: error.
-        minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: error.
-        minInclusive-minExclusive = minInclusive-minExclusive: error.
-        minInclusive-valid-restriction = minInclusive-valid-restriction: error.
-        minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: error.
-        minLength-valid-restriction = minLength-valid-restriction: error.
-        no-xmlns = no-xmlns: The '{'name'}' of an attribute declaration must not match ''xmlns''.
-        no-xsi = no-xsi: The '{'target namespace'}' of an attribute declaration must not match ''{0}''.
-        p-props-correct.2.1 = p-props-correct.2.1: '{'min occurs'}' = ''{1}'' must not be greater than '{'max occurs'}' = ''{2}'' for ''{0}''.
-        range-ok = range-ok: error.
-        rcase-MapAndSum = rcase-MapAndSum: error.
-        rcase-MapAndSum.1 = rcase-MapAndSum.1: There is not a complete functional mapping between the particles.  
-        rcase-MapAndSum.2 = rcase-MapAndSum.2: Group''s occurrence range is not a valid restriction of base group''s occurrence range.
-        rcase-NameAndTypeOK = rcase-NameAndTypeOK: error.
-        rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: Elements have names and target namespaces which are not the same:  Element ''{0}'' in namespace ''{1}'' and element ''{2}'' in namespace ''{3}''.
-        rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: Base particle''s nillable is true, or the restricted particle''s nillable is false.  Element is ''{0}''.
-        rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: The occurrence range is not a valid restriction of the base''s range.   Element is ''{0}''. 
-        rcase-NameAndTypeOK.4 = rcase-NameAndTypeOK.4: Element ''{0}'' is either not fixed, or not fixed with the same value as that in the base. 
-        rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: Identity constraints for element ''{0}'' are not a subset of those in base. 
-        rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: The disallowed substitutions for element ''{0}'' are not a superset of those in the base. 
-        rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: Element ''{0}'' has a type which does not derive from the type of the base element.
-        rcase-NSCompat = rcase-NSCompat: error.
-        rcase-NSCompat.1 = rcase-NSCompat.2: Element ''{0}'' has a namespace ''{1}'' which is not allowed by the wildcard in the base. 
-        rcase-NSCompat.2 = rcase-NSCompat.2: The occurrence range for element ''{0}'' is not a valid restriction of base's wildcard occurrence range. 
-        rcase-NSRecurseCheckCardinality = rcase-NSRecurseCheckCardinality: error.
-        rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: Group''s occurrence range is not a valid restriction of base wildcard''s range.  
-        rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: There is not a complete functional mapping between the particles.   
-        rcase-NSSubset = rcase-NSSubset: error.
-        rcase-NSSubset.1 = rcase-NSSubset.1: Wildcard is not a subset of corresponding wildcard in base. 
-        rcase-NSSubset.2 = rcase-NSSubset.2: Wildcard''s occurrence range is not a valid restriction of that in the base.
-        rcase-Recurse = rcase-Recurse: error.
-        rcase-Recurse.1 = rcase-Recurse.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range. 
-        rcase-Recurse.2 = rcase-Recurse.2: There is not a complete functional mapping between the particles.  
-        rcase-RecurseAsIfGroup = rcase-RecurseAsIfGroup: error.
-        rcase-RecurseLax = rcase-RecurseLax: error.
-        rcase-RecurseLax.1 = rcase-RecurseLax.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range. 
-        rcase-RecurseLax.2 = rcase-RecurseLax.2: There is not a complete functional mapping between the particles.  
-        rcase-RecurseUnordered = rcase-RecurseUnordered: error.
-        rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range. 
-        rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: There is not a complete functional mapping between the particles.  
-        sch-props-correct.1 = sch-props-correct.1: schema components of type ''{0}'' cannot occur after declarations or are not permitted as children of a <schema> element.
-        sch-props-correct.2 = sch-props-correct.2: a schema cannot contain two global components with the same name; this one contains two occurrences of ''{0}''.
-        st-props-correct.1 = st-props-correct.1: error.
-        st-props-correct.2 = st-props-correct.2: circular definitions detected for type ''{0}''.
-        st-props-correct.3 = st-props-correct.3: {final} of the {base type definition} contains restriction.
-        st-props-correct.4.1 = st-props-correct.4.1: The type definition is not a valid restriction with repect to the base type ''{0}''.
-        st-props-correct.4.2.1 = st-props-correct.4.2.1: {final} of the {base type definition} contains list.
-        st-props-correct.4.2.2 = st-props-correct.4.2.2: {final} of the {base type definition} contains union.
-        totalDigits-valid-restriction = totalDigits-valid-restriction: error.
-        whiteSpace-valid-restriction = whiteSpace-valid-restriction: error.
-        w-props-correct = w-props-correct: error.
-
-    ValidationRoot = Validation Root Valid (ID/IDREF) (§3.3.4): validation was not successful.
-
-
-# SimpleTypes
-   ListUnionRestrictionError = List | Union | Restriction content is invalid for type ''{0}''
-   dt-unsupported-derivation =  Derivation of type {0} is unsupported.
-   dt-simpleType = The content of ''{0}'' named ''{1}'' must match {2}.
-   dt-unknown-basetype  = Unknown base type ''{0}'' for a type ''{1}''
-   dt-restiction-final = the base type ''{0}'' does not allow itself to be used as the base for a restriction and/or as a type in a list and/or union
-   dt-list-itemType = Datatypes 4.1.3: error in the simpleType ''{0}'' itemType attribute or simpleType child constraint
-   dt-restriction-base = Datatypes 4.1.3: error in the simpleType ''{0}'' base attribute or simpleType child constraint
-   dt-union-memberType = Datatypes 4.1.3: error in the simpleType ''{0}'' - memberTypes attribute or simpleType children constraint
-   dt-enumeration-notation = Datatypes 3.2.19: enumeration facet value required for NOTATION type in element/attribute ''{0}''
-
-
-# Datatypes
-  NotationContentRestricted = content for notation ''{0}'' must be: (annotation?)
-  DatatypeFacetError = Invalid facet: ''{0}''
-  WhitespaceFacetError = whiteSpace value ''{0}'' for this type must be collapse.
diff --git a/src/org/apache/xerces/impl/validation/EntityState.java b/src/org/apache/xerces/impl/validation/EntityState.java
deleted file mode 100644
index acc91de..0000000
--- a/src/org/apache/xerces/impl/validation/EntityState.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.validation;
-
-
-/**
- * The entity state interface defines methods that must be implemented
- * by components that store information about entity declarations, as well as by
- * entity validator that will need to validate attributes of type entity.
- * 
- * @author Elena Litani, IBM
- */
-public interface EntityState {
-    /**
-     * Query method to check if entity with this name was declared.
-     * 
-     * @param name
-     * @return 
-     */
-    public boolean isEntityDeclared (String name);
-
-    /**
-     * Query method to check if entity is unparsed.
-     * 
-     * @param name
-     * @return 
-     */
-    public boolean isEntityUnparsed (String name);
-}
diff --git a/src/org/apache/xerces/impl/validation/Grammar.java b/src/org/apache/xerces/impl/validation/Grammar.java
deleted file mode 100644
index f519dab..0000000
--- a/src/org/apache/xerces/impl/validation/Grammar.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.validation;
-
-import java.lang.Integer;
-import java.util.Hashtable;
-
-import org.apache.xerces.impl.dtd.XMLAttributeDecl;
-import org.apache.xerces.impl.dtd.XMLNotationDecl;
-import org.apache.xerces.impl.dtd.XMLEntityDecl;
-import org.apache.xerces.impl.dtd.XMLSimpleType;
-import org.apache.xerces.impl.dtd.models.CMNode;
-import org.apache.xerces.impl.dtd.models.CMAny;
-import org.apache.xerces.impl.dtd.models.CMLeaf;
-import org.apache.xerces.impl.dtd.models.CMUniOp;
-import org.apache.xerces.impl.dtd.models.CMBinOp;
-import org.apache.xerces.impl.dtd.models.DFAContentModel;
-import org.apache.xerces.impl.dtd.models.MixedContentModel;
-import org.apache.xerces.impl.dtd.models.SimpleContentModel;
-import org.apache.xerces.impl.validation.EntityState;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidator;
-import org.apache.xerces.impl.dtd.models.ContentModelValidator;
-import org.apache.xerces.util.SymbolTable;
-
-import org.apache.xerces.xni.QName;
-
-/**
- * A generic grammar for use in validating XML documents. The Grammar
- * object stores the validation information in a compiled form. Specific
- * subclasses extend this class and "populate" the grammar by compiling 
- * the specific syntax (DTD, Schema, etc) into the data structures used
- * by this object.
- * <p>
- * <strong>Note:</strong> The Grammar object is not useful as a generic 
- * grammar access or query object. In other words, you cannot round-trip 
- * specific grammar syntaxes with the compiled grammar information in 
- * the Grammar object. You <em>can</em> create equivalent validation
- * rules in your choice of grammar syntax but there is no guarantee that
- * the input and output will be the same.
- * 
- * Right now, this class is a shell; eventually, code
- * will be moved from dtd.Grammar here.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Jeffrey Rodriguez, IBM
- * @author Eric Ye, IBM
- * @author Andy Clark, IBM
- * @author Neil Graham, IBM
- *
- * @version $Id$
- */
-public abstract class Grammar {
-
-} // class Grammar
diff --git a/src/org/apache/xerces/impl/validation/GrammarPool.java b/src/org/apache/xerces/impl/validation/GrammarPool.java
deleted file mode 100644
index 5adec07..0000000
--- a/src/org/apache/xerces/impl/validation/GrammarPool.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.validation;
-
-import org.apache.xerces.impl.validation.Grammar;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-/**
- * Stores grammars in a pool associated to a specific key. This grammar pool
- * implementation stores two types of grammars: those keyed by the root element
- * name, and those keyed by the grammar's target namespace.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Jeffrey Rodriguez, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class GrammarPool {
-
-    //
-    // Data
-    //
-
-    /** Grammars associated with element root name. */
-    protected Hashtable fGrammars = new Hashtable();
-
-    /** Grammars associated with namespaces. */
-    protected Hashtable fGrammarsNS = new Hashtable();
-    protected Grammar fNoNSGrammar = null;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public GrammarPool() {
-    } // <init>()
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Puts the specified grammar into the grammar pool and associate it to
-     * a root element name.
-     * 
-     * @param rootElement Root element name.
-     * @param grammar     The grammar.
-     */
-    public void putGrammar(String rootElement, Grammar grammar) {
-        fGrammars.put(rootElement, grammar);
-    } // putGrammar(String,Grammar)
-
-    /**
-     * Puts the specified grammar into the grammar pool and associate it to
-     * a target namespace.
-     *
-     * @param namespace The grammar namespace.
-     * @param grammar   The grammar.
-     */
-    public void putGrammarNS(String namespace, Grammar grammar) {
-        if(namespace != null) {
-            fGrammarsNS.put(namespace, grammar);
-        } else {
-            fNoNSGrammar = grammar;
-        }
-    } // putGrammarNS(String,Grammar)
-
-    /**
-     * Returns the grammar associated to the specified root element name.
-     * 
-     * @param rootElement Root element name.
-     */
-    public Grammar getGrammar(String rootElement) {
-        return (Grammar)fGrammars.get(rootElement);
-    } // getGrammar(String):Grammar
-
-    /**
-     * Returns the grammar associated to the specified target namespace.
-     * 
-     * @param namespace Target namespace.
-     */
-    public Grammar getGrammarNS(String namespace) {
-        return ((namespace == null)?
-            fNoNSGrammar :
-            (Grammar)fGrammarsNS.get(namespace));
-    } // getGrammarNS(String):Grammar
-
-    /**
-     * Removes the grammar associated to the specified root elememt name from the
-     * grammar pool and returns the removed grammar.
-     * 
-     * @param rootElement Root element name.
-     */
-    public Grammar removeGrammar(String rootElement) {
-        if (fGrammars.contains(rootElement)) {
-            return (Grammar)fGrammars.remove(rootElement);
-        }
-        return null;
-    } // removeGrammar(String):Grammar
-
-    /**
-     * Removes the grammar associated to the specified namespace from the
-     * grammar pool and returns the removed grammar.
-     * 
-     * @param namespace Target namespace.
-     */
-    public Grammar removeGrammarNS(String namespace) {
-        if(namespace == null) {
-            Grammar tempGrammar = fNoNSGrammar;
-            fNoNSGrammar = null;
-            return tempGrammar;
-        } else if (fGrammarsNS.contains(namespace)) {
-            return (Grammar)fGrammarsNS.remove(namespace);
-        }
-        return null;
-    } // removeGrammarNS(String):Grammar
-
-    /**
-     * Returns true if the grammar pool contains a grammar associated
-     * to the specified root element name.
-     *
-     * @param rootElement Root element name.
-     */
-    public boolean containsGrammar(String rootElement) {
-        return fGrammars.containsKey(rootElement);
-    } // containsGrammar(String):boolean
-
-    /**
-     * Returns true if the grammar pool contains a grammar associated
-     * to the specified target namespace.
-     *
-     * @param namespace Target namespace.
-     */
-    public boolean containsGrammarNS(String namespace) {
-        return fGrammarsNS.containsKey(namespace);
-    } // containsGrammarNS(String):boolean
-
-    public Grammar [] getGrammars() {
-        int grammarSize = fGrammars.size() ;
-        Grammar [] toReturn = new Grammar[grammarSize];
-        int pos = 0;
-        Enumeration grammars = fGrammars.elements();
-        while (grammars.hasMoreElements()) {
-            toReturn[pos++] = (Grammar)grammars.nextElement();
-        }
-        return toReturn;
-    } // getGrammars()
-
-    /**
-     * Returns all grammars associated with namespaces.
-     * 
-     */
-    public Grammar [] getGrammarsNS() {
-        int grammarSize = fGrammarsNS.size() + ((fNoNSGrammar == null) ? 0 : 1);
-        Grammar [] toReturn = new Grammar[grammarSize];
-        int pos = 0;
-        Enumeration grammarsNS = fGrammarsNS.elements();
-        while (grammarsNS.hasMoreElements()) {
-            toReturn[pos++] = (Grammar)grammarsNS.nextElement();
-        }
-        if(pos < grammarSize) 
-            toReturn[pos++] = fNoNSGrammar;
-        return toReturn; 
-    } // getGrammarsNS()
-} // class GrammarPool
diff --git a/src/org/apache/xerces/impl/validation/ValidationContext.java b/src/org/apache/xerces/impl/validation/ValidationContext.java
deleted file mode 100644
index 995df9f..0000000
--- a/src/org/apache/xerces/impl/validation/ValidationContext.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.validation;
-
-/**
- * ValidationContext has all the information required for the
- * validation of: id, idref, entity, notation, qname
- *
- * @author Sandy Gao, IBM
- */
-public interface ValidationContext {
-    // whether to validate against facets
-    public boolean needFacetChecking();
-
-    // whether to do extra id/idref/entity checking
-    public boolean needExtraChecking();
-
-    // entity
-    public boolean isEntityDeclared (String name);
-    public boolean isEntityUnparsed (String name);
-
-    // id
-    public boolean isIdDeclared (String name);
-    public void    addId(String name);
-
-    // idref
-    public void addIdRef(String name);
-
-    // get symbol from symbol table
-    public String getSymbol (String symbol);
-
-    // qname
-    public String getURI(String prefix);
-}
diff --git a/src/org/apache/xerces/impl/validation/ValidationManager.java b/src/org/apache/xerces/impl/validation/ValidationManager.java
deleted file mode 100644
index ef154c0..0000000
--- a/src/org/apache/xerces/impl/validation/ValidationManager.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.validation;
-
-import org.apache.xerces.impl.validation.ValidationState;
-import org.apache.xerces.xni.parser.XMLComponent;
-
-/**
- * ValidationManager is a coordinator property for validators in the 
- * pipeline. Each validator must know how to interact with
- * this property. Validators are not required to know what kind of 
- * other validators present in the pipeline, but should understand
- * that there are others and that some coordination is required.
- * 
- * @author Elena Litani, IBM
- */
-public class ValidationManager {
-
-    // REVISIT: should validation/state be another property?
-    protected final ValidationState fValidationState= new ValidationState();
-    protected boolean fGrammarFound = false;
-
-    public ValidationState getValidationState (){
-        return fValidationState;
-    }
-
-    public void setGrammarFound(boolean grammar){
-        fGrammarFound = grammar;
-    }
-        
-    public boolean isGrammarFound(){
-        return fGrammarFound;
-    }
-
-    // REVISIT: handle other validation coordination
-    //          the following will depend on the final set of validation
-    //          features
-    
-    //protected XMLComponent fLastValidator = null;
-    // public boolean isLastValidationComponent( XMLComponent validator){
-    // public void setLastValidationComponent( XMLComponent validator){
-        
-    public void reset (){
-        fValidationState.reset();
-        fGrammarFound = false;
-    }
-}
-
-
diff --git a/src/org/apache/xerces/impl/validation/ValidationState.java b/src/org/apache/xerces/impl/validation/ValidationState.java
deleted file mode 100644
index d138032..0000000
--- a/src/org/apache/xerces/impl/validation/ValidationState.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.validation;
-
-import org.apache.xerces.util.NamespaceSupport;
-import org.apache.xerces.util.SymbolTable;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-/**
- * Implementation of ValidationContext inteface. Used to establish an
- * environment for simple type validation.
- *
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public class ValidationState implements ValidationContext {
-
-    //
-    // private data
-    //
-    private boolean fExtraChecking              = true;
-    private boolean fFacetChecking              = true;
-
-    private EntityState fEntityState            = null;
-    private NamespaceSupport fNamespaceSupport  = null;
-    private SymbolTable fSymbolTable            = null;
-
-    //REVISIT: Should replace with a lighter structure.
-    private final Hashtable fIdTable    = new Hashtable();
-    private final Hashtable fIdRefTable = new Hashtable();
-    private final static Object fNullValue = new Object();
-
-    //
-    // public methods
-    //
-    public void setExtraChecking(boolean newValue) {
-        fExtraChecking = newValue;
-    }
-
-    public void setFacetChecking(boolean newValue) {
-        fFacetChecking = newValue;
-    }
-
-    public void setEntityState(EntityState state) {
-        fEntityState = state;
-    }
-
-    public void setNamespaceSupport(NamespaceSupport namespace) {
-        fNamespaceSupport = namespace;
-    }
-
-    public void setSymbolTable(SymbolTable sTable) {
-        fSymbolTable = sTable;
-    }
-
-    public boolean checkIDRefID () {
-        Enumeration en = fIdRefTable.keys();
-
-        String key;
-        while (en.hasMoreElements()) {
-            key = (String)en.nextElement();
-            if (!fIdTable.containsKey(key)) {
-                  return false;
-            }
-        }
-        return true;
-    }
-
-    public void reset () {
-        fExtraChecking = true;
-        fFacetChecking = true;
-        fIdTable.clear();
-        fIdRefTable.clear();
-        fEntityState = null;
-        fNamespaceSupport = null;
-        fSymbolTable = null;
-    }
-
-    /**
-     * The same validation state can be used to validate more than one (schema)
-     * validation roots. Entity/Namespace/Symbol are shared, but each validation
-     * root needs its own id/idref tables. So we need this method to reset only
-     * the two tables.
-     */
-    public void resetIDTables() {
-        fIdTable.clear();
-        fIdRefTable.clear();
-    }
-
-    //
-    // implementation of ValidationContext methods
-    //
-
-    // whether to do extra id/idref/entity checking
-    public boolean needExtraChecking() {
-        return fExtraChecking;
-    }
-
-    // whether to validate against facets
-    public boolean needFacetChecking() {
-        return fFacetChecking;
-    }
-
-    // entity
-    public boolean isEntityDeclared (String name) {
-        if (fEntityState !=null) {
-            return fEntityState.isEntityDeclared(name);
-        }
-        return false;
-    }
-    public boolean isEntityUnparsed (String name) {
-        if (fEntityState !=null) {
-            return fEntityState.isEntityUnparsed(name);
-        }
-        return false;
-    }
-
-    // id
-    public boolean isIdDeclared(String name) {
-        return fIdTable.containsKey(name);
-    }
-    public void addId(String name) {
-        fIdTable.put(name, fNullValue);
-    }
-
-    // idref
-    public void addIdRef(String name) {
-        fIdRefTable.put(name, fNullValue);
-    }
-    // get symbols
-
-    public String getSymbol (String symbol) {
-        if (fSymbolTable != null)
-            return fSymbolTable.addSymbol(symbol);
-        // if there is no symbol table, we return java-internalized string,
-        // because symbol table strings are also java-internalzied.
-        // this guarantees that the returned string from this method can be
-        // compared by reference with other symbol table string. -SG
-        return symbol.intern();
-    }
-    // qname, notation
-    public String getURI(String prefix) {
-        if (fNamespaceSupport !=null) {
-            return fNamespaceSupport.getURI(prefix);
-        }
-        return null;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/xpath/XPath.java b/src/org/apache/xerces/impl/xpath/XPath.java
deleted file mode 100644
index edbd5e2..0000000
--- a/src/org/apache/xerces/impl/xpath/XPath.java
+++ /dev/null
@@ -1,3702 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath;
-
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.xni.NamespaceContext;
-import org.apache.xerces.xni.QName;
-
-/**
- * Bare minimum XPath parser.
- *
- * @author Andy Clark, IBM
- * @version $Id$
- */
-public class XPath {
-
-    //
-    // Constants
-    //
-
-    private static final boolean DEBUG_ALL = false;
-
-    private static final boolean DEBUG_XPATH_PARSE = DEBUG_ALL || false;
-
-    private static final boolean DEBUG_ANY = DEBUG_XPATH_PARSE;
-
-    //
-    // Data
-    //
-
-    /** Expression. */
-    protected String fExpression;
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    /** Location paths. */
-    protected LocationPath[] fLocationPaths;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs an XPath object from the specified expression. */
-    public XPath(String xpath, SymbolTable symbolTable,
-                 NamespaceContext context)
-        throws XPathException {
-        fExpression = xpath;
-        fSymbolTable = symbolTable;
-        parseExpression(context);
-    } // <init>(String,SymbolTable,NamespaceContext)
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Returns a representation of all location paths for this XPath.
-     * XPath = locationPath ( '|' locationPath)
-     */
-    public LocationPath[] getLocationPaths() {
-        LocationPath[] ret=new LocationPath[fLocationPaths.length];
-        for (int i=0;i<fLocationPaths.length;i++){
-            ret[i]=(LocationPath)fLocationPaths[i].clone();
-        }
-        return ret;
-    } // getLocationPath(LocationPath)
-
-    /** Returns a representation of the first location path for this XPath. */
-    public LocationPath getLocationPath() {
-        return (LocationPath)fLocationPaths[0].clone();
-    } // getLocationPath(LocationPath)
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-        StringBuffer buf=new StringBuffer();
-        for (int  i=0;i<fLocationPaths.length;i++){
-            if (i>0){
-                buf.append("|");
-            }
-            buf.append(fLocationPaths[i].toString());
-        }
-        return buf.toString();
-    } // toString():String
-
-    //
-    // Private methods
-    //
-
-    /**
-     * This method is implemented by using the XPathExprScanner and
-     * examining the list of tokens that it returns.
-     */
-    private void parseExpression(final NamespaceContext context)
-        throws XPathException {
-
-        // tokens
-        final XPath.Tokens xtokens = new XPath.Tokens(fSymbolTable);
-
-        // scanner
-        XPath.Scanner scanner = new XPath.Scanner(fSymbolTable) {
-            protected void addToken(XPath.Tokens tokens, int token)
-                throws XPathException {
-                if (
-                    token == XPath.Tokens.EXPRTOKEN_ATSIGN ||
-                    token == XPath.Tokens.EXPRTOKEN_AXISNAME_ATTRIBUTE ||
-                    token == XPath.Tokens.EXPRTOKEN_AXISNAME_CHILD ||
-                    //token == XPath.Tokens.EXPRTOKEN_AXISNAME_SELF ||
-                    token == XPath.Tokens.EXPRTOKEN_DOUBLE_COLON ||
-                    //token == XPath.Tokens.EXPRTOKEN_NAMETEST_ANY ||
-                    token == XPath.Tokens.EXPRTOKEN_NAMETEST_QNAME ||
-                    //token == XPath.Tokens.EXPRTOKEN_NODETYPE_NODE ||
-                    token == XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH ||
-                    token == XPath.Tokens.EXPRTOKEN_PERIOD ||
-                    //added to conform to PR Spec
-                    token == XPath.Tokens.EXPRTOKEN_NAMETEST_ANY ||
-                    token == XPath.Tokens.EXPRTOKEN_NAMETEST_NAMESPACE ||
-                    token == XPath.Tokens.EXPRTOKEN_OPERATOR_DOUBLE_SLASH ||
-                    token == XPath.Tokens.EXPRTOKEN_OPERATOR_UNION
-                    //
-                    ) {
-                    super.addToken(tokens, token);
-                    return;
-                }
-                StringBuffer str = new StringBuffer();
-                str.append("token not supported: ");
-                String tokenName = tokens.getTokenName(token);
-                if (tokenName != null) {
-                    str.append('"');
-                    str.append(tokenName);
-                    str.append('"');
-                }
-                else {
-                    str.append('(');
-                    str.append(token);
-                    str.append(')');
-                }
-                String message = str.toString();
-                throw new XPathException(message);
-            }
-        };
-
-        int length = fExpression.length();
-        /***/
-        boolean success = scanner.scanExpr(fSymbolTable,
-                                           xtokens, fExpression, 0, length);
-        //fTokens.dumpTokens();
-        java.util.Vector stepsVector = new java.util.Vector();
-        java.util.Vector locationPathsVector= new java.util.Vector();
-        int tokenCount = xtokens.getTokenCount();
-        boolean firstTokenOfLocationPath=true;
-
-        final String emptySymbol = fSymbolTable.addSymbol("");
-        for (int i = 0; i < tokenCount; i++) {
-            int token = xtokens.getToken(i);
-            boolean isNamespace=false;
-
-            switch (token) {
-                case  XPath.Tokens.EXPRTOKEN_OPERATOR_UNION :{
-                    if (i == 0) {
-                        throw new XPathException("not allowed to have '|' at the beginning of an xpath value");
-                    }
-
-                    int size = stepsVector.size();
-                    if (size == 0) {
-                        throw new XPathException("not allowed to have '||'");
-                    }
-                    Step[] steps = new Step[size];
-                    stepsVector.copyInto(steps);
-                    // add location path
-                    locationPathsVector.addElement(new LocationPath(steps));
-                    //reset stepsVector
-                    stepsVector.removeAllElements();
-                    firstTokenOfLocationPath=true;
-                    break;
-                }
-
-                case XPath.Tokens.EXPRTOKEN_AXISNAME_ATTRIBUTE: {
-                    // consume "::" token and drop through
-                    i++;
-                }
-                case XPath.Tokens.EXPRTOKEN_ATSIGN: {
-                    // consume QName token
-                    if (i == tokenCount - 1) {
-                        throw new XPathException("missing attribute name");
-                    }
-                    token = xtokens.getToken(++i);
-
-                    if (token != XPath.Tokens.EXPRTOKEN_NAMETEST_QNAME
-                        && token!= XPath.Tokens.EXPRTOKEN_NAMETEST_ANY
-                        && token!=  XPath.Tokens.EXPRTOKEN_NAMETEST_NAMESPACE) {
-                        throw new XPathException("expected \""+xtokens.getTokenName(XPath.Tokens.EXPRTOKEN_NAMETEST_QNAME)+
-                                                 "\" or \""+xtokens.getTokenName( XPath.Tokens.EXPRTOKEN_NAMETEST_ANY)+
-                                                 "\" or \""+xtokens.getTokenName( XPath.Tokens.EXPRTOKEN_NAMETEST_NAMESPACE)+
-                                                 "\", found "+xtokens.getTokenName(token));
-                    }
-                    boolean isNamespaceAtt=false;
-                    switch (token)
-                    {
-                        case XPath.Tokens.EXPRTOKEN_NAMETEST_ANY:{
-                            Axis axis = new Axis(Axis.ATTRIBUTE);
-                            NodeTest nodeTest = new NodeTest(NodeTest.WILDCARD);
-                            Step step = new Step(axis, nodeTest);
-                            stepsVector.addElement(step);
-                            break;
-                        }
-                        case XPath.Tokens.EXPRTOKEN_NAMETEST_NAMESPACE:{
-                            isNamespaceAtt=true;
-                    }
-                        case XPath.Tokens.EXPRTOKEN_NAMETEST_QNAME:{
-
-                    token = xtokens.getToken(++i);
-                    String prefix = xtokens.getTokenString(token);
-                    String uri = null;
-                    if (context != null && prefix != emptySymbol) {
-                        uri = context.getURI(prefix);
-                    }
-                    if (prefix != emptySymbol && context != null && uri == null) {
-                        throw new XPathException("prefix "+prefix+" not bound to namespace URI");
-                    }
-
-                            if (isNamespaceAtt)
-                            {
-                                // build step
-                                Axis axis = new Axis(Axis.ATTRIBUTE);
-                                NodeTest nodeTest = new NodeTest(prefix, uri);
-                                Step step = new Step(axis, nodeTest);
-                                stepsVector.addElement(step);
-                                break;
-                            }
-
-                    token = xtokens.getToken(++i);
-                    String localpart = xtokens.getTokenString(token);
-                    String rawname = prefix != emptySymbol
-                                   ? fSymbolTable.addSymbol(prefix+':'+localpart)
-                                   : localpart;
-
-                    // build step
-                    Axis axis = new Axis(Axis.ATTRIBUTE);
-                    NodeTest nodeTest = new NodeTest(new QName(prefix, localpart, rawname, uri));
-                    Step step = new Step(axis, nodeTest);
-                    stepsVector.addElement(step);
-                    break;
-                }
-                    }
-                    firstTokenOfLocationPath=false;
-                    break;
-                }
-                /***
-                case XPath.Tokens.EXPRTOKEN_AXISNAME_SELF: {
-                    break;
-                }
-                /***/
-                case XPath.Tokens.EXPRTOKEN_DOUBLE_COLON: {
-                    // should never have a bare double colon
-                    throw new XPathException("Not allowed to have double colon here");
-                }
-                /***
-                case XPath.Tokens.EXPRTOKEN_NAMETEST_ANY: {
-                    break;
-                }
-                /***/
-                case XPath.Tokens.EXPRTOKEN_AXISNAME_CHILD: {
-
-                    // consume "::" token and drop through
-                    i++;
-                    if (i == tokenCount - 1) {
-                        throw new XPathException("expected step following '"
-                            +xtokens.getTokenName(XPath.Tokens.EXPRTOKEN_AXISNAME_CHILD)+"::'");
-                    }
-                    firstTokenOfLocationPath=false;
-                    break;
-                }
-                case XPath.Tokens.EXPRTOKEN_NAMETEST_ANY:{
-                    Axis axis = new Axis(Axis.CHILD);
-                    NodeTest nodeTest = new NodeTest(NodeTest.WILDCARD);
-                    Step step = new Step(axis, nodeTest);
-                    stepsVector.addElement(step);
-                    firstTokenOfLocationPath=false;
-                    break;
-                }
-
-                case XPath.Tokens.EXPRTOKEN_NAMETEST_NAMESPACE:{
-                    isNamespace=true;
-                }
-                case XPath.Tokens.EXPRTOKEN_NAMETEST_QNAME: {
-                    // consume QName token
-                    token = xtokens.getToken(++i);
-                    String prefix = xtokens.getTokenString(token);
-                    String uri = null;
-                    if (context != null && prefix != emptySymbol) {
-                        uri = context.getURI(prefix);
-                    }
-                    if (prefix != emptySymbol && context != null && uri == null) {
-                        throw new XPathException("prefix "+prefix+" not bound to namespace URI");
-                    }
-
-                    if (isNamespace)
-                    {
-                        // build step
-                        Axis axis = new Axis(Axis.CHILD);
-                        NodeTest nodeTest = new NodeTest(prefix, uri);
-                        Step step = new Step(axis, nodeTest);
-                        stepsVector.addElement(step);
-                        break;
-                    }
-
-                    token = xtokens.getToken(++i);
-                    String localpart = xtokens.getTokenString(token);
-                    String rawname = prefix != emptySymbol
-                                   ? fSymbolTable.addSymbol(prefix+':'+localpart)
-                                   : localpart;
-
-                    // build step
-                    Axis axis = new Axis(Axis.CHILD);
-                    NodeTest nodeTest = new NodeTest(new QName(prefix, localpart, rawname, uri));
-                    Step step = new Step(axis, nodeTest);
-                    stepsVector.addElement(step);
-                    firstTokenOfLocationPath=false;
-                    break;
-                }
-                /***
-                case XPath.Tokens.EXPRTOKEN_NODETYPE_NODE: {
-                    break;
-                }
-                /***/
-
-
-                case XPath.Tokens.EXPRTOKEN_PERIOD: {
-                    // build step
-                    Axis axis = new Axis(Axis.SELF);
-                    NodeTest nodeTest = new NodeTest(NodeTest.NODE);
-                    Step step = new Step(axis, nodeTest);
-                    stepsVector.addElement(step);
-
-                    if (firstTokenOfLocationPath && i+1<tokenCount){
-                        token=xtokens.getToken(i+1);
-                        if (token == XPath.Tokens.EXPRTOKEN_OPERATOR_DOUBLE_SLASH){
-                            i++;
-                            if (i == tokenCount - 1) {
-                                throw new XPathException("expected step following '//'");
-                            }
-                            if (i+1<tokenCount)	{
-                                token=xtokens.getToken(i+1);
-                                if (token==XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH)
-                                    throw new XPathException("'/' not allowed after '//'");
-                            }
-                            // build step
-                            axis = new Axis(Axis.DESCENDANT);
-                            nodeTest = new NodeTest(NodeTest.NODE);
-                            step = new Step(axis, nodeTest);
-                            stepsVector.addElement(step);
-                        }
-                    }
-                    firstTokenOfLocationPath=false;
-                    break;
-                }
-
-                case XPath.Tokens.EXPRTOKEN_OPERATOR_DOUBLE_SLASH:{
-                    throw new XPathException("'//' only allowed after '.' at the beginning of an xpath");
-                }
-                case XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH: {
-                    if (i == 0) {
-                        throw new XPathException("not allowed to have '/' at the beginning of an xpath value");
-                    }
-                    // keep on truckin'
-                    if (firstTokenOfLocationPath) {
-                        throw new XPathException("not allowed to select the root");
-                    }
-                    if (i == tokenCount - 1) {
-                        throw new XPathException("expected step following '/'");
-                    }
-                    firstTokenOfLocationPath=false;
-                    break;
-                }
-                default:
-                    firstTokenOfLocationPath=false;
-            }
-        }
-
-        int size = stepsVector.size();
-        if (size == 0) {
-            if (locationPathsVector.size()==0)
-            throw new XPathException("empty xpath expression");
-            else
-                throw new XPathException("xpath cannot end with '|'");
-        }
-        Step[] steps = new Step[size];
-        stepsVector.copyInto(steps);
-        locationPathsVector.addElement(new LocationPath(steps));
-
-        // save location path
-        fLocationPaths=new LocationPath[locationPathsVector.size()];
-        locationPathsVector.copyInto(fLocationPaths);
-
-
-        if (DEBUG_XPATH_PARSE) {
-            System.out.println(">>> "+fLocationPaths);
-        }
-
-    } // parseExpression(SymbolTable,NamespaceContext)
-
-    //
-    // Classes
-    //
-
-    // location path information
-
-    /**
-     * A location path representation for an XPath expression.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static class LocationPath
-        implements Cloneable {
-
-        //
-        // Data
-        //
-
-        /** List of steps. */
-        public Step[] steps;
-
-        //
-        // Constructors
-        //
-
-        /** Creates a location path from a series of steps. */
-        public LocationPath(Step[] steps) {
-            this.steps = steps;
-        } // <init>(Step[])
-
-        /** Copy constructor. */
-        protected LocationPath(LocationPath path) {
-            steps = new Step[path.steps.length];
-            for (int i = 0; i < steps.length; i++) {
-                steps[i] = (Step)path.steps[i].clone();
-            }
-        } // <init>(LocationPath)
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-            StringBuffer str = new StringBuffer();
-            for (int i = 0; i < steps.length; i++) {
-                if (i > 0	&& (steps[i-1].axis.type!=Axis.DESCENDANT
-                    && steps[i].axis.type!=Axis.DESCENDANT) ){
-                    str.append('/');
-                }
-                str.append(steps[i].toString());
-            }
-            // DEBUG: This code is just for debugging and should *not*
-            //        be left in because it will mess up hashcodes of
-            //        serialized versions of this object. -Ac
-            if (false) {
-                str.append('[');
-                String s = super.toString();
-                str.append(s.substring(s.indexOf('@')));
-                str.append(']');
-            }
-            return str.toString();
-        } // toString():String
-
-        /** Returns a clone of this object. */
-        public Object clone() {
-            return new LocationPath(this);
-        } // clone():Object
-
-    } // class locationPath
-
-    /**
-     * A location path step comprised of an axis and node test.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static class Step
-        implements Cloneable {
-
-        //
-        // Data
-        //
-
-        /** Axis. */
-        public Axis axis;
-
-        /** Node test. */
-        public NodeTest nodeTest;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a step from an axis and node test. */
-        public Step(Axis axis, NodeTest nodeTest) {
-            this.axis = axis;
-            this.nodeTest = nodeTest;
-        } // <init>(Axis,NodeTest)
-
-        /** Copy constructor. */
-        protected Step(Step step) {
-            axis = (Axis)step.axis.clone();
-            nodeTest = (NodeTest)step.nodeTest.clone();
-        } // <init>(Step)
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-            /***
-            return axis.toString() + "::" + nodeTest.toString();
-            /***/
-            if (axis.type == Axis.SELF) {
-                return ".";
-            }
-            if (axis.type == Axis.ATTRIBUTE) {
-                return "@" + nodeTest.toString();
-            }
-            if (axis.type == Axis.CHILD) {
-                return nodeTest.toString();
-            }
-            if (axis.type == Axis.DESCENDANT) {
-                return "//";
-            }
-            return "??? ("+axis.type+')';
-            /***/
-        } // toString():String
-
-        /** Returns a clone of this object. */
-        public Object clone() {
-            return new Step(this);
-        } // clone():Object
-
-    } // class Step
-
-    /**
-     * Axis.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static class Axis
-        implements Cloneable {
-
-        //
-        // Constants
-        //
-
-        /** Type: child. */
-        public static final short CHILD = 1;
-
-        /** Type: attribute. */
-        public static final short ATTRIBUTE = 2;
-
-        /** Type: self. */
-        public static final short SELF = 3;
-
-
-        /** Type: descendant. */
-        public static final short DESCENDANT = 4;
-        //
-        // Data
-        //
-
-        /** Axis type. */
-        public short type;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs an axis with the specified type. */
-        public Axis(short type) {
-            this.type = type;
-        } // <init>(short)
-
-        /** Copy constructor. */
-        protected Axis(Axis axis) {
-            type = axis.type;
-        } // <init>(Axis)
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-            switch (type) {
-                case CHILD: return "child";
-                case ATTRIBUTE: return "attribute";
-                case SELF: return "self";
-                case DESCENDANT: return "descendant";
-            }
-            return "???";
-        } // toString():String
-
-        /** Returns a clone of this object. */
-        public Object clone() {
-            return new Axis(this);
-        } // clone():Object
-
-    } // class Axis
-
-    /**
-     * Node test.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static class NodeTest
-        implements Cloneable {
-
-        //
-        // Constants
-        //
-
-        /** Type: qualified name. */
-        public static final short QNAME = 1;
-
-        /** Type: wildcard. */
-        public static final short WILDCARD = 2;
-
-        /** Type: node. */
-        public static final short NODE = 3;
-
-        /** Type: namespace */
-        public static final short NAMESPACE= 4;
-
-        //
-        // Data
-        //
-
-        /** Node test type. */
-        public short type;
-
-        /** Node qualified name. */
-        public final QName name = new QName();
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a node test of type WILDCARD or NODE. */
-        public NodeTest(short type) {
-            this.type = type;
-        } // <init>(int)
-
-        /** Constructs a node test of type QName. */
-        public NodeTest(QName name) {
-            this.type = QNAME;
-            this.name.setValues(name);
-        } // <init>(QName)
-        /** Constructs a node test of type Namespace. */
-        public NodeTest(String prefix, String uri) {
-            this.type = NAMESPACE;
-            this.name.setValues(prefix, null, null, uri);
-        } // <init>(String,String)
-
-        /** Copy constructor. */
-        public NodeTest(NodeTest nodeTest) {
-            type = nodeTest.type;
-            name.setValues(nodeTest.name);
-        } // <init>(NodeTest)
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-
-            switch (type) {
-                case QNAME: {
-                    if (name.prefix.length() !=0) {
-                        if (name.uri != null) {
-                            return name.prefix+':'+name.localpart;
-                        }
-                        return "{"+name.uri+'}'+name.prefix+':'+name.localpart;
-                    }
-                    return name.localpart;
-                }
-                case NAMESPACE: {
-                    if (name.prefix.length() !=0) {
-                        if (name.uri != null) {
-                            return name.prefix+":*";
-                        }
-                        return "{"+name.uri+'}'+name.prefix+":*";
-                    }
-                    return "???:*";
-                }
-                case WILDCARD: {
-                    return "*";
-                }
-                case NODE: {
-                    return "node()";
-                }
-            }
-            return "???";
-
-        } // toString():String
-
-        /** Returns a clone of this object. */
-        public Object clone() {
-            return new NodeTest(this);
-        } // clone():Object
-
-    } // class NodeTest
-
-    // xpath implementation
-
-    // NOTE: The XPath implementation classes are kept internal because
-    //       this implementation is just a temporary hack until a better
-    //       and/or more appropriate implementation can be written.
-    //       keeping the code in separate source files would "muddy" the
-    //       CVS directory when it's not needed. -Ac
-
-    /**
-     * @author Glenn Marcy, IBM
-     * @author Andy Clark, IBM
-     *
-     * @version $Id$
-     */
-    private static final class Tokens {
-
-        static final boolean DUMP_TOKENS = false;
-
-        /**
-         * [28] ExprToken ::= '(' | ')' | '[' | ']' | '.' | '..' | '@' | ',' | '::'
-         *                  | NameTest | NodeType | Operator | FunctionName
-         *                  | AxisName | Literal | Number | VariableReference
-         */
-        public static final int
-            EXPRTOKEN_OPEN_PAREN                    =   0,
-            EXPRTOKEN_CLOSE_PAREN                   =   1,
-            EXPRTOKEN_OPEN_BRACKET                  =   2,
-            EXPRTOKEN_CLOSE_BRACKET                 =   3,
-            EXPRTOKEN_PERIOD                        =   4,
-            EXPRTOKEN_DOUBLE_PERIOD                 =   5,
-            EXPRTOKEN_ATSIGN                        =   6,
-            EXPRTOKEN_COMMA                         =   7,
-            EXPRTOKEN_DOUBLE_COLON                  =   8,
-            //
-            // [37] NameTest ::= '*' | NCName ':' '*' | QName
-            //
-            // followed by symbol handle of NCName or QName
-            //
-            EXPRTOKEN_NAMETEST_ANY                  =   9,
-            EXPRTOKEN_NAMETEST_NAMESPACE            =  10,
-            EXPRTOKEN_NAMETEST_QNAME                =  11,
-            //
-            // [38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node'
-            //
-            EXPRTOKEN_NODETYPE_COMMENT              =  12,
-            EXPRTOKEN_NODETYPE_TEXT                 =  13,
-            EXPRTOKEN_NODETYPE_PI                   =  14,
-            EXPRTOKEN_NODETYPE_NODE                 =  15,
-            //
-            // [32] Operator ::= OperatorName
-            //                 | MultiplyOperator
-            //                 | '/' | '//' | '|' | '+' | '-' | '=' | '!=' | '<' | '<=' | '>' | '>='
-            // [33] OperatorName ::= 'and' | 'or' | 'mod' | 'div'
-            // [34] MultiplyOperator ::= '*'
-            //
-            EXPRTOKEN_OPERATOR_AND                  =  16,
-            EXPRTOKEN_OPERATOR_OR                   =  17,
-            EXPRTOKEN_OPERATOR_MOD                  =  18,
-            EXPRTOKEN_OPERATOR_DIV                  =  19,
-            EXPRTOKEN_OPERATOR_MULT                 =  20,
-            EXPRTOKEN_OPERATOR_SLASH                =  21,
-            EXPRTOKEN_OPERATOR_DOUBLE_SLASH         =  22,
-            EXPRTOKEN_OPERATOR_UNION                =  23,
-            EXPRTOKEN_OPERATOR_PLUS                 =  24,
-            EXPRTOKEN_OPERATOR_MINUS                =  25,
-            EXPRTOKEN_OPERATOR_EQUAL                =  26,
-            EXPRTOKEN_OPERATOR_NOT_EQUAL            =  27,
-            EXPRTOKEN_OPERATOR_LESS                 =  28,
-            EXPRTOKEN_OPERATOR_LESS_EQUAL           =  29,
-            EXPRTOKEN_OPERATOR_GREATER              =  30,
-            EXPRTOKEN_OPERATOR_GREATER_EQUAL        =  31,
-
-            //EXPRTOKEN_FIRST_OPERATOR                = EXPRTOKEN_OPERATOR_AND,
-            //EXPRTOKEN_LAST_OPERATOR                 = EXPRTOKEN_OPERATOR_GREATER_EQUAL,
-
-            //
-            // [35] FunctionName ::= QName - NodeType
-            //
-            // followed by symbol handle
-            //
-            EXPRTOKEN_FUNCTION_NAME                 =  32,
-            //
-            // [6] AxisName ::= 'ancestor' | 'ancestor-or-self'
-            //                | 'attribute'
-            //                | 'child'
-            //                | 'descendant' | 'descendant-or-self'
-            //                | 'following' | 'following-sibling'
-            //                | 'namespace'
-            //                | 'parent'
-            //                | 'preceding' | 'preceding-sibling'
-            //                | 'self'
-            //
-            EXPRTOKEN_AXISNAME_ANCESTOR             =  33,
-            EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF     =  34,
-            EXPRTOKEN_AXISNAME_ATTRIBUTE            =  35,
-            EXPRTOKEN_AXISNAME_CHILD                =  36,
-            EXPRTOKEN_AXISNAME_DESCENDANT           =  37,
-            EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF   =  38,
-            EXPRTOKEN_AXISNAME_FOLLOWING            =  39,
-            EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING    =  40,
-            EXPRTOKEN_AXISNAME_NAMESPACE            =  41,
-            EXPRTOKEN_AXISNAME_PARENT               =  42,
-            EXPRTOKEN_AXISNAME_PRECEDING            =  43,
-            EXPRTOKEN_AXISNAME_PRECEDING_SIBLING    =  44,
-            EXPRTOKEN_AXISNAME_SELF                 =  45,
-            //
-            // [29] Literal ::= '"' [^"]* '"' | "'" [^']* "'"
-            //
-            // followed by symbol handle for literal
-            //
-            EXPRTOKEN_LITERAL                       =  46,
-            //
-            // [30] Number ::= Digits ('.' Digits?)? | '.' Digits
-            // [31] Digits ::= [0-9]+
-            //
-            // followed by number handle
-            //
-            EXPRTOKEN_NUMBER                        =  47,
-            //
-            // [36] VariableReference ::= '$' QName
-            //
-            // followed by symbol handle for QName
-            //
-            EXPRTOKEN_VARIABLE_REFERENCE            =  48;
-
-        public static final String[] fgTokenNames = {
-            "EXPRTOKEN_OPEN_PAREN",
-            "EXPRTOKEN_CLOSE_PAREN",
-            "EXPRTOKEN_OPEN_BRACKET",
-            "EXPRTOKEN_CLOSE_BRACKET",
-            "EXPRTOKEN_PERIOD",
-            "EXPRTOKEN_DOUBLE_PERIOD",
-            "EXPRTOKEN_ATSIGN",
-            "EXPRTOKEN_COMMA",
-            "EXPRTOKEN_DOUBLE_COLON",
-            "EXPRTOKEN_NAMETEST_ANY",
-            "EXPRTOKEN_NAMETEST_NAMESPACE",
-            "EXPRTOKEN_NAMETEST_QNAME",
-            "EXPRTOKEN_NODETYPE_COMMENT",
-            "EXPRTOKEN_NODETYPE_TEXT",
-            "EXPRTOKEN_NODETYPE_PI",
-            "EXPRTOKEN_NODETYPE_NODE",
-            "EXPRTOKEN_OPERATOR_AND",
-            "EXPRTOKEN_OPERATOR_OR",
-            "EXPRTOKEN_OPERATOR_MOD",
-            "EXPRTOKEN_OPERATOR_DIV",
-            "EXPRTOKEN_OPERATOR_MULT",
-            "EXPRTOKEN_OPERATOR_SLASH",
-            "EXPRTOKEN_OPERATOR_DOUBLE_SLASH",
-            "EXPRTOKEN_OPERATOR_UNION",
-            "EXPRTOKEN_OPERATOR_PLUS",
-            "EXPRTOKEN_OPERATOR_MINUS",
-            "EXPRTOKEN_OPERATOR_EQUAL",
-            "EXPRTOKEN_OPERATOR_NOT_EQUAL",
-            "EXPRTOKEN_OPERATOR_LESS",
-            "EXPRTOKEN_OPERATOR_LESS_EQUAL",
-            "EXPRTOKEN_OPERATOR_GREATER",
-            "EXPRTOKEN_OPERATOR_GREATER_EQUAL",
-            "EXPRTOKEN_FUNCTION_NAME",
-            "EXPRTOKEN_AXISNAME_ANCESTOR",
-            "EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF",
-            "EXPRTOKEN_AXISNAME_ATTRIBUTE",
-            "EXPRTOKEN_AXISNAME_CHILD",
-            "EXPRTOKEN_AXISNAME_DESCENDANT",
-            "EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF",
-            "EXPRTOKEN_AXISNAME_FOLLOWING",
-            "EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING",
-            "EXPRTOKEN_AXISNAME_NAMESPACE",
-            "EXPRTOKEN_AXISNAME_PARENT",
-            "EXPRTOKEN_AXISNAME_PRECEDING",
-            "EXPRTOKEN_AXISNAME_PRECEDING_SIBLING",
-            "EXPRTOKEN_AXISNAME_SELF",
-            "EXPRTOKEN_LITERAL",
-            "EXPRTOKEN_NUMBER",
-            "EXPRTOKEN_VARIABLE_REFERENCE"
-        };
-
-        /**
-         *
-         */
-        private static final int INITIAL_TOKEN_COUNT = 1 << 8;
-        private int[] fTokens = new int[INITIAL_TOKEN_COUNT];
-        private int fTokenCount = 0;    // for writing
-
-        private SymbolTable fSymbolTable;
-
-        // REVISIT: Code something better here. -Ac
-        private java.util.Hashtable fSymbolMapping = new java.util.Hashtable();
-
-        // REVISIT: Code something better here. -Ac
-        private java.util.Hashtable fTokenNames = new java.util.Hashtable();
-
-        //
-        // Constructors
-        //
-
-        public Tokens(SymbolTable symbolTable) {
-            fSymbolTable = symbolTable;
-            final String[] symbols = {
-                "ancestor",     "ancestor-or-self",     "attribute",
-                "child",        "descendant",           "descendant-or-self",
-                "following",    "following-sibling",    "namespace",
-                "parent",       "preceding",            "preceding-sibling",
-                "self",
-            };
-            for (int i = 0; i < symbols.length; i++) {
-                fSymbolMapping.put(fSymbolTable.addSymbol(symbols[i]), new Integer(i));
-            }
-            fTokenNames.put(new Integer(EXPRTOKEN_OPEN_PAREN), "EXPRTOKEN_OPEN_PAREN");
-            fTokenNames.put(new Integer(EXPRTOKEN_CLOSE_PAREN), "EXPRTOKEN_CLOSE_PAREN");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPEN_BRACKET), "EXPRTOKEN_OPEN_BRACKET");
-            fTokenNames.put(new Integer(EXPRTOKEN_CLOSE_BRACKET), "EXPRTOKEN_CLOSE_BRACKET");
-            fTokenNames.put(new Integer(EXPRTOKEN_PERIOD), "EXPRTOKEN_PERIOD");
-            fTokenNames.put(new Integer(EXPRTOKEN_DOUBLE_PERIOD), "EXPRTOKEN_DOUBLE_PERIOD");
-            fTokenNames.put(new Integer(EXPRTOKEN_ATSIGN), "EXPRTOKEN_ATSIGN");
-            fTokenNames.put(new Integer(EXPRTOKEN_COMMA), "EXPRTOKEN_COMMA");
-            fTokenNames.put(new Integer(EXPRTOKEN_DOUBLE_COLON), "EXPRTOKEN_DOUBLE_COLON");
-            fTokenNames.put(new Integer(EXPRTOKEN_NAMETEST_ANY), "EXPRTOKEN_NAMETEST_ANY");
-            fTokenNames.put(new Integer(EXPRTOKEN_NAMETEST_NAMESPACE), "EXPRTOKEN_NAMETEST_NAMESPACE");
-            fTokenNames.put(new Integer(EXPRTOKEN_NAMETEST_QNAME), "EXPRTOKEN_NAMETEST_QNAME");
-            fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_COMMENT), "EXPRTOKEN_NODETYPE_COMMENT");
-            fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_TEXT), "EXPRTOKEN_NODETYPE_TEXT");
-            fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_PI), "EXPRTOKEN_NODETYPE_PI");
-            fTokenNames.put(new Integer(EXPRTOKEN_NODETYPE_NODE), "EXPRTOKEN_NODETYPE_NODE");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_AND), "EXPRTOKEN_OPERATOR_AND");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_OR), "EXPRTOKEN_OPERATOR_OR");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_MOD), "EXPRTOKEN_OPERATOR_MOD");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_DIV), "EXPRTOKEN_OPERATOR_DIV");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_MULT), "EXPRTOKEN_OPERATOR_MULT");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_SLASH), "EXPRTOKEN_OPERATOR_SLASH");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_DOUBLE_SLASH), "EXPRTOKEN_OPERATOR_DOUBLE_SLASH");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_UNION), "EXPRTOKEN_OPERATOR_UNION");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_PLUS), "EXPRTOKEN_OPERATOR_PLUS");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_MINUS), "EXPRTOKEN_OPERATOR_MINUS");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_EQUAL), "EXPRTOKEN_OPERATOR_EQUAL");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_NOT_EQUAL), "EXPRTOKEN_OPERATOR_NOT_EQUAL");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_LESS), "EXPRTOKEN_OPERATOR_LESS");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_LESS_EQUAL), "EXPRTOKEN_OPERATOR_LESS_EQUAL");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_GREATER), "EXPRTOKEN_OPERATOR_GREATER");
-            fTokenNames.put(new Integer(EXPRTOKEN_OPERATOR_GREATER_EQUAL), "EXPRTOKEN_OPERATOR_GREATER_EQUAL");
-            fTokenNames.put(new Integer(EXPRTOKEN_FUNCTION_NAME), "EXPRTOKEN_FUNCTION_NAME");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_ANCESTOR), "EXPRTOKEN_AXISNAME_ANCESTOR");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF), "EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_ATTRIBUTE), "EXPRTOKEN_AXISNAME_ATTRIBUTE");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_CHILD), "EXPRTOKEN_AXISNAME_CHILD");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_DESCENDANT), "EXPRTOKEN_AXISNAME_DESCENDANT");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF), "EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_FOLLOWING), "EXPRTOKEN_AXISNAME_FOLLOWING");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING), "EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_NAMESPACE), "EXPRTOKEN_AXISNAME_NAMESPACE");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_PARENT), "EXPRTOKEN_AXISNAME_PARENT");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_PRECEDING), "EXPRTOKEN_AXISNAME_PRECEDING");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_PRECEDING_SIBLING), "EXPRTOKEN_AXISNAME_PRECEDING_SIBLING");
-            fTokenNames.put(new Integer(EXPRTOKEN_AXISNAME_SELF), "EXPRTOKEN_AXISNAME_SELF");
-            fTokenNames.put(new Integer(EXPRTOKEN_LITERAL), "EXPRTOKEN_LITERAL");
-            fTokenNames.put(new Integer(EXPRTOKEN_NUMBER), "EXPRTOKEN_NUMBER");
-            fTokenNames.put(new Integer(EXPRTOKEN_VARIABLE_REFERENCE), "EXPRTOKEN_VARIABLE_REFERENCE");
-        }
-
-        //
-        // Public methods
-        //
-
-        /*** // REVISIT: What is this doing here? -Ac ***
-        public int addSymbol(byte[] data, int offset, int length, EncodingMap encoding) {
-            //return fSymbolTable.addSymbol(data, offset, length, encoding);
-            return fSymbolTable.addSymbol(new String(data, offset, length));
-        }
-        /***/
-
-        public String getTokenName(int token) {
-            if (token < 0 || token >= fgTokenNames.length)
-                return null;
-            return fgTokenNames[token];
-        }
-
-        public String getTokenString(int token) {
-            return (String)fTokenNames.get(new Integer(token));
-        }
-
-        public void addToken(String tokenStr) {
-            Integer tokenInt = (Integer)fTokenNames.get(tokenStr);
-            if (tokenInt == null) {
-                tokenInt = new Integer(fTokenNames.size());
-                fTokenNames.put(tokenInt, tokenStr);
-            }
-            addToken(tokenInt.intValue());
-        }
-
-        public void addToken(int token) {
-            try {
-                fTokens[fTokenCount] = token;
-            } catch (ArrayIndexOutOfBoundsException ex) {
-                int[] oldList = fTokens;
-                fTokens = new int[fTokenCount << 1];
-                System.arraycopy(oldList, 0, fTokens, 0, fTokenCount);
-                fTokens[fTokenCount] = token;
-            }
-            fTokenCount++;
-        }
-        public int getTokenCount() {
-            return fTokenCount;
-        }
-        public int getToken(int tokenIndex) {
-            return fTokens[tokenIndex];
-        }
-        public void dumpTokens() {
-            //if (DUMP_TOKENS) {
-                for (int i = 0; i < fTokenCount; i++) {
-                    switch (fTokens[i]) {
-                    case EXPRTOKEN_OPEN_PAREN:
-                        System.out.print("<OPEN_PAREN/>");
-                        break;
-                    case EXPRTOKEN_CLOSE_PAREN:
-                        System.out.print("<CLOSE_PAREN/>");
-                        break;
-                    case EXPRTOKEN_OPEN_BRACKET:
-                        System.out.print("<OPEN_BRACKET/>");
-                        break;
-                    case EXPRTOKEN_CLOSE_BRACKET:
-                        System.out.print("<CLOSE_BRACKET/>");
-                        break;
-                    case EXPRTOKEN_PERIOD:
-                        System.out.print("<PERIOD/>");
-                        break;
-                    case EXPRTOKEN_DOUBLE_PERIOD:
-                        System.out.print("<DOUBLE_PERIOD/>");
-                        break;
-                    case EXPRTOKEN_ATSIGN:
-                        System.out.print("<ATSIGN/>");
-                        break;
-                    case EXPRTOKEN_COMMA:
-                        System.out.print("<COMMA/>");
-                        break;
-                    case EXPRTOKEN_DOUBLE_COLON:
-                        System.out.print("<DOUBLE_COLON/>");
-                        break;
-                    case EXPRTOKEN_NAMETEST_ANY:
-                        System.out.print("<NAMETEST_ANY/>");
-                        break;
-                    case EXPRTOKEN_NAMETEST_NAMESPACE:
-                        System.out.print("<NAMETEST_NAMESPACE");
-                        System.out.print(" prefix=\"" + getTokenString(fTokens[++i]) + "\"");
-                        System.out.print("/>");
-                        break;
-                    case EXPRTOKEN_NAMETEST_QNAME:
-                        System.out.print("<NAMETEST_QNAME");
-                        if (fTokens[++i] != -1)
-                            System.out.print(" prefix=\"" + getTokenString(fTokens[i]) + "\"");
-                        System.out.print(" localpart=\"" + getTokenString(fTokens[++i]) + "\"");
-                        System.out.print("/>");
-                        break;
-                    case EXPRTOKEN_NODETYPE_COMMENT:
-                        System.out.print("<NODETYPE_COMMENT/>");
-                        break;
-                    case EXPRTOKEN_NODETYPE_TEXT:
-                        System.out.print("<NODETYPE_TEXT/>");
-                        break;
-                    case EXPRTOKEN_NODETYPE_PI:
-                        System.out.print("<NODETYPE_PI/>");
-                        break;
-                    case EXPRTOKEN_NODETYPE_NODE:
-                        System.out.print("<NODETYPE_NODE/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_AND:
-                        System.out.print("<OPERATOR_AND/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_OR:
-                        System.out.print("<OPERATOR_OR/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_MOD:
-                        System.out.print("<OPERATOR_MOD/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_DIV:
-                        System.out.print("<OPERATOR_DIV/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_MULT:
-                        System.out.print("<OPERATOR_MULT/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_SLASH:
-                        System.out.print("<OPERATOR_SLASH/>");
-                        if (i + 1 < fTokenCount) {
-                            System.out.println();
-                            System.out.print("  ");
-                        }
-                        break;
-                    case EXPRTOKEN_OPERATOR_DOUBLE_SLASH:
-                        System.out.print("<OPERATOR_DOUBLE_SLASH/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_UNION:
-                        System.out.print("<OPERATOR_UNION/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_PLUS:
-                        System.out.print("<OPERATOR_PLUS/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_MINUS:
-                        System.out.print("<OPERATOR_MINUS/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_EQUAL:
-                        System.out.print("<OPERATOR_EQUAL/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_NOT_EQUAL:
-                        System.out.print("<OPERATOR_NOT_EQUAL/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_LESS:
-                        System.out.print("<OPERATOR_LESS/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_LESS_EQUAL:
-                        System.out.print("<OPERATOR_LESS_EQUAL/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_GREATER:
-                        System.out.print("<OPERATOR_GREATER/>");
-                        break;
-                    case EXPRTOKEN_OPERATOR_GREATER_EQUAL:
-                        System.out.print("<OPERATOR_GREATER_EQUAL/>");
-                        break;
-                    case EXPRTOKEN_FUNCTION_NAME:
-                        System.out.print("<FUNCTION_NAME");
-                        if (fTokens[++i] != -1)
-                            System.out.print(" prefix=\"" + getTokenString(fTokens[i]) + "\"");
-                        System.out.print(" localpart=\"" + getTokenString(fTokens[++i]) + "\"");
-                        System.out.print("/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_ANCESTOR:
-                        System.out.print("<AXISNAME_ANCESTOR/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF:
-                        System.out.print("<AXISNAME_ANCESTOR_OR_SELF/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_ATTRIBUTE:
-                        System.out.print("<AXISNAME_ATTRIBUTE/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_CHILD:
-                        System.out.print("<AXISNAME_CHILD/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_DESCENDANT:
-                        System.out.print("<AXISNAME_DESCENDANT/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF:
-                        System.out.print("<AXISNAME_DESCENDANT_OR_SELF/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_FOLLOWING:
-                        System.out.print("<AXISNAME_FOLLOWING/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING:
-                        System.out.print("<AXISNAME_FOLLOWING_SIBLING/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_NAMESPACE:
-                        System.out.print("<AXISNAME_NAMESPACE/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_PARENT:
-                        System.out.print("<AXISNAME_PARENT/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_PRECEDING:
-                        System.out.print("<AXISNAME_PRECEDING/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_PRECEDING_SIBLING:
-                        System.out.print("<AXISNAME_PRECEDING_SIBLING/>");
-                        break;
-                    case EXPRTOKEN_AXISNAME_SELF:
-                        System.out.print("<AXISNAME_SELF/>");
-                        break;
-                    case EXPRTOKEN_LITERAL:
-                        System.out.print("<LITERAL");
-                        System.out.print(" value=\"" + getTokenString(fTokens[++i]) + "\"");
-                        System.out.print("/>");
-                        break;
-                    case EXPRTOKEN_NUMBER:
-                        System.out.print("<NUMBER");
-                        System.out.print(" whole=\"" + getTokenString(fTokens[++i]) + "\"");
-                        System.out.print(" part=\"" + getTokenString(fTokens[++i]) + "\"");
-                        System.out.print("/>");
-                        break;
-                    case EXPRTOKEN_VARIABLE_REFERENCE:
-                        System.out.print("<VARIABLE_REFERENCE");
-                        if (fTokens[++i] != -1)
-                            System.out.print(" prefix=\"" + getTokenString(fTokens[i]) + "\"");
-                        System.out.print(" localpart=\"" + getTokenString(fTokens[++i]) + "\"");
-                        System.out.print("/>");
-                        break;
-                    default:
-                        System.out.println("<???/>");
-                    }
-                }
-                System.out.println();
-            //}
-        }
-
-    } // class Tokens
-
-    /**
-     * @author Glenn Marcy, IBM
-     * @author Andy Clark, IBM
-     *
-     * @version $Id$
-     */
-    private static class Scanner {
-
-        /**
-         * 7-bit ASCII subset
-         *
-         *  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
-         *  0,  0,  0,  0,  0,  0,  0,  0,  0, HT, LF,  0,  0, CR,  0,  0,  // 0
-         *  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  // 1
-         * SP,  !,  ",  #,  $,  %,  &,  ',  (,  ),  *,  +,  ,,  -,  .,  /,  // 2
-         *  0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  :,  ;,  <,  =,  >,  ?,  // 3
-         *  @,  A,  B,  C,  D,  E,  F,  G,  H,  I,  J,  K,  L,  M,  N,  O,  // 4
-         *  P,  Q,  R,  S,  T,  U,  V,  W,  X,  Y,  Z,  [,  \,  ],  ^,  _,  // 5
-         *  `,  a,  b,  c,  d,  e,  f,  g,  h,  i,  j,  k,  l,  m,  n,  o,  // 6
-         *  p,  q,  r,  s,  t,  u,  v,  w,  x,  y,  z,  {,  |,  },  ~, DEL  // 7
-         */
-        private static final byte
-            CHARTYPE_INVALID            =  0,   // invalid XML character
-            CHARTYPE_OTHER              =  1,   // not special - one of "#%&;?\^`{}~" or DEL
-            CHARTYPE_WHITESPACE         =  2,   // one of "\t\n\r " (0x09, 0x0A, 0x0D, 0x20)
-            CHARTYPE_EXCLAMATION        =  3,   // '!' (0x21)
-            CHARTYPE_QUOTE              =  4,   // '\"' or '\'' (0x22 and 0x27)
-            CHARTYPE_DOLLAR             =  5,   // '$' (0x24)
-            CHARTYPE_OPEN_PAREN         =  6,   // '(' (0x28)
-            CHARTYPE_CLOSE_PAREN        =  7,   // ')' (0x29)
-            CHARTYPE_STAR               =  8,   // '*' (0x2A)
-            CHARTYPE_PLUS               =  9,   // '+' (0x2B)
-            CHARTYPE_COMMA              = 10,   // ',' (0x2C)
-            CHARTYPE_MINUS              = 11,   // '-' (0x2D)
-            CHARTYPE_PERIOD             = 12,   // '.' (0x2E)
-            CHARTYPE_SLASH              = 13,   // '/' (0x2F)
-            CHARTYPE_DIGIT              = 14,   // '0'-'9' (0x30 to 0x39)
-            CHARTYPE_COLON              = 15,   // ':' (0x3A)
-            CHARTYPE_LESS               = 16,   // '<' (0x3C)
-            CHARTYPE_EQUAL              = 17,   // '=' (0x3D)
-            CHARTYPE_GREATER            = 18,   // '>' (0x3E)
-            CHARTYPE_ATSIGN             = 19,   // '@' (0x40)
-            CHARTYPE_LETTER             = 20,   // 'A'-'Z' or 'a'-'z' (0x41 to 0x5A and 0x61 to 0x7A)
-            CHARTYPE_OPEN_BRACKET       = 21,   // '[' (0x5B)
-            CHARTYPE_CLOSE_BRACKET      = 22,   // ']' (0x5D)
-            CHARTYPE_UNDERSCORE         = 23,   // '_' (0x5F)
-            CHARTYPE_UNION              = 24,   // '|' (0x7C)
-            CHARTYPE_NONASCII           = 25;   // Non-ASCII Unicode codepoint (>= 0x80)
-
-        private static byte[] fASCIICharMap = {
-            0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  2,  0,  0,  2,  0,  0,
-            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-            2,  3,  4,  1,  5,  1,  1,  4,  6,  7,  8,  9, 10, 11, 12, 13,
-           14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15,  1, 16, 17, 18,  1,
-           19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-           20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21,  1, 22,  1, 23,
-            1, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-           20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  1, 24,  1,  1,  1
-        };
-
-        /**
-         * Symbol literals
-         */
-        /***
-        private static int fgAndSymbol = -1;                // 'and'
-        private static int fgOrSymbol = -1;                 // 'or'
-        private static int fgModSymbol = -1;                // 'mod'
-        private static int fgDivSymbol = -1;                // 'div'
-
-        private static int fgCommentSymbol = -1;            // 'comment'
-        private static int fgTextSymbol = -1;               // 'text'
-        private static int fgPISymbol = -1;                 // 'processing-instruction'
-        private static int fgNodeSymbol = -1;               // 'node'
-
-        private static int fgAncestorSymbol = -1;           // 'ancestor'
-        private static int fgAncestorOrSelfSymbol = -1;     // 'ancestor-or-self'
-        private static int fgAttributeSymbol = -1;          // 'attribute'
-        private static int fgChildSymbol = -1;              // 'child'
-        private static int fgDescendantSymbol = -1;         // 'descendant'
-        private static int fgDescendantOrSelfSymbol = -1;   // 'descendant-or-self'
-        private static int fgFollowingSymbol = -1;          // 'following'
-        private static int fgFollowingSiblingSymbol = -1;   // 'following-sibling'
-        private static int fgNamespaceSymbol = -1;          // 'namespace'
-        private static int fgParentSymbol = -1;             // 'parent'
-        private static int fgPrecedingSymbol = -1;          // 'preceding'
-        private static int fgPrecedingSiblingSymbol = -1;   // 'preceding-sibling'
-        private static int fgSelfSymbol = -1;               // 'self'
-
-        private static SymbolTable fgSymbolTable = new SymbolTable();
-
-        static {
-            fgAndSymbol = fgSymbolTable.addSymbol("and");
-            fgOrSymbol = fgSymbolTable.addSymbol("or");
-            fgModSymbol = fgSymbolTable.addSymbol("mod");
-            fgDivSymbol = fgSymbolTable.addSymbol("div");
-            fgCommentSymbol = fgSymbolTable.addSymbol("comment");
-            fgTextSymbol = fgSymbolTable.addSymbol("text");
-            fgPISymbol = fgSymbolTable.addSymbol("processing-instruction");
-            fgNodeSymbol = fgSymbolTable.addSymbol("node");
-            fgAncestorSymbol = fgSymbolTable.addSymbol("ancestor");
-            fgAncestorOrSelfSymbol = fgSymbolTable.addSymbol("ancestor-or-self");
-            fgAttributeSymbol = fgSymbolTable.addSymbol("attribute");
-            fgChildSymbol = fgSymbolTable.addSymbol("child");
-            fgDescendantSymbol = fgSymbolTable.addSymbol("descendant");
-            fgDescendantOrSelfSymbol = fgSymbolTable.addSymbol("descendant-or-self");
-            fgFollowingSymbol = fgSymbolTable.addSymbol("following");
-            fgFollowingSiblingSymbol = fgSymbolTable.addSymbol("following-sibling");
-            fgNamespaceSymbol = fgSymbolTable.addSymbol("namespace");
-            fgParentSymbol = fgSymbolTable.addSymbol("parent");
-            fgPrecedingSymbol = fgSymbolTable.addSymbol("preceding");
-            fgPrecedingSiblingSymbol = fgSymbolTable.addSymbol("preceding-sibling");
-            fgSelfSymbol = fgSymbolTable.addSymbol("self");
-        }
-        /***/
-
-        //
-        // Data
-        //
-
-        /** Symbol table. */
-        private SymbolTable fSymbolTable;
-
-        // symbols
-
-        private String fAndSymbol;
-        private String fOrSymbol;
-        private String fModSymbol;
-        private String fDivSymbol;
-
-        private String fCommentSymbol;
-        private String fTextSymbol;
-        private String fPISymbol;
-        private String fNodeSymbol;
-
-        private String fAncestorSymbol;
-        private String fAncestorOrSelfSymbol;
-        private String fAttributeSymbol;
-        private String fChildSymbol;
-        private String fDescendantSymbol;
-        private String fDescendantOrSelfSymbol;
-        private String fFollowingSymbol;
-        private String fFollowingSiblingSymbol;
-        private String fNamespaceSymbol;
-        private String fParentSymbol;
-        private String fPrecedingSymbol;
-        private String fPrecedingSiblingSymbol;
-        private String fSelfSymbol;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs an XPath expression scanner. */
-        public Scanner(SymbolTable symbolTable) {
-
-            // save pool and tokens
-            fSymbolTable = symbolTable;
-
-            // create symbols
-            fAndSymbol = fSymbolTable.addSymbol("and");
-            fOrSymbol = fSymbolTable.addSymbol("or");
-            fModSymbol = fSymbolTable.addSymbol("mod");
-            fDivSymbol = fSymbolTable.addSymbol("div");
-            fCommentSymbol = fSymbolTable.addSymbol("comment");
-            fTextSymbol = fSymbolTable.addSymbol("text");
-            fPISymbol = fSymbolTable.addSymbol("processing-instruction");
-            fNodeSymbol = fSymbolTable.addSymbol("node");
-            fAncestorSymbol = fSymbolTable.addSymbol("ancestor");
-            fAncestorOrSelfSymbol = fSymbolTable.addSymbol("ancestor-or-self");
-            fAttributeSymbol = fSymbolTable.addSymbol("attribute");
-            fChildSymbol = fSymbolTable.addSymbol("child");
-            fDescendantSymbol = fSymbolTable.addSymbol("descendant");
-            fDescendantOrSelfSymbol = fSymbolTable.addSymbol("descendant-or-self");
-            fFollowingSymbol = fSymbolTable.addSymbol("following");
-            fFollowingSiblingSymbol = fSymbolTable.addSymbol("following-sibling");
-            fNamespaceSymbol = fSymbolTable.addSymbol("namespace");
-            fParentSymbol = fSymbolTable.addSymbol("parent");
-            fPrecedingSymbol = fSymbolTable.addSymbol("preceding");
-            fPrecedingSiblingSymbol = fSymbolTable.addSymbol("preceding-sibling");
-            fSelfSymbol = fSymbolTable.addSymbol("self");
-
-        } // <init>(SymbolTable)
-
-        /**
-         *
-         */
-        public boolean scanExpr(SymbolTable symbolTable,
-                                XPath.Tokens tokens, String data,
-                                int currentOffset, int endOffset)
-            throws XPathException {
-
-            int nameOffset;
-            String nameHandle, prefixHandle;
-            boolean starIsMultiplyOperator = false;
-            int ch;
-            final String emptySymbol = fSymbolTable.addSymbol("");
-
-            /***
-            if (XPath.Tokens.DUMP_TOKENS) {
-                System.out.println("  <test>");
-                System.out.println("    <expression>");
-                System.out.println("      " + encoding.createString(data, currentOffset, endOffset - currentOffset));
-                System.out.println("    </expression>");
-            }
-            /***/
-            while (true) {
-                if (currentOffset == endOffset) {
-                    break;
-                }
-                ch = data.charAt(currentOffset);
-                //
-                // [39] ExprWhitespace ::= S
-                //
-                while (ch == ' ' || ch == 0x0A || ch == 0x09 || ch == 0x0D) {
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    ch = data.charAt(currentOffset);
-                }
-                if (currentOffset == endOffset) {
-                    break;
-                }
-                //
-                // [28] ExprToken ::= '(' | ')' | '[' | ']' | '.' | '..' | '@' | ',' | '::'
-                //                  | NameTest | NodeType | Operator | FunctionName
-                //                  | AxisName | Literal | Number | VariableReference
-                //
-                byte chartype = (ch >= 0x80) ? CHARTYPE_NONASCII : fASCIICharMap[ch];
-                switch (chartype) {
-                case CHARTYPE_OPEN_PAREN:       // '('
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_OPEN_PAREN);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_CLOSE_PAREN:      // ')'
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_CLOSE_PAREN);
-                    starIsMultiplyOperator = true;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_OPEN_BRACKET:     // '['
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_OPEN_BRACKET);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_CLOSE_BRACKET:    // ']'
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_CLOSE_BRACKET);
-                    starIsMultiplyOperator = true;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                //
-                // [30] Number ::= Digits ('.' Digits?)? | '.' Digits
-                //                                         ^^^^^^^^^^
-                //
-                case CHARTYPE_PERIOD:           // '.', '..' or '.' Digits
-                    if (currentOffset + 1 == endOffset) {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_PERIOD);
-                        starIsMultiplyOperator = true;
-                        currentOffset++;
-                        break;
-                    }
-                    ch = data.charAt(currentOffset + 1);
-                    if (ch == '.') {            // '..'
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_DOUBLE_PERIOD);
-                        starIsMultiplyOperator = true;
-                        currentOffset += 2;
-                    } else if (ch >= '0' && ch <= '9') {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_NUMBER);
-                        starIsMultiplyOperator = true;
-                        currentOffset = scanNumber(tokens, data, endOffset, currentOffset/*, encoding*/);
-                    } else if (ch == '/') {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_PERIOD);
-                        starIsMultiplyOperator = true;
-                        currentOffset++;
-                    } else {                    // '.'
-                        throw new XPathException ("Invalid character following '.'");
-                    }
-                    if (currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_ATSIGN:           // '@'
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_ATSIGN);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_COMMA:            // ','
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_COMMA);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_COLON:            // '::'
-                    if (++currentOffset == endOffset) {
-                // System.out.println("abort 1a");
-                        return false; // REVISIT
-                    }
-                    ch = data.charAt(currentOffset);
-                    if (ch != ':') {
-                // System.out.println("abort 1b");
-                        return false; // REVISIT
-                    }
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_DOUBLE_COLON);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_SLASH:            // '/' and '//'
-                    if (++currentOffset == endOffset) {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH);
-                        starIsMultiplyOperator = false;
-                        break;
-                    }
-                    ch = data.charAt(currentOffset);
-                    if (ch == '/') { // '//'
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_DOUBLE_SLASH);
-                        starIsMultiplyOperator = false;
-                        if (++currentOffset == endOffset) {
-                            break;
-                        }
-                    } else {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH);
-                        starIsMultiplyOperator = false;
-                    }
-                    break;
-                case CHARTYPE_UNION:            // '|'
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_UNION);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_PLUS:             // '+'
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_PLUS);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_MINUS:            // '-'
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_MINUS);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_EQUAL:            // '='
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_EQUAL);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_EXCLAMATION:      // '!='
-                    if (++currentOffset == endOffset) {
-                // System.out.println("abort 2a");
-                        return false; // REVISIT
-                    }
-                    ch = data.charAt(currentOffset);
-                    if (ch != '=') {
-                // System.out.println("abort 2b");
-                        return false; // REVISIT
-                    }
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_NOT_EQUAL);
-                    starIsMultiplyOperator = false;
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                case CHARTYPE_LESS: // '<' and '<='
-                    if (++currentOffset == endOffset) {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_LESS);
-                        starIsMultiplyOperator = false;
-                        break;
-                    }
-                    ch = data.charAt(currentOffset);
-                    if (ch == '=') { // '<='
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_LESS_EQUAL);
-                        starIsMultiplyOperator = false;
-                        if (++currentOffset == endOffset) {
-                            break;
-                        }
-                    } else {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_LESS);
-                        starIsMultiplyOperator = false;
-                    }
-                    break;
-                case CHARTYPE_GREATER: // '>' and '>='
-                    if (++currentOffset == endOffset) {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_GREATER);
-                        starIsMultiplyOperator = false;
-                        break;
-                    }
-                    ch = data.charAt(currentOffset);
-                    if (ch == '=') { // '>='
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_GREATER_EQUAL);
-                        starIsMultiplyOperator = false;
-                        if (++currentOffset == endOffset) {
-                            break;
-                        }
-                    } else {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_GREATER);
-                        starIsMultiplyOperator = false;
-                    }
-                    break;
-                //
-                // [29] Literal ::= '"' [^"]* '"' | "'" [^']* "'"
-                //
-                case CHARTYPE_QUOTE:            // '\"' or '\''
-                    int qchar = ch;
-                    if (++currentOffset == endOffset) {
-                // System.out.println("abort 2c");
-                        return false; // REVISIT
-                    }
-                    ch = data.charAt(currentOffset);
-                    int litOffset = currentOffset;
-                    while (ch != qchar) {
-                        if (++currentOffset == endOffset) {
-                // System.out.println("abort 2d");
-                            return false; // REVISIT
-                        }
-                        ch = data.charAt(currentOffset);
-                    }
-                    int litLength = currentOffset - litOffset;
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_LITERAL);
-                    starIsMultiplyOperator = true;
-                    tokens.addToken(symbolTable.addSymbol(data.substring(litOffset, litOffset + litLength)));
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                //
-                // [30] Number ::= Digits ('.' Digits?)? | '.' Digits
-                // [31] Digits ::= [0-9]+
-                //
-                case CHARTYPE_DIGIT:
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_NUMBER);
-                    starIsMultiplyOperator = true;
-                    currentOffset = scanNumber(tokens, data, endOffset, currentOffset/*, encoding*/);
-                    break;
-                //
-                // [36] VariableReference ::= '$' QName
-                //
-                case CHARTYPE_DOLLAR:
-                    if (++currentOffset == endOffset) {
-                // System.out.println("abort 3a");
-                        return false; // REVISIT
-                    }
-                    nameOffset = currentOffset;
-                    currentOffset = scanNCName(data, endOffset, currentOffset);
-                    if (currentOffset == nameOffset) {
-                // System.out.println("abort 3b");
-                        return false; // REVISIT
-                    }
-                    if (currentOffset < endOffset) {
-                        ch = data.charAt(currentOffset);
-                    }
-                    else {
-                        ch = -1;
-                    }
-                    nameHandle = symbolTable.addSymbol(data.substring(nameOffset, currentOffset));
-                    if (ch != ':') {
-                        prefixHandle = emptySymbol;
-                    } else {
-                        prefixHandle = nameHandle;
-                        if (++currentOffset == endOffset) {
-                // System.out.println("abort 4a");
-                            return false; // REVISIT
-                        }
-                        nameOffset = currentOffset;
-                        currentOffset = scanNCName(data, endOffset, currentOffset);
-                        if (currentOffset == nameOffset) {
-                // System.out.println("abort 4b");
-                            return false; // REVISIT
-                        }
-                        if (currentOffset < endOffset) {
-                            ch = data.charAt(currentOffset);
-                        }
-                        else {
-                            ch = -1;
-                        }
-                        nameHandle = symbolTable.addSymbol(data.substring(nameOffset, currentOffset));
-                    }
-                    addToken(tokens, XPath.Tokens.EXPRTOKEN_VARIABLE_REFERENCE);
-                    starIsMultiplyOperator = true;
-                    tokens.addToken(prefixHandle);
-                    tokens.addToken(nameHandle);
-                    break;
-                //
-                // [37] NameTest ::= '*' | NCName ':' '*' | QName
-                // [34] MultiplyOperator ::= '*'
-                //
-                case CHARTYPE_STAR:             // '*'
-                    //
-                    // 3.7 Lexical Structure
-                    //
-                    //  If there is a preceding token and the preceding token is not one of @, ::, (, [, , or
-                    //  an Operator, then a * must be recognized as a MultiplyOperator.
-                    //
-                    // Otherwise, the token must not be recognized as a MultiplyOperator.
-                    //
-                    if (starIsMultiplyOperator) {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_MULT);
-                        starIsMultiplyOperator = false;
-                    } else {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_NAMETEST_ANY);
-                        starIsMultiplyOperator = true;
-                    }
-                    if (++currentOffset == endOffset) {
-                        break;
-                    }
-                    break;
-                //
-                // NCName, QName and non-terminals
-                //
-                case CHARTYPE_NONASCII: // possibly a valid non-ascii 'Letter' (BaseChar | Ideographic)
-                case CHARTYPE_LETTER:
-                case CHARTYPE_UNDERSCORE:
-                    //
-                    // 3.7 Lexical Structure
-                    //
-                    //  If there is a preceding token and the preceding token is not one of @, ::, (, [, , or
-                    //  an Operator, then an NCName must be recognized as an OperatorName.
-                    //
-                    //  If the character following an NCName (possibly after intervening ExprWhitespace) is (,
-                    //  then the token must be recognized as a NodeType or a FunctionName.
-                    //
-                    //  If the two characters following an NCName (possibly after intervening ExprWhitespace)
-                    //  are ::, then the token must be recognized as an AxisName.
-                    //
-                    //  Otherwise, the token must not be recognized as an OperatorName, a NodeType, a
-                    //  FunctionName, or an AxisName.
-                    //
-                    // [33] OperatorName ::= 'and' | 'or' | 'mod' | 'div'
-                    // [38] NodeType ::= 'comment' | 'text' | 'processing-instruction' | 'node'
-                    // [35] FunctionName ::= QName - NodeType
-                    // [6] AxisName ::= (see above)
-                    //
-                    // [37] NameTest ::= '*' | NCName ':' '*' | QName
-                    // [5] NCName ::= (Letter | '_') (NCNameChar)*
-                    // [?] NCNameChar ::= Letter | Digit | '.' | '-' | '_'  (ascii subset of 'NCNameChar')
-                    // [?] QName ::= (NCName ':')? NCName
-                    // [?] Letter ::= [A-Za-z]                              (ascii subset of 'Letter')
-                    // [?] Digit ::= [0-9]                                  (ascii subset of 'Digit')
-                    //
-                    nameOffset = currentOffset;
-                    currentOffset = scanNCName(data, endOffset, currentOffset);
-                    if (currentOffset == nameOffset) {
-                // System.out.println("abort 4c");
-                        return false; // REVISIT
-                    }
-                    if (currentOffset < endOffset) {
-                        ch = data.charAt(currentOffset);
-                    }
-                    else {
-                        ch = -1;
-                    }
-                    nameHandle = symbolTable.addSymbol(data.substring(nameOffset, currentOffset));
-                    boolean isNameTestNCName = false;
-                    boolean isAxisName = false;
-                    prefixHandle = emptySymbol;
-                    if (ch == ':') {
-                        if (++currentOffset == endOffset) {
-                // System.out.println("abort 5");
-                            return false; // REVISIT
-                        }
-                        ch = data.charAt(currentOffset);
-                        if (ch == '*') {
-                            if (++currentOffset < endOffset) {
-                                ch = data.charAt(currentOffset);
-                            }
-                            isNameTestNCName = true;
-                        } else if (ch == ':') {
-                            if (++currentOffset < endOffset) {
-                                ch = data.charAt(currentOffset);
-                            }
-                            isAxisName = true;
-                        } else {
-                            prefixHandle = nameHandle;
-                            nameOffset = currentOffset;
-                            currentOffset = scanNCName(data, endOffset, currentOffset);
-                            if (currentOffset == nameOffset) {
-                // System.out.println("abort 5b");
-                                return false; // REVISIT
-                            }
-                            if (currentOffset < endOffset) {
-                                ch = data.charAt(currentOffset);
-                            }
-                            else {
-                                ch = -1;
-                            }
-                            nameHandle = symbolTable.addSymbol(data.substring(nameOffset, currentOffset));
-                        }
-                    }
-                    //
-                    // [39] ExprWhitespace ::= S
-                    //
-                    while (ch == ' ' || ch == 0x0A || ch == 0x09 || ch == 0x0D) {
-                        if (++currentOffset == endOffset) {
-                            break;
-                        }
-                        ch = data.charAt(currentOffset);
-                    }
-                    //
-                    //  If there is a preceding token and the preceding token is not one of @, ::, (, [, , or
-                    //  an Operator, then an NCName must be recognized as an OperatorName.
-                    //
-                    if (starIsMultiplyOperator) {
-                        if (nameHandle == fAndSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_AND);
-                            starIsMultiplyOperator = false;
-                        } else if (nameHandle == fOrSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_OR);
-                            starIsMultiplyOperator = false;
-                        } else if (nameHandle == fModSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_MOD);
-                            starIsMultiplyOperator = false;
-                        } else if (nameHandle == fDivSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_OPERATOR_DIV);
-                            starIsMultiplyOperator = false;
-                        } else {
-                // System.out.println("abort 6");
-                            return false; // REVISIT
-                        }
-                        if (isNameTestNCName) {
-                // System.out.println("abort 7");
-                            return false; // REVISIT - NCName:* where an OperatorName is required
-                        } else if (isAxisName) {
-                // System.out.println("abort 8");
-                            return false; // REVISIT - AxisName:: where an OperatorName is required
-                        }
-                        break;
-                    }
-                    //
-                    //  If the character following an NCName (possibly after intervening ExprWhitespace) is (,
-                    //  then the token must be recognized as a NodeType or a FunctionName.
-                    //
-                    if (ch == '(' && !isNameTestNCName && !isAxisName) {
-                        if (nameHandle == fCommentSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_NODETYPE_COMMENT);
-                        } else if (nameHandle == fTextSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_NODETYPE_TEXT);
-                        } else if (nameHandle == fPISymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_NODETYPE_PI);
-                        } else if (nameHandle == fNodeSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_NODETYPE_NODE);
-                        } else {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_FUNCTION_NAME);
-                            tokens.addToken(prefixHandle);
-                            tokens.addToken(nameHandle);
-                        }
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_OPEN_PAREN);
-                        starIsMultiplyOperator = false;
-                        if (++currentOffset == endOffset) {
-                            break;
-                        }
-                        break;
-                    }
-                    //
-                    //  If the two characters following an NCName (possibly after intervening ExprWhitespace)
-                    //  are ::, then the token must be recognized as an AxisName.
-                    //
-                    if (isAxisName ||
-                        (ch == ':' && currentOffset + 1 < endOffset &&
-                         data.charAt(currentOffset + 1) == ':')) {
-                        if (nameHandle == fAncestorSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_ANCESTOR);
-                        } else if (nameHandle == fAncestorOrSelfSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF);
-                        } else if (nameHandle == fAttributeSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_ATTRIBUTE);
-                        } else if (nameHandle == fChildSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_CHILD);
-                        } else if (nameHandle == fDescendantSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_DESCENDANT);
-                        } else if (nameHandle == fDescendantOrSelfSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF);
-                        } else if (nameHandle == fFollowingSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_FOLLOWING);
-                        } else if (nameHandle == fFollowingSiblingSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING);
-                        } else if (nameHandle == fNamespaceSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_NAMESPACE);
-                        } else if (nameHandle == fParentSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_PARENT);
-                        } else if (nameHandle == fPrecedingSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_PRECEDING);
-                        } else if (nameHandle == fPrecedingSiblingSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_PRECEDING_SIBLING);
-                        } else if (nameHandle == fSelfSymbol) {
-                            addToken(tokens, XPath.Tokens.EXPRTOKEN_AXISNAME_SELF);
-                        } else {
-                // System.out.println("abort 9");
-                            return false; // REVISIT
-                        }
-                        if (isNameTestNCName) {
-                // System.out.println("abort 10");
-                            return false; // REVISIT - "NCName:* ::" where "AxisName ::" is required
-                        }
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_DOUBLE_COLON);
-                        starIsMultiplyOperator = false;
-                        if (!isAxisName) {
-                            currentOffset++;
-                            if (++currentOffset == endOffset) {
-                                break;
-                            }
-                        }
-                        break;
-                    }
-                    //
-                    //  Otherwise, the token must not be recognized as an OperatorName, a NodeType, a
-                    //  FunctionName, or an AxisName.
-                    //
-                    if (isNameTestNCName) {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_NAMETEST_NAMESPACE);
-                        starIsMultiplyOperator = true;
-                        tokens.addToken(nameHandle);
-                    } else {
-                        addToken(tokens, XPath.Tokens.EXPRTOKEN_NAMETEST_QNAME);
-                        starIsMultiplyOperator = true;
-                        tokens.addToken(prefixHandle);
-                        tokens.addToken(nameHandle);
-                    }
-                    break;
-                }
-            }
-            if (XPath.Tokens.DUMP_TOKENS) {
-                tokens.dumpTokens();
-            }
-            return true;
-        }
-        //
-        // [5] NCName ::= (Letter | '_') (NCNameChar)*
-        // [6] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender
-        //
-        int scanNCName(String data, int endOffset, int currentOffset) {
-            int ch = data.charAt(currentOffset);
-            if (ch >= 0x80) {
-                if (!XMLChar.isNameStart(ch))
-                /*** // REVISIT: Make sure this is a negation. ***
-                if ((XMLCharacterProperties.fgCharFlags[ch] &
-                     XMLCharacterProperties.E_InitialNameCharFlag) == 0)
-                /***/
-                {
-                    return currentOffset;
-                }
-            }
-            else {
-                byte chartype = fASCIICharMap[ch];
-                if (chartype != CHARTYPE_LETTER && chartype != CHARTYPE_UNDERSCORE) {
-                    return currentOffset;
-                }
-            }
-            while (++currentOffset < endOffset) {
-                ch = data.charAt(currentOffset);
-                if (ch >= 0x80) {
-                    if (!XMLChar.isName(ch))
-                    /*** // REVISIT: Make sure this is a negation. ***
-                    if ((XMLCharacterProperties.fgCharFlags[ch] &
-                         XMLCharacterProperties.E_NameCharFlag) == 0)
-                    /***/
-                    {
-                        break;
-                    }
-                }
-                else {
-                    byte chartype = fASCIICharMap[ch];
-                    if (chartype != CHARTYPE_LETTER && chartype != CHARTYPE_DIGIT &&
-                        chartype != CHARTYPE_PERIOD && chartype != CHARTYPE_MINUS &&
-                        chartype != CHARTYPE_UNDERSCORE)
-                    {
-                        break;
-                    }
-                }
-            }
-            return currentOffset;
-        }
-        /*
-        void allocateProducer(byte[] data, int offset, int length, EncodingSupport encoding) {
-            XPathStringProducer sp = fStringProducers[fStringProducerCount];
-            if (sp != null) {
-                sp = sp.setState(data, offset, length, encoding);
-            } else {
-                sp = new XPathStringProducer(data, offset, length, encoding);
-            }
-            fStringProducers[fStringProducerCount++] = sp;
-        }
-        void finalizeProducer(byte[] data) {
-            fStringProducerCount--;
-        }
-        private class XPathStringProducer {
-            byte[] fData = null;
-            int fOffset = -1;
-            int fLength = -1;
-            String fEncoding = null;
-            XPathStringProducer(byte[] data, int offset, int length, EncodingSupport encoding) {
-                init(data, offset, length, encoding);
-            }
-            XPathStringProducer setState(byte[] bytes, int offset, int length, EncodingSupport encoding) {
-                init(bytes, offset, length, encoding);
-                return this;
-            }
-            void init(byte[] data, int offset, int length, EncodingSupport encoding) {
-                fData = data;
-                fOffset = offset;
-                fLength = length;
-                fEncoding = encoding;
-            }
-            String getEncoding() {
-                return fEncoding;
-            }
-            void finalizeProducer() {
-                // do nothing
-            }
-            int addSymbol(int offset, int length) {
-                return fSymbolTable.addSymbol(fData, offset, length, fEncoding);
-            }
-        }
-        private XPathStringProducer[] fStringProducers = new XPathStringProducer[8];
-        private int fStringProducerCount = 0;
-        private XPathStringProducer getStringProducer(byte[] data) {
-            XPathStringProducer sp = null;
-            for (int i = 0; i < fStringProducerCount; i++) {
-                if (fStringProducers[i].fData == data) {
-                    return fStringProducers[i];
-                }
-            }
-            throw new RuntimeException("No StringProducer");
-        }
-        */
-        //
-        // [30] Number ::= Digits ('.' Digits?)? | '.' Digits
-        // [31] Digits ::= [0-9]+
-        //
-        private int scanNumber(XPath.Tokens tokens, String/*byte[]*/ data, int endOffset, int currentOffset/*, EncodingSupport encoding*/) {
-            int ch = data.charAt(currentOffset);
-            int whole = 0;
-            int part = 0;
-            while (ch >= '0' && ch <= '9') {
-                whole = (whole * 10) + (ch - '0');
-                if (++currentOffset == endOffset) {
-                    break;
-                }
-                ch = data.charAt(currentOffset);
-            }
-            if (ch == '.') {
-                if (++currentOffset < endOffset) {
-                    int start = currentOffset;
-                    ch = data.charAt(currentOffset);
-                    while (ch >= '0' && ch <= '9') {
-                        part = (part * 10) + (ch - '0');
-                        if (++currentOffset == endOffset) {
-                            break;
-                        }
-                        ch = data.charAt(currentOffset);
-                    }
-                    if (part != 0) {
-                        /***
-                        part = tokens.addSymbol(data, start, currentOffset - start, encoding);
-                        /***/
-                        throw new RuntimeException("find a solution!");
-                        //part = fStringPool.addSymbol(data.substring(start, currentOffset));
-                        /***/
-                    }
-                }
-            }
-            tokens.addToken(whole);
-            tokens.addToken(part);
-            return currentOffset;
-        }
-
-        /***
-        public static SymbolTable getGlobalTokens() {
-            return fgSymbolTable;
-        }
-
-        public static void main(String argv[]) {
-            try {
-                SymbolTable symbols = new SymbolTable(XPathExprScanner.getGlobalTokens());
-                XPath.Tokens tokens = new XPath.Tokens(symbols);
-                byte[] bytes = new byte[1 << 8]; // 256
-                int i = 0;
-                if (XPath.Tokens.DUMP_TOKENS) {
-                    System.out.println("<output>");
-                    System.out.println();
-                }
-                while (i < argv.length) {
-                    String uri = argv[i++];
-                    // System.out.println("uri: "+uri);
-                    FileInputStream is = new FileInputStream(uri);
-                    int lineOffset = 0;
-                    int offset = 0;
-                    while (true) {
-                        int avail = bytes.length - offset;
-                        if (avail == 0) {
-                            avail = bytes.length;
-                            byte[] newBytes = new byte[avail << 1];
-                            System.arraycopy(bytes, 0, newBytes, 0, avail);
-                            bytes = newBytes;
-                        }
-                        int result = is.read(bytes, offset, avail);
-                        if (result == -1) {
-                            bytes[offset] = 0;
-                            break;
-                        }
-                        result += offset;
-                        for (int j = offset; j < result; j++) {
-                            int ch = bytes[j];
-                            if (ch == 0x0A || ch == 0x0D) {
-                                if (lineOffset < offset) {
-                                    XPathExprScanner.scanExpr(tokens, bytes, lineOffset, offset, UTF8EncodingSupport.getInstance());
-                                }
-                                while (ch == 0x0A || ch == 0x0D) {
-                                    if (++j == result) {
-                                        j = result;
-                                        break;
-                                    }
-                                    ch = bytes[j];
-                                }
-                                lineOffset = offset;
-                                if (j == result) {
-                                    break;
-                                }
-                            }
-                            bytes[offset++] = (byte)ch;
-                        }
-                    }
-                    is.close();
-                }
-                if (XPath.Tokens.DUMP_TOKENS) {
-                    System.out.println("</output>");
-                }
-            }
-            catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        /***/
-
-        //
-        // Protected methods
-        //
-
-        /**
-         * This method adds the specified token to the token list. By
-         * default, this method allows all tokens. However, subclasses
-         * of the XPathExprScanner can override this method in order
-         * to disallow certain tokens from being used in the scanned
-         * XPath expression. This is a convenient way of allowing only
-         * a subset of XPath.
-         */
-        protected void addToken(XPath.Tokens tokens, int token)
-            throws XPathException {
-            tokens.addToken(token);
-        } // addToken(int)
-
-    } // class Scanner
-
-    /**
-     * @author Glenn Marcy, IBM
-     * @author Andy Clark, IBM
-     *
-     * @version $Id$
-     */
-    /***
-    public static class XPathExprParser {
-
-        //
-        // Constants
-        //
-
-        private static final boolean DUMP_PARSE_TREE = false;
-
-        private static final boolean DEBUG_PUSH_PARSEOPS = false;
-
-        /** Parse Tree operations * /
-        public static final int
-            PARSEOP_OR                              = -5000,
-            PARSEOP_AND                             = -5001,
-            PARSEOP_EQUAL                           = -5002,
-            PARSEOP_NOT_EQUAL                       = -5003,
-            PARSEOP_PLUS                            = -5004,
-            PARSEOP_MINUS                           = -5005,
-            PARSEOP_MULT                            = -5006,
-            PARSEOP_DIV                             = -5007,
-            PARSEOP_MOD                             = -5008,
-            PARSEOP_LESS                            = -5009,
-            PARSEOP_GREATER                         = -5010,
-            PARSEOP_LESS_EQUAL                      = -5011,
-            PARSEOP_GREATER_EQUAL                   = -5012,
-            PARSEOP_NEGATE                          = -5013,
-            PARSEOP_UNION                           = -5014,
-            PARSEOP_SELECT_ROOT                     = -5015,
-            PARSEOP_STEPS                           = -5016,
-            PARSEOP_STEP                            = -5017,
-            PARSEOP_AXIS_ANCESTOR                   = -5018,
-            PARSEOP_AXIS_ANCESTOR_OR_SELF           = -5019,
-            PARSEOP_AXIS_ATTRIBUTE                  = -5020,
-            PARSEOP_AXIS_CHILD                      = -5021,
-            PARSEOP_AXIS_DESCENDANT                 = -5022,
-            PARSEOP_AXIS_DESCENDANT_OR_SELF         = -5023,
-            PARSEOP_AXIS_FOLLOWING                  = -5024,
-            PARSEOP_AXIS_FOLLOWING_SIBLING          = -5025,
-            PARSEOP_AXIS_NAMESPACE                  = -5026,
-            PARSEOP_AXIS_PARENT                     = -5027,
-            PARSEOP_AXIS_PRECEDING                  = -5028,
-            PARSEOP_AXIS_PRECEDING_SIBLING          = -5029,
-            PARSEOP_AXIS_SELF                       = -5030,
-            PARSEOP_NODETEST_ANY                    = -5031,
-            PARSEOP_NODETEST_NAMESPACE              = -5032,
-            PARSEOP_NODETEST_QNAME                  = -5033,
-            PARSEOP_NODETEST_COMMENT                = -5034,
-            PARSEOP_NODETEST_TEXT                   = -5035,
-            PARSEOP_NODETEST_PI                     = -5036,
-            PARSEOP_NODETEST_PI_TARGET              = -5037,
-            PARSEOP_NODETEST_NODE                   = -5038,
-            PARSEOP_FILTER                          = -5039,
-            PARSEOP_PREDICATES                      = -5040,
-            PARSEOP_PREDICATE                       = -5041,
-            PARSEOP_VARIABLE_REFERENCE              = -5042,
-            PARSEOP_GROUPING                        = -5043,
-            PARSEOP_LITERAL                         = -5044,
-            PARSEOP_NUMBER                          = -5045,
-            PARSEOP_FUNCTION                        = -5046,
-            PARSEOP_FUNCTION_NAME                   = -5047,
-            PARSEOP_FUNCTION_ARGUMENTS              = -5048;
-
-        //
-        // Data
-        //
-
-        private int fTokenCount = 0;  // for reading
-        private int fCurrentToken = 0;  // for reading
-
-        private static final int INITIAL_PARSEOP_COUNT = 1 << 8;
-        private int[] fParseTree = new int[INITIAL_PARSEOP_COUNT];
-        private int fParseOpCount = 0;    // for writing
-        private int fCurrentParseOp = 0;  // for reading
-
-        /** Symbol table. * /
-        private SymbolTable fSymbolTable;
-
-        /** Tokens. * /
-        private XPath.Tokens fTokens;
-
-        /** Scanner. * /
-        private XPathExprScanner fScanner;
-
-        //
-        // Constructors
-        //
-
-        public XPathExprParser() {
-            this(new SymbolTable());
-        }
-
-        public XPathExprParser(SymbolTable symbolTable) {
-            this(symbolTable, new XPathExprScanner(symbolTable));
-        }
-
-        public XPathExprParser(SymbolTable symbolTable, XPathExprScanner scanner) {
-
-            fSymbolTable = symbolTable;
-            fScanner = scanner;
-
-        } // <init>(SymbolTable,XPathExprScanner)
-
-        //
-        // Public methods
-        //
-
-        // init
-
-        public void reset() {
-            fParseOpCount = 0;
-            fCurrentParseOp = 0;
-        }
-
-        // parsing
-
-        public int parseExpr(String data) throws XPathException {
-            return parseExpr(data, 0, data.length());
-        }
-
-        public int parseExpr(String data, int currentOffset, int endOffset)
-            throws XPathException {
-            return parseExprOrPattern(data, currentOffset, endOffset, false);
-        }
-
-        public int parsePattern(String data, int currentOffset, int endOffset)
-            throws XPathException {
-            return parseExprOrPattern(data, currentOffset, endOffset, true);
-        }
-
-        public int parseExprOrPattern(String data, int currentOffset,
-                                      int endOffset, boolean isPattern)
-            throws XPathException {
-            fTokenCount = 0;
-
-            if (DUMP_PARSE_TREE) {
-                System.out.println("  <test>");
-                System.out.println("    <expression>");
-                System.out.println("      " + data.substring(currentOffset, endOffset));
-                System.out.println("    </expression>");
-            }
-            fTokens = new XPath.Tokens(fSymbolTable);
-            fScanner.scanExpr(fTokens, data, currentOffset, endOffset);
-            //
-            // Build parse tree
-            //
-            fTokenCount = fTokens.getTokenCount();
-            fCurrentToken = 0;
-            if (!parseExpr()) {
-                // System.out.println("abort 12");
-                return -1; // REVISIT
-            }
-            if (fCurrentToken < fTokenCount) {
-                // System.out.println("abort 13");
-                return -1; // REVISIT
-            }
-            if (DUMP_PARSE_TREE) {
-                dumpParseTree(fCurrentParseOp, 4);
-            }
-            if (DUMP_PARSE_TREE) {
-                System.out.println("  </test>");
-                System.out.println();
-            }
-            return fCurrentParseOp;
-        }
-
-        // parse tree ops
-
-        public int getCurrentParseOp() {
-            return fCurrentParseOp;
-        }
-
-        public int getParseTreeOp(int handle) {
-            return fParseTree[handle];
-        }
-
-        public int getParseTreeSubHandle(int handle, int subHandleIndex) {
-            return fParseTree[handle - 1 - subHandleIndex];
-        }
-
-        public String getParseTreeSymbol(int handle, int subHandleIndex) {
-            int symHandle = fParseTree[handle - 1 - subHandleIndex];
-            return fTokens.getTokenString(symHandle);
-        }
-
-        public int getParseTreeIntValue(int handle, int subHandleIndex) {
-            return fParseTree[handle - 1 - subHandleIndex];
-        }
-
-        // debugging
-
-        public void dumpParseTree(int rootParseOp, int indent) {
-                indentPrint(indent);
-                System.out.println("<parse-tree>");
-                dumpParseTreeNode(rootParseOp, indent + 2);
-                indentPrint(indent);
-                System.out.println("</parse-tree>");
-        }
-
-        public String getParseOpName(int parseOp) {
-            switch (parseOp) {
-                case PARSEOP_OR: return "PARSEOP_OR";
-                case PARSEOP_AND: return "PARSEOP_AND";
-                case PARSEOP_EQUAL: return "PARSEOP_EQUAL";
-                case PARSEOP_NOT_EQUAL: return "PARSEOP_NOT_EQUAL";
-                case PARSEOP_PLUS: return "PARSEOP_PLUS";
-                case PARSEOP_MINUS: return "PARSEOP_MINUS";
-                case PARSEOP_MULT: return "PARSEOP_MULT";
-                case PARSEOP_DIV: return "PARSEOP_DIV";
-                case PARSEOP_MOD: return "PARSEOP_MOD";
-                case PARSEOP_LESS: return "PARSEOP_LESS";
-                case PARSEOP_GREATER: return "PARSEOP_GREATER";
-                case PARSEOP_LESS_EQUAL: return "PARSEOP_LESS_EQUAL";
-                case PARSEOP_GREATER_EQUAL: return "PARSEOP_GREATER_EQUAL";
-                case PARSEOP_NEGATE: return "PARSEOP_NEGATE";
-                case PARSEOP_UNION: return "PARSEOP_UNION";
-                case PARSEOP_SELECT_ROOT: return "PARSEOP_SELECT_ROOT";
-                case PARSEOP_STEPS: return "PARSEOP_STEPS";
-                case PARSEOP_STEP: return "PARSEOP_STEP";
-                case PARSEOP_AXIS_ANCESTOR: return "PARSEOP_AXIS_ANCESTOR";
-                case PARSEOP_AXIS_ANCESTOR_OR_SELF: return "PARSEOP_AXIS_ANCESTOR_OR_SELF";
-                case PARSEOP_AXIS_ATTRIBUTE: return "PARSEOP_AXIS_ATTRIBUTE";
-                case PARSEOP_AXIS_CHILD: return "PARSEOP_AXIS_CHILD";
-                case PARSEOP_AXIS_DESCENDANT: return "PARSEOP_AXIS_DESCENDANT";
-                case PARSEOP_AXIS_DESCENDANT_OR_SELF: return "PARSEOP_AXIS_DESCENDANT_OR_SELF";
-                case PARSEOP_AXIS_FOLLOWING: return "PARSEOP_AXIS_FOLLOWING";
-                case PARSEOP_AXIS_FOLLOWING_SIBLING: return "PARSEOP_AXIS_FOLLOWING_SIBLING";
-                case PARSEOP_AXIS_NAMESPACE: return "PARSEOP_AXIS_NAMESPACE";
-                case PARSEOP_AXIS_PARENT: return "PARSEOP_AXIS_PARENT";
-                case PARSEOP_AXIS_PRECEDING: return "PARSEOP_AXIS_PRECEDING";
-                case PARSEOP_AXIS_PRECEDING_SIBLING: return "PARSEOP_AXIS_PRECEDING_SIBLING";
-                case PARSEOP_AXIS_SELF: return "PARSEOP_AXIS_SELF";
-                case PARSEOP_NODETEST_ANY: return "PARSEOP_NODETEST_ANY";
-                case PARSEOP_NODETEST_NAMESPACE: return "PARSEOP_NODETEST_NAMESPACE";
-                case PARSEOP_NODETEST_QNAME: return "PARSEOP_NODETEST_QNAME";
-                case PARSEOP_NODETEST_COMMENT: return "PARSEOP_NODETEST_COMMENT";
-                case PARSEOP_NODETEST_TEXT: return "PARSEOP_NODETEST_TEXT";
-                case PARSEOP_NODETEST_PI: return "PARSEOP_NODETEST_PI";
-                case PARSEOP_NODETEST_PI_TARGET: return "PARSEOP_NODETEST_PI_TARGET";
-                case PARSEOP_NODETEST_NODE: return "PARSEOP_NODETEST_NODE";
-                case PARSEOP_FILTER: return "PARSEOP_FILTER";
-                case PARSEOP_PREDICATES: return "PARSEOP_PREDICATES";
-                case PARSEOP_PREDICATE: return "PARSEOP_PREDICATE";
-                case PARSEOP_VARIABLE_REFERENCE: return "PARSEOP_VARIABLE_REFERENCE";
-                case PARSEOP_GROUPING: return "PARSEOP_GROUPING";
-                case PARSEOP_LITERAL: return "PARSEOP_LITERAL";
-                case PARSEOP_NUMBER: return "PARSEOP_NUMBER";
-                case PARSEOP_FUNCTION: return "PARSEOP_FUNCTION";
-                case PARSEOP_FUNCTION_NAME: return "PARSEOP_FUNCTION_NAME";
-                case PARSEOP_FUNCTION_ARGUMENTS: return "PARSEOP_FUNCTION_ARGUMENTS";
-            }
-            return "??? ("+parseOp+')';
-        }
-
-        //
-        // Protected methods
-        //
-
-        protected void checkParseOp(int parseOp) throws XPathException {
-            // do nothing; all parse ops allowed in the class
-        }
-
-        //
-        // Private methods
-        //
-
-        private void pushParseOp(int parseOp) throws XPathException {
-            if (DEBUG_PUSH_PARSEOPS) {
-                System.out.println("pushParseOp: "+getParseOpName(parseOp));
-            }
-            checkParseOp(parseOp);
-            try {
-                fParseTree[fParseOpCount] = parseOp;
-            } catch (ArrayIndexOutOfBoundsException ex) {
-                int[] oldList = fParseTree;
-                fParseTree = new int[fParseOpCount << 1];
-                System.arraycopy(oldList, 0, fParseTree, 0, fParseOpCount);
-                fParseTree[fParseOpCount] = parseOp;
-            }
-            fCurrentParseOp = fParseOpCount++;
-        }
-
-        private void pushParseOp2(int parseOp, int arg) throws XPathException {
-            if (DEBUG_PUSH_PARSEOPS) {
-                System.out.println("pushParseOp2: "+getParseOpName(parseOp)+", "+arg);
-            }
-            checkParseOp(parseOp);
-            try {
-                fParseTree[fParseOpCount + 1] = parseOp;
-            } catch (ArrayIndexOutOfBoundsException ex) {
-                int[] oldList = fParseTree;
-                fParseTree = new int[fParseOpCount << 1];
-                System.arraycopy(oldList, 0, fParseTree, 0, fParseOpCount);
-                fParseTree[fParseOpCount + 1] = parseOp;
-            }
-            fParseTree[fParseOpCount++] = arg;
-            fCurrentParseOp = fParseOpCount++;
-        }
-
-        private void pushParseOp3(int parseOp, int arg1, int arg2)
-            throws XPathException {
-            if (DEBUG_PUSH_PARSEOPS) {
-                System.out.println("pushParseOp3: "+getParseOpName(parseOp)+", "+arg1+", "+arg2);
-            }
-            checkParseOp(parseOp);
-            try {
-                fParseTree[fParseOpCount + 2] = parseOp;
-            } catch (ArrayIndexOutOfBoundsException ex) {
-                int[] oldList = fParseTree;
-                fParseTree = new int[fParseOpCount << 1];
-                System.arraycopy(oldList, 0, fParseTree, 0, fParseOpCount);
-                fParseTree[fParseOpCount + 2] = parseOp;
-            }
-            fParseTree[fParseOpCount++] = arg2;
-            fParseTree[fParseOpCount++] = arg1;
-            fCurrentParseOp = fParseOpCount++;
-        }
-
-        private void indentPrint(int indent) {
-            for (int i = 0; i < indent; i++) {
-                System.out.print(" ");
-            }
-        }
-
-        private void dumpParseTreeNode(int parseOp, int indent) {
-                switch (fParseTree[parseOp]) {
-                case PARSEOP_OR:
-                    indentPrint(indent);
-                    System.out.println("<or>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</or>");
-                    break;
-                case PARSEOP_AND:
-                    indentPrint(indent);
-                    System.out.println("<and>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</and>");
-                    break;
-                case PARSEOP_EQUAL:
-                    indentPrint(indent);
-                    System.out.println("<equal>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</equal>");
-                    break;
-                case PARSEOP_NOT_EQUAL:
-                    indentPrint(indent);
-                    System.out.println("<not-equal>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</not-equal>");
-                    break;
-                case PARSEOP_PLUS:
-                    indentPrint(indent);
-                    System.out.println("<plus>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</plus>");
-                    break;
-                case PARSEOP_MINUS:
-                    indentPrint(indent);
-                    System.out.println("<minus>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</minus>");
-                    break;
-                case PARSEOP_MULT:
-                    indentPrint(indent);
-                    System.out.println("<mult>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</mult>");
-                    break;
-                case PARSEOP_DIV:
-                    indentPrint(indent);
-                    System.out.println("<div>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</div>");
-                    break;
-                case PARSEOP_MOD:
-                    indentPrint(indent);
-                    System.out.println("<mod>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</mod>");
-                    break;
-                case PARSEOP_LESS:
-                    indentPrint(indent);
-                    System.out.println("<less>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</less>");
-                    break;
-                case PARSEOP_GREATER:
-                    indentPrint(indent);
-                    System.out.println("<greater>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</greater>");
-                    break;
-                case PARSEOP_LESS_EQUAL:
-                    indentPrint(indent);
-                    System.out.println("<less-equal>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</less-equal>");
-                    break;
-                case PARSEOP_GREATER_EQUAL:
-                    indentPrint(indent);
-                    System.out.println("<greater-equal>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</greater-equal>");
-                    break;
-                case PARSEOP_NEGATE:
-                    indentPrint(indent);
-                    System.out.println("<negate>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</negate>");
-                    break;
-                case PARSEOP_UNION:
-                    indentPrint(indent);
-                    System.out.println("<union>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</union>");
-                    break;
-                case PARSEOP_SELECT_ROOT:
-                    indentPrint(indent);
-                    if (fParseTree[parseOp - 1] == -1) {
-                        System.out.println("<select-root/>");
-                    } else {
-                        System.out.println("<select-root>");
-                        dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                        indentPrint(indent);
-                        System.out.println("</select-root>");
-                    }
-                    break;
-                case PARSEOP_STEPS:
-                    indentPrint(indent);
-                    System.out.println("<relative-location-path>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</relative-location-path>");
-                    break;
-                case PARSEOP_STEP:
-                    indentPrint(indent);
-                    System.out.println("<step>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</step>");
-                    break;
-                case PARSEOP_AXIS_ANCESTOR:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"ancestor\"/>");
-                    break;
-                case PARSEOP_AXIS_ANCESTOR_OR_SELF:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"ancestor-or-self\"/>");
-                    break;
-                case PARSEOP_AXIS_ATTRIBUTE:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"attribute\"/>");
-                    break;
-                case PARSEOP_AXIS_CHILD:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"child\"/>");
-                    break;
-                case PARSEOP_AXIS_DESCENDANT:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"descendant\"/>");
-                    break;
-                case PARSEOP_AXIS_DESCENDANT_OR_SELF:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"descendant-or-self\"/>");
-                    break;
-                case PARSEOP_AXIS_FOLLOWING:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"following\"/>");
-                    break;
-                case PARSEOP_AXIS_FOLLOWING_SIBLING:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"following-sibling\"/>");
-                    break;
-                case PARSEOP_AXIS_NAMESPACE:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"namespace\"/>");
-                    break;
-                case PARSEOP_AXIS_PARENT:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"parent\"/>");
-                    break;
-                case PARSEOP_AXIS_PRECEDING:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"preceding\"/>");
-                    break;
-                case PARSEOP_AXIS_PRECEDING_SIBLING:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"preceding-sibling\"/>");
-                    break;
-                case PARSEOP_AXIS_SELF:
-                    indentPrint(indent);
-                    System.out.println("<axis name=\"self\"/>");
-                    break;
-                case PARSEOP_NODETEST_ANY:
-                    indentPrint(indent);
-                    System.out.println("<nodetest type=\"any\"/>");
-                    break;
-                case PARSEOP_NODETEST_NAMESPACE:
-                    indentPrint(indent);
-                    System.out.print("<nodetest type=\"namespace\"");
-                    System.out.print(" prefix=\"" + fParseTree[parseOp - 1] + "\"");
-                    System.out.println("/>");
-                    break;
-                case PARSEOP_NODETEST_QNAME:
-                    indentPrint(indent);
-                    System.out.print("<nodetest type=\"qname\"");
-                    if (fParseTree[parseOp - 1] != -1) {
-                        System.out.print(" prefix=\"" + fParseTree[parseOp - 1] + "\"");
-                    }
-                    System.out.print(" localpart=\"" + fParseTree[parseOp - 2] + "\"");
-                    System.out.println("/>");
-                    break;
-                case PARSEOP_NODETEST_COMMENT:
-                    indentPrint(indent);
-                    System.out.println("<nodetest type=\"comment\"/>");
-                    break;
-                case PARSEOP_NODETEST_TEXT:
-                    indentPrint(indent);
-                    System.out.println("<nodetest type=\"text\"/>");
-                    break;
-                case PARSEOP_NODETEST_PI:
-                    indentPrint(indent);
-                    System.out.println("<nodetest type=\"processing-instruction\"/>");
-                    break;
-                case PARSEOP_NODETEST_PI_TARGET:
-                    indentPrint(indent);
-                    System.out.print("<nodetest type=\"processing-instruction\" target=\"");
-                    System.out.print(fParseTree[parseOp - 1]);
-                    System.out.println("\"/>");
-                    break;
-                case PARSEOP_NODETEST_NODE:
-                    indentPrint(indent);
-                    System.out.println("<nodetest type=\"node\"/>");
-                    break;
-                case PARSEOP_FILTER:
-                    indentPrint(indent);
-                    System.out.println("<step-with-predicate>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</step-with-predicate>");
-                    break;
-                case PARSEOP_PREDICATES:
-                    indentPrint(indent);
-                    System.out.println("<predicates>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</predicates>");
-                    break;
-                case PARSEOP_PREDICATE:
-                    indentPrint(indent);
-                    System.out.println("<predicate>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</predicate>");
-                    break;
-                case PARSEOP_VARIABLE_REFERENCE:
-                    indentPrint(indent);
-                    System.out.print("<variable-reference");
-                    if (fParseTree[parseOp - 1] != -1) {
-                        System.out.print(" prefix=\"" + fParseTree[parseOp - 1] + "\"");
-                    }
-                    System.out.print(" localpart=\"" + fParseTree[parseOp - 2] + "\"");
-                    System.out.println("/>");
-                    break;
-                case PARSEOP_GROUPING:
-                    indentPrint(indent);
-                    System.out.println("<grouping>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</grouping>");
-                    break;
-                case PARSEOP_LITERAL:
-                    indentPrint(indent);
-                    System.out.print("<literal");
-                    System.out.print(" value=\"" + fParseTree[parseOp - 1] + "\"");
-                    System.out.println("/>");
-                    break;
-                case PARSEOP_NUMBER:
-                    indentPrint(indent);
-                    System.out.print("<number");
-                    System.out.print(" whole=\"" + fParseTree[parseOp - 1] + "\"");
-                    System.out.print(" part=\"" + fParseTree[parseOp - 2] + "\"");
-                    System.out.println("/>");
-                    break;
-                case PARSEOP_FUNCTION:
-                    indentPrint(indent);
-                    System.out.println("<function-call>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    if (fParseTree[parseOp - 2] != -1) {
-                        dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    }
-                    indentPrint(indent);
-                    System.out.println("</function-call>");
-                    break;
-                case PARSEOP_FUNCTION_NAME:
-                    indentPrint(indent);
-                    System.out.print("<function-name");
-                    if (fParseTree[parseOp - 1] != -1) {
-                        System.out.print(" prefix=\"" + fParseTree[parseOp - 1] + "\"");
-                    }
-                    System.out.print(" localpart=\"" + fParseTree[parseOp - 2] + "\"");
-                    System.out.println("/>");
-                    break;
-                case PARSEOP_FUNCTION_ARGUMENTS:
-                    indentPrint(indent);
-                    System.out.println("<function-args>");
-                    dumpParseTreeNode(fParseTree[parseOp - 1], indent + 2);
-                    dumpParseTreeNode(fParseTree[parseOp - 2], indent + 2);
-                    indentPrint(indent);
-                    System.out.println("</function-args>");
-                    break;
-                default:
-                    throw new RuntimeException("dumpParseTreeNode("+parseOp+")");
-                }
-        }
-
-        //
-        // Package methods
-        //
-
-        /**
-         * [14] Expr ::= OrExpr
-         * /
-        boolean parseExpr() throws XPathException {
-            return parseOrExpr();
-        }
-
-        /**
-         * [21] OrExpr ::= AndExpr | OrExpr 'or' AndExpr
-         *
-         * also: OrExpr ::= (AndExpr 'or')* AndExpr
-         * /
-        boolean parseOrExpr() throws XPathException {
-            if (!parseAndExpr()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_OPERATOR_OR) {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parseAndExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                int right = fCurrentParseOp;
-                pushParseOp3(PARSEOP_OR, left, right);
-            }
-            return true;
-        }
-
-        /**
-         * [22] AndExpr ::= EqualityExpr | AndExpr 'and' EqualityExpr
-         * /
-        boolean parseAndExpr() throws XPathException {
-            if (!parseEqualityExpr()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_OPERATOR_AND) {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parseEqualityExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                int right = fCurrentParseOp;
-                pushParseOp3(PARSEOP_AND, left, right);
-            }
-            return true;
-        }
-
-        /**
-         * [23] EqualityExpr ::= RelationalExpr
-         *                     | EqualityExpr '=' RelationalExpr
-         *                     | EqualityExpr '!=' RelationalExpr
-         * /
-        boolean parseEqualityExpr() throws XPathException {
-            if (!parseRelationalExpr()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                int parseOp;
-                if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_EQUAL) {
-                    parseOp = PARSEOP_EQUAL;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_NOT_EQUAL) {
-                    parseOp = PARSEOP_NOT_EQUAL;
-                } else {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parseRelationalExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                int right = fCurrentParseOp;
-                pushParseOp3(parseOp, left, right);
-            }
-            return true;
-        }
-
-        /**
-         * [24] RelationalExpr ::= AdditiveExpr
-         *                       | RelationalExpr '<' AdditiveExpr
-         *                       | RelationalExpr '>' AdditiveExpr
-         *                       | RelationalExpr '<=' AdditiveExpr
-         *                       | RelationalExpr '>=' AdditiveExpr
-         * /
-        boolean parseRelationalExpr() throws XPathException {
-            if (!parseAdditiveExpr()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                int parseOp;
-                if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_LESS) {
-                    parseOp = PARSEOP_LESS;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_GREATER) {
-                    parseOp = PARSEOP_GREATER;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_LESS_EQUAL) {
-                    parseOp = PARSEOP_LESS_EQUAL;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_GREATER_EQUAL) {
-                    parseOp = PARSEOP_GREATER_EQUAL;
-                } else {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parseAdditiveExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                int right = fCurrentParseOp;
-                pushParseOp3(parseOp, left, right);
-            }
-            return true;
-        }
-
-        /**
-         * [25] AdditiveExpr ::= MultiplicativeExpr
-         *                     | AdditiveExpr '+' MultiplicativeExpr
-         *                     | AdditiveExpr '-' MultiplicativeExpr
-         * /
-        boolean parseAdditiveExpr() throws XPathException {
-            if (!parseMultiplicativeExpr()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                int parseOp;
-                if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_PLUS) {
-                    parseOp = PARSEOP_PLUS;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_MINUS) {
-                    parseOp = PARSEOP_MINUS;
-                } else {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parseMultiplicativeExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                int right = fCurrentParseOp;
-                pushParseOp3(parseOp, left, right);
-            }
-            return true;
-        }
-
-        /**
-         * [26] MultiplicativeExpr ::= UnaryExpr
-         *                           | MultiplicativeExpr MultiplyOperator UnaryExpr
-         *                           | MultiplicativeExpr 'div' UnaryExpr
-         *                           | MultiplicativeExpr 'mod' UnaryExpr
-         * [34] MultiplyOperator ::= '*'
-         * /
-        boolean parseMultiplicativeExpr() throws XPathException {
-            if (!parseUnaryExpr()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                int parseOp;
-                if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_MULT) {
-                    parseOp = PARSEOP_MULT;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_DIV) {
-                    parseOp = PARSEOP_DIV;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_MOD) {
-                    parseOp = PARSEOP_MOD;
-                } else {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parseUnaryExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                int right = fCurrentParseOp;
-                pushParseOp3(parseOp, left, right);
-            }
-            return true;
-        }
-
-        /**
-         * [27] UnaryExpr ::= UnionExpr | '-' UnaryExpr
-         *
-         * Note: "--UnionExpr" == "-(-UnionExpr)"
-         * /
-        boolean parseUnaryExpr() throws XPathException {
-            if (parseUnionExpr()) {
-                return true;
-            }
-            int saveToken = fCurrentToken;
-            boolean negate = false;
-            while (fCurrentToken < fTokenCount) {
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_OPERATOR_MINUS) {
-                    break;
-                }
-                fCurrentToken++;
-                negate = !negate;
-            }
-            if (fCurrentToken == fTokenCount) {
-                fCurrentToken = saveToken;
-                return false;
-            }
-            if (!parseUnionExpr()) {
-                fCurrentToken = saveToken;
-                return false;
-            }
-            if (negate) {
-                pushParseOp2(PARSEOP_NEGATE, fCurrentParseOp);
-            }
-            return true;
-        }
-
-        /**
-         * [18] UnionExpr ::= PathExpr | UnionExpr '|' PathExpr
-         * /
-        boolean parseUnionExpr() throws XPathException {
-            if (!parsePathExpr()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_OPERATOR_UNION) {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parsePathExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                int right = fCurrentParseOp;
-                pushParseOp3(PARSEOP_UNION, left, right);
-            }
-            return true;
-        }
-
-        /**
-         * [19] PathExpr ::= RelativeLocationPath
-         *                 | '/' RelativeLocationPath?
-         *                 | '//' RelativeLocationPath
-         *                 | PrimaryExpr Predicate*
-         *                 | PrimaryExpr Predicate* '/' RelativeLocationPath
-         *                 | PrimaryExpr Predicate* '//' RelativeLocationPath
-         * /
-        boolean parsePathExpr() throws XPathException {
-            if (parseRelativeLocationPath()) {
-                return true;
-            } else {
-                if (fCurrentToken == fTokenCount) {
-                    return false;
-                }
-                if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH) {
-                    if (++fCurrentToken < fTokenCount && parseRelativeLocationPath()) {
-                        pushParseOp2(PARSEOP_SELECT_ROOT, fCurrentParseOp);
-                    } else {
-                        pushParseOp2(PARSEOP_SELECT_ROOT, -1);
-                    }
-                    return true;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_DOUBLE_SLASH) {
-                    if (++fCurrentToken == fTokenCount) {
-                        return false; // REVISIT - backup index
-                    }
-                    if (!parseRelativeLocationPath()) {
-                        return false;
-                    }
-                    int left = fCurrentParseOp;
-                    pushParseOp(PARSEOP_AXIS_DESCENDANT_OR_SELF);
-                    int left2 = fCurrentParseOp;
-                    pushParseOp(PARSEOP_NODETEST_NODE);
-                    pushParseOp3(PARSEOP_STEP, left2, fCurrentParseOp);
-                    pushParseOp3(PARSEOP_STEPS, fCurrentParseOp, left);
-                    pushParseOp2(PARSEOP_SELECT_ROOT, fCurrentParseOp);
-                    return true;
-                }
-            }
-            if (!parsePrimaryExpr()) {
-                return false;
-            }
-            int left = fCurrentParseOp;
-            if (parsePredicates()) {
-                pushParseOp3(PARSEOP_FILTER, left, fCurrentParseOp);
-            }
-            if (fCurrentToken == fTokenCount) {
-                return true;
-            }
-            left = fCurrentParseOp;
-            if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH) {
-                if (++fCurrentToken == fTokenCount) {
-                    return false; // REVISIT
-                }
-                if (!parseRelativeLocationPath()) {
-                    return false; // REVISIT
-                }
-                pushParseOp3(PARSEOP_STEPS, left, fCurrentParseOp);
-            } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_DOUBLE_SLASH) {
-                if (++fCurrentToken == fTokenCount) {
-                    return false;
-                }
-                if (!parseRelativeLocationPath()) {
-                    return false;
-                }
-                int left2 = fCurrentParseOp;
-                pushParseOp(PARSEOP_AXIS_DESCENDANT_OR_SELF);
-                int left3 = fCurrentParseOp;
-                pushParseOp(PARSEOP_NODETEST_NODE);
-                pushParseOp3(PARSEOP_STEP, left3, fCurrentParseOp);
-                pushParseOp3(PARSEOP_STEPS, fCurrentParseOp, left2);
-                pushParseOp3(PARSEOP_STEPS, left, fCurrentParseOp);
-            }
-            return true;
-        }
-
-        /**
-         * [3] RelativeLocationPath ::= Step
-         *                            | RelativeLocationPath '/' Step
-         *                            | RelativeLocationPath '//' Step
-         * /
-        boolean parseRelativeLocationPath() throws XPathException {
-            if (!parseStep()) {
-                return false;
-            }
-            while (fCurrentToken < fTokenCount) {
-                boolean descendantOrSelf;
-                if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_SLASH) {
-                    descendantOrSelf = false;
-                } else if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_OPERATOR_DOUBLE_SLASH) {
-                    descendantOrSelf = true;
-                } else {
-                    break;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                int left = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (!parseStep()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return true;
-                }
-                if (descendantOrSelf) {
-                    int left2 = fCurrentParseOp;
-                    pushParseOp(PARSEOP_AXIS_DESCENDANT_OR_SELF);
-                    int left3 = fCurrentParseOp;
-                    pushParseOp(PARSEOP_NODETEST_NODE);
-                    pushParseOp3(PARSEOP_STEP, left3, fCurrentParseOp);
-                    pushParseOp3(PARSEOP_STEPS, left, fCurrentParseOp);
-                    pushParseOp3(PARSEOP_STEPS, fCurrentParseOp, left2);
-                } else {
-                    pushParseOp3(PARSEOP_STEPS, left, fCurrentParseOp);
-                }
-            }
-            return true;
-        }
-
-        /**
-         * [4] Step ::=  (AxisName '::' | '@'?) NodeTest Predicate* | '.' | '..'
-         * [6] AxisName ::= 'ancestor' | 'ancestor-or-self'
-         *                | 'attribute'
-         *                | 'child'
-         *                | 'descendant' | 'descendant-or-self'
-         *                | 'following' | 'following-sibling'
-         *                | 'namespace'
-         *                | 'parent'
-         *                | 'preceding' | 'preceding-sibling'
-         *                | 'self'
-         * /
-        boolean parseStep() throws XPathException {
-            int parseOp;
-            int left;
-            boolean checkDoubleColon = true;
-            int saveToken = fCurrentToken;
-            int saveParseOp = fCurrentParseOp;
-            if (fCurrentToken == fTokenCount) {
-                return false;
-            }
-            switch (fTokens.getToken(fCurrentToken)) {
-            case XPath.Tokens.EXPRTOKEN_PERIOD:
-                fCurrentToken++;
-                pushParseOp(PARSEOP_AXIS_SELF);
-                left = fCurrentParseOp;
-                pushParseOp(PARSEOP_NODETEST_NODE);
-                pushParseOp3(PARSEOP_STEP, left, fCurrentParseOp);
-                return true;
-            case XPath.Tokens.EXPRTOKEN_DOUBLE_PERIOD:
-                fCurrentToken++;
-                pushParseOp(PARSEOP_AXIS_PARENT);
-                left = fCurrentParseOp;
-                pushParseOp(PARSEOP_NODETEST_NODE);
-                pushParseOp3(PARSEOP_STEP, left, fCurrentParseOp);
-                return true;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_ANCESTOR:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_ANCESTOR;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_ANCESTOR_OR_SELF:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_ANCESTOR_OR_SELF;
-                break;
-            case XPath.Tokens.EXPRTOKEN_ATSIGN:
-                checkDoubleColon = false;
-                // fall through
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_ATTRIBUTE:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_ATTRIBUTE;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_DESCENDANT:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_DESCENDANT;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_DESCENDANT_OR_SELF:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_DESCENDANT_OR_SELF;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_FOLLOWING:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_FOLLOWING;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_FOLLOWING_SIBLING:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_FOLLOWING_SIBLING;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_NAMESPACE:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_NAMESPACE;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_PARENT:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_PARENT;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_PRECEDING:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_PRECEDING;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_PRECEDING_SIBLING:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_PRECEDING_SIBLING;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_SELF:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_SELF;
-                break;
-            case XPath.Tokens.EXPRTOKEN_AXISNAME_CHILD:
-                fCurrentToken++;
-                parseOp = PARSEOP_AXIS_CHILD;
-                break;
-            default:
-                checkDoubleColon = false;
-                parseOp = PARSEOP_AXIS_CHILD;
-                break;
-            }
-            pushParseOp(parseOp);
-            left = fCurrentParseOp;
-            if (checkDoubleColon) {
-                if (fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_DOUBLE_COLON) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                fCurrentToken++;
-            }
-            if (fCurrentToken == fTokenCount) {
-                fCurrentToken = saveToken;
-                fCurrentParseOp = saveParseOp;
-                return false;
-            }
-            if (!parseNodeTest()) {
-                fCurrentToken = saveToken;
-                fCurrentParseOp = saveParseOp;
-                return false;
-            }
-            pushParseOp3(PARSEOP_STEP, left, fCurrentParseOp);
-            left = fCurrentParseOp;
-            if (parsePredicates()) {
-                pushParseOp3(PARSEOP_FILTER, left, fCurrentParseOp);
-            }
-            return true;
-        }
-
-        /**
-         * [7] NodeTest ::= '*'
-         *                | NCName ':' '*'
-         *                | QName
-         *                | 'comment' '(' ')'
-         *                | 'text' '(' ')'
-         *                | 'processing-instruction' '(' Literal? ')'
-         *                | 'node' '(' ')'
-         * [29] Literal ::= '"' [^"]* '"' | "'" [^']* "'"
-         * /
-        boolean parseNodeTest() throws XPathException {
-            int parseOp;
-            int prefix;
-            int name;
-            if (fCurrentToken == fTokenCount) {
-                return false;
-            }
-            switch (fTokens.getToken(fCurrentToken)) {
-            case XPath.Tokens.EXPRTOKEN_NAMETEST_ANY:
-                fCurrentToken++;
-                pushParseOp(PARSEOP_NODETEST_ANY);
-                return true;
-            case XPath.Tokens.EXPRTOKEN_NAMETEST_NAMESPACE:
-                prefix = fTokens.getToken(++fCurrentToken);
-                fCurrentToken++;
-                pushParseOp2(PARSEOP_NODETEST_NAMESPACE, prefix);
-                return true;
-            case XPath.Tokens.EXPRTOKEN_NAMETEST_QNAME:
-                prefix = fTokens.getToken(++fCurrentToken);
-                name = fTokens.getToken(++fCurrentToken);
-                fCurrentToken++;
-                pushParseOp3(PARSEOP_NODETEST_QNAME, prefix, name);
-                return true;
-            case XPath.Tokens.EXPRTOKEN_NODETYPE_COMMENT:
-                parseOp = PARSEOP_NODETEST_COMMENT;
-                break;
-            case XPath.Tokens.EXPRTOKEN_NODETYPE_TEXT:
-                parseOp = PARSEOP_NODETEST_TEXT;
-                break;
-            case XPath.Tokens.EXPRTOKEN_NODETYPE_PI:
-                parseOp = PARSEOP_NODETEST_PI;
-                break;
-            case XPath.Tokens.EXPRTOKEN_NODETYPE_NODE:
-                parseOp = PARSEOP_NODETEST_NODE;
-                break;
-            default:
-                return false;
-            }
-            int saveToken = fCurrentToken;
-            int saveParseOp = fCurrentParseOp;
-            int left = fCurrentParseOp;
-            if (++fCurrentToken == fTokenCount) {
-                fCurrentToken = saveToken;
-                fCurrentParseOp = saveParseOp;
-                return false;
-            }
-            if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_OPEN_PAREN) {
-                fCurrentToken = saveToken;
-                fCurrentParseOp = saveParseOp;
-                return false;
-            }
-            if (++fCurrentToken == fTokenCount) {
-                fCurrentToken = saveToken;
-                fCurrentParseOp = saveParseOp;
-                return false;
-            }
-            if (parseOp == PARSEOP_NODETEST_PI && fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_LITERAL) {
-                int target = fTokens.getToken(++fCurrentToken);
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_CLOSE_PAREN) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                fCurrentToken++;
-                pushParseOp2(PARSEOP_NODETEST_PI_TARGET, target);
-            } else {
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_CLOSE_PAREN) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                fCurrentToken++;
-                pushParseOp(parseOp);
-            }
-            return true;
-        }
-
-        /**
-         * [8] Predicate ::= '[' PredicateExpr ']'
-         * [9] PredicateExpr ::= Expr
-         * [4] Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep
-         * [20] FilterExpr ::= PrimaryExpr Predicate*
-         * /
-        boolean parsePredicates() throws XPathException {
-            int left = -1;
-            boolean found = false;
-            while (true) {
-                if (fCurrentToken == fTokenCount || fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_OPEN_BRACKET) {
-                    return found;
-                }
-                int saveToken = fCurrentToken;
-                int saveParseOp = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount || !parseExpr() ||
-                    fCurrentToken == fTokenCount || fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_CLOSE_BRACKET) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return found;
-                }
-                fCurrentToken++;
-                found = true;
-                pushParseOp2(PARSEOP_PREDICATE, fCurrentParseOp);
-                if (left != -1) {
-                    pushParseOp3(PARSEOP_PREDICATES, left, fCurrentParseOp);
-                }
-                left = fCurrentParseOp;
-            }
-        }
-
-        /**
-         * [15] PrimaryExpr ::= '$' QName
-         *                    | '(' Expr ')'
-         *                    | '"' [^"]* '"' | "'" [^']* "'"
-         *                    | ([0-9]+) ('.' ([0-9]+)?)? | '.' Digits
-         *                    | (QName - NodeType) '(' ( Expr ( ',' Expr )* )? ')'
-         * /
-        boolean parsePrimaryExpr() throws XPathException {
-            int prefix;
-            int handle;
-            int saveToken;
-            int saveParseOp;
-            if (fCurrentToken == fTokenCount) {
-                return false;
-            }
-            switch (fTokens.getToken(fCurrentToken)) {
-            case XPath.Tokens.EXPRTOKEN_VARIABLE_REFERENCE:
-                prefix = fTokens.getToken(++fCurrentToken);
-                handle = fTokens.getToken(++fCurrentToken); // localpart
-                fCurrentToken++;
-                pushParseOp3(PARSEOP_VARIABLE_REFERENCE, prefix, handle);
-                break;
-            case XPath.Tokens.EXPRTOKEN_OPEN_PAREN:
-                saveToken = fCurrentToken;
-                saveParseOp = fCurrentParseOp;
-                if (++fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                if (!parseExpr()) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                if (fCurrentToken == fTokenCount) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_CLOSE_PAREN) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                fCurrentToken++;
-                pushParseOp2(PARSEOP_GROUPING, fCurrentParseOp);
-                break;
-            case XPath.Tokens.EXPRTOKEN_LITERAL:
-                handle = fTokens.getToken(++fCurrentToken);
-                fCurrentToken++;
-                pushParseOp2(PARSEOP_LITERAL, handle);
-                break;
-            case XPath.Tokens.EXPRTOKEN_NUMBER:
-                int whole = fTokens.getToken(++fCurrentToken);
-                int part = fTokens.getToken(++fCurrentToken);
-                fCurrentToken++;
-                pushParseOp3(PARSEOP_NUMBER, whole, part);
-                break;
-            case XPath.Tokens.EXPRTOKEN_FUNCTION_NAME:
-                saveToken = fCurrentToken;
-                saveParseOp = fCurrentParseOp;
-                prefix = fTokens.getToken(++fCurrentToken);
-                handle = fTokens.getToken(++fCurrentToken); // localpart
-                fCurrentToken++;
-                pushParseOp3(PARSEOP_FUNCTION_NAME, prefix, handle);
-                if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_OPEN_PAREN) {
-                    fCurrentToken = saveToken;
-                    fCurrentParseOp = saveParseOp;
-                    return false;
-                }
-                fCurrentToken++;
-                int funcName = fCurrentParseOp;
-                int nextArg = -1;
-                if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_CLOSE_PAREN) {
-                    fCurrentToken++;
-                } else {
-                    while (true) {
-                        if (!parseExpr()) {
-                            fCurrentToken = saveToken;
-                            fCurrentParseOp = saveParseOp;
-                            return false;
-                        }
-                        if (nextArg != -1) {
-                            pushParseOp3(PARSEOP_FUNCTION_ARGUMENTS, nextArg, fCurrentParseOp);
-                        }
-                        nextArg = fCurrentParseOp;
-                        if (fTokens.getToken(fCurrentToken) == XPath.Tokens.EXPRTOKEN_CLOSE_PAREN) {
-                            fCurrentToken++;
-                            break;
-                        }
-                        if (fTokens.getToken(fCurrentToken) != XPath.Tokens.EXPRTOKEN_COMMA) {
-                            fCurrentToken = saveToken;
-                            fCurrentParseOp = saveParseOp;
-                            return false;
-                        }
-                        fCurrentToken++;
-                    }
-                }
-                pushParseOp3(PARSEOP_FUNCTION, funcName, nextArg);
-                break;
-            default:
-                return false;
-            }
-            return true;
-        }
-
-        //
-        // MAIN
-        //
-
-        public static void main(String argv[]) {
-            for (int i = 0; i < argv.length; i++) {
-                String expression = argv[i];
-                System.out.println("# XPath expression: "+expression);
-                XPathExprParser parser = new XPathExprParser();
-                try {
-                    parser.parseExpr(expression);
-                }
-                catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-
-    } // class XPathExprParser
-    /***/
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry. */
-    public static void main(String[] argv) throws Exception {
-
-        for (int i = 0; i < argv.length; i++) {
-            final String expression = argv[i];
-            System.out.println("# XPath expression: \""+expression+'"');
-            try {
-                SymbolTable symbolTable = new SymbolTable();
-                XPath xpath = new XPath(expression, symbolTable, null);
-                System.out.println("expanded xpath: \""+xpath.toString()+'"');
-            }
-            catch (XPathException e) {
-                System.out.println("error: "+e.getMessage());
-            }
-        }
-
-    } // main(String[])
-
-} // class XPath
diff --git a/src/org/apache/xerces/impl/xpath/XPathException.java b/src/org/apache/xerces/impl/xpath/XPathException.java
deleted file mode 100644
index 3feb56d..0000000
--- a/src/org/apache/xerces/impl/xpath/XPathException.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath;
-
-/**
- * XPath exception.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XPathException 
-    extends Exception {
-
-    //
-    // Constructors
-    //
-
-    /** Constructs an exception. */
-    public XPathException() {
-        super();
-    } // <init>()
-
-    /** Constructs an exception with the specified message. */
-    public XPathException(String message) {
-        super(message);
-    } // <init>(String)
-
-} // class XPathException
diff --git a/src/org/apache/xerces/impl/xpath/regex/BMPattern.java b/src/org/apache/xerces/impl/xpath/regex/BMPattern.java
deleted file mode 100644
index e6909f7..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/BMPattern.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.text.CharacterIterator;
-
-/**
- * Boyer-Moore searcher.
- */
-public class BMPattern {
-    char[] pattern;
-    int[] shiftTable;
-    boolean ignoreCase;
-
-    public BMPattern(String pat, boolean ignoreCase) {
-        this(pat, 256, ignoreCase);
-    }
-
-    public BMPattern(String pat, int tableSize, boolean ignoreCase) {
-        this.pattern = pat.toCharArray();
-        this.shiftTable = new int[tableSize];
-        this.ignoreCase = ignoreCase;
-
-        int length = pattern.length;
-        for (int i = 0;  i < this.shiftTable.length;  i ++)
-            this.shiftTable[i] = length;
-
-        for (int i = 0;  i < length;  i ++) {
-            char ch = this.pattern[i];
-            int diff = length-i-1;
-            int index = ch % this.shiftTable.length;
-            if (diff < this.shiftTable[index])
-                this.shiftTable[index] = diff;
-            if (this.ignoreCase) {
-                ch = Character.toUpperCase(ch);
-                index = ch % this.shiftTable.length;
-                if (diff < this.shiftTable[index])
-                    this.shiftTable[index] = diff;
-                ch = Character.toLowerCase(ch);
-                index = ch % this.shiftTable.length;
-                if (diff < this.shiftTable[index])
-                    this.shiftTable[index] = diff;
-            }
-        }
-    }
-
-    /**
-     *
-     * @return -1 if <var>iterator</var> does not contain this pattern.
-     */
-    public int matches(CharacterIterator iterator, int start, int limit) {
-        if (this.ignoreCase)  return this.matchesIgnoreCase(iterator, start, limit);
-        int plength = this.pattern.length;
-        if (plength == 0)  return start;
-        int index = start+plength;
-        while (index <= limit) {
-            int pindex = plength;
-            int nindex = index+1;
-            char ch;
-            do {
-                if ((ch = iterator.setIndex(--index)) != this.pattern[--pindex])
-                    break;
-                if (pindex == 0)
-                    return index;
-            } while (pindex > 0);
-            index += this.shiftTable[ch % this.shiftTable.length]+1;
-            if (index < nindex)  index = nindex;
-        }
-        return -1;
-    }
-
-    /**
-     *
-     * @return -1 if <var>str</var> does not contain this pattern.
-     */
-    public int matches(String str, int start, int limit) {
-        if (this.ignoreCase)  return this.matchesIgnoreCase(str, start, limit);
-        int plength = this.pattern.length;
-        if (plength == 0)  return start;
-        int index = start+plength;
-        while (index <= limit) {
-            //System.err.println("Starts at "+index);
-            int pindex = plength;
-            int nindex = index+1;
-            char ch;
-            do {
-                if ((ch = str.charAt(--index)) != this.pattern[--pindex])
-                    break;
-                if (pindex == 0)
-                    return index;
-            } while (pindex > 0);
-            index += this.shiftTable[ch % this.shiftTable.length]+1;
-            if (index < nindex)  index = nindex;
-        }
-        return -1;
-    }
-    /**
-     *
-     * @return -1 if <var>chars</char> does not contain this pattern.
-     */
-    public int matches(char[] chars, int start, int limit) {
-        if (this.ignoreCase)  return this.matchesIgnoreCase(chars, start, limit);
-        int plength = this.pattern.length;
-        if (plength == 0)  return start;
-        int index = start+plength;
-        while (index <= limit) {
-            //System.err.println("Starts at "+index);
-            int pindex = plength;
-            int nindex = index+1;
-            char ch;
-            do {
-                if ((ch = chars[--index]) != this.pattern[--pindex])
-                    break;
-                if (pindex == 0)
-                    return index;
-            } while (pindex > 0);
-            index += this.shiftTable[ch % this.shiftTable.length]+1;
-            if (index < nindex)  index = nindex;
-        }
-        return -1;
-    }
-
-    int matchesIgnoreCase(CharacterIterator iterator, int start, int limit) {
-        int plength = this.pattern.length;
-        if (plength == 0)  return start;
-        int index = start+plength;
-        while (index <= limit) {
-            int pindex = plength;
-            int nindex = index+1;
-            char ch;
-            do {
-                char ch1 = ch = iterator.setIndex(--index);
-                char ch2 = this.pattern[--pindex];
-                if (ch1 != ch2) {
-                    ch1 = Character.toUpperCase(ch1);
-                    ch2 = Character.toUpperCase(ch2);
-                    if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))
-                        break;
-                }
-                if (pindex == 0)
-                    return index;
-            } while (pindex > 0);
-            index += this.shiftTable[ch % this.shiftTable.length]+1;
-            if (index < nindex)  index = nindex;
-        }
-        return -1;
-    }
-    
-    int matchesIgnoreCase(String text, int start, int limit) {
-        int plength = this.pattern.length;
-        if (plength == 0)  return start;
-        int index = start+plength;
-        while (index <= limit) {
-            int pindex = plength;
-            int nindex = index+1;
-            char ch;
-            do {
-                char ch1 = ch = text.charAt(--index);
-                char ch2 = this.pattern[--pindex];
-                if (ch1 != ch2) {
-                    ch1 = Character.toUpperCase(ch1);
-                    ch2 = Character.toUpperCase(ch2);
-                    if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))
-                        break;
-                }
-                if (pindex == 0)
-                    return index;
-            } while (pindex > 0);
-            index += this.shiftTable[ch % this.shiftTable.length]+1;
-            if (index < nindex)  index = nindex;
-        }
-        return -1;
-    }
-    int matchesIgnoreCase(char[] chars, int start, int limit) {
-        int plength = this.pattern.length;
-        if (plength == 0)  return start;
-        int index = start+plength;
-        while (index <= limit) {
-            int pindex = plength;
-            int nindex = index+1;
-            char ch;
-            do {
-                char ch1 = ch = chars[--index];
-                char ch2 = this.pattern[--pindex];
-                if (ch1 != ch2) {
-                    ch1 = Character.toUpperCase(ch1);
-                    ch2 = Character.toUpperCase(ch2);
-                    if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))
-                        break;
-                }
-                if (pindex == 0)
-                    return index;
-            } while (pindex > 0);
-            index += this.shiftTable[ch % this.shiftTable.length]+1;
-            if (index < nindex)  index = nindex;
-        }
-        return -1;
-    }
-
-    /*
-    public static void main(String[] argv) {
-        try {
-            int[] shiftTable = new int[256];
-            initializeBoyerMoore(argv[0], shiftTable, true);
-            int o = -1;
-            CharacterIterator ite = new java.text.StringCharacterIterator(argv[1]);
-            long start = System.currentTimeMillis();
-            //for (int i = 0;  i < 10000;  i ++)
-                o = searchIgnoreCasesWithBoyerMoore(ite, 0, argv[0], shiftTable);
-            start = System.currentTimeMillis()-start;
-            System.out.println("Result: "+o+", Elapsed: "+start);
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-    }*/
-}
-
diff --git a/src/org/apache/xerces/impl/xpath/regex/Match.java b/src/org/apache/xerces/impl/xpath/regex/Match.java
deleted file mode 100644
index 77708d2..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/Match.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.text.CharacterIterator;
-
-/**
- * 
- * An instance of this class has ranges captured in matching.
- *
- * @see RegularExpression#matches(char[], int, int, Match)
- * @see RegularExpression#matches(char[], Match)
- * @see RegularExpression#matches(java.text.CharacterIterator, Match)
- * @see RegularExpression#matches(java.lang.String, int, int, Match)
- * @see RegularExpression#matches(java.lang.String, Match)
- * @author TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;
- */
-public class Match implements Cloneable {
-    int[] beginpos = null;
-    int[] endpos = null;
-    int nofgroups = 0;
-
-    CharacterIterator ciSource = null;
-    String strSource = null;
-    char[] charSource = null;
-
-    /**
-     * Creates an instance.
-     */
-    public Match() {
-    }
-
-    /**
-     *
-     */
-    public synchronized Object clone() {
-        Match ma = new Match();
-        if (this.nofgroups > 0) {
-            ma.setNumberOfGroups(this.nofgroups);
-            if (this.ciSource != null)  ma.setSource(this.ciSource);
-            if (this.strSource != null)  ma.setSource(this.strSource);
-            for (int i = 0;  i < this.nofgroups;  i ++) {
-                ma.setBeginning(i, this.getBeginning(i));
-                ma.setEnd(i, this.getEnd(i));
-            }
-        }
-        return ma;
-    }
-
-    /**
-     *
-     */
-    protected void setNumberOfGroups(int n) {
-        int oldn = this.nofgroups;
-        this.nofgroups = n;
-        if (oldn <= 0
-            || oldn < n || n*2 < oldn) {
-            this.beginpos = new int[n];
-            this.endpos = new int[n];
-        }
-        for (int i = 0;  i < n;  i ++) {
-            this.beginpos[i] = -1;
-            this.endpos[i] = -1;
-        }
-    }
-
-    /**
-     *
-     */
-    protected void setSource(CharacterIterator ci) {
-        this.ciSource = ci;
-        this.strSource = null;
-        this.charSource = null;
-    }
-    /**
-     *
-     */
-    protected void setSource(String str) {
-        this.ciSource = null;
-        this.strSource = str;
-        this.charSource = null;
-    }
-    /**
-     *
-     */
-    protected void setSource(char[] chars) {
-        this.ciSource = null;
-        this.strSource = null;
-        this.charSource = chars;
-    }
-
-    /**
-     *
-     */
-    protected void setBeginning(int index, int v) {
-        this.beginpos[index] = v;
-    }
-
-    /**
-     *
-     */
-    protected void setEnd(int index, int v) {
-        this.endpos[index] = v;
-    }
-
-    /**
-     * Return the number of regular expression groups.
-     * This method returns 1 when the regular expression has no capturing-parenthesis.
-     */
-    public int getNumberOfGroups() {
-        if (this.nofgroups <= 0)
-            throw new IllegalStateException("A result is not set.");
-        return this.nofgroups;
-    }
-
-    /**
-     * Return a start position in the target text matched to specified regular expression group.
-     *
-     * @param index Less than <code>getNumberOfGroups()</code>.
-     */
-    public int getBeginning(int index) {
-        if (this.beginpos == null)
-            throw new IllegalStateException("A result is not set.");
-        if (index < 0 || this.nofgroups <= index)
-            throw new IllegalArgumentException("The parameter must be less than "
-                                               +this.nofgroups+": "+index);
-        return this.beginpos[index];
-    }
-
-    /**
-     * Return an end position in the target text matched to specified regular expression group.
-     *
-     * @param index Less than <code>getNumberOfGroups()</code>.
-     */
-    public int getEnd(int index) {
-        if (this.endpos == null)
-            throw new IllegalStateException("A result is not set.");
-        if (index < 0 || this.nofgroups <= index)
-            throw new IllegalArgumentException("The parameter must be less than "
-                                               +this.nofgroups+": "+index);
-        return this.endpos[index];
-    }
-
-    /**
-     * Return an substring of the target text matched to specified regular expression group.
-     *
-     * @param index Less than <code>getNumberOfGroups()</code>.
-     */
-    public String getCapturedText(int index) {
-        if (this.beginpos == null)
-            throw new IllegalStateException("match() has never been called.");
-        if (index < 0 || this.nofgroups <= index)
-            throw new IllegalArgumentException("The parameter must be less than "
-                                               +this.nofgroups+": "+index);
-        String ret;
-        int begin = this.beginpos[index], end = this.endpos[index];
-        if (begin < 0 || end < 0)  return null;
-        if (this.ciSource != null) {
-            ret = REUtil.substring(this.ciSource, begin, end);
-        } else if (this.strSource != null) {
-            ret = this.strSource.substring(begin, end);
-        } else {
-            ret = new String(this.charSource, begin, end-begin);
-        }
-        return ret;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/Op.java b/src/org/apache/xerces/impl/xpath/regex/Op.java
deleted file mode 100644
index 43dd7ae..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/Op.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.util.Vector;
-
-/**
- */
-class Op {
-    static final int DOT = 0;
-    static final int CHAR = 1;                  // Single character
-    static final int RANGE = 3;                 // [a-zA-Z]
-    static final int NRANGE = 4;                // [^a-zA-Z]
-    static final int ANCHOR = 5;                // ^ $ ...
-    static final int STRING = 6;                // literal String 
-    static final int CLOSURE = 7;               // X*
-    static final int NONGREEDYCLOSURE = 8;      // X*?
-    static final int QUESTION = 9;              // X?
-    static final int NONGREEDYQUESTION = 10;    // X??
-    static final int UNION = 11;                // X|Y
-    static final int CAPTURE = 15;              // ( and )
-    static final int BACKREFERENCE = 16;        // \1 \2 ...
-    static final int LOOKAHEAD = 20;            // (?=...)
-    static final int NEGATIVELOOKAHEAD = 21;    // (?!...)
-    static final int LOOKBEHIND = 22;           // (?<=...)
-    static final int NEGATIVELOOKBEHIND = 23;   // (?<!...)
-    static final int INDEPENDENT = 24;          // (?>...)
-    static final int MODIFIER = 25;             // (?ims-ims:...)
-    static final int CONDITION = 26;            // (?(..)yes|no)
-
-    static int nofinstances = 0;
-    static final boolean COUNT = false;
-
-    static Op createDot() {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new Op(Op.DOT);
-    }
-    static CharOp createChar(int data) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new CharOp(Op.CHAR, data);
-    }
-    static CharOp createAnchor(int data) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new CharOp(Op.ANCHOR, data);
-    }
-    static CharOp createCapture(int number, Op next) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        CharOp op = new CharOp(Op.CAPTURE, number);
-        op.next = next;
-        return op;
-    }
-    static UnionOp createUnion(int size) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        //System.err.println("Creates UnionOp");
-        return new UnionOp(Op.UNION, size);
-    }
-    static ChildOp createClosure(int id) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new ModifierOp(Op.CLOSURE, id, -1);
-    }
-    static ChildOp createNonGreedyClosure() {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new ChildOp(Op.NONGREEDYCLOSURE);
-    }
-    static ChildOp createQuestion(boolean nongreedy) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new ChildOp(nongreedy ? Op.NONGREEDYQUESTION : Op.QUESTION);
-    }
-    static RangeOp createRange(Token tok) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new RangeOp(Op.RANGE, tok);
-    }
-    static ChildOp createLook(int type, Op next, Op branch) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        ChildOp op = new ChildOp(type);
-        op.setChild(branch);
-        op.next = next;
-        return op;
-    }
-    static CharOp createBackReference(int refno) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new CharOp(Op.BACKREFERENCE, refno);
-    }
-    static StringOp createString(String literal) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        return new StringOp(Op.STRING, literal);
-    }
-    static ChildOp createIndependent(Op next, Op branch) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        ChildOp op = new ChildOp(Op.INDEPENDENT);
-        op.setChild(branch);
-        op.next = next;
-        return op;
-    }
-    static ModifierOp createModifier(Op next, Op branch, int add, int mask) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        ModifierOp op = new ModifierOp(Op.MODIFIER, add, mask);
-        op.setChild(branch);
-        op.next = next;
-        return op;
-    }
-    static ConditionOp createCondition(Op next, int ref, Op conditionflow, Op yesflow, Op noflow) {
-        if (Op.COUNT)  Op.nofinstances ++;
-        ConditionOp op = new ConditionOp(Op.CONDITION, ref, conditionflow, yesflow, noflow);
-        op.next = next;
-        return op;
-    }
-
-    int type;
-    Op next = null;
-
-    protected Op(int type) {
-        this.type = type;
-    }
-
-    int size() {                                // for UNION
-        return 0;
-    }
-    Op elementAt(int index) {                   // for UNIoN
-        throw new RuntimeException("Internal Error: type="+this.type);
-    }
-    Op getChild() {                             // for CLOSURE, QUESTION
-        throw new RuntimeException("Internal Error: type="+this.type);
-    }
-                                                // ModifierOp
-    int getData() {                             // CharOp  for CHAR, BACKREFERENCE, CAPTURE, ANCHOR, 
-        throw new RuntimeException("Internal Error: type="+this.type);
-    }
-    int getData2() {                            // ModifierOp
-        throw new RuntimeException("Internal Error: type="+this.type);
-    }
-    RangeToken getToken() {                     // RANGE, NRANGE
-        throw new RuntimeException("Internal Error: type="+this.type);
-    }
-    String getString() {                        // STRING
-        throw new RuntimeException("Internal Error: type="+this.type);
-    }
-
-    // ================================================================
-    static class CharOp extends Op {
-        int charData;
-        CharOp(int type, int data) {
-            super(type);
-            this.charData = data;
-        }
-        int getData() {
-            return this.charData;
-        }
-    }
-
-    // ================================================================
-    static class UnionOp extends Op {
-        Vector branches;
-        UnionOp(int type, int size) {
-            super(type);
-            this.branches = new Vector(size);
-        }
-        void addElement(Op op) {
-            this.branches.addElement(op);
-        }
-        int size() {
-            return this.branches.size();
-        }
-        Op elementAt(int index) {
-            return (Op)this.branches.elementAt(index);
-        }
-    }
-
-    // ================================================================
-    static class ChildOp extends Op {
-        Op child;
-        ChildOp(int type) {
-            super(type);
-        }
-        void setChild(Op child) {
-            this.child = child;
-        }
-        Op getChild() {
-            return this.child;
-        }
-    }
-    // ================================================================
-    static class ModifierOp extends ChildOp {
-        int v1;
-        int v2;
-        ModifierOp(int type, int v1, int v2) {
-            super(type);
-            this.v1 = v1;
-            this.v2 = v2;
-        }
-        int getData() {
-            return this.v1;
-        }
-        int getData2() {
-            return this.v2;
-        }
-    }
-    // ================================================================
-    static class RangeOp extends Op {
-        Token tok;
-        RangeOp(int type, Token tok) {
-            super(type);
-            this.tok = tok;
-        }
-        RangeToken getToken() {
-            return (RangeToken)this.tok;
-        }
-    }
-    // ================================================================
-    static class StringOp extends Op {
-        String string;
-        StringOp(int type, String literal) {
-            super(type);
-            this.string = literal;
-        }
-        String getString() {
-            return this.string;
-        }
-    }
-    // ================================================================
-    static class ConditionOp extends Op {
-        int refNumber;
-        Op condition;
-        Op yes;
-        Op no;
-        ConditionOp(int type, int refno, Op conditionflow, Op yesflow, Op noflow) {
-            super(type);
-            this.refNumber = refno;
-            this.condition = conditionflow;
-            this.yes = yesflow;
-            this.no = noflow;
-        }
-    }
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/ParseException.java b/src/org/apache/xerces/impl/xpath/regex/ParseException.java
deleted file mode 100644
index f14b90e..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/ParseException.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-/**
- *
- * @author TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;
- */
-public class ParseException extends RuntimeException {
-    int location;
-
-    /*
-    public ParseException(String mes) {
-        this(mes, -1);
-    }
-    */
-    /**
-     *
-     */
-    public ParseException(String mes, int location) {
-        super(mes);
-        this.location = location;
-    }
-
-    /**
-     *
-     * @return -1 if location information is not available.
-     */
-    public int getLocation() {
-        return this.location;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java b/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java
deleted file mode 100644
index f14a6a4..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/ParserForXMLSchema.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.util.Hashtable;
-import java.util.Locale;
-
-/**
- * A regular expression parser for the XML Shema.
- *
- * @author TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;
- */
-class ParserForXMLSchema extends RegexParser {
-
-    public ParserForXMLSchema() {
-        //this.setLocale(Locale.getDefault());
-    }
-    public ParserForXMLSchema(Locale locale) {
-        //this.setLocale(locale);
-    }
-
-    Token processCaret() throws ParseException {
-        this.next();
-        return Token.createChar('^');
-    }
-    Token processDollar() throws ParseException {
-        this.next();
-        return Token.createChar('$');
-     }
-    Token processLookahead() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processNegativelookahead() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processLookbehind() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processNegativelookbehind() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_A() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_Z() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_z() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_b() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_B() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_lt() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_gt() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processStar(Token tok) throws ParseException {
-        this.next();
-        return Token.createClosure(tok);
-    }
-    Token processPlus(Token tok) throws ParseException {
-        // X+ -> XX*
-        this.next();
-        return Token.createConcat(tok, Token.createClosure(tok));
-    }
-    Token processQuestion(Token tok) throws ParseException {
-        // X? -> X|
-        this.next();
-        Token par = Token.createUnion();
-        par.addChild(tok);
-        par.addChild(Token.createEmpty());
-        return par;
-    }
-    boolean checkQuestion(int off) {
-        return false;
-    }
-    Token processParen() throws ParseException {
-        this.next();
-        Token tok = Token.createParen(this.parseRegex(), 0);
-        if (this.read() != super.T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                            // Skips ')'
-        return tok;
-    }
-    Token processParen2() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processCondition() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processModifiers() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processIndependent() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_c() throws ParseException {
-        this.next();
-        return this.getTokenForShorthand('c');
-    }
-    Token processBacksolidus_C() throws ParseException {
-        this.next();
-        return this.getTokenForShorthand('C');
-    }
-    Token processBacksolidus_i() throws ParseException {
-        this.next();
-        return this.getTokenForShorthand('i');
-    }
-    Token processBacksolidus_I() throws ParseException {
-        this.next();
-        return this.getTokenForShorthand('I');
-    }
-    Token processBacksolidus_g() throws ParseException {
-        throw this.ex("parser.process.1", this.offset-2);
-    }
-    Token processBacksolidus_X() throws ParseException {
-        throw ex("parser.process.1", this.offset-2);
-    }
-    Token processBackreference() throws ParseException {
-        throw ex("parser.process.1", this.offset-4);
-    }
-
-    int processCIinCharacterClass(RangeToken tok, int c) {
-        tok.mergeRanges(this.getTokenForShorthand(c));
-        return -1;
-    }
-
-
-    /**
-     * Parses a character-class-expression, not a character-class-escape.
-     *
-     * c-c-expression   ::= '[' c-group ']'
-     * c-group          ::= positive-c-group | negative-c-group | c-c-subtraction
-     * positive-c-group ::= (c-range | c-c-escape)+
-     * negative-c-group ::= '^' positive-c-group
-     * c-c-subtraction  ::= (positive-c-group | negative-c-group) subtraction
-     * subtraction      ::= '-' c-c-expression
-     * c-range          ::= single-range | from-to-range
-     * single-range     ::= multi-c-escape | category-c-escape | block-c-escape | <any XML char>
-     * cc-normal-c      ::= <any character except [, ], \>
-     * from-to-range    ::= cc-normal-c '-' cc-normal-c
-     *
-     * @param useNrage Ignored.
-     * @return This returns no NrageToken.
-     */
-    protected RangeToken parseCharacterClass(boolean useNrange) throws ParseException {
-        this.setContext(S_INBRACKETS);
-        this.next();                            // '['
-        boolean nrange = false;
-        RangeToken base = null;
-        RangeToken tok;
-        if (this.read() == T_CHAR && this.chardata == '^') {
-            nrange = true;
-            this.next();                        // '^'
-            base = Token.createRange();
-            base.addRange(0, Token.UTF16_MAX);
-            tok = Token.createRange();
-        } else {
-            tok = Token.createRange();
-        }
-        int type;
-        boolean firstloop = true;
-        while ((type = this.read()) != T_EOF) { // Don't use 'cotinue' for this loop.
-            // single-range | from-to-range | subtraction
-            if (type == T_CHAR && this.chardata == ']' && !firstloop) {
-                if (nrange) {
-                    base.subtractRanges(tok);
-                    tok = base;
-                }
-                break;
-            }
-            int c = this.chardata;
-            boolean end = false;
-            if (type == T_BACKSOLIDUS) {
-                switch (c) {
-                  case 'd':  case 'D':
-                  case 'w':  case 'W':
-                  case 's':  case 'S':
-                    tok.mergeRanges(this.getTokenForShorthand(c));
-                    end = true;
-                    break;
-
-                  case 'i':  case 'I':
-                  case 'c':  case 'C':
-                    c = this.processCIinCharacterClass(tok, c);
-                    if (c < 0)  end = true;
-                    break;
-                    
-                  case 'p':
-                  case 'P':
-                    int pstart = this.offset;
-                    RangeToken tok2 = this.processBacksolidus_pP(c);
-                    if (tok2 == null)  throw this.ex("parser.atom.5", pstart);
-                    tok.mergeRanges(tok2);
-                    end = true;
-                    break;
-
-                  default:
-                    c = this.decodeEscaped();
-                } // \ + c
-            } // backsolidus
-            else if (type == T_XMLSCHEMA_CC_SUBTRACTION && !firstloop) {
-                                                // Subraction
-                if (nrange) {
-                    base.subtractRanges(tok);
-                    tok = base;
-                }
-                RangeToken range2 = this.parseCharacterClass(false);
-                tok.subtractRanges(range2);
-                if (this.read() != T_CHAR || this.chardata != ']')
-                    throw this.ex("parser.cc.5", this.offset);
-                break;                          // Exit this loop
-            }
-            this.next();
-            if (!end) {                         // if not shorthands...
-                if (type == T_CHAR) {
-                    if (c == '[')  throw this.ex("parser.cc.6", this.offset-2);
-                    if (c == ']')  throw this.ex("parser.cc.7", this.offset-2);
-                }
-                if (this.read() != T_CHAR || this.chardata != '-') { // Here is no '-'.
-                    tok.addRange(c, c);
-                } else {                        // Found '-'
-                                                // Is this '-' is a from-to token??
-                    this.next(); // Skips '-'
-                    if ((type = this.read()) == T_EOF)  throw this.ex("parser.cc.2", this.offset);
-                                                // c '-' ']' -> '-' is a single-range.
-                    if (type == T_CHAR && this.chardata == ']') {
-                        tok.addRange(c, c);
-                        tok.addRange('-', '-');
-                    }
-                                                // c '-' '-[' -> '-' is a single-range.
-                    else if (type == T_XMLSCHEMA_CC_SUBTRACTION) {
-                        tok.addRange(c, c);
-                        tok.addRange('-', '-');
-                    } else {
-                        int rangeend = this.chardata;
-                        if (type == T_CHAR) {
-                            if (rangeend == '[')  throw this.ex("parser.cc.6", this.offset-1);
-                            if (rangeend == ']')  throw this.ex("parser.cc.7", this.offset-1);
-                        }
-                        if (type == T_BACKSOLIDUS)
-                            rangeend = this.decodeEscaped();
-                        this.next();
-                        tok.addRange(c, rangeend);
-                    }
-                }
-            }
-            firstloop = false;
-        }
-        if (this.read() == T_EOF)
-            throw this.ex("parser.cc.2", this.offset);
-        tok.sortRanges();
-        tok.compactRanges();
-        //tok.dumpRanges();
-        this.setContext(S_NORMAL);
-        this.next();                    // Skips ']'
-
-        return tok;
-    }
-
-    protected RangeToken parseSetOperations() throws ParseException {
-        throw this.ex("parser.process.1", this.offset);
-    }
- 
-    Token getTokenForShorthand(int ch) {
-        switch (ch) {
-          case 'd':
-            return ParserForXMLSchema.getRange("xml:isDigit", true);
-          case 'D':
-            return ParserForXMLSchema.getRange("xml:isDigit", false);
-          case 'w':
-            return ParserForXMLSchema.getRange("xml:isWord", true);
-          case 'W':
-            return ParserForXMLSchema.getRange("xml:isWord", false);
-          case 's':
-            return ParserForXMLSchema.getRange("xml:isSpace", true);
-          case 'S':
-            return ParserForXMLSchema.getRange("xml:isSpace", false);
-          case 'c':
-            return ParserForXMLSchema.getRange("xml:isNameChar", true);
-          case 'C':
-            return ParserForXMLSchema.getRange("xml:isNameChar", false);
-          case 'i':
-            return ParserForXMLSchema.getRange("xml:isInitialNameChar", true);
-          case 'I':
-            return ParserForXMLSchema.getRange("xml:isInitialNameChar", false);
-          default:
-            throw new RuntimeException("Internal Error: shorthands: \\u"+Integer.toString(ch, 16));
-        }
-    }
-    int decodeEscaped() throws ParseException {
-        if (this.read() != T_BACKSOLIDUS)  throw ex("parser.next.1", this.offset-1);
-        int c = this.chardata;
-        switch (c) {
-          case 'n':  c = '\n';  break; // LINE FEED U+000A
-          case 'r':  c = '\r';  break; // CRRIAGE RETURN U+000D
-          case 't':  c = '\t';  break; // HORIZONTAL TABULATION U+0009
-
-          case 'e':
-          case 'f':
-          case 'x':
-          case 'u':
-          case 'v':
-            throw ex("parser.process.1", this.offset-2);
-          case 'A':
-          case 'Z':
-          case 'z':
-            throw ex("parser.descape.5", this.offset-2);
-          default:
-        }
-        return c;
-    }
-
-    static protected Hashtable ranges = null;
-    static protected Hashtable ranges2 = null;
-    static synchronized protected RangeToken getRange(String name, boolean positive) {
-        if (ranges == null) {
-            ranges = new Hashtable();
-            ranges2 = new Hashtable();
-
-            Token tok = Token.createRange();
-            setupRange(tok, SPACES);
-            ranges.put("xml:isSpace", tok);
-            ranges2.put("xml:isSpace", Token.complementRanges(tok));
-
-            tok = Token.createRange();
-            setupRange(tok, DIGITS);
-            ranges.put("xml:isDigit", tok);
-            ranges2.put("xml:isDigit", Token.complementRanges(tok));
-
-            tok = Token.createRange();
-            setupRange(tok, DIGITS);
-            ranges.put("xml:isDigit", tok);
-            ranges2.put("xml:isDigit", Token.complementRanges(tok));
-
-            tok = Token.createRange();
-            setupRange(tok, LETTERS);
-            tok.mergeRanges((Token)ranges.get("xml:isDigit"));
-            ranges.put("xml:isWord", tok);
-            ranges2.put("xml:isWord", Token.complementRanges(tok));
-
-            tok = Token.createRange();
-            setupRange(tok, NAMECHARS);
-            ranges.put("xml:isNameChar", tok);
-            ranges2.put("xml:isNameChar", Token.complementRanges(tok));
-
-            tok = Token.createRange();
-            setupRange(tok, LETTERS);
-            tok.addRange('_', '_');
-            tok.addRange(':', ':');
-            ranges.put("xml:isInitialNameChar", tok);
-            ranges2.put("xml:isInitialNameChar", Token.complementRanges(tok));
-        }
-        RangeToken tok = positive ? (RangeToken)ranges.get(name)
-            : (RangeToken)ranges2.get(name);
-        return tok;
-    }
-
-    static void setupRange(Token range, String src) {
-        int len = src.length();
-        for (int i = 0;  i < len;  i += 2)
-            range.addRange(src.charAt(i), src.charAt(i+1));
-    }
-
-    private static final String SPACES = "\t\n\r\r  ";
-    private static final String NAMECHARS =
-        "\u002d\u002e\u0030\u003a\u0041\u005a\u005f\u005f\u0061\u007a\u00b7\u00b7\u00c0\u00d6"
-        +"\u00d8\u00f6\u00f8\u0131\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0"
-        +"\u01f4\u01f5\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u02d0\u02d1\u0300\u0345\u0360\u0361"
-        +"\u0386\u038a\u038c\u038c\u038e\u03a1\u03a3\u03ce\u03d0\u03d6\u03da\u03da\u03dc\u03dc"
-        +"\u03de\u03de\u03e0\u03e0\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481"
-        +"\u0483\u0486\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9"
-        +"\u0531\u0556\u0559\u0559\u0561\u0586\u0591\u05a1\u05a3\u05b9\u05bb\u05bd\u05bf\u05bf"
-        +"\u05c1\u05c2\u05c4\u05c4\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0640\u0652\u0660\u0669"
-        +"\u0670\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06d5\u06e8\u06ea\u06ed\u06f0\u06f9"
-        +"\u0901\u0903\u0905\u0939\u093c\u094d\u0951\u0954\u0958\u0963\u0966\u096f\u0981\u0983"
-        +"\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b2\u09b2\u09b6\u09b9\u09bc\u09bc"
-        +"\u09be\u09c4\u09c7\u09c8\u09cb\u09cd\u09d7\u09d7\u09dc\u09dd\u09df\u09e3\u09e6\u09f1"
-        +"\u0a02\u0a02\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36"
-        +"\u0a38\u0a39\u0a3c\u0a3c\u0a3e\u0a42\u0a47\u0a48\u0a4b\u0a4d\u0a59\u0a5c\u0a5e\u0a5e"
-        +"\u0a66\u0a74\u0a81\u0a83\u0a85\u0a8b\u0a8d\u0a8d\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0"
-        +"\u0ab2\u0ab3\u0ab5\u0ab9\u0abc\u0ac5\u0ac7\u0ac9\u0acb\u0acd\u0ae0\u0ae0\u0ae6\u0aef"
-        +"\u0b01\u0b03\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39"
-        +"\u0b3c\u0b43\u0b47\u0b48\u0b4b\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f\u0b61\u0b66\u0b6f"
-        +"\u0b82\u0b83\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a\u0b9c\u0b9c\u0b9e\u0b9f"
-        +"\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0bbe\u0bc2\u0bc6\u0bc8\u0bca\u0bcd"
-        +"\u0bd7\u0bd7\u0be7\u0bef\u0c01\u0c03\u0c05\u0c0c\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33"
-        +"\u0c35\u0c39\u0c3e\u0c44\u0c46\u0c48\u0c4a\u0c4d\u0c55\u0c56\u0c60\u0c61\u0c66\u0c6f"
-        +"\u0c82\u0c83\u0c85\u0c8c\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0cbe\u0cc4"
-        +"\u0cc6\u0cc8\u0cca\u0ccd\u0cd5\u0cd6\u0cde\u0cde\u0ce0\u0ce1\u0ce6\u0cef\u0d02\u0d03"
-        +"\u0d05\u0d0c\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d3e\u0d43\u0d46\u0d48\u0d4a\u0d4d"
-        +"\u0d57\u0d57\u0d60\u0d61\u0d66\u0d6f\u0e01\u0e2e\u0e30\u0e3a\u0e40\u0e4e\u0e50\u0e59"
-        +"\u0e81\u0e82\u0e84\u0e84\u0e87\u0e88\u0e8a\u0e8a\u0e8d\u0e8d\u0e94\u0e97\u0e99\u0e9f"
-        +"\u0ea1\u0ea3\u0ea5\u0ea5\u0ea7\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb9\u0ebb\u0ebd"
-        +"\u0ec0\u0ec4\u0ec6\u0ec6\u0ec8\u0ecd\u0ed0\u0ed9\u0f18\u0f19\u0f20\u0f29\u0f35\u0f35"
-        +"\u0f37\u0f37\u0f39\u0f39\u0f3e\u0f47\u0f49\u0f69\u0f71\u0f84\u0f86\u0f8b\u0f90\u0f95"
-        +"\u0f97\u0f97\u0f99\u0fad\u0fb1\u0fb7\u0fb9\u0fb9\u10a0\u10c5\u10d0\u10f6\u1100\u1100"
-        +"\u1102\u1103\u1105\u1107\u1109\u1109\u110b\u110c\u110e\u1112\u113c\u113c\u113e\u113e"
-        +"\u1140\u1140\u114c\u114c\u114e\u114e\u1150\u1150\u1154\u1155\u1159\u1159\u115f\u1161"
-        +"\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116d\u116e\u1172\u1173\u1175\u1175"
-        +"\u119e\u119e\u11a8\u11a8\u11ab\u11ab\u11ae\u11af\u11b7\u11b8\u11ba\u11ba\u11bc\u11c2"
-        +"\u11eb\u11eb\u11f0\u11f0\u11f9\u11f9\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d"
-        +"\u1f20\u1f45\u1f48\u1f4d\u1f50\u1f57\u1f59\u1f59\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f7d"
-        +"\u1f80\u1fb4\u1fb6\u1fbc\u1fbe\u1fbe\u1fc2\u1fc4\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb"
-        +"\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc\u20d0\u20dc\u20e1\u20e1\u2126\u2126\u212a\u212b"
-        +"\u212e\u212e\u2180\u2182\u3005\u3005\u3007\u3007\u3021\u302f\u3031\u3035\u3041\u3094"
-        +"\u3099\u309a\u309d\u309e\u30a1\u30fa\u30fc\u30fe\u3105\u312c\u4e00\u9fa5\uac00\ud7a3"
-        +"";
-    private static final String LETTERS =
-        "\u0041\u005a\u0061\u007a\u00c0\u00d6\u00d8\u00f6\u00f8\u0131\u0134\u013e\u0141\u0148"
-        +"\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5\u01fa\u0217\u0250\u02a8\u02bb\u02c1"
-        +"\u0386\u0386\u0388\u038a\u038c\u038c\u038e\u03a1\u03a3\u03ce\u03d0\u03d6\u03da\u03da"
-        +"\u03dc\u03dc\u03de\u03de\u03e0\u03e0\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c"
-        +"\u045e\u0481\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9"
-        +"\u0531\u0556\u0559\u0559\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a"
-        +"\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06d5\u06d5\u06e5\u06e6\u0905\u0939"
-        +"\u093d\u093d\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b2\u09b2"
-        +"\u09b6\u09b9\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28"
-        +"\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a5e\u0a5e\u0a72\u0a74"
-        +"\u0a85\u0a8b\u0a8d\u0a8d\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9"
-        +"\u0abd\u0abd\u0ae0\u0ae0\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33"
-        +"\u0b36\u0b39\u0b3d\u0b3d\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95"
-        +"\u0b99\u0b9a\u0b9c\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9"
-        +"\u0c05\u0c0c\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c"
-        +"\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0cde\u0cde\u0ce0\u0ce1\u0d05\u0d0c"
-        +"\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e30\u0e30\u0e32\u0e33"
-        +"\u0e40\u0e45\u0e81\u0e82\u0e84\u0e84\u0e87\u0e88\u0e8a\u0e8a\u0e8d\u0e8d\u0e94\u0e97"
-        +"\u0e99\u0e9f\u0ea1\u0ea3\u0ea5\u0ea5\u0ea7\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb0"
-        +"\u0eb2\u0eb3\u0ebd\u0ebd\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69\u10a0\u10c5\u10d0\u10f6"
-        +"\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110b\u110c\u110e\u1112\u113c\u113c"
-        +"\u113e\u113e\u1140\u1140\u114c\u114c\u114e\u114e\u1150\u1150\u1154\u1155\u1159\u1159"
-        +"\u115f\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116d\u116e\u1172\u1173"
-        +"\u1175\u1175\u119e\u119e\u11a8\u11a8\u11ab\u11ab\u11ae\u11af\u11b7\u11b8\u11ba\u11ba"
-        +"\u11bc\u11c2\u11eb\u11eb\u11f0\u11f0\u11f9\u11f9\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15"
-        +"\u1f18\u1f1d\u1f20\u1f45\u1f48\u1f4d\u1f50\u1f57\u1f59\u1f59\u1f5b\u1f5b\u1f5d\u1f5d"
-        +"\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fbe\u1fbe\u1fc2\u1fc4\u1fc6\u1fcc\u1fd0\u1fd3"
-        +"\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc\u2126\u2126\u212a\u212b\u212e\u212e"
-        +"\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30a1\u30fa\u3105\u312c\u4e00\u9fa5"
-        +"\uac00\ud7a3";
-    private static final String DIGITS =
-        "\u0030\u0039\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF"
-        +"\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9"
-        +"\u0F20\u0F29";
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/REUtil.java b/src/org/apache/xerces/impl/xpath/regex/REUtil.java
deleted file mode 100644
index 8bfbad8..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/REUtil.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.text.CharacterIterator;
-
-public final class REUtil {
-    private REUtil() {
-    }
-
-    static final int composeFromSurrogates(int high, int low) {
-        return 0x10000 + ((high-0xd800)<<10) + low-0xdc00;
-    }
-
-    static final boolean isLowSurrogate(int ch) {
-        return (ch & 0xfc00) == 0xdc00;
-    }
-
-    static final boolean isHighSurrogate(int ch) {
-        return (ch & 0xfc00) == 0xd800;
-    }
-
-    static final String decomposeToSurrogates(int ch) {
-        char[] chs = new char[2];
-        ch -= 0x10000;
-        chs[0] = (char)((ch>>10)+0xd800);
-        chs[1] = (char)((ch&0x3ff)+0xdc00);
-        return new String(chs);
-    }
-
-    static final String substring(CharacterIterator iterator, int begin, int end) {
-        char[] src = new char[end-begin];
-        for (int i = 0;  i < src.length;  i ++)
-            src[i] = iterator.setIndex(i+begin);
-        return new String(src);
-    }
-
-    // ================================================================
-
-    static final int getOptionValue(int ch) {
-        int ret = 0;
-        switch (ch) {
-          case 'i':
-            ret = RegularExpression.IGNORE_CASE;
-            break;
-          case 'm':
-            ret = RegularExpression.MULTIPLE_LINES;
-            break;
-          case 's':
-            ret = RegularExpression.SINGLE_LINE;
-            break;
-          case 'x':
-            ret = RegularExpression.EXTENDED_COMMENT;
-            break;
-          case 'u':
-            ret = RegularExpression.USE_UNICODE_CATEGORY;
-            break;
-          case 'w':
-            ret = RegularExpression.UNICODE_WORD_BOUNDARY;
-            break;
-          case 'F':
-            ret = RegularExpression.PROHIBIT_FIXED_STRING_OPTIMIZATION;
-            break;
-          case 'H':
-            ret = RegularExpression.PROHIBIT_HEAD_CHARACTER_OPTIMIZATION;
-            break;
-          case 'X':
-            ret = RegularExpression.XMLSCHEMA_MODE;
-            break;
-          case ',':
-            ret = RegularExpression.SPECIAL_COMMA;
-            break;
-          default:
-        }
-        return ret;
-    }
-
-    static final int parseOptions(String opts) throws ParseException {
-        if (opts == null)  return 0;
-        int options = 0;
-        for (int i = 0;  i < opts.length();  i ++) {
-            int v = getOptionValue(opts.charAt(i));
-            if (v == 0)
-                throw new ParseException("Unknown Option: "+opts.substring(i), -1);
-            options |= v;
-        }
-        return options;
-    }
-
-    static final String createOptionString(int options) {
-        StringBuffer sb = new StringBuffer(9);
-        if ((options & RegularExpression.PROHIBIT_FIXED_STRING_OPTIMIZATION) != 0)
-            sb.append((char)'F');
-        if ((options & RegularExpression.PROHIBIT_HEAD_CHARACTER_OPTIMIZATION) != 0)
-            sb.append((char)'H');
-        if ((options & RegularExpression.XMLSCHEMA_MODE) != 0)
-            sb.append((char)'X');
-        if ((options & RegularExpression.IGNORE_CASE) != 0)
-            sb.append((char)'i');
-        if ((options & RegularExpression.MULTIPLE_LINES) != 0)
-            sb.append((char)'m');
-        if ((options & RegularExpression.SINGLE_LINE) != 0)
-            sb.append((char)'s');
-        if ((options & RegularExpression.USE_UNICODE_CATEGORY) != 0)
-            sb.append((char)'u');
-        if ((options & RegularExpression.UNICODE_WORD_BOUNDARY) != 0)
-            sb.append((char)'w');
-        if ((options & RegularExpression.EXTENDED_COMMENT) != 0)
-            sb.append((char)'x');
-        if ((options & RegularExpression.SPECIAL_COMMA) != 0)
-            sb.append((char)',');
-        return sb.toString().intern();
-    }
-
-    // ================================================================
-
-    static String stripExtendedComment(String regex) {
-        int len = regex.length();
-        StringBuffer buffer = new StringBuffer(len);
-        int offset = 0;
-        while (offset < len) {
-            int ch = regex.charAt(offset++);
-                                                // Skips a white space.
-            if (ch == '\t' || ch == '\n' || ch == '\f' || ch == '\r' || ch == ' ')
-                continue;
-
-            if (ch == '#') {                    // Skips chracters between '#' and a line end.
-                while (offset < len) {
-                    ch = regex.charAt(offset++);
-                    if (ch == '\r' || ch == '\n')
-                        break;
-                }
-                continue;
-            }
-
-            int next;                           // Strips an escaped white space.
-            if (ch == '\\' && offset < len) {
-                if ((next = regex.charAt(offset)) == '#'
-                    || next == '\t' || next == '\n' || next == '\f'
-                    || next == '\r' || next == ' ') {
-                    buffer.append((char)next);
-                    offset ++;
-                } else {                        // Other escaped character.
-                    buffer.append((char)'\\');
-                    buffer.append((char)next);
-                    offset ++;
-                }
-            } else                              // As is.
-                buffer.append((char)ch);
-        }
-        return buffer.toString();
-    }
-
-    // ================================================================
-
-    /**
-     * Sample entry.
-     * <div>Usage: <KBD>org.apache.xerces.utils.regex.REUtil &lt;regex&gt; &lt;string&gt;</KBD></div>
-     */
-    public static void main(String[] argv) {
-        String pattern = null;
-        try {
-            String options = "";
-            String target = null;
-            if( argv.length == 0 ) {
-                System.out.println( "Error:Usage: java REUtil -i|-m|-s|-u|-w|-X regularExpression String" );
-                System.exit( 0 );
-            }
-            for (int i = 0;  i < argv.length;  i ++) {
-                if (argv[i].length() == 0 || argv[i].charAt(0) != '-') {
-                    if (pattern == null)
-                        pattern = argv[i];
-                    else if (target == null)
-                        target = argv[i];
-                    else
-                        System.err.println("Unnecessary: "+argv[i]);
-                } else if (argv[i].equals("-i")) {
-                    options += "i";
-                } else if (argv[i].equals("-m")) {
-                    options += "m";
-                } else if (argv[i].equals("-s")) {
-                    options += "s";
-                } else if (argv[i].equals("-u")) {
-                    options += "u";
-                } else if (argv[i].equals("-w")) {
-                    options += "w";
-                } else if (argv[i].equals("-X")) {
-                    options += "X";
-                } else {
-                    System.err.println("Unknown option: "+argv[i]);
-                }
-            }
-            RegularExpression reg = new RegularExpression(pattern, options);
-            System.out.println("RegularExpression: "+reg);
-            Match match = new Match();
-            reg.matches(target, match);
-            for (int i = 0;  i < match.getNumberOfGroups();  i ++) {
-                if (i == 0 )  System.out.print("Matched range for the whole pattern: ");
-                else System.out.print("["+i+"]: ");
-                if (match.getBeginning(i) < 0)
-                    System.out.println("-1");
-                else {
-                    System.out.print(match.getBeginning(i)+", "+match.getEnd(i)+", ");
-                    System.out.println("\""+match.getCapturedText(i)+"\"");
-                }
-            }
-        } catch (ParseException pe) {
-            if (pattern == null) {
-                pe.printStackTrace();
-            } else {
-                System.err.println("org.apache.xerces.utils.regex.ParseException: "+pe.getMessage());
-                String indent = "        ";
-                System.err.println(indent+pattern);
-                int loc = pe.getLocation();
-                if (loc >= 0) {
-                    System.err.print(indent);
-                    for (int i = 0;  i < loc;  i ++)  System.err.print("-");
-                    System.err.println("^");
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    static final int CACHESIZE = 20;
-    static RegularExpression[] regexCache = new RegularExpression[CACHESIZE];
-    /**
-     * Creates a RegularExpression instance.
-     * This method caches created instances.
-     *
-     * @seeq RegularExpression#RegularExpression(java.lang.String, java.lang.String)
-     */
-    public static RegularExpression createRegex(String pattern, String options)
-        throws ParseException {
-        RegularExpression re = null;
-        int intOptions = REUtil.parseOptions(options);
-        synchronized (REUtil.regexCache) {
-            int i;
-            for (i = 0;  i < REUtil.CACHESIZE;  i ++) {
-                re = REUtil.regexCache[i];
-                if (re == null) {
-                    i = -1;
-                    break;
-                }
-                if (re.equals(pattern, intOptions))
-                    break;
-            }
-            if (re != null) {
-                if (i != 0) {
-                    System.arraycopy(REUtil.regexCache, 0, REUtil.regexCache, 1, i);
-                    REUtil.regexCache[0] = re;
-                }
-            } else {
-                re = new RegularExpression(pattern, options);
-                System.arraycopy(REUtil.regexCache, 0, REUtil.regexCache, 1, REUtil.CACHESIZE-1);
-                REUtil.regexCache[0] = re;
-            }
-        }
-        return re;
-    }
-
-    /**
-     *
-     * @see RegularExpression#matches(java.lang.String)
-     */
-    public static boolean matches(String regex, String target) throws ParseException {
-        return REUtil.createRegex(regex, null).matches(target);
-    }
-
-    /**
-     *
-     * @see RegularExpression#matches(java.lang.String)
-     */
-    public static boolean matches(String regex, String options, String target) throws ParseException {
-        return REUtil.createRegex(regex, options).matches(target);
-    }
-
-    // ================================================================
-
-    /**
-     *
-     */
-    public static String quoteMeta(String literal) {
-        int len = literal.length();
-        StringBuffer buffer = null;
-        for (int i = 0;  i < len;  i ++) {
-            int ch = literal.charAt(i);
-            if (".*+?{[()|\\^$".indexOf(ch) >= 0) {
-                if (buffer == null) {
-                    buffer = new StringBuffer(i+(len-i)*2);
-                    if (i > 0)  buffer.append(literal.substring(0, i));
-                }
-                buffer.append((char)'\\');
-            } else if (buffer != null)
-                buffer.append((char)ch);
-        }
-        return buffer != null ? buffer.toString() : literal;
-    }
-
-    // ================================================================
-
-    static void dumpString(String v) {
-        for (int i = 0;  i < v.length();  i ++) {
-            System.out.print(Integer.toHexString(v.charAt(i)));
-            System.out.print(" ");
-        }
-        System.out.println();
-    }
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/RangeToken.java b/src/org/apache/xerces/impl/xpath/regex/RangeToken.java
deleted file mode 100644
index 69b4c56..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/RangeToken.java
+++ /dev/null
@@ -1,651 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-/**
- * This class represents a character class such as [a-z] or a period.
- */
-final class RangeToken extends Token implements java.io.Serializable {
-
-    int[] ranges;
-    boolean sorted;
-    boolean compacted;
-    RangeToken icaseCache = null;
-    int[] map = null;
-    int nonMapIndex;
-
-    RangeToken(int type) {
-        super(type);
-        this.setSorted(false);
-    }
-
-                                                // for RANGE or NRANGE
-    protected void addRange(int start, int end) {
-        this.icaseCache = null;
-        //System.err.println("Token#addRange(): "+start+" "+end);
-        int r1, r2;
-        if (start <= end) {
-            r1 = start;
-            r2 = end;
-        } else {
-            r1 = end;
-            r2 = start;
-        }
-
-        int pos = 0;
-        if (this.ranges == null) {
-            this.ranges = new int[2];
-            this.ranges[0] = r1;
-            this.ranges[1] = r2;
-            this.setSorted(true);
-        } else {
-            pos = this.ranges.length;
-            if (this.ranges[pos-1]+1 == r1) {
-                this.ranges[pos-1] = r2;
-                return;
-            }
-            int[] temp = new int[pos+2];
-            System.arraycopy(this.ranges, 0, temp, 0, pos);
-            this.ranges = temp;
-            if (this.ranges[pos-1] >= r1)
-                this.setSorted(false);
-            this.ranges[pos++] = r1;
-            this.ranges[pos] = r2;
-            if (!this.sorted)
-                this.sortRanges();
-        }
-    }
-
-    private final boolean isSorted() {
-        return this.sorted;
-    }
-    private final void setSorted(boolean sort) {
-        this.sorted = sort;
-        if (!sort)  this.compacted = false;
-    }
-    private final boolean isCompacted() {
-        return this.compacted;
-    }
-    private final void setCompacted() {
-        this.compacted = true;
-    }
-
-    protected void sortRanges() {
-        if (this.isSorted())
-            return;
-        if (this.ranges == null)
-            return;
-        //System.err.println("Do sorting: "+this.ranges.length);
-
-                                                // Bubble sort
-                                                // Why? -- In many cases,
-                                                //         this.ranges has few elements.
-        for (int i = this.ranges.length-4;  i >= 0;  i -= 2) {
-            for (int j = 0;  j <= i;  j += 2) {
-                if (this.ranges[j] > this.ranges[j+2]
-                    || this.ranges[j] == this.ranges[j+2] && this.ranges[j+1] > this.ranges[j+3]) {
-                    int tmp;
-                    tmp = this.ranges[j+2];
-                    this.ranges[j+2] = this.ranges[j];
-                    this.ranges[j] = tmp;
-                    tmp = this.ranges[j+3];
-                    this.ranges[j+3] = this.ranges[j+1];
-                    this.ranges[j+1] = tmp;
-                }
-            }
-        }
-        this.setSorted(true);
-    }
-
-    /**
-     * this.ranges is sorted.
-     */
-    protected void compactRanges() {
-        boolean DEBUG = false;
-        if (this.ranges == null || this.ranges.length <= 2)
-            return;
-        if (this.isCompacted())
-            return;
-        int base = 0;                           // Index of writing point
-        int target = 0;                         // Index of processing point
-
-        while (target < this.ranges.length) {
-            if (base != target) {
-                this.ranges[base] = this.ranges[target++];
-                this.ranges[base+1] = this.ranges[target++];
-            } else
-                target += 2;
-            int baseend = this.ranges[base+1];
-            while (target < this.ranges.length) {
-                if (baseend+1 < this.ranges[target])
-                    break;
-                if (baseend+1 == this.ranges[target]) {
-                    if (DEBUG)
-                        System.err.println("Token#compactRanges(): Compaction: ["+this.ranges[base]
-                                           +", "+this.ranges[base+1]
-                                           +"], ["+this.ranges[target]
-                                           +", "+this.ranges[target+1]
-                                           +"] -> ["+this.ranges[base]
-                                           +", "+this.ranges[target+1]
-                                           +"]");
-                    this.ranges[base+1] = this.ranges[target+1];
-                    baseend = this.ranges[base+1];
-                    target += 2;
-                } else if (baseend >= this.ranges[target+1]) {
-                    if (DEBUG)
-                        System.err.println("Token#compactRanges(): Compaction: ["+this.ranges[base]
-                                           +", "+this.ranges[base+1]
-                                           +"], ["+this.ranges[target]
-                                           +", "+this.ranges[target+1]
-                                           +"] -> ["+this.ranges[base]
-                                           +", "+this.ranges[base+1]
-                                           +"]");
-                    target += 2;
-                } else if (baseend < this.ranges[target+1]) {
-                    if (DEBUG)
-                        System.err.println("Token#compactRanges(): Compaction: ["+this.ranges[base]
-                                           +", "+this.ranges[base+1]
-                                           +"], ["+this.ranges[target]
-                                           +", "+this.ranges[target+1]
-                                           +"] -> ["+this.ranges[base]
-                                           +", "+this.ranges[target+1]
-                                           +"]");
-                    this.ranges[base+1] = this.ranges[target+1];
-                    baseend = this.ranges[base+1];
-                    target += 2;
-                } else {
-                    throw new RuntimeException("Token#compactRanges(): Internel Error: ["
-                                               +this.ranges[base]
-                                               +","+this.ranges[base+1]
-                                               +"] ["+this.ranges[target]
-                                               +","+this.ranges[target+1]+"]");
-                }
-            } // while
-            base += 2;
-        }
-
-        if (base != this.ranges.length) {
-            int[] result = new int[base];
-            System.arraycopy(this.ranges, 0, result, 0, base);
-            this.ranges = result;
-        }
-        this.setCompacted();
-    }
-
-    protected void mergeRanges(Token token) {
-        if (token.type != this.type)
-            throw new IllegalArgumentException("Token#mergeRanges(): Mismatched Type: "+token.type);
-        RangeToken tok = (RangeToken)token;
-        this.sortRanges();
-        tok.sortRanges();
-        if (tok.ranges == null)
-            return;
-        this.icaseCache = null;
-        this.setSorted(true);
-        if (this.ranges == null) {
-            this.ranges = new int[tok.ranges.length];
-            System.arraycopy(tok.ranges, 0, this.ranges, 0, tok.ranges.length);
-            return;
-        }
-        int[] result = new int[this.ranges.length+tok.ranges.length];
-        for (int i = 0, j = 0, k = 0;  i < this.ranges.length || j < tok.ranges.length;) {
-            if (i >= this.ranges.length) {
-                result[k++] = tok.ranges[j++];
-                result[k++] = tok.ranges[j++];
-            } else if (j >= tok.ranges.length) {
-                result[k++] = this.ranges[i++];
-                result[k++] = this.ranges[i++];
-            } else if (tok.ranges[j] < this.ranges[i]
-                       || tok.ranges[j] == this.ranges[i] && tok.ranges[j+1] < this.ranges[i+1]) {
-                result[k++] = tok.ranges[j++];
-                result[k++] = tok.ranges[j++];
-            } else {
-                result[k++] = this.ranges[i++];
-                result[k++] = this.ranges[i++];
-            }
-        }
-        this.ranges = result;
-    }
-
-    protected void subtractRanges(Token token) {
-        if (token.type == NRANGE) {
-            this.intersectRanges(token);
-            return;
-        }
-        RangeToken tok = (RangeToken)token;
-        if (tok.ranges == null || this.ranges == null)
-            return;
-        this.icaseCache = null;
-        this.sortRanges();
-        this.compactRanges();
-        tok.sortRanges();
-        tok.compactRanges();
-
-        //System.err.println("Token#substractRanges(): Entry: "+this.ranges.length+", "+tok.ranges.length);
-
-        int[] result = new int[this.ranges.length+tok.ranges.length];
-        int wp = 0, src = 0, sub = 0;
-        while (src < this.ranges.length && sub < tok.ranges.length) {
-            int srcbegin = this.ranges[src];
-            int srcend = this.ranges[src+1];
-            int subbegin = tok.ranges[sub];
-            int subend = tok.ranges[sub+1];
-            if (srcend < subbegin) {            // Not overlapped
-                                                // src: o-----o
-                                                // sub:         o-----o
-                                                // res: o-----o
-                                                // Reuse sub
-                result[wp++] = this.ranges[src++];
-                result[wp++] = this.ranges[src++];
-            } else if (srcend >= subbegin
-                       && srcbegin <= subend) { // Overlapped
-                                                // src:    o--------o
-                                                // sub:  o----o
-                                                // sub:      o----o
-                                                // sub:          o----o
-                                                // sub:  o------------o
-                if (subbegin <= srcbegin && srcend <= subend) {
-                                                // src:    o--------o
-                                                // sub:  o------------o
-                                                // res: empty
-                                                // Reuse sub
-                    src += 2;
-                } else if (subbegin <= srcbegin) {
-                                                // src:    o--------o
-                                                // sub:  o----o
-                                                // res:       o-----o
-                                                // Reuse src(=res)
-                    this.ranges[src] = subend+1;
-                    sub += 2;
-                } else if (srcend <= subend) {
-                                                // src:    o--------o
-                                                // sub:          o----o
-                                                // res:    o-----o
-                                                // Reuse sub
-                    result[wp++] = srcbegin;
-                    result[wp++] = subbegin-1;
-                    src += 2;
-                } else {
-                                                // src:    o--------o
-                                                // sub:      o----o
-                                                // res:    o-o    o-o
-                                                // Reuse src(=right res)
-                    result[wp++] = srcbegin;
-                    result[wp++] = subbegin-1;
-                    this.ranges[src] = subend+1;
-                    sub += 2;
-                }
-            } else if (subend < srcbegin) {
-                                                // Not overlapped
-                                                // src:          o-----o
-                                                // sub: o----o
-                sub += 2;
-            } else {
-                throw new RuntimeException("Token#subtractRanges(): Internal Error: ["+this.ranges[src]
-                                           +","+this.ranges[src+1]
-                                           +"] - ["+tok.ranges[sub]
-                                           +","+tok.ranges[sub+1]
-                                           +"]");
-            }
-        }
-        while (src < this.ranges.length) {
-            result[wp++] = this.ranges[src++];
-            result[wp++] = this.ranges[src++];
-        }
-        this.ranges = new int[wp];
-        System.arraycopy(result, 0, this.ranges, 0, wp);
-                                                // this.ranges is sorted and compacted.
-    }
-
-    /**
-     * @param tok Ignore whether it is NRANGE or not.
-     */
-    protected void intersectRanges(Token token) {
-        RangeToken tok = (RangeToken)token;
-        if (tok.ranges == null || this.ranges == null)
-            return;
-        this.icaseCache = null;
-        this.sortRanges();
-        this.compactRanges();
-        tok.sortRanges();
-        tok.compactRanges();
-
-        int[] result = new int[this.ranges.length+tok.ranges.length];
-        int wp = 0, src1 = 0, src2 = 0;
-        while (src1 < this.ranges.length && src2 < tok.ranges.length) {
-            int src1begin = this.ranges[src1];
-            int src1end = this.ranges[src1+1];
-            int src2begin = tok.ranges[src2];
-            int src2end = tok.ranges[src2+1];
-            if (src1end < src2begin) {          // Not overlapped
-                                                // src1: o-----o
-                                                // src2:         o-----o
-                                                // res:  empty
-                                                // Reuse src2
-                src1 += 2;
-            } else if (src1end >= src2begin
-                       && src1begin <= src2end) { // Overlapped
-                                                // src1:    o--------o
-                                                // src2:  o----o
-                                                // src2:      o----o
-                                                // src2:          o----o
-                                                // src2:  o------------o
-                if (src2begin <= src2begin && src1end <= src2end) {
-                                                // src1:    o--------o
-                                                // src2:  o------------o
-                                                // res:     o--------o
-                                                // Reuse src2
-                    result[wp++] = src1begin;
-                    result[wp++] = src1end;
-                    src1 += 2;
-                } else if (src2begin <= src1begin) {
-                                                // src1:    o--------o
-                                                // src2:  o----o
-                                                // res:     o--o
-                                                // Reuse the rest of src1
-                    result[wp++] = src1begin;
-                    result[wp++] = src2end;
-                    this.ranges[src1] = src2end+1;
-                    src2 += 2;
-                } else if (src1end <= src2end) {
-                                                // src1:    o--------o
-                                                // src2:          o----o
-                                                // res:           o--o
-                                                // Reuse src2
-                    result[wp++] = src2begin;
-                    result[wp++] = src1end;
-                    src1 += 2;
-                } else {
-                                                // src1:    o--------o
-                                                // src2:      o----o
-                                                // res:       o----o
-                                                // Reuse the rest of src1
-                    result[wp++] = src2begin;
-                    result[wp++] = src2end;
-                    this.ranges[src1] = src2end+1;
-                }
-            } else if (src2end < src1begin) {
-                                                // Not overlapped
-                                                // src1:          o-----o
-                                                // src2: o----o
-                src2 += 2;
-            } else {
-                throw new RuntimeException("Token#intersectRanges(): Internal Error: ["
-                                           +this.ranges[src1]
-                                           +","+this.ranges[src1+1]
-                                           +"] & ["+tok.ranges[src2]
-                                           +","+tok.ranges[src2+1]
-                                           +"]");
-            }
-        }
-        while (src1 < this.ranges.length) {
-            result[wp++] = this.ranges[src1++];
-            result[wp++] = this.ranges[src1++];
-        }
-        this.ranges = new int[wp];
-        System.arraycopy(result, 0, this.ranges, 0, wp);
-                                                // this.ranges is sorted and compacted.
-    }
-
-    /**
-     * for RANGE: Creates complement.
-     * for NRANGE: Creates the same meaning RANGE.
-     */
-    static Token complementRanges(Token token) {
-        if (token.type != RANGE && token.type != NRANGE)
-            throw new IllegalArgumentException("Token#complementRanges(): must be RANGE: "+token.type);
-        RangeToken tok = (RangeToken)token;
-        tok.sortRanges();
-        tok.compactRanges();
-        int len = tok.ranges.length+2;
-        if (tok.ranges[0] == 0)
-            len -= 2;
-        int last = tok.ranges[tok.ranges.length-1];
-        if (last == UTF16_MAX)
-            len -= 2;
-        RangeToken ret = Token.createRange();
-        ret.ranges = new int[len];
-        int wp = 0;
-        if (tok.ranges[0] > 0) {
-            ret.ranges[wp++] = 0;
-            ret.ranges[wp++] = tok.ranges[0]-1;
-        }
-        for (int i = 1;  i < tok.ranges.length-2;  i += 2) {
-            ret.ranges[wp++] = tok.ranges[i]+1;
-            ret.ranges[wp++] = tok.ranges[i+1]-1;
-        }
-        if (last != UTF16_MAX) {
-            ret.ranges[wp++] = last+1;
-            ret.ranges[wp] = UTF16_MAX;
-        }
-        ret.setCompacted();
-        return ret;
-    }
-
-    synchronized RangeToken getCaseInsensitiveToken() {
-        if (this.icaseCache != null)
-            return this.icaseCache;
-            
-        RangeToken uppers = this.type == Token.RANGE ? Token.createRange() : Token.createNRange();
-        for (int i = 0;  i < this.ranges.length;  i += 2) {
-            for (int ch = this.ranges[i];  ch <= this.ranges[i+1];  ch ++) {
-                if (ch > 0xffff)
-                    uppers.addRange(ch, ch);
-                else {
-                    char uch = Character.toUpperCase((char)ch);
-                    uppers.addRange(uch, uch);
-                }
-            }
-        }
-        RangeToken lowers = this.type == Token.RANGE ? Token.createRange() : Token.createNRange();
-        for (int i = 0;  i < uppers.ranges.length;  i += 2) {
-            for (int ch = uppers.ranges[i];  ch <= uppers.ranges[i+1];  ch ++) {
-                if (ch > 0xffff)
-                    lowers.addRange(ch, ch);
-                else {
-                    char uch = Character.toUpperCase((char)ch);
-                    lowers.addRange(uch, uch);
-                }
-            }
-        }
-        lowers.mergeRanges(uppers);
-        lowers.mergeRanges(this);
-        lowers.compactRanges();
-
-        this.icaseCache = lowers;
-        return lowers;
-    }
-
-    void dumpRanges() {
-        System.err.print("RANGE: ");
-        if (this.ranges == null)
-            System.err.println(" NULL");
-        for (int i = 0;  i < this.ranges.length;  i += 2) {
-            System.err.print("["+this.ranges[i]+","+this.ranges[i+1]+"] ");
-        }
-        System.err.println("");
-    }
-
-    boolean match(int ch) {
-        if (this.map == null)  this.createMap();
-        boolean ret;
-        if (this.type == RANGE) {
-            if (ch < MAPSIZE)
-                return (this.map[ch/32] & (1<<(ch&0x1f))) != 0;
-            ret = false;
-            for (int i = this.nonMapIndex;  i < this.ranges.length;  i += 2) {
-                if (this.ranges[i] <= ch && ch <= this.ranges[i+1])
-                    return true;
-            }
-        } else {
-            if (ch < MAPSIZE)
-                return (this.map[ch/32] & (1<<(ch&0x1f))) == 0;
-            ret = true;
-            for (int i = this.nonMapIndex;  i < this.ranges.length;  i += 2) {
-                if (this.ranges[i] <= ch && ch <= this.ranges[i+1])
-                    return false;
-            }
-        }
-        return ret;
-    }
-
-    private static final int MAPSIZE = 256;
-    private void createMap() {
-        int asize = MAPSIZE/32;                 // 32 is the number of bits in `int'.
-        this.map = new int[asize];
-        this.nonMapIndex = this.ranges.length;
-        for (int i = 0;  i < asize;  i ++)  this.map[i] = 0;
-        for (int i = 0;  i < this.ranges.length;  i += 2) {
-            int s = this.ranges[i];
-            int e = this.ranges[i+1];
-            if (s < MAPSIZE) {
-                for (int j = s;  j <= e && j < MAPSIZE;  j ++)
-                    this.map[j/32] |= 1<<(j&0x1f); // s&0x1f : 0-31
-            } else {
-                this.nonMapIndex = i;
-                break;
-            }
-            if (e >= MAPSIZE) {
-                this.nonMapIndex = i;
-                break;
-            }
-        }
-        //for (int i = 0;  i < asize;  i ++)  System.err.println("Map: "+Integer.toString(this.map[i], 16));
-    }
-
-    public String toString(int options) {
-        String ret;
-        if (this.type == RANGE) {
-            if (this == Token.token_dot)
-                ret = ".";
-            else if (this == Token.token_0to9)
-                ret = "\\d";
-            else if (this == Token.token_wordchars)
-                ret = "\\w";
-            else if (this == Token.token_spaces)
-                ret = "\\s";
-            else {
-                StringBuffer sb = new StringBuffer();
-                sb.append("[");
-                for (int i = 0;  i < this.ranges.length;  i += 2) {
-                    if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0)  sb.append(",");
-                    if (this.ranges[i] == this.ranges[i+1]) {
-                        sb.append(escapeCharInCharClass(this.ranges[i]));
-                    } else {
-                        sb.append(escapeCharInCharClass(this.ranges[i]));
-                        sb.append((char)'-');
-                        sb.append(escapeCharInCharClass(this.ranges[i+1]));
-                    }
-                }
-                sb.append("]");
-                ret = sb.toString();
-            }
-        } else {
-            if (this == Token.token_not_0to9)
-                ret = "\\D";
-            else if (this == Token.token_not_wordchars)
-                ret = "\\W";
-            else if (this == Token.token_not_spaces)
-                ret = "\\S";
-            else {
-                StringBuffer sb = new StringBuffer();
-                sb.append("[^");
-                for (int i = 0;  i < this.ranges.length;  i += 2) {
-                    if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0)  sb.append(",");
-                    if (this.ranges[i] == this.ranges[i+1]) {
-                        sb.append(escapeCharInCharClass(this.ranges[i]));
-                    } else {
-                        sb.append(escapeCharInCharClass(this.ranges[i]));
-                        sb.append('-');
-                        sb.append(escapeCharInCharClass(this.ranges[i+1]));
-                    }
-                }
-                sb.append("]");
-                ret = sb.toString();
-            }
-        }
-        return ret;
-    }
-
-    private static String escapeCharInCharClass(int ch) {
-        String ret;
-        switch (ch) {
-          case '[':  case ']':  case '-':  case '^':
-          case ',':  case '\\':
-            ret = "\\"+(char)ch;
-            break;
-          case '\f':  ret = "\\f";  break;
-          case '\n':  ret = "\\n";  break;
-          case '\r':  ret = "\\r";  break;
-          case '\t':  ret = "\\t";  break;
-          case 0x1b:  ret = "\\e";  break;
-          //case 0x0b:  ret = "\\v";  break;
-          default:
-            if (ch < 0x20) {
-                String pre = "0"+Integer.toHexString(ch);
-                ret = "\\x"+pre.substring(pre.length()-2, pre.length());
-            } else if (ch >= 0x10000) {
-                String pre = "0"+Integer.toHexString(ch);
-                ret = "\\v"+pre.substring(pre.length()-6, pre.length());
-            } else
-                ret = ""+(char)ch;
-        }
-        return ret;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/RegexParser.java b/src/org/apache/xerces/impl/xpath/regex/RegexParser.java
deleted file mode 100644
index 3301ef0..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/RegexParser.java
+++ /dev/null
@@ -1,1272 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.Vector;
-
-/**
- * A Regular Expression Parser.
- */
-class RegexParser {
-    static final int T_CHAR = 0;
-    static final int T_EOF = 1;
-    static final int T_OR = 2;                  // '|'
-    static final int T_STAR = 3;                // '*'
-    static final int T_PLUS = 4;                // '+'
-    static final int T_QUESTION = 5;            // '?'
-    static final int T_LPAREN = 6;              // '('
-    static final int T_RPAREN = 7;              // ')'
-    static final int T_DOT = 8;                 // '.'
-    static final int T_LBRACKET = 9;            // '['
-    static final int T_BACKSOLIDUS = 10;        // '\'
-    static final int T_CARET = 11;              // '^'
-    static final int T_DOLLAR = 12;             // '$'
-    static final int T_LPAREN2 = 13;            // '(?:'
-    static final int T_LOOKAHEAD = 14;          // '(?='
-    static final int T_NEGATIVELOOKAHEAD = 15;  // '(?!'
-    static final int T_LOOKBEHIND = 16;         // '(?<='
-    static final int T_NEGATIVELOOKBEHIND = 17; // '(?<!'
-    static final int T_INDEPENDENT = 18;        // '(?>'
-    static final int T_SET_OPERATIONS = 19;     // '(?['
-    static final int T_POSIX_CHARCLASS_START = 20; // '[:' in a character class
-    static final int T_COMMENT = 21;            // '(?#'
-    static final int T_MODIFIERS = 22;          // '(?' [\-,a-z,A-Z]
-    static final int T_CONDITION = 23;          // '(?('
-    static final int T_XMLSCHEMA_CC_SUBTRACTION = 24; // '-[' in a character class
-
-    static class ReferencePosition {
-        int refNumber;
-        int position;
-        ReferencePosition(int n, int pos) {
-            this.refNumber = n;
-            this.position = pos;
-        }
-    }
-
-    int offset;
-    String regex;
-    int regexlen;
-    int options;
-    ResourceBundle resources;
-    int chardata;
-    int nexttoken;
-    static protected final int S_NORMAL = 0;
-    static protected final int S_INBRACKETS = 1;
-    static protected final int S_INXBRACKETS = 2;
-    int context = S_NORMAL;
-    int parennumber = 1;
-    boolean hasBackReferences;
-    Vector references = null;
-
-    public RegexParser() {
-        this.setLocale(Locale.getDefault());
-    }
-    public RegexParser(Locale locale) {
-        this.setLocale(locale);
-    }
-
-    public void setLocale(Locale locale) {
-        try {
-            this.resources = ResourceBundle.getBundle("org.apache.xerces.impl.xpath.regex.message", locale);
-        } catch (MissingResourceException mre) {
-            throw new RuntimeException("Installation Problem???  Couldn't load messages: "
-                                       +mre.getMessage());
-        }
-    }
-
-    final ParseException ex(String key, int loc) {
-        return new ParseException(this.resources.getString(key), loc);
-    }
-
-    private final boolean isSet(int flag) {
-        return (this.options & flag) == flag;
-    }
-
-    synchronized Token parse(String regex, int options) throws ParseException {
-        this.options = options;
-        this.offset = 0;
-        this.setContext(S_NORMAL);
-        this.parennumber = 1;
-        this.hasBackReferences = false;
-        this.regex = regex;
-        if (this.isSet(RegularExpression.EXTENDED_COMMENT))
-            this.regex = REUtil.stripExtendedComment(this.regex);
-        this.regexlen = this.regex.length();
-
-
-        this.next();
-        Token ret = this.parseRegex();
-        if (this.offset != this.regexlen)
-            throw ex("parser.parse.1", this.offset);
-        if (this.references != null) {
-            for (int i = 0;  i < this.references.size();  i ++) {
-                ReferencePosition position = (ReferencePosition)this.references.elementAt(i);
-                if (this.parennumber <= position.refNumber)
-                    throw ex("parser.parse.2", position.position);
-            }
-            this.references.removeAllElements();
-        }
-        return ret;
-    }
-
-    /*
-    public RegularExpression createRegex(String regex, int options) throws ParseException {
-        Token tok = this.parse(regex, options);
-        return new RegularExpression(regex, tok, this.parennumber, this.hasBackReferences, options);
-    }
-    */
-
-    protected final void setContext(int con) {
-        this.context = con;
-    }
-
-    final int read() {
-        return this.nexttoken;
-    }
-
-    final void next() {
-        if (this.offset >= this.regexlen) {
-            this.chardata = -1;
-            this.nexttoken = T_EOF;
-            return;
-        }
-
-        int ret;
-        int ch = this.regex.charAt(this.offset++);
-        this.chardata = ch;
-
-        if (this.context == S_INBRACKETS) {
-            // In a character class, this.chardata has one character, that is to say,
-            // a pair of surrogates is composed and stored to this.chardata.
-            switch (ch) {
-              case '\\':
-                ret = T_BACKSOLIDUS;
-                if (this.offset >= this.regexlen)
-                    throw ex("parser.next.1", this.offset-1);
-                this.chardata = this.regex.charAt(this.offset++);
-                break;
-
-              case '-':
-                if (this.isSet(RegularExpression.XMLSCHEMA_MODE)
-                    && this.offset < this.regexlen && this.regex.charAt(this.offset) == '[') {
-                    this.offset++;
-                    ret = T_XMLSCHEMA_CC_SUBTRACTION;
-                } else
-                    ret = T_CHAR;
-                break;
-
-              case '[':
-                if (!this.isSet(RegularExpression.XMLSCHEMA_MODE)
-                    && this.offset < this.regexlen && this.regex.charAt(this.offset) == ':') {
-                    this.offset++;
-                    ret = T_POSIX_CHARCLASS_START;
-                    break;
-                } // Through down
-              default:
-                if (REUtil.isHighSurrogate(ch) && this.offset < this.regexlen) {
-                    int low = this.regex.charAt(this.offset);
-                    if (REUtil.isLowSurrogate(low)) {
-                        this.chardata = REUtil.composeFromSurrogates(ch, low);
-                        this.offset ++;
-                    }
-                }
-                ret = T_CHAR;
-            }
-            this.nexttoken = ret;
-            return;
-        }
-
-        switch (ch) {
-          case '|': ret = T_OR;             break;
-          case '*': ret = T_STAR;           break;
-          case '+': ret = T_PLUS;           break;
-          case '?': ret = T_QUESTION;       break;
-          case ')': ret = T_RPAREN;         break;
-          case '.': ret = T_DOT;            break;
-          case '[': ret = T_LBRACKET;       break;
-          case '^': ret = T_CARET;          break;
-          case '$': ret = T_DOLLAR;         break;
-          case '(':
-            ret = T_LPAREN;
-            if (this.offset >= this.regexlen)
-                break;
-            if (this.regex.charAt(this.offset) != '?')
-                break;
-            if (++this.offset >= this.regexlen)
-                throw ex("parser.next.2", this.offset-1);
-            ch = this.regex.charAt(this.offset++);
-            switch (ch) {
-              case ':':  ret = T_LPAREN2;            break;
-              case '=':  ret = T_LOOKAHEAD;          break;
-              case '!':  ret = T_NEGATIVELOOKAHEAD;  break;
-              case '[':  ret = T_SET_OPERATIONS;     break;
-              case '>':  ret = T_INDEPENDENT;        break;
-              case '<':
-                if (this.offset >= this.regexlen)
-                    throw ex("parser.next.2", this.offset-3);
-                ch = this.regex.charAt(this.offset++);
-                if (ch == '=') {
-                    ret = T_LOOKBEHIND;
-                } else if (ch == '!') {
-                    ret = T_NEGATIVELOOKBEHIND;
-                } else
-                    throw ex("parser.next.3", this.offset-3);
-                break;
-              case '#':
-                while (this.offset < this.regexlen) {
-                    ch = this.regex.charAt(this.offset++);
-                    if (ch == ')')  break;
-                }
-                if (ch != ')')
-                    throw ex("parser.next.4", this.offset-1);
-                ret = T_COMMENT;
-                break;
-              default:
-                if (ch == '-' || 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z') {// Options
-                    this.offset --;
-                    ret = T_MODIFIERS;
-                    break;
-                } else if (ch == '(') {         // conditional
-                    ret = T_CONDITION;          // this.offsets points the next of '('.
-                    break;
-                }
-                throw ex("parser.next.2", this.offset-2);
-            }
-            break;
-            
-          case '\\':
-            ret = T_BACKSOLIDUS;
-            if (this.offset >= this.regexlen)
-                throw ex("parser.next.1", this.offset-1);
-            this.chardata = this.regex.charAt(this.offset++);
-            break;
-
-          default:
-            ret = T_CHAR;
-            if (REUtil.isHighSurrogate(this.chardata) && this.offset < this.regexlen)
-                this.chardata = REUtil.composeFromSurrogates(this.chardata,
-                                                             this.regex.charAt(this.offset++));
-        }
-        this.nexttoken = ret;
-    }
-
-    /**
-     * regex ::= term (`|` term)*
-     * term ::= factor+
-     * factor ::= ('^' | '$' | '\A' | '\Z' | '\z' | '\b' | '\B' | '\<' | '\>'
-     *            | atom (('*' | '+' | '?' | minmax ) '?'? )?)
-     *            | '(?=' regex ')'  | '(?!' regex ')'  | '(?&lt;=' regex ')'  | '(?&lt;!' regex ')'
-     * atom ::= char | '.' | range | '(' regex ')' | '(?:' regex ')' | '\' [0-9]
-     *          | '\w' | '\W' | '\d' | '\D' | '\s' | '\S' | category-block 
-     */
-    Token parseRegex() throws ParseException {
-        Token tok = this.parseTerm();
-        Token parent = null;
-        while (this.read() == T_OR) {
-            this.next();                    // '|'
-            if (parent == null) {
-                parent = Token.createUnion();
-                parent.addChild(tok);
-                tok = parent;
-            }
-            tok.addChild(this.parseTerm());
-        }
-        return tok;
-    }
-
-    /**
-     * term ::= factor+
-     */
-    Token parseTerm() throws ParseException {
-        int ch = this.read();
-        if (ch == T_OR || ch == T_RPAREN || ch == T_EOF) {
-            return Token.createEmpty();
-        } else {
-            Token tok = this.parseFactor();
-            Token concat = null;
-            while ((ch = this.read()) != T_OR && ch != T_RPAREN && ch != T_EOF) {
-                if (concat == null) {
-                    concat = Token.createConcat();
-                    concat.addChild(tok);
-                    tok = concat;
-                }
-                concat.addChild(this.parseFactor());
-                //tok = Token.createConcat(tok, this.parseFactor());
-            }
-            return tok;
-        }
-    }
-
-    // ----------------------------------------------------------------
-
-    Token processCaret() throws ParseException {
-        this.next();
-        return Token.token_linebeginning;
-    }
-    Token processDollar() throws ParseException {
-        this.next();
-        return Token.token_lineend;
-    }
-    Token processLookahead() throws ParseException {
-        this.next();
-        Token tok = Token.createLook(Token.LOOKAHEAD, this.parseRegex());
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                            // ')'
-        return tok;
-    }
-    Token processNegativelookahead() throws ParseException {
-        this.next();
-        Token tok = Token.createLook(Token.NEGATIVELOOKAHEAD, this.parseRegex());
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                            // ')'
-        return tok;
-    }
-    Token processLookbehind() throws ParseException {
-        this.next();
-        Token tok = Token.createLook(Token.LOOKBEHIND, this.parseRegex());
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                            // ')'
-        return tok;
-    }
-    Token processNegativelookbehind() throws ParseException {
-        this.next();
-        Token tok = Token.createLook(Token.NEGATIVELOOKBEHIND, this.parseRegex());
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                    // ')'
-        return tok;
-    }
-    Token processBacksolidus_A() throws ParseException {
-        this.next();
-        return Token.token_stringbeginning;
-    }
-    Token processBacksolidus_Z() throws ParseException {
-        this.next();
-        return Token.token_stringend2;
-    }
-    Token processBacksolidus_z() throws ParseException {
-        this.next();
-        return Token.token_stringend;
-    }
-    Token processBacksolidus_b() throws ParseException {
-        this.next();
-        return Token.token_wordedge;
-    }
-    Token processBacksolidus_B() throws ParseException {
-        this.next();
-        return Token.token_not_wordedge;
-    }
-    Token processBacksolidus_lt() throws ParseException {
-        this.next();
-        return Token.token_wordbeginning;
-    }
-    Token processBacksolidus_gt() throws ParseException {
-        this.next();
-        return Token.token_wordend;
-    }
-    Token processStar(Token tok) throws ParseException {
-        this.next();
-        if (this.read() == T_QUESTION) {
-            this.next();
-            return Token.createNGClosure(tok);
-        } else
-            return Token.createClosure(tok);
-    }
-    Token processPlus(Token tok) throws ParseException {
-        // X+ -> XX*
-        this.next();
-        if (this.read() == T_QUESTION) {
-            this.next();
-            return Token.createConcat(tok, Token.createNGClosure(tok));
-        } else
-            return Token.createConcat(tok, Token.createClosure(tok));
-    }
-    Token processQuestion(Token tok) throws ParseException {
-        // X? -> X|
-        this.next();
-        Token par = Token.createUnion();
-        if (this.read() == T_QUESTION) {
-            this.next();
-            par.addChild(Token.createEmpty());
-            par.addChild(tok);
-        } else {
-            par.addChild(tok);
-            par.addChild(Token.createEmpty());
-        }
-        return par;
-    }
-    boolean checkQuestion(int off) {
-        return off < this.regexlen && this.regex.charAt(off) == '?';
-    }
-    Token processParen() throws ParseException {
-        this.next();
-        int p = this.parennumber++;
-        Token tok = Token.createParen(this.parseRegex(), p);
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                            // Skips ')'
-        return tok;
-    }
-    Token processParen2() throws ParseException {
-        this.next();
-        Token tok = Token.createParen(this.parseRegex(), 0);
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                            // Skips ')'
-        return tok;
-    }
-    Token processCondition() throws ParseException {
-                                                // this.offset points the next of '('
-        if (this.offset+1 >= this.regexlen)  throw ex("parser.factor.4", this.offset);
-                                                // Parses a condition.
-        int refno = -1;
-        Token condition = null;
-        int ch = this.regex.charAt(this.offset);
-        if ('1' <= ch && ch <= '9') {
-            refno = ch-'0';
-            this.hasBackReferences = true;
-            if (this.references == null)  this.references = new Vector();
-            this.references.addElement(new ReferencePosition(refno, this.offset));
-            this.offset ++;
-            if (this.regex.charAt(this.offset) != ')')  throw ex("parser.factor.1", this.offset);
-            this.offset ++;
-        } else {
-            if (ch == '?')  this.offset --; // Points '('.
-            this.next();
-            condition = this.parseFactor();
-            switch (condition.type) {
-              case Token.LOOKAHEAD:
-              case Token.NEGATIVELOOKAHEAD:
-              case Token.LOOKBEHIND:
-              case Token.NEGATIVELOOKBEHIND:
-                break;
-              case Token.ANCHOR:
-                if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-                break;
-              default:
-                throw ex("parser.factor.5", this.offset);
-            }
-        }
-                                                // Parses yes/no-patterns.
-        this.next();
-        Token yesPattern = this.parseRegex();
-        Token noPattern = null;
-        if (yesPattern.type == Token.UNION) {
-            if (yesPattern.size() != 2)  throw ex("parser.factor.6", this.offset);
-            noPattern = yesPattern.getChild(1);
-            yesPattern = yesPattern.getChild(0);
-        }
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();
-        return Token.createCondition(refno, condition, yesPattern, noPattern);
-    }
-    Token processModifiers() throws ParseException {
-                                                // this.offset points the next of '?'.
-                                                // modifiers ::= [imsw]* ('-' [imsw]*)? ':'
-        int add = 0, mask = 0, ch = -1;
-        while (this.offset < this.regexlen) {
-            ch = this.regex.charAt(this.offset);
-            int v = REUtil.getOptionValue(ch);
-            if (v == 0)  break;                 // '-' or ':'?
-            add |= v;
-            this.offset ++;
-        }
-        if (this.offset >= this.regexlen)  throw ex("parser.factor.2", this.offset-1);
-        if (ch == '-') {
-            this.offset ++;
-            while (this.offset < this.regexlen) {
-                ch = this.regex.charAt(this.offset);
-                int v = REUtil.getOptionValue(ch);
-                if (v == 0)  break;             // ':'?
-                mask |= v;
-                this.offset ++;
-            }
-            if (this.offset >= this.regexlen)  throw ex("parser.factor.2", this.offset-1);
-        }
-        Token tok;
-        if (ch == ':') {
-            this.offset ++;
-            this.next();
-            tok = Token.createModifierGroup(this.parseRegex(), add, mask);
-            if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-            this.next();
-        } else if (ch == ')') {                 // such as (?-i)
-            this.offset ++;
-            this.next();
-            tok = Token.createModifierGroup(this.parseRegex(), add, mask);
-        } else
-            throw ex("parser.factor.3", this.offset);
-
-        return tok;
-    }
-    Token processIndependent() throws ParseException {
-        this.next();
-        Token tok = Token.createLook(Token.INDEPENDENT, this.parseRegex());
-        if (this.read() != T_RPAREN)  throw ex("parser.factor.1", this.offset-1);
-        this.next();                            // Skips ')'
-        return tok;
-    }
-    Token processBacksolidus_c() throws ParseException {
-        int ch2;                                // Must be in 0x0040-0x005f
-        if (this.offset >= this.regexlen
-            || ((ch2 = this.regex.charAt(this.offset++)) & 0xffe0) != 0x0040)
-            throw ex("parser.atom.1", this.offset-1);
-        this.next();
-        return Token.createChar(ch2-0x40);
-    }
-    Token processBacksolidus_C() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_i() throws ParseException {
-        Token tok = Token.createChar('i');
-        this.next();
-        return tok;
-    }
-    Token processBacksolidus_I() throws ParseException {
-        throw ex("parser.process.1", this.offset);
-    }
-    Token processBacksolidus_g() throws ParseException {
-        this.next();
-        return Token.getGraphemePattern();
-    }
-    Token processBacksolidus_X() throws ParseException {
-        this.next();
-        return Token.getCombiningCharacterSequence();
-    }
-    Token processBackreference() throws ParseException {
-        int refnum = this.chardata-'0';
-        Token tok = Token.createBackReference(refnum);
-        this.hasBackReferences = true;
-        if (this.references == null)  this.references = new Vector();
-        this.references.addElement(new ReferencePosition(refnum, this.offset-2));
-        this.next();
-        return tok;
-    }
-
-    // ----------------------------------------------------------------
-
-    /**
-     * factor ::= ('^' | '$' | '\A' | '\Z' | '\z' | '\b' | '\B' | '\<' | '\>'
-     *            | atom (('*' | '+' | '?' | minmax ) '?'? )?)
-     *            | '(?=' regex ')'  | '(?!' regex ')'  | '(?&lt;=' regex ')'  | '(?&lt;!' regex ')'
-     *            | '(?#' [^)]* ')'
-     * minmax ::= '{' min (',' max?)? '}'
-     * min ::= [0-9]+
-     * max ::= [0-9]+
-     */
-    Token parseFactor() throws ParseException {        
-        int ch = this.read();
-        Token tok;
-        switch (ch) {
-          case T_CARET:         return this.processCaret();
-          case T_DOLLAR:        return this.processDollar();
-          case T_LOOKAHEAD:     return this.processLookahead();
-          case T_NEGATIVELOOKAHEAD: return this.processNegativelookahead();
-          case T_LOOKBEHIND:    return this.processLookbehind();
-          case T_NEGATIVELOOKBEHIND: return this.processNegativelookbehind();
-
-          case T_COMMENT:
-            this.next();
-            return Token.createEmpty();
-
-          case T_BACKSOLIDUS:
-            switch (this.chardata) {
-              case 'A': return this.processBacksolidus_A();
-              case 'Z': return this.processBacksolidus_Z();
-              case 'z': return this.processBacksolidus_z();
-              case 'b': return this.processBacksolidus_b();
-              case 'B': return this.processBacksolidus_B();
-              case '<': return this.processBacksolidus_lt();
-              case '>': return this.processBacksolidus_gt();
-            }
-                                                // through down
-        }
-        tok = this.parseAtom();
-        ch = this.read();
-        switch (ch) {
-          case T_STAR:  return this.processStar(tok);
-          case T_PLUS:  return this.processPlus(tok);
-          case T_QUESTION: return this.processQuestion(tok);
-          case T_CHAR:
-            if (this.chardata == '{') {
-                                                // this.offset -> next of '{'
-                int off = this.offset;
-                int min = 0, max = -1;
-                if (off >= this.regexlen)  break;
-                ch = this.regex.charAt(off++);
-                if (ch != ',' && (ch < '0' || ch > '9'))  break;
-                if (ch != ',') {                // 0-9
-                    min = ch-'0';
-                    while (off < this.regexlen
-                           && (ch = this.regex.charAt(off++)) >= '0' && ch <= '9') {
-                        min = min*10 +ch-'0';
-                        ch = -1;
-                    }
-                    if (ch < 0)  break;
-                }
-                //if (off >= this.regexlen)  break;
-                max = min;
-                if (ch == ',') {
-                    if (off >= this.regexlen
-                        || ((ch = this.regex.charAt(off++)) < '0' || ch > '9')
-                        && ch != '}')
-                        break;
-                    if (ch == '}') {
-                        max = -1;           // {min,}
-                    } else {
-                        max = ch-'0';       // {min,max}
-                        while (off < this.regexlen
-                               && (ch = this.regex.charAt(off++)) >= '0'
-                               && ch <= '9') {
-                            max = max*10 +ch-'0';
-                            ch = -1;
-                        }
-                        if (ch < 0)  break;
-                        //if (min > max)
-                        //    throw new ParseException("parseFactor(): min > max: "+min+", "+max);
-                    }
-                }
-                if (ch != '}')  break;
-                                                // off -> next of '}'
-                if (this.checkQuestion(off)) {
-                    tok = Token.createNGClosure(tok);
-                    this.offset = off+1;
-                } else {
-                    tok = Token.createClosure(tok);
-                    this.offset = off;
-                }
-                tok.setMin(min);
-                tok.setMax(max);
-                //System.err.println("CLOSURE: "+min+", "+max);
-                this.next();
-            }
-        }
-        return tok;
-    }
-
-    /**
-     * atom ::= char | '.' | char-class | '(' regex ')' | '(?:' regex ')' | '\' [0-9]
-     *          | '\w' | '\W' | '\d' | '\D' | '\s' | '\S' | category-block
-     *          | '(?>' regex ')'
-     * char ::= '\\' | '\' [efnrt] | bmp-code | character-1
-     */
-    Token parseAtom() throws ParseException {
-        int ch = this.read();
-        Token tok = null;
-        switch (ch) {
-          case T_LPAREN:        return this.processParen();
-          case T_LPAREN2:       return this.processParen2(); // '(?:'
-          case T_CONDITION:     return this.processCondition(); // '(?('
-          case T_MODIFIERS:     return this.processModifiers(); // (?modifiers ... )
-          case T_INDEPENDENT:   return this.processIndependent();
-          case T_DOT:
-            this.next();                    // Skips '.'
-            tok = Token.token_dot;
-            break;
-
-            /**
-             * char-class ::= '[' ( '^'? range ','?)+ ']'
-             * range ::= '\d' | '\w' | '\s' | category-block | range-char
-             *           | range-char '-' range-char
-             * range-char ::= '\[' | '\]' | '\\' | '\' [,-efnrtv] | bmp-code | character-2
-             * bmp-char ::= '\' 'u' [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]
-             */
-          case T_LBRACKET:      return this.parseCharacterClass(true);
-          case T_SET_OPERATIONS: return this.parseSetOperations();
-
-          case T_BACKSOLIDUS:
-            switch (this.chardata) {
-              case 'd':  case 'D':
-              case 'w':  case 'W':
-              case 's':  case 'S':
-                tok = this.getTokenForShorthand(this.chardata);
-                this.next();
-                return tok;
-
-              case 'e':  case 'f':  case 'n':  case 'r':
-              case 't':  case 'u':  case 'v':  case 'x':
-                {
-                    int ch2 = this.decodeEscaped();
-                    if (ch2 < 0x10000) {
-                        tok = Token.createChar(ch2);
-                    } else {
-                        tok = Token.createString(REUtil.decomposeToSurrogates(ch2));
-                    }
-                }
-                break;
-
-              case 'c': return this.processBacksolidus_c();
-              case 'C': return this.processBacksolidus_C();
-              case 'i': return this.processBacksolidus_i();
-              case 'I': return this.processBacksolidus_I();
-              case 'g': return this.processBacksolidus_g();
-              case 'X': return this.processBacksolidus_X();
-              case '1':  case '2':  case '3':  case '4':
-              case '5':  case '6':  case '7':  case '8':  case '9':
-                return this.processBackreference();
-
-              case 'P':
-              case 'p':
-                int pstart = this.offset;
-                tok = processBacksolidus_pP(this.chardata);
-                if (tok == null)  throw this.ex("parser.atom.5", pstart);
-                break;
-
-              default:
-                tok = Token.createChar(this.chardata);
-            }
-            this.next();
-            break;
-
-          case T_CHAR:
-            tok = Token.createChar(this.chardata);
-            this.next();
-            break;
-
-          default:
-            throw this.ex("parser.atom.4", this.offset-1);
-        }
-        return tok;
-    }
-
-    protected RangeToken processBacksolidus_pP(int c) throws ParseException {
-        boolean positive = c == 'p';
-        this.next();
-        if (this.read() != T_CHAR)  throw this.ex("parser.atom.2", this.offset-1);
-        RangeToken tok;
-        switch (this.chardata) {
-          case 'L':                             // Letter
-            tok = Token.getRange("L", positive);  break;
-          case 'M':                             // Mark
-            tok = Token.getRange("M", positive);  break;
-          case 'N':                             // Number
-            tok = Token.getRange("N", positive);  break;
-          case 'Z':                             // Separator
-            tok = Token.getRange("Z", positive);  break;
-          case 'C':                             // Other
-            tok = Token.getRange("C", positive);  break;
-          case 'P':                             // Punctuation
-            tok = Token.getRange("P", positive);  break;
-          case 'S':                             // Symbol
-            tok = Token.getRange("S", positive);  break;
-          case '{':
-            // this.offset points the next of '{'.
-            //pstart = this.offset;
-            int namestart = this.offset;
-            int nameend = this.regex.indexOf('}', namestart);
-            if (nameend < 0)  throw this.ex("parser.atom.3", this.offset);
-            this.offset = nameend+1;
-            tok = Token.getRange(this.regex.substring(namestart, nameend), positive);
-            /*
-              if (this.isSet(RegularExpression.IGNORE_CASE))
-              tok = RangeToken.createCaseInsensitiveToken(tok);
-            */
-            break;
-
-          default:
-            throw this.ex("parser.atom.2", this.offset-1);
-        }
-        return tok;
-    }
-
-    int processCIinCharacterClass(RangeToken tok, int c) {
-        return this.decodeEscaped();
-    }
-
-    /**
-     * char-class ::= '[' ( '^'? range ','?)+ ']'
-     * range ::= '\d' | '\w' | '\s' | category-block | range-char
-     *           | range-char '-' range-char
-     * range-char ::= '\[' | '\]' | '\\' | '\' [,-efnrtv] | bmp-code | character-2
-     * bmp-code ::= '\' 'u' [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]
-     */
-    protected RangeToken parseCharacterClass(boolean useNrange) throws ParseException {
-        this.setContext(S_INBRACKETS);
-        this.next();                            // '['
-        boolean nrange = false;
-        RangeToken base = null;
-        RangeToken tok;
-        if (this.read() == T_CHAR && this.chardata == '^') {
-            nrange = true;
-            this.next();                        // '^'
-            if (useNrange) {
-                tok = Token.createNRange();
-            } else {
-                base = Token.createRange();
-                base.addRange(0, Token.UTF16_MAX);
-                tok = Token.createRange();
-            }
-        } else {
-            tok = Token.createRange();
-        }
-        int type;
-        boolean firstloop = true;
-        while ((type = this.read()) != T_EOF) {
-            if (type == T_CHAR && this.chardata == ']' && !firstloop)
-                break;
-            firstloop = false;
-            int c = this.chardata;
-            boolean end = false;
-            if (type == T_BACKSOLIDUS) {
-                switch (c) {
-                  case 'd':  case 'D':
-                  case 'w':  case 'W':
-                  case 's':  case 'S':
-                    tok.mergeRanges(this.getTokenForShorthand(c));
-                    end = true;
-                    break;
-
-                  case 'i':  case 'I':
-                  case 'c':  case 'C':
-                    c = this.processCIinCharacterClass(tok, c);
-                    if (c < 0)  end = true;
-                    break;
-                    
-                  case 'p':
-                  case 'P':
-                    int pstart = this.offset;
-                    RangeToken tok2 = this.processBacksolidus_pP(c);
-                    if (tok2 == null)  throw this.ex("parser.atom.5", pstart);
-                    tok.mergeRanges(tok2);
-                    end = true;
-                    break;
-
-                  default:
-                    c = this.decodeEscaped();
-                } // \ + c
-            } // backsolidus
-                                                // POSIX Character class such as [:alnum:]
-            else if (type == T_POSIX_CHARCLASS_START) {
-                int nameend = this.regex.indexOf(':', this.offset);
-                if (nameend < 0) throw this.ex("parser.cc.1", this.offset);
-                boolean positive = true;
-                if (this.regex.charAt(this.offset) == '^') {
-                    this.offset ++;
-                    positive = false;
-                }
-                String name = this.regex.substring(this.offset, nameend);
-                RangeToken range = Token.getRange(name, positive);
-                if (range == null)  throw this.ex("parser.cc.3", this.offset);
-                tok.mergeRanges(range);
-                end = true;
-                if (nameend+1 >= this.regexlen || this.regex.charAt(nameend+1) != ']')
-                    throw this.ex("parser.cc.1", nameend);
-                this.offset = nameend+2;
-            }
-            this.next();
-            if (!end) {                         // if not shorthands...
-                if (this.read() != T_CHAR || this.chardata != '-') { // Here is no '-'.
-                    tok.addRange(c, c);
-                } else {
-                    this.next(); // Skips '-'
-                    if ((type = this.read()) == T_EOF)  throw this.ex("parser.cc.2", this.offset);
-                    if (type == T_CHAR && this.chardata == ']') {
-                        tok.addRange(c, c);
-                        tok.addRange('-', '-');
-                    } else {
-                        int rangeend = this.chardata;
-                        if (type == T_BACKSOLIDUS)
-                            rangeend = this.decodeEscaped();
-                        this.next();
-                        tok.addRange(c, rangeend);
-                    }
-                }
-            }
-            if (this.isSet(RegularExpression.SPECIAL_COMMA)
-                && this.read() == T_CHAR && this.chardata == ',')
-                this.next();
-        }
-        if (this.read() == T_EOF)
-            throw this.ex("parser.cc.2", this.offset);
-        if (!useNrange && nrange) {
-            base.subtractRanges(tok);
-            tok = base;
-        }
-        tok.sortRanges();
-        tok.compactRanges();
-        //tok.dumpRanges();
-        /*
-        if (this.isSet(RegularExpression.IGNORE_CASE))
-            tok = RangeToken.createCaseInsensitiveToken(tok);
-        */
-        this.setContext(S_NORMAL);
-        this.next();                    // Skips ']'
-
-        return tok;
-    }
-    private RangeToken parseCharacterClass_old(boolean useNrange) throws ParseException {
-        this.setContext(S_INBRACKETS);
-        this.next();                            // '['
-        boolean nrange = false;
-        RangeToken base = null;
-        RangeToken tok;
-        if (this.read() == T_CHAR && this.chardata == '^') {
-            nrange = true;
-            this.next();                        // '^'
-            if (useNrange) {
-                tok = Token.createNRange();
-            } else {
-                base = Token.createRange();
-                base.addRange(0, Token.UTF16_MAX);
-                tok = Token.createRange();
-            }
-        } else {
-            tok = Token.createRange();
-        }
-        int type;
-        while ((type = this.read()) != T_EOF
-               && !(type == T_CHAR && this.chardata == ']')) {
-            int c = this.chardata;
-            /*
-            if (type == T_CHAR && c == '^') {
-                this.next();
-                type = this.read();
-                c = this.chardata;
-                if (type == T_EOF)  break;
-
-                nrange = !nrange;
-                if (nrange)
-                    tok = Token.createRange();
-                else {
-                    base.subtractRanges(tok);
-                    tok = base;
-                }
-            }
-            */
-            boolean end = false;
-            if (type == T_BACKSOLIDUS) {
-                switch (c) {
-                  case 'd':  case 'D':
-                  case 'w':  case 'W':
-                  case 's':  case 'S':
-                    tok.mergeRanges(this.getTokenForShorthand(c));
-                    end = true;
-                    break;
-
-                  case 'i':  case 'I':
-                  case 'c':  case 'C':
-                    c = this.processCIinCharacterClass(tok, c);
-                    if (c < 0)  end = true;
-                    break;
-                    
-                  case 'p':
-                  case 'P':
-                    boolean positive = c ==  'p';
-                    int pstart = this.offset;
-                    this.next();
-                    if (this.read() != T_CHAR)  throw ex("parser.atom.2", this.offset-1);
-                    RangeToken tok2 = null;
-                    switch (this.chardata) {
-                      case 'L':                 // Letter
-                        tok2 = Token.getRange("L", positive);  break;
-                      case 'M':                 // Mark
-                        tok2 = Token.getRange("M", positive);  break;
-                      case 'N':                 // Number
-                        tok2 = Token.getRange("N", positive);  break;
-                      case 'Z':                 // Separator
-                        tok2 = Token.getRange("Z", positive);  break;
-                      case 'C':                 // Other
-                        tok2 = Token.getRange("C", positive);  break;
-                      case 'P':                 // Punctuation
-                        tok2 = Token.getRange("P", positive);  break;
-                      case 'S':                 // Symbol
-                        tok2 = Token.getRange("S", positive);  break;
-                      case '{':
-                        // this.offset points the next of '{'.
-                        pstart = this.offset;
-                        int namestart = this.offset;
-                        int nameend = this.regex.indexOf('}', namestart);
-                        if (nameend < 0)  throw ex("parser.atom.3", this.offset);
-                        this.offset = nameend+1;
-                        tok2 = Token.getRange(this.regex.substring(namestart, nameend), positive);
-                        break;
-
-                      default:
-                        throw ex("parser.atom.2", this.offset-1);
-                    }
-                    if (tok2 == null)  throw ex("parser.atom.5", pstart);
-                    tok.mergeRanges(tok2);
-                    end = true;
-                    break;
-
-                  default:
-                    c = this.decodeEscaped();
-                } // \ + c
-            } // backsolidus
-                                                // POSIX Character class such as [:alnum:]
-            else if (type == T_POSIX_CHARCLASS_START) {
-                int nameend = this.regex.indexOf(':', this.offset);
-                if (nameend < 0) throw ex("parser.cc.1", this.offset);
-                String name = this.regex.substring(this.offset, nameend);
-                RangeToken range = Token.getRange(name, true);
-                if (range == null)  throw ex("parser.cc.3", this.offset);
-                tok.mergeRanges(range);
-                end = true;
-                if (nameend+1 >= this.regexlen || this.regex.charAt(nameend+1) != ']')
-                    throw ex("parser.cc.1", nameend);
-                this.offset = nameend+2;
-            }
-            this.next();
-            if (!end) {
-                if (this.read() != T_CHAR || this.chardata != '-') { // Here is no '-'.
-                    tok.addRange(c, c);
-                } else {
-                    this.next(); // Skips '-'
-                    if ((type = this.read()) == T_EOF) throw ex("parser.cc.2", this.offset);
-                    int rangeend = this.chardata;
-                    if (type == T_BACKSOLIDUS)
-                        rangeend = this.decodeEscaped();
-                    this.next();
-                    tok.addRange(c, rangeend);
-                }
-            }
-            if (this.read() == T_CHAR && this.chardata == ',')
-                this.next();
-        }
-        if (this.read() == T_EOF)
-            throw ex("parser.cc.2", this.offset);
-        if (!useNrange && nrange) {
-            base.subtractRanges(tok);
-            tok = base;
-        }
-        tok.sortRanges();
-        tok.compactRanges();
-        //tok.dumpRanges();
-        /*
-        if (this.isSet(RegularExpression.IGNORE_CASE))
-            tok = RangeToken.createCaseInsensitiveToken(tok);
-        */
-        this.setContext(S_NORMAL);
-        this.next();                    // Skips ']'
-
-        return tok;
-    }
-
-    /**
-     * '(?[' ... ']' (('-' | '+' | '&') '[' ... ']')? ')'
-     */
-    protected RangeToken parseSetOperations() throws ParseException {
-        RangeToken tok = this.parseCharacterClass(false);
-        int type;
-        while ((type = this.read()) != T_RPAREN) {
-            int ch = this.chardata;
-            if (type == T_CHAR && (ch == '-' || ch == '&')
-                || type == T_PLUS) {
-                this.next();
-                if (this.read() != T_LBRACKET) throw ex("parser.ope.1", this.offset-1);
-                RangeToken t2 = this.parseCharacterClass(false);
-                if (type == T_PLUS)
-                    tok.mergeRanges(t2);
-                else if (ch == '-')
-                    tok.subtractRanges(t2);
-                else if (ch == '&')
-                    tok.intersectRanges(t2);
-                else
-                    throw new RuntimeException("ASSERT");
-            } else {
-                throw ex("parser.ope.2", this.offset-1);
-            }
-        }
-        this.next();
-        return tok;
-    }
-
-    Token getTokenForShorthand(int ch) {
-        Token tok;
-        switch (ch) {
-          case 'd':
-            tok = this.isSet(RegularExpression.USE_UNICODE_CATEGORY)
-                ? Token.getRange("Nd", true) : Token.token_0to9;
-            break;
-          case 'D':
-            tok = this.isSet(RegularExpression.USE_UNICODE_CATEGORY)
-                ? Token.getRange("Nd", false) : Token.token_not_0to9;
-            break;
-          case 'w':
-            tok = this.isSet(RegularExpression.USE_UNICODE_CATEGORY)
-                ? Token.getRange("IsWord", true) : Token.token_wordchars;
-            break;
-          case 'W':
-            tok = this.isSet(RegularExpression.USE_UNICODE_CATEGORY)
-                ? Token.getRange("IsWord", false) : Token.token_not_wordchars;
-            break;
-          case 's':
-            tok = this.isSet(RegularExpression.USE_UNICODE_CATEGORY)
-                ? Token.getRange("IsSpace", true) : Token.token_spaces;
-            break;
-          case 'S':
-            tok = this.isSet(RegularExpression.USE_UNICODE_CATEGORY)
-                ? Token.getRange("IsSpace", false) : Token.token_not_spaces;
-            break;
-
-          default:
-            throw new RuntimeException("Internal Error: shorthands: \\u"+Integer.toString(ch, 16));
-        }
-        return tok;
-    }
-
-    /**
-     */
-    int decodeEscaped() throws ParseException {
-        if (this.read() != T_BACKSOLIDUS)  throw ex("parser.next.1", this.offset-1);
-        int c = this.chardata;
-        switch (c) {
-          case 'e':  c = 0x1b;  break; // ESCAPE U+001B
-          case 'f':  c = '\f';  break; // FORM FEED U+000C
-          case 'n':  c = '\n';  break; // LINE FEED U+000A
-          case 'r':  c = '\r';  break; // CRRIAGE RETURN U+000D
-          case 't':  c = '\t';  break; // HORIZONTAL TABULATION U+0009
-          //case 'v':  c = 0x0b;  break; // VERTICAL TABULATION U+000B
-          case 'x':
-            this.next();
-            if (this.read() != T_CHAR)  throw ex("parser.descape.1", this.offset-1);
-            if (this.chardata == '{') {
-                int v1 = 0;
-                int uv = 0;
-                do {
-                    this.next();
-                    if (this.read() != T_CHAR)  throw ex("parser.descape.1", this.offset-1);
-                    if ((v1 = hexChar(this.chardata)) < 0)
-                        break;
-                    if (uv > uv*16) throw ex("parser.descape.2", this.offset-1);
-                    uv = uv*16+v1;
-                } while (true);
-                if (this.chardata != '}')  throw ex("parser.descape.3", this.offset-1);
-                if (uv > Token.UTF16_MAX)  throw ex("parser.descape.4", this.offset-1);
-                c = uv;
-            } else {
-                int v1 = 0;
-                if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                    throw ex("parser.descape.1", this.offset-1);
-                int uv = v1;
-                this.next();
-                if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                    throw ex("parser.descape.1", this.offset-1);
-                uv = uv*16+v1;
-                c = uv;
-            }
-            break;
-
-          case 'u':
-            int v1 = 0;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            int uv = v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            c = uv;
-            break;
-
-          case 'v':
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            this.next();
-            if (this.read() != T_CHAR || (v1 = hexChar(this.chardata)) < 0)
-                throw ex("parser.descape.1", this.offset-1);
-            uv = uv*16+v1;
-            if (uv > Token.UTF16_MAX)  throw ex("parser.descappe.4", this.offset-1);
-            c = uv;
-            break;
-          case 'A':
-          case 'Z':
-          case 'z':
-            throw ex("parser.descape.5", this.offset-2);
-          default:
-        }
-        return c;
-    }
-
-    static private final int hexChar(int ch) {
-        if (ch < '0')  return -1;
-        if (ch > 'f')  return -1;
-        if (ch <= '9')  return ch-'0';
-        if (ch < 'A')  return -1;
-        if (ch <= 'F')  return ch-'A'+10;
-        if (ch < 'a')  return -1;
-        return ch-'a'+10;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/RegularExpression.java b/src/org/apache/xerces/impl/xpath/regex/RegularExpression.java
deleted file mode 100644
index c738071..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/RegularExpression.java
+++ /dev/null
@@ -1,3191 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.text.CharacterIterator;
-
-/**
- * A regular expression matching engine using Non-deterministic Finite Automaton (NFA).
- * This engine does not conform to the POSIX regular expression.
- *
- * <hr width="50%">
- * <h3>How to use</h3>
- *
- * <dl>
- *   <dt>A. Standard way
- *   <dd>
- * <pre>
- * RegularExpression re = new RegularExpression(<var>regex</var>);
- * if (re.matches(text)) { ... }
- * </pre>
- *
- *   <dt>B. Capturing groups
- *   <dd>
- * <pre>
- * RegularExpression re = new RegularExpression(<var>regex</var>);
- * Match match = new Match();
- * if (re.matches(text, match)) {
- *     ... // You can refer captured texts with methods of the <code>Match</code> class.
- * }
- * </pre>
- *
- * </dl>
- *
- * <h4>Case-insensitive matching</h4>
- * <pre>
- * RegularExpression re = new RegularExpression(<var>regex</var>, "i");
- * if (re.matches(text) >= 0) { ...}
- * </pre>
- *
- * <h4>Options</h4>
- * <p>You can specify options to <a href="#RegularExpression(java.lang.String, java.lang.String)"><code>RegularExpression(</code><var>regex</var><code>, </code><var>options</var><code>)</code></a>
- *    or <a href="#setPattern(java.lang.String, java.lang.String)"><code>setPattern(</code><var>regex</var><code>, </code><var>options</var><code>)</code></a>.
- *    This <var>options</var> parameter consists of the following characters.
- * </p>
- * <dl>
- *   <dt><a name="I_OPTION"><code>"i"</code></a>
- *   <dd>This option indicates case-insensitive matching.
- *   <dt><a name="M_OPTION"><code>"m"</code></a>
- *   <dd class="REGEX"><kbd>^</kbd> and <kbd>$</kbd> consider the EOL characters within the text.
- *   <dt><a name="S_OPTION"><code>"s"</code></a>
- *   <dd class="REGEX"><kbd>.</kbd> matches any one character.
- *   <dt><a name="U_OPTION"><code>"u"</code></a>
- *   <dd class="REGEX">Redefines <Kbd>\d \D \w \W \s \S \b \B \&lt; \></kbd> as becoming to Unicode.
- *   <dt><a name="W_OPTION"><code>"w"</code></a>
- *   <dd class="REGEX">By this option, <kbd>\b \B \&lt; \></kbd> are processed with the method of
- *      'Unicode Regular Expression Guidelines' Revision 4.
- *      When "w" and "u" are specified at the same time,
- *      <kbd>\b \B \&lt; \></kbd> are processed for the "w" option.
- *   <dt><a name="COMMA_OPTION"><code>","</code></a>
- *   <dd>The parser treats a comma in a character class as a range separator.
- *      <kbd class="REGEX">[a,b]</kbd> matches <kbd>a</kbd> or <kbd>,</kbd> or <kbd>b</kbd> without this option.
- *      <kbd class="REGEX">[a,b]</kbd> matches <kbd>a</kbd> or <kbd>b</kbd> with this option.
- *
- *   <dt><a name="X_OPTION"><code>"X"</code></a>
- *   <dd class="REGEX">
- *       By this option, the engine confoms to <a href="http://www.w3.org/TR/2000/WD-xmlschema-2-20000407/#regexs">XML Schema: Regular Expression</a>.
- *       The <code>match()</code> method does not do subsring matching
- *       but entire string matching.
- *
- * </dl>
- * 
- * <hr width="50%">
- * <h3>Syntax</h3>
- * <table border="1" bgcolor="#ddeeff">
- *   <tr>
- *    <td>
- *     <h4>Differences from the Perl 5 regular expression</h4>
- *     <ul>
- *      <li>There is 6-digit hexadecimal character representation  (<kbd>\u005cv</kbd><var>HHHHHH</var>.)
- *      <li>Supports subtraction, union, and intersection operations for character classes.
- *      <li>Not supported: <kbd>\</kbd><var>ooo</var> (Octal character representations),
- *          <Kbd>\G</kbd>, <kbd>\C</kbd>, <kbd>\l</kbd><var>c</var>,
- *          <kbd>\u005cu</kbd><var>c</var>, <kbd>\L</kbd>, <kbd>\U</kbd>,
- *          <kbd>\E</kbd>, <kbd>\Q</kbd>, <kbd>\N{</kbd><var>name</var><kbd>}</kbd>,
- *          <Kbd>(?{<kbd><var>code</var><kbd>})</kbd>, <Kbd>(??{<kbd><var>code</var><kbd>})</kbd>
- *     </ul>
- *    </td>
- *   </tr>
- * </table>
- *
- * <P>Meta characters are `<KBD>. * + ? { [ ( ) | \ ^ $</KBD>'.</P>
- * <ul>
- *   <li>Character
- *     <dl>
- *       <dt class="REGEX"><kbd>.</kbd> (A period)
- *       <dd>Matches any one character except the following characters.
- *       <dd>LINE FEED (U+000A), CARRIAGE RETURN (U+000D),
- *           PARAGRAPH SEPARATOR (U+2029), LINE SEPARATOR (U+2028)
- *       <dd>This expression matches one code point in Unicode. It can match a pair of surrogates.
- *       <dd>When <a href="#S_OPTION">the "s" option</a> is specified,
- *           it matches any character including the above four characters.
- *
- *       <dt class="REGEX"><Kbd>\e \f \n \r \t</kbd>
- *       <dd>Matches ESCAPE (U+001B), FORM FEED (U+000C), LINE FEED (U+000A),
- *           CARRIAGE RETURN (U+000D), HORIZONTAL TABULATION (U+0009)
- *
- *       <dt class="REGEX"><kbd>\c</kbd><var>C</var>
- *       <dd>Matches a control character.
- *           The <var>C</var> must be one of '<kbd>@</kbd>', '<kbd>A</kbd>'-'<kbd>Z</kbd>',
- *           '<kbd>[</kbd>', '<kbd>\u005c</kbd>', '<kbd>]</kbd>', '<kbd>^</kbd>', '<kbd>_</kbd>'.
- *           It matches a control character of which the character code is less than
- *           the character code of the <var>C</var> by 0x0040.
- *       <dd class="REGEX">For example, a <kbd>\cJ</kbd> matches a LINE FEED (U+000A),
- *           and a <kbd>\c[</kbd> matches an ESCAPE (U+001B).
- *
- *       <dt class="REGEX">a non-meta character
- *       <dd>Matches the character.
- *
- *       <dt class="REGEX"><KBD>\</KBD> + a meta character
- *       <dd>Matches the meta character.
- *
- *       <dt class="REGEX"><kbd>\u005cx</kbd><var>HH</var> <kbd>\u005cx{</kbd><var>HHHH</var><kbd>}</kbd>
- *       <dd>Matches a character of which code point is <var>HH</var> (Hexadecimal) in Unicode.
- *           You can write just 2 digits for <kbd>\u005cx</kbd><var>HH</var>, and
- *           variable length digits for <kbd>\u005cx{</kbd><var>HHHH</var><kbd>}</kbd>.
- *
- *       <!--
- *       <dt class="REGEX"><kbd>\u005cu</kbd><var>HHHH</var>
- *       <dd>Matches a character of which code point is <var>HHHH</var> (Hexadecimal) in Unicode.
- *       -->
- *
- *       <dt class="REGEX"><kbd>\u005cv</kbd><var>HHHHHH</var>
- *       <dd>Matches a character of which code point is <var>HHHHHH</var> (Hexadecimal) in Unicode.
- *
- *       <dt class="REGEX"><kbd>\g</kbd>
- *       <dd>Matches a grapheme.
- *       <dd class="REGEX">It is equivalent to <kbd>(?[\p{ASSIGNED}]-[\p{M}\p{C}])?(?:\p{M}|[\x{094D}\x{09CD}\x{0A4D}\x{0ACD}\x{0B3D}\x{0BCD}\x{0C4D}\x{0CCD}\x{0D4D}\x{0E3A}\x{0F84}]\p{L}|[\x{1160}-\x{11A7}]|[\x{11A8}-\x{11FF}]|[\x{FF9E}\x{FF9F}])*</kbd>
- *
- *       <dt class="REGEX"><kbd>\X</kbd>
- *       <dd class="REGEX">Matches a combining character sequence.
- *       It is equivalent to <kbd>(?:\PM\pM*)</kbd>
- *     </dl>
- *   </li>
- *
- *   <li>Character class
- *     <dl>
-+ *       <dt class="REGEX"><kbd>[</kbd><var>R<sub>1</sub></var><var>R<sub>2</sub></var><var>...</var><var>R<sub>n</sub></var><kbd>]</kbd> (without <a href="#COMMA_OPTION">"," option</a>)
-+ *       <dt class="REGEX"><kbd>[</kbd><var>R<sub>1</sub></var><kbd>,</kbd><var>R<sub>2</sub></var><kbd>,</kbd><var>...</var><kbd>,</kbd><var>R<sub>n</sub></var><kbd>]</kbd> (with <a href="#COMMA_OPTION">"," option</a>)
- *       <dd>Positive character class.  It matches a character in ranges.
- *       <dd><var>R<sub>n</sub></var>:
- *       <ul>
- *         <li class="REGEX">A character (including <Kbd>\e \f \n \r \t</kbd> <kbd>\u005cx</kbd><var>HH</var> <kbd>\u005cx{</kbd><var>HHHH</var><kbd>}</kbd> <!--kbd>\u005cu</kbd><var>HHHH</var--> <kbd>\u005cv</kbd><var>HHHHHH</var>)
- *             <p>This range matches the character.
- *         <li class="REGEX"><var>C<sub>1</sub></var><kbd>-</kbd><var>C<sub>2</sub></var>
- *             <p>This range matches a character which has a code point that is >= <var>C<sub>1</sub></var>'s code point and &lt;= <var>C<sub>2</sub></var>'s code point.
-+ *         <li class="REGEX">A POSIX character class: <Kbd>[:alpha:] [:alnum:] [:ascii:] [:cntrl:] [:digit:] [:graph:] [:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:]</kbd>,
-+ *             and negative POSIX character classes in Perl like <kbd>[:^alpha:]</kbd>
- *             <p>...
- *         <li class="REGEX"><kbd>\d \D \s \S \w \W \p{</kbd><var>name</var><kbd>} \P{</kbd><var>name</var><kbd>}</kbd>
- *             <p>These expressions specifies the same ranges as the following expressions.
- *       </ul>
- *       <p class="REGEX">Enumerated ranges are merged (union operation).
- *          <kbd>[a-ec-z]</kbd> is equivalent to <kbd>[a-z]</kbd>
- *
- *       <dt class="REGEX"><kbd>[^</kbd><var>R<sub>1</sub></var><var>R<sub>2</sub></var><var>...</var><var>R<sub>n</sub></var><kbd>]</kbd> (without a <a href="#COMMA_OPTION">"," option</a>)
- *       <dt class="REGEX"><kbd>[^</kbd><var>R<sub>1</sub></var><kbd>,</kbd><var>R<sub>2</sub></var><kbd>,</kbd><var>...</var><kbd>,</kbd><var>R<sub>n</sub></var><kbd>]</kbd> (with a <a href="#COMMA_OPTION">"," option</a>)
- *       <dd>Negative character class.  It matches a character not in ranges.
- *
- *       <dt class="REGEX"><kbd>(?[</kbd><var>ranges</var><kbd>]</kbd><var>op</var><kbd>[</kbd><var>ranges</var><kbd>]</kbd><var>op</var><kbd>[</kbd><var>ranges</var><kbd>]</kbd> ... <Kbd>)</kbd>
- *       (<var>op</var> is <kbd>-</kbd> or <kbd>+</kbd> or <kbd>&</kbd>.)
- *       <dd>Subtraction or union or intersection for character classes.
- *       <dd class="REGEX">For exmaple, <kbd>(?[A-Z]-[CF])</kbd> is equivalent to <kbd>[A-BD-EG-Z]</kbd>, and <kbd>(?[0x00-0x7f]-[K]&[\p{Lu}])</kbd> is equivalent to <kbd>[A-JL-Z]</kbd>.
- *       <dd>The result of this operations is a <u>positive character class</u>
- *           even if an expression includes any negative character classes.
- *           You have to take care on this in case-insensitive matching.
- *           For instance, <kbd>(?[^b])</kbd> is equivalent to <kbd>[\x00-ac-\x{10ffff}]</kbd>,
- *           which is equivalent to <kbd>[^b]</kbd> in case-sensitive matching.
- *           But, in case-insensitive matching, <kbd>(?[^b])</kbd> matches any character because
- *           it includes '<kbd>B</kbd>' and '<kbd>B</kbd>' matches '<kbd>b</kbd>'
- *           though <kbd>[^b]</kbd> is processed as <kbd>[^Bb]</kbd>.
- *
- *       <dt class="REGEX"><kbd>[</kbd><var>R<sub>1</sub>R<sub>2</sub>...</var><kbd>-[</kbd><var>R<sub>n</sub>R<sub>n+1</sub>...</var><kbd>]]</kbd> (with an <a href="#X_OPTION">"X" option</a>)</dt>
- *       <dd>Character class subtraction for the XML Schema.
- *           You can use this syntax when you specify an <a href="#X_OPTION">"X" option</a>.
- *           
- *       <dt class="REGEX"><kbd>\d</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[0-9]</kbd>.
- *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>\p{Nd}</kbd></span>.
- *
- *       <dt class="REGEX"><kbd>\D</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[^0-9]</kbd>
- *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>\P{Nd}</kbd></span>.
- *
- *       <dt class="REGEX"><kbd>\s</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[ \f\n\r\t]</kbd>
- *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[ \f\n\r\t\p{Z}]</kbd></span>.
- *
- *       <dt class="REGEX"><kbd>\S</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[^ \f\n\r\t]</kbd>
- *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[^ \f\n\r\t\p{Z}]</kbd></span>.
- *
- *       <dt class="REGEX"><kbd>\w</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[a-zA-Z0-9_]</kbd>
- *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[\p{Lu}\p{Ll}\p{Lo}\p{Nd}_]</kbd></span>.
- *
- *       <dt class="REGEX"><kbd>\W</kbd>
- *       <dd class="REGEX">Equivalent to <kbd>[^a-zA-Z0-9_]</kbd>
- *       <dd>When <a href="#U_OPTION">a "u" option</a> is set, it is equivalent to
- *           <span class="REGEX"><kbd>[^\p{Lu}\p{Ll}\p{Lo}\p{Nd}_]</kbd></span>.
- *
- *       <dt class="REGEX"><kbd>\p{</kbd><var>name</var><kbd>}</kbd>
- *       <dd>Matches one character in the specified General Category (the second field in <a href="ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt"><kbd>UnicodeData.txt</kbd></a>) or the specified <a href="ftp://ftp.unicode.org/Public/UNIDATA/Blocks.txt">Block</a>.
- *       The following names are available:
- *       <dl>
- *         <dt>Unicode General Categories:
- *         <dd><kbd>
- *       L, M, N, Z, C, P, S, Lu, Ll, Lt, Lm, Lo, Mn, Me, Mc, Nd, Nl, No, Zs, Zl, Zp,
- *       Cc, Cf, Cn, Co, Cs, Pd, Ps, Pe, Pc, Po, Sm, Sc, Sk, So,
- *         </kbd>
- *         <dd>(Currently the Cn category includes U+10000-U+10FFFF characters)
- *         <dt>Unicode Blocks:
- *         <dd><kbd>
- *       Basic Latin, Latin-1 Supplement, Latin Extended-A, Latin Extended-B,
- *       IPA Extensions, Spacing Modifier Letters, Combining Diacritical Marks, Greek,
- *       Cyrillic, Armenian, Hebrew, Arabic, Devanagari, Bengali, Gurmukhi, Gujarati,
- *       Oriya, Tamil, Telugu, Kannada, Malayalam, Thai, Lao, Tibetan, Georgian,
- *       Hangul Jamo, Latin Extended Additional, Greek Extended, General Punctuation,
- *       Superscripts and Subscripts, Currency Symbols, Combining Marks for Symbols,
- *       Letterlike Symbols, Number Forms, Arrows, Mathematical Operators,
- *       Miscellaneous Technical, Control Pictures, Optical Character Recognition,
- *       Enclosed Alphanumerics, Box Drawing, Block Elements, Geometric Shapes,
- *       Miscellaneous Symbols, Dingbats, CJK Symbols and Punctuation, Hiragana,
- *       Katakana, Bopomofo, Hangul Compatibility Jamo, Kanbun,
- *       Enclosed CJK Letters and Months, CJK Compatibility, CJK Unified Ideographs,
- *       Hangul Syllables, High Surrogates, High Private Use Surrogates, Low Surrogates,
- *       Private Use, CJK Compatibility Ideographs, Alphabetic Presentation Forms,
- *       Arabic Presentation Forms-A, Combining Half Marks, CJK Compatibility Forms,
- *       Small Form Variants, Arabic Presentation Forms-B, Specials,
- *       Halfwidth and Fullwidth Forms
- *         </kbd>
- *         <dt>Others:
- *         <dd><kbd>ALL</kbd> (Equivalent to <kbd>[\u005cu0000-\u005cv10FFFF]</kbd>)
- *         <dd><kbd>ASSGINED</kbd> (<kbd>\p{ASSIGNED}</kbd> is equivalent to <kbd>\P{Cn}</kbd>)
- *         <dd><kbd>UNASSGINED</kbd>
- *             (<kbd>\p{UNASSIGNED}</kbd> is equivalent to <kbd>\p{Cn}</kbd>)
- *       </dl>
- *
- *       <dt class="REGEX"><kbd>\P{</kbd><var>name</var><kbd>}</kbd>
- *       <dd>Matches one character not in the specified General Category or the specified Block.
- *     </dl>
- *   </li>
- *
- *   <li>Selection and Quantifier
- *     <dl>
- *       <dt class="REGEX"><VAR>X</VAR><kbd>|</kbd><VAR>Y</VAR>
- *       <dd>...
- *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>*</KBD>
- *       <dd>Matches 0 or more <var>X</var>.
- *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>+</KBD>
- *       <dd>Matches 1 or more <var>X</var>.
- *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>?</KBD>
- *       <dd>Matches 0 or 1 <var>X</var>.
- *
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>number</var><kbd>}</kbd>
- *       <dd>Matches <var>number</var> times.
- *
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,}</kbd>
- *       <dd>...
- *
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,</kbd><var>max</var><kbd>}</kbd>
- *       <dd>...
- *
- *       <dt class="REGEX"><VAR>X</VAR><kbd>*?</kbd>
- *       <dt class="REGEX"><VAR>X</VAR><kbd>+?</kbd>
- *       <dt class="REGEX"><VAR>X</VAR><kbd>??</kbd>
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,}?</kbd>
- *       <dt class="REGEX"><var>X</var><kbd>{</kbd><var>min</var><kbd>,</kbd><var>max</var><kbd>}?</kbd>
- *       <dd>Non-greedy matching.
- *     </dl>
- *   </li>
- *
- *   <li>Grouping, Capturing, and Back-reference
- *     <dl>
- *       <dt class="REGEX"><KBD>(?:</kbd><VAR>X</VAR><kbd>)</KBD>
- *       <dd>Grouping. "<KBD>foo+</KBD>" matches "<KBD>foo</KBD>" or "<KBD>foooo</KBD>".
- *       If you want it matches "<KBD>foofoo</KBD>" or "<KBD>foofoofoo</KBD>",
- *       you have to write "<KBD>(?:foo)+</KBD>".
- *
- *       <dt class="REGEX"><KBD>(</kbd><VAR>X</VAR><kbd>)</KBD>
- *       <dd>Grouping with capturing.
- * It make a group and applications can know
- * where in target text a group matched with methods of a <code>Match</code> instance
- * after <code><a href="#matches(java.lang.String, org.apache.xerces.utils.regex.Match)">matches(String,Match)</a></code>.
- * The 0th group means whole of this regular expression.
- * The <VAR>N</VAR>th gorup is the inside of the <VAR>N</VAR>th left parenthesis.
- * 
- *   <p>For instance, a regular expression is
- *   "<FONT color=blue><KBD> *([^&lt;:]*) +&lt;([^&gt;]*)&gt; *</KBD></FONT>"
- *   and target text is
- *   "<FONT color=red><KBD>From: TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;</KBD></FONT>":
- *   <ul>
- *     <li><code>Match.getCapturedText(0)</code>:
- *     "<FONT color=red><KBD> TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;</KBD></FONT>"
- *     <li><code>Match.getCapturedText(1)</code>: "<FONT color=red><KBD>TAMURA Kent</KBD></FONT>"
- *     <li><code>Match.getCapturedText(2)</code>: "<FONT color=red><KBD>kent@trl.ibm.co.jp</KBD></FONT>"
- *   </ul>
- *
- *       <dt class="REGEX"><kbd>\1 \2 \3 \4 \5 \6 \7 \8 \9</kbd>
- *       <dd>
- *
- *       <dt class="REGEX"><kbd>(?></kbd><var>X</var><kbd>)</kbd>
- *       <dd>Independent expression group. ................
- *
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>:</kbd><var>X</var><kbd>)</kbd>
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>-</kbd><var>options2</var><kbd>:</kbd><var>X</var><kbd>)</kbd>
- *       <dd>............................
- *       <dd>The <var>options</var> or the <var>options2</var> consists of 'i' 'm' 's' 'w'.
- *           Note that it can not contain 'u'.
- *
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>)</kbd>
- *       <dt class="REGEX"><kbd>(?</kbd><var>options</var><kbd>-</kbd><var>options2</var><kbd>)</kbd>
- *       <dd>......
- *       <dd>These expressions must be at the beginning of a group.
- *     </dl>
- *   </li>
- *
- *   <li>Anchor
- *     <dl>
- *       <dt class="REGEX"><kbd>\A</kbd>
- *       <dd>Matches the beginnig of the text.
- *
- *       <dt class="REGEX"><kbd>\Z</kbd>
- *       <dd>Matches the end of the text, or before an EOL character at the end of the text,
- *           or CARRIAGE RETURN + LINE FEED at the end of the text.
- *
- *       <dt class="REGEX"><kbd>\z</kbd>
- *       <dd>Matches the end of the text.
- *
- *       <dt class="REGEX"><kbd>^</kbd>
- *       <dd>Matches the beginning of the text.  It is equivalent to <span class="REGEX"><Kbd>\A</kbd></span>.
- *       <dd>When <a href="#M_OPTION">a "m" option</a> is set,
- *           it matches the beginning of the text, or after one of EOL characters (
- *           LINE FEED (U+000A), CARRIAGE RETURN (U+000D), LINE SEPARATOR (U+2028),
- *           PARAGRAPH SEPARATOR (U+2029).)
- *
- *       <dt class="REGEX"><kbd>$</kbd>
- *       <dd>Matches the end of the text, or before an EOL character at the end of the text,
- *           or CARRIAGE RETURN + LINE FEED at the end of the text.
- *       <dd>When <a href="#M_OPTION">a "m" option</a> is set,
- *           it matches the end of the text, or before an EOL character.
- *
- *       <dt class="REGEX"><kbd>\b</kbd>
- *       <dd>Matches word boundary.
- *           (See <a href="#W_OPTION">a "w" option</a>)
- *
- *       <dt class="REGEX"><kbd>\B</kbd>
- *       <dd>Matches non word boundary.
- *           (See <a href="#W_OPTION">a "w" option</a>)
- *
- *       <dt class="REGEX"><kbd>\&lt;</kbd>
- *       <dd>Matches the beginning of a word.
- *           (See <a href="#W_OPTION">a "w" option</a>)
- *
- *       <dt class="REGEX"><kbd>\&gt;</kbd>
- *       <dd>Matches the end of a word.
- *           (See <a href="#W_OPTION">a "w" option</a>)
- *     </dl>
- *   </li>
- *   <li>Lookahead and lookbehind
- *     <dl>
- *       <dt class="REGEX"><kbd>(?=</kbd><var>X</var><kbd>)</kbd>
- *       <dd>Lookahead.
- *
- *       <dt class="REGEX"><kbd>(?!</kbd><var>X</var><kbd>)</kbd>
- *       <dd>Negative lookahead.
- *
- *       <dt class="REGEX"><kbd>(?&lt;=</kbd><var>X</var><kbd>)</kbd>
- *       <dd>Lookbehind.
- *       <dd>(Note for text capturing......)
- *
- *       <dt class="REGEX"><kbd>(?&lt;!</kbd><var>X</var><kbd>)</kbd>
- *       <dd>Negative lookbehind.
- *     </dl>
- *   </li>
- *
- *   <li>Misc.
- *     <dl>
- *       <dt class="REGEX"><kbd>(?(</Kbd><var>condition</var><Kbd>)</kbd><var>yes-pattern</var><kbd>|</kbd><var>no-pattern</var><kbd>)</kbd>,
- *       <dt class="REGEX"><kbd>(?(</kbd><var>condition</var><kbd>)</kbd><var>yes-pattern</var><kbd>)</kbd>
- *       <dd>......
- *       <dt class="REGEX"><kbd>(?#</kbd><var>comment</var><kbd>)</kbd>
- *       <dd>Comment.  A comment string consists of characters except '<kbd>)</kbd>'.
- *           You can not write comments in character classes and before quantifiers.
- *     </dl>
- *   </li>
- * </ul>
- *
- *
- * <hr width="50%">
- * <h3>BNF for the regular expression</h3>
- * <pre>
- * regex ::= ('(?' options ')')? term ('|' term)*
- * term ::= factor+
- * factor ::= anchors | atom (('*' | '+' | '?' | minmax ) '?'? )?
- *            | '(?#' [^)]* ')'
- * minmax ::= '{' ([0-9]+ | [0-9]+ ',' | ',' [0-9]+ | [0-9]+ ',' [0-9]+) '}'
- * atom ::= char | '.' | char-class | '(' regex ')' | '(?:' regex ')' | '\' [0-9]
- *          | '\w' | '\W' | '\d' | '\D' | '\s' | '\S' | category-block | '\X'
- *          | '(?>' regex ')' | '(?' options ':' regex ')'
- *          | '(?' ('(' [0-9] ')' | '(' anchors ')' | looks) term ('|' term)? ')'
- * options ::= [imsw]* ('-' [imsw]+)?
- * anchors ::= '^' | '$' | '\A' | '\Z' | '\z' | '\b' | '\B' | '\&lt;' | '\>'
- * looks ::= '(?=' regex ')'  | '(?!' regex ')'
- *           | '(?&lt;=' regex ')' | '(?&lt;!' regex ')'
- * char ::= '\\' | '\' [efnrtv] | '\c' [@-_] | code-point | character-1
- * category-block ::= '\' [pP] category-symbol-1
- *                    | ('\p{' | '\P{') (category-symbol | block-name
- *                                       | other-properties) '}'
- * category-symbol-1 ::= 'L' | 'M' | 'N' | 'Z' | 'C' | 'P' | 'S'
- * category-symbol ::= category-symbol-1 | 'Lu' | 'Ll' | 'Lt' | 'Lm' | Lo'
- *                     | 'Mn' | 'Me' | 'Mc' | 'Nd' | 'Nl' | 'No'
- *                     | 'Zs' | 'Zl' | 'Zp' | 'Cc' | 'Cf' | 'Cn' | 'Co' | 'Cs'
- *                     | 'Pd' | 'Ps' | 'Pe' | 'Pc' | 'Po'
- *                     | 'Sm' | 'Sc' | 'Sk' | 'So'
- * block-name ::= (See above)
- * other-properties ::= 'ALL' | 'ASSIGNED' | 'UNASSIGNED'
- * character-1 ::= (any character except meta-characters)
- *
- * char-class ::= '[' ranges ']'
- *                | '(?[' ranges ']' ([-+&] '[' ranges ']')? ')'
- * ranges ::= '^'? (range <a href="#COMMA_OPTION">','?</a>)+
- * range ::= '\d' | '\w' | '\s' | '\D' | '\W' | '\S' | category-block
- *           | range-char | range-char '-' range-char
- * range-char ::= '\[' | '\]' | '\\' | '\' [,-efnrtv] | code-point | character-2
- * code-point ::= '\x' hex-char hex-char
- *                | '\x{' hex-char+ '}'
- * <!--               | '\u005cu' hex-char hex-char hex-char hex-char
- * -->               | '\v' hex-char hex-char hex-char hex-char hex-char hex-char
- * hex-char ::= [0-9a-fA-F]
- * character-2 ::= (any character except \[]-,)
- * </pre>
- *
- * <hr width="50%">
- * <h3>TODO</h3>
- * <ul>
- *   <li><a href="http://www.unicode.org/unicode/reports/tr18/">Unicode Regular Expression Guidelines</a>
- *     <ul>
- *       <li>2.4 Canonical Equivalents
- *       <li>Level 3
- *     </ul>
- *   <li>Parsing performance
- * </ul>
- *
- * <hr width="50%">
- *
- * @author TAMURA Kent &lt;kent@trl.ibm.co.jp&gt;
- */
-public class RegularExpression implements java.io.Serializable {
-    static final boolean DEBUG = false;
-
-    /**
-     * Compiles a token tree into an operation flow.
-     */
-    private synchronized void compile(Token tok) {
-        if (this.operations != null)
-            return;
-        this.numberOfClosures = 0;
-        this.operations = this.compile(tok, null, false);
-    }
-
-    /**
-     * Converts a token to an operation.
-     */
-    private Op compile(Token tok, Op next, boolean reverse) {
-        Op ret;
-        switch (tok.type) {
-        case Token.DOT:
-            ret = Op.createDot();
-            ret.next = next;
-            break;
-
-        case Token.CHAR:
-            ret = Op.createChar(tok.getChar());
-            ret.next = next;
-            break;
-
-        case Token.ANCHOR:
-            ret = Op.createAnchor(tok.getChar());
-            ret.next = next;
-            break;
-
-        case Token.RANGE:
-        case Token.NRANGE:
-            ret = Op.createRange(tok);
-            ret.next = next;
-            break;
-
-        case Token.CONCAT:
-            ret = next;
-            if (!reverse) {
-                for (int i = tok.size()-1;  i >= 0;  i --) {
-                    ret = compile(tok.getChild(i), ret, false);
-                }
-            } else {
-                for (int i = 0;  i < tok.size();  i ++) {
-                    ret = compile(tok.getChild(i), ret, true);
-                }
-            }
-            break;
-
-        case Token.UNION:
-            Op.UnionOp uni = Op.createUnion(tok.size());
-            for (int i = 0;  i < tok.size();  i ++) {
-                uni.addElement(compile(tok.getChild(i), next, reverse));
-            }
-            ret = uni;                          // ret.next is null.
-            break;
-
-        case Token.CLOSURE:
-        case Token.NONGREEDYCLOSURE:
-            Token child = tok.getChild(0);
-            int min = tok.getMin();
-            int max = tok.getMax();
-            if (min >= 0 && min == max) { // {n}
-                ret = next;
-                for (int i = 0; i < min;  i ++) {
-                    ret = compile(child, ret, reverse);
-                }
-                break;
-            }
-            if (min > 0 && max > 0)
-                max -= min;
-            if (max > 0) {
-                // X{2,6} -> XX(X(X(XX?)?)?)?
-                ret = next;
-                for (int i = 0;  i < max;  i ++) {
-                    Op.ChildOp q = Op.createQuestion(tok.type == Token.NONGREEDYCLOSURE);
-                    q.next = next;
-                    q.setChild(compile(child, ret, reverse));
-                    ret = q;
-                }
-            } else {
-                Op.ChildOp op;
-                if (tok.type == Token.NONGREEDYCLOSURE) {
-                    op = Op.createNonGreedyClosure();
-                } else {                        // Token.CLOSURE
-                    if (child.getMinLength() == 0)
-                        op = Op.createClosure(this.numberOfClosures++);
-                    else
-                        op = Op.createClosure(-1);
-                }
-                op.next = next;
-                op.setChild(compile(child, op, reverse));
-                ret = op;
-            }
-            if (min > 0) {
-                for (int i = 0;  i < min;  i ++) {
-                    ret = compile(child, ret, reverse);
-                }
-            }
-            break;
-
-        case Token.EMPTY:
-            ret = next;
-            break;
-
-        case Token.STRING:
-            ret = Op.createString(tok.getString());
-            ret.next = next;
-            break;
-
-        case Token.BACKREFERENCE:
-            ret = Op.createBackReference(tok.getReferenceNumber());
-            ret.next = next;
-            break;
-
-        case Token.PAREN:
-            if (tok.getParenNumber() == 0) {
-                ret = compile(tok.getChild(0), next, reverse);
-            } else if (reverse) {
-                next = Op.createCapture(tok.getParenNumber(), next);
-                next = compile(tok.getChild(0), next, reverse);
-                ret = Op.createCapture(-tok.getParenNumber(), next);
-            } else {
-                next = Op.createCapture(-tok.getParenNumber(), next);
-                next = compile(tok.getChild(0), next, reverse);
-                ret = Op.createCapture(tok.getParenNumber(), next);
-            }
-            break;
-
-        case Token.LOOKAHEAD:
-            ret = Op.createLook(Op.LOOKAHEAD, next, compile(tok.getChild(0), null, false));
-            break;
-        case Token.NEGATIVELOOKAHEAD:
-            ret = Op.createLook(Op.NEGATIVELOOKAHEAD, next, compile(tok.getChild(0), null, false));
-            break;
-        case Token.LOOKBEHIND:
-            ret = Op.createLook(Op.LOOKBEHIND, next, compile(tok.getChild(0), null, true));
-            break;
-        case Token.NEGATIVELOOKBEHIND:
-            ret = Op.createLook(Op.NEGATIVELOOKBEHIND, next, compile(tok.getChild(0), null, true));
-            break;
-
-        case Token.INDEPENDENT:
-            ret = Op.createIndependent(next, compile(tok.getChild(0), null, reverse));
-            break;
-
-        case Token.MODIFIERGROUP:
-            ret = Op.createModifier(next, compile(tok.getChild(0), null, reverse),
-                                    ((Token.ModifierToken)tok).getOptions(),
-                                    ((Token.ModifierToken)tok).getOptionsMask());
-            break;
-
-        case Token.CONDITION:
-            Token.ConditionToken ctok = (Token.ConditionToken)tok;
-            int ref = ctok.refNumber;
-            Op condition = ctok.condition == null ? null : compile(ctok.condition, null, reverse);
-            Op yes = compile(ctok.yes, next, reverse);
-            Op no = ctok.no == null ? null : compile(ctok.no, next, reverse);
-            ret = Op.createCondition(next, ref, condition, yes, no);
-            break;
-
-        default:
-            throw new RuntimeException("Unknown token type: "+tok.type);
-        } // switch (tok.type)
-        return ret;
-    }
-
-
-//Public
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not.
-     *
-     * @return true if the target is matched to this regular expression.
-     */
-    public boolean matches(char[]  target) {
-        return this.matches(target, 0,  target .length , (Match)null);
-    }
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern
-     * in specified range or not.
-     *
-     * @param start Start offset of the range.
-     * @param end  End offset +1 of the range.
-     * @return true if the target is matched to this regular expression.
-     */
-    public boolean matches(char[]  target, int start, int end) {
-        return this.matches(target, start, end, (Match)null);
-    }
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not.
-     *
-     * @param match A Match instance for storing matching result.
-     * @return Offset of the start position in <VAR>target</VAR>; or -1 if not match.
-     */
-    public boolean matches(char[]  target, Match match) {
-        return this.matches(target, 0,  target .length , match);
-    }
-
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern
-     * in specified range or not.
-     *
-     * @param start Start offset of the range.
-     * @param end  End offset +1 of the range.
-     * @param match A Match instance for storing matching result.
-     * @return Offset of the start position in <VAR>target</VAR>; or -1 if not match.
-     */
-    public boolean matches(char[]  target, int start, int end, Match match) {
-
-        synchronized (this) {
-            if (this.operations == null)
-                this.prepare();
-            if (this.context == null)
-                this.context = new Context();
-        }
-        Context con = null;
-        synchronized (this.context) {
-            con = this.context.inuse ? new Context() : this.context;
-            con.reset(target, start, end, this.numberOfClosures);
-        }
-        if (match != null) {
-            match.setNumberOfGroups(this.nofparen);
-            match.setSource(target);
-        } else if (this.hasBackReferences) {
-            match = new Match();
-            match.setNumberOfGroups(this.nofparen);
-            // Need not to call setSource() because
-            // a caller can not access this match instance.
-        }
-        con.match = match;
-
-        if (this.isSet(this.options, XMLSCHEMA_MODE)) {
-            int matchEnd = this. matchCharArray (con, this.operations, con.start, 1, this.options);
-            //System.err.println("DEBUG: matchEnd="+matchEnd);
-            if (matchEnd == con.limit) {
-                if (con.match != null) {
-                    con.match.setBeginning(0, con.start);
-                    con.match.setEnd(0, matchEnd);
-                }
-                con.inuse = false;
-                return true;
-            }
-            return false;
-        }
-
-        /*
-         * The pattern has only fixed string.
-         * The engine uses Boyer-Moore.
-         */
-        if (this.fixedStringOnly) {
-            //System.err.println("DEBUG: fixed-only: "+this.fixedString);
-            int o = this.fixedStringTable.matches(target, con.start, con.limit);
-            if (o >= 0) {
-                if (con.match != null) {
-                    con.match.setBeginning(0, o);
-                    con.match.setEnd(0, o+this.fixedString.length());
-                }
-                con.inuse = false;
-                return true;
-            }
-            con.inuse = false;
-            return false;
-        }
-
-        /*
-         * The pattern contains a fixed string.
-         * The engine checks with Boyer-Moore whether the text contains the fixed string or not.
-         * If not, it return with false.
-         */
-        if (this.fixedString != null) {
-            int o = this.fixedStringTable.matches(target, con.start, con.limit);
-            if (o < 0) {
-                //System.err.println("Non-match in fixed-string search.");
-                con.inuse = false;
-                return false;
-            }
-        }
-
-        int limit = con.limit-this.minlength;
-        int matchStart;
-        int matchEnd = -1;
-
-        /*
-         * Checks whether the expression starts with ".*".
-         */
-        if (this.operations != null
-            && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) {
-            if (isSet(this.options, SINGLE_LINE)) {
-                matchStart = con.start;
-                matchEnd = this. matchCharArray (con, this.operations, con.start, 1, this.options);
-            } else {
-                boolean previousIsEOL = true;
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target [  matchStart ] ;
-                    if (isEOLChar(ch)) {
-                        previousIsEOL = true;
-                    } else {
-                        if (previousIsEOL) {
-                            if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
-                                                                       matchStart, 1, this.options)))
-                                break;
-                        }
-                        previousIsEOL = false;
-                    }
-                }
-            }
-        }
-
-        /*
-         * Optimization against the first character.
-         */
-        else if (this.firstChar != null) {
-            //System.err.println("DEBUG: with firstchar-matching: "+this.firstChar);
-            RangeToken range = this.firstChar;
-            if (this.isSet(this.options, IGNORE_CASE)) {
-                range = this.firstChar.getCaseInsensitiveToken();
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target [  matchStart ] ;
-                    if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
-                        ch = REUtil.composeFromSurrogates(ch,  target [  matchStart+1 ] );
-                        if (!range.match(ch))  continue;
-                    } else {
-                        if (!range.match(ch)) {
-                            char ch1 = Character.toUpperCase((char)ch);
-                            if (!range.match(ch1))
-                                if (!range.match(Character.toLowerCase(ch1)))
-                                    continue;
-                        }
-                    }
-                    if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
-                                                               matchStart, 1, this.options)))
-                        break;
-                }
-            } else {
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target [  matchStart ] ;
-                    if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
-                        ch = REUtil.composeFromSurrogates(ch,  target [  matchStart+1 ] );
-                    if (!range.match(ch))  continue;
-                    if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
-                                                               matchStart, 1, this.options)))
-                        break;
-                }
-            }
-        }
-
-        /*
-         * Straightforward matching.
-         */
-        else {
-            for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options)))
-                    break;
-            }
-        }
-
-        if (matchEnd >= 0) {
-            if (con.match != null) {
-                con.match.setBeginning(0, matchStart);
-                con.match.setEnd(0, matchEnd);
-            }
-            con.inuse = false;
-            return true;
-        } else {
-            con.inuse = false;
-            return false;
-        }
-    }
-
-/**
- * @return -1 when not match; offset of the end of matched string when match.
- */
-    private int matchCharArray (Context con, Op op, int offset, int dx, int opts) {
-
-        char[] target = con.charTarget;
-
-
-        while (true) {
-            if (op == null)
-                return offset;
-            if (offset > con.limit || offset < con.start)
-                return -1;
-            switch (op.type) {
-            case Op.CHAR:
-                if (isSet(opts, IGNORE_CASE)) {
-                    int ch = op.getData();
-                    if (dx > 0) {
-                        if (offset >= con.limit || !matchIgnoreCase(ch,  target [  offset ] ))
-                            return -1;
-                        offset ++;
-                    } else {
-                        int o1 = offset-1;
-                        if (o1 >= con.limit || o1 < 0 || !matchIgnoreCase(ch,  target [  o1 ] ))
-                            return -1;
-                        offset = o1;
-                    }
-                } else {
-                    int ch = op.getData();
-                    if (dx > 0) {
-                        if (offset >= con.limit || ch !=  target [  offset ] )
-                            return -1;
-                        offset ++;
-                    } else {
-                        int o1 = offset-1;
-                        if (o1 >= con.limit || o1 < 0 || ch !=  target [  o1 ] )
-                            return -1;
-                        offset = o1;
-                    }
-                }
-                op = op.next;
-                break;
-
-            case Op.DOT:
-                if (dx > 0) {
-                    if (offset >= con.limit)
-                        return -1;
-                    int ch =  target [  offset ] ;
-                    if (isSet(opts, SINGLE_LINE)) {
-                        if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                            offset ++;
-                    } else {
-                        if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                            ch = REUtil.composeFromSurrogates(ch,  target [  ++offset ] );
-                        if (isEOLChar(ch))
-                            return -1;
-                    }
-                    offset ++;
-                } else {
-                    int o1 = offset-1;
-                    if (o1 >= con.limit || o1 < 0)
-                        return -1;
-                    int ch =  target [  o1 ] ;
-                    if (isSet(opts, SINGLE_LINE)) {
-                        if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                            o1 --;
-                    } else {
-                        if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                            ch = REUtil.composeFromSurrogates( target [  --o1 ] , ch);
-                        if (!isEOLChar(ch))
-                            return -1;
-                    }
-                    offset = o1;
-                }
-                op = op.next;
-                break;
-
-            case Op.RANGE:
-            case Op.NRANGE:
-                if (dx > 0) {
-                    if (offset >= con.limit)
-                        return -1;
-                    int ch =  target [  offset ] ;
-                    if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                        ch = REUtil.composeFromSurrogates(ch,  target [  ++offset ] );
-                    RangeToken tok = op.getToken();
-                    if (isSet(opts, IGNORE_CASE)) {
-                        tok = tok.getCaseInsensitiveToken();
-                        if (!tok.match(ch)) {
-                            if (ch >= 0x10000)  return -1;
-                            char uch;
-                            if (!tok.match(uch = Character.toUpperCase((char)ch))
-                                && !tok.match(Character.toLowerCase(uch)))
-                                return -1;
-                        }
-                    } else {
-                        if (!tok.match(ch))  return -1;
-                    }
-                    offset ++;
-                } else {
-                    int o1 = offset-1;
-                    if (o1 >= con.limit || o1 < 0)
-                        return -1;
-                    int ch =  target [  o1 ] ;
-                    if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                        ch = REUtil.composeFromSurrogates( target [  --o1 ] , ch);
-                    RangeToken tok = op.getToken();
-                    if (isSet(opts, IGNORE_CASE)) {
-                        tok = tok.getCaseInsensitiveToken();
-                        if (!tok.match(ch)) {
-                            if (ch >= 0x10000)  return -1;
-                            char uch;
-                            if (!tok.match(uch = Character.toUpperCase((char)ch))
-                                && !tok.match(Character.toLowerCase(uch)))
-                                return -1;
-                        }
-                    } else {
-                        if (!tok.match(ch))  return -1;
-                    }
-                    offset = o1;
-                }
-                op = op.next;
-                break;
-
-            case Op.ANCHOR:
-                boolean go = false;
-                switch (op.getData()) {
-                case '^':
-                    if (isSet(opts, MULTIPLE_LINES)) {
-                        if (!(offset == con.start
-                              || offset > con.start && isEOLChar( target [  offset-1 ] )))
-                            return -1;
-                    } else {
-                        if (offset != con.start)
-                            return -1;
-                    }
-                    break;
-
-                case '@':                         // Internal use only.
-                    // The @ always matches line beginnings.
-                    if (!(offset == con.start
-                          || offset > con.start && isEOLChar( target [  offset-1 ] )))
-                        return -1;
-                    break;
-
-                case '$':
-                    if (isSet(opts, MULTIPLE_LINES)) {
-                        if (!(offset == con.limit
-                              || offset < con.limit && isEOLChar( target [  offset ] )))
-                            return -1;
-                    } else {
-                        if (!(offset == con.limit
-                              || offset+1 == con.limit && isEOLChar( target [  offset ] )
-                              || offset+2 == con.limit &&  target [  offset ]  == CARRIAGE_RETURN
-                              &&  target [  offset+1 ]  == LINE_FEED))
-                            return -1;
-                    }
-                    break;
-
-                case 'A':
-                    if (offset != con.start)  return -1;
-                    break;
-
-                case 'Z':
-                    if (!(offset == con.limit
-                          || offset+1 == con.limit && isEOLChar( target [  offset ] )
-                          || offset+2 == con.limit &&  target [  offset ]  == CARRIAGE_RETURN
-                          &&  target [  offset+1 ]  == LINE_FEED))
-                        return -1;
-                    break;
-
-                case 'z':
-                    if (offset != con.limit)  return -1;
-                    break;
-
-                case 'b':
-                    if (con.length == 0)  return -1;
-                    {
-                        int after = getWordType(target, con.start, con.limit, offset, opts);
-                        if (after == WT_IGNORE)  return -1;
-                        int before = getPreviousWordType(target, con.start, con.limit, offset, opts);
-                        if (after == before)  return -1;
-                    }
-                    break;
-
-                case 'B':
-                    if (con.length == 0)
-                        go = true;
-                    else {
-                        int after = getWordType(target, con.start, con.limit, offset, opts);
-                        go = after == WT_IGNORE
-                             || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
-                    }
-                    if (!go)  return -1;
-                    break;
-
-                case '<':
-                    if (con.length == 0 || offset == con.limit)  return -1;
-                    if (getWordType(target, con.start, con.limit, offset, opts) != WT_LETTER
-                        || getPreviousWordType(target, con.start, con.limit, offset, opts) != WT_OTHER)
-                        return -1;
-                    break;
-
-                case '>':
-                    if (con.length == 0 || offset == con.start)  return -1;
-                    if (getWordType(target, con.start, con.limit, offset, opts) != WT_OTHER
-                        || getPreviousWordType(target, con.start, con.limit, offset, opts) != WT_LETTER)
-                        return -1;
-                    break;
-                } // switch anchor type
-                op = op.next;
-                break;
-
-            case Op.BACKREFERENCE:
-                {
-                    int refno = op.getData();
-                    if (refno <= 0 || refno >= this.nofparen)
-                        throw new RuntimeException("Internal Error: Reference number must be more than zero: "+refno);
-                    if (con.match.getBeginning(refno) < 0
-                        || con.match.getEnd(refno) < 0)
-                        return -1;                // ********
-                    int o2 = con.match.getBeginning(refno);
-                    int literallen = con.match.getEnd(refno)-o2;
-                    if (!isSet(opts, IGNORE_CASE)) {
-                        if (dx > 0) {
-                            if (!regionMatches(target, offset, con.limit, o2, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatches(target, offset-literallen, con.limit, o2, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    } else {
-                        if (dx > 0) {
-                            if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
-                                                         o2, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    }
-                }
-                op = op.next;
-                break;
-            case Op.STRING:
-                {
-                    String literal = op.getString();
-                    int literallen = literal.length();
-                    if (!isSet(opts, IGNORE_CASE)) {
-                        if (dx > 0) {
-                            if (!regionMatches(target, offset, con.limit, literal, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatches(target, offset-literallen, con.limit, literal, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    } else {
-                        if (dx > 0) {
-                            if (!regionMatchesIgnoreCase(target, offset, con.limit, literal, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
-                                                         literal, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    }
-                }
-                op = op.next;
-                break;
-
-            case Op.CLOSURE:
-                {
-                    /*
-                     * Saves current position to avoid
-                     * zero-width repeats.
-                     */
-                    int id = op.getData();
-                    if (id >= 0) {
-                        int previousOffset = con.offsets[id];
-                        if (previousOffset < 0 || previousOffset != offset) {
-                            con.offsets[id] = offset;
-                        } else {
-                            con.offsets[id] = -1;
-                            op = op.next;
-                            break;
-                        }
-                    }
-
-                    int ret = this. matchCharArray (con, op.getChild(), offset, dx, opts);
-                    if (id >= 0)  con.offsets[id] = -1;
-                    if (ret >= 0)  return ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.QUESTION:
-                {
-                    int ret = this. matchCharArray (con, op.getChild(), offset, dx, opts);
-                    if (ret >= 0)  return ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.NONGREEDYCLOSURE:
-            case Op.NONGREEDYQUESTION:
-                {
-                    int ret = this. matchCharArray (con, op.next, offset, dx, opts);
-                    if (ret >= 0)  return ret;
-                    op = op.getChild();
-                }
-                break;
-
-            case Op.UNION:
-                for (int i = 0;  i < op.size();  i ++) {
-                    int ret = this. matchCharArray (con, op.elementAt(i), offset, dx, opts);
-                    if (DEBUG) {
-                        System.err.println("UNION: "+i+", ret="+ret);
-                    }
-                    if (ret == con.length )  return ret;
-                }
-                return -1;
-
-            case Op.CAPTURE:
-                int refno = op.getData();
-                if (con.match != null && refno > 0) {
-                    int save = con.match.getBeginning(refno);
-                    con.match.setBeginning(refno, offset);
-                    int ret = this. matchCharArray (con, op.next, offset, dx, opts);
-                    if (ret < 0)  con.match.setBeginning(refno, save);
-                    return ret;
-                } else if (con.match != null && refno < 0) {
-                    int index = -refno;
-                    int save = con.match.getEnd(index);
-                    con.match.setEnd(index, offset);
-                    int ret = this. matchCharArray (con, op.next, offset, dx, opts);
-                    if (ret < 0)  con.match.setEnd(index, save);
-                    return ret;
-                }
-                op = op.next;
-                break;
-
-            case Op.LOOKAHEAD:
-                if (0 > this. matchCharArray (con, op.getChild(), offset, 1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.NEGATIVELOOKAHEAD:
-                if (0 <= this. matchCharArray (con, op.getChild(), offset, 1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.LOOKBEHIND:
-                if (0 > this. matchCharArray (con, op.getChild(), offset, -1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.NEGATIVELOOKBEHIND:
-                if (0 <= this. matchCharArray (con, op.getChild(), offset, -1, opts))  return -1;
-                op = op.next;
-                break;
-
-            case Op.INDEPENDENT:
-                {
-                    int ret = this. matchCharArray (con, op.getChild(), offset, dx, opts);
-                    if (ret < 0)  return ret;
-                    offset = ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.MODIFIER:
-                {
-                    int localopts = opts;
-                    localopts |= op.getData();
-                    localopts &= ~op.getData2();
-                    //System.err.println("MODIFIER: "+Integer.toString(opts, 16)+" -> "+Integer.toString(localopts, 16));
-                    int ret = this. matchCharArray (con, op.getChild(), offset, dx, localopts);
-                    if (ret < 0)  return ret;
-                    offset = ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.CONDITION:
-                {
-                    Op.ConditionOp cop = (Op.ConditionOp)op;
-                    boolean matchp = false;
-                    if (cop.refNumber > 0) {
-                        if (cop.refNumber >= this.nofparen)
-                            throw new RuntimeException("Internal Error: Reference number must be more than zero: "+cop.refNumber);
-                        matchp = con.match.getBeginning(cop.refNumber) >= 0
-                                 && con.match.getEnd(cop.refNumber) >= 0;
-                    } else {
-                        matchp = 0 <= this. matchCharArray (con, cop.condition, offset, dx, opts);
-                    }
-
-                    if (matchp) {
-                        op = cop.yes;
-                    } else if (cop.no != null) {
-                        op = cop.no;
-                    } else {
-                        op = cop.next;
-                    }
-                }
-                break;
-
-            default:
-                throw new RuntimeException("Unknown operation type: "+op.type);
-            } // switch (op.type)
-        } // while
-    }
-
-    private static final int getPreviousWordType(char[]  target, int begin, int end,
-                                                 int offset, int opts) {
-        int ret = getWordType(target, begin, end, --offset, opts);
-        while (ret == WT_IGNORE)
-            ret = getWordType(target, begin, end, --offset, opts);
-        return ret;
-    }
-
-    private static final int getWordType(char[]  target, int begin, int end,
-                                         int offset, int opts) {
-        if (offset < begin || offset >= end)  return WT_OTHER;
-        return getWordType0( target [  offset ] , opts);
-    }
-
-
-
-    private static final boolean regionMatches(char[]  target, int offset, int limit,
-                                               String part, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = 0;
-        while (partlen-- > 0) {
-            if ( target [  offset++ ]  != part.charAt(i++))
-                return false;
-        }
-        return true;
-    }
-
-    private static final boolean regionMatches(char[]  target, int offset, int limit,
-                                               int offset2, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = offset2;
-        while (partlen-- > 0) {
-            if ( target [  offset++ ]  !=  target [  i++ ] )
-                return false;
-        }
-        return true;
-    }
-
-/**
- * @see java.lang.String#regionMatches
- */
-    private static final boolean regionMatchesIgnoreCase(char[]  target, int offset, int limit,
-                                                         String part, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = 0;
-        while (partlen-- > 0) {
-            char ch1 =  target [  offset++ ] ;
-            char ch2 = part.charAt(i++);
-            if (ch1 == ch2)
-                continue;
-            char uch1 = Character.toUpperCase(ch1);
-            char uch2 = Character.toUpperCase(ch2);
-            if (uch1 == uch2)
-                continue;
-            if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
-                return false;
-        }
-        return true;
-    }
-
-    private static final boolean regionMatchesIgnoreCase(char[]  target, int offset, int limit,
-                                                         int offset2, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = offset2;
-        while (partlen-- > 0) {
-            char ch1 =  target [  offset++ ] ;
-            char ch2 =  target [  i++ ] ;
-            if (ch1 == ch2)
-                continue;
-            char uch1 = Character.toUpperCase(ch1);
-            char uch2 = Character.toUpperCase(ch2);
-            if (uch1 == uch2)
-                continue;
-            if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
-                return false;
-        }
-        return true;
-    }
-
-
-
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not.
-     *
-     * @return true if the target is matched to this regular expression.
-     */
-    public boolean matches(String  target) {
-        return this.matches(target, 0,  target .length() , (Match)null);
-    }
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern
-     * in specified range or not.
-     *
-     * @param start Start offset of the range.
-     * @param end  End offset +1 of the range.
-     * @return true if the target is matched to this regular expression.
-     */
-    public boolean matches(String  target, int start, int end) {
-        return this.matches(target, start, end, (Match)null);
-    }
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not.
-     *
-     * @param match A Match instance for storing matching result.
-     * @return Offset of the start position in <VAR>target</VAR>; or -1 if not match.
-     */
-    public boolean matches(String  target, Match match) {
-        return this.matches(target, 0,  target .length() , match);
-    }
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern
-     * in specified range or not.
-     *
-     * @param start Start offset of the range.
-     * @param end  End offset +1 of the range.
-     * @param match A Match instance for storing matching result.
-     * @return Offset of the start position in <VAR>target</VAR>; or -1 if not match.
-     */
-    public boolean matches(String  target, int start, int end, Match match) {
-
-        synchronized (this) {
-            if (this.operations == null)
-                this.prepare();
-            if (this.context == null)
-                this.context = new Context();
-        }
-        Context con = null;
-        synchronized (this.context) {
-            con = this.context.inuse ? new Context() : this.context;
-            con.reset(target, start, end, this.numberOfClosures);
-        }
-        if (match != null) {
-            match.setNumberOfGroups(this.nofparen);
-            match.setSource(target);
-        } else if (this.hasBackReferences) {
-            match = new Match();
-            match.setNumberOfGroups(this.nofparen);
-            // Need not to call setSource() because
-            // a caller can not access this match instance.
-        }
-        con.match = match;
-
-        if (this.isSet(this.options, XMLSCHEMA_MODE)) {
-            if (DEBUG) {
-                System.err.println("target string="+target);
-            }
-            int matchEnd = this. matchString (con, this.operations, con.start, 1, this.options);
-            if (DEBUG) {
-                System.err.println("matchEnd="+matchEnd);
-                System.err.println("con.limit="+con.limit);
-            }
-            if (matchEnd == con.limit) {
-                if (con.match != null) {
-                    con.match.setBeginning(0, con.start);
-                    con.match.setEnd(0, matchEnd);
-                }
-                con.inuse = false;
-                return true;
-            }
-            return false;
-        }
-
-        /*
-         * The pattern has only fixed string.
-         * The engine uses Boyer-Moore.
-         */
-        if (this.fixedStringOnly) {
-            //System.err.println("DEBUG: fixed-only: "+this.fixedString);
-            int o = this.fixedStringTable.matches(target, con.start, con.limit);
-            if (o >= 0) {
-                if (con.match != null) {
-                    con.match.setBeginning(0, o);
-                    con.match.setEnd(0, o+this.fixedString.length());
-                }
-                con.inuse = false;
-                return true;
-            }
-            con.inuse = false;
-            return false;
-        }
-
-        /*
-         * The pattern contains a fixed string.
-         * The engine checks with Boyer-Moore whether the text contains the fixed string or not.
-         * If not, it return with false.
-         */
-        if (this.fixedString != null) {
-            int o = this.fixedStringTable.matches(target, con.start, con.limit);
-            if (o < 0) {
-                //System.err.println("Non-match in fixed-string search.");
-                con.inuse = false;
-                return false;
-            }
-        }
-
-        int limit = con.limit-this.minlength;
-        int matchStart;
-        int matchEnd = -1;
-
-        /*
-         * Checks whether the expression starts with ".*".
-         */
-        if (this.operations != null
-            && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) {
-            if (isSet(this.options, SINGLE_LINE)) {
-                matchStart = con.start;
-                matchEnd = this. matchString (con, this.operations, con.start, 1, this.options);
-            } else {
-                boolean previousIsEOL = true;
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target .charAt(  matchStart ) ;
-                    if (isEOLChar(ch)) {
-                        previousIsEOL = true;
-                    } else {
-                        if (previousIsEOL) {
-                            if (0 <= (matchEnd = this. matchString (con, this.operations,
-                                                                    matchStart, 1, this.options)))
-                                break;
-                        }
-                        previousIsEOL = false;
-                    }
-                }
-            }
-        }
-
-        /*
-         * Optimization against the first character.
-         */
-        else if (this.firstChar != null) {
-            //System.err.println("DEBUG: with firstchar-matching: "+this.firstChar);
-            RangeToken range = this.firstChar;
-            if (this.isSet(this.options, IGNORE_CASE)) {
-                range = this.firstChar.getCaseInsensitiveToken();
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target .charAt(  matchStart ) ;
-                    if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
-                        ch = REUtil.composeFromSurrogates(ch,  target .charAt(  matchStart+1 ) );
-                        if (!range.match(ch))  continue;
-                    } else {
-                        if (!range.match(ch)) {
-                            char ch1 = Character.toUpperCase((char)ch);
-                            if (!range.match(ch1))
-                                if (!range.match(Character.toLowerCase(ch1)))
-                                    continue;
-                        }
-                    }
-                    if (0 <= (matchEnd = this. matchString (con, this.operations,
-                                                            matchStart, 1, this.options)))
-                        break;
-                }
-            } else {
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target .charAt(  matchStart ) ;
-                    if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
-                        ch = REUtil.composeFromSurrogates(ch,  target .charAt(  matchStart+1 ) );
-                    if (!range.match(ch))  continue;
-                    if (0 <= (matchEnd = this. matchString (con, this.operations,
-                                                            matchStart, 1, this.options)))
-                        break;
-                }
-            }
-        }
-
-        /*
-         * Straightforward matching.
-         */
-        else {
-            for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                if (0 <= (matchEnd = this. matchString (con, this.operations, matchStart, 1, this.options)))
-                    break;
-            }
-        }
-
-        if (matchEnd >= 0) {
-            if (con.match != null) {
-                con.match.setBeginning(0, matchStart);
-                con.match.setEnd(0, matchEnd);
-            }
-            con.inuse = false;
-            return true;
-        } else {
-            con.inuse = false;
-            return false;
-        }
-    }
-
-    /**
-     * @return -1 when not match; offset of the end of matched string when match.
-     */
-    private int matchString (Context con, Op op, int offset, int dx, int opts) {
-
-
-
-
-        String target = con.strTarget;
-
-
-
-
-        while (true) {
-            if (op == null)
-                return offset;
-            if (offset > con.limit || offset < con.start)
-                return -1;
-            switch (op.type) {
-            case Op.CHAR:
-                if (isSet(opts, IGNORE_CASE)) {
-                    int ch = op.getData();
-                    if (dx > 0) {
-                        if (offset >= con.limit || !matchIgnoreCase(ch,  target .charAt(  offset ) ))
-                            return -1;
-                        offset ++;
-                    } else {
-                        int o1 = offset-1;
-                        if (o1 >= con.limit || o1 < 0 || !matchIgnoreCase(ch,  target .charAt(  o1 ) ))
-                            return -1;
-                        offset = o1;
-                    }
-                } else {
-                    int ch = op.getData();
-                    if (dx > 0) {
-                        if (offset >= con.limit || ch !=  target .charAt(  offset ) )
-                            return -1;
-                        offset ++;
-                    } else {
-                        int o1 = offset-1;
-                        if (o1 >= con.limit || o1 < 0 || ch !=  target .charAt(  o1 ) )
-                            return -1;
-                        offset = o1;
-                    }
-                }
-                op = op.next;
-                break;
-
-            case Op.DOT:
-                if (dx > 0) {
-                    if (offset >= con.limit)
-                        return -1;
-                    int ch =  target .charAt(  offset ) ;
-                    if (isSet(opts, SINGLE_LINE)) {
-                        if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                            offset ++;
-                    } else {
-                        if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                            ch = REUtil.composeFromSurrogates(ch,  target .charAt(  ++offset ) );
-                        if (isEOLChar(ch))
-                            return -1;
-                    }
-                    offset ++;
-                } else {
-                    int o1 = offset-1;
-                    if (o1 >= con.limit || o1 < 0)
-                        return -1;
-                    int ch =  target .charAt(  o1 ) ;
-                    if (isSet(opts, SINGLE_LINE)) {
-                        if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                            o1 --;
-                    } else {
-                        if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                            ch = REUtil.composeFromSurrogates( target .charAt(  --o1 ) , ch);
-                        if (!isEOLChar(ch))
-                            return -1;
-                    }
-                    offset = o1;
-                }
-                op = op.next;
-                break;
-
-            case Op.RANGE:
-            case Op.NRANGE:
-                if (dx > 0) {
-                    if (offset >= con.limit)
-                        return -1;
-                    int ch =  target .charAt(  offset ) ;
-                    if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                        ch = REUtil.composeFromSurrogates(ch,  target .charAt(  ++offset ) );
-                    RangeToken tok = op.getToken();
-                    if (isSet(opts, IGNORE_CASE)) {
-                        tok = tok.getCaseInsensitiveToken();
-                        if (!tok.match(ch)) {
-                            if (ch >= 0x10000)  return -1;
-                            char uch;
-                            if (!tok.match(uch = Character.toUpperCase((char)ch))
-                                && !tok.match(Character.toLowerCase(uch)))
-                                return -1;
-                        }
-                    } else {
-                        if (!tok.match(ch))  return -1;
-                    }
-                    offset ++;
-                } else {
-                    int o1 = offset-1;
-                    if (o1 >= con.limit || o1 < 0)
-                        return -1;
-                    int ch =  target .charAt(  o1 ) ;
-                    if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                        ch = REUtil.composeFromSurrogates( target .charAt(  --o1 ) , ch);
-                    RangeToken tok = op.getToken();
-                    if (isSet(opts, IGNORE_CASE)) {
-                        tok = tok.getCaseInsensitiveToken();
-                        if (!tok.match(ch)) {
-                            if (ch >= 0x10000)  return -1;
-                            char uch;
-                            if (!tok.match(uch = Character.toUpperCase((char)ch))
-                                && !tok.match(Character.toLowerCase(uch)))
-                                return -1;
-                        }
-                    } else {
-                        if (!tok.match(ch))  return -1;
-                    }
-                    offset = o1;
-                }
-                op = op.next;
-                break;
-
-            case Op.ANCHOR:
-                boolean go = false;
-                switch (op.getData()) {
-                case '^':
-                    if (isSet(opts, MULTIPLE_LINES)) {
-                        if (!(offset == con.start
-                              || offset > con.start && isEOLChar( target .charAt(  offset-1 ) )))
-                            return -1;
-                    } else {
-                        if (offset != con.start)
-                            return -1;
-                    }
-                    break;
-
-                case '@':                         // Internal use only.
-                    // The @ always matches line beginnings.
-                    if (!(offset == con.start
-                          || offset > con.start && isEOLChar( target .charAt(  offset-1 ) )))
-                        return -1;
-                    break;
-
-                case '$':
-                    if (isSet(opts, MULTIPLE_LINES)) {
-                        if (!(offset == con.limit
-                              || offset < con.limit && isEOLChar( target .charAt(  offset ) )))
-                            return -1;
-                    } else {
-                        if (!(offset == con.limit
-                              || offset+1 == con.limit && isEOLChar( target .charAt(  offset ) )
-                              || offset+2 == con.limit &&  target .charAt(  offset )  == CARRIAGE_RETURN
-                              &&  target .charAt(  offset+1 )  == LINE_FEED))
-                            return -1;
-                    }
-                    break;
-
-                case 'A':
-                    if (offset != con.start)  return -1;
-                    break;
-
-                case 'Z':
-                    if (!(offset == con.limit
-                          || offset+1 == con.limit && isEOLChar( target .charAt(  offset ) )
-                          || offset+2 == con.limit &&  target .charAt(  offset )  == CARRIAGE_RETURN
-                          &&  target .charAt(  offset+1 )  == LINE_FEED))
-                        return -1;
-                    break;
-
-                case 'z':
-                    if (offset != con.limit)  return -1;
-                    break;
-
-                case 'b':
-                    if (con.length == 0)  return -1;
-                    {
-                        int after = getWordType(target, con.start, con.limit, offset, opts);
-                        if (after == WT_IGNORE)  return -1;
-                        int before = getPreviousWordType(target, con.start, con.limit, offset, opts);
-                        if (after == before)  return -1;
-                    }
-                    break;
-
-                case 'B':
-                    if (con.length == 0)
-                        go = true;
-                    else {
-                        int after = getWordType(target, con.start, con.limit, offset, opts);
-                        go = after == WT_IGNORE
-                             || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
-                    }
-                    if (!go)  return -1;
-                    break;
-
-                case '<':
-                    if (con.length == 0 || offset == con.limit)  return -1;
-                    if (getWordType(target, con.start, con.limit, offset, opts) != WT_LETTER
-                        || getPreviousWordType(target, con.start, con.limit, offset, opts) != WT_OTHER)
-                        return -1;
-                    break;
-
-                case '>':
-                    if (con.length == 0 || offset == con.start)  return -1;
-                    if (getWordType(target, con.start, con.limit, offset, opts) != WT_OTHER
-                        || getPreviousWordType(target, con.start, con.limit, offset, opts) != WT_LETTER)
-                        return -1;
-                    break;
-                } // switch anchor type
-                op = op.next;
-                break;
-
-            case Op.BACKREFERENCE:
-                {
-                    int refno = op.getData();
-                    if (refno <= 0 || refno >= this.nofparen)
-                        throw new RuntimeException("Internal Error: Reference number must be more than zero: "+refno);
-                    if (con.match.getBeginning(refno) < 0
-                        || con.match.getEnd(refno) < 0)
-                        return -1;                // ********
-                    int o2 = con.match.getBeginning(refno);
-                    int literallen = con.match.getEnd(refno)-o2;
-                    if (!isSet(opts, IGNORE_CASE)) {
-                        if (dx > 0) {
-                            if (!regionMatches(target, offset, con.limit, o2, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatches(target, offset-literallen, con.limit, o2, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    } else {
-                        if (dx > 0) {
-                            if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
-                                                         o2, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    }
-                }
-                op = op.next;
-                break;
-            case Op.STRING:
-                {
-                    String literal = op.getString();
-                    int literallen = literal.length();
-                    if (!isSet(opts, IGNORE_CASE)) {
-                        if (dx > 0) {
-                            if (!regionMatches(target, offset, con.limit, literal, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatches(target, offset-literallen, con.limit, literal, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    } else {
-                        if (dx > 0) {
-                            if (!regionMatchesIgnoreCase(target, offset, con.limit, literal, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
-                                                         literal, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    }
-                }
-                op = op.next;
-                break;
-
-            case Op.CLOSURE:
-                {
-                    /*
-                     * Saves current position to avoid
-                     * zero-width repeats.
-                     */
-                    int id = op.getData();
-                    if (id >= 0) {
-                        int previousOffset = con.offsets[id];
-                        if (previousOffset < 0 || previousOffset != offset) {
-                            con.offsets[id] = offset;
-                        } else {
-                            con.offsets[id] = -1;
-                            op = op.next;
-                            break;
-                        }
-                    }
-                    int ret = this. matchString (con, op.getChild(), offset, dx, opts);
-                    if (id >= 0)  con.offsets[id] = -1;
-                    if (ret >= 0)  return ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.QUESTION:
-                {
-                    int ret = this. matchString (con, op.getChild(), offset, dx, opts);
-                    if (ret >= 0)  return ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.NONGREEDYCLOSURE:
-            case Op.NONGREEDYQUESTION:
-                {
-                    int ret = this. matchString (con, op.next, offset, dx, opts);
-                    if (ret >= 0)  return ret;
-                    op = op.getChild();
-                }
-                break;
-
-            case Op.UNION:
-                for (int i = 0;  i < op.size();  i ++) {
-                    int ret = this. matchString (con, op.elementAt(i), offset, dx, opts);
-                    if (DEBUG) {
-                        System.err.println("UNION: "+i+", ret="+ret);
-                    }
-                    if (ret == con.length )  return ret;
-                }
-                return -1;
-
-            case Op.CAPTURE:
-                int refno = op.getData();
-                if (con.match != null && refno > 0) {
-                    int save = con.match.getBeginning(refno);
-                    con.match.setBeginning(refno, offset);
-                    int ret = this. matchString (con, op.next, offset, dx, opts);
-                    if (ret < 0)  con.match.setBeginning(refno, save);
-                    return ret;
-                } else if (con.match != null && refno < 0) {
-                    int index = -refno;
-                    int save = con.match.getEnd(index);
-                    con.match.setEnd(index, offset);
-                    int ret = this. matchString (con, op.next, offset, dx, opts);
-                    if (ret < 0)  con.match.setEnd(index, save);
-                    return ret;
-                }
-                op = op.next;
-                break;
-
-            case Op.LOOKAHEAD:
-                if (0 > this. matchString (con, op.getChild(), offset, 1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.NEGATIVELOOKAHEAD:
-                if (0 <= this. matchString (con, op.getChild(), offset, 1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.LOOKBEHIND:
-                if (0 > this. matchString (con, op.getChild(), offset, -1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.NEGATIVELOOKBEHIND:
-                if (0 <= this. matchString (con, op.getChild(), offset, -1, opts))  return -1;
-                op = op.next;
-                break;
-
-            case Op.INDEPENDENT:
-                {
-                    int ret = this. matchString (con, op.getChild(), offset, dx, opts);
-                    if (ret < 0)  return ret;
-                    offset = ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.MODIFIER:
-                {
-                    int localopts = opts;
-                    localopts |= op.getData();
-                    localopts &= ~op.getData2();
-                    //System.err.println("MODIFIER: "+Integer.toString(opts, 16)+" -> "+Integer.toString(localopts, 16));
-                    int ret = this. matchString (con, op.getChild(), offset, dx, localopts);
-                    if (ret < 0)  return ret;
-                    offset = ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.CONDITION:
-                {
-                    Op.ConditionOp cop = (Op.ConditionOp)op;
-                    boolean matchp = false;
-                    if (cop.refNumber > 0) {
-                        if (cop.refNumber >= this.nofparen)
-                            throw new RuntimeException("Internal Error: Reference number must be more than zero: "+cop.refNumber);
-                        matchp = con.match.getBeginning(cop.refNumber) >= 0
-                                 && con.match.getEnd(cop.refNumber) >= 0;
-                    } else {
-                        matchp = 0 <= this. matchString (con, cop.condition, offset, dx, opts);
-                    }
-
-                    if (matchp) {
-                        op = cop.yes;
-                    } else if (cop.no != null) {
-                        op = cop.no;
-                    } else {
-                        op = cop.next;
-                    }
-                }
-                break;
-
-            default:
-                throw new RuntimeException("Unknown operation type: "+op.type);
-            } // switch (op.type)
-        } // while
-    }
-
-    private static final int getPreviousWordType(String  target, int begin, int end,
-                                                 int offset, int opts) {
-        int ret = getWordType(target, begin, end, --offset, opts);
-        while (ret == WT_IGNORE)
-            ret = getWordType(target, begin, end, --offset, opts);
-        return ret;
-    }
-
-    private static final int getWordType(String  target, int begin, int end,
-                                         int offset, int opts) {
-        if (offset < begin || offset >= end)  return WT_OTHER;
-        return getWordType0( target .charAt(  offset ) , opts);
-    }
-
-
-    private static final boolean regionMatches(String text, int offset, int limit,
-                                               String part, int partlen) {
-        if (limit-offset < partlen)  return false;
-        return text.regionMatches(offset, part, 0, partlen);
-    }
-
-    private static final boolean regionMatches(String text, int offset, int limit,
-                                               int offset2, int partlen) {
-        if (limit-offset < partlen)  return false;
-        return text.regionMatches(offset, text, offset2, partlen);
-    }
-
-    private static final boolean regionMatchesIgnoreCase(String text, int offset, int limit,
-                                                         String part, int partlen) {
-        return text.regionMatches(true, offset, part, 0, partlen);
-    }
-
-    private static final boolean regionMatchesIgnoreCase(String text, int offset, int limit,
-                                                         int offset2, int partlen) {
-        if (limit-offset < partlen)  return false;
-        return text.regionMatches(true, offset, text, offset2, partlen);
-    }
-
-
-
-
-
-
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not.
-     *
-     * @return true if the target is matched to this regular expression.
-     */
-    public boolean matches(CharacterIterator target) {
-        return this.matches(target, (Match)null);
-    }
-
-
-    /**
-     * Checks whether the <var>target</var> text <strong>contains</strong> this pattern or not.
-     *
-     * @param match A Match instance for storing matching result.
-     * @return Offset of the start position in <VAR>target</VAR>; or -1 if not match.
-     */
-    public boolean matches(CharacterIterator  target, Match match) {
-        int start = target.getBeginIndex();
-        int end = target.getEndIndex();
-
-
-
-        synchronized (this) {
-            if (this.operations == null)
-                this.prepare();
-            if (this.context == null)
-                this.context = new Context();
-        }
-        Context con = null;
-        synchronized (this.context) {
-            con = this.context.inuse ? new Context() : this.context;
-            con.reset(target, start, end, this.numberOfClosures);
-        }
-        if (match != null) {
-            match.setNumberOfGroups(this.nofparen);
-            match.setSource(target);
-        } else if (this.hasBackReferences) {
-            match = new Match();
-            match.setNumberOfGroups(this.nofparen);
-            // Need not to call setSource() because
-            // a caller can not access this match instance.
-        }
-        con.match = match;
-
-        if (this.isSet(this.options, XMLSCHEMA_MODE)) {
-            int matchEnd = this. matchCharacterIterator (con, this.operations, con.start, 1, this.options);
-            //System.err.println("DEBUG: matchEnd="+matchEnd);
-            if (matchEnd == con.limit) {
-                if (con.match != null) {
-                    con.match.setBeginning(0, con.start);
-                    con.match.setEnd(0, matchEnd);
-                }
-                con.inuse = false;
-                return true;
-            }
-            return false;
-        }
-
-        /*
-         * The pattern has only fixed string.
-         * The engine uses Boyer-Moore.
-         */
-        if (this.fixedStringOnly) {
-            //System.err.println("DEBUG: fixed-only: "+this.fixedString);
-            int o = this.fixedStringTable.matches(target, con.start, con.limit);
-            if (o >= 0) {
-                if (con.match != null) {
-                    con.match.setBeginning(0, o);
-                    con.match.setEnd(0, o+this.fixedString.length());
-                }
-                con.inuse = false;
-                return true;
-            }
-            con.inuse = false;
-            return false;
-        }
-
-        /*
-         * The pattern contains a fixed string.
-         * The engine checks with Boyer-Moore whether the text contains the fixed string or not.
-         * If not, it return with false.
-         */
-        if (this.fixedString != null) {
-            int o = this.fixedStringTable.matches(target, con.start, con.limit);
-            if (o < 0) {
-                //System.err.println("Non-match in fixed-string search.");
-                con.inuse = false;
-                return false;
-            }
-        }
-
-        int limit = con.limit-this.minlength;
-        int matchStart;
-        int matchEnd = -1;
-
-        /*
-         * Checks whether the expression starts with ".*".
-         */
-        if (this.operations != null
-            && this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) {
-            if (isSet(this.options, SINGLE_LINE)) {
-                matchStart = con.start;
-                matchEnd = this. matchCharacterIterator (con, this.operations, con.start, 1, this.options);
-            } else {
-                boolean previousIsEOL = true;
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target .setIndex(  matchStart ) ;
-                    if (isEOLChar(ch)) {
-                        previousIsEOL = true;
-                    } else {
-                        if (previousIsEOL) {
-                            if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
-                                                                               matchStart, 1, this.options)))
-                                break;
-                        }
-                        previousIsEOL = false;
-                    }
-                }
-            }
-        }
-
-        /*
-         * Optimization against the first character.
-         */
-        else if (this.firstChar != null) {
-            //System.err.println("DEBUG: with firstchar-matching: "+this.firstChar);
-            RangeToken range = this.firstChar;
-            if (this.isSet(this.options, IGNORE_CASE)) {
-                range = this.firstChar.getCaseInsensitiveToken();
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target .setIndex(  matchStart ) ;
-                    if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
-                        ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  matchStart+1 ) );
-                        if (!range.match(ch))  continue;
-                    } else {
-                        if (!range.match(ch)) {
-                            char ch1 = Character.toUpperCase((char)ch);
-                            if (!range.match(ch1))
-                                if (!range.match(Character.toLowerCase(ch1)))
-                                    continue;
-                        }
-                    }
-                    if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
-                                                                       matchStart, 1, this.options)))
-                        break;
-                }
-            } else {
-                for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                    int ch =  target .setIndex(  matchStart ) ;
-                    if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
-                        ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  matchStart+1 ) );
-                    if (!range.match(ch))  continue;
-                    if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,
-                                                                       matchStart, 1, this.options)))
-                        break;
-                }
-            }
-        }
-
-        /*
-         * Straightforward matching.
-         */
-        else {
-            for (matchStart = con.start;  matchStart <= limit;  matchStart ++) {
-                if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations, matchStart, 1, this.options)))
-                    break;
-            }
-        }
-
-        if (matchEnd >= 0) {
-            if (con.match != null) {
-                con.match.setBeginning(0, matchStart);
-                con.match.setEnd(0, matchEnd);
-            }
-            con.inuse = false;
-            return true;
-        } else {
-            con.inuse = false;
-            return false;
-        }
-    }
-
-    /**
-     * @return -1 when not match; offset of the end of matched string when match.
-     */
-    private int matchCharacterIterator (Context con, Op op, int offset, int dx, int opts) {
-
-
-        CharacterIterator target = con.ciTarget;
-
-
-
-
-
-
-        while (true) {
-            if (op == null)
-                return offset;
-            if (offset > con.limit || offset < con.start)
-                return -1;
-            switch (op.type) {
-            case Op.CHAR:
-                if (isSet(opts, IGNORE_CASE)) {
-                    int ch = op.getData();
-                    if (dx > 0) {
-                        if (offset >= con.limit || !matchIgnoreCase(ch,  target .setIndex(  offset ) ))
-                            return -1;
-                        offset ++;
-                    } else {
-                        int o1 = offset-1;
-                        if (o1 >= con.limit || o1 < 0 || !matchIgnoreCase(ch,  target .setIndex(  o1 ) ))
-                            return -1;
-                        offset = o1;
-                    }
-                } else {
-                    int ch = op.getData();
-                    if (dx > 0) {
-                        if (offset >= con.limit || ch !=  target .setIndex(  offset ) )
-                            return -1;
-                        offset ++;
-                    } else {
-                        int o1 = offset-1;
-                        if (o1 >= con.limit || o1 < 0 || ch !=  target .setIndex(  o1 ) )
-                            return -1;
-                        offset = o1;
-                    }
-                }
-                op = op.next;
-                break;
-
-            case Op.DOT:
-                if (dx > 0) {
-                    if (offset >= con.limit)
-                        return -1;
-                    int ch =  target .setIndex(  offset ) ;
-                    if (isSet(opts, SINGLE_LINE)) {
-                        if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                            offset ++;
-                    } else {
-                        if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                            ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  ++offset ) );
-                        if (isEOLChar(ch))
-                            return -1;
-                    }
-                    offset ++;
-                } else {
-                    int o1 = offset-1;
-                    if (o1 >= con.limit || o1 < 0)
-                        return -1;
-                    int ch =  target .setIndex(  o1 ) ;
-                    if (isSet(opts, SINGLE_LINE)) {
-                        if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                            o1 --;
-                    } else {
-                        if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                            ch = REUtil.composeFromSurrogates( target .setIndex(  --o1 ) , ch);
-                        if (!isEOLChar(ch))
-                            return -1;
-                    }
-                    offset = o1;
-                }
-                op = op.next;
-                break;
-
-            case Op.RANGE:
-            case Op.NRANGE:
-                if (dx > 0) {
-                    if (offset >= con.limit)
-                        return -1;
-                    int ch =  target .setIndex(  offset ) ;
-                    if (REUtil.isHighSurrogate(ch) && offset+1 < con.limit)
-                        ch = REUtil.composeFromSurrogates(ch,  target .setIndex(  ++offset ) );
-                    RangeToken tok = op.getToken();
-                    if (isSet(opts, IGNORE_CASE)) {
-                        tok = tok.getCaseInsensitiveToken();
-                        if (!tok.match(ch)) {
-                            if (ch >= 0x10000)  return -1;
-                            char uch;
-                            if (!tok.match(uch = Character.toUpperCase((char)ch))
-                                && !tok.match(Character.toLowerCase(uch)))
-                                return -1;
-                        }
-                    } else {
-                        if (!tok.match(ch))  return -1;
-                    }
-                    offset ++;
-                } else {
-                    int o1 = offset-1;
-                    if (o1 >= con.limit || o1 < 0)
-                        return -1;
-                    int ch =  target .setIndex(  o1 ) ;
-                    if (REUtil.isLowSurrogate(ch) && o1-1 >= 0)
-                        ch = REUtil.composeFromSurrogates( target .setIndex(  --o1 ) , ch);
-                    RangeToken tok = op.getToken();
-                    if (isSet(opts, IGNORE_CASE)) {
-                        tok = tok.getCaseInsensitiveToken();
-                        if (!tok.match(ch)) {
-                            if (ch >= 0x10000)  return -1;
-                            char uch;
-                            if (!tok.match(uch = Character.toUpperCase((char)ch))
-                                && !tok.match(Character.toLowerCase(uch)))
-                                return -1;
-                        }
-                    } else {
-                        if (!tok.match(ch))  return -1;
-                    }
-                    offset = o1;
-                }
-                op = op.next;
-                break;
-
-            case Op.ANCHOR:
-                boolean go = false;
-                switch (op.getData()) {
-                case '^':
-                    if (isSet(opts, MULTIPLE_LINES)) {
-                        if (!(offset == con.start
-                              || offset > con.start && isEOLChar( target .setIndex(  offset-1 ) )))
-                            return -1;
-                    } else {
-                        if (offset != con.start)
-                            return -1;
-                    }
-                    break;
-
-                case '@':                         // Internal use only.
-                    // The @ always matches line beginnings.
-                    if (!(offset == con.start
-                          || offset > con.start && isEOLChar( target .setIndex(  offset-1 ) )))
-                        return -1;
-                    break;
-
-                case '$':
-                    if (isSet(opts, MULTIPLE_LINES)) {
-                        if (!(offset == con.limit
-                              || offset < con.limit && isEOLChar( target .setIndex(  offset ) )))
-                            return -1;
-                    } else {
-                        if (!(offset == con.limit
-                              || offset+1 == con.limit && isEOLChar( target .setIndex(  offset ) )
-                              || offset+2 == con.limit &&  target .setIndex(  offset )  == CARRIAGE_RETURN
-                              &&  target .setIndex(  offset+1 )  == LINE_FEED))
-                            return -1;
-                    }
-                    break;
-
-                case 'A':
-                    if (offset != con.start)  return -1;
-                    break;
-
-                case 'Z':
-                    if (!(offset == con.limit
-                          || offset+1 == con.limit && isEOLChar( target .setIndex(  offset ) )
-                          || offset+2 == con.limit &&  target .setIndex(  offset )  == CARRIAGE_RETURN
-                          &&  target .setIndex(  offset+1 )  == LINE_FEED))
-                        return -1;
-                    break;
-
-                case 'z':
-                    if (offset != con.limit)  return -1;
-                    break;
-
-                case 'b':
-                    if (con.length == 0)  return -1;
-                    {
-                        int after = getWordType(target, con.start, con.limit, offset, opts);
-                        if (after == WT_IGNORE)  return -1;
-                        int before = getPreviousWordType(target, con.start, con.limit, offset, opts);
-                        if (after == before)  return -1;
-                    }
-                    break;
-
-                case 'B':
-                    if (con.length == 0)
-                        go = true;
-                    else {
-                        int after = getWordType(target, con.start, con.limit, offset, opts);
-                        go = after == WT_IGNORE
-                             || after == getPreviousWordType(target, con.start, con.limit, offset, opts);
-                    }
-                    if (!go)  return -1;
-                    break;
-
-                case '<':
-                    if (con.length == 0 || offset == con.limit)  return -1;
-                    if (getWordType(target, con.start, con.limit, offset, opts) != WT_LETTER
-                        || getPreviousWordType(target, con.start, con.limit, offset, opts) != WT_OTHER)
-                        return -1;
-                    break;
-
-                case '>':
-                    if (con.length == 0 || offset == con.start)  return -1;
-                    if (getWordType(target, con.start, con.limit, offset, opts) != WT_OTHER
-                        || getPreviousWordType(target, con.start, con.limit, offset, opts) != WT_LETTER)
-                        return -1;
-                    break;
-                } // switch anchor type
-                op = op.next;
-                break;
-
-            case Op.BACKREFERENCE:
-                {
-                    int refno = op.getData();
-                    if (refno <= 0 || refno >= this.nofparen)
-                        throw new RuntimeException("Internal Error: Reference number must be more than zero: "+refno);
-                    if (con.match.getBeginning(refno) < 0
-                        || con.match.getEnd(refno) < 0)
-                        return -1;                // ********
-                    int o2 = con.match.getBeginning(refno);
-                    int literallen = con.match.getEnd(refno)-o2;
-                    if (!isSet(opts, IGNORE_CASE)) {
-                        if (dx > 0) {
-                            if (!regionMatches(target, offset, con.limit, o2, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatches(target, offset-literallen, con.limit, o2, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    } else {
-                        if (dx > 0) {
-                            if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
-                                                         o2, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    }
-                }
-                op = op.next;
-                break;
-            case Op.STRING:
-                {
-                    String literal = op.getString();
-                    int literallen = literal.length();
-                    if (!isSet(opts, IGNORE_CASE)) {
-                        if (dx > 0) {
-                            if (!regionMatches(target, offset, con.limit, literal, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatches(target, offset-literallen, con.limit, literal, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    } else {
-                        if (dx > 0) {
-                            if (!regionMatchesIgnoreCase(target, offset, con.limit, literal, literallen))
-                                return -1;
-                            offset += literallen;
-                        } else {
-                            if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,
-                                                         literal, literallen))
-                                return -1;
-                            offset -= literallen;
-                        }
-                    }
-                }
-                op = op.next;
-                break;
-
-            case Op.CLOSURE:
-                {
-                    /*
-                     * Saves current position to avoid
-                     * zero-width repeats.
-                     */
-                    int id = op.getData();
-                    if (id >= 0) {
-                        int previousOffset = con.offsets[id];
-                        if (previousOffset < 0 || previousOffset != offset) {
-                            con.offsets[id] = offset;
-                        } else {
-                            con.offsets[id] = -1;
-                            op = op.next;
-                            break;
-                        }
-                    }
-                    
-                    int ret = this. matchCharacterIterator (con, op.getChild(), offset, dx, opts);
-                    if (id >= 0)  con.offsets[id] = -1;
-                    if (ret >= 0)  return ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.QUESTION:
-                {
-                    int ret = this. matchCharacterIterator (con, op.getChild(), offset, dx, opts);
-                    if (ret >= 0)  return ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.NONGREEDYCLOSURE:
-            case Op.NONGREEDYQUESTION:
-                {
-                    int ret = this. matchCharacterIterator (con, op.next, offset, dx, opts);
-                    if (ret >= 0)  return ret;
-                    op = op.getChild();
-                }
-                break;
-
-            case Op.UNION:
-                for (int i = 0;  i < op.size();  i ++) {
-                    int ret = this. matchCharacterIterator (con, op.elementAt(i), offset, dx, opts);
-                    if (DEBUG) {
-                        System.err.println("UNION: "+i+", ret="+ret);
-                    }
-                    if (ret == con.length)  return ret;
-                }
-                return -1;
-
-            case Op.CAPTURE:
-                int refno = op.getData();
-                if (con.match != null && refno > 0) {
-                    int save = con.match.getBeginning(refno);
-                    con.match.setBeginning(refno, offset);
-                    int ret = this. matchCharacterIterator (con, op.next, offset, dx, opts);
-                    if (ret < 0)  con.match.setBeginning(refno, save);
-                    return ret;
-                } else if (con.match != null && refno < 0) {
-                    int index = -refno;
-                    int save = con.match.getEnd(index);
-                    con.match.setEnd(index, offset);
-                    int ret = this. matchCharacterIterator (con, op.next, offset, dx, opts);
-                    if (ret < 0)  con.match.setEnd(index, save);
-                    return ret;
-                }
-                op = op.next;
-                break;
-
-            case Op.LOOKAHEAD:
-                if (0 > this. matchCharacterIterator (con, op.getChild(), offset, 1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.NEGATIVELOOKAHEAD:
-                if (0 <= this. matchCharacterIterator (con, op.getChild(), offset, 1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.LOOKBEHIND:
-                if (0 > this. matchCharacterIterator (con, op.getChild(), offset, -1, opts))  return -1;
-                op = op.next;
-                break;
-            case Op.NEGATIVELOOKBEHIND:
-                if (0 <= this. matchCharacterIterator (con, op.getChild(), offset, -1, opts))  return -1;
-                op = op.next;
-                break;
-
-            case Op.INDEPENDENT:
-                {
-                    int ret = this. matchCharacterIterator (con, op.getChild(), offset, dx, opts);
-                    if (ret < 0)  return ret;
-                    offset = ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.MODIFIER:
-                {
-                    int localopts = opts;
-                    localopts |= op.getData();
-                    localopts &= ~op.getData2();
-                    //System.err.println("MODIFIER: "+Integer.toString(opts, 16)+" -> "+Integer.toString(localopts, 16));
-                    int ret = this. matchCharacterIterator (con, op.getChild(), offset, dx, localopts);
-                    if (ret < 0)  return ret;
-                    offset = ret;
-                    op = op.next;
-                }
-                break;
-
-            case Op.CONDITION:
-                {
-                    Op.ConditionOp cop = (Op.ConditionOp)op;
-                    boolean matchp = false;
-                    if (cop.refNumber > 0) {
-                        if (cop.refNumber >= this.nofparen)
-                            throw new RuntimeException("Internal Error: Reference number must be more than zero: "+cop.refNumber);
-                        matchp = con.match.getBeginning(cop.refNumber) >= 0
-                                 && con.match.getEnd(cop.refNumber) >= 0;
-                    } else {
-                        matchp = 0 <= this. matchCharacterIterator (con, cop.condition, offset, dx, opts);
-                    }
-
-                    if (matchp) {
-                        op = cop.yes;
-                    } else if (cop.no != null) {
-                        op = cop.no;
-                    } else {
-                        op = cop.next;
-                    }
-                }
-                break;
-
-            default:
-                throw new RuntimeException("Unknown operation type: "+op.type);
-            } // switch (op.type)
-        } // while
-    }
-
-    private static final int getPreviousWordType(CharacterIterator  target, int begin, int end,
-                                                 int offset, int opts) {
-        int ret = getWordType(target, begin, end, --offset, opts);
-        while (ret == WT_IGNORE)
-            ret = getWordType(target, begin, end, --offset, opts);
-        return ret;
-    }
-
-    private static final int getWordType(CharacterIterator  target, int begin, int end,
-                                         int offset, int opts) {
-        if (offset < begin || offset >= end)  return WT_OTHER;
-        return getWordType0( target .setIndex(  offset ) , opts);
-    }
-
-
-
-    private static final boolean regionMatches(CharacterIterator  target, int offset, int limit,
-                                               String part, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = 0;
-        while (partlen-- > 0) {
-            if ( target .setIndex(  offset++ )  != part.charAt(i++))
-                return false;
-        }
-        return true;
-    }
-
-    private static final boolean regionMatches(CharacterIterator  target, int offset, int limit,
-                                               int offset2, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = offset2;
-        while (partlen-- > 0) {
-            if ( target .setIndex(  offset++ )  !=  target .setIndex(  i++ ) )
-                return false;
-        }
-        return true;
-    }
-
-    /**
-     * @see java.lang.String#regionMatches
-     */
-    private static final boolean regionMatchesIgnoreCase(CharacterIterator  target, int offset, int limit,
-                                                         String part, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = 0;
-        while (partlen-- > 0) {
-            char ch1 =  target .setIndex(  offset++ ) ;
-            char ch2 = part.charAt(i++);
-            if (ch1 == ch2)
-                continue;
-            char uch1 = Character.toUpperCase(ch1);
-            char uch2 = Character.toUpperCase(ch2);
-            if (uch1 == uch2)
-                continue;
-            if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
-                return false;
-        }
-        return true;
-    }
-
-    private static final boolean regionMatchesIgnoreCase(CharacterIterator  target, int offset, int limit,
-                                                         int offset2, int partlen) {
-        if (offset < 0)  return false;
-        if (limit-offset < partlen)
-            return false;
-        int i = offset2;
-        while (partlen-- > 0) {
-            char ch1 =  target .setIndex(  offset++ ) ;
-            char ch2 =  target .setIndex(  i++ ) ;
-            if (ch1 == ch2)
-                continue;
-            char uch1 = Character.toUpperCase(ch1);
-            char uch2 = Character.toUpperCase(ch2);
-            if (uch1 == uch2)
-                continue;
-            if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
-                return false;
-        }
-        return true;
-    }
-
-
-
-
-    // ================================================================
-
-    /**
-     * A regular expression.
-     * @serial
-     */
-    String regex;
-    /**
-     * @serial
-     */
-    int options;
-
-    /**
-     * The number of parenthesis in the regular expression.
-     * @serial
-     */
-    int nofparen;
-    /**
-     * Internal representation of the regular expression.
-     * @serial
-     */
-    Token tokentree;
-
-    boolean hasBackReferences = false;
-
-    transient int minlength;
-    transient Op operations = null;
-    transient int numberOfClosures;
-    transient Context context = null;
-    transient RangeToken firstChar = null;
-
-    transient String fixedString = null;
-    transient int fixedStringOptions;
-    transient BMPattern fixedStringTable = null;
-    transient boolean fixedStringOnly = false;
-
-
-    static final class Context {
-        CharacterIterator ciTarget;
-        String strTarget;
-        char[] charTarget;
-        int start;
-        int limit;
-        int length;
-        Match match;
-        boolean inuse = false;
-        int[] offsets;
-
-        Context() {
-        }
-
-        private void resetCommon(int nofclosures) {
-            this.length = this.limit-this.start;
-            this.inuse = true;
-            this.match = null;
-            if (this.offsets == null || this.offsets.length != nofclosures)
-                this.offsets = new int[nofclosures];
-            for (int i = 0;  i < nofclosures;  i ++)  this.offsets[i] = -1;
-        }
-        void reset(CharacterIterator target, int start, int limit, int nofclosures) {
-            this.ciTarget = target;
-            this.start = start;
-            this.limit = limit;
-            this.resetCommon(nofclosures);
-        }
-        void reset(String target, int start, int limit, int nofclosures) {
-            this.strTarget = target;
-            this.start = start;
-            this.limit = limit;
-            this.resetCommon(nofclosures);
-        }
-        void reset(char[] target, int start, int limit, int nofclosures) {
-            this.charTarget = target;
-            this.start = start;
-            this.limit = limit;
-            this.resetCommon(nofclosures);
-        }
-    }
-
-    /**
-     * Prepares for matching.  This method is called just before starting matching.
-     */
-    void prepare() {
-        if (Op.COUNT)  Op.nofinstances = 0;
-        this.compile(this.tokentree);
-        /*
-        if  (this.operations.type == Op.CLOSURE && this.operations.getChild().type == Op.DOT) { // .*
-            Op anchor = Op.createAnchor(isSet(this.options, SINGLE_LINE) ? 'A' : '@');
-            anchor.next = this.operations;
-            this.operations = anchor;
-        }
-        */
-        if (Op.COUNT)  System.err.println("DEBUG: The number of operations: "+Op.nofinstances);
-
-        this.minlength = this.tokentree.getMinLength();
-
-        this.firstChar = null;
-        if (!isSet(this.options, PROHIBIT_HEAD_CHARACTER_OPTIMIZATION)
-            && !isSet(this.options, XMLSCHEMA_MODE)) {
-            RangeToken firstChar = Token.createRange();
-            int fresult = this.tokentree.analyzeFirstCharacter(firstChar, this.options);
-            if (fresult == Token.FC_TERMINAL) {
-                firstChar.compactRanges();
-                this.firstChar = firstChar;
-                if (DEBUG)
-                    System.err.println("DEBUG: Use the first character optimization: "+firstChar);
-            }
-        }
-
-        if (this.operations != null
-            && (this.operations.type == Op.STRING || this.operations.type == Op.CHAR)
-            && this.operations.next == null) {
-            if (DEBUG)
-                System.err.print(" *** Only fixed string! *** ");
-            this.fixedStringOnly = true;
-            if (this.operations.type == Op.STRING)
-                this.fixedString = this.operations.getString();
-            else if (this.operations.getData() >= 0x10000) { // Op.CHAR
-                this.fixedString = REUtil.decomposeToSurrogates(this.operations.getData());
-            } else {
-                char[] ac = new char[1];
-                ac[0] = (char)this.operations.getData();
-                this.fixedString = new String(ac);
-            }
-            this.fixedStringOptions = this.options;
-            this.fixedStringTable = new BMPattern(this.fixedString, 256,
-                                                  isSet(this.fixedStringOptions, IGNORE_CASE));
-        } else if (!isSet(this.options, PROHIBIT_FIXED_STRING_OPTIMIZATION)
-                   && !isSet(this.options, XMLSCHEMA_MODE)) {
-            Token.FixedStringContainer container = new Token.FixedStringContainer();
-            this.tokentree.findFixedString(container, this.options);
-            this.fixedString = container.token == null ? null : container.token.getString();
-            this.fixedStringOptions = container.options;
-            if (this.fixedString != null && this.fixedString.length() < 2)
-                this.fixedString = null;
-            // This pattern has a fixed string of which length is more than one.
-            if (this.fixedString != null) {
-                this.fixedStringTable = new BMPattern(this.fixedString, 256,
-                                                      isSet(this.fixedStringOptions, IGNORE_CASE));
-                if (DEBUG) {
-                    System.err.println("DEBUG: The longest fixed string: "+this.fixedString.length()
-                                       +"/" //+this.fixedString
-                                       +"/"+REUtil.createOptionString(this.fixedStringOptions));
-                    System.err.print("String: ");
-                    REUtil.dumpString(this.fixedString);
-                }
-            }
-        }
-    }
-
-    /**
-     * An option.
-     * If you specify this option, <span class="REGEX"><kbd>(</kbd><var>X</var><kbd>)</kbd></span>
-     * captures matched text, and <span class="REGEX"><kbd>(:?</kbd><var>X</var><kbd>)</kbd></span>
-     * does not capture.
-     *
-     * @see #RegularExpression(java.lang.String,int)
-     * @see #setPattern(java.lang.String,int)
-    static final int MARK_PARENS = 1<<0;
-     */
-
-    /**
-     * "i"
-     */
-    static final int IGNORE_CASE = 1<<1;
-
-    /**
-     * "s"
-     */
-    static final int SINGLE_LINE = 1<<2;
-
-    /**
-     * "m"
-     */
-    static final int MULTIPLE_LINES = 1<<3;
-
-    /**
-     * "x"
-     */
-    static final int EXTENDED_COMMENT = 1<<4;
-
-    /**
-     * This option redefines <span class="REGEX"><kbd>\d \D \w \W \s \S</kbd></span>.
-     *
-     * @see #RegularExpression(java.lang.String,int)
-     * @see #setPattern(java.lang.String,int)
-     * @see #UNICODE_WORD_BOUNDARY
-     */
-    static final int USE_UNICODE_CATEGORY = 1<<5; // "u"
-
-    /**
-     * An option.
-     * This enables to process locale-independent word boundary for <span class="REGEX"><kbd>\b \B \&lt; \></kbd></span>.
-     * <p>By default, the engine considers a position between a word character
-     * (<span class="REGEX"><Kbd>\w</kbd></span>) and a non word character
-     * is a word boundary.
-     * <p>By this option, the engine checks word boundaries with the method of
-     * 'Unicode Regular Expression Guidelines' Revision 4.
-     *
-     * @see #RegularExpression(java.lang.String,int)
-     * @see #setPattern(java.lang.String,int)
-     */
-    static final int UNICODE_WORD_BOUNDARY = 1<<6; // "w"
-
-    /**
-     * "H"
-     */
-    static final int PROHIBIT_HEAD_CHARACTER_OPTIMIZATION = 1<<7;
-    /**
-     * "F"
-     */
-    static final int PROHIBIT_FIXED_STRING_OPTIMIZATION = 1<<8;
-    /**
-     * "X". XML Schema mode.
-     */
-    static final int XMLSCHEMA_MODE = 1<<9;
-    /**
-     * ",".
-     */
-    static final int SPECIAL_COMMA = 1<<10;
-
-
-    private static final boolean isSet(int options, int flag) {
-        return (options & flag) == flag;
-    }
-
-    /**
-     * Creates a new RegularExpression instance.
-     *
-     * @param regex A regular expression
-     * @exception org.apache.xerces.utils.regex.ParseException <VAR>regex</VAR> is not conforming to the syntax.
-     */
-    public RegularExpression(String regex) throws ParseException {
-        this.setPattern(regex, null);
-    }
-
-    /**
-     * Creates a new RegularExpression instance with options.
-     *
-     * @param regex A regular expression
-     * @param options A String consisted of "i" "m" "s" "u" "w" "," "X"
-     * @exception org.apache.xerces.utils.regex.ParseException <VAR>regex</VAR> is not conforming to the syntax.
-     */
-    public RegularExpression(String regex, String options) throws ParseException {
-        this.setPattern(regex, options);
-    }
-
-    RegularExpression(String regex, Token tok, int parens, boolean hasBackReferences, int options) {
-        this.regex = regex;
-        this.tokentree = tok;
-        this.nofparen = parens;
-        this.options = options;
-        this.hasBackReferences = hasBackReferences;
-    }
-
-    /**
-     *
-     */
-    public void setPattern(String newPattern) throws ParseException {
-        this.setPattern(newPattern, this.options);
-    }
-
-    private void setPattern(String newPattern, int options) throws ParseException {
-        this.regex = newPattern;
-        this.options = options;
-        RegexParser rp = this.isSet(this.options, RegularExpression.XMLSCHEMA_MODE)
-                         ? new ParserForXMLSchema() : new RegexParser();
-        this.tokentree = rp.parse(this.regex, this.options);
-        this.nofparen = rp.parennumber;
-        this.hasBackReferences = rp.hasBackReferences;
-
-        this.operations = null;
-        this.context = null;
-    }
-    /**
-     *
-     */
-    public void setPattern(String newPattern, String options) throws ParseException {
-        this.setPattern(newPattern, REUtil.parseOptions(options));
-    }
-
-    /**
-     *
-     */
-    public String getPattern() {
-        return this.regex;
-    }
-
-    /**
-     * Represents this instence in String.
-     */
-    public String toString() {
-        return this.tokentree.toString(this.options);
-    }
-
-    /**
-     * Returns a option string.
-     * The order of letters in it may be different from a string specified
-     * in a constructor or <code>setPattern()</code>.
-     *
-     * @see #RegularExpression(java.lang.String,java.lang.String)
-     * @see #setPattern(java.lang.String,java.lang.String)
-     */
-    public String getOptions() {
-        return REUtil.createOptionString(this.options);
-    }
-
-    /**
-     *  Return true if patterns are the same and the options are equivalent.
-     */
-    public boolean equals(Object obj) {
-        if (obj == null)  return false;
-        if (!(obj instanceof RegularExpression))
-            return false;
-        RegularExpression r = (RegularExpression)obj;
-        return this.regex.equals(r.regex) && this.options == r.options;
-    }
-
-    boolean equals(String pattern, int options) {
-        return this.regex.equals(pattern) && this.options == options;
-    }
-
-    /**
-     *
-     */
-    public int hashCode() {
-        return (this.regex+"/"+this.getOptions()).hashCode();
-    }
-
-    /**
-     * Return the number of regular expression groups.
-     * This method returns 1 when the regular expression has no capturing-parenthesis.
-     *
-     */
-    public int getNumberOfGroups() {
-        return this.nofparen;
-    }
-
-    // ================================================================
-
-    private static final int WT_IGNORE = 0;
-    private static final int WT_LETTER = 1;
-    private static final int WT_OTHER = 2;
-    transient static Token wordchar = null;
-    private static final int getWordType0(char ch, int opts) {
-        if (!isSet(opts, UNICODE_WORD_BOUNDARY)) {
-            if (isSet(opts, USE_UNICODE_CATEGORY)) {
-                if (RegularExpression.wordchar == null)
-                    RegularExpression.wordchar = Token.getRange("IsWord", true);
-                return RegularExpression.wordchar.match(ch) ? WT_LETTER : WT_OTHER;
-            }
-            return isWordChar(ch) ? WT_LETTER : WT_OTHER;
-        }
-
-        switch (Character.getType(ch)) {
-        case Character.UPPERCASE_LETTER:      // L
-        case Character.LOWERCASE_LETTER:      // L
-        case Character.TITLECASE_LETTER:      // L
-        case Character.MODIFIER_LETTER:       // L
-        case Character.OTHER_LETTER:          // L
-        case Character.LETTER_NUMBER:         // N
-        case Character.DECIMAL_DIGIT_NUMBER:  // N
-        case Character.OTHER_NUMBER:          // N
-        case Character.COMBINING_SPACING_MARK: // Mc
-            return WT_LETTER;
-
-        case Character.FORMAT:                // Cf
-        case Character.NON_SPACING_MARK:      // Mn
-        case Character.ENCLOSING_MARK:        // Mc
-            return WT_IGNORE;
-
-        case Character.CONTROL:               // Cc
-            switch (ch) {
-            case '\t':
-            case '\n':
-            case '\u000B':
-            case '\f':
-            case '\r':
-                return WT_OTHER;
-            default:
-                return WT_IGNORE;
-            }
-
-        default:
-            return WT_OTHER;
-        }
-    }
-
-    // ================================================================
-
-    static final int LINE_FEED = 0x000A;
-    static final int CARRIAGE_RETURN = 0x000D;
-    static final int LINE_SEPARATOR = 0x2028;
-    static final int PARAGRAPH_SEPARATOR = 0x2029;
-
-    private static final boolean isEOLChar(int ch) {
-        return ch == LINE_FEED || ch == CARRIAGE_RETURN || ch == LINE_SEPARATOR
-        || ch == PARAGRAPH_SEPARATOR;
-    }
-
-    private static final boolean isWordChar(int ch) { // Legacy word characters
-        if (ch == '_')  return true;
-        if (ch < '0')  return false;
-        if (ch > 'z')  return false;
-        if (ch <= '9')  return true;
-        if (ch < 'A')  return false;
-        if (ch <= 'Z')  return true;
-        if (ch < 'a')  return false;
-        return true;
-    }
-
-    private static final boolean matchIgnoreCase(int chardata, int ch) {
-        if (chardata == ch)  return true;
-        if (chardata > 0xffff || ch > 0xffff)  return false;
-        char uch1 = Character.toUpperCase((char)chardata);
-        char uch2 = Character.toUpperCase((char)ch);
-        if (uch1 == uch2)  return true;
-        return Character.toLowerCase(uch1) == Character.toLowerCase(uch2);
-    }
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/Token.java b/src/org/apache/xerces/impl/xpath/regex/Token.java
deleted file mode 100644
index 4c34706..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/Token.java
+++ /dev/null
@@ -1,1502 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xpath.regex;
-
-import java.util.Vector;
-import java.util.Hashtable;
-
-/**
- * This class represents a node in parse tree.
- */
-class Token implements java.io.Serializable {
-    static final boolean COUNTTOKENS = true;
-    static int tokens = 0;
-
-    static final int CHAR = 0;                  // Literal char
-    static final int DOT = 11;                  // .
-    static final int CONCAT = 1;                // XY
-    static final int UNION = 2;                 // X|Y|Z
-    static final int CLOSURE = 3;               // X*
-    static final int RANGE = 4;                 // [a-zA-Z] etc.
-    static final int NRANGE = 5;                // [^a-zA-Z] etc.
-    static final int PAREN = 6;                 // (X) or (?:X)
-    static final int EMPTY = 7;                 //
-    static final int ANCHOR = 8;                // ^ $ \b \B \< \> \A \Z \z
-    static final int NONGREEDYCLOSURE = 9;      // *? +?
-    static final int STRING = 10;               // strings
-    static final int BACKREFERENCE = 12;        // back references
-    static final int LOOKAHEAD = 20;            // (?=...)
-    static final int NEGATIVELOOKAHEAD = 21;    // (?!...)
-    static final int LOOKBEHIND = 22;           // (?<=...)
-    static final int NEGATIVELOOKBEHIND = 23;   // (?<!...)
-    static final int INDEPENDENT = 24;          // (?>...)
-    static final int MODIFIERGROUP = 25;        // (?ims-ims:...)
-    static final int CONDITION = 26;            // (?(...)yes|no)
-
-    static final int UTF16_MAX = 0x10ffff;
-
-    int type;
-
-    static protected Token token_dot;
-    static protected Token token_0to9;
-    static protected Token token_wordchars;
-    static protected Token token_not_0to9;
-    static protected Token token_not_wordchars;
-    static protected Token token_spaces;
-    static protected Token token_not_spaces;
-    static protected Token token_empty;
-    static protected Token token_linebeginning;
-    static protected Token token_linebeginning2;
-    static protected Token token_lineend;
-    static protected Token token_stringbeginning;
-    static protected Token token_stringend;
-    static protected Token token_stringend2;
-    static protected Token token_wordedge;
-    static protected Token token_not_wordedge;
-    static protected Token token_wordbeginning;
-    static protected Token token_wordend;
-    static {
-        Token.token_empty = new Token(Token.EMPTY);
-
-        Token.token_linebeginning = Token.createAnchor('^');
-        Token.token_linebeginning2 = Token.createAnchor('@');
-        Token.token_lineend = Token.createAnchor('$');
-        Token.token_stringbeginning = Token.createAnchor('A');
-        Token.token_stringend = Token.createAnchor('z');
-        Token.token_stringend2 = Token.createAnchor('Z');
-        Token.token_wordedge = Token.createAnchor('b');
-        Token.token_not_wordedge = Token.createAnchor('B');
-        Token.token_wordbeginning = Token.createAnchor('<');
-        Token.token_wordend = Token.createAnchor('>');
-
-        Token.token_dot = new Token(Token.DOT);
-
-        Token.token_0to9 = Token.createRange();
-        Token.token_0to9.addRange('0', '9');
-        Token.token_wordchars = Token.createRange();
-        Token.token_wordchars.addRange('0', '9');
-        Token.token_wordchars.addRange('A', 'Z');
-        Token.token_wordchars.addRange('_', '_');
-        Token.token_wordchars.addRange('a', 'z');
-        Token.token_spaces = Token.createRange();
-        Token.token_spaces.addRange('\t', '\t');
-        Token.token_spaces.addRange('\n', '\n');
-        Token.token_spaces.addRange('\f', '\f');
-        Token.token_spaces.addRange('\r', '\r');
-        Token.token_spaces.addRange(' ', ' ');
-
-        Token.token_not_0to9 = Token.complementRanges(Token.token_0to9);
-        Token.token_not_wordchars = Token.complementRanges(Token.token_wordchars);
-        Token.token_not_spaces = Token.complementRanges(Token.token_spaces);
-    }
-
-    static Token.ParenToken createLook(int type, Token child) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.ParenToken(type, child, 0);
-    }
-    static Token.ParenToken createParen(Token child, int pnumber) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.ParenToken(Token.PAREN, child, pnumber);
-    }
-    static Token.ClosureToken createClosure(Token tok) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.ClosureToken(Token.CLOSURE, tok);
-    }
-    static Token.ClosureToken createNGClosure(Token tok) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.ClosureToken(Token.NONGREEDYCLOSURE, tok);
-    }
-    static Token.ConcatToken createConcat(Token tok1, Token tok2) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.ConcatToken(tok1, tok2);
-    }
-    static Token.UnionToken createConcat() {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.UnionToken(Token.CONCAT); // *** It is not a bug.
-    }
-    static Token.UnionToken createUnion() {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.UnionToken(Token.UNION);
-    }
-    static Token createEmpty() {
-        return Token.token_empty;
-    }
-    static RangeToken createRange() {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new RangeToken(Token.RANGE);
-    }
-    static RangeToken createNRange() {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new RangeToken(Token.NRANGE);
-    }
-    static Token.CharToken createChar(int ch) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.CharToken(Token.CHAR, ch);
-    }
-    static private Token.CharToken createAnchor(int ch) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.CharToken(Token.ANCHOR, ch);
-    }
-    static Token.StringToken createBackReference(int refno) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.StringToken(Token.BACKREFERENCE, null, refno);
-    }
-    static Token.StringToken createString(String str) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.StringToken(Token.STRING, str, 0);
-    }
-    static Token.ModifierToken createModifierGroup(Token child, int add, int mask) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.ModifierToken(child, add, mask);
-    }
-    static Token.ConditionToken createCondition(int refno, Token condition,
-                                                Token yespat, Token nopat) {
-        if (COUNTTOKENS)  Token.tokens ++;
-        return new Token.ConditionToken(refno, condition, yespat, nopat);
-    }
-
-    protected Token(int type) {
-        this.type = type;
-    }
-
-    /**
-     * A number of children.
-     */
-    int size() {
-        return 0;
-    }
-    Token getChild(int index) {
-        return null;
-    }
-    void addChild(Token tok) {
-        throw new RuntimeException("Not supported.");
-    }
-
-                                                // for RANGE or NRANGE
-    protected void addRange(int start, int end) {
-        throw new RuntimeException("Not supported.");
-    }
-    protected void sortRanges() {
-        throw new RuntimeException("Not supported.");
-    }
-    protected void compactRanges() {
-        throw new RuntimeException("Not supported.");
-    }
-    protected void mergeRanges(Token tok) {
-        throw new RuntimeException("Not supported.");
-    }
-    protected void subtractRanges(Token tok) {
-        throw new RuntimeException("Not supported.");
-    }
-    protected void intersectRanges(Token tok) {
-        throw new RuntimeException("Not supported.");
-    }
-    static Token complementRanges(Token tok) {
-        return RangeToken.complementRanges(tok);
-    }
-
-
-    void setMin(int min) {                      // for CLOSURE
-    }
-    void setMax(int max) {                      // for CLOSURE
-    }
-    int getMin() {                              // for CLOSURE
-        return -1;
-    }
-    int getMax() {                              // for CLOSURE
-        return -1;
-    }
-    int getReferenceNumber() {                  // for STRING
-        return 0;
-    }
-    String getString() {                        // for STRING
-        return null;
-    }
-
-    int getParenNumber() {
-        return 0;
-    }
-    int getChar() {
-        return -1;
-    }
-
-    public String toString() {
-        return this.toString(0);
-    }
-    public String toString(int options) {
-        return this.type == Token.DOT ? "." : "";
-    }
-
-    /**
-     * How many characters are needed?
-     */
-    final int getMinLength() {
-        switch (this.type) {
-          case CONCAT:
-            int sum = 0;
-            for (int i = 0;  i < this.size();  i ++)
-                sum += this.getChild(i).getMinLength();
-            return sum;
-
-          case CONDITION:
-          case UNION:
-            if (this.size() == 0)
-                return 0;
-            int ret = this.getChild(0).getMinLength();
-            for (int i = 1;  i < this.size();  i ++) {
-                int min = this.getChild(i).getMinLength();
-                if (min < ret)  ret = min;
-            }
-            return ret;
-
-          case CLOSURE:
-          case NONGREEDYCLOSURE:
-            if (this.getMin() >= 0)
-                return this.getMin() * this.getChild(0).getMinLength();
-            return 0;
-
-          case EMPTY:
-          case ANCHOR:
-            return 0;
-
-          case DOT:
-          case CHAR:
-          case RANGE:
-          case NRANGE:
-            return 1;
-
-          case INDEPENDENT:
-          case PAREN:
-          case MODIFIERGROUP:
-            return this.getChild(0).getMinLength();
-
-          case BACKREFERENCE:
-            return 0;                           // *******
-
-          case STRING:
-            return this.getString().length();
-
-          case LOOKAHEAD:
-          case NEGATIVELOOKAHEAD:
-          case LOOKBEHIND:
-          case NEGATIVELOOKBEHIND:
-            return 0;                           // ***** Really?
-
-          default:
-            throw new RuntimeException("Token#getMinLength(): Invalid Type: "+this.type);
-        }
-    }
-
-    final int getMaxLength() {
-        switch (this.type) {
-          case CONCAT:
-            int sum = 0;
-            for (int i = 0;  i < this.size();  i ++) {
-                int d = this.getChild(i).getMaxLength();
-                if (d < 0)  return -1;
-                sum += d;
-            }
-            return sum;
-
-          case CONDITION:
-          case UNION:
-            if (this.size() == 0)
-                return 0;
-            int ret = this.getChild(0).getMaxLength();
-            for (int i = 1;  ret >= 0 && i < this.size();  i ++) {
-                int max = this.getChild(i).getMaxLength();
-                if (max < 0) {                  // infinity
-                    ret = -1;
-                    break;
-                }
-                if (max > ret)  ret = max;
-            }
-            return ret;
-
-          case CLOSURE:
-          case NONGREEDYCLOSURE:
-            if (this.getMax() >= 0)
-                                                // When this.child.getMaxLength() < 0,
-                                                // this returns minus value
-                return this.getMax() * this.getChild(0).getMaxLength();
-            return -1;
-
-          case EMPTY:
-          case ANCHOR:
-            return 0;
-
-          case CHAR:
-            return 1;
-          case DOT:
-          case RANGE:
-          case NRANGE:
-            return 2;
-
-          case INDEPENDENT:
-          case PAREN:
-          case MODIFIERGROUP:
-            return this.getChild(0).getMaxLength();
-
-          case BACKREFERENCE:
-            return -1;                          // ******
-
-          case STRING:
-            return this.getString().length();
-
-          case LOOKAHEAD:
-          case NEGATIVELOOKAHEAD:
-          case LOOKBEHIND:
-          case NEGATIVELOOKBEHIND:
-            return 0;                           // ***** Really?
-
-          default:
-            throw new RuntimeException("Token#getMaxLength(): Invalid Type: "+this.type);
-        }
-    }
-
-    static final int FC_CONTINUE = 0;
-    static final int FC_TERMINAL = 1;
-    static final int FC_ANY = 2;
-    private static final boolean isSet(int options, int flag) {
-        return (options & flag) == flag;
-    }
-    final int analyzeFirstCharacter(RangeToken result, int options) {
-        switch (this.type) {
-          case CONCAT:
-            int ret = FC_CONTINUE;
-            for (int i = 0;  i < this.size();  i ++)
-                if ((ret = this.getChild(i).analyzeFirstCharacter(result, options)) != FC_CONTINUE)
-                    break;
-            return ret;
-
-          case UNION:
-            if (this.size() == 0)
-                return FC_CONTINUE;
-            /*
-             *  a|b|c -> FC_TERMINAL
-             *  a|.|c -> FC_ANY
-             *  a|b|  -> FC_CONTINUE
-             */
-            int ret2 = FC_CONTINUE;
-            boolean hasEmpty = false;
-            for (int i = 0;  i < this.size();  i ++) {
-                ret2 = this.getChild(i).analyzeFirstCharacter(result, options);
-                if (ret2 == FC_ANY)
-                    break;
-                else if (ret2 == FC_CONTINUE)
-                    hasEmpty = true;
-            }
-            return hasEmpty ? FC_CONTINUE : ret2;
-
-          case CONDITION:
-            int ret3 = this.getChild(0).analyzeFirstCharacter(result, options);
-            if (this.size() == 1)  return FC_CONTINUE;
-            if (ret3 == FC_ANY)  return ret3;
-            int ret4 = this.getChild(1).analyzeFirstCharacter(result, options);
-            if (ret4 == FC_ANY)  return ret4;
-            return ret3 == FC_CONTINUE || ret4 == FC_CONTINUE ? FC_CONTINUE : FC_TERMINAL;
-
-          case CLOSURE:
-          case NONGREEDYCLOSURE:
-            this.getChild(0).analyzeFirstCharacter(result, options);
-            return FC_CONTINUE;
-
-          case EMPTY:
-          case ANCHOR:
-            return FC_CONTINUE;
-
-          case CHAR:
-            int ch = this.getChar();
-            result.addRange(ch, ch);
-            if (ch < 0x10000 && isSet(options, RegularExpression.IGNORE_CASE)) {
-                ch = Character.toUpperCase((char)ch);
-                result.addRange(ch, ch);
-                ch = Character.toLowerCase((char)ch);
-                result.addRange(ch, ch);
-            }
-            return FC_TERMINAL;
-
-          case DOT:                             // ****
-            if (isSet(options, RegularExpression.SINGLE_LINE)) {
-                return FC_CONTINUE;             // **** We can not optimize.
-            } else {
-                return FC_CONTINUE;
-                /*
-                result.addRange(0, RegularExpression.LINE_FEED-1);
-                result.addRange(RegularExpression.LINE_FEED+1, RegularExpression.CARRIAGE_RETURN-1);
-                result.addRange(RegularExpression.CARRIAGE_RETURN+1,
-                                RegularExpression.LINE_SEPARATOR-1);
-                result.addRange(RegularExpression.PARAGRAPH_SEPARATOR+1, UTF16_MAX);
-                return 1;
-                */
-            }
-
-          case RANGE:
-            if (isSet(options, RegularExpression.IGNORE_CASE)) {
-                result.mergeRanges(((RangeToken)this).getCaseInsensitiveToken());
-            } else {
-                result.mergeRanges(this);
-            }
-            return FC_TERMINAL;
-
-          case NRANGE:                          // ****
-            if (isSet(options, RegularExpression.IGNORE_CASE)) {
-                result.mergeRanges(Token.complementRanges(((RangeToken)this).getCaseInsensitiveToken()));
-            } else {
-                result.mergeRanges(Token.complementRanges(this));
-            }
-            return FC_TERMINAL;
-
-          case INDEPENDENT:
-          case PAREN:
-            return this.getChild(0).analyzeFirstCharacter(result, options);
-
-          case MODIFIERGROUP:
-            options |= ((ModifierToken)this).getOptions();
-            options &= ~((ModifierToken)this).getOptionsMask();
-            return this.getChild(0).analyzeFirstCharacter(result, options);
-
-          case BACKREFERENCE:
-            result.addRange(0, UTF16_MAX);  // **** We can not optimize.
-            return FC_ANY;
-
-          case STRING:
-            int cha = this.getString().charAt(0);
-            int ch2;
-            if (REUtil.isHighSurrogate(cha)
-                && this.getString().length() >= 2
-                && REUtil.isLowSurrogate((ch2 = this.getString().charAt(1))))
-                cha = REUtil.composeFromSurrogates(cha, ch2);
-            result.addRange(cha, cha);
-            if (cha < 0x10000 && isSet(options, RegularExpression.IGNORE_CASE)) {
-                cha = Character.toUpperCase((char)cha);
-                result.addRange(cha, cha);
-                cha = Character.toLowerCase((char)cha);
-                result.addRange(cha, cha);
-            }
-            return FC_TERMINAL;
-
-          case LOOKAHEAD:
-          case NEGATIVELOOKAHEAD:
-          case LOOKBEHIND:
-          case NEGATIVELOOKBEHIND:
-            return FC_CONTINUE;
-
-          default:
-            throw new RuntimeException("Token#analyzeHeadCharacter(): Invalid Type: "+this.type);
-        }
-    }
-
-    private final boolean isShorterThan(Token tok) {
-        if (tok == null)  return false;
-        /*
-        int mylength;
-        if (this.type == STRING)  mylength = this.getString().length();
-        else if (this.type == CHAR)  mylength = this.getChar() >= 0x10000 ? 2 : 1;
-        else throw new RuntimeException("Internal Error: Illegal type: "+this.type);
-        int otherlength;
-        if (tok.type == STRING)  otherlength = tok.getString().length();
-        else if (tok.type == CHAR)  otherlength = tok.getChar() >= 0x10000 ? 2 : 1;
-        else throw new RuntimeException("Internal Error: Illegal type: "+tok.type);
-        */
-        int mylength;
-        if (this.type == STRING)  mylength = this.getString().length();
-        else throw new RuntimeException("Internal Error: Illegal type: "+this.type);
-        int otherlength;
-        if (tok.type == STRING)  otherlength = tok.getString().length();
-        else throw new RuntimeException("Internal Error: Illegal type: "+tok.type);
-        return mylength < otherlength;
-    }
-
-    static class FixedStringContainer {
-        Token token = null;
-        int options = 0;
-        FixedStringContainer() {
-        }
-    }
-
-    final void findFixedString(FixedStringContainer container, int options) {
-        switch (this.type) {
-          case CONCAT:
-            Token prevToken = null;
-            int prevOptions = 0;
-            for (int i = 0;  i < this.size();  i ++) {
-                this.getChild(i).findFixedString(container, options);
-                if (prevToken == null || prevToken.isShorterThan(container.token)) {
-                    prevToken = container.token;
-                    prevOptions = container.options;
-                }
-            }
-            container.token = prevToken;
-            container.options = prevOptions;
-            return;
-
-          case UNION:
-          case CLOSURE:
-          case NONGREEDYCLOSURE:
-          case EMPTY:
-          case ANCHOR:
-          case RANGE:
-          case DOT:
-          case NRANGE:
-          case BACKREFERENCE:
-          case LOOKAHEAD:
-          case NEGATIVELOOKAHEAD:
-          case LOOKBEHIND:
-          case NEGATIVELOOKBEHIND:
-          case CONDITION:
-            container.token = null;
-            return;
-
-          case CHAR:                            // Ignore CHAR tokens.
-            container.token = null;             // **
-            return;                             // **
-
-          case STRING:
-            container.token = this;
-            container.options = options;
-            return;
-
-          case INDEPENDENT:
-          case PAREN:
-            this.getChild(0).findFixedString(container, options);
-            return;
-
-          case MODIFIERGROUP:
-            options |= ((ModifierToken)this).getOptions();
-            options &= ~((ModifierToken)this).getOptionsMask();
-            this.getChild(0).findFixedString(container, options);
-            return;
-
-          default:
-            throw new RuntimeException("Token#findFixedString(): Invalid Type: "+this.type);
-        }
-    }
-
-    boolean match(int ch) {
-        throw new RuntimeException("NFAArrow#match(): Internal error: "+this.type);
-    }
-
-    // ------------------------------------------------------
-    static protected Hashtable categories = new Hashtable();
-    static protected Hashtable categories2 = null;
-    static final String[] categoryNames = {
-        "Cn", "Lu", "Ll", "Lt", "Lm", "Lo", "Mn", "Me", "Mc", "Nd",
-        "Nl", "No", "Zs", "Zl", "Zp", "Cc", "Cf", null, "Co", "Cs",
-        "Pd", "Ps", "Pe", "Pc", "Po", "Sm", "Sc", "Sk", "So", // 28
-        "Pi", "Pf",  // 29, 30
-        "L", "M", "N", "Z", "C", "P", "S",      // 31-37
-    };
-
-    // Schema Rec. {Datatypes} - Punctuation 
-    static final int CHAR_INIT_QUOTE  = 29;     // Pi - initial quote
-    static final int CHAR_FINAL_QUOTE = 30;     // Pf - final quote
-    static final int CHAR_LETTER = 31;
-    static final int CHAR_MARK = 32;
-    static final int CHAR_NUMBER = 33;
-    static final int CHAR_SEPARATOR = 34;
-    static final int CHAR_OTHER = 35;
-    static final int CHAR_PUNCTUATION = 36;
-    static final int CHAR_SYMBOL = 37;
-    
-    //blockNames in UNICODE 3.1 that supported by XML Schema REC             
-    static final String[] blockNames = {
-        /*0000..007F;*/ "Basic Latin",
-        /*0080..00FF;*/ "Latin-1 Supplement",
-        /*0100..017F;*/ "Latin Extended-A",
-        /*0180..024F;*/ "Latin Extended-B",
-        /*0250..02AF;*/ "IPA Extensions",
-        /*02B0..02FF;*/ "Spacing Modifier Letters",
-        /*0300..036F;*/ "Combining Diacritical Marks",
-        /*0370..03FF;*/ "Greek",
-        /*0400..04FF;*/ "Cyrillic",
-        /*0530..058F;*/ "Armenian",
-        /*0590..05FF;*/ "Hebrew",
-        /*0600..06FF;*/ "Arabic",
-        /*0700..074F;*/ "Syriac",  
-        /*0780..07BF;*/ "Thaana",
-        /*0900..097F;*/ "Devanagari",
-        /*0980..09FF;*/ "Bengali",
-        /*0A00..0A7F;*/ "Gurmukhi",
-        /*0A80..0AFF;*/ "Gujarati",
-        /*0B00..0B7F;*/ "Oriya",
-        /*0B80..0BFF;*/ "Tamil",
-        /*0C00..0C7F;*/ "Telugu",
-        /*0C80..0CFF;*/ "Kannada",
-        /*0D00..0D7F;*/ "Malayalam",
-        /*0D80..0DFF;*/ "Sinhala",
-        /*0E00..0E7F;*/ "Thai",
-        /*0E80..0EFF;*/ "Lao",
-        /*0F00..0FFF;*/ "Tibetan",
-        /*1000..109F;*/ "Myanmar", 
-        /*10A0..10FF;*/ "Georgian",
-        /*1100..11FF;*/ "Hangul Jamo",
-        /*1200..137F;*/ "Ethiopic",
-        /*13A0..13FF;*/ "Cherokee",
-        /*1400..167F;*/ "Unified Canadian Aboriginal Syllabics",
-        /*1680..169F;*/ "Ogham",
-        /*16A0..16FF;*/ "Runic",
-        /*1780..17FF;*/ "Khmer",
-        /*1800..18AF;*/ "Mongolian",
-        /*1E00..1EFF;*/ "Latin Extended Additional",
-        /*1F00..1FFF;*/ "Greek Extended",
-        /*2000..206F;*/ "General Punctuation",
-        /*2070..209F;*/ "Superscripts and Subscripts",
-        /*20A0..20CF;*/ "Currency Symbols",
-        /*20D0..20FF;*/ "Combining Marks for Symbols",
-        /*2100..214F;*/ "Letterlike Symbols",
-        /*2150..218F;*/ "Number Forms",
-        /*2190..21FF;*/ "Arrows",
-        /*2200..22FF;*/ "Mathematical Operators",
-        /*2300..23FF;*/ "Miscellaneous Technical",
-        /*2400..243F;*/ "Control Pictures",
-        /*2440..245F;*/ "Optical Character Recognition",
-        /*2460..24FF;*/ "Enclosed Alphanumerics",
-        /*2500..257F;*/ "Box Drawing",
-        /*2580..259F;*/ "Block Elements",
-        /*25A0..25FF;*/ "Geometric Shapes",
-        /*2600..26FF;*/ "Miscellaneous Symbols",
-        /*2700..27BF;*/ "Dingbats",
-        /*2800..28FF;*/ "Braille Patterns",
-        /*2E80..2EFF;*/ "CJK Radicals Supplement",
-        /*2F00..2FDF;*/ "Kangxi Radicals",
-        /*2FF0..2FFF;*/ "Ideographic Description Characters",
-        /*3000..303F;*/ "CJK Symbols and Punctuation",
-        /*3040..309F;*/ "Hiragana",
-        /*30A0..30FF;*/ "Katakana",
-        /*3100..312F;*/ "Bopomofo",
-        /*3130..318F;*/ "Hangul Compatibility Jamo",
-        /*3190..319F;*/ "Kanbun",
-        /*31A0..31BF;*/ "Bopomofo Extended",
-        /*3200..32FF;*/ "Enclosed CJK Letters and Months",
-        /*3300..33FF;*/ "CJK Compatibility",
-        /*3400..4DB5;*/ "CJK Unified Ideographs Extension A",
-        /*4E00..9FFF;*/ "CJK Unified Ideographs",
-        /*A000..A48F;*/ "Yi Syllables",
-        /*A490..A4CF;*/ "Yi Radicals",
-        /*AC00..D7A3;*/ "Hangul Syllables",
-        /*D800..DB7F;*/ "High Surrogates",
-        /*DB80..DBFF;*/ "High Private Use Surrogates",
-        /*DC00..DFFF;*/ "Low Surrogates",
-        /*E000..F8FF;*/ "Private Use",
-        /*F900..FAFF;*/ "CJK Compatibility Ideographs",
-        /*FB00..FB4F;*/ "Alphabetic Presentation Forms",
-        /*FB50..FDFF;*/ "Arabic Presentation Forms-A",
-        /*FE20..FE2F;*/ "Combining Half Marks",
-        /*FE30..FE4F;*/ "CJK Compatibility Forms",
-        /*FE50..FE6F;*/ "Small Form Variants",
-        /*FE70..FEFE;*/ "Arabic Presentation Forms-B",
-        /*FEFF..FEFF;*/ "Specials",
-        /*FF00..FFEF;*/ "Halfwidth and Fullwidth Forms",
-         //missing Specials add manually
-        /*10300..1032F;*/ "Old Italic",
-        /*10330..1034F;*/ "Gothic",
-        /*10400..1044F;*/ "Deseret",
-        /*1D000..1D0FF;*/ "Byzantine Musical Symbols",
-        /*1D100..1D1FF;*/ "Musical Symbols",
-        /*1D400..1D7FF;*/ "Mathematical Alphanumeric Symbols",
-        /*20000..2A6D6;*/ "CJK Unified Ideographs Extension B",
-        /*2F800..2FA1F;*/ "CJK Compatibility Ideographs Supplement",
-        /*E0000..E007F;*/ "Tags",
-        //missing 2 private use add manually
-
-    };
-    //ADD THOSE MANUALLY
-    //F0000..FFFFD; "Private Use",
-    //100000..10FFFD; "Private Use"
-    //FFF0..FFFD; "Specials", 
-    static final String blockRanges = 
-       "\u0000\u007F\u0080\u00FF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F"
-        +"\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF"
-        +"\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF"
-        +"\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF"
-        +"\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF"
-        +"\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF"
-        +"\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF"
-        +"\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F"
-        +"\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF"
-        +"\uAC00\uD7A3\uD800\uDB7F\uDB80\uDBFF\uDC00\uDFFF\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF"
-        +"\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF\u10300\u1032F\u10330\u1034F"
-        +"\u10400\u1044F\u1D000\u1D0FFs\u1D100\u1D1FF\u1D400\u1D7FF\u20000\u2A6D6\u2F800\u2FA1F\uE0000\uE007F";
-
-     static protected RangeToken getRange(String name, boolean positive) {
-        if (Token.categories.size() == 0) {
-            synchronized (Token.categories) {
-                Token[] ranges = new Token[Token.categoryNames.length];
-                for (int i = 0;  i < ranges.length;  i ++) {
-                    ranges[i] = Token.createRange();
-                }
-                int type;
-                for (int i = 0;  i < 0x10000;  i ++) {
-                    type = Character.getType((char)i);
-                    if (type == Character.START_PUNCTUATION || 
-                        type == Character.END_PUNCTUATION) {
-                        //build table of Pi values
-                        if (i == 0x00AB || i == 0x2018 || i == 0x201B || i == 0x201C ||
-                            i == 0x201F || i == 0x2039) {
-                            type = CHAR_INIT_QUOTE;
-                        }
-                        //build table of Pf values
-                        if (i == 0x00BB || i == 0x2019 || i == 0x201D || i == 0x203A ) {
-                            type = CHAR_FINAL_QUOTE;
-                        }
-                    }
-                    ranges[type].addRange(i, i);
-                    switch (type) {
-                      case Character.UPPERCASE_LETTER:
-                      case Character.LOWERCASE_LETTER:
-                      case Character.TITLECASE_LETTER:
-                      case Character.MODIFIER_LETTER:
-                      case Character.OTHER_LETTER:
-                        type = CHAR_LETTER;
-                        break;
-                      case Character.NON_SPACING_MARK:
-                      case Character.COMBINING_SPACING_MARK:
-                      case Character.ENCLOSING_MARK:
-                        type = CHAR_MARK;
-                        break;
-                      case Character.DECIMAL_DIGIT_NUMBER:
-                      case Character.LETTER_NUMBER:
-                      case Character.OTHER_NUMBER:
-                        type = CHAR_NUMBER;
-                        break;
-                      case Character.SPACE_SEPARATOR:
-                      case Character.LINE_SEPARATOR:
-                      case Character.PARAGRAPH_SEPARATOR:
-                        type = CHAR_SEPARATOR;
-                        break;
-                      case Character.CONTROL:
-                      case Character.FORMAT:
-                      case Character.SURROGATE:
-                      case Character.PRIVATE_USE:
-                      case Character.UNASSIGNED:
-                        type = CHAR_OTHER;
-                        break;
-                      case Character.CONNECTOR_PUNCTUATION:
-                      case Character.DASH_PUNCTUATION:
-                      case Character.START_PUNCTUATION:
-                      case Character.END_PUNCTUATION:
-                      case CHAR_INIT_QUOTE:
-                      case CHAR_FINAL_QUOTE:
-                      case Character.OTHER_PUNCTUATION:
-                        type = CHAR_PUNCTUATION;
-                        break;
-                      case Character.MATH_SYMBOL:
-                      case Character.CURRENCY_SYMBOL:
-                      case Character.MODIFIER_SYMBOL:
-                      case Character.OTHER_SYMBOL:
-                        type = CHAR_SYMBOL;
-                        break;
-                      default:
-                        throw new RuntimeException("org.apache.xerces.utils.regex.Token#getRange(): Unknown Unicode category: "+type);
-                    }
-                    ranges[type].addRange(i, i);
-                } // for all characters
-                ranges[Character.UNASSIGNED].addRange(0x10000, Token.UTF16_MAX);
-
-                Token.categories2 = new Hashtable();
-                for (int i = 0;  i < ranges.length;  i ++) {
-                    if (Token.categoryNames[i] != null) {
-                        if (i == Character.UNASSIGNED) { // Unassigned
-                            ranges[i].addRange(0x10000, Token.UTF16_MAX);
-                        }
-                        Token.categories.put(Token.categoryNames[i], ranges[i]);
-                        Token.categories2.put(Token.categoryNames[i],
-                                              Token.complementRanges(ranges[i]));
-                    }
-                }
-                //REVISIT: do we really need to support block names as in Unicode 3.1
-                //         or we can just create all the names in IsBLOCKNAME format (XML Schema REC)?
-                //
-                StringBuffer buffer = new StringBuffer(50);
-                int location = 0;
-                for (int i = 0;  i < Token.blockNames.length;  i ++) {
-                    Token r1 = Token.createRange();
-                    location = i*2;
-                    int rstart = Token.blockRanges.charAt(location);
-                    int rend = Token.blockRanges.charAt(location+1);
-                    String n = Token.blockNames[i];
-                    //DEBUGING
-                    //System.out.println(n+" " +Integer.toHexString(rstart)
-                    //                     +"-"+ Integer.toHexString(rend));
-                    r1.addRange(rstart, rend);
-                    if (n.equals("Specials"))
-                        r1.addRange(0xfff0, 0xfffd);
-                    if (n.equals("Private Use")) {
-                        r1.addRange(0xF0000,0xFFFFD);
-                        r1.addRange(0x100000,0x10FFFD);
-                    }
-                    Token.categories.put(n, r1);
-                    Token.categories2.put(n, Token.complementRanges(r1));
-                    buffer.setLength(0);                    
-                    buffer.append("Is");
-                    if (n.indexOf(' ') >= 0) {
-                        for (int ci = 0;  ci < n.length();  ci ++)
-                            if (n.charAt(ci) != ' ')  buffer.append((char)n.charAt(ci));
-                    }
-                    else {
-                        buffer.append(n);
-                    }
-                    Token.setAlias(buffer.toString(), n, true);
-                }
-
-                // REVISIT: remove this code later 
-                // the following does not match the XML Schema definition
-                // for Regular Expressions 
-                
-                /*
-                // TR#18 1.2
-                Token.setAlias("ASSIGNED", "Cn", false);
-                Token.setAlias("UNASSIGNED", "Cn", true);
-                Token all = Token.createRange();
-                all.addRange(0, Token.UTF16_MAX);
-                Token.categories.put("ALL", all);
-                Token.categories2.put("ALL", Token.complementRanges(all));
-                */
-                
-                /*
-                Token isalpha = Token.createRange();
-                isalpha.mergeRanges(ranges[Character.UPPERCASE_LETTER]); // Lu
-                isalpha.mergeRanges(ranges[Character.LOWERCASE_LETTER]); // Ll
-                isalpha.mergeRanges(ranges[Character.OTHER_LETTER]); // Lo
-                Token.categories.put("IsAlpha", isalpha);
-                Token.categories2.put("IsAlpha", Token.complementRanges(isalpha));
-                
-                Token isalnum = Token.createRange();
-                isalnum.mergeRanges(isalpha);   // Lu Ll Lo
-                isalnum.mergeRanges(ranges[Character.DECIMAL_DIGIT_NUMBER]); // Nd
-                Token.categories.put("IsAlnum", isalnum);
-                Token.categories2.put("IsAlnum", Token.complementRanges(isalnum));
-
-                Token isspace = Token.createRange();
-                isspace.mergeRanges(Token.token_spaces);
-                isspace.mergeRanges(ranges[CHAR_SEPARATOR]); // Z
-                Token.categories.put("IsSpace", isspace);
-                Token.categories2.put("IsSpace", Token.complementRanges(isspace));
-
-                Token isword = Token.createRange();
-                isword.mergeRanges(isalnum);     // Lu Ll Lo Nd
-                isword.addRange('_', '_');
-                Token.categories.put("IsWord", isword);
-                Token.categories2.put("IsWord", Token.complementRanges(isword));
-
-                Token isascii = Token.createRange();
-                isascii.addRange(0, 127);
-                Token.categories.put("IsASCII", isascii);
-                Token.categories2.put("IsASCII", Token.complementRanges(isascii));
-
-                Token isnotgraph = Token.createRange();
-                isnotgraph.mergeRanges(ranges[CHAR_OTHER]);
-                isnotgraph.addRange(' ', ' ');
-                Token.categories.put("IsGraph", Token.complementRanges(isnotgraph));
-                Token.categories2.put("IsGraph", isnotgraph);
-
-                Token isxdigit = Token.createRange();
-                isxdigit.addRange('0', '9');
-                isxdigit.addRange('A', 'F');
-                isxdigit.addRange('a', 'f');
-                Token.categories.put("IsXDigit", Token.complementRanges(isxdigit));
-                Token.categories2.put("IsXDigit", isxdigit);
-                
-                Token.setAlias("IsDigit", "Nd", true);
-                Token.setAlias("IsUpper", "Lu", true);
-                Token.setAlias("IsLower", "Ll", true);
-                Token.setAlias("IsCntrl", "C", true);
-                Token.setAlias("IsPrint", "C", false);
-                Token.setAlias("IsPunct", "P", true);
-
-                Token.setAlias("alpha", "IsAlpha", true);
-                Token.setAlias("alnum", "IsAlnum", true);
-                Token.setAlias("ascii", "IsASCII", true);
-                Token.setAlias("cntrl", "IsCntrl", true);
-                Token.setAlias("digit", "IsDigit", true);
-                Token.setAlias("graph", "IsGraph", true);
-                Token.setAlias("lower", "IsLower", true);
-                Token.setAlias("print", "IsPrint", true);
-                Token.setAlias("punct", "IsPunct", true);
-                Token.setAlias("space", "IsSpace", true);
-                Token.setAlias("upper", "IsUpper", true);
-                Token.setAlias("word", "IsWord", true); // Perl extension
-                Token.setAlias("xdigit", "IsXDigit", true);
-                 */
-            } // synchronized
-        } // if null
-        RangeToken tok = positive ? (RangeToken)Token.categories.get(name)
-            : (RangeToken)Token.categories2.get(name);
-        if (tok == null) System.out.println(name);
-        return tok;
-    }
-
-    private static void setAlias(String newName, String name, boolean positive) {
-        Token t1 = (Token)Token.categories.get(name);
-        Token t2 = (Token)Token.categories2.get(name);
-        if (positive) {
-            Token.categories.put(newName, t1);
-            Token.categories2.put(newName, t2);
-        } else {
-            Token.categories2.put(newName, t1);
-            Token.categories.put(newName, t2);
-        }
-    }
-
-    // ------------------------------------------------------
-
-    static final String viramaString =
-    "\u094D"// ;DEVANAGARI SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u09CD"//;BENGALI SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0A4D"//;GURMUKHI SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0ACD"//;GUJARATI SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0B4D"//;ORIYA SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0BCD"//;TAMIL SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0C4D"//;TELUGU SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0CCD"//;KANNADA SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0D4D"//;MALAYALAM SIGN VIRAMA;Mn;9;ON;;;;;N;;;;;
-    +"\u0E3A"//;THAI CHARACTER PHINTHU;Mn;9;ON;;;;;N;THAI VOWEL SIGN PHINTHU;;;;
-    +"\u0F84";//;TIBETAN MARK HALANTA;Mn;9;ON;;;;;N;TIBETAN VIRAMA;;;;
-
-    static private Token token_grapheme = null;
-    static synchronized protected Token getGraphemePattern() {
-        if (Token.token_grapheme != null)
-            return Token.token_grapheme;
-
-        Token base_char = Token.createRange();  // [{ASSIGNED}]-[{M},{C}]
-        base_char.mergeRanges(Token.getRange("ASSIGNED", true));
-        base_char.subtractRanges(Token.getRange("M", true));
-        base_char.subtractRanges(Token.getRange("C", true));
-
-        Token virama = Token.createRange();
-        for (int i = 0;  i < Token.viramaString.length();  i ++) {
-            int ch = viramaString.charAt(i);
-            virama.addRange(i, i);
-        }
-
-        Token combiner_wo_virama = Token.createRange();
-        combiner_wo_virama.mergeRanges(Token.getRange("M", true));
-        combiner_wo_virama.addRange(0x1160, 0x11ff); // hangul_medial and hangul_final
-        combiner_wo_virama.addRange(0xff9e, 0xff9f); // extras
-
-        Token left = Token.createUnion();       // base_char?
-        left.addChild(base_char);
-        left.addChild(Token.token_empty);
-
-        Token foo = Token.createUnion();
-        foo.addChild(Token.createConcat(virama, Token.getRange("L", true)));
-        foo.addChild(combiner_wo_virama);
-
-        foo = Token.createClosure(foo);
-
-        foo = Token.createConcat(left, foo);
-
-        Token.token_grapheme = foo;
-        return Token.token_grapheme;
-    }
-
-    /**
-     * Combing Character Sequence in Perl 5.6.
-     */
-    static private Token token_ccs = null;
-    static synchronized protected Token getCombiningCharacterSequence() {
-        if (Token.token_ccs != null)
-            return Token.token_ccs;
-
-        Token foo = Token.createClosure(Token.getRange("M", true)); // \pM*
-        foo = Token.createConcat(Token.getRange("M", false), foo); // \PM + \pM*
-        Token.token_ccs = foo;
-        return Token.token_ccs;
-    }
-
-    // ------------------------------------------------------
-
-    // ------------------------------------------------------
-    /**
-     * This class represents a node in parse tree.
-     */
-    static class StringToken extends Token implements java.io.Serializable {
-        String string;
-        int refNumber;
-
-        StringToken(int type, String str, int n) {
-            super(type);
-            this.string = str;
-            this.refNumber = n;
-        }
-
-        int getReferenceNumber() {              // for STRING
-            return this.refNumber;
-        }
-        String getString() {                    // for STRING
-            return this.string;
-        }
-        
-        public String toString(int options) {
-            if (this.type == BACKREFERENCE)
-                return "\\"+this.refNumber;
-            else
-                return REUtil.quoteMeta(this.string);
-        }
-    }
-
-    /**
-     * This class represents a node in parse tree.
-     */
-    static class ConcatToken extends Token implements java.io.Serializable {
-        Token child;
-        Token child2;
-        
-        ConcatToken(Token t1, Token t2) {
-            super(Token.CONCAT);
-            this.child = t1;
-            this.child2 = t2;
-        }
-
-        int size() {
-            return 2;
-        }
-        Token getChild(int index) {
-            return index == 0 ? this.child : this.child2;
-        }
-
-        public String toString(int options) {
-            String ret;
-            if (this.child2.type == CLOSURE && this.child2.getChild(0) == this.child) {
-                ret = this.child.toString(options)+"+";
-            } else if (this.child2.type == NONGREEDYCLOSURE && this.child2.getChild(0) == this.child) {
-                ret = this.child.toString(options)+"+?";
-            } else
-                ret = this.child.toString(options)+this.child2.toString(options);
-            return ret;
-        }
-    }
-
-    /**
-     * This class represents a node in parse tree.
-     */
-    static class CharToken extends Token implements java.io.Serializable {
-        int chardata;
-
-        CharToken(int type, int ch) {
-            super(type);
-            this.chardata = ch;
-        }
-
-        int getChar() {
-            return this.chardata;
-        }
-
-        public String toString(int options) {
-            String ret;
-            switch (this.type) {
-              case CHAR:
-                switch (this.chardata) {
-                  case '|':  case '*':  case '+':  case '?':
-                  case '(':  case ')':  case '.':  case '[':
-                  case '{':  case '\\':
-                    ret = "\\"+(char)this.chardata;
-                    break;
-                  case '\f':  ret = "\\f";  break;
-                  case '\n':  ret = "\\n";  break;
-                  case '\r':  ret = "\\r";  break;
-                  case '\t':  ret = "\\t";  break;
-                  case 0x1b:  ret = "\\e";  break;
-                    //case 0x0b:  ret = "\\v";  break;
-                  default:
-                    if (this.chardata >= 0x10000) {
-                        String pre = "0"+Integer.toHexString(this.chardata);
-                        ret = "\\v"+pre.substring(pre.length()-6, pre.length());
-                    } else
-                        ret = ""+(char)this.chardata;
-                }
-                break;
-
-              case ANCHOR:
-                if (this == Token.token_linebeginning || this == Token.token_lineend)
-                    ret = ""+(char)this.chardata;
-                else 
-                    ret = "\\"+(char)this.chardata;
-                break;
-
-              default:
-                ret = null;
-            }
-            return ret;
-        }
-
-        boolean match(int ch) {
-            if (this.type == CHAR) {
-                return ch == this.chardata;
-            } else
-                throw new RuntimeException("NFAArrow#match(): Internal error: "+this.type);
-        }
-    }
-
-    /**
-     * This class represents a node in parse tree.
-     */
-    static class ClosureToken extends Token implements java.io.Serializable {
-        int min;
-        int max;
-        Token child;
-
-        ClosureToken(int type, Token tok) {
-            super(type);
-            this.child = tok;
-            this.setMin(-1);
-            this.setMax(-1);
-        }
-
-        int size() {
-            return 1;
-        }
-        Token getChild(int index) {
-            return this.child;
-        }
-
-        final void setMin(int min) {
-            this.min = min;
-        }
-        final void setMax(int max) {
-            this.max = max;
-        }
-        final int getMin() {
-            return this.min;
-        }
-        final int getMax() {
-            return this.max;
-        }
-
-        public String toString(int options) {
-            String ret;
-            if (this.type == CLOSURE) {
-                if (this.getMin() < 0 && this.getMax() < 0) {
-                    ret = this.child.toString(options)+"*";
-                } else if (this.getMin() == this.getMax()) {
-                    ret = this.child.toString(options)+"{"+this.getMin()+"}";
-                } else if (this.getMin() >= 0 && this.getMax() >= 0) {
-                    ret = this.child.toString(options)+"{"+this.getMin()+","+this.getMax()+"}";
-                } else if (this.getMin() >= 0 && this.getMax() < 0) {
-                    ret = this.child.toString(options)+"{"+this.getMin()+",}";
-                } else
-                    throw new RuntimeException("Token#toString(): CLOSURE "
-                                               +this.getMin()+", "+this.getMax());
-            } else {
-                if (this.getMin() < 0 && this.getMax() < 0) {
-                    ret = this.child.toString(options)+"*?";
-                } else if (this.getMin() == this.getMax()) {
-                    ret = this.child.toString(options)+"{"+this.getMin()+"}?";
-                } else if (this.getMin() >= 0 && this.getMax() >= 0) {
-                    ret = this.child.toString(options)+"{"+this.getMin()+","+this.getMax()+"}?";
-                } else if (this.getMin() >= 0 && this.getMax() < 0) {
-                    ret = this.child.toString(options)+"{"+this.getMin()+",}?";
-                } else
-                    throw new RuntimeException("Token#toString(): NONGREEDYCLOSURE "
-                                               +this.getMin()+", "+this.getMax());
-            }
-            return ret;
-        }
-    }
-
-    /**
-     * This class represents a node in parse tree.
-     */
-    static class ParenToken extends Token implements java.io.Serializable {
-        Token child;
-        int parennumber;
-
-        ParenToken(int type, Token tok, int paren) {
-            super(type);
-            this.child = tok;
-            this.parennumber = paren;
-        }
-
-        int size() {
-            return 1;
-        }
-        Token getChild(int index) {
-            return this.child;
-        }
-
-        int getParenNumber() {
-            return this.parennumber;
-        }
-
-        public String toString(int options) {
-            String ret = null;
-            switch (this.type) {
-              case PAREN:
-                if (this.parennumber == 0) {
-                    ret = "(?:"+this.child.toString(options)+")";
-                } else {
-                    ret = "("+this.child.toString(options)+")";
-                }
-                break;
-
-              case LOOKAHEAD:
-                ret = "(?="+this.child.toString(options)+")";
-                break;
-              case NEGATIVELOOKAHEAD:
-                ret = "(?!"+this.child.toString(options)+")";
-                break;
-              case LOOKBEHIND:
-                ret = "(?<="+this.child.toString(options)+")";
-                break;
-              case NEGATIVELOOKBEHIND:
-                ret = "(?<!"+this.child.toString(options)+")";
-                break;
-              case INDEPENDENT:
-                ret = "(?>"+this.child.toString(options)+")";
-                break;
-            }
-            return ret;
-        }
-    }
-
-    /**
-     * (?(condition)yes-pattern|no-pattern)
-     */
-    static class ConditionToken extends Token implements java.io.Serializable {
-        int refNumber;
-        Token condition;
-        Token yes;
-        Token no;
-        ConditionToken(int refno, Token cond, Token yespat, Token nopat) {
-            super(Token.CONDITION);
-            this.refNumber = refno;
-            this.condition = cond;
-            this.yes = yespat;
-            this.no = nopat;
-        }
-        int size() {
-            return this.no == null ? 1 : 2;
-        }
-        Token getChild(int index) {
-            if (index == 0)  return this.yes;
-            if (index == 1)  return this.no;
-            throw new RuntimeException("Internal Error: "+index);
-        }
-
-        public String toString(int options) {
-            String ret;
-            if (refNumber > 0) {
-                ret = "(?("+refNumber+")";
-            } else if (this.condition.type == Token.ANCHOR) {
-                ret = "(?("+this.condition+")";
-            } else {
-                ret = "(?"+this.condition;
-            }
-
-            if (this.no == null) {
-                ret += this.yes+")";
-            } else {
-                ret += this.yes+"|"+this.no+")";
-            }
-            return ret;
-        }
-    }
-
-    /**
-     * (ims-ims: .... )
-     */
-    static class ModifierToken extends Token implements java.io.Serializable {
-        Token child;
-        int add;
-        int mask;
-
-        ModifierToken(Token tok, int add, int mask) {
-            super(Token.MODIFIERGROUP);
-            this.child = tok;
-            this.add = add;
-            this.mask = mask;
-        }
-
-        int size() {
-            return 1;
-        }
-        Token getChild(int index) {
-            return this.child;
-        }
-
-        int getOptions() {
-            return this.add;
-        }
-        int getOptionsMask() {
-            return this.mask;
-        }
-
-        public String toString(int options) {
-            return "(?"
-                +(this.add == 0 ? "" : REUtil.createOptionString(this.add))
-                +(this.mask == 0 ? "" : REUtil.createOptionString(this.mask))
-                +":"
-                +this.child.toString(options)
-                +")";
-        }
-    }
-
-    /**
-     * This class represents a node in parse tree.
-     * for UNION or CONCAT.
-     */
-    static class UnionToken extends Token implements java.io.Serializable {
-        Vector children;
-
-        UnionToken(int type) {
-            super(type);
-        }
-
-        void addChild(Token tok) {
-            if (tok == null)  return;
-            if (this.children == null)  this.children = new Vector();
-            if (this.type == UNION) {
-                this.children.addElement(tok);
-                return;
-            }
-                                                // This is CONCAT, and new child is CONCAT.
-            if (tok.type == CONCAT) {
-                for (int i = 0;  i < tok.size();  i ++)
-                    this.addChild(tok.getChild(i)); // Recursion
-                return;
-            }
-            int size = this.children.size();
-            if (size == 0) {
-                this.children.addElement(tok);
-                return;
-            }
-            Token previous = (Token)this.children.elementAt(size-1);
-            if (!((previous.type == CHAR || previous.type == STRING)
-                  && (tok.type == CHAR || tok.type == STRING))) {
-                this.children.addElement(tok);
-                return;
-            }
-            
-            //System.err.println("Merge '"+previous+"' and '"+tok+"'.");
-
-            StringBuffer buffer;
-            int nextMaxLength = (tok.type == CHAR ? 2 : tok.getString().length());
-            if (previous.type == CHAR) {        // Replace previous token by STRING
-                buffer = new StringBuffer(2 + nextMaxLength);
-                int ch = previous.getChar();
-                if (ch >= 0x10000)
-                    buffer.append(REUtil.decomposeToSurrogates(ch));
-                else
-                    buffer.append((char)ch);
-                previous = Token.createString(null);
-                this.children.setElementAt(previous, size-1);
-            } else {                            // STRING
-                buffer = new StringBuffer(previous.getString().length() + nextMaxLength);
-                buffer.append(previous.getString());
-            }
-
-            if (tok.type == CHAR) {
-                int ch = tok.getChar();
-                if (ch >= 0x10000)
-                    buffer.append(REUtil.decomposeToSurrogates(ch));
-                else
-                    buffer.append((char)ch);
-            } else {
-                buffer.append(tok.getString());
-            }
-
-            ((StringToken)previous).string = new String(buffer);
-        }
-
-        int size() {
-            return this.children == null ? 0 : this.children.size();
-        }
-        Token getChild(int index) {
-            return (Token)this.children.elementAt(index);
-        }
-
-        public String toString(int options) {
-            String ret;
-            if (this.type == CONCAT) {
-                if (this.children.size() == 2) {
-                    Token ch = this.getChild(0);
-                    Token ch2 = this.getChild(1);
-                    if (ch2.type == CLOSURE && ch2.getChild(0) == ch) {
-                        ret = ch.toString(options)+"+";
-                    } else if (ch2.type == NONGREEDYCLOSURE && ch2.getChild(0) == ch) {
-                        ret = ch.toString(options)+"+?";
-                    } else
-                        ret = ch.toString(options)+ch2.toString(options);
-                } else {
-                    StringBuffer sb = new StringBuffer();
-                    for (int i = 0;  i < this.children.size();  i ++) {
-                        sb.append(((Token)this.children.elementAt(i)).toString(options));
-                    }
-                    ret = new String(sb);
-                }
-                return ret;
-            }
-            if (this.children.size() == 2 && this.getChild(1).type == EMPTY) {
-                ret = this.getChild(0).toString(options)+"?";
-            } else if (this.children.size() == 2
-                       && this.getChild(0).type == EMPTY) {
-                ret = this.getChild(1).toString(options)+"??";
-            } else {
-                StringBuffer sb = new StringBuffer();
-                sb.append(((Token)this.children.elementAt(0)).toString(options));
-                for (int i = 1;  i < this.children.size();  i ++) {
-                    sb.append((char)'|');
-                    sb.append(((Token)this.children.elementAt(i)).toString(options));
-                }
-                ret = new String(sb);
-            }
-            return ret;
-        }
-    }
-}
diff --git a/src/org/apache/xerces/impl/xpath/regex/message.properties b/src/org/apache/xerces/impl/xpath/regex/message.properties
deleted file mode 100644
index abe4880..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/message.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-parser.parse.1=Wrong character.
-parser.parse.2=Invalid reference number.
-parser.next.1=A character is required after \\.
-parser.next.2='?' is not expected.  '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?
-parser.next.3='(?<=' or '(?<!' is expected.
-parser.next.4=A comment is not terminated.
-parser.factor.1=')' is expected.
-parser.factor.2=Unexpected end of the pattern in a modifier group.
-parser.factor.3=':' is expected.
-parser.factor.4=Unexpected end of the pattern in a conditional group.
-parser.factor.5=A back reference or an anchor or a lookahead or a lookbehind is expected in a conditional pattern.
-parser.factor.6=There are more than three choises in a conditional group.
-parser.atom.1=A character in U+0040-U+005f must follow \\c.
-parser.atom.2=A Category character or '{' is required.
-parser.atom.3=A property name is not closed by '}'.
-parser.atom.4=Unexpected meta character.
-parser.atom.5=Unknown property.
-parser.cc.1=A POSIX character class must be closed by ':]'.
-parser.cc.2=Unexpected end of the pattern in a character class.
-parser.cc.3=Unknown name for a POSIX character class.
-parser.cc.4='-' is invalid here.
-parser.cc.5=']' is expected.
-parser.cc.6='[' is invalid in a characer class.  Write '\\['.
-parser.cc.7=']' is invalid in a characer class.  Write '\\]'.
-parser.ope.1='[' is expected.
-parser.ope.2=')' or '-[' or '+[' or '&[' is expected.
-parser.descape.1=Invalid Unicode hex notation.
-parser.descape.2=Overflow in a hex notation.
-parser.descape.3='\\x{' must be closed by '}'.
-parser.descape.4=Invalid Unicode code point.
-parser.descape.5=An anchor must not be here.
-parser.process.1=This expression is not supported in the current option setting.
diff --git a/src/org/apache/xerces/impl/xpath/regex/message_fr.properties b/src/org/apache/xerces/impl/xpath/regex/message_fr.properties
deleted file mode 100644
index fd3e981..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/message_fr.properties
+++ /dev/null
@@ -1,32 +0,0 @@
- parser.parse.1=Caract\u00e8re invalide.
-parser.parse.2=Num\u00e9ro de r\u00e9f\u00e9rence invalide.
-parser.next.1=Un \\ doit \u00eatre suivi d'un caract\u00e8re.
-parser.next.2='?' n'est pas possible ici.  '(?:' ou '(?=' ou '(?!' ou '(?<' ou '(?#' ou '(?>'?
-parser.next.3='(?<=' ou '(?<!' sont attendus.
-parser.next.4=Un commentaire n'est pas ferm\u00e9.
-parser.factor.1=')' manquant.
-parser.factor.2=Fin pr\u00e9matur\u00e9e de motif dans un groupe modifiant.
-parser.factor.3=':' manquant.
-parser.factor.4=Fin pr\u00e9matur\u00e9e de motif dans un groupe conditionel.
-parser.factor.5=Une r\u00e9f\u00e9rence arri\u00e8re ou une ancre ou un lookahead ou un lookbehind est attendu dans un groupe conditionel.
-parser.factor.6=Il y a plus de trois choix dans un groupe conditionel.
-parser.atom.1=\\c doit \u00eatre suivi d'un caract\u00e8re dans l'intervalle U+0040-U+005f .
-parser.atom.2=Un caract\u00e8re de cat\u00e9gorie ou '{' est requis.
-parser.atom.3=Un nom de propri\u00e9t\u00e9 ne se termine pas par '}'.
-parser.atom.4=M\u00e9tacaract\u00e8re interdit.
-parser.atom.5=Propri\u00e9t\u00e9 inconnue.
-parser.cc.1=Une classe de caract\u00e8re POSIX doit \u00eatre termin\u00e9e par ':]'.
-parser.cc.2=Fin pr\u00e9matur\u00e9e de motif dans une classe de caract\u00e8re.
-parser.cc.3=Nom inconnu pour une classe de caract\u00e8re POSIX.
-parser.cc.4='-' est invalide, dans ce cas.
-parser.cc.5=']' manquant.
-parser.cc.6='[' est invalide dans une classe de caract\u00e8re. Ecrivez '\\['.
-parser.cc.7=']' est invalide dans une classe de caract\u00e8re. Ecrivez '\\]'.
-parser.ope.1='[' est attendu.
-parser.ope.2=')' ou '-[' ou '+[' ou '&[' sont attendus.
-parser.descape.1=Notation hexad\u00e9cimale Unicode invalide.
-parser.descape.2=D\u00e9passement de capacit\u00e9 dans une expression hexad\u00e9cimale.
-parser.descape.3='\\x{' doit se terminer par un '}'.
-parser.descape.4=Point de code Unicode invalide.
-parser.descape.5=Ancre interdite ici.
-parser.process.1=Cette expression n'est pas autoris\u00e9e compte tenu des options en cours.
diff --git a/src/org/apache/xerces/impl/xpath/regex/message_ja.properties b/src/org/apache/xerces/impl/xpath/regex/message_ja.properties
deleted file mode 100644
index 9be8394..0000000
--- a/src/org/apache/xerces/impl/xpath/regex/message_ja.properties
+++ /dev/null
@@ -1,32 +0,0 @@
-parser.parse.1=\u3078\u3093\u306a\u6587\u5b57.
-parser.parse.2=\u5b58\u5728\u3057\u306a\u3044\u30b0\u30eb\u30fc\u30d7\u756a\u53f7\u3067\u3059.
-parser.next.1=\\ \u306e\u5f8c\u306b1\u6587\u5b57\u5fc5\u8981\u3067\u3059.
-parser.next.2='?' \u3092\u3053\u3053\u306b\u66f8\u304f\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093. \u3082\u3057\u304b\u3057\u3066 '(?:' \u304b '(?=' \u304b '(?!' \u304b '(?<' \u304b '(?#' \u304b '(?>' \u3067\u3059\u304b?
-parser.next.3='(?<=' \u304b '(?<!' \u304c\u5fc5\u8981\u3067\u3059.
-parser.next.4=\u8a3b\u91c8\u304c\u9589\u3058\u3066\u3044\u307e\u305b\u3093.
-parser.factor.1=')' \u304c\u5fc5\u8981\u3067\u3059.
-parser.factor.2=\u30aa\u30d7\u30b7\u30e7\u30f3\u4ed8\u304d\u30b0\u30eb\u30fc\u30d7\u306e\u4e2d\u3067\u30d1\u30bf\u30fc\u30f3\u304c\u7d42\u4e86\u3057\u3066\u3044\u307e\u3059.
-parser.factor.3=':' \u304c\u5fc5\u8981\u3067\u3059.
-parser.factor.4=\u6761\u4ef6\u4ed8\u304d\u30b0\u30eb\u30fc\u30d7\u306e\u4e2d\u3067\u30d1\u30bf\u30fc\u30f3\u304c\u7d42\u4e86\u3057\u3066\u3044\u307e\u3059.
-parser.factor.5=\u6761\u4ef6\u30d1\u30bf\u30fc\u30f3\u306b\u306f\u3001\u5f8c\u65b9\u53c2\u7167\u30fb\u30a2\u30f3\u30ab\u30fc\u30fb\u5148\u8aad\u307f\u30fb\u5f8c\u8aad\u307f\u306e\u307f\u4f7f\u7528\u3067\u304d\u307e\u3059.
-parser.factor.6=\u6761\u4ef6\u4ed8\u304d\u30b0\u30eb\u30fc\u30d7\u306e\u4e2d\u306b3\u500b\u4ee5\u4e0a\u306e\u9078\u629e\u3092\u66f8\u304f\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093.
-parser.atom.1=\\c \u306e\u5f8c\u306b\u306f\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u304c U+0040\uff5eU+005f \u306e\u7bc4\u56f2\u306e\u6587\u5b57\u304c\u5fc5\u8981\u3067\u3059.
-parser.atom.2=1\u6587\u5b57\u306e\u30ab\u30c6\u30b4\u30ea\u6587\u5b57\u304b '{' \u304c\u5fc5\u8981\u3067\u3059.
-parser.atom.3=\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u304c '}' \u3067\u9589\u3058\u3066\u3044\u307e\u305b\u3093.
-parser.atom.4=\u30e1\u30bf\u6587\u5b57\u304c\u5909\u306a\u3068\u3053\u308d\u306b\u3042\u308a\u307e\u3059.
-parser.atom.5=\u672a\u77e5\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3067\u3059.
-parser.cc.1=POSIX \u6587\u5b57\u30af\u30e9\u30b9\u306f ':]' \u3067\u9589\u3058\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059.
-parser.cc.2=\u6587\u5b57\u30af\u30e9\u30b9\u5185\u3067\u30d1\u30bf\u30fc\u30f3\u304c\u7d42\u4e86\u3057\u3066\u3044\u307e\u3059.
-parser.cc.3=\u672a\u77e5\u306e POSIX \u6587\u5b57\u30af\u30e9\u30b9\u540d\u3067\u3059.
-parser.cc.4=\u3053\u3053\u306b '-' \u3092\u66f8\u304f\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093.
-parser.cc.5=']' \u304c\u5fc5\u8981\u3067\u3059.
-parser.cc.6=\u6587\u5b57\u30af\u30e9\u30b9\u5185\u3067\u306f '[' \u3092\u76f4\u63a5\u66f8\u304f\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093. '\\[' \u3068\u66f8\u3044\u3066\u304f\u3060\u3055\u3044.
-parser.cc.7=\u6587\u5b57\u30af\u30e9\u30b9\u5185\u3067\u306f ']' \u3092\u76f4\u63a5\u66f8\u304f\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093. '\\]' \u3068\u66f8\u3044\u3066\u304f\u3060\u3055\u3044.
-parser.ope.1='[' \u304c\u5fc5\u8981\u3067\u3059.
-parser.ope.2=')' \u304b '-[' \u304b '+[' \u304b '&[' \u304c\u5fc5\u8981\u3067\u3059.
-parser.descape.1=\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u306e16\u9032\u6570\u8868\u8a18\u4e2d\u306b\u9593\u9055\u3063\u305f\u6587\u5b57\u304c\u3042\u308a\u307e\u3059.
-parser.descape.2=\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u6570\u5024\u304c\u5927\u304d\u3059\u304e\u307e\u3059.
-parser.descape.3='\\x{' \u306f '}' \u3067\u9589\u3058\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093.
-parser.descape.4=Unicode \u306e\u30b3\u30fc\u30c9\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u4e0d\u6b63\u3067\u3059.
-parser.descape.5=\u30a2\u30f3\u30ab\u30fc\u3092\u3053\u3053\u306b\u66f8\u304f\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093.
-parser.process.1=\u3053\u306e\u8868\u73fe\u306f\u73fe\u5728\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u8a2d\u5b9a\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093.
diff --git a/src/org/apache/xerces/impl/xs/AttributePSVImpl.java b/src/org/apache/xerces/impl/xs/AttributePSVImpl.java
deleted file mode 100644
index 6943037..0000000
--- a/src/org/apache/xerces/impl/xs/AttributePSVImpl.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.xs.XSAttributeDecl;
-import org.apache.xerces.impl.xs.XSNotationDecl;
-import org.apache.xerces.xni.psvi.AttributePSVI;
-
-import java.util.Vector;
-
-
-/**
- * Attribute PSV infoset augmentations implementation.
- * The PSVI information for attributes will be available at the startElement call.
- *
- * @author Elena Litani IBM
- */
-public class AttributePSVImpl implements AttributePSVI {
-
-    /** attribute declaration */
-    protected XSAttributeDecl fDeclaration = null;
-
-    /** type of attribute, simpleType */
-    protected XSTypeDecl fTypeDecl = null;
-
-    /** If this attribute was explicitly given a 
-     * value in the original document, this is true; otherwise, it is false  */
-    protected boolean fSpecified = true;
-
-    /** schema normalized value property */
-    protected String fNormalizedValue = null;
-
-    /** member type definition against which attribute was validated */
-    protected XSSimpleType fMemberType = null;
-
-    /** validation attempted: none, partial, full */
-    protected short fValidationAttempted = AttributePSVI.NO_VALIDATION;
-
-    /** validity: valid, invalid, unknown */
-    protected short fValidity = AttributePSVI.UNKNOWN_VALIDITY;
-
-    /** error codes */
-    protected Vector fErrorCodes = new Vector(10);
-
-    /** validation context: could be QName or XPath expression*/
-    protected String fValidationContext = null;
-
-
-    //
-    // AttributePSVI methods
-    //
-
-    /**
-     * [member type definition anonymous]
-     * @ see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_anonymous>XML Schema Part 1: Structures [member type definition anonymous]</a>
-     * @return true if the {name} of the actual member type definition is absent,
-     *         otherwise false.
-     */
-    public boolean  isMemberTypeAnonymous() {
-        return (fMemberType !=null)? fMemberType.isAnonymous():false;
-    }
-
-
-    /**
-     * [member type definition name]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_name>XML Schema Part 1: Structures [member type definition name]</a>
-     * @return The {name} of the actual member type definition, if it is not absent.
-     *         If it is absent, schema processors may, but need not, provide a
-     *         value unique to the definition.
-     */
-    public String   getMemberTypeName() {
-        return (fMemberType !=null)? fMemberType.getTypeName():null;
-    }
-
-    /**
-     * [member type definition namespace]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_namespace>XML Schema Part 1: Structures [member type definition namespace]</a>
-     * @return The {target namespace} of the actual member type definition.
-     */
-    public String   getMemberTypeNamespace() {
-        return (fMemberType !=null)? fMemberType.getTargetNamespace():null;
-    }
-
-    /**
-     * [schema default]
-     *
-     * @return The canonical lexical representation of the declaration's {value constraint} value.
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a>
-     */
-    public String   schemaDefault() {
-        Object dValue = null;
-        if( fDeclaration !=null ) {
-            dValue = fDeclaration.fDefault;
-        }
-        return(dValue != null)?dValue.toString():null;
-    }
-
-    /**
-     * [schema normalized value]
-     *
-     *
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a>
-     * @return the normalized value of this item after validation
-     */
-    public String schemaNormalizedValue() {
-        return fNormalizedValue;
-    }
-
-    /**
-     * [schema specified]
-     * 
-     * @return if return is true - schema, otherwise - infoset
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_specified>XML Schema Part 1: Structures [schema specified]</a>
-     */
-    public boolean schemaSpecified() {
-        return fSpecified;
-    }
-
-
-    /**
-     * [type definition anonymous]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_anonymous>XML Schema Part 1: Structures [type definition anonymous]</a>
-     * @return true if the {name} of the type definition is absent, otherwise false.
-     */
-    public boolean isTypeAnonymous() {
-        return (fTypeDecl !=null)? fTypeDecl.isAnonymous():false;
-    }
-
-    /**
-     * [type definition name]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_name>XML Schema Part 1: Structures [type definition name]</a>
-     * @return The {name} of the type definition, if it is not absent.
-     *         If it is absent, schema processors may, but need not,
-     *         provide a value unique to the definition.
-     */
-    public String getTypeName() {
-        return (fTypeDecl !=null)? fTypeDecl.getTypeName():null;
-    }
-
-    /**
-     * [type definition namespace]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_namespace>XML Schema Part 1: Structures [type definition namespace]</a>
-     * @return The {target namespace} of the type definition.
-     */
-    public String getTypeNamespace() {
-        return (fTypeDecl !=null)? fTypeDecl.getTargetNamespace():null;
-    }
-
-    /**
-     * [type definition type]
-     *
-     *  @see <a href="http://www.w3.org/TR/xmlschema-1/#a-type_definition_type>XML Schema Part 1: Structures [type definition type]</a>
-     *  @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_type>XML Schema Part 1: Structures [type definition type]</a>
-     *  @return simple or complex, depending on the type definition.
-     */
-    public short getTypeDefinitionType() {
-        return XSTypeDecl.SIMPLE_TYPE;
-    }
-
-    /**
-     * Determines the extent to which the document has been validated
-     *
-     * @return return the [validation attempted] property. The possible values are
-     *         NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION
-     */
-    public short getValidationAttempted() {
-        return fValidationAttempted;
-    }
-
-    /**
-     * Determine the validity of the node with respect
-     * to the validation being attempted
-     *
-     * @return return the [validity] property. Possible values are:
-     *         UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY
-     */
-    public short getValidity() {
-        return fValidity;
-    }
-
-    /**
-     * A list of error codes generated from validation attempts.
-     * Need to find all the possible subclause reports that need reporting
-     *
-     * @return Array of error codes
-     */
-    public String[] getErrorCodes() {
-        // REVISIT: can we make it more efficient?
-        int size = fErrorCodes.size();
-        // copy errors from the list to an string array
-        String[] errors = new String[size];
-        for (int i = 0; i < size; i++) {
-            errors[i] = (String)fErrorCodes.elementAt(i);
-        }
-        return errors;
-
-    }
-
-
-    // This is the only information we can provide in a pipeline.
-    public String getValidationContext() {
-        return fValidationContext;
-    }
-
-
-    /**
-     * Reset() 
-     */
-    public void reset() {
-        fDeclaration = null;
-        fTypeDecl = null;
-        fSpecified = true;
-        fMemberType = null;
-        fValidationAttempted = AttributePSVI.NO_VALIDATION;
-        fValidity = AttributePSVI.UNKNOWN_VALIDITY;
-        fErrorCodes.setSize(0);
-        fValidationContext = null;
-    }
-
-    public void addErrorCode(String key){
-        fErrorCodes.addElement(key);
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/ElementPSVImpl.java b/src/org/apache/xerces/impl/xs/ElementPSVImpl.java
deleted file mode 100644
index 3cc1a47..0000000
--- a/src/org/apache/xerces/impl/xs/ElementPSVImpl.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XSNotationDecl;
-import org.apache.xerces.xni.psvi.ElementPSVI;
-
-
-
-/**
- * Element PSV infoset augmentations implementation.
- * The following information will be available at the startElement call:
- * name, namespace, type, notation, validation context
- *
- * The following information will be available at the endElement call:
- * nil, specified, normalized value, member type, validity, error codes,
- * default
- *
- * @author Elena Litani IBM
- */
-public class ElementPSVImpl implements ElementPSVI {
-
-    /** element declaration */
-    protected XSElementDecl fDeclaration = null;
-
-    /** type of element, could be xsi:type */
-    protected XSTypeDecl fTypeDecl = null;
-
-    /** true if clause 3.2 of Element Locally Valid (Element) (3.3.4) 
-      * is satisfied, otherwise false 
-      */
-    protected boolean fNil = false;
-
-    /** false if the element value was provided by the schema; true otherwise. 
-     */
-    protected boolean fSpecified = true;
-
-    /** schema normalized value property */
-    protected String fNormalizedValue = null;
-
-    /** http://www.w3.org/TR/xmlschema-1/#e-notation*/
-    protected XSNotationDecl fNotation = null;
-
-    /** member type definition against which element was validated */
-    protected XSSimpleType fMemberType = null;
-
-    /** validation attempted: none, partial, full */
-    protected short fValidationAttempted = ElementPSVI.NO_VALIDATION;
-
-    /** validity: valid, invalid, unknown */
-    protected short fValidity = ElementPSVI.UNKNOWN_VALIDITY;
-
-    /** error codes */
-    protected String[] fErrorCodes = null;
-
-    /** validation context: could be QName or XPath expression*/
-    protected String fValidationContext = null;
-
-
-    //
-    // ElementPSVI methods
-    //
-
-    /**
-     * [member type definition anonymous]
-     * @ see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_anonymous>XML Schema Part 1: Structures [member type definition anonymous]</a>
-     * @return true if the {name} of the actual member type definition is absent,
-     *         otherwise false.
-     */
-    public boolean  isMemberTypeAnonymous() {
-        return (fMemberType !=null)? fMemberType.isAnonymous():false;
-    }
-
-
-    /**
-     * [member type definition name]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_name>XML Schema Part 1: Structures [member type definition name]</a>
-     * @return The {name} of the actual member type definition, if it is not absent.
-     *         If it is absent, schema processors may, but need not, provide a
-     *         value unique to the definition.
-     */
-    public String   getMemberTypeName() {
-        return (fMemberType !=null)? fMemberType.getTypeName():null;
-    }
-
-    /**
-     * [member type definition namespace]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_namespace>XML Schema Part 1: Structures [member type definition namespace]</a>
-     * @return The {target namespace} of the actual member type definition.
-     */
-    public String   getMemberTypeNamespace() {
-        return (fMemberType !=null)? fMemberType.getTargetNamespace():null;
-    }
-
-    /**
-     * [schema default]
-     *
-     * @return The canonical lexical representation of the declaration's {value constraint} value.
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a>
-     */
-    public String   schemaDefault() {
-        Object dValue = null;
-        if( fDeclaration !=null ) {
-            dValue = fDeclaration.fDefault;
-        }
-        return(dValue != null)?dValue.toString():null;
-    }
-
-    /**
-     * [schema normalized value]
-     *
-     *
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a>
-     * @return the normalized value of this item after validation
-     */
-    public String schemaNormalizedValue() {
-        return fNormalizedValue;
-    }
-
-    /**
-     * [schema specified]
-     * 
-     * @return if return is true - schema, otherwise - infoset
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_specified>XML Schema Part 1: Structures [schema specified]</a>
-     */
-    public boolean schemaSpecified() {
-        return fSpecified;
-    }
-
-
-    /**
-     * [type definition anonymous]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_anonymous>XML Schema Part 1: Structures [type definition anonymous]</a>
-     * @return true if the {name} of the type definition is absent, otherwise false.
-     */
-    public boolean isTypeAnonymous() {
-        return (fTypeDecl !=null)? fTypeDecl.isAnonymous():false;
-    }
-
-    /**
-     * [type definition name]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_name>XML Schema Part 1: Structures [type definition name]</a>
-     * @return The {name} of the type definition, if it is not absent.
-     *         If it is absent, schema processors may, but need not,
-     *         provide a value unique to the definition.
-     */
-    public String getTypeName() {
-        return (fTypeDecl !=null)? fTypeDecl.getTypeName():null;
-    }
-
-    /**
-     * [type definition namespace]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_namespace>XML Schema Part 1: Structures [type definition namespace]</a>
-     * @return The {target namespace} of the type definition.
-     */
-    public String getTypeNamespace() {
-        return (fTypeDecl !=null)? fTypeDecl.getTargetNamespace():null;
-    }
-
-    /**
-     * [type definition type]
-     *
-     *  @see <a href="http://www.w3.org/TR/xmlschema-1/#a-type_definition_type>XML Schema Part 1: Structures [type definition type]</a>
-     *  @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_type>XML Schema Part 1: Structures [type definition type]</a>
-     *  @return simple or complex, depending on the type definition.
-     */
-    public short getTypeDefinitionType() {
-        return (fTypeDecl !=null)? fTypeDecl.getXSType():XSTypeDecl.COMPLEX_TYPE;
-    }
-
-    /**
-     * Determines the extent to which the document has been validated
-     *
-     * @return return the [validation attempted] property. The possible values are
-     *         NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION
-     */
-    public short getValidationAttempted() {
-        return fValidationAttempted;
-    }
-
-    /**
-     * Determine the validity of the node with respect
-     * to the validation being attempted
-     *
-     * @return return the [validity] property. Possible values are:
-     *         UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY
-     */
-    public short getValidity() {
-        return fValidity;
-    }
-
-    /**
-     * A list of error codes generated from validation attempts.
-     * Need to find all the possible subclause reports that need reporting
-     *
-     * @return Array of error codes
-     */
-    public String[] getErrorCodes() {
-        return fErrorCodes;
-
-    }
-
-
-    // This is the only information we can provide in a pipeline.
-    public String getValidationContext() {
-        return fValidationContext;
-    }
-
-    /**
-     * [nil]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-nil>XML Schema Part 1: Structures [nil]</a>
-     * @return true if clause 3.2 of Element Locally Valid (Element) (3.3.4) above is satisfied, otherwise false
-     */
-    public boolean isNil() {
-        return fNil;
-    }
-
-    /**
-     * [notation public]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-notation_public>XML Schema Part 1: Structures [notation public]</a>
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-notation>XML Schema Part 1: Structures [notation]</a>
-     * @return The value of the {public identifier} of that notation declaration.
-     */
-    public String getNotationPublicId() {
-        return (fNotation!=null)?fNotation.fPublicId:null;
-    }
-
-    /**
-     * [notation system]
-     *
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-notation_system>XML Schema Part 1: Structures [notation system]</a>
-     * @return The value of the {system identifier} of that notation declaration.
-     */
-    public String getNotationSystemId() {
-        return (fNotation!=null)?fNotation.fSystemId:null;
-    }
-
-    /**
-     * [schema namespace]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#nsi-schema_namespace>XML Schema Part 1: Structures [schema namespace]</a>
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_information>XML Schema Part 1: Structures [schema information]</a>
-     * @return A namespace name or absent.
-     */
-    public String getSchemaNamespace() {
-        // REVISIT: should we create component for schema-information item?
-        return (fDeclaration !=null)? fDeclaration.fTargetNamespace:null;
-    }
-
-
-    /**
-     * Reset() should be called in validator startElement(..) method.
-     */
-    public void reset() {
-        fDeclaration = null;
-        fTypeDecl = null;
-        fNil = false;
-        fSpecified = true;
-        fNotation = null;
-        fMemberType = null;
-        fValidationAttempted = ElementPSVI.NO_VALIDATION;
-        fValidity = ElementPSVI.UNKNOWN_VALIDITY;
-        fErrorCodes = null;
-        fValidationContext = null;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/xs/SchemaGrammar.java b/src/org/apache/xerces/impl/xs/SchemaGrammar.java
deleted file mode 100644
index d12dd45..0000000
--- a/src/org/apache/xerces/impl/xs/SchemaGrammar.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs; 
-
-import org.apache.xerces.impl.dv.SchemaDVFactory;
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.xs.identity.IdentityConstraint;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.SymbolHash;
-
-import org.apache.xerces.impl.validation.Grammar;
-
-import java.util.Hashtable;
-
-/**
- * This class is to hold all schema component declaration that are declared
- * within one namespace.
- *
- * The Grammar class this class extends contains what little
- * commonality there is between XML Schema and DTD grammars.  It's
- * useful to distinguish grammar objects from other kinds of object
- * when they exist in pools or caches.
- *
- * @author Sandy Gao, IBM
- * @author Elena Litani, IBM
- *
- * @version $Id$
- */
-
-public class SchemaGrammar  extends Grammar {
-
-    /** Symbol table. */
-    private SymbolTable fSymbolTable;
-
-    // the target namespace of grammar
-    public String fTargetNamespace;
-
-    // global decls: map from decl name to decl object
-    SymbolHash fGlobalAttrDecls;
-    SymbolHash fGlobalAttrGrpDecls;
-    SymbolHash fGlobalElemDecls;
-    SymbolHash fGlobalGroupDecls;
-    SymbolHash fGlobalNotationDecls;
-    SymbolHash fGlobalIDConstraintDecls;
-    //REVISIT: still need to decide on it.
-    Hashtable fGlobalTypeDecls;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Default constructor.
-     *
-     * @param symbolTable
-     * @param targetNamespace
-     */
-    public SchemaGrammar(SymbolTable symbolTable, String targetNamespace) {
-        fSymbolTable = symbolTable;
-        fTargetNamespace = targetNamespace;
-
-        // REVISIT: do we know the numbers of the following global decls
-        // when creating this grammar? If so, we can pass the numbers in,
-        // and use that number to initialize the following hashtables.
-        fGlobalAttrDecls  = new SymbolHash();
-        fGlobalAttrGrpDecls = new SymbolHash();
-        fGlobalElemDecls = new SymbolHash();
-        fGlobalGroupDecls = new SymbolHash();
-        fGlobalNotationDecls = new SymbolHash();
-        fGlobalTypeDecls = new Hashtable();
-        fGlobalIDConstraintDecls = new SymbolHash();
-    } // <init>(SymbolTable, String)
-
-    // number of built-in XSTypes we need to create for base and full
-    // datatype set
-    private static final int BASICSET_COUNT = 29;
-    private static final int FULLSET_COUNT  = 46;
-
-    /**
-     * Special constructor to create the grammar for the schema namespace
-     *
-     * @param symbolTable
-     * @param fullSet
-     */
-    protected SchemaGrammar(SymbolTable symbolTable) {
-        fSymbolTable = symbolTable;
-        fTargetNamespace = SchemaSymbols.URI_SCHEMAFORSCHEMA;
-
-        fGlobalAttrDecls  = new SymbolHash(1);
-        fGlobalAttrGrpDecls = new SymbolHash(1);
-        fGlobalElemDecls = new SymbolHash(1);
-        fGlobalGroupDecls = new SymbolHash(1);
-        fGlobalNotationDecls = new SymbolHash(1);
-        fGlobalIDConstraintDecls = new SymbolHash(1);
-
-        SchemaDVFactory schemaFactory = SchemaDVFactory.getInstance();
-        fGlobalTypeDecls = schemaFactory.getBuiltInTypes();
-        addGlobalTypeDecl(fAnyType);
-
-    } // <init>(SymbolTable, boolean)
-
-    // DTDGrammar methods
-    public boolean isNamespaceAware () {
-        return true;
-    } // isNamespaceAware():boolean
-
-    /**
-     * Returns this grammar's target namespace.
-     */
-    public final String getTargetNamespace() {
-        return fTargetNamespace;
-    } // getTargetNamespace():String
-
-    /**
-     * register one global attribute
-     */
-    public final void addGlobalAttributeDecl(XSAttributeDecl decl) {
-        fGlobalAttrDecls.put(decl.fName, decl);
-    }
-
-    /**
-     * register one global attribute group
-     */
-    public final void addGlobalAttributeGroupDecl(XSAttributeGroupDecl decl) {
-        fGlobalAttrGrpDecls.put(decl.fName, decl);
-    }
-
-    /**
-     * register one global element
-     */
-    public final void addGlobalElementDecl(XSElementDecl decl) {
-        fGlobalElemDecls.put(decl.fName, decl);
-
-        // if there is a substitution group affiliation, store in an array,
-        // for further constraint checking: UPA, PD, EDC
-        if (decl.fSubGroup != null) {
-            if (fSubGroupCount == fSubGroups.length)
-                fSubGroups = resize(fSubGroups, fSubGroupCount+INC_SIZE);
-            fSubGroups[fSubGroupCount++] = decl;
-        }
-    }
-
-    /**
-     * register one global group
-     */
-    public final void addGlobalGroupDecl(XSGroupDecl decl) {
-        fGlobalGroupDecls.put(decl.fName, decl);
-    }
-
-    /**
-     * register one global notation
-     */
-    public final void addGlobalNotationDecl(XSNotationDecl decl) {
-        fGlobalNotationDecls.put(decl.fName, decl);
-    }
-
-    /**
-     * register one global type
-     */
-    public final void addGlobalTypeDecl(XSTypeDecl decl) {
-        fGlobalTypeDecls.put(decl.getTypeName(), decl);
-    }
-
-    /**
-     * register one identity constraint
-     */
-    public final void addIDConstraintDecl(XSElementDecl elmDecl, IdentityConstraint decl) {
-        elmDecl.addIDConstaint(decl);
-        fGlobalIDConstraintDecls.put(decl.getIdentityConstraintName(), decl);
-    }
-
-    /**
-     * get one global attribute
-     */
-    public final XSAttributeDecl getGlobalAttributeDecl(String declName) {
-        return(XSAttributeDecl)fGlobalAttrDecls.get(declName);
-    }
-
-    /**
-     * get one global attribute group
-     */
-    public final XSAttributeGroupDecl getGlobalAttributeGroupDecl(String declName) {
-        return(XSAttributeGroupDecl)fGlobalAttrGrpDecls.get(declName);
-    }
-
-    /**
-     * get one global element
-     */
-    public final XSElementDecl getGlobalElementDecl(String declName) {
-        return(XSElementDecl)fGlobalElemDecls.get(declName);
-    }
-
-    /**
-     * get one global group
-     */
-    public final XSGroupDecl getGlobalGroupDecl(String declName) {
-        return(XSGroupDecl)fGlobalGroupDecls.get(declName);
-    }
-
-    /**
-     * get one global notation
-     */
-    public final XSNotationDecl getNotationDecl(String declName) {
-        return(XSNotationDecl)fGlobalNotationDecls.get(declName);
-    }
-
-    /**
-     * get one global type
-     */
-    public final XSTypeDecl getGlobalTypeDecl(String declName) {
-        return(XSTypeDecl)fGlobalTypeDecls.get(declName);
-    }
-
-    /**
-     * get one identity constraint
-     */
-    public final IdentityConstraint getIDConstraintDecl(String declName) {
-        return(IdentityConstraint)fGlobalIDConstraintDecls.get(declName);
-    }
-
-    // array to store complex type decls
-    private static final int INITIAL_SIZE = 16;
-    private static final int INC_SIZE     = 16;
-
-    private int fCTCount = 0;
-    private XSComplexTypeDecl[] fComplexTypeDecls = new XSComplexTypeDecl[INITIAL_SIZE];
-
-    // an array to store groups being redefined by restriction
-    // even-numbered elements are the derived groups, odd-numbered ones their bases
-    private static final int REDEFINED_GROUP_INIT_SIZE = 2; 
-    private int fRGCount = 0;
-    private XSGroupDecl[] fRedefinedGroupDecls = new XSGroupDecl[REDEFINED_GROUP_INIT_SIZE];
-
-    // a flag to indicate whether we have checked the 3 constraints on this
-    // grammar.
-    boolean fFullChecked = false;
-
-    /**
-     * add one complex type decl: for later constraint checking
-     */
-    public final void addComplexTypeDecl(XSComplexTypeDecl decl) {
-        if (fCTCount == fComplexTypeDecls.length)
-            fComplexTypeDecls = resize(fComplexTypeDecls, fCTCount+INC_SIZE);
-        fComplexTypeDecls[fCTCount++] = decl;
-    }
-
-    /**
-     * add a group redefined by restriction: for later constraint checking
-     */
-    public final void addRedefinedGroupDecl(XSGroupDecl derived, XSGroupDecl base) {
-        if (fRGCount == fRedefinedGroupDecls.length)
-            // double array size each time.
-            fRedefinedGroupDecls = resize(fRedefinedGroupDecls, fRGCount << 1);
-        fRedefinedGroupDecls[fRGCount++] = derived;
-        fRedefinedGroupDecls[fRGCount++] = base;
-    }
-
-    /**
-     * get all complex type decls: for later constraint checking
-     */
-    final XSComplexTypeDecl[] getUncheckedComplexTypeDecls() {
-        if (fCTCount < fComplexTypeDecls.length)
-            fComplexTypeDecls = resize(fComplexTypeDecls, fCTCount);
-        return fComplexTypeDecls;
-    }
-
-    /**
-     * get all redefined groups: for later constraint checking
-     */
-    final XSGroupDecl[] getRedefinedGroupDecls() {
-        if (fRGCount < fRedefinedGroupDecls.length)
-            fRedefinedGroupDecls = resize(fRedefinedGroupDecls, fRGCount);
-        return fRedefinedGroupDecls;
-    }
-
-
-    /**
-     * after the first-round checking, some types don't need to be checked
-     * against UPA again. here we trim the array to the proper size.
-     */
-    final void setUncheckedTypeNum(int newSize) {
-        fCTCount = newSize;
-        fComplexTypeDecls = resize(fComplexTypeDecls, fCTCount);
-    }
-
-    // used to store all substitution group information declared in
-    // this namespace
-    private int fSubGroupCount = 0;
-    private XSElementDecl[] fSubGroups = new XSElementDecl[INITIAL_SIZE];
-
-    /**
-     * get all substitution group information: for the 3 constraint checking
-     */
-    final XSElementDecl[] getSubstitutionGroups() {
-        if (fSubGroupCount < fSubGroups.length)
-            fSubGroups = resize(fSubGroups, fSubGroupCount);
-        return fSubGroups;
-    }
-
-    // anyType and anySimpleType: because there are so many places where
-    // we need direct access to these two types
-    public final static XSComplexTypeDecl fAnyType;
-    static {
-        fAnyType = new XSComplexTypeDecl();
-        fAnyType.fName = SchemaSymbols.ATTVAL_ANYTYPE;
-        fAnyType.fTargetNamespace = SchemaSymbols.URI_SCHEMAFORSCHEMA;
-        fAnyType.fBaseType = fAnyType;
-        fAnyType.fDerivedBy = SchemaSymbols.RESTRICTION;
-        fAnyType.fContentType = XSComplexTypeDecl.CONTENTTYPE_MIXED;
-        XSWildcardDecl wildcard = new XSWildcardDecl();
-        XSParticleDecl particle = new XSParticleDecl();
-        particle.fMinOccurs = 0;
-        particle.fMaxOccurs = SchemaSymbols.OCCURRENCE_UNBOUNDED;
-        particle.fType = XSParticleDecl.PARTICLE_WILDCARD;
-        particle.fValue = wildcard;
-        fAnyType.fParticle = particle;
-        fAnyType.fAttrGrp.fAttributeWC = wildcard;
-    }
-
-    // the grammars to hold built-in types
-    public final static SchemaGrammar SG_SchemaNS = new SchemaGrammar(null);
-
-    public final static XSSimpleType fAnySimpleType = (XSSimpleType)SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_ANYSIMPLETYPE);
-
-    static final XSComplexTypeDecl[] resize(XSComplexTypeDecl[] oldArray, int newSize) {
-        XSComplexTypeDecl[] newArray = new XSComplexTypeDecl[newSize];
-        System.arraycopy(oldArray, 0, newArray, 0, Math.min(oldArray.length, newSize));
-        return newArray;
-    }
-
-    static final XSGroupDecl[] resize(XSGroupDecl[] oldArray, int newSize) {
-        XSGroupDecl[] newArray = new XSGroupDecl[newSize];
-        System.arraycopy(oldArray, 0, newArray, 0, Math.min(oldArray.length, newSize));
-        return newArray;
-    }
-
-    static final XSElementDecl[] resize(XSElementDecl[] oldArray, int newSize) {
-        XSElementDecl[] newArray = new XSElementDecl[newSize];
-        System.arraycopy(oldArray, 0, newArray, 0, Math.min(oldArray.length, newSize));
-        return newArray;
-    }
-
-} // class SchemaGrammar
diff --git a/src/org/apache/xerces/impl/xs/SchemaNamespaceSupport.java b/src/org/apache/xerces/impl/xs/SchemaNamespaceSupport.java
deleted file mode 100644
index 1b5a68d..0000000
--- a/src/org/apache/xerces/impl/xs/SchemaNamespaceSupport.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.util.NamespaceSupport;
-
-/**
- * This class customizes the behaviour of the util.NamespaceSupport
- * class in order to easily implement some features that we need for
- * efficient schema handling.  It will not be generally useful.  
- *
- * @author Neil Graham, IBM
- *
- * @version $Id$
- */
-public class SchemaNamespaceSupport 
-    extends NamespaceSupport {
-
-    public SchemaNamespaceSupport () {
-        super();
-    } // constructor
-
-    public SchemaNamespaceSupport(SchemaNamespaceSupport nSupport) {
-        super(nSupport);
-    } // end constructor
-    
-    /**
-     * This method takes a set of Strings, as stored in a
-     * NamespaceSupport object, and "fools" the object into thinking
-     * that this is one unified context.  This is meant to be used in
-     * conjunction with things like local elements, whose declarations
-     * may be deeply nested but which for all practical purposes may
-     * be regarded as being one level below the global <schema>
-     * element--at least with regard to namespace declarations.
-     * It's worth noting that the context from which the strings are
-     * being imported had better be using the same SymbolTable.
-     */
-    public void setEffectiveContext (String [] namespaceDecls) {
-        if(namespaceDecls == null || namespaceDecls.length == 0) return;
-        if(fCurrentContext == fContext.length) {
-            // expand size of fContext
-            int[] newContext = new int[fContext.length*2];
-            System.arraycopy(fContext, 0, newContext, 0, fContext.length);
-            fContext = newContext;
-        }
-        fContext[++fCurrentContext] = fNamespaceSize;
-        while(fNamespace.length > fNamespaceSize + namespaceDecls.length) {
-            // expand namespace's size...
-            String[] tempNSArray = new String[fNamespace.length*2];
-            System.arraycopy(fNamespace, 0, tempNSArray, 0,
-                    fNamespace.length);
-            fNamespace = tempNSArray;
-        }
-        System.arraycopy(namespaceDecls, 0, fNamespace, fNamespaceSize,
-        namespaceDecls.length);
-        fNamespaceSize += namespaceDecls.length;
-    } // setEffectiveContext(String):void
-
-    /** 
-     * This method returns an array of Strings, as would be stored in
-     * a NamespaceSupport object.  This array contains all
-     * declarations except those at the global level.
-     */
-    public String [] getEffectiveLocalContext() {
-        // the trick here is to recognize that all local contexts
-        // happen to start at fContext[2].
-        int bottomLocalContext = (fCurrentContext >= 2) ? fContext[2]:-1;
-        if (bottomLocalContext == -1) {
-            // no local decls!
-            return null;
-        }
-        String [] returnVal = new String[fNamespaceSize-bottomLocalContext];
-        System.arraycopy(fNamespace, bottomLocalContext, returnVal, 0,
-                fNamespaceSize-bottomLocalContext);
-        return returnVal;
-    } // getEffectiveLocalContext():String
-
-    // This method removes from this object all the namespaces
-    // returned by getEffectiveLocalContext. 
-    public void makeGlobal() {
-        int topLocalContext = (fCurrentContext >= 2) ? fContext[2]:-1;
-        if(topLocalContext == -1) {
-            return; // nothing to do!
-        }
-        fCurrentContext = 1;
-        fNamespaceSize = fContext[fCurrentContext];
-    } // makeGlobal
-} // class NamespaceSupport
diff --git a/src/org/apache/xerces/impl/xs/SchemaSymbols.java b/src/org/apache/xerces/impl/xs/SchemaSymbols.java
deleted file mode 100644
index 486fc81..0000000
--- a/src/org/apache/xerces/impl/xs/SchemaSymbols.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.util.SymbolTable;
-
-/**
- * Collection of symbols used to parse a Schema Grammar.
- *
- * @author jeffrey rodriguez
- * @version $Id$
- */
-public final class SchemaSymbols {
-
-    public static final String EMPTY_STRING                   = "";
-
-    // strings that's not added to the schema symbol table, because they
-    // are not symbols in the schema document.
-    // the validator can choose to add them by itself.
-
-    // the following strings (xsi:, xsd) will be added into the
-    // symbol table that comes with the parser
-
-    // xmlns attributes
-    public static final String O_XMLNS                        = "xmlns";
-    // xsi attributes: in validator
-    public static final String URI_XSI                        = "http://www.w3.org/2001/XMLSchema-instance";
-    public static final String OXSI_SCHEMALOCATION            = "schemaLocation";
-    public static final String OXSI_NONAMESPACESCHEMALOCATION = "noNamespaceSchemaLocation";
-    public static final String OXSI_TYPE                       = "type";
-    public static final String OXSI_NIL                        = "nil";
-
-    // schema namespace
-    public static final String OURI_SCHEMAFORSCHEMA            = "http://www.w3.org/2001/XMLSchema";
-
-    // the schema symbol table that holds all schema symbols.
-    // these are used within schema traversers (including XSDHandler).
-    // when a new DOM parser is created to parse schema document,
-    // XSDHandler is responsible for passing this symbol table to that parser.
-    public static final SymbolTable fSymbolTable = new SymbolTable();
-
-    // xmlns and schema namespace is also added to the schema symbol table
-    public static final String XMLNS                    = fSymbolTable.addSymbol(O_XMLNS);
-    public static final String URI_SCHEMAFORSCHEMA      = fSymbolTable.addSymbol(OURI_SCHEMAFORSCHEMA);
-
-    // all possible schema element names
-    public static final String ELT_ALL                  = fSymbolTable.addSymbol("all");
-    public static final String ELT_ANNOTATION           = fSymbolTable.addSymbol("annotation");
-    public static final String ELT_ANY                  = fSymbolTable.addSymbol("any");
-    public static final String ELT_ANYATTRIBUTE         = fSymbolTable.addSymbol("anyAttribute");
-    public static final String ELT_APPINFO              = fSymbolTable.addSymbol("appinfo");
-    public static final String ELT_ATTRIBUTE            = fSymbolTable.addSymbol("attribute");
-    public static final String ELT_ATTRIBUTEGROUP       = fSymbolTable.addSymbol("attributeGroup");
-    public static final String ELT_CHOICE               = fSymbolTable.addSymbol("choice");
-    public static final String ELT_COMPLEXCONTENT       = fSymbolTable.addSymbol("complexContent");
-    public static final String ELT_COMPLEXTYPE          = fSymbolTable.addSymbol("complexType");
-    public static final String ELT_DOCUMENTATION        = fSymbolTable.addSymbol("documentation");
-    public static final String ELT_ELEMENT              = fSymbolTable.addSymbol("element");
-    public static final String ELT_ENUMERATION          = fSymbolTable.addSymbol("enumeration");
-    public static final String ELT_EXTENSION            = fSymbolTable.addSymbol("extension");
-    public static final String ELT_FIELD                = fSymbolTable.addSymbol("field");
-    public static final String ELT_FRACTIONDIGITS       = fSymbolTable.addSymbol("fractionDigits");
-    public static final String ELT_GROUP                = fSymbolTable.addSymbol("group");
-    public static final String ELT_IMPORT               = fSymbolTable.addSymbol("import");
-    public static final String ELT_INCLUDE              = fSymbolTable.addSymbol("include");
-    public static final String ELT_KEY                  = fSymbolTable.addSymbol("key");
-    public static final String ELT_KEYREF               = fSymbolTable.addSymbol("keyref");
-    public static final String ELT_LENGTH               = fSymbolTable.addSymbol("length");
-    public static final String ELT_LIST                 = fSymbolTable.addSymbol("list");
-    public static final String ELT_MAXEXCLUSIVE         = fSymbolTable.addSymbol("maxExclusive");
-    public static final String ELT_MAXINCLUSIVE         = fSymbolTable.addSymbol("maxInclusive");
-    public static final String ELT_MAXLENGTH            = fSymbolTable.addSymbol("maxLength");
-    public static final String ELT_MINEXCLUSIVE         = fSymbolTable.addSymbol("minExclusive");
-    public static final String ELT_MININCLUSIVE         = fSymbolTable.addSymbol("minInclusive");
-    public static final String ELT_MINLENGTH            = fSymbolTable.addSymbol("minLength");
-    public static final String ELT_NOTATION             = fSymbolTable.addSymbol("notation");
-    public static final String ELT_PATTERN              = fSymbolTable.addSymbol("pattern");
-    public static final String ELT_REDEFINE             = fSymbolTable.addSymbol("redefine");
-    public static final String ELT_RESTRICTION          = fSymbolTable.addSymbol("restriction");
-    public static final String ELT_SCHEMA               = fSymbolTable.addSymbol("schema");
-    public static final String ELT_SELECTOR             = fSymbolTable.addSymbol("selector");
-    public static final String ELT_SEQUENCE             = fSymbolTable.addSymbol("sequence");
-    public static final String ELT_SIMPLECONTENT        = fSymbolTable.addSymbol("simpleContent");
-    public static final String ELT_SIMPLETYPE           = fSymbolTable.addSymbol("simpleType");
-    public static final String ELT_TOTALDIGITS          = fSymbolTable.addSymbol("totalDigits");
-    public static final String ELT_UNION                = fSymbolTable.addSymbol("union");
-    public static final String ELT_UNIQUE               = fSymbolTable.addSymbol("unique");
-    public static final String ELT_WHITESPACE           = fSymbolTable.addSymbol("whiteSpace");
-
-    // all possible schema attribute names
-    public static final String ATT_ABSTRACT             = fSymbolTable.addSymbol("abstract");
-    public static final String ATT_ATTRIBUTEFORMDEFAULT = fSymbolTable.addSymbol("attributeFormDefault");
-    public static final String ATT_BASE                 = fSymbolTable.addSymbol("base");
-    public static final String ATT_BLOCK                = fSymbolTable.addSymbol("block");
-    public static final String ATT_BLOCKDEFAULT         = fSymbolTable.addSymbol("blockDefault");
-    public static final String ATT_DEFAULT              = fSymbolTable.addSymbol("default");
-    public static final String ATT_ELEMENTFORMDEFAULT   = fSymbolTable.addSymbol("elementFormDefault");
-    public static final String ATT_FINAL                = fSymbolTable.addSymbol("final");
-    public static final String ATT_FINALDEFAULT         = fSymbolTable.addSymbol("finalDefault");
-    public static final String ATT_FIXED                = fSymbolTable.addSymbol("fixed");
-    public static final String ATT_FORM                 = fSymbolTable.addSymbol("form");
-    public static final String ATT_ID                   = fSymbolTable.addSymbol("id");
-    public static final String ATT_ITEMTYPE             = fSymbolTable.addSymbol("itemType");
-    public static final String ATT_MAXOCCURS            = fSymbolTable.addSymbol("maxOccurs");
-    public static final String ATT_MEMBERTYPES          = fSymbolTable.addSymbol("memberTypes");
-    public static final String ATT_MINOCCURS            = fSymbolTable.addSymbol("minOccurs");
-    public static final String ATT_MIXED                = fSymbolTable.addSymbol("mixed");
-    public static final String ATT_NAME                 = fSymbolTable.addSymbol("name");
-    public static final String ATT_NAMESPACE            = fSymbolTable.addSymbol("namespace");
-    public static final String ATT_NILLABLE             = fSymbolTable.addSymbol("nillable");
-    public static final String ATT_PROCESSCONTENTS      = fSymbolTable.addSymbol("processContents");
-    public static final String ATT_REF                  = fSymbolTable.addSymbol("ref");
-    public static final String ATT_REFER                = fSymbolTable.addSymbol("refer");
-    public static final String ATT_SCHEMALOCATION       = fSymbolTable.addSymbol("schemaLocation");
-    public static final String ATT_SOURCE               = fSymbolTable.addSymbol("source");
-    public static final String ATT_SUBSTITUTIONGROUP    = fSymbolTable.addSymbol("substitutionGroup");
-    public static final String ATT_SYSTEM               = fSymbolTable.addSymbol("system");
-    public static final String ATT_PUBLIC               = fSymbolTable.addSymbol("public");
-    public static final String ATT_TARGETNAMESPACE      = fSymbolTable.addSymbol("targetNamespace");
-    public static final String ATT_TYPE                 = fSymbolTable.addSymbol("type");
-    public static final String ATT_USE                  = fSymbolTable.addSymbol("use");
-    public static final String ATT_VALUE                = fSymbolTable.addSymbol("value");
-    public static final String ATT_VERSION              = fSymbolTable.addSymbol("version");
-    public static final String ATT_XPATH                = fSymbolTable.addSymbol("xpath");
-
-    // all possible schema attribute values
-    public static final String ATTVAL_TWOPOUNDANY       = "##any";
-    public static final String ATTVAL_TWOPOUNDLOCAL     = "##local";
-    public static final String ATTVAL_TWOPOUNDOTHER     = "##other";
-    public static final String ATTVAL_TWOPOUNDTARGETNS  = "##targetNamespace";
-    public static final String ATTVAL_POUNDALL          = "#all";
-    public static final String ATTVAL_FALSE_0           = "0";
-    public static final String ATTVAL_TRUE_1            = "1";
-    public static final String ATTVAL_ANYSIMPLETYPE     = "anySimpleType";
-    public static final String ATTVAL_ANYTYPE           = "anyType";
-    public static final String ATTVAL_ANYURI            = "anyURI";
-    public static final String ATTVAL_BASE64BINARY      = "base64Binary";
-    public static final String ATTVAL_BOOLEAN           = "boolean";
-    public static final String ATTVAL_BYTE              = "byte";
-    public static final String ATTVAL_COLLAPSE          = "collapse";
-    public static final String ATTVAL_DATE              = "date";
-    public static final String ATTVAL_DATETIME          = "dateTime";
-    public static final String ATTVAL_DAY               = "gDay";
-    public static final String ATTVAL_DECIMAL           = "decimal";
-    public static final String ATTVAL_DOUBLE            = "double";
-    public static final String ATTVAL_DURATION          = "duration";
-    public static final String ATTVAL_ENTITY            = "ENTITY";
-    public static final String ATTVAL_ENTITIES          = "ENTITIES";
-    public static final String ATTVAL_EXTENSION         = "extension";
-    public static final String ATTVAL_FALSE             = "false";
-    public static final String ATTVAL_FLOAT             = "float";
-    public static final String ATTVAL_HEXBINARY         = "hexBinary";
-    public static final String ATTVAL_ID                = "ID";
-    public static final String ATTVAL_IDREF             = "IDREF";
-    public static final String ATTVAL_IDREFS            = "IDREFS";
-    public static final String ATTVAL_INT               = "int";
-    public static final String ATTVAL_INTEGER           = "integer";
-    public static final String ATTVAL_LANGUAGE          = "language";
-    public static final String ATTVAL_LAX               = "lax";
-    public static final String ATTVAL_LIST              = "list";
-    public static final String ATTVAL_LONG              = "long";
-    public static final String ATTVAL_NAME              = "Name";
-    public static final String ATTVAL_NEGATIVEINTEGER   = "negativeInteger";
-    public static final String ATTVAL_MONTH             = "gMonth";
-    public static final String ATTVAL_MONTHDAY          = "gMonthDay";
-    public static final String ATTVAL_NCNAME            = "NCName";
-    public static final String ATTVAL_NMTOKEN           = "NMTOKEN";
-    public static final String ATTVAL_NMTOKENS          = "NMTOKENS";
-    public static final String ATTVAL_NONNEGATIVEINTEGER= "nonNegativeInteger";
-    public static final String ATTVAL_NONPOSITIVEINTEGER= "nonPositiveInteger";
-    public static final String ATTVAL_NORMALIZEDSTRING  = "normalizedString";
-    public static final String ATTVAL_NOTATION          = "NOTATION";
-    public static final String ATTVAL_OPTIONAL          = "optional";
-    public static final String ATTVAL_POSITIVEINTEGER   = "positiveInteger";
-    public static final String ATTVAL_PRESERVE          = "preserve";
-    public static final String ATTVAL_PROHIBITED        = "prohibited";
-    public static final String ATTVAL_QNAME             = "QName";
-    public static final String ATTVAL_QUALIFIED         = "qualified";
-    public static final String ATTVAL_REPLACE           = "replace";
-    public static final String ATTVAL_REQUIRED          = "required";
-    public static final String ATTVAL_RESTRICTION       = "restriction";
-    public static final String ATTVAL_SHORT             = "short";
-    public static final String ATTVAL_SKIP              = "skip";
-    public static final String ATTVAL_STRICT            = "strict";
-    public static final String ATTVAL_STRING            = "string";
-    public static final String ATTVAL_SUBSTITUTION      = "substitution";
-    public static final String ATTVAL_TIME              = "time";
-    public static final String ATTVAL_TOKEN             = "token";
-    public static final String ATTVAL_TRUE              = "true";
-    public static final String ATTVAL_UNBOUNDED         = "unbounded";
-    public static final String ATTVAL_UNION             = "union";
-    public static final String ATTVAL_UNQUALIFIED       = "unqualified";
-    public static final String ATTVAL_UNSIGNEDBYTE      = "unsignedByte";
-    public static final String ATTVAL_UNSIGNEDINT       = "unsignedInt";
-    public static final String ATTVAL_UNSIGNEDLONG      = "unsignedLong";
-    public static final String ATTVAL_UNSIGNEDSHORT     = "unsignedShort";
-    public static final String ATTVAL_YEAR              = "gYear";
-    public static final String ATTVAL_YEARMONTH         = "gYearMonth";
-
-    // block/final values
-    public static final short EMPTY_SET    = 0;
-    public static final short EXTENSION    = 1;
-    public static final short RESTRICTION  = 2;
-    public static final short UNION        = 4;
-    public static final short LIST         = 8;
-    public static final short ENUMERATION  = 16;
-    public static final short SUBSTITUTION = 32;
-
-    // form qualified/unqualified
-    public static final short FORM_UNQUALIFIED = 0;
-    public static final short FORM_QUALIFIED   = 1;
-
-    // any: processContents
-    public static final short ANY_STRICT = 0;
-    public static final short ANY_LAX    = 1;
-    public static final short ANY_SKIP   = 2;
-
-    // attribute use
-    public static final short USE_OPTIONAL   = 0;
-    public static final short USE_REQUIRED   = 1;
-    public static final short USE_PROHIBITED = 2;
-
-    // whiteSpace
-    public static final short WS_PRESERVE = 0;
-    public static final short WS_REPLACE  = 1;
-    public static final short WS_COLLAPSE = 2;
-
-    // maxOccurs = "unbounded"
-   public static final int OCCURRENCE_UNBOUNDED = -1;
-
-
-    /**
-     * Shadowed symbol table. For schema document use.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static final class SchemaSymbolTable extends SymbolTable {
-
-        //
-        // Data
-        //
-
-        /** Main symbol table. */
-        protected SymbolTable fSymbolTable = SchemaSymbols.fSymbolTable;
-
-        //
-        // Constructors
-        //
-
-        //
-        // SymbolTable methods
-        //
-
-        /**
-         * Adds the specified symbol to the symbol table and returns a
-         * reference to the unique symbol. If the symbol already exists,
-         * the previous symbol reference is returned instead, in order
-         * guarantee that symbol references remain unique.
-         *
-         * @param symbol The new symbol.
-         */
-        public String addSymbol(String symbol) {
-
-            if (fSymbolTable.containsSymbol(symbol)) {
-                return fSymbolTable.addSymbol(symbol);
-            }
-            return super.addSymbol(symbol);
-
-        } // addSymbol(String)
-
-        /**
-         * Adds the specified symbol to the symbol table and returns a
-         * reference to the unique symbol. If the symbol already exists,
-         * the previous symbol reference is returned instead, in order
-         * guarantee that symbol references remain unique.
-         *
-         * @param buffer The buffer containing the new symbol.
-         * @param offset The offset into the buffer of the new symbol.
-         * @param length The length of the new symbol in the buffer.
-         */
-        public String addSymbol(char[] buffer, int offset, int length) {
-
-            if (fSymbolTable.containsSymbol(buffer, offset, length)) {
-                return fSymbolTable.addSymbol(buffer, offset, length);
-            }
-            return super.addSymbol(buffer, offset, length);
-
-        } // addSymbol(char[],int,int):String
-
-        /**
-         * Returns a hashcode value for the specified symbol. The value
-         * returned by this method must be identical to the value returned
-         * by the <code>hash(char[],int,int)</code> method when called
-         * with the character array that comprises the symbol string.
-         *
-         * @param symbol The symbol to hash.
-         */
-        public int hash(String symbol) {
-            return fSymbolTable.hash(symbol);
-        } // hash(String):int
-
-        /**
-         * Returns a hashcode value for the specified symbol information.
-         * The value returned by this method must be identical to the value
-         * returned by the <code>hash(String)</code> method when called
-         * with the string object created from the symbol information.
-         *
-         * @param buffer The character buffer containing the symbol.
-         * @param offset The offset into the character buffer of the start
-         *               of the symbol.
-         * @param length The length of the symbol.
-         */
-        public int hash(char[] buffer, int offset, int length) {
-            return fSymbolTable.hash(buffer, offset, length);
-        } // hash(char[],int,int):int
-
-    } // class ShadowedSymbolTable
-
-}
diff --git a/src/org/apache/xerces/impl/xs/SubstitutionGroupHandler.java b/src/org/apache/xerces/impl/xs/SubstitutionGroupHandler.java
deleted file mode 100644
index ded5d83..0000000
--- a/src/org/apache/xerces/impl/xs/SubstitutionGroupHandler.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.xni.QName;
-import java.util.Hashtable;
-import java.util.Vector;
-
-/**
- * To store and validate information about substitutionGroup
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class SubstitutionGroupHandler {
-
-    // grammar resolver
-    XSGrammarResolver fGrammarResolver;
-
-    /**
-     * Default constructor
-     */
-    public SubstitutionGroupHandler(XSGrammarResolver grammarResolver) {
-        fGrammarResolver = grammarResolver;
-    }
-
-    // 3.9.4 Element Sequence Locally Valid (Particle) 2.3.3
-    // check whether one element decl matches an element with the given qname
-    public XSElementDecl getMatchingElemDecl(QName element, XSElementDecl exemplar) {
-        if (element.localpart == exemplar.fName &&
-            element.uri == exemplar.fTargetNamespace) {
-            return exemplar;
-        }
-
-        // if the exemplar is not a global element decl, then it's not possible
-        // to be substituted by another element.
-        if (!exemplar.isGlobal())
-            return null;
-
-        // if the decl blocks substitution, return false
-        if ((exemplar.fBlock & SchemaSymbols.SUBSTITUTION) != 0)
-            return null;
-
-        // get grammar of the element
-        SchemaGrammar sGrammar = fGrammarResolver.getGrammar(element.uri);
-        if (sGrammar == null)
-            return null;
-
-        // get the decl for the element
-        XSElementDecl eDecl = sGrammar.getGlobalElementDecl(element.localpart);
-        if (eDecl == null)
-            return null;
-
-        // and check by using substitutionGroup information
-        if (substitutionGroupOK(eDecl, exemplar, exemplar.fBlock))
-            return eDecl;
-
-        return null;
-    }
-
-    // 3.3.6 Substitution Group OK (Transitive)
-    // check whether element can substitute exemplar
-    protected boolean substitutionGroupOK(XSElementDecl element, XSElementDecl exemplar, short blockingConstraint) {
-        // For an element declaration (call it D) together with a blocking constraint (a subset of {substitution, extension, restriction}, the value of a {disallowed substitutions}) to be validly substitutable for another element declaration (call it C) all of the following must be true:
-        // 1 The blocking constraint does not contain substitution.
-        if ((blockingConstraint & SchemaSymbols.SUBSTITUTION) != 0)
-            return false;
-
-        // prepare the combination of {derivation method} and
-        // {disallowed substitution}
-        short devMethod = 0, blockConstraint = blockingConstraint;
-
-        // initialize the derivation method to be that of the type of D
-        XSTypeDecl type = element.fType;
-        if (type.getXSType() == XSTypeDecl.COMPLEX_TYPE)
-            devMethod = ((XSComplexTypeDecl)type).fDerivedBy;
-        else
-            devMethod = SchemaSymbols.RESTRICTION;
-
-        // initialize disallowed substitution to the passed in blocking constraint
-        type = exemplar.fType;
-        if (type.getXSType() == XSTypeDecl.COMPLEX_TYPE)
-            blockConstraint |= ((XSComplexTypeDecl)type).fBlock;
-
-        // 2 There is a chain of {substitution group affiliation}s from D to C, that is, either D's {substitution group affiliation} is C, or D's {substitution group affiliation}'s {substitution group affiliation} is C, or . . .
-        XSElementDecl subGroup = element.fSubGroup;
-        while (subGroup != null && subGroup != exemplar) {
-            // add the derivation method and disallowed substitution info
-            // of the current type to the corresponding variables
-            type = subGroup.fType;
-            if (type.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-                devMethod |= ((XSComplexTypeDecl)type).fDerivedBy;
-                blockConstraint |= ((XSComplexTypeDecl)type).fBlock;
-            } else {
-                devMethod |= SchemaSymbols.RESTRICTION;
-            }
-            subGroup = subGroup.fSubGroup;
-        }
-
-        if (subGroup == null)
-            return false;
-
-        // 3 The set of all {derivation method}s involved in the derivation of D's {type definition} from C's {type definition} does not intersect with the union of the blocking constraint, C's {prohibited substitutions} (if C is complex, otherwise the empty set) and the {prohibited substitutions} (respectively the empty set) of any intermediate {type definition}s in the derivation of D's {type definition} from C's {type definition}.
-        if ((devMethod & blockConstraint) != 0)
-            return false;
-
-        return true;
-    }
-
-    // check whether element is in exemplar's substitution group
-    public boolean inSubstitutionGroup(XSElementDecl element, XSElementDecl exemplar) {
-        // [Definition:]  Every element declaration in the {element declarations} of a schema defines a substitution group, a subset of those {element declarations}, as follows:
-        // 1 The element declaration itself is in the group;
-        // 2 The group is closed with respect to {substitution group affiliation}, that is, if any element declaration in the {element declarations} has a {substitution group affiliation} in the group, then it is also in the group itself.
-        while (element != null && element != exemplar) {
-            element = element.fSubGroup;
-        }
-        return (element != null);
-    }
-
-    // to store substitution group information
-    // the key to the hashtable is an element decl, and the value is
-    // - a Vector, which contains all elements that has this element as their
-    //   substitution group affilication
-    // - an array, which contains its substitution group.
-    Hashtable fSubGroups = new Hashtable();
-    private static XSElementDecl[] EMPTY_VECTOR = new XSElementDecl[0];
-
-    /**
-     * clear the internal registry of substitutionGroup information
-     */
-    public void reset() {
-        fSubGroups.clear();
-    }
-
-    /**
-     * add a list of substitution group information.
-     */
-    public void addSubstitutionGroup(XSElementDecl[] elements) {
-        XSElementDecl subHead, element;
-        Vector subGroup;
-        // for all elements with substitution group affiliation
-        for (int i = elements.length-1; i >= 0; i--) {
-            element = elements[i];
-            subHead = element.fSubGroup;
-            // check whether this an entry for this element
-            subGroup = (Vector)fSubGroups.get(subHead);
-            if (subGroup == null) {
-                // if not, create a new one
-                subGroup = new Vector();
-                fSubGroups.put(subHead, subGroup);
-            }
-            // add to the vactor
-            subGroup.addElement(element);
-        }
-    }
-
-    /**
-     * get all elements that can substitute the given element,
-     * according to the spec, we shouldn't consider the {block} constraints.
-     *
-     * from the spec, substitution group of a given element decl also contains
-     * the element itself. but the array returned from this method doesn't
-     * containt this element.
-     */
-    public XSElementDecl[] getSubstitutionGroup(XSElementDecl element) {
-        XSElementDecl[] ret;
-        Object subGroup = fSubGroups.get(element);
-        if (subGroup == null) {
-            // substitution group for this one is empty
-            ret = EMPTY_VECTOR;
-            fSubGroups.put(element, ret);
-        } else if (subGroup instanceof XSElementDecl[]) {
-            // we've already calculated the element, just return.
-            ret = (XSElementDecl[])subGroup;
-        } else {
-            // we only have the *direct* substitutions
-            Vector group = (Vector)subGroup;
-            XSElementDecl[] group1;
-            // then for each of the direct substitutions, get its substitution
-            // group, and combine the groups together.
-            for (int i = group.size()-1, j; i >= 0; i--) {
-                group1 = getSubstitutionGroup((XSElementDecl)group.elementAt(i));
-                for (j = group1.length-1; j >= 0; j--)
-                    group.addElement(group1[j]);
-            }
-            ret = new XSElementDecl[group.size()];
-            for (int i = group.size()-1; i >= 0; i--) {
-                ret[i] = (XSElementDecl)group.elementAt(i);
-            }
-            fSubGroups.put(element, ret);
-        }
-
-        return ret;
-    }
-
-} // class SubstitutionGroupHandler
diff --git a/src/org/apache/xerces/impl/xs/XMLSchemaException.java b/src/org/apache/xerces/impl/xs/XMLSchemaException.java
deleted file mode 100644
index 0376903..0000000
--- a/src/org/apache/xerces/impl/xs/XMLSchemaException.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.impl.xs;
-
-/**
- * This exception might be thrown by any constraint checking method.
- *
- * @author Elena Litani, IBM
- *
- * @version $Id$
- */
-public class XMLSchemaException extends Exception {
-
-    // this one is like reportGenericSchemaError: remove it later
-    public XMLSchemaException(String msg) {
-        this("general", new Object[]{msg});
-    }
-
-    // store a datatype error: error code plus the arguments
-    String key;
-    Object[] args;
-
-    // report an error
-    public XMLSchemaException(String key, Object[] args) {
-        this.key = key;
-        this.args = args;
-    }
-
-    public String getKey() {
-        return key;
-    }
-
-    public Object[] getArgs() {
-        return args;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java b/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
deleted file mode 100644
index fb38642..0000000
--- a/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
+++ /dev/null
@@ -1,3236 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.ValidatedInfo;
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.xs.identity.*;
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.validation.ValidationManager;
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.impl.validation.Grammar;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.traversers.XSDHandler;
-import org.apache.xerces.impl.xs.traversers.XSAttributeChecker;
-import org.apache.xerces.impl.xs.models.CMBuilder;
-import org.apache.xerces.impl.xs.models.XSCMValidator;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-import org.apache.xerces.impl.validation.ValidationState;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-import java.io.IOException;
-import org.apache.xerces.util.NamespaceSupport;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.XMLChar;
-import org.apache.xerces.util.IntStack;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLDocumentFilter;
-
-
-import org.apache.xerces.xni.psvi.ElementPSVI;
-import org.apache.xerces.xni.psvi.AttributePSVI;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Stack;
-import java.util.Vector;
-import java.util.StringTokenizer;
-
-/**
- * The DTD validator. The validator implements a document
- * filter: receiving document events from the scanner; validating
- * the content and structure; augmenting the InfoSet, if applicable;
- * and notifying the parser of the information resulting from the
- * validation process.
- * <p>
- * This component requires the following features and properties from the
- * component manager that uses it:
- * <ul>
- *  <li>http://xml.org/sax/features/validation</li>
- *  <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *  <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *  <li>http://apache.org/xml/properties/internal/entity-resolver</li>
- * </ul>
- *
- * @author Sandy Gao IBM
- * @author Elena Litani IBM
- * @author Andy Clark IBM
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @version $Id$
- */
-public class XMLSchemaValidator
-             implements XMLComponent, XMLDocumentFilter, FieldActivator {
-
-    //
-    // Constants
-    //
-    private static final boolean DEBUG = false;
-    // feature identifiers
-
-
-    protected static final String NAMESPACES =
-    Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
-    /** Feature identifier: validation. */
-    protected static final String VALIDATION =
-    Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
-    /** Feature identifier: validation. */
-    protected static final String SCHEMA_VALIDATION =
-    Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE;
-
-    /** Feature identifier: schema full checking*/
-    protected static final String SCHEMA_FULL_CHECKING =
-    Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
-
-    /** Feature identifier: dynamic validation. */
-    protected static final String DYNAMIC_VALIDATION =
-    Constants.XERCES_FEATURE_PREFIX + Constants.DYNAMIC_VALIDATION_FEATURE;
-
-    // property identifiers
-
-    /** Property identifier: symbol table. */
-    public static final String SYMBOL_TABLE =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    /** Property identifier: error reporter. */
-    public static final String ERROR_REPORTER =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
-    /** Property identifier: entity resolver. */
-    public static final String ENTITY_RESOLVER =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
-
-    /** Property identifier: grammar pool. */
-    public static final String GRAMMAR_POOL =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.GRAMMAR_POOL_PROPERTY;
-
-    protected static final String VALIDATION_MANAGER =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-
-    // REVISIT: this is just a temporary solution for entity resolver
-    //          while we are making a decision
-    protected static final String ENTITY_MANAGER =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
-    /** Property identifier: schema location. */
-    protected static final String SCHEMA_LOCATION =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_LOCATION;
-
-    /** Property identifier: no namespace schema location. */
-    protected static final String SCHEMA_NONS_LOCATION =
-    Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_NONS_LOCATION;
-
-    // recognized features and properties
-
-    /** Recognized features. */
-    protected static final String[] RECOGNIZED_FEATURES = {
-        VALIDATION,
-        NAMESPACES,
-        SCHEMA_VALIDATION,
-        DYNAMIC_VALIDATION,
-        SCHEMA_FULL_CHECKING,
-    };
-
-    /** Recognized properties. */
-    protected static final String[] RECOGNIZED_PROPERTIES = {
-        SYMBOL_TABLE,
-        ERROR_REPORTER,
-        ENTITY_RESOLVER,
-        VALIDATION_MANAGER,
-        SCHEMA_LOCATION,
-        SCHEMA_NONS_LOCATION
-    };
-
-    //
-    // Data
-    //
-    protected boolean fSeenRoot = false;
-    // features
-    // REVISIT: what does it mean if namespaces is off
-    //          while schema validation is on?
-    protected boolean fNamespaces = false;
-
-    /** PSV infoset information for element */
-    protected final  ElementPSVImpl fElemPSVI = new ElementPSVImpl();
-
-    /** current PSVI element info */
-    protected ElementPSVImpl fCurrentPSVI = null;
-
-    // REVISIT: define constant here?
-    protected final static String ELEM_PSVI = "ELEM_PSVI";
-    protected final static String ATTR_PSVI = "ATTR_PSVI";
-
-
-    /** Validation. */
-    protected boolean fValidation = false;
-    protected boolean fDynamicValidation = false;
-    protected boolean fDoValidation = false;
-    protected boolean fFullChecking = false;
-
-    // properties
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    /**
-     * A wrapper of the standard error reporter. We'll store all schema errors
-     * in this wrapper object, so that we can get all errors (error codes) of
-     * a specific element. This is useful for PSVI.
-     */
-    class XSIErrorReporter {
-
-        // the error reporter property
-        XMLErrorReporter fErrorReporter;
-
-        // store error codes; starting position of the errors for each element;
-        // number of element (depth); and whether to record error
-        Vector  fErrors = new Vector(INITIAL_STACK_SIZE, INC_STACK_SIZE);
-        int[]   fContext = new int[INITIAL_STACK_SIZE];
-        int     fContextCount;
-
-        // set the external error reporter, clear errors
-        public void reset(XMLErrorReporter errorReporter) {
-            fErrorReporter = errorReporter;
-            fErrors.removeAllElements();
-            fContextCount = 0;
-        }
-
-        // should be called on startElement: store the starting position
-        // for the current element
-        public void pushContext() {
-            // resize array if necessary
-            if (fContextCount == fContext.length) {
-                int newSize = fContextCount + INC_STACK_SIZE;
-                int[] newArray = new int[newSize];
-                System.arraycopy(fContext, 0, newArray, 0, fContextCount);
-                fContext = newArray;
-            }
-
-            fContext[fContextCount++] = fErrors.size();
-        }
-
-        // should be called on endElement: get all errors of the current element
-        public String[] popContext() {
-            // get starting position of the current element
-            int contextPos = fContext[--fContextCount];
-            // number of errors of the current element
-            int size = fErrors.size() - contextPos;
-            // if no errors, return null
-            if (size == 0)
-                return null;
-            // copy errors from the list to an string array
-            String[] errors = new String[size];
-            for (int i = 0; i < size; i++) {
-                errors[i] = (String)fErrors.elementAt(contextPos + i);
-            }
-            // remove errors of the current element
-            fErrors.setSize(contextPos);
-            return errors;
-        }
-
-        public void reportError(String domain, String key, Object[] arguments,
-                                short severity) throws XNIException {
-            fErrorReporter.reportError(domain, key, arguments, severity);
-            fErrors.addElement(key);
-        } // reportError(String,String,Object[],short)
-
-        public void reportError(XMLLocator location,
-                                String domain, String key, Object[] arguments,
-                                short severity) throws XNIException {
-            fErrorReporter.reportError(location, domain, key, arguments, severity);
-            fErrors.addElement(key);
-        } // reportError(XMLLocator,String,String,Object[],short)
-    }
-
-    /** Error reporter. */
-    protected XSIErrorReporter fXSIErrorReporter = new XSIErrorReporter();
-
-    /** Entity resolver */
-    protected XMLEntityResolver fEntityResolver;
-
-    // updated during reset
-    protected ValidationManager fValidationManager = null;
-    protected ValidationState fValidationState = null;
-    protected GrammarPool fGrammarPool;
-
-    // schema location property values
-    protected String fExternalSchemas = null;
-    protected String fExternalNoNamespaceSchema = null;
-
-    // handlers
-
-    /** Document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures() {
-        return RECOGNIZED_FEATURES;
-    } // getRecognizedFeatures():String[]
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     *
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setFeature(String featureId, boolean state)
-    throws XMLConfigurationException {
-    } // setFeature(String,boolean)
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties() {
-        return RECOGNIZED_PROPERTIES;
-    } // getRecognizedProperties():String[]
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value.
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     *
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws SAXNotRecognizedException The component should not throw
-     *                                   this exception.
-     * @throws SAXNotSupportedException The component should not throw
-     *                                  this exception.
-     */
-    public void setProperty(String propertyId, Object value)
-    throws XMLConfigurationException {
-    } // setProperty(String,Object)
-
-    //
-    // XMLDocumentSource methods
-    //
-
-    /**
-     * Sets the document handler to receive information about the document.
-     *
-     * @param documentHandler The document handler.
-     */
-    public void setDocumentHandler(XMLDocumentHandler documentHandler) {
-        fDocumentHandler = documentHandler;
-    } // setDocumentHandler(XMLDocumentHandler)
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * The start of the document.
-     *
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-    throws XNIException {
-
-        handleStartDocument(locator, encoding);
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startDocument(locator, encoding, augs);
-        }
-
-    } // startDocument(XMLLocator,String)
-
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     *
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
-    throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.xmlDecl(version, encoding, standalone, augs);
-        }
-
-    } // xmlDecl(String,String,String)
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     *
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     *                    otherwise.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement, String publicId, String systemId,
-                            Augmentations augs)
-    throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.doctypeDecl(rootElement, publicId, systemId, augs);
-        }
-
-    } // doctypeDecl(String,String,String)
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-    throws XNIException {
-
-        handleStartPrefix(prefix, uri);
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startPrefixMapping(prefix, uri, augs);
-        }
-
-    } // startPrefixMapping(String,String)
-
-    /**
-     * The start of an element.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-    throws XNIException {
-
-        handleStartElement(element, attributes, augs);
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startElement(element, attributes, augs);
-        }
-
-    } // startElement(QName,XMLAttributes)
-
-    /**
-     * An empty element.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-    throws XNIException {
-
-        handleStartElement(element, attributes, augs);
-        // in the case where there is a {value constraint}, and the element
-        // doesn't have any text content, change emptyElement call to
-        // start + characters + end
-        XMLString defaultValue = handleEndElement(element, augs);
-        // call handlers
-        if (fDocumentHandler != null) {
-
-            fDocumentHandler.emptyElement(element, attributes, augs);
-
-            // REVISIT: should we send default element value?
-            /*if (defaultValue == null) {
-                fDocumentHandler.emptyElement(element, attributes);
-            } else {
-                fDocumentHandler.startElement(element, attributes);
-                fDocumentHandler.characters(defaultValue);
-                fDocumentHandler.endElement(element);
-            }
-            */
-        }
-
-    } // emptyElement(QName,XMLAttributes)
-
-    /**
-     * Character content.
-     *
-     * @param text The content.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-
-        handleCharacters(text);
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.characters(text, augs);
-        }
-
-    } // characters(XMLString)
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     *
-     * @param text The ignorable whitespace.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-
-        handleIgnorableWhitespace(text);
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.ignorableWhitespace(text, augs);
-        }
-
-    } // ignorableWhitespace(XMLString)
-
-    /**
-     * The end of an element.
-     *
-     * @param element The name of the element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-
-        // in the case where there is a {value constraint}, and the element
-        // doesn't have any text content, add a characters call.
-        XMLString defaultValue = handleEndElement(element, augs);
-        // call handlers
-        if (fDocumentHandler != null) {
-            // REVISIT: should we send default element values??
-            //if (defaultValue != null)
-            //    fDocumentHandler.characters(defaultValue);
-            fDocumentHandler.endElement(element, augs);
-        }
-
-    } // endElement(QName)
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endPrefixMapping(prefix, augs);
-        }
-
-    } // endPrefixMapping(String)
-
-    /**
-     * The start of a CDATA section.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startCDATA(augs);
-        }
-
-    } // startCDATA()
-
-    /**
-     * The end of a CDATA section.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endCDATA(augs);
-        }
-
-    } // endCDATA()
-
-    /**
-     * The end of the document.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException {
-
-        handleEndDocument();
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endDocument(augs);
-        }
-
-    } // endDocument()
-
-    //
-    // XMLDocumentHandler and XMLDTDHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
-     * general entity names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name,
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding,
-                            Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.startEntity(name, publicId, systemId,
-                                         baseSystemId, encoding, augs);
-        }
-
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.textDecl(version, encoding, augs);
-        }
-
-    } // textDecl(String,String)
-
-    /**
-     * A comment.
-     *
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.comment(text, augs);
-        }
-
-    } // comment(XMLString)
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     *
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-    throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.processingInstruction(target, data, augs);
-        }
-
-    } // processingInstruction(String,XMLString)
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" parameter entity names start with '%'; and general entity
-     * names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-
-        // call handlers
-        if (fDocumentHandler != null) {
-            fDocumentHandler.endEntity(name, augs);
-        }
-
-    } // endEntity(String)
-
-    // constants
-
-    static final int INITIAL_STACK_SIZE = 8;
-    static final int INC_STACK_SIZE     = 8;
-
-    // some constants that'll be added into the symbol table
-    String XMLNS;
-    String URI_XSI;
-    String XSI_SCHEMALOCATION;
-    String XSI_NONAMESPACESCHEMALOCATION;
-    String XSI_TYPE;
-    String XSI_NIL;
-    String URI_SCHEMAFORSCHEMA;
-
-    //
-    // Data
-    //
-
-    /** Schema grammar resolver. */
-    final XSGrammarResolver fGrammarResolver;
-    final SubstitutionGroupHandler fSubGroupHandler;
-
-    /** Schema handler */
-    final XSDHandler fSchemaHandler;
-
-    /** Namespace support. */
-    final NamespaceSupport fNamespaceSupport = new NamespaceSupport();
-    /** this flag is used to indicate whether the next prefix binding
-     *  should start a new context (.pushContext)
-     */
-    boolean fPushForNextBinding;
-    /** the DV usd to convert xsi:type to a QName */
-    // REVISIT: in new simple type design, make things in DVs static,
-    //          so that we can QNameDV.getCompiledForm()
-    final XSSimpleType fQNameDV = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_QNAME);
-
-    /** used to build content models */
-    // REVISIT: create decl pool, and pass it to each traversers
-    final CMBuilder fCMBuilder = new CMBuilder(new XSDeclarationPool());
-
-    // state
-
-    /** String representation of the validation root. */
-    // REVISIT: what do we store here? QName, XPATH, some ID? use rawname now.
-    String fValidationRoot;
-
-    /** The depth of the validaton root from the root element. */
-    int fValidationRootDepth;
-
-    /** Skip validation. */
-    int fSkipValidationDepth;
-
-    /** Partial validation depth */
-    int fPartialValidationDepth;
-
-    /** Element depth. */
-    int fElementDepth;
-
-    /** Child count. */
-    int fChildCount;
-
-    /** Element decl stack. */
-    int[] fChildCountStack = new int[INITIAL_STACK_SIZE];
-
-    /** Current element declaration. */
-    XSElementDecl fCurrentElemDecl;
-
-    /** Element decl stack. */
-    XSElementDecl[] fElemDeclStack = new XSElementDecl[INITIAL_STACK_SIZE];
-
-    /** nil value of the current element */
-    boolean fNil;
-
-    /** nil value stack */
-    boolean[] fNilStack = new boolean[INITIAL_STACK_SIZE];
-
-    /** Current type. */
-    XSTypeDecl fCurrentType;
-
-    /** type stack. */
-    XSTypeDecl[] fTypeStack = new XSTypeDecl[INITIAL_STACK_SIZE];
-
-    /** Current content model. */
-    XSCMValidator fCurrentCM;
-
-    /** Content model stack. */
-    XSCMValidator[] fCMStack = new XSCMValidator[INITIAL_STACK_SIZE];
-
-    /** the current state of the current content model */
-    int[] fCurrCMState;
-
-    /** stack to hold content model states */
-    int[][] fCMStateStack = new int[INITIAL_STACK_SIZE][];
-
-    /** Temporary string buffers. */
-    final StringBuffer fBuffer = new StringBuffer();
-
-    /** Did we see non-whitespace character data? */
-    boolean fSawCharacters = false;
-
-    /** Stack to record if we saw character data outside of element content*/
-    boolean[] fStringContent = new boolean[INITIAL_STACK_SIZE];
-
-    /** temprory qname */
-    final QName fTempQName = new QName();
-
-    /** temprory validated info */
-    ValidatedInfo fValidatedInfo = new ValidatedInfo();
-
-    // used to validate default/fixed values against xsi:type
-    // only need to check facets, so we set extraChecking to false (in reset)
-    private ValidationState fState4XsiType = new ValidationState();
-
-    // used to apply default/fixed values
-    // only need to check id/idref/entity, so we set checkFacets to false
-    private ValidationState fState4ApplyDefault = new ValidationState();
-
-    // identity constraint information
-
-    /**
-     * Stack of active XPath matchers for identity constraints. All
-     * active XPath matchers are notified of startElement, characters
-     * and endElement callbacks in order to perform their matches.
-     * <p>
-     * For each element with identity constraints, the selector of
-     * each identity constraint is activated. When the selector matches
-     * its XPath, then all the fields of the identity constraint are
-     * activated.
-     * <p>
-     * <strong>Note:</strong> Once the activation scope is left, the
-     * XPath matchers are automatically removed from the stack of
-     * active matchers and no longer receive callbacks.
-     */
-    protected XPathMatcherStack fMatcherStack = new XPathMatcherStack();
-
-    /** Cache of value stores for identity constraint fields. */
-    protected ValueStoreCache fValueStoreCache = new ValueStoreCache();
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLSchemaValidator() {
-
-        fGrammarResolver = new XSGrammarResolver();
-        fSubGroupHandler = new SubstitutionGroupHandler(fGrammarResolver);
-        fSchemaHandler = new XSDHandler(fGrammarResolver);
-
-    } // <init>()
-
-
-    /*
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     *
-     * @param componentManager The component manager.
-     *
-     * @throws SAXException Thrown by component on finitialization error.
-     *                      For example, if a feature or property is
-     *                      required for the operation of the component, the
-     *                      component manager may throw a
-     *                      SAXNotRecognizedException or a
-     *                      SAXNotSupportedException.
-     */
-    public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
-
-        // get error reporter
-        fXSIErrorReporter.reset((XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER));
-
-        // get symbol table. if it's a new one, add symbols to it.
-        SymbolTable symbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
-        if (symbolTable != fSymbolTable) {
-            XMLNS = symbolTable.addSymbol(SchemaSymbols.O_XMLNS);
-            URI_XSI = symbolTable.addSymbol(SchemaSymbols.URI_XSI);
-            XSI_SCHEMALOCATION = symbolTable.addSymbol(SchemaSymbols.OXSI_SCHEMALOCATION);
-            XSI_NONAMESPACESCHEMALOCATION = symbolTable.addSymbol(SchemaSymbols.OXSI_NONAMESPACESCHEMALOCATION);
-            XSI_TYPE = symbolTable.addSymbol(SchemaSymbols.OXSI_TYPE);
-            XSI_NIL = symbolTable.addSymbol(SchemaSymbols.OXSI_NIL);
-            URI_SCHEMAFORSCHEMA = symbolTable.addSymbol(SchemaSymbols.OURI_SCHEMAFORSCHEMA);
-        }
-        fSymbolTable = symbolTable;
-
-        // sax features
-        try {
-            fNamespaces = componentManager.getFeature(NAMESPACES);
-        }
-        catch (XMLConfigurationException e) {
-            fNamespaces = true;
-        }
-        try {
-            fValidation = componentManager.getFeature(VALIDATION);
-        }
-        catch (XMLConfigurationException e) {
-            fValidation = false;
-        }
-
-        try {
-            // REVISIT: should schema validation depend on validation?
-            // NOTE: YES! That's the way it's documented and has worked
-            //       in the past. Therefore, it must keep the same value
-            //       to retain the same behavior. -Ac
-            fValidation = fValidation && componentManager.getFeature(SCHEMA_VALIDATION);
-            //fValidation =  componentManager.getFeature(SCHEMA_VALIDATION);
-        }
-        catch (XMLConfigurationException e) {
-            fValidation = false;
-        }
-
-        try {
-            fFullChecking = componentManager.getFeature(SCHEMA_FULL_CHECKING);
-        }
-        catch (XMLConfigurationException e) {
-            fFullChecking = false;
-        }
-
-        // Xerces features
-        try {
-            fDynamicValidation = componentManager.getFeature(DYNAMIC_VALIDATION);
-        }
-        catch (XMLConfigurationException e) {
-            fDynamicValidation = false;
-        }
-
-        // REVISIT: use default entity resolution from ENTITY MANAGER - temporary solution
-        fEntityResolver = (XMLEntityResolver)componentManager.getProperty(ENTITY_MANAGER);
-
-        // initialize namespace support
-        fNamespaceSupport.reset(fSymbolTable);
-        fPushForNextBinding = true;
-        fValidationManager= (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER);
-        fValidationManager.reset();
-
-        // get schema location properties
-        fExternalSchemas = (String)componentManager.getProperty(SCHEMA_LOCATION);
-        fExternalNoNamespaceSchema = (String)componentManager.getProperty(SCHEMA_NONS_LOCATION);
-
-        // clear grammars, and put the one for schema namespace there
-        fGrammarResolver.reset();
-        fGrammarResolver.putGrammar(URI_SCHEMAFORSCHEMA, SchemaGrammar.SG_SchemaNS);
-        fGrammarPool = (GrammarPool)componentManager.getProperty(GRAMMAR_POOL);
-        Grammar [] initialGrammars = fGrammarPool.getGrammarsNS();
-        for (int i = 0; i < initialGrammars.length; i++) {
-            fGrammarResolver.putGrammar((SchemaGrammar)(initialGrammars[i]));
-        }
-
-        // clear thing in substitution group handler
-        fSubGroupHandler.reset();
-
-        // reset schema handler and all traversal objects
-        fSchemaHandler.reset(fXSIErrorReporter.fErrorReporter,
-                             fEntityResolver, fSymbolTable,
-                             fExternalSchemas, fExternalNoNamespaceSchema);
-
-        // initialize state
-        fCurrentElemDecl = null;
-        fNil = false;
-        fCurrentPSVI = null;
-        fCurrentType = null;
-        fCurrentCM = null;
-        fCurrCMState = null;
-        fBuffer.setLength(0);
-        fSawCharacters=false;
-        fValidationRootDepth = -1;
-        fValidationRoot = null;
-        fSkipValidationDepth = -1;
-        fPartialValidationDepth = -1;
-        fElementDepth = -1;
-        fChildCount = 0;
-
-        fMatcherStack.clear();
-
-        fValueStoreCache = new ValueStoreCache();
-
-        fState4XsiType.setExtraChecking(false);
-        fState4XsiType.setSymbolTable(symbolTable);
-        fState4XsiType.setSymbolTable(symbolTable);
-        fState4XsiType.setNamespaceSupport(fNamespaceSupport);
-
-        fState4ApplyDefault.setFacetChecking(false);
-        fState4ApplyDefault.setSymbolTable(symbolTable);
-        fState4ApplyDefault.setSymbolTable(symbolTable);
-        fState4ApplyDefault.setNamespaceSupport(fNamespaceSupport);
-
-    } // reset(XMLComponentManager)
-
-    //
-    // FieldActivator methods
-    //
-
-    /**
-     * Start the value scope for the specified identity constraint. This
-     * method is called when the selector matches in order to initialize
-     * the value store.
-     *
-     * @param identityConstraint The identity constraint.
-     */
-    public void startValueScopeFor(IdentityConstraint identityConstraint)
-    throws XNIException {
-
-        for (int i=0; i<identityConstraint.getFieldCount(); i++) {
-            Field field = identityConstraint.getFieldAt(i);
-            ValueStoreBase valueStore = fValueStoreCache.getValueStoreFor(field);
-            valueStore.startValueScope();
-        }
-
-    } // startValueScopeFor(IdentityConstraint identityConstraint)
-
-    /**
-     * Request to activate the specified field. This method returns the
-     * matcher for the field.
-     *
-     * @param field The field to activate.
-     */
-    public XPathMatcher activateField(Field field) throws XNIException {
-        ValueStore valueStore = fValueStoreCache.getValueStoreFor(field);
-        field.setMayMatch(true);
-        XPathMatcher matcher = field.createMatcher(valueStore);
-        fMatcherStack.addMatcher(matcher);
-        matcher.startDocumentFragment(fSymbolTable);
-        return matcher;
-    } // activateField(Field):XPathMatcher
-
-    /**
-     * Ends the value scope for the specified identity constraint.
-     *
-     * @param identityConstraint The identity constraint.
-     */
-    public void endValueScopeFor(IdentityConstraint identityConstraint)
-    throws XNIException {
-
-        ValueStoreBase valueStore = fValueStoreCache.getValueStoreFor(identityConstraint);
-        valueStore.endValueScope();
-
-    } // endValueScopeFor(IdentityConstraint)
-
-    // a utility method for Idnetity constraints
-    private void activateSelectorFor(IdentityConstraint ic) throws XNIException {
-        Selector selector = ic.getSelector();
-        FieldActivator activator = this;
-        if (selector == null)
-            return;
-        XPathMatcher matcher = selector.createMatcher(activator);
-        fMatcherStack.addMatcher(matcher);
-        matcher.startDocumentFragment(fSymbolTable);
-    }
-
-    //
-    // Protected methods
-    //
-
-    /** ensure element stack capacity */
-    void ensureStackCapacity() {
-
-        if (fElementDepth == fElemDeclStack.length) {
-            int newSize = fElementDepth + INC_STACK_SIZE;
-            int[] newArrayI = new int[newSize];
-            System.arraycopy(fChildCountStack, 0, newArrayI, 0, fElementDepth);
-            fChildCountStack = newArrayI;
-
-            XSElementDecl[] newArrayE = new XSElementDecl[newSize];
-            System.arraycopy(fElemDeclStack, 0, newArrayE, 0, fElementDepth);
-            fElemDeclStack = newArrayE;
-
-            boolean[] newArrayB = new boolean[newSize];
-            System.arraycopy(fNilStack, 0, newArrayB, 0, fElementDepth);
-            fNilStack = newArrayB;
-
-            XSTypeDecl[] newArrayT = new XSTypeDecl[newSize];
-            System.arraycopy(fTypeStack, 0, newArrayT, 0, fElementDepth);
-            fTypeStack = newArrayT;
-
-            XSCMValidator[] newArrayC = new XSCMValidator[newSize];
-            System.arraycopy(fCMStack, 0, newArrayC, 0, fElementDepth);
-            fCMStack = newArrayC;
-
-            boolean[] newArrayD = new boolean[newSize];
-            System.arraycopy(fStringContent, 0, newArrayD, 0, fElementDepth);
-            fStringContent = newArrayD;
-
-            int[][] newArrayIA = new int[newSize][];
-            System.arraycopy(fCMStateStack, 0, newArrayIA, 0, fElementDepth);
-            fCMStateStack = newArrayIA;
-        }
-
-    } // ensureStackCapacity
-
-    // handle start document
-    void handleStartDocument(XMLLocator locator, String encoding) {
-
-        if (fValidation)
-            fValueStoreCache.startDocument();
-
-    } // handleStartDocument(XMLLocator,String)
-
-    void handleEndDocument() {
-
-        if (fValidation)
-            fValueStoreCache.endDocument();
-
-    } // handleEndDocument()
-
-    // handle character contents
-    void handleCharacters(XMLString text) {
-
-        if (fSkipValidationDepth >= 0)
-            return;
-
-        boolean allWhiteSpace = true;
-        for (int i=text.offset; i< text.offset+text.length; i++) {
-            if (!XMLChar.isSpace(text.ch[i])) {
-                allWhiteSpace = false;
-                break;
-            }
-        }
-
-        fBuffer.append(text.toString());
-        if (!allWhiteSpace) {
-            fSawCharacters = true;
-        }
-
-        // call all active identity constraints
-        int count = fMatcherStack.getMatcherCount();
-        for (int i = 0; i < count; i++) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            matcher.characters(text);
-        }
-    } // handleCharacters(XMLString)
-
-    // handle ignorable whitespace
-    void handleIgnorableWhitespace(XMLString text) {
-
-        if (fSkipValidationDepth >= 0)
-            return;
-
-        // call all active identity constraints
-        int count = fMatcherStack.getMatcherCount();
-        for (int i = 0; i < count; i++) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            matcher.characters(text);
-        }
-
-    } // handleIgnorableWhitespace(XMLString)
-
-    /** Handle element. */
-    void handleStartElement(QName element, XMLAttributes attributes, Augmentations augs) {
-        if (DEBUG) {
-            System.out.println("handleStartElement: " +element);
-        }
-
-        // push error reporter context: record the current position
-        fXSIErrorReporter.pushContext();
-
-        // we receive prefix binding events before this one,
-        // so at this point, the prefix bindings for this element is done,
-        // and we need to push context when we receive another prefix binding.
-
-        // but if fPushForNextBinding is still true, that means there has
-        // been no prefix binding for this element. we still need to push
-        // context, because the context is always popped in end element.
-        if (fPushForNextBinding)
-            fNamespaceSupport.pushContext();
-        else
-            fPushForNextBinding = true;
-
-        // root element
-        if (fElementDepth == -1) {
-            // at this point we assume that no XML schemas found in the instance document
-            // thus we will not validate in the case dynamic feature is on or we found dtd grammar
-            fDoValidation = fValidation && !(fValidationManager.isGrammarFound() || fDynamicValidation);
-
-            // REVISIT: why don't we do it in reset()?
-            fValidationState = fValidationManager.getValidationState();
-            fValidationState.setNamespaceSupport(fNamespaceSupport);
-            fValidationState.setSymbolTable(fSymbolTable);
-
-            // parse schemas specified via schema location properties
-            parseSchemas(fExternalSchemas, fExternalNoNamespaceSchema);
-        }
-
-        fCurrentPSVI = (ElementPSVImpl)augs.getItem(ELEM_PSVI);
-        if (fCurrentPSVI == null) {
-            fCurrentPSVI = fElemPSVI;
-            augs.putItem(ELEM_PSVI, fCurrentPSVI);
-        }
-        fCurrentPSVI.reset();
-
-        // get xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes,
-        // parse them to get the grammars
-        // REVISIT: we'll defer this operation until there is a reference to
-        //          a component from that namespace
-
-        String sLocation = attributes.getValue(URI_XSI, XSI_SCHEMALOCATION);
-        String nsLocation = attributes.getValue(URI_XSI, XSI_NONAMESPACESCHEMALOCATION);
-        parseSchemas(sLocation, nsLocation);
-
-        // REVISIT: we should not rely on presence of
-        //          schemaLocation or noNamespaceSchemaLocation
-        //          attributes
-        if (sLocation !=null || nsLocation !=null) {
-            // if we found grammar we should attempt to validate
-            // based on values of validation & schema features
-            // only
-
-            fDoValidation = fValidation;
-        }
-
-        // if we are in the content of "skip", then just skip this element
-        // REVISIT:  is this the correct behaviour for ID constraints?  -NG
-        if (fSkipValidationDepth >= 0) {
-            fElementDepth++;
-            return;
-        }
-
-        // if it's not the root element, we push the current states in the stacks
-        if (fElementDepth != -1) {
-            ensureStackCapacity();
-            fChildCountStack[fElementDepth] = fChildCount+1;
-            fChildCount = 0;
-            fElemDeclStack[fElementDepth] = fCurrentElemDecl;
-            fNilStack[fElementDepth] = fNil;
-            fTypeStack[fElementDepth] = fCurrentType;
-            fCMStack[fElementDepth] = fCurrentCM;
-            fStringContent[fElementDepth] = fSawCharacters;
-        }
-
-        // get the element decl for this element
-        fCurrentElemDecl = null;
-        fNil = false;
-
-        XSWildcardDecl wildcard = null;
-        // if there is a content model, then get the decl from that
-        if (fCurrentCM != null) {
-            Object decl = fCurrentCM.oneTransition(element, fCurrCMState, fSubGroupHandler);
-            // it could be an element decl or a wildcard decl
-            if (fCurrCMState[0] == XSCMValidator.FIRST_ERROR && fDoValidation) {
-                XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
-                //REVISIT: is it the only case we will have particle = null?
-                if (ctype.fParticle != null) {
-                    reportSchemaError("cvc-complex-type.2.4.a", new Object[]{element.rawname, ctype.fParticle.toString()});
-                }
-                else {
-                    reportSchemaError("cvc-complex-type.2.4.a", new Object[]{element.rawname, "mixed with no element content"});
-                }
-            }
-
-            if (decl != null) {
-                if (decl instanceof XSElementDecl) {
-                    fCurrentElemDecl = (XSElementDecl)decl;
-                }
-                else {
-                    wildcard = (XSWildcardDecl)decl;
-                }
-            }
-        }
-
-        // save the current content model state in the stack
-        if (fElementDepth != -1)
-            fCMStateStack[fElementDepth] = fCurrCMState;
-
-        // increase the element depth after we've saved all states for the
-        // parent element
-        fElementDepth++;
-
-        // if the wildcard is skip, then return
-        if (wildcard != null && wildcard.fProcessContents == XSWildcardDecl.WILDCARD_SKIP) {
-            fSkipValidationDepth = fElementDepth;
-            return;
-        }
-
-        // try again to get the element decl
-        if (fCurrentElemDecl == null) {
-            SchemaGrammar sGrammar = fGrammarResolver.getGrammar(element.uri);
-            if (sGrammar != null)
-                fCurrentElemDecl = sGrammar.getGlobalElementDecl(element.localpart);
-        }
-
-        // Element Locally Valid (Element)
-        // 2 Its {abstract} must be false.
-        if (fCurrentElemDecl != null && fCurrentElemDecl.isAbstract())
-            reportSchemaError("cvc-elt.2", new Object[]{element.rawname});
-
-        // get the type for the current element
-        fCurrentType = null;
-        if (fCurrentElemDecl != null) {
-            // then get the type
-            fCurrentType = fCurrentElemDecl.fType;
-        }
-
-        // get type from xsi:type
-        String xsiType = attributes.getValue(URI_XSI, XSI_TYPE);
-        if (xsiType != null)
-            getAndCheckXsiType(element, xsiType);
-
-        // if the element decl is not found
-        if (fCurrentType == null) {
-            if (fDoValidation) {
-                // if this is no validation root, report an error, because
-                // we can't find eith decl or type for this element
-                if (fValidationRootDepth == -1) {
-                    // report error, because it's root element
-                    reportSchemaError("cvc-elt.1", new Object[]{element.rawname});
-                }
-                // if wildcard = strict, report error
-                else if (wildcard != null &&
-                         wildcard.fProcessContents == XSWildcardDecl.WILDCARD_STRICT) {
-                    // report error, because wilcard = strict
-                    reportSchemaError("cvc-complex-type.2.4.c", new Object[]{element.rawname});
-                }
-            }
-            // no element decl or type found for this element.
-            // if there is a validation root, then skip the whole element
-            // otherwise, don't skip sub-elements
-            if (fValidationRootDepth >= 0)
-                fSkipValidationDepth = fElementDepth;
-            return;
-        }
-
-        // we found a decl or a type, but there is no vlaidatoin root,
-        // make the current element validation root
-        if (fValidationRootDepth == -1) {
-            fValidationRootDepth = fElementDepth;
-            fValidationRoot = element.rawname;
-        }
-
-        // PSVI: add validation context
-        fCurrentPSVI.fValidationContext = fValidationRoot;
-        // PSVI: add element declaration
-        fCurrentPSVI.fDeclaration = fCurrentElemDecl;
-        // PSVI: add element type
-        fCurrentPSVI.fTypeDecl = fCurrentType;
-
-        // Element Locally Valid (Type)
-        // 2 Its {abstract} must be false.
-        if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-            XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
-            if (ctype.isAbstractType()) {
-                reportSchemaError("cvc-type.2", new Object[]{"Element " + element.rawname + " is declared with a type that is abstract.  Use xsi:type to specify a non-abstract type"});
-            }
-        }
-
-        // then try to get the content model
-        fCurrentCM = null;
-        if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-            fCurrentCM = ((XSComplexTypeDecl)fCurrentType).getContentModel(fCMBuilder);
-        }
-
-        // and get the initial content model state
-        fCurrCMState = null;
-        if (fCurrentCM != null)
-            fCurrCMState = fCurrentCM.startContentModel();
-
-        // and the buffer to hold the value of the element
-        fBuffer.setLength(0);
-        fSawCharacters = false;
-
-        // get information about xsi:nil
-        String xsiNil = attributes.getValue(URI_XSI, XSI_NIL);
-        // only deal with xsi:nil when there is an element declaration
-        if (xsiNil != null && fCurrentElemDecl != null)
-            getXsiNil(element, xsiNil);
-
-        // now validate everything related with the attributes
-        // first, get the attribute group
-        XSAttributeGroupDecl attrGrp = null;
-        if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-            XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
-            attrGrp = ctype.fAttrGrp;
-        }
-        processAttributes(element, attributes, attrGrp);
-
-        // activate identity constraints
-        if (fDoValidation) {
-            fValueStoreCache.startElement();
-            fMatcherStack.pushContext();
-            if (fCurrentElemDecl != null) {
-                fValueStoreCache.initValueStoresFor(fCurrentElemDecl);
-                int icCount = fCurrentElemDecl.fIDCPos;
-                int uniqueOrKey = 0;
-                for (;uniqueOrKey < icCount; uniqueOrKey++) {
-                    if (fCurrentElemDecl.fIDConstraints[uniqueOrKey].getType() != IdentityConstraint.KEYREF) {
-                        activateSelectorFor(fCurrentElemDecl.fIDConstraints[uniqueOrKey]);
-                    }
-                    else
-                        break;
-                }
-                for (int keyref = uniqueOrKey; keyref < icCount; keyref++) {
-                    activateSelectorFor((IdentityConstraint)fCurrentElemDecl.fIDConstraints[keyref]);
-                }
-            }
-
-            // call all active identity constraints
-            int count = fMatcherStack.getMatcherCount();
-            for (int i = 0; i < count; i++) {
-                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-                matcher.startElement(element, attributes, fCurrentElemDecl);
-            }
-        }
-
-    } // handleStartElement(QName,XMLAttributes,boolean)
-
-    /**
-     *  Handle end element. If there is not text content, and there is a
-     *  {value constraint} on the corresponding element decl, then return
-     *  an XMLString representing the default value.
-     */
-    XMLString handleEndElement(QName element, Augmentations augs) {
-
-
-        fCurrentPSVI = (ElementPSVImpl)augs.getItem(ELEM_PSVI);
-        if (fCurrentPSVI == null) {
-            fCurrentPSVI = fElemPSVI;
-            augs.putItem(ELEM_PSVI, fCurrentPSVI);
-        }
-        fCurrentPSVI.reset();
-
-        // if we are skipping, return
-        // if there is no validation root, return
-        if (fSkipValidationDepth >= 0 || fValidationRootDepth == -1) {
-            // but if this is the top element that we are skipping,
-            // restore the states.
-            if (fSkipValidationDepth == fElementDepth &&
-                fSkipValidationDepth > 0) {
-                // set the parial validation depth to the depth of parent
-                fPartialValidationDepth = fSkipValidationDepth-1;
-                fSkipValidationDepth = -1;
-                fElementDepth--;
-                fChildCount = fChildCountStack[fElementDepth];
-                fCurrentElemDecl = fElemDeclStack[fElementDepth];
-                fNil = fNilStack[fElementDepth];
-                fCurrentType = fTypeStack[fElementDepth];
-                fCurrentCM = fCMStack[fElementDepth];
-                fCurrCMState = fCMStateStack[fElementDepth];
-                fSawCharacters = fStringContent[fElementDepth];
-            }
-            else {
-                fElementDepth--;
-            }
-
-            // need to pop context so that the bindings for this element is
-            // discarded.
-            fNamespaceSupport.popContext();
-
-            // pop error reporter context: get all errors for the current
-            // element, and remove them from the error list
-            String[] errors = fXSIErrorReporter.popContext();
-
-            // PSVI: validation attempted:
-            // use default values in psvi item for
-            // validation attempted, validity, and error codes
-
-            // check extra schema constraints on root element
-            if (fElementDepth == -1 && fDoValidation && fFullChecking) {
-                XSConstraints.fullSchemaChecking(fGrammarResolver, fSubGroupHandler, fCMBuilder, fXSIErrorReporter.fErrorReporter);
-            }
-
-            return null;
-        }
-
-        // now validate the content of the element
-        XMLString defaultValue = processElementContent(element);
-
-        // Element Locally Valid (Element)
-        // 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).
-
-        // call matchers and de-activate context
-        int oldCount = fMatcherStack.getMatcherCount();
-        for (int i = oldCount - 1; i >= 0; i--) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            matcher.endElement(element, fCurrentElemDecl);
-        }
-        if (fMatcherStack.size() > 0) {
-            fMatcherStack.popContext();
-        }
-        int newCount = fMatcherStack.getMatcherCount();
-        // handle everything *but* keyref's.
-        for (int i = oldCount - 1; i >= newCount; i--) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            IdentityConstraint id;
-            if ((id = matcher.getIDConstraint()) != null  && id.getType() != IdentityConstraint.KEYREF) {
-                matcher.endDocumentFragment();
-                fValueStoreCache.transplant(id);
-            }
-            else if (id == null)
-                matcher.endDocumentFragment();
-        }
-        // now handle keyref's/...
-        for (int i = oldCount - 1; i >= newCount; i--) {
-            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-            IdentityConstraint id;
-            if ((id = matcher.getIDConstraint()) != null && id.getType() == IdentityConstraint.KEYREF) {
-                ValueStoreBase values = fValueStoreCache.getValueStoreFor(id);
-                if (values != null) // nothing to do if nothing matched!
-                    values.endDocumentFragment();
-                matcher.endDocumentFragment();
-            }
-        }
-        fValueStoreCache.endElement();
-
-        // have we reached the end tag of the validation root?
-        if (fValidationRootDepth == fElementDepth) {
-            fValidationRootDepth = -1;
-            fValidationRoot = null;
-
-            if (fDoValidation) {
-                // 7 If the element information item is the validation root, it must be valid per Validation Root Valid (ID/IDREF) (3.3.4).
-                if (!fValidationState.checkIDRefID()) {
-                    reportSchemaError("ValidationRoot", null);
-                }
-            }
-            fValidationState.resetIDTables();
-        }
-
-        // PSVI: validation attempted
-        if (fElementDepth <= fPartialValidationDepth) {
-            // the element had child with a content skip.
-            fCurrentPSVI.fValidationAttempted = ElementPSVI.PARTIAL_VALIDATION;
-            if (fElementDepth == fPartialValidationDepth) {
-                // set depth to the depth of the parent
-                fPartialValidationDepth--;
-            }
-        }
-        else {
-            fCurrentPSVI.fValidationAttempted = ElementPSVI.FULL_VALIDATION;
-        }
-
-
-        // decrease element depth and restore states
-        fElementDepth--;
-        if (fElementDepth == -1) {
-            if (fDoValidation) {
-                // check extra schema constraints
-                if (fFullChecking) {
-                    XSConstraints.fullSchemaChecking(fGrammarResolver, fSubGroupHandler, fCMBuilder, fXSIErrorReporter.fErrorReporter);
-                }
-            }
-        }
-        else {
-            // get the states for the parent element.
-            fChildCount = fChildCountStack[fElementDepth];
-            fCurrentElemDecl = fElemDeclStack[fElementDepth];
-            fNil = fNilStack[fElementDepth];
-            fCurrentType = fTypeStack[fElementDepth];
-            fCurrentCM = fCMStack[fElementDepth];
-            fCurrCMState = fCMStateStack[fElementDepth];
-            fSawCharacters = fStringContent[fElementDepth];
-        }
-
-        // need to pop context so that the bindings for this element is
-        // discarded.
-        fNamespaceSupport.popContext();
-
-        // pop error reporter context: get all errors for the current
-        // element, and remove them from the error list
-        String[] errors = fXSIErrorReporter.popContext();
-
-        // PSVI: error codes
-        fCurrentPSVI.fErrorCodes = errors;
-        // PSVI: validity
-        fCurrentPSVI.fValidity = (errors == null) ? ElementPSVI.VALID_VALIDITY
-                                                  : ElementPSVI.INVALID_VALIDITY;
-
-        return defaultValue;
-    } // handleEndElement(QName,boolean)*/
-
-    void handleStartPrefix(String prefix, String uri) {
-        // push namespace context if necessary
-        if (fPushForNextBinding) {
-            fNamespaceSupport.pushContext();
-            fPushForNextBinding = false;
-        }
-
-        // add prefix declaration to the namespace support
-        fNamespaceSupport.declarePrefix(prefix, uri.length() != 0 ? uri : null);
-    }
-
-    void parseSchemas(String sLocation, String nsLocation) {
-        if (sLocation != null) {
-            StringTokenizer t = new StringTokenizer(sLocation, " \n\t\r");
-            String namespace, location;
-            while (t.hasMoreTokens()) {
-                namespace = t.nextToken ();
-                if (!t.hasMoreTokens()) {
-                    // REVISIT: new error code
-                    fXSIErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                                  "General", new Object[]{"No matching location hint for namespace '" + namespace + "' in attribute schemaLocation"},
-                                                  XMLErrorReporter.SEVERITY_WARNING);
-                    break;
-                }
-                location = t.nextToken();
-                if (fGrammarResolver.getGrammar(namespace) == null)
-                    fSchemaHandler.parseSchema(namespace, location);
-            }
-        }
-        if (nsLocation != null) {
-            if (fGrammarResolver.getGrammar(null) == null)
-                fSchemaHandler.parseSchema(null, nsLocation);
-        }
-    }
-
-    void getAndCheckXsiType(QName element, String xsiType) {
-        // This method also deals with clause 1.2.1.2 of the constraint
-        // Validation Rule: Schema-Validity Assessment (Element)
-
-        // Element Locally Valid (Element)
-        // 4 If there is an attribute information item among the element information item's [attributes] whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is type, then all of the following must be true:
-        // 4.1 The normalized value of that attribute information item must be valid with respect to the built-in QName simple type, as defined by String Valid (3.14.4);
-        QName typeName = null;
-        try {
-            typeName = (QName)fQNameDV.validate(xsiType, fValidationState, null);
-        }
-        catch (InvalidDatatypeValueException e) {
-            reportSchemaError("cvc-elt.4.1", new Object[]{element.rawname, URI_XSI+","+XSI_TYPE, xsiType});
-            return;
-        }
-
-        // 4.2 The local name and namespace name (as defined in QName Interpretation (3.15.3)), of the actual value of that attribute information item must resolve to a type definition, as defined in QName resolution (Instance) (3.15.4)
-        XSTypeDecl type = null;
-        SchemaGrammar grammar = fGrammarResolver.getGrammar(typeName.uri);
-        if (grammar != null)
-            type = grammar.getGlobalTypeDecl(typeName.localpart);
-        if (type == null) {
-            reportSchemaError("cvc-elt.4.2", new Object[]{element.rawname, xsiType});
-            return;
-        }
-
-        // if there is no current type, set this one as current.
-        // and we don't need to do extra checking
-        if (fCurrentType != null) {
-            // 4.3 The local type definition must be validly derived from the {type definition} given the union of the {disallowed substitutions} and the {type definition}'s {prohibited substitutions}, as defined in Type Derivation OK (Complex) (3.4.6) (if it is a complex type definition), or given {disallowed substitutions} as defined in Type Derivation OK (Simple) (3.14.6) (if it is a simple type definition).
-            short block = fCurrentElemDecl.fBlock;
-            if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE)
-                block |= ((XSComplexTypeDecl)fCurrentType).fBlock;
-            if (!XSConstraints.checkTypeDerivationOk(type, fCurrentType, block))
-                reportSchemaError("cvc-elt.4.3", new Object[]{element.rawname, xsiType});
-        }
-
-        fCurrentType = type;
-    }
-
-    void getXsiNil(QName element, String xsiNil) {
-        // Element Locally Valid (Element)
-        // 3 The appropriate case among the following must be true:
-        // 3.1 If {nillable} is false, then there must be no attribute information item among the element information item's [attributes] whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is nil.
-        if (fCurrentElemDecl != null && !fCurrentElemDecl.isNillable()) {
-            reportSchemaError("cvc-elt.3.1", new Object[]{element.rawname, URI_XSI+","+XSI_NIL});
-        }
-        // 3.2 If {nillable} is true and there is such an attribute information item and its actual value is true , then all of the following must be true:
-        // 3.2.2 There must be no fixed {value constraint}.
-        else {
-            String value = xsiNil.trim();
-            if (value.equals(SchemaSymbols.ATTVAL_TRUE) ||
-                value.equals(SchemaSymbols.ATTVAL_TRUE_1)) {
-                fNil = true;
-                if (fCurrentElemDecl != null &&
-                    fCurrentElemDecl.getConstraintType() == XSElementDecl.FIXED_VALUE) {
-                    reportSchemaError("cvc-elt.3.2.2", new Object[]{element.rawname, URI_XSI+","+XSI_NIL});
-                }
-            }
-            // REVISIT: report an error for invalid boolean value?
-            //else if (!value.equals(SchemaSymbols.ATTVAL_FALSE) &&
-            //         !value.equals(SchemaSymbols.ATTVAL_FALSE_0)) {
-            //    reportSchemaError("cvc-elt.3.2", new Object[]{element.rawname, URI_XSI+","+XSI_NIL, xsiNil});
-            //}
-        }
-    }
-
-    void processAttributes(QName element, XMLAttributes attributes, XSAttributeGroupDecl attrGrp) {
-
-        // REVISIT: should we assume that XMLAttributeImpl removes
-        //          all augmentations from Augmentations? if yes.. we loose objects
-        //         if no - we always produce attribute psvi objects which may not be filled in
-        //         in this case we need to create/reset here all objects
-        Augmentations augs = null;
-        AttributePSVImpl attrPSVI = null;
-        for (int k=0;k<attributes.getLength();k++) {
-            augs = attributes.getAugmentations(k);
-            attrPSVI = (AttributePSVImpl) augs.getItem(ATTR_PSVI);
-            if (attrPSVI != null) {
-                attrPSVI.reset();
-            } else {
-                attrPSVI= new AttributePSVImpl();
-                augs.putItem(ATTR_PSVI, attrPSVI);
-            }
-            // PSVI attribute: validation context
-            attrPSVI.fValidationContext = element.rawname;
-        }
-
-        // add default attributes
-        if (attrGrp != null) {
-            addDefaultAttributes(element, attributes, attrGrp);
-        }
-
-        // if we don't do validation, we don't need to validate the attributes
-        if (!fDoValidation){
-            // PSVI: validity is unknown, and validation attempted is none
-            // this is a default value thus we should not set anything else here.
-            return;
-        }
-
-        // Element Locally Valid (Type)
-        // 3.1.1 The element information item's [attributes] must be empty, excepting those
-        // whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and
-        // whose [local name] is one of type, nil, schemaLocation or noNamespaceSchemaLocation.
-        if (fCurrentType == null || fCurrentType.getXSType() == XSTypeDecl.SIMPLE_TYPE) {
-            int attCount = attributes.getLength();
-
-            // REVISIT: what should be PSVI info for those?
-            for (int index = 0; index < attCount; index++) {
-                attributes.getName(index, fTempQName);
-                // get attribute PSVI
-                attrPSVI = (AttributePSVImpl)attributes.getAugmentations(index).getItem(ATTR_PSVI);
-                // PSVI: validation attempted, validity
-                attrPSVI.fValidationAttempted = AttributePSVI.FULL_VALIDATION;
-                attrPSVI.fValidity = AttributePSVI.VALID_VALIDITY;
-                // PSVI: normalized value is equal to the one supplied by xmlattributes
-                attrPSVI.fNormalizedValue = attributes.getValue(index);
-                if (fTempQName.uri == URI_XSI) {
-                    if (fTempQName.localpart != XSI_SCHEMALOCATION &&
-                        fTempQName.localpart != XSI_NONAMESPACESCHEMALOCATION &&
-                        fTempQName.localpart != XSI_NIL &&
-                        fTempQName.localpart != XSI_TYPE) {
-
-                        // PSVI: attribute is invalid, record errors
-                        attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                        attrPSVI.addErrorCode("cvc-type.3.1.1");
-                        reportSchemaError("cvc-type.3.1.1", new Object[]{element.rawname});
-                    }
-                }
-                else if (fTempQName.rawname != XMLNS && !fTempQName.rawname.startsWith("xmlns:")) {
-                    // PSVI: attribute is invalid, record errors
-                    attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                    attrPSVI.addErrorCode("cvc-type.3.1.1");
-                    reportSchemaError("cvc-type.3.1.1", new Object[]{element.rawname});
-                }
-            }
-            return;
-        }
-
-        XSAttributeUse attrUses[] = attrGrp.getAttributeUses();
-        int useCount = attrUses.length;
-        XSWildcardDecl attrWildcard = attrGrp.fAttributeWC;
-
-        // whether we have seen a Wildcard ID.
-        String wildcardIDName = null;
-
-        // for each present attribute
-        int attCount = attributes.getLength();
-
-        // Element Locally Valid (Complex Type)
-        // 3 For each attribute information item in the element information item's [attributes] excepting those whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is one of type, nil, schemaLocation or noNamespaceSchemaLocation, the appropriate case among the following must be true:
-        // get the corresponding attribute decl
-        for (int index = 0; index < attCount; index++) {
-
-            // get attribute PSVI
-            attrPSVI = (AttributePSVImpl)attributes.getAugmentations(index).getItem(ATTR_PSVI);
-            // PSVI: set Attribute valid and attempted validation to full.
-            attrPSVI.fValidationAttempted = AttributePSVI.FULL_VALIDATION;
-            attrPSVI.fValidity = AttributePSVI.VALID_VALIDITY;
-            // PSVI: normalized value is equal to the one supplied by xmlattributes
-            //       need to fill in for xsi: attributes
-            attrPSVI.fNormalizedValue = attributes.getValue(index);
-
-            attributes.getName(index, fTempQName);
-            // if it's from xsi namespace, it must be one of the four
-            if (fTempQName.uri == URI_XSI) {
-                if (fTempQName.localpart == XSI_SCHEMALOCATION ||
-                    fTempQName.localpart == XSI_NONAMESPACESCHEMALOCATION ||
-                    fTempQName.localpart == XSI_NIL ||
-                    fTempQName.localpart == XSI_TYPE) {
-                    continue;
-                }
-            }
-            else if (fTempQName.rawname == XMLNS || fTempQName.rawname.startsWith("xmlns:")) {
-                continue;
-            }
-            // it's not xmlns, and not xsi, then we need to find a decl for it
-            XSAttributeUse currUse = null;
-            for (int i = 0; i < useCount; i++) {
-                if (attrUses[i].fAttrDecl.fName == fTempQName.localpart &&
-                    attrUses[i].fAttrDecl.fTargetNamespace == fTempQName.uri) {
-                    currUse = attrUses[i];
-                    break;
-                }
-            }
-
-            // 3.2 otherwise all of the following must be true:
-            // 3.2.1 There must be an {attribute wildcard}.
-            // 3.2.2 The attribute information item must be valid with respect to it as defined in Item Valid (Wildcard) (3.10.4).
-
-            // if failed, get it from wildcard
-            if (currUse == null) {
-                //if (attrWildcard == null)
-                //    reportSchemaError("cvc-complex-type.3.2.1", new Object[]{element.rawname, fTempQName.rawname});
-                if (attrWildcard == null ||
-                    !attrWildcard.allowNamespace(fTempQName.uri)) {
-                    // so this attribute is not allowed
-                    reportSchemaError("cvc-complex-type.3.2.2", new Object[]{element.rawname, fTempQName.rawname});
-
-                    // PSVI: attribute is invalid, record errors
-                    attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                    attrPSVI.addErrorCode("cvc-complex-type.3.2.2");
-                    continue;
-                }
-            }
-
-            XSAttributeDecl currDecl = null;
-            if (currUse != null) {
-                currDecl = currUse.fAttrDecl;
-            }
-            else {
-                // which means it matches a wildcard
-                // skip it if processContents is skip
-                if (attrWildcard.fProcessContents == XSWildcardDecl.WILDCARD_SKIP)
-                    continue;
-                // now get the grammar and attribute decl
-                SchemaGrammar grammar = fGrammarResolver.getGrammar(fTempQName.uri);
-                if (grammar != null)
-                    currDecl = grammar.getGlobalAttributeDecl(fTempQName.localpart);
-                // if can't find
-                if (currDecl == null) {
-                    // if strict, report error
-                    if (attrWildcard.fProcessContents == XSWildcardDecl.WILDCARD_STRICT){
-                        reportSchemaError("cvc-complex-type.3.2.2", new Object[]{element.rawname, fTempQName.rawname});
-                        // PSVI: attribute is invalid, record errors
-                        attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                        attrPSVI.addErrorCode("cvc-complex-type.3.2.2");
-                    }
-
-                    // then continue to the next attribute
-                    continue;
-                }
-                else {
-                    // 5 Let [Definition:]  the wild IDs be the set of all attribute information item to which clause 3.2 applied and whose validation resulted in a context-determined declaration of mustFind or no context-determined declaration at all, and whose [local name] and [namespace name] resolve (as defined by QName resolution (Instance) (3.15.4)) to an attribute declaration whose {type definition} is or is derived from ID. Then all of the following must be true:
-                    // 5.1 There must be no more than one item in wild IDs.
-                    if (currDecl.fType.getXSType() == XSTypeDecl.SIMPLE_TYPE &&
-                        ((XSSimpleType)currDecl.fType).isIDType()) {
-                        if (wildcardIDName != null){
-                            reportSchemaError("cvc-complex-type.5.1", new Object[]{element.rawname, currDecl.fName, wildcardIDName});
-
-                            // PSVI: attribute is invalid, record errors
-                            attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                            attrPSVI.addErrorCode("cvc-complex-type.5.1");
-                        }
-                        else
-                            wildcardIDName = currDecl.fName;
-                    }
-                }
-            }
-
-            // Attribute Locally Valid
-            // For an attribute information item to be locally valid with respect to an attribute declaration all of the following must be true:
-            // 1 The declaration must not be absent (see Missing Sub-components (5.3) for how this can fail to be the case).
-            // 2 Its {type definition} must not be absent.
-            // 3 The item's normalized value must be locally valid with respect to that {type definition} as per String Valid (3.14.4).
-            // get simple type
-            XSSimpleType attDV = currDecl.fType;
-
-            // PSVI: attribute declaration
-            attrPSVI.fDeclaration = currDecl;
-            // PSVI: attribute type
-            attrPSVI.fTypeDecl = attDV;
-
-            // PSVI: validation attempted:
-            attrPSVI.fValidationAttempted = AttributePSVI.FULL_VALIDATION;
-
-            // needed to update type for DOM Parser to implement getElementById
-            if (attributes.getType(index).equals("CDATA")) {
-                String type = (currDecl.fType.isIDType())?"ID":"CDATA";
-                attributes.setType(index, type);
-            }
-
-            // get attribute value
-            String attrValue = attributes.getValue(index);
-
-            Object actualValue = null;
-            try {
-                actualValue = attDV.validate(attrValue, fValidationState, fValidatedInfo);
-                // PSVI: attribute normalized value
-                attrPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
-                // PSVI: attribute memberType
-                attrPSVI.fMemberType = fValidatedInfo.memberType;
-                // PSVI: element notation
-                if (attDV.isNOTATIONType()){
-                   QName qName = (QName)actualValue;
-                   SchemaGrammar grammar = fGrammarResolver.getGrammar(qName.uri);
-                   if (grammar != null)
-                       fCurrentPSVI.fNotation = grammar.getNotationDecl(qName.localpart);
-                }
-            }
-            catch (InvalidDatatypeValueException idve) {
-
-                // PSVI: attribute is invalid, record errors
-                attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                attrPSVI.addErrorCode("cvc-attribute.3");
-                reportSchemaError("cvc-attribute.3", new Object[]{element.rawname, fTempQName.rawname, attrValue});
-            }
-
-            // get the value constraint from use or decl
-            // 4 The item's actual value must match the value of the {value constraint}, if it is present and fixed.                 // now check the value against the simpleType
-            if (actualValue != null &&
-                currDecl.getConstraintType() == XSAttributeDecl.FIXED_VALUE) {
-                if (!attDV.isEqual(actualValue, currDecl.fDefault.actualValue)){
-
-                    // PSVI: attribute is invalid, record errors
-                    attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                    attrPSVI.addErrorCode("cvc-attribute.4");
-                    reportSchemaError("cvc-attribute.4", new Object[]{element.rawname, fTempQName.rawname, attrValue});
-                }
-            }
-
-            // 3.1 If there is among the {attribute uses} an attribute use with an {attribute declaration} whose {name} matches the attribute information item's [local name] and whose {target namespace} is identical to the attribute information item's [namespace name] (where an absent {target namespace} is taken to be identical to a [namespace name] with no value), then the attribute information must be valid with respect to that attribute use as per Attribute Locally Valid (Use) (3.5.4). In this case the {attribute declaration} of that attribute use is the context-determined declaration for the attribute information item with respect to Schema-Validity Assessment (Attribute) (3.2.4) and Assessment Outcome (Attribute) (3.2.5).
-            if (actualValue != null &&
-                currUse != null && currUse.fConstraintType == XSAttributeDecl.FIXED_VALUE) {
-                if (!attDV.isEqual(actualValue, currUse.fDefault.actualValue)){
-                    // PSVI: attribute is invalid, record errors
-                    attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-                    attrPSVI.addErrorCode("cvc-complex-type.3.1");
-                    reportSchemaError("cvc-complex-type.3.1", new Object[]{element.rawname, fTempQName.rawname, attrValue});
-                }
-            }
-        } // end of for (all attributes)
-
-        // 5.2 If wild IDs is non-empty, there must not be any attribute uses among the {attribute uses} whose {attribute declaration}'s {type definition} is or is derived from ID.
-        if (attrGrp.fIDAttrName != null && wildcardIDName != null){
-            // PSVI: attribute is invalid, record errors
-            attrPSVI.fValidity = AttributePSVI.INVALID_VALIDITY;
-            attrPSVI.addErrorCode("cvc-complex-type.3.1");
-            reportSchemaError("cvc-complex-type.5.2", new Object[]{element.rawname, wildcardIDName, attrGrp.fIDAttrName});
-        }
-
-    } //processAttributes
-
-    void addDefaultAttributes(QName element, XMLAttributes attributes, XSAttributeGroupDecl attrGrp) {
-        // Check after all specified attrs are scanned
-        // (1) report error for REQUIRED attrs that are missing (V_TAGc)
-        // REVISIT: should we check prohibited attributes?
-        // (2) report error for PROHIBITED attrs that are present (V_TAGc)
-        // (3) add default attrs (FIXED and NOT_FIXED)
-        //
-        if (DEBUG) {
-            System.out.println("addDefaultAttributes: " + element);
-        }
-        XSAttributeUse attrUses[] = attrGrp.getAttributeUses();
-        int useCount = attrUses.length;
-        XSAttributeUse currUse;
-        XSAttributeDecl currDecl;
-        short constType;
-        ValidatedInfo defaultValue;
-        boolean isSpecified;
-        QName attName;
-        // for each attribute use
-        for (int i = 0; i < useCount; i++) {
-
-            currUse = attrUses[i];
-            currDecl = currUse.fAttrDecl;
-            // get value constraint
-            constType = currUse.fConstraintType;
-            defaultValue = currUse.fDefault;
-            if (constType == XSAttributeDecl.NO_CONSTRAINT) {
-                constType = currDecl.getConstraintType();
-                defaultValue = currDecl.fDefault;
-            }
-            // whether this attribute is specified
-            isSpecified = attributes.getValue(currDecl.fTargetNamespace, currDecl.fName) != null;
-
-            // Element Locally Valid (Complex Type)
-            // 4 The {attribute declaration} of each attribute use in the {attribute uses} whose
-            // {required} is true matches one of the attribute information items in the element
-            // information item's [attributes] as per clause 3.1 above.
-            if (currUse.fUse == SchemaSymbols.USE_REQUIRED) {
-                if (!isSpecified)
-                    reportSchemaError("cvc-complex-type.4", new Object[]{element.rawname, currDecl.fName});
-            }
-            // if the attribute is not specified, then apply the value constraint
-            if (!isSpecified && constType != XSAttributeDecl.NO_CONSTRAINT) {
-                attName = new QName(null, currDecl.fName, currDecl.fName, currDecl.fTargetNamespace);
-
-                // needed to update type for DOM Parser to implement getElementById
-                String type = (currDecl.fType.isIDType())?"ID":"CDATA";
-
-                int attrIndex = attributes.addAttribute(attName, type, (defaultValue!=null)?defaultValue.normalizedValue:"");
-
-                // PSVI: attribute is "schema" specified
-                Augmentations augs = attributes.getAugmentations(attrIndex);
-
-                AttributePSVImpl attrPSVI = (AttributePSVImpl)augs.getItem(ATTR_PSVI);
-
-                // check if PSVIAttribute was added to Augmentations.
-                // it is possible that we just created new chunck of attributes
-                // in this case PSVI attribute are not there.
-                if (attrPSVI != null) {
-                    attrPSVI.reset();
-                } else {
-                    attrPSVI = new AttributePSVImpl();
-                    augs.putItem(ATTR_PSVI, attrPSVI);
-                }
-
-                attrPSVI.fSpecified = false;
-                // PSVI attribute: validation context
-                attrPSVI.fValidationContext = element.rawname;
-            }
-
-        } // for
-    } // addDefaultAttributes
-
-    /**
-     *  If there is not text content, and there is a
-     *  {value constraint} on the corresponding element decl, then return
-     *  an XMLString representing the default value.
-     */
-    XMLString processElementContent(QName element) {
-        // fCurrentElemDecl: default value; ...
-        XMLString defaultValue = null;
-        // 1 If the item is ·valid· with respect to an element declaration as per Element Locally Valid (Element) (§3.3.4) and the {value constraint} is present, but clause 3.2 of Element Locally Valid (Element) (§3.3.4) above is not satisfied and the item has no element or character information item [children], then schema. Furthermore, the post-schema-validation infoset has the canonical lexical representation of the {value constraint} value as the item's [schema normalized value] property.
-        if (fCurrentElemDecl != null && fCurrentElemDecl.fDefault != null &&
-            fBuffer.toString().length() == 0 && fChildCount == 0 && !fNil) {
-
-            // PSVI: specified
-            fCurrentPSVI.fSpecified = false;
-
-            int bufLen = fCurrentElemDecl.fDefault.normalizedValue.length();
-            char [] chars = new char[bufLen];
-            fCurrentElemDecl.fDefault.normalizedValue.getChars(0, bufLen, chars, 0);
-            defaultValue = new XMLString(chars, 0, bufLen);
-            // call all active identity constraints
-            int count = fMatcherStack.getMatcherCount();
-            for (int i = 0; i < count; i++) {
-                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
-                matcher.characters(defaultValue);
-            }
-
-        }
-        // fixed values are handled later, after xsi:type determined.
-
-        if (DEBUG) {
-            System.out.println("processElementContent:" +element);
-        }
-
-        if (fCurrentElemDecl != null &&
-            fCurrentElemDecl.getConstraintType() == XSElementDecl.DEFAULT_VALUE) {
-        }
-
-        if (fDoValidation) {
-            String content = fBuffer.toString();
-
-            // Element Locally Valid (Element)
-            // 3.2.1 The element information item must have no character or element information item [children].
-            if (fNil) {
-                if (fChildCount != 0 || content.length() != 0){
-                    reportSchemaError("cvc-elt.3.2.1", new Object[]{element.rawname, URI_XSI+","+XSI_NIL});
-                    // PSVI: nil
-                    fCurrentPSVI.fNil = false;
-                } else {
-                    fCurrentPSVI.fNil = true;
-                }
-            }
-
-            // 5 The appropriate case among the following must be true:
-            // 5.1 If the declaration has a {value constraint}, the item has neither element nor character [children] and clause 3.2 has not applied, then all of the following must be true:
-            if (fCurrentElemDecl != null &&
-                fCurrentElemDecl.getConstraintType() != XSElementDecl.NO_CONSTRAINT &&
-                fChildCount == 0 && content.length() == 0 && !fNil) {
-                // 5.1.1 If the actual type definition is a local type definition then the canonical lexical representation of the {value constraint} value must be a valid default for the actual type definition as defined in Element Default Valid (Immediate) (3.3.6).
-                if (fCurrentType != fCurrentElemDecl.fType) {
-                    //REVISIT:we should pass ValidatedInfo here.
-                    if (XSConstraints.ElementDefaultValidImmediate(fCurrentType, fCurrentElemDecl.fDefault, fState4XsiType, null) == null)
-                        reportSchemaError("cvc-elt.5.1.1", new Object[]{element.rawname, fCurrentType.getTypeName(), fCurrentElemDecl.fDefault.normalizedValue});
-                }
-                // 5.1.2 The element information item with the canonical lexical representation of the {value constraint} value used as its normalized value must be valid with respect to the actual type definition as defined by Element Locally Valid (Type) (3.3.4).
-                // REVISIT: don't use toString, but validateActualValue instead
-                //          use the fState4ApplyDefault
-                elementLocallyValidType(element, fCurrentElemDecl.fDefault.normalizedValue);
-            }
-            else {
-                // The following method call also deal with clause 1.2.2 of the constraint
-                // Validation Rule: Schema-Validity Assessment (Element)
-
-                // 5.2 If the declaration has no {value constraint} or the item has either element or character [children] or clause 3.2 has applied, then all of the following must be true:
-                // 5.2.1 The element information item must be valid with respect to the actual type definition as defined by Element Locally Valid (Type) (3.3.4).
-                Object actualValue = elementLocallyValidType(element, content);
-                // 5.2.2 If there is a fixed {value constraint} and clause 3.2 has not applied, all of the following must be true:
-                if (fCurrentElemDecl != null &&
-                    fCurrentElemDecl.getConstraintType() == XSElementDecl.FIXED_VALUE &&
-                    !fNil) {
-                    // 5.2.2.1 The element information item must have no element information item [children].
-                    if (fChildCount != 0)
-                        reportSchemaError("cvc-elt.5.2.2.1", new Object[]{element.rawname});
-                    // 5.2.2.2 The appropriate case among the following must be true:
-                    if (fCurrentType.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-                        XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
-                        // 5.2.2.2.1 If the {content type} of the actual type definition is mixed, then the initial value of the item must match the canonical lexical representation of the {value constraint} value.
-                        if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_MIXED) {
-                            // REVISIT: how to get the initial value, does whiteSpace count?
-                            if (!fCurrentElemDecl.fDefault.normalizedValue.equals(content))
-                                reportSchemaError("cvc-elt.5.2.2.2.1", new Object[]{element.rawname, content, fCurrentElemDecl.fDefault.normalizedValue});
-                        }
-                        // 5.2.2.2.2 If the {content type} of the actual type definition is a simple type definition, then the actual value of the item must match the canonical lexical representation of the {value constraint} value.
-                        else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
-                            if (actualValue != null &&
-                                !ctype.fXSSimpleType.isEqual(actualValue, fCurrentElemDecl.fDefault.actualValue))
-                                reportSchemaError("cvc-elt.5.2.2.2.2", new Object[]{element.rawname, content, fCurrentElemDecl.fDefault.normalizedValue});
-                        }
-                    }
-                    else if (fCurrentType.getXSType() == XSTypeDecl.SIMPLE_TYPE) {
-                        XSSimpleType sType = (XSSimpleType)fCurrentType;
-                        if (!sType.isEqual(actualValue, fCurrentElemDecl.fDefault.actualValue))
-                            reportSchemaError("cvc-elt.5.2.2.2.2", new Object[]{element.rawname, content, fCurrentElemDecl.fDefault.normalizedValue});
-                    }
-                }
-            }
-        } // if fDoValidation
-
-        return defaultValue;
-    } // processElementContent
-
-    Object elementLocallyValidType(QName element, String textContent) {
-        if (fCurrentType == null)
-            return null;
-
-        Object retValue = null;
-        // Element Locally Valid (Type)
-        // 3 The appropriate case among the following must be true:
-        // 3.1 If the type definition is a simple type definition, then all of the following must be true:
-        if (fCurrentType.getXSType() == XSTypeDecl.SIMPLE_TYPE) {
-            // 3.1.2 The element information item must have no element information item [children].
-            if (fChildCount != 0)
-                reportSchemaError("cvc-type.3.1.2", new Object[]{element.rawname});
-            // 3.1.3 If clause 3.2 of Element Locally Valid (Element) (3.3.4) did not apply, then the normalized value must be valid with respect to the type definition as defined by String Valid (3.14.4).
-            if (!fNil) {
-                XSSimpleType dv = (XSSimpleType)fCurrentType;
-                try {
-                    retValue = dv.validate(textContent, fValidationState, fValidatedInfo);
-                    // PSVI: schema normalized value
-                    //
-                    fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
-                    // PSVI: memberType
-                    fCurrentPSVI.fMemberType = fValidatedInfo.memberType;
-                }
-                catch (InvalidDatatypeValueException e) {
-                    reportSchemaError("cvc-type.3.1.3", new Object[]{element.rawname, textContent});
-                }
-            }
-        }
-        else {
-            // 3.2 If the type definition is a complex type definition, then the element information item must be valid with respect to the type definition as per Element Locally Valid (Complex Type) (3.4.4);
-            retValue = elementLocallyValidComplexType(element, textContent);
-        }
-
-        return retValue;
-    } // elementLocallyValidType
-
-    Object elementLocallyValidComplexType(QName element, String textContent) {
-        Object actualValue = null;
-        XSComplexTypeDecl ctype = (XSComplexTypeDecl)fCurrentType;
-
-        // Element Locally Valid (Complex Type)
-        // For an element information item to be locally valid with respect to a complex type definition all of the following must be true:
-        // 1 {abstract} is false.
-        // 2 If clause 3.2 of Element Locally Valid (Element) (3.3.4) did not apply, then the appropriate case among the following must be true:
-        if (!fNil) {
-            // 2.1 If the {content type} is empty, then the element information item has no character or element information item [children].
-            if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_EMPTY &&
-                (fChildCount != 0 || textContent.length() != 0)) {
-                reportSchemaError("cvc-complex-type.2.1", new Object[]{element.rawname});
-            }
-            // 2.2 If the {content type} is a simple type definition, then the element information item has no element information item [children], and the normalized value of the element information item is valid with respect to that simple type definition as defined by String Valid (3.14.4).
-            else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
-                if (fChildCount != 0)
-                    reportSchemaError("cvc-complex-type.2.2", new Object[]{element.rawname});
-                XSSimpleType dv = ctype.fXSSimpleType;
-                try {
-                    actualValue = dv.validate(textContent, fValidationState, fValidatedInfo);
-
-                    // PSVI: schema normalized value
-                    //
-                    fCurrentPSVI.fNormalizedValue = fValidatedInfo.normalizedValue;
-                    // PSVI: memberType
-                    fCurrentPSVI.fMemberType = fValidatedInfo.memberType;
-                }
-                catch (InvalidDatatypeValueException e) {
-                    reportSchemaError("cvc-complex-type.2.2", new Object[]{element.rawname});
-                }
-                // REVISIT: eventually, this method should return the same actualValue as elementLocallyValidType...
-                // obviously it'll return null when the content is complex.
-            }
-            // 2.3 If the {content type} is element-only, then the element information item has no character information item [children] other than those whose [character code] is defined as a white space in [XML 1.0 (Second Edition)].
-            else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_ELEMENT) {
-                // REVISIT: how to check whether there is any text content?
-                if (fSawCharacters) {
-                    reportSchemaError("cvc-complex-type.2.3", new Object[]{element.rawname});
-                }
-            }
-            // 2.4 If the {content type} is element-only or mixed, then the sequence of the element information item's element information item [children], if any, taken in order, is valid with respect to the {content type}'s particle, as defined in Element Sequence Locally Valid (Particle) (3.9.4).
-            if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_ELEMENT ||
-                ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_MIXED) {
-                // if the current state is a valid state, check whether
-                // it's one of the final states.
-                if (DEBUG) {
-                    System.out.println(fCurrCMState);
-                }
-                if (fCurrCMState[0] >= 0 &&
-                    !fCurrentCM.endContentModel(fCurrCMState)) {
-                    reportSchemaError("cvc-complex-type.2.4.b", new Object[]{element.rawname, ctype.fParticle.toString()});
-                }
-            }
-        }
-        return actualValue;
-    } // elementLocallyValidComplexType
-
-    void reportSchemaError(String key, Object[] arguments) {
-        if (fDoValidation)
-            fXSIErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                          key, arguments,
-                                          XMLErrorReporter.SEVERITY_ERROR);
-    }
-
-    /**********************************/
-
-    // xpath matcher information
-
-    /**
-     * Stack of XPath matchers for identity constraints.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected static class XPathMatcherStack {
-
-        //
-        // Data
-        //
-
-        /** Active matchers. */
-        protected XPathMatcher[] fMatchers = new XPathMatcher[4];
-
-        /** Count of active matchers. */
-        protected int fMatchersCount;
-
-        /** Offset stack for contexts. */
-        protected IntStack fContextStack = new IntStack();
-
-        //
-        // Constructors
-        //
-
-        public XPathMatcherStack() {
-        } // <init>()
-
-        //
-        // Public methods
-        //
-
-        /** Resets the XPath matcher stack. */
-        public void clear() {
-            for (int i = 0; i < fMatchersCount; i++) {
-                fMatchers[i] = null;
-            }
-            fMatchersCount = 0;
-            fContextStack.clear();
-        } // clear()
-
-        /** Returns the size of the stack. */
-        public int size() {
-            return fContextStack.size();
-        } // size():int
-
-        /** Returns the count of XPath matchers. */
-        public int getMatcherCount() {
-            return fMatchersCount;
-        } // getMatcherCount():int
-
-        /** Adds a matcher. */
-        public void addMatcher(XPathMatcher matcher) {
-            ensureMatcherCapacity();
-            fMatchers[fMatchersCount++] = matcher;
-        } // addMatcher(XPathMatcher)
-
-        /** Returns the XPath matcher at the specified index. */
-        public XPathMatcher getMatcherAt(int index) {
-            return fMatchers[index];
-        } // getMatcherAt(index):XPathMatcher
-
-        /** Pushes a new context onto the stack. */
-        public void pushContext() {
-            fContextStack.push(fMatchersCount);
-        } // pushContext()
-
-        /** Pops a context off of the stack. */
-        public void popContext() {
-            fMatchersCount = fContextStack.pop();
-        } // popContext()
-
-        //
-        // Private methods
-        //
-
-        /** Ensures the size of the matchers array. */
-        private void ensureMatcherCapacity() {
-            if (fMatchersCount == fMatchers.length) {
-                XPathMatcher[] array = new XPathMatcher[fMatchers.length * 2];
-                System.arraycopy(fMatchers, 0, array, 0, fMatchers.length);
-                fMatchers = array;
-            }
-        } // ensureMatcherCapacity()
-
-    } // class XPathMatcherStack
-
-    // value store implementations
-
-    /**
-     * Value store implementation base class. There are specific subclasses
-     * for handling unique, key, and keyref.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected abstract class ValueStoreBase
-    implements ValueStore {
-
-        //
-        // Constants
-        //
-
-        /** Not a value (Unicode: #FFFF). */
-        protected IDValue NOT_AN_IDVALUE = new IDValue("\uFFFF", null);
-
-        //
-        // Data
-        //
-
-        /** Identity constraint. */
-        protected IdentityConstraint fIdentityConstraint;
-
-        /** Current data values. */
-        protected final OrderedHashtable fValues = new OrderedHashtable();
-
-        /** Current data value count. */
-        protected int fValuesCount;
-
-        /** Data value tuples. */
-        protected final Vector fValueTuples = new Vector();
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a value store for the specified identity constraint. */
-        protected ValueStoreBase(IdentityConstraint identityConstraint) {
-            fIdentityConstraint = identityConstraint;
-        } // <init>(IdentityConstraint)
-
-        //
-        // Public methods
-        //
-
-        // destroys this ValueStore; useful when, for instance, a
-        // locally-scoped ID constraint is involved.
-        public void destroy() {
-            fValuesCount = 0;
-            fValues.clear();
-            fValueTuples.removeAllElements();
-        } // end destroy():void
-
-        // appends the contents of one ValueStore to those of us.
-        public void append(ValueStoreBase newVal) {
-            for (int i = 0; i < newVal.fValueTuples.size(); i++) {
-                OrderedHashtable o = (OrderedHashtable)newVal.fValueTuples.elementAt(i);
-                if (!contains(o))
-                    fValueTuples.addElement(o);
-            }
-        } // append(ValueStoreBase)
-
-        /** Start scope for value store. */
-        public void startValueScope() throws XNIException {
-            fValuesCount = 0;
-            int count = fIdentityConstraint.getFieldCount();
-            for (int i = 0; i < count; i++) {
-                fValues.put(fIdentityConstraint.getFieldAt(i), NOT_AN_IDVALUE);
-            }
-        } // startValueScope()
-
-        /** Ends scope for value store. */
-        public void endValueScope() throws XNIException {
-
-            // is there anything to do?
-            // REVISIT: This check solves the problem with field matchers
-            //          that get activated because they are at the same
-            //          level as the declaring element (e.g. selector xpath
-            //          is ".") but never match.
-            //          However, this doesn't help us catch the problem
-            //          when we expect a field value but never see it. A
-            //          better solution has to be found. -Ac
-            // REVISIT: Is this a problem? -Ac
-            // Yes - NG
-            if (fValuesCount == 0) {
-                if (fIdentityConstraint.getType() == IdentityConstraint.KEY) {
-                    String code = "AbsentKeyValue";
-                    String eName = fIdentityConstraint.getElementName();
-                    reportSchemaError(code, new Object[]{eName});
-                }
-                return;
-            }
-
-            // do we have enough values?
-            if (fValuesCount != fIdentityConstraint.getFieldCount()) {
-                switch (fIdentityConstraint.getType()) {
-                case IdentityConstraint.UNIQUE: {
-                        String code = "UniqueNotEnoughValues";
-                        String ename = fIdentityConstraint.getElementName();
-                        reportSchemaError(code, new Object[]{ename});
-                        break;
-                    }
-                case IdentityConstraint.KEY: {
-                        String code = "KeyNotEnoughValues";
-                        UniqueOrKey key = (UniqueOrKey)fIdentityConstraint;
-                        String ename = fIdentityConstraint.getElementName();
-                        String kname = key.getIdentityConstraintName();
-                        reportSchemaError(code, new Object[]{ename,kname});
-                        break;
-                    }
-                case IdentityConstraint.KEYREF: {
-                        String code = "KeyRefNotEnoughValues";
-                        KeyRef keyref = (KeyRef)fIdentityConstraint;
-                        String ename = fIdentityConstraint.getElementName();
-                        String kname = (keyref.getKey()).getIdentityConstraintName();
-                        reportSchemaError(code, new Object[]{ename,kname});
-                        break;
-                    }
-                }
-                return;
-            }
-
-
-        } // endValueScope()
-
-        // This is needed to allow keyref's to look for matched keys
-        // in the correct scope.  Unique and Key may also need to
-        // override this method for purposes of their own.
-        // This method is called whenever the DocumentFragment
-        // of an ID Constraint goes out of scope.
-        public void endDocumentFragment() throws XNIException {
-        } // endDocumentFragment():void
-
-        /**
-         * Signals the end of the document. This is where the specific
-         * instances of value stores can verify the integrity of the
-         * identity constraints.
-         */
-        public void endDocument() throws XNIException {
-        } // endDocument()
-
-        //
-        // ValueStore methods
-        //
-
-        /* reports an error if an element is matched
-         * has nillable true and is matched by a key.
-         */
-
-        public void reportNilError(IdentityConstraint id) {
-            if (id.getType() == IdentityConstraint.KEY) {
-                String code = "KeyMatchesNillable";
-                reportSchemaError(code, new Object[]{id.getElementName()});
-            }
-        } // reportNilError
-
-        /**
-         * Adds the specified value to the value store.
-         *
-         * @param value The value to add.
-         * @param field The field associated to the value. This reference
-         *              is used to ensure that each field only adds a value
-         *              once within a selection scope.
-         */
-        public void addValue(Field field, IDValue value) {
-            if (!field.mayMatch()) {
-                String code = "FieldMultipleMatch";
-                reportSchemaError(code, new Object[]{field.toString()});
-            }
-
-            // do we even know this field?
-            int index = fValues.indexOf(field);
-            if (index == -1) {
-                String code = "UnknownField";
-                reportSchemaError(code, new Object[]{field.toString()});
-                return;
-            }
-
-            // store value
-            IDValue storedValue = fValues.valueAt(index);
-            if (storedValue.isDuplicateOf(NOT_AN_IDVALUE)) {
-                fValuesCount++;
-            }
-            fValues.put(field, value);
-
-            if (fValuesCount == fValues.size()) {
-                // is this value as a group duplicated?
-                if (contains(fValues)) {
-                    duplicateValue(fValues);
-                }
-
-                // store values
-                OrderedHashtable values = (OrderedHashtable)fValues.clone();
-                fValueTuples.addElement(values);
-            }
-
-        } // addValue(String,Field)
-
-        /**
-         * Returns true if this value store contains the specified
-         * values tuple.
-         */
-        public boolean contains(OrderedHashtable tuple) {
-
-            // do sizes match?
-            int tcount = tuple.size();
-
-            // iterate over tuples to find it
-            int count = fValueTuples.size();
-            LOOP: for (int i = 0; i < count; i++) {
-                OrderedHashtable vtuple = (OrderedHashtable)fValueTuples.elementAt(i);
-                // compare values
-                for (int j = 0; j < tcount; j++) {
-                    IDValue value1 = vtuple.valueAt(j);
-                    IDValue value2 = tuple.valueAt(j);
-                    if (!(value1.isDuplicateOf(value2))) {
-                        continue LOOP;
-                    }
-                }
-
-                // found it
-                return true;
-            }
-
-            // didn't find it
-            return false;
-
-        } // contains(Hashtable):boolean
-
-        //
-        // Protected methods
-        //
-
-        /**
-         * Called when a duplicate value is added. Subclasses should override
-         * this method to perform error checking.
-         *
-         * @param tuple The duplicate value tuple.
-         */
-        protected void duplicateValue(OrderedHashtable tuple)
-        throws XNIException {
-            // no-op
-        } // duplicateValue(Hashtable)
-
-        /** Returns a string of the specified values. */
-        protected String toString(OrderedHashtable tuple) {
-
-            // no values
-            int size = tuple.size();
-            if (size == 0) {
-                return "";
-            }
-
-            // construct value string
-            StringBuffer str = new StringBuffer();
-            for (int i = 0; i < size; i++) {
-                if (i > 0) {
-                    str.append(',');
-                }
-                str.append(tuple.valueAt(i));
-            }
-            return str.toString();
-
-        } // toString(OrderedHashtable):String
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-            String s = super.toString();
-            int index1 = s.lastIndexOf('$');
-            if (index1 != -1) {
-                s = s.substring(index1 + 1);
-            }
-            int index2 = s.lastIndexOf('.');
-            if (index2 != -1) {
-                s = s.substring(index2 + 1);
-            }
-            return s + '[' + fIdentityConstraint + ']';
-        } // toString():String
-
-    } // class ValueStoreBase
-
-    /**
-     * Unique value store.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class UniqueValueStore
-    extends ValueStoreBase {
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a unique value store. */
-        public UniqueValueStore(UniqueOrKey unique) {
-            super(unique);
-        } // <init>(Unique)
-
-        //
-        // ValueStoreBase protected methods
-        //
-
-        /**
-         * Called when a duplicate value is added.
-         *
-         * @param tuple The duplicate value tuple.
-         */
-        protected void duplicateValue(OrderedHashtable tuple)
-        throws XNIException {
-            String code = "DuplicateUnique";
-            String value = toString(tuple);
-            String ename = fIdentityConstraint.getElementName();
-            reportSchemaError(code, new Object[]{value,ename});
-        } // duplicateValue(Hashtable)
-
-    } // class UniqueValueStore
-
-    /**
-     * Key value store.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class KeyValueStore
-    extends ValueStoreBase {
-
-        // REVISIT: Implement a more efficient storage mechanism. -Ac
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a key value store. */
-        public KeyValueStore(UniqueOrKey key) {
-            super(key);
-        } // <init>(Key)
-
-        //
-        // ValueStoreBase protected methods
-        //
-
-        /**
-         * Called when a duplicate value is added.
-         *
-         * @param tuple The duplicate value tuple.
-         */
-        protected void duplicateValue(OrderedHashtable tuple)
-        throws XNIException {
-            String code = "DuplicateKey";
-            String value = toString(tuple);
-            String ename = fIdentityConstraint.getElementName();
-            reportSchemaError(code, new Object[]{value,ename});
-        } // duplicateValue(Hashtable)
-
-    } // class KeyValueStore
-
-    /**
-     * Key reference value store.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class KeyRefValueStore
-    extends ValueStoreBase {
-
-        //
-        // Data
-        //
-
-        /** Key value store. */
-        protected ValueStoreBase fKeyValueStore;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a key value store. */
-        public KeyRefValueStore(KeyRef keyRef, KeyValueStore keyValueStore) {
-            super(keyRef);
-            fKeyValueStore = keyValueStore;
-        } // <init>(KeyRef)
-
-        //
-        // ValueStoreBase methods
-        //
-
-        // end the value Scope; here's where we have to tie
-        // up keyRef loose ends.
-        public void endDocumentFragment () throws XNIException {
-
-            // do all the necessary management...
-            super.endDocumentFragment ();
-
-            // verify references
-            // get the key store corresponding (if it exists):
-            fKeyValueStore = (ValueStoreBase)fValueStoreCache.fGlobalIDConstraintMap.get(((KeyRef)fIdentityConstraint).getKey());
-
-            if (fKeyValueStore == null) {
-                // report error
-                String code = "KeyRefOutOfScope";
-                String value = fIdentityConstraint.toString();
-                reportSchemaError(code, new Object[]{value});
-                return;
-            }
-
-            int count = fValueTuples.size();
-            for (int i = 0; i < count; i++) {
-                OrderedHashtable values = (OrderedHashtable)fValueTuples.elementAt(i);
-                if (!fKeyValueStore.contains(values)) {
-                    String code = "KeyNotFound";
-                    String value = toString(values);
-                    String element = fIdentityConstraint.getElementName();
-                    reportSchemaError(code, new Object[]{value,element});
-                }
-            }
-
-        } // endDocumentFragment()
-
-        /** End document. */
-        public void endDocument() throws XNIException {
-            super.endDocument();
-
-        } // endDocument()
-
-    } // class KeyRefValueStore
-
-    // value store management
-
-    /**
-     * Value store cache. This class is used to store the values for
-     * identity constraints.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class ValueStoreCache {
-
-        //
-        // Data
-        //
-
-        // values stores
-
-        /** stores all global Values stores. */
-        protected final Vector fValueStores = new Vector();
-
-        /** Values stores associated to specific identity constraints. */
-        protected final Hashtable fIdentityConstraint2ValueStoreMap = new Hashtable();
-
-        // sketch of algorithm:
-        // - when a constraint is first encountered, its
-        //  values are stored in the (local) fIdentityConstraint2ValueStoreMap;
-        // - Once it is validated (i.e., wen it goes out of scope),
-        //  its values are merged into the fGlobalIDConstraintMap;
-        // - as we encounter keyref's, we look at the global table to
-        //  validate them.
-        // the fGlobalIDMapStack has the following structure:
-        // - validation always occurs against the fGlobalIDConstraintMap
-        // (which comprises all the "eligible" id constraints);
-        // When an endelement is found, this Hashtable is merged with the one
-        // below in the stack.
-        // When a start tag is encountered, we create a new
-        // fGlobalIDConstraintMap.
-        // i.e., the top of the fGlobalIDMapStack always contains
-        // the preceding siblings' eligible id constraints;
-        // the fGlobalIDConstraintMap contains descendants+self.
-        // keyrefs can only match descendants+self.
-        protected final Stack fGlobalMapStack = new Stack();
-        protected final Hashtable fGlobalIDConstraintMap = new Hashtable();
-
-        //
-        // Constructors
-        //
-
-        /** Default constructor. */
-        public ValueStoreCache() {
-        } // <init>()
-
-        //
-        // Public methods
-        //
-
-        /** Resets the identity constraint cache. */
-        public void startDocument() throws XNIException {
-            fValueStores.removeAllElements();
-            fIdentityConstraint2ValueStoreMap.clear();
-            fGlobalIDConstraintMap.clear();
-            fGlobalMapStack.removeAllElements();
-        } // startDocument()
-
-        // startElement:  pushes the current fGlobalIDConstraintMap
-        // onto fGlobalMapStack and clears fGlobalIDConstraint map.
-        public void startElement() {
-            fGlobalMapStack.push(fGlobalIDConstraintMap.clone());
-            fGlobalIDConstraintMap.clear();
-        } // startElement(void)
-
-        // endElement():  merges contents of fGlobalIDConstraintMap with the
-        // top of fGlobalMapStack into fGlobalIDConstraintMap.
-        public void endElement() {
-            if (fGlobalMapStack.isEmpty()) return; // must be an invalid doc!
-            Hashtable oldMap = (Hashtable)fGlobalMapStack.pop();
-            Enumeration keys = oldMap.keys();
-            while (keys.hasMoreElements()) {
-                IdentityConstraint id = (IdentityConstraint)keys.nextElement();
-                ValueStoreBase oldVal = (ValueStoreBase)oldMap.get(id);
-                if (oldVal != null) {
-                    ValueStoreBase currVal = (ValueStoreBase)fGlobalIDConstraintMap.get(id);
-                    if (currVal == null)
-                        fGlobalIDConstraintMap.put(id, oldVal);
-                    else {
-                        currVal.append(oldVal);
-                        fGlobalIDConstraintMap.put(id, currVal);
-                    }
-                }
-            }
-        } // endElement()
-
-        /**
-         * Initializes the value stores for the specified element
-         * declaration.
-         */
-        public void initValueStoresFor(XSElementDecl eDecl)
-        throws XNIException {
-            // initialize value stores for unique fields
-            IdentityConstraint [] icArray = eDecl.fIDConstraints;
-            int icCount = eDecl.fIDCPos;
-            for (int i = 0; i < icCount; i++) {
-                switch (icArray[i].getType()) {
-                case (IdentityConstraint.UNIQUE):
-                    // initialize value stores for unique fields
-                    UniqueOrKey unique = (UniqueOrKey)icArray[i];
-                    UniqueValueStore uniqueValueStore = (UniqueValueStore)fIdentityConstraint2ValueStoreMap.get(unique);
-                    if (uniqueValueStore != null) {
-                        // NOTE: If already initialized, don't need to
-                        //       do it again. -Ac
-                        continue;
-                    }
-                    uniqueValueStore = new UniqueValueStore(unique);
-                    fValueStores.addElement(uniqueValueStore);
-                    fIdentityConstraint2ValueStoreMap.put(unique, uniqueValueStore);
-                    break;
-                case (IdentityConstraint.KEY):
-                    // initialize value stores for key fields
-                    UniqueOrKey key = (UniqueOrKey)icArray[i];
-                    KeyValueStore keyValueStore = (KeyValueStore)fIdentityConstraint2ValueStoreMap.get(key);
-                    if (keyValueStore != null) {
-                        // NOTE: If already initialized, don't need to
-                        //       do it again. -Ac
-                        continue;
-                    }
-                    keyValueStore = new KeyValueStore(key);
-                    fValueStores.addElement(keyValueStore);
-                    fIdentityConstraint2ValueStoreMap.put(key, keyValueStore);
-                    break;
-                case (IdentityConstraint.KEYREF):
-                    // initialize value stores for key reference fields
-                    KeyRef keyRef = (KeyRef)icArray[i];
-                    KeyRefValueStore keyRefValueStore = (KeyRefValueStore)fIdentityConstraint2ValueStoreMap.get(keyRef);
-                    if (keyRefValueStore != null) {
-                        // NOTE: If already initialized, don't need to
-                        //       do it again. -Ac
-                        continue;
-                    }
-                    keyRefValueStore = new KeyRefValueStore(keyRef, null);
-                    fValueStores.addElement(keyRefValueStore);
-                    fIdentityConstraint2ValueStoreMap.put(keyRef, keyRefValueStore);
-                    break;
-                }
-            }
-        } // initValueStoresFor(XSElementDecl)
-
-        /** Returns the value store associated to the specified field. */
-        public ValueStoreBase getValueStoreFor(Field field) {
-            IdentityConstraint identityConstraint = field.getIdentityConstraint();
-            return(ValueStoreBase)fIdentityConstraint2ValueStoreMap.get(identityConstraint);
-        } // getValueStoreFor(Field):ValueStoreBase
-
-        /** Returns the value store associated to the specified IdentityConstraint. */
-        public ValueStoreBase getValueStoreFor(IdentityConstraint id) {
-            return(ValueStoreBase)fIdentityConstraint2ValueStoreMap.get(id);
-        } // getValueStoreFor(IdentityConstraint):ValueStoreBase
-
-        /** Returns the global value store associated to the specified IdentityConstraint. */
-        public ValueStoreBase getGlobalValueStoreFor(IdentityConstraint id) {
-            return(ValueStoreBase)fGlobalIDConstraintMap.get(id);
-        } // getValueStoreFor(IdentityConstraint):ValueStoreBase
-        // This method takes the contents of the (local) ValueStore
-        // associated with id and moves them into the global
-        // hashtable, if id is a <unique> or a <key>.
-        // If it's a <keyRef>, then we leave it for later.
-        public void transplant(IdentityConstraint id) {
-            if (id.getType() == IdentityConstraint.KEYREF) return;
-            ValueStoreBase newVals = (ValueStoreBase)fIdentityConstraint2ValueStoreMap.get(id);
-            fIdentityConstraint2ValueStoreMap.remove(id);
-            ValueStoreBase currVals = (ValueStoreBase)fGlobalIDConstraintMap.get(id);
-            if (currVals != null) {
-                currVals.append(newVals);
-                fGlobalIDConstraintMap.put(id, currVals);
-            }
-            else
-                fGlobalIDConstraintMap.put(id, newVals);
-
-        } // transplant(id)
-
-        /** Check identity constraints. */
-        public void endDocument() throws XNIException {
-
-            int count = fValueStores.size();
-            for (int i = 0; i < count; i++) {
-                ValueStoreBase valueStore = (ValueStoreBase)fValueStores.elementAt(i);
-                valueStore.endDocument();
-            }
-
-        } // endDocument()
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-            String s = super.toString();
-            int index1 = s.lastIndexOf('$');
-            if (index1 != -1) {
-                return s.substring(index1 + 1);
-            }
-            int index2 = s.lastIndexOf('.');
-            if (index2 != -1) {
-                return s.substring(index2 + 1);
-            }
-            return s;
-        } // toString():String
-
-    } // class ValueStoreCache
-
-    // utility classes
-
-    /**
-     * Ordered hashtable. This class acts as a hashtable with
-     * <code>put()</code> and <code>get()</code> operations but also
-     * allows values to be queried via the order that they were
-     * added to the hashtable.
-     * <p>
-     * <strong>Note:</strong> This class does not perform any error
-     * checking.
-     * <p>
-     * <strong>Note:</strong> This class is <em>not</em> efficient but
-     * is assumed to be used for a very small set of values.
-     *
-     * @author Andy Clark, IBM
-     */
-    static final class OrderedHashtable
-    implements Cloneable {
-
-        //
-        // Data
-        //
-
-        /** Size. */
-        private int fSize;
-
-        /** Hashtable entries. */
-        private Entry[] fEntries = null;
-
-        //
-        // Public methods
-        //
-
-        /** Returns the number of entries in the hashtable. */
-        public int size() {
-            return fSize;
-        } // size():int
-
-        /** Puts an entry into the hashtable. */
-        public void put(Field key, IDValue value) {
-            int index = indexOf(key);
-            if (index == -1) {
-                ensureCapacity(fSize);
-                index = fSize++;
-                fEntries[index].key = key;
-            }
-            fEntries[index].value = value;
-        } // put(Field,String)
-
-        /** Returns the value associated to the specified key. */
-        public IDValue get(Field key) {
-            return fEntries[indexOf(key)].value;
-        } // get(Field):String
-
-        /** Returns the index of the entry with the specified key. */
-        public int indexOf(Field key) {
-            for (int i = 0; i < fSize; i++) {
-                // NOTE: Only way to be sure that the keys are the
-                //       same is by using a reference comparison. In
-                //       order to rely on the equals method, each
-                //       field would have to take into account its
-                //       position in the identity constraint, the
-                //       identity constraint, the declaring element,
-                //       and the grammar that it is defined in.
-                //       Otherwise, you have the possibility that
-                //       the equals method would return true for two
-                //       fields that look *very* similar.
-                //       The reference compare isn't bad, actually,
-                //       because the field objects are cacheable. -Ac
-                if (fEntries[i].key == key) {
-                    return i;
-                }
-            }
-            return -1;
-        } // indexOf(Field):int
-
-        /** Returns the key at the specified index. */
-        public Field keyAt(int index) {
-            return fEntries[index].key;
-        } // keyAt(int):Field
-
-        /** Returns the value at the specified index. */
-        public IDValue valueAt(int index) {
-            return fEntries[index].value;
-        } // valueAt(int):String
-
-        /** Removes all of the entries from the hashtable. */
-        public void clear() {
-            fSize = 0;
-        } // clear()
-
-        //
-        // Private methods
-        //
-
-        /** Ensures the capacity of the entries array. */
-        private void ensureCapacity(int size) {
-
-            // sizes
-            int osize = -1;
-            int nsize = -1;
-
-            // create array
-            if (fEntries == null) {
-                osize = 0;
-                nsize = 2;
-                fEntries = new Entry[nsize];
-            }
-
-            // resize array
-            else if (fEntries.length <= size) {
-                osize = fEntries.length;
-                nsize = 2 * osize;
-                Entry[] array = new Entry[nsize];
-                System.arraycopy(fEntries, 0, array, 0, osize);
-                fEntries = array;
-            }
-
-            // create new entries
-            for (int i = osize; i < nsize; i++) {
-                fEntries[i] = new Entry();
-            }
-
-        } // ensureCapacity(int)
-
-        //
-        // Cloneable methods
-        //
-
-        /** Clones this object. */
-        public Object clone() {
-
-            OrderedHashtable hashtable = new OrderedHashtable();
-            for (int i = 0; i < fSize; i++) {
-                hashtable.put(fEntries[i].key, fEntries[i].value);
-            }
-            return hashtable;
-
-        } // clone():Object
-
-        //
-        // Object methods
-        //
-
-        /** Returns a string representation of this object. */
-        public String toString() {
-            if (fSize == 0) {
-                return "[]";
-            }
-            StringBuffer str = new StringBuffer();
-            str.append('[');
-            for (int i = 0; i < fSize; i++) {
-                if (i > 0) {
-                    str.append(',');
-                }
-                str.append('{');
-                str.append(fEntries[i].key);
-                str.append(',');
-                str.append(fEntries[i].value);
-                str.append('}');
-            }
-            str.append(']');
-            return str.toString();
-        } // toString():String
-
-        //
-        // Classes
-        //
-
-        /**
-         * Hashtable entry.
-         */
-        public static final class Entry {
-
-            //
-            // Data
-            //
-
-            /** Key. */
-            public Field key;
-
-            /** Value. */
-            public IDValue value;
-
-        } // class Entry
-
-    } // class OrderedHashtable
-} // class SchemaValidator
diff --git a/src/org/apache/xerces/impl/xs/XSAttributeDecl.java b/src/org/apache/xerces/impl/xs/XSAttributeDecl.java
deleted file mode 100644
index 4863801..0000000
--- a/src/org/apache/xerces/impl/xs/XSAttributeDecl.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.ValidatedInfo;
-
-/**
- * The XML representation for an attribute declaration
- * schema component is an <attribute> element information item
- *
- * @author Elena Litani, IBM
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class XSAttributeDecl {
-
-    // types of value constraint
-    public final static short     NO_CONSTRAINT       = 0;
-    public final static short     DEFAULT_VALUE       = 1;
-    public final static short     FIXED_VALUE         = 2;
-
-    // the name of the attribute
-    public String fName = null;
-    // the target namespace of the attribute
-    public String fTargetNamespace = null;
-    // the simple type of the attribute
-    public XSSimpleType fType = null;
-    // value constraint type: default, fixed or !specified
-    short fMiscFlags = 0;
-    // value constraint value
-    public ValidatedInfo fDefault = null;
-
-    private static final short CONSTRAINT_MASK = 3;
-    private static final short GLOBAL          = 4;
-
-    // methods to get/set misc flag
-
-    public short getConstraintType() {
-        return (short)(fMiscFlags & CONSTRAINT_MASK);
-    }
-    public boolean isGlobal() {
-        return ((fMiscFlags & GLOBAL) != 0);
-    }
-
-    public void setConstraintType(short constraintType) {
-        // first clear the bits
-        fMiscFlags ^= (fMiscFlags & CONSTRAINT_MASK);
-        // then set the proper one
-        fMiscFlags |= (constraintType & CONSTRAINT_MASK);
-    }
-    public void setIsGlobal() {
-        fMiscFlags |= GLOBAL;
-    }
-
-} // class XSAttributeDecl
diff --git a/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java b/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java
deleted file mode 100644
index 97cf39c..0000000
--- a/src/org/apache/xerces/impl/xs/XSAttributeGroupDecl.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.ValidatedInfo;
-
-/**
- * The XML representation for an attribute group declaration
- * schema component is a global <attributeGroup> element information item
- *
- * @author Sandy Gao, IBM
- * @author Rahul Srivastava, Sun Microsystems Inc.
- *
- * @version $Id$
- */
-public class XSAttributeGroupDecl {
-
-    // name of the attribute group
-    public String fName = null;
-    // target namespace of the attribute group
-    public String fTargetNamespace = null;
-    // number of attribute uses included by this attribute group
-    int fAttrUseNum = 0;
-    // attribute uses included by this attribute group
-    private static final int INITIAL_SIZE = 5;
-    XSAttributeUse[] fAttributeUses = new XSAttributeUse[INITIAL_SIZE];
-    // attribute wildcard included by this attribute group
-    public XSWildcardDecl fAttributeWC = null;
-    // whether there is an attribute use whose type is or is derived from ID.
-    public String fIDAttrName = null;
-
-    // add an attribute use
-    // if the type is derived from ID, but there is already another attribute
-    // use of type ID, then return the name of the other attribute use;
-    // otherwise, return null
-    public String addAttributeUse(XSAttributeUse attrUse) {
-        if (fAttrUseNum == fAttributeUses.length) {
-            fAttributeUses = resize(fAttributeUses, fAttrUseNum*2);
-        }
-        fAttributeUses[fAttrUseNum++] = attrUse;
-
-        // if this attribute use is prohibited, then don't check whether it's
-        // of type ID
-        if (attrUse.fUse == SchemaSymbols.USE_PROHIBITED)
-            return null;
-
-        if (attrUse.fAttrDecl.fType.isIDType()) {
-            // if there is already an attribute use of type ID, return it' sname
-            if (fIDAttrName == null)
-                fIDAttrName = attrUse.fAttrDecl.fName;
-            else
-                return fIDAttrName;
-        }
-
-        return null;
-    }
-
-    public XSAttributeUse getAttributeUse(String uri, String localpart) {
-        for (int i=0; i<fAttrUseNum; i++) {
-            if ( (fAttributeUses[i].fAttrDecl.fTargetNamespace == uri) &&
-                 (fAttributeUses[i].fAttrDecl.fName == localpart) )
-                return fAttributeUses[i];
-        }
-
-        return null;
-    }
-
-    public void removeProhibitedAttrs() {
-        int pCount = 0;
-        XSAttributeUse[] pUses = new XSAttributeUse[fAttrUseNum];
-        for (int i = 0; i < fAttrUseNum; i++) {
-            if (fAttributeUses[i].fUse == SchemaSymbols.USE_PROHIBITED) {
-                pCount++;
-                // we use the entries at the end, so that we can use the
-                // first entries to store non-prohibited attribute uses,
-                // hence avoid creating a new array.
-                pUses[fAttrUseNum-pCount] = fAttributeUses[i];
-            }
-        }
-
-        int newCount = 0;
-        if (pCount > 0) {
-            for (int i = 0; i < fAttrUseNum; i++) {
-                if (fAttributeUses[i].fUse == SchemaSymbols.USE_PROHIBITED)
-                    continue;
-                for (int j = 1; j <= pCount; j++) {
-                    if (fAttributeUses[i].fAttrDecl.fName == pUses[fAttrUseNum-pCount].fAttrDecl.fName &&
-                        fAttributeUses[i].fAttrDecl.fTargetNamespace == pUses[fAttrUseNum-pCount].fAttrDecl.fTargetNamespace) {
-                        continue;
-                    }
-                }
-                pUses[newCount++] = fAttributeUses[i];
-            }
-            fAttributeUses = pUses;
-            fAttrUseNum = newCount;
-        }
-    }
-
-    public XSAttributeUse[] getAttributeUses() {
-        if (fAttrUseNum < fAttributeUses.length) {
-            fAttributeUses = resize(fAttributeUses, fAttrUseNum);
-        }
-        return fAttributeUses;
-    }
-
-   // Check that the attributes in this group validly restrict those from a base group
-   // If an error is found, the error code is returned.
-   public String validRestrictionOf(XSAttributeGroupDecl baseGroup) {
-
-        String errorCode = null;
-        XSAttributeUse attrUse = null;
-        XSAttributeDecl attrDecl = null;
-        XSAttributeUse baseAttrUse = null;
-        XSAttributeDecl baseAttrDecl = null;
-
-        for (int i=0; i<fAttrUseNum; i++) {
-
-           attrUse = fAttributeUses[i];
-           attrDecl = attrUse.fAttrDecl;
-
-           // Look for a match in the base
-           baseAttrUse = baseGroup.getAttributeUse(
-                                    attrDecl.fTargetNamespace,attrDecl.fName);
-           if (baseAttrUse != null) {
-             //
-             // derivation-ok-restriction.  Constraint 2.1.1
-             //
-
-             if (baseAttrUse.fUse == SchemaSymbols.USE_REQUIRED &&
-                 attrUse.fUse != SchemaSymbols.USE_REQUIRED) {
-               errorCode = "derivation-ok-restriction.2.1.1";
-               return errorCode;
-             }
-
-             baseAttrDecl = baseAttrUse.fAttrDecl;
-             //
-             // derivation-ok-restriction.  Constraint 2.1.1
-             //
-             if (! XSConstraints.checkSimpleDerivationOk(attrDecl.fType,
-                                           baseAttrDecl.fType,
-                                           baseAttrDecl.fType.getFinalSet()) ) {
-                errorCode="derivation-ok-restriction.2.1.2";
-                return errorCode;
-             }
-
-
-             //
-             // derivation-ok-restriction.  Constraint 2.1.3
-             //
-             int baseConsType=baseAttrUse.fConstraintType!=XSAttributeDecl.NO_CONSTRAINT?
-                                 baseAttrUse.fConstraintType:baseAttrDecl.getConstraintType();
-             int thisConstType = attrUse.fConstraintType!=XSAttributeDecl.NO_CONSTRAINT?
-                                 attrUse.fConstraintType:attrDecl.getConstraintType();
-
-             if (baseConsType == XSAttributeDecl.FIXED_VALUE) {
-
-                 if (thisConstType != XSAttributeDecl.FIXED_VALUE) {
-                   errorCode="derivation-ok-restriction.2.1.3";
-                   return errorCode;
-                 }
-                 else {
-                   // check the values are the same.  NB - this should not be a string
-                   // comparison REVISIT when we have new datatype design!
-                   ValidatedInfo baseFixedValue=(baseAttrUse.fDefault!=null ?
-                                                baseAttrUse.fDefault: baseAttrDecl.fDefault);
-                   ValidatedInfo thisFixedValue=(attrUse.fDefault!=null ?
-                                                attrUse.fDefault: attrDecl.fDefault);
-                   if (!baseFixedValue.normalizedValue.equals(thisFixedValue.normalizedValue)) {
-                     errorCode="derivation-ok-restriction.2.1.3";
-                     return errorCode;
-                   }
-
-                 }
-
-             }
-           }
-           else {
-             // No matching attribute in base - there should be a matching wildcard
-
-
-             //
-             // derivation-ok-restriction.  Constraint 2.2
-             //
-             if (baseGroup.fAttributeWC == null ||
-                 (!baseGroup.fAttributeWC.allowNamespace(attrDecl.fTargetNamespace))) {
-
-               errorCode = "derivation-ok-restriction.2.2";
-               return errorCode;
-             }
-           }
-        }
-
-        //
-        // Check that any REQUIRED attributes in the base have matching attributes
-        // in this group
-        // derivation-ok-restriction.  Constraint 3
-        //
-        for (int i=0; i<baseGroup.fAttrUseNum; i++) {
-
-           baseAttrUse = baseGroup.fAttributeUses[i];
-
-           if (baseAttrUse.fUse == SchemaSymbols.USE_REQUIRED) {
-
-             baseAttrDecl = baseAttrUse.fAttrDecl;
-             // Look for a match in this group
-             XSAttributeUse thisAttrUse = getAttributeUse(
-                                    baseAttrDecl.fTargetNamespace,baseAttrDecl.fName);
-             if (thisAttrUse == null) {
-               errorCode = "derivation-ok-restriction.3";
-               return errorCode;
-             }
-           }
-        }
-
-
-        // Now, check wildcards
-        //
-        // derivation-ok-restriction.  Constraint 4
-        //
-        if (fAttributeWC != null) {
-          if (baseGroup.fAttributeWC == null) {
-            errorCode = "derivation-ok-restriction.4";
-            return errorCode;
-          }
-          if (! fAttributeWC.isSubsetOf(baseGroup.fAttributeWC)) {
-            errorCode="derivation-ok-restriction.4";
-            return errorCode;
-          }
-        }
-
-        return null;
-
-   }
-
-    static final XSAttributeUse[] resize(XSAttributeUse[] oldArray, int newSize) {
-        XSAttributeUse[] newArray = new XSAttributeUse[newSize];
-        System.arraycopy(oldArray, 0, newArray, 0, Math.min(oldArray.length, newSize));
-        return newArray;
-    }
-
-} // class XSAttributeGroupDecl
diff --git a/src/org/apache/xerces/impl/xs/XSAttributeUse.java b/src/org/apache/xerces/impl/xs/XSAttributeUse.java
deleted file mode 100644
index bc2ab36..0000000
--- a/src/org/apache/xerces/impl/xs/XSAttributeUse.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.ValidatedInfo;
-
-/**
- * The XML representation for an attribute use
- * schema component is a local <attribute> element information item
- *
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class XSAttributeUse {
-
-    // the referred attribute decl
-    public XSAttributeDecl fAttrDecl = null;
-    // use information: SchemaSymbols.USE_OPTIONAL, REQUIRED, PROHIBITED
-    public short fUse = SchemaSymbols.USE_OPTIONAL;
-    // value constraint type: default, fixed or !specified
-    public short fConstraintType = XSAttributeDecl.NO_CONSTRAINT;
-    // value constraint value
-    public ValidatedInfo fDefault = null;
-
-} // class XSAttributeUse
diff --git a/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java b/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java
deleted file mode 100644
index bc3c93e..0000000
--- a/src/org/apache/xerces/impl/xs/XSComplexTypeDecl.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.xs.models.XSCMValidator;
-import org.apache.xerces.impl.xs.models.CMBuilder;
-
-/**
- * The XML representation for a complexType
- * schema component is a <complexType> element information item
- *
- * @author Elena Litani, IBM
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class XSComplexTypeDecl implements XSTypeDecl {
-
-    // content types of complextype
-    public static final short CONTENTTYPE_EMPTY   = 0;
-    public static final short CONTENTTYPE_SIMPLE  = 1;
-    public static final short CONTENTTYPE_MIXED   = 2;
-    public static final short CONTENTTYPE_ELEMENT = 3;
-
-    // name of the complexType
-    public String fName = null;
-
-    // target namespace of the complexType
-    public String fTargetNamespace = null;
-
-    // base type of the complexType
-    public XSTypeDecl fBaseType = null;
-
-    // derivation method of the complexType
-    public short fDerivedBy = SchemaSymbols.RESTRICTION;
-
-    // final set of the complexType
-    public short fFinal = SchemaSymbols.EMPTY_SET;
-
-    // block set (prohibited substitution) of the complexType
-    public short fBlock = SchemaSymbols.EMPTY_SET;
-
-    // flags: whether is abstract; whether contains ID type;
-    //        whether it's an anonymous tpye
-    public short fMiscFlags = 0;
-
-    // the attribute group that holds the attribute uses and attribute wildcard
-    public XSAttributeGroupDecl fAttrGrp = new XSAttributeGroupDecl();
-
-    // the content type of the complexType
-    public short fContentType = CONTENTTYPE_EMPTY;
-
-    // if the content type is simple, then the corresponding simpleType
-    public XSSimpleType fXSSimpleType = null;
-
-    // if the content type is element or mixed, the particle
-    public XSParticleDecl fParticle = null;
-
-    // if there is a particle, the content model corresponding to that particle
-    public XSCMValidator fCMValidator = null;
-
-    // REVISIT: when XSTypeDecl becomes a class, remove this method
-    public short getXSType () {
-        return COMPLEX_TYPE;
-    }
-
-    // REVISIT: when XSTypeDecl becomes a class, remove this method
-    public String getTypeName() {
-        return fName;
-    }
-
-    public short getFinalSet(){
-        return fFinal;
-    }
-
-    public String getTargetNamespace(){
-        return fTargetNamespace;
-    }
-
-    public XSTypeDecl getBaseType(){
-        return fBaseType;
-    }
-
-    // flags for the misc flag
-    private static final short CT_IS_ABSTRACT = 1;
-    private static final short CT_HAS_TYPE_ID = 2;
-    private static final short CT_IS_ANONYMOUS = 4;
-
-    // methods to get/set misc flag
-
-    public boolean isAbstractType() {
-        return ((fMiscFlags & CT_IS_ABSTRACT) != 0);
-    }
-    public boolean containsTypeID () {
-        return ((fMiscFlags & CT_HAS_TYPE_ID) != 0);
-    }
-    public boolean isAnonymous() {
-        return ((fMiscFlags & CT_IS_ANONYMOUS) != 0);
-    }
-
-    public void setIsAbstractType() {
-        fMiscFlags |= CT_IS_ABSTRACT;
-    }
-    public void setContainsTypeID() {
-        fMiscFlags |= CT_HAS_TYPE_ID;
-    }
-    public void setIsAnonymous() {
-        fMiscFlags |= CT_IS_ANONYMOUS;
-    }
-
-    public XSCMValidator getContentModel(CMBuilder cmBuilder) {
-        if (fCMValidator != null)
-            return fCMValidator;
-        fCMValidator = cmBuilder.getContentModel(this);
-
-        return fCMValidator;
-    }
-
-    public String toString() {
-
-        StringBuffer str = new StringBuffer();
-        appendTypeInfo(str);
-        return str.toString();
-    }
-
-    void appendTypeInfo(StringBuffer str) {
-        String contentType[] = {"EMPTY", "SIMPLE", "MIXED", "ELEMENT"};
-        String derivedBy[] = {"EMPTY", "EXTENSION", "RESTRICTION"};
-
-        str.append("Complex type name='" + fTargetNamespace + "," + getTypeName() + "', ");
-        if (fBaseType != null)
-          str.append(" base type name='" + fBaseType.getTypeName() + "', ");
-
-        str.append(" content type='" + contentType[fContentType] + "', ");
-        str.append(" isAbstract='" + isAbstractType() + "', ");
-        str.append(" hasTypeId='" + containsTypeID() + "', ");
-        str.append(" final='" + fFinal + "', ");
-        str.append(" block='" + fBlock + "', ");
-        if (fParticle != null)
-          str.append(" particle='" + fParticle.toString() + "', ");
-        str.append(" derivedBy='" + derivedBy[fDerivedBy] + "'. ");
-
-    }
-
-} // class XSComplexTypeDecl
diff --git a/src/org/apache/xerces/impl/xs/XSConstraints.java b/src/org/apache/xerces/impl/xs/XSConstraints.java
deleted file mode 100644
index b86c838..0000000
--- a/src/org/apache/xerces/impl/xs/XSConstraints.java
+++ /dev/null
@@ -1,1409 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.XSUnionSimpleType;
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.dv.ValidatedInfo;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.models.CMBuilder;
-import org.apache.xerces.impl.xs.models.XSCMValidator;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.util.SymbolHash;
-import java.util.Vector;
-
-/**
- * Constaints shared by traversers and validator
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class XSConstraints {
-
-    static final int OCCURRENCE_UNKNOWN = SchemaSymbols.OCCURRENCE_UNBOUNDED-1;
-    /**
-     * check whether derived is valid derived from base, given a subset
-     * of {restriction, extension}.
-     */
-    public static boolean checkTypeDerivationOk(XSTypeDecl derived, XSTypeDecl base, short block) {
-        // if derived is anyType, then it's valid only if base is anyType too
-        if (derived == SchemaGrammar.fAnyType)
-            return derived == base;
-        // if derived is anySimpleType, then it's valid only if the base
-        // is ur-type
-        if (derived == SchemaGrammar.fAnySimpleType) {
-            return (base == SchemaGrammar.fAnyType ||
-                    base == SchemaGrammar.fAnySimpleType);
-        }
-
-        // if derived is simple type
-        if (derived.getXSType() == XSTypeDecl.SIMPLE_TYPE) {
-            // if base is complex type
-            if (base.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-                // if base is anyType, change base to anySimpleType,
-                // otherwise, not valid
-                if (base == SchemaGrammar.fAnyType)
-                    base = SchemaGrammar.fAnySimpleType;
-                else
-                    return false;
-            }
-            return checkSimpleDerivation((XSSimpleType)derived,
-                                         (XSSimpleType)base, block);
-        } else {
-            return checkComplexDerivation((XSComplexTypeDecl)derived, base, block);
-        }
-    }
-
-    /**
-     * check whether simple type derived is valid derived from base,
-     * given a subset of {restriction, extension}.
-     */
-    public static boolean checkSimpleDerivationOk(XSSimpleType derived, XSTypeDecl base, short block) {
-        // if derived is anySimpleType, then it's valid only if the base
-        // is ur-type
-        if (derived == SchemaGrammar.fAnySimpleType) {
-            return (base == SchemaGrammar.fAnyType ||
-                    base == SchemaGrammar.fAnySimpleType);
-        }
-
-        // if base is complex type
-        if (base.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-            // if base is anyType, change base to anySimpleType,
-            // otherwise, not valid
-            if (base == SchemaGrammar.fAnyType)
-                base = SchemaGrammar.fAnySimpleType;
-            else
-                return false;
-        }
-        return checkSimpleDerivation((XSSimpleType)derived,
-                                     (XSSimpleType)base, block);
-    }
-
-    /**
-     * check whether complex type derived is valid derived from base,
-     * given a subset of {restriction, extension}.
-     */
-    public static boolean checkComplexDerivationOk(XSComplexTypeDecl derived, XSTypeDecl base, short block) {
-        // if derived is anyType, then it's valid only if base is anyType too
-        if (derived == SchemaGrammar.fAnyType)
-            return derived == base;
-        return checkComplexDerivation((XSComplexTypeDecl)derived, base, block);
-    }
-
-    /**
-     * Note: this will be a private method, and it assumes that derived is not
-     *       anySimpleType, and base is not anyType. Another method will be
-     *       introduced for public use, which will call this method.
-     */
-    private static boolean checkSimpleDerivation(XSSimpleType derived, XSSimpleType base, short block) {
-        // 1 They are the same type definition.
-        if (derived == base)
-            return true;
-
-        // 2 All of the following must be true:
-        // 2.1 restriction is not in the subset, or in the {final} of its own {base type definition};
-        if ((block & SchemaSymbols.RESTRICTION) != 0 ||
-            (derived.getBaseType().getFinalSet() & SchemaSymbols.RESTRICTION) != 0) {
-            return false;
-        }
-
-        // 2.2 One of the following must be true:
-        // 2.2.1 D's base type definition is B.
-        XSSimpleType directBase = (XSSimpleType)derived.getBaseType();
-        if (directBase == base)
-            return true;
-
-        // 2.2.2 D's base type definition is not the simple ur-type definition and is validly derived from B given the subset, as defined by this constraint.
-        if (directBase != SchemaGrammar.fAnySimpleType &&
-            checkSimpleDerivation(directBase, base, block)) {
-            return true;
-        }
-
-        // 2.2.3 D's {variety} is list or union and B is the simple ur-type definition.
-        if ((derived.getVariety() == XSSimpleType.VARIETY_LIST ||
-             derived.getVariety() == XSSimpleType.VARIETY_UNION) &&
-            base == SchemaGrammar.fAnySimpleType) {
-            return true;
-        }
-
-        // 2.2.4 B's {variety} is union and D is validly derived from a type definition in B's {member type definitions} given the subset, as defined by this constraint.
-        if (base.getVariety() == XSSimpleType.VARIETY_UNION) {
-            XSSimpleType[] subUnionMemberDV = ((XSUnionSimpleType)base).getMemberTypes();
-            int subUnionSize = subUnionMemberDV.length ;
-            for (int i=0; i<subUnionSize; i++) {
-                base = subUnionMemberDV[i];
-                if (checkSimpleDerivation(derived, base, block))
-                    return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Note: this will be a private method, and it assumes that derived is not
-     *       anyType. Another method will be introduced for public use,
-     *       which will call this method.
-     */
-    private static boolean checkComplexDerivation(XSComplexTypeDecl derived, XSTypeDecl base, short block) {
-        // 2.1 B and D must be the same type definition.
-        if (derived == base)
-            return true;
-
-        // 1 If B and D are not the same type definition, then the {derivation method} of D must not be in the subset.
-        if ((derived.fDerivedBy & block) != 0)
-            return false;
-
-        // 2 One of the following must be true:
-        XSTypeDecl directBase = derived.fBaseType;
-        // 2.2 B must be D's {base type definition}.
-        if (directBase == base)
-            return true;
-
-        // 2.3 All of the following must be true:
-        // 2.3.1 D's {base type definition} must not be the ur-type definition.
-        if (directBase == SchemaGrammar.fAnyType ||
-            directBase == SchemaGrammar.fAnySimpleType) {
-            return false;
-        }
-
-        // 2.3.2 The appropriate case among the following must be true:
-        // 2.3.2.1 If D's {base type definition} is complex, then it must be validly derived from B given the subset as defined by this constraint.
-        if (directBase.getXSType() == XSTypeDecl.COMPLEX_TYPE)
-            return checkComplexDerivation((XSComplexTypeDecl)directBase, base, block);
-
-        // 2.3.2.2 If D's {base type definition} is simple, then it must be validly derived from B given the subset as defined in Type Derivation OK (Simple) (3.14.6).
-        if (directBase.getXSType() == XSTypeDecl.SIMPLE_TYPE) {
-            // if base is complex type
-            if (base.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-                // if base is anyType, change base to anySimpleType,
-                // otherwise, not valid
-                if (base == SchemaGrammar.fAnyType)
-                    base = SchemaGrammar.fAnySimpleType;
-                else
-                    return false;
-            }
-            return checkSimpleDerivation((XSSimpleType)directBase,
-                                         (XSSimpleType)base, block);
-        }
-
-        return false;
-    }
-
-    /**
-     * check whether a value is a valid default for some type
-     * returns the compiled form of the value
-     * The parameter value could be either a String or a ValidatedInfo object
-     */
-    public static Object ElementDefaultValidImmediate(XSTypeDecl type, Object value, ValidationContext context, ValidatedInfo vinfo) {
-
-        XSSimpleType dv = null;
-
-        // e-props-correct
-        // For a string to be a valid default with respect to a type definition the appropriate case among the following must be true:
-        // 1 If the type definition is a simple type definition, then the string must be valid with respect to that definition as defined by String Valid (3.14.4).
-        if (type.getXSType() == XSTypeDecl.SIMPLE_TYPE) {
-            dv = (XSSimpleType)type;
-        }
-
-        // 2 If the type definition is a complex type definition, then all of the following must be true:
-        else {
-            // 2.1 its {content type} must be a simple type definition or mixed.
-            XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;
-            // 2.2 The appropriate case among the following must be true:
-            // 2.2.1 If the {content type} is a simple type definition, then the string must be valid with respect to that simple type definition as defined by String Valid (3.14.4).
-            if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
-                dv = ctype.fXSSimpleType;
-            }
-            // 2.2.2 If the {content type} is mixed, then the {content type}'s particle must be emptiable as defined by Particle Emptiable (3.9.6).
-            else if (ctype.fContentType == XSComplexTypeDecl.CONTENTTYPE_MIXED) {
-                if (!ctype.fParticle.emptiable())
-                    return null;
-            }
-            else {
-                return null;
-            }
-        }
-
-        // get the simple type declaration, and validate
-        Object actualValue = null;
-        if (dv != null) {
-            try {
-                if (value instanceof String) {
-                    actualValue = dv.validate((String)value, context, vinfo);
-                } else {
-                    ValidatedInfo info = (ValidatedInfo)value;
-                    dv.validate(context, info);
-                    actualValue = info.actualValue;
-                }
-            } catch (InvalidDatatypeValueException ide) {
-                return null;
-            }
-        }
-
-        return actualValue;
-    }
-
-    /**
-     * used to check the 3 constraints against each complex type
-     * (should be each model group):
-     * Unique Particle Attribution, Particle Derivation (Restriction),
-     * Element Declrations Consistent.
-     */
-    public static void fullSchemaChecking(XSGrammarResolver grammarResolver,
-                                          SubstitutionGroupHandler SGHandler,
-                                          CMBuilder cmBuilder,
-                                          XMLErrorReporter errorReporter) {
-        // get all grammars, and put all substitution group information
-        // in the substitution group handler
-        SchemaGrammar[] grammars = grammarResolver.getGrammars();
-        for (int i = grammars.length-1; i >= 0; i--) {
-            SGHandler.addSubstitutionGroup(grammars[i].getSubstitutionGroups());
-        }
-
-        // before worrying about complexTypes, let's get
-        // groups redefined by restriction out of the way.
-        for (int g = grammars.length-1; g >= 0; g--) {
-            XSGroupDecl [] redefinedGroups = grammars[g].getRedefinedGroupDecls();
-            for(int i=0; i<redefinedGroups.length; ) {
-                XSGroupDecl derivedGrp = redefinedGroups[i++];
-                XSParticleDecl derivedParticle = derivedGrp.fParticle;
-                XSGroupDecl baseGrp = redefinedGroups[i++];
-                XSParticleDecl baseParticle = baseGrp.fParticle;
-                if(baseParticle == null) {
-                    if(derivedParticle != null) { // can't be a restriction!
-                        errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                        "src-redefine.6.2.2",
-                                        new Object[]{derivedGrp.fName, "rcase-Recurse.2"},
-                                        XMLErrorReporter.SEVERITY_ERROR);
-                    } 
-                } else {
-                    try {
-                        particleValidRestriction(SGHandler, 
-                            derivedParticle, baseParticle);
-                    } catch (XMLSchemaException e) {
-                        String key = e.getKey();
-                        errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                        key,
-                                        e.getArgs(),
-                                        XMLErrorReporter.SEVERITY_ERROR);
-                        errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                        "src-redefine.6.2.2",
-                                        new Object[]{derivedGrp.fName, key},
-                                        XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-            }
-        }
-
-        // for each complex type, check the 3 constraints.
-        // types need to be checked
-        XSComplexTypeDecl[] types;
-        // to hold the errors
-        // REVISIT: do we want to report all errors? or just one?
-        //XMLSchemaError1D errors = new XMLSchemaError1D();
-        // whether need to check this type again;
-        // whether only do UPA checking
-        boolean further, fullChecked;
-        // if do all checkings, how many need to be checked again.
-        int keepType;
-        // i: grammar; j: type; k: error
-        // for all grammars
-        SymbolHash elemTable = new SymbolHash();
-        for (int i = grammars.length-1, j, k; i >= 0; i--) {
-            // get whether only check UPA, and types need to be checked
-            keepType = 0;
-            fullChecked = grammars[i].fFullChecked;
-            types = grammars[i].getUncheckedComplexTypeDecls();
-            // for each type
-            for (j = types.length-1; j >= 0; j--) {
-                // if only do UPA checking, skip the other two constraints
-                if (!fullChecked) {
-                // 1. Element Decl Consistent
-                  if (types[j].fParticle!=null) {
-                    elemTable.clear();
-                    try {
-                      checkElementDeclsConsistent(types[j], types[j].fParticle,
-                                                  elemTable, SGHandler);
-                    }
-                    catch (XMLSchemaException e) {
-                      errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                                e.getKey(),
-                                                e.getArgs(),
-                                                XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                  }
-                }
-
-                // 2. Particle Derivation
-                if (types[j].fBaseType != null &&
-                    types[j].fBaseType != SchemaGrammar.fAnyType &&
-                    types[j].fDerivedBy == SchemaSymbols.RESTRICTION &&
-                    types[j].fParticle !=null &&
-                    (types[j].fBaseType instanceof XSComplexTypeDecl) &&
-                    ((XSComplexTypeDecl)(types[j].fBaseType)).fParticle != null) {
-                  try {
-                      particleValidRestriction(SGHandler, types[j].fParticle,
-                         ((XSComplexTypeDecl)(types[j].fBaseType)).fParticle);
-                  } catch (XMLSchemaException e) {
-                      errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                                e.getKey(),
-                                                e.getArgs(),
-                                                XMLErrorReporter.SEVERITY_ERROR);
-                      errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                                "derivation-ok-restriction.5.3",
-                                                new Object[]{types[j].fName},
-                                                XMLErrorReporter.SEVERITY_ERROR);
-                  }
-                }
-
-                // 3. UPA
-                // get the content model and check UPA
-                XSCMValidator cm = types[j].getContentModel(cmBuilder);
-                further = false;
-                if (cm != null) {
-                    try {
-                        further = cm.checkUniqueParticleAttribution(SGHandler);
-                    } catch (XMLSchemaException e) {
-                        errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                                  e.getKey(),
-                                                  e.getArgs(),
-                                                  XMLErrorReporter.SEVERITY_ERROR);
-                    }
-                }
-                // now report all errors
-                // REVISIT: do we want to report all errors? or just one?
-                /*for (k = errors.getErrorCodeNum()-1; k >= 0; k--) {
-                    errorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                              errors.getErrorCode(k),
-                                              errors.getArgs(k),
-                                              XMLErrorReporter.SEVERITY_ERROR);
-                }*/
-
-                // if we are doing all checkings, and this one needs further
-                // checking, store it in the type array.
-                if (!fullChecked && further)
-                    types[keepType++] = types[j];
-
-                // clear errors for the next type.
-                // REVISIT: do we want to report all errors? or just one?
-                //errors.clear();
-            }
-            // we've done with the types in this grammar. if we are checking
-            // all constraints, need to trim type array to a proper size:
-            // only contain those need further checking.
-            // and mark this grammar that it only needs UPA checking.
-            if (!fullChecked) {
-                grammars[i].setUncheckedTypeNum(keepType);
-                grammars[i].fFullChecked = true;
-            }
-        }
-    }
-
-    /*
-       Check that a given particle is a valid restriction of a base particle.
-    */
-
-    public static void checkElementDeclsConsistent(XSComplexTypeDecl type,
-                                     XSParticleDecl particle,
-                                     SymbolHash elemDeclHash,
-                                     SubstitutionGroupHandler sgHandler) 
-                                     throws XMLSchemaException {
-
-       // check for elements in the tree with the same name and namespace           
-
-       int pType = particle.fType;
-
-       if (pType == XSParticleDecl.PARTICLE_EMPTY ||
-           pType == XSParticleDecl.PARTICLE_WILDCARD)
-          return;
-
-       if (pType == XSParticleDecl.PARTICLE_ELEMENT) {
-          XSElementDecl elem = (XSElementDecl)(particle.fValue);
-          findElemInTable(type, elem, elemDeclHash);
-
-          if (elem.isGlobal()) {
-             // Check for subsitution groups.  
-             XSElementDecl[] subGroup = sgHandler.getSubstitutionGroup(elem);
-             for (int i = 0; i < subGroup.length; i++) {
-               findElemInTable(type, subGroup[i], elemDeclHash); 
-             }
-          }
-          return;
-       }
-
-       XSParticleDecl left = (XSParticleDecl)particle.fValue;
-       checkElementDeclsConsistent(type, left, elemDeclHash, sgHandler);
-
-       XSParticleDecl right = (XSParticleDecl)particle.fOtherValue;
-       if (right != null) {
-         checkElementDeclsConsistent(type, right, elemDeclHash, sgHandler);
-       }
-       
-    }
-
-    public static void findElemInTable(XSComplexTypeDecl type, XSElementDecl elem, 
-                                       SymbolHash elemDeclHash) 
-                                       throws XMLSchemaException {
-
-        // How can we avoid this concat?  LM. 
-        String name = elem.fName + "," + elem.fTargetNamespace;
-
-        XSElementDecl existingElem = null;
-        if ((existingElem = (XSElementDecl)(elemDeclHash.get(name))) == null) {
-          // just add it in
-          elemDeclHash.put(name, elem);
-        }
-        else {
-          // If this is the same check element, we're O.K. 
-          if (elem == existingElem) 
-            return;
-
-          if (elem.fType != existingElem.fType) {
-            // Types are not the same 
-            throw new XMLSchemaException("cos-element-consistent", 
-                      new Object[] {type.fName, name});
-
-          }
-        }
-    }
-
-    // Invoke particleValidRestriction with a substitution group handler for each
-    /*
-       Check that a given particle is a valid restriction of a base particle.
-    */
-
-    public static void particleValidRestriction(SubstitutionGroupHandler sgHandler,
-                                     XSParticleDecl dParticle,
-                                     XSParticleDecl bParticle)
-                                     throws XMLSchemaException {
-
-    // Invoke particleValidRestriction with a substitution group handler for each
-    // particle.
-
-       particleValidRestriction(dParticle, sgHandler, bParticle, sgHandler);
-    }
-
-    private static void particleValidRestriction(XSParticleDecl dParticle,
-                                     SubstitutionGroupHandler dSGHandler,
-                                     XSParticleDecl bParticle,
-                                     SubstitutionGroupHandler bSGHandler)
-                                     throws XMLSchemaException {
-
-       Vector dChildren = null;
-       Vector bChildren = null;
-       int dMinEffectiveTotalRange=OCCURRENCE_UNKNOWN;
-       int dMaxEffectiveTotalRange=OCCURRENCE_UNKNOWN;
-
-
-       // Check for empty particles.   If either base or derived particle is empty,
-       // (and the other isn't) it's an error.
-       if (! (dParticle.isEmpty() == bParticle.isEmpty())) {
-         throw new XMLSchemaException("cos-particle-restrict", null);
-       }
-
-       //
-       // Do setup prior to invoking the Particle (Restriction) cases.
-       // This involves:
-       //   - removing pointless occurrences for groups, and retrieving a vector of
-       //     non-pointless children
-       //   - turning top-level elements with substitution groups into CHOICE groups.
-       //
-
-       int dType = dParticle.fType;
-       //
-       // Handle pointless groups for the derived particle
-       //
-       if (dType == XSParticleDecl.PARTICLE_SEQUENCE ||
-           dType == XSParticleDecl.PARTICLE_CHOICE ||
-           dType == XSParticleDecl.PARTICLE_ALL) {
-
-         // Find a group, starting with this particle, with more than 1 child.   There
-         // may be none, and the particle of interest trivially becomes an element or
-         // wildcard.
-         XSParticleDecl dtmp = getNonUnaryGroup(dParticle);
-         if (dtmp != dParticle) {
-            // Particle has been replaced.   Retrieve new type info.
-            dParticle = dtmp;
-            dType = dParticle.fType;
-         }
-
-         // Fill in a vector with the children of the particle, removing any
-         // pointless model groups in the process.
-         dChildren = removePointlessChildren(dParticle);
-       }
-
-       int dMinOccurs = dParticle.fMinOccurs;
-       int dMaxOccurs = dParticle.fMaxOccurs;
-
-       //
-       // For elements which are the heads of substitution groups, treat as CHOICE
-       //
-       if (dSGHandler != null && dType == XSParticleDecl.PARTICLE_ELEMENT) {
-           XSElementDecl dElement = (XSElementDecl)dParticle.fValue;
-
-           if (dElement.isGlobal()) {
-             // Check for subsitution groups.   Treat any element that has a
-             // subsitution group as a choice.   Fill in the children vector with the
-             // members of the substitution group
-             XSElementDecl[] subGroup = dSGHandler.getSubstitutionGroup(dElement);
-             if (subGroup.length >0 ) {
-                // Now, set the type to be CHOICE.  The "group" will have the same
-                // occurrence information as the original particle.
-                dType = XSParticleDecl.PARTICLE_CHOICE;
-                dMinOccurs = dParticle.fMinOccurs;
-                dMaxOccurs = dParticle.fMaxOccurs;
-                dMinEffectiveTotalRange = dMinOccurs;
-                dMaxEffectiveTotalRange = dMaxOccurs;
-
-                // Fill in the vector of children
-                dChildren = new Vector(subGroup.length+1);
-                for (int i = 0; i < subGroup.length; i++) {
-                  addElementToParticleVector(dChildren, subGroup[i]);
-                }
-                addElementToParticleVector(dChildren, dElement);
-
-                // Set the handler to null, to indicate that we've finished handling
-                // substitution groups for this particle.
-                dSGHandler = null;
-             }
-           }
-       }
-
-       int bType = bParticle.fType;
-       //
-       // Handle pointless groups for the base particle
-       //
-       if (bType == XSParticleDecl.PARTICLE_SEQUENCE ||
-           bType == XSParticleDecl.PARTICLE_CHOICE ||
-           bType == XSParticleDecl.PARTICLE_ALL) {
-
-         // Find a group, starting with this particle, with more than 1 child.   There
-         // may be none, and the particle of interest trivially becomes an element or
-         // wildcard.
-         XSParticleDecl btmp = getNonUnaryGroup(bParticle);
-         if (btmp != bParticle) {
-            // Particle has been replaced.   Retrieve new type info.
-            bParticle = btmp;
-            bType = bParticle.fType;
-         }
-
-         // Fill in a vector with the children of the particle, removing any
-         // pointless model groups in the process.
-         bChildren = removePointlessChildren(bParticle);
-       }
-
-       int bMinOccurs = bParticle.fMinOccurs;
-       int bMaxOccurs = bParticle.fMaxOccurs;
-
-       if (bSGHandler != null && bType == XSParticleDecl.PARTICLE_ELEMENT) {
-           XSElementDecl bElement = (XSElementDecl)bParticle.fValue;
-
-           if (bElement.isGlobal()) {
-             // Check for subsitution groups.   Treat any element that has a
-             // subsitution group as a choice.   Fill in the children vector with the
-             // members of the substitution group
-             XSElementDecl[] bsubGroup = bSGHandler.getSubstitutionGroup(bElement);
-             if (bsubGroup.length >0 ) {
-                // Now, set the type to be CHOICE
-                bType = XSParticleDecl.PARTICLE_CHOICE;
-                bMinOccurs = bParticle.fMinOccurs;
-                bMaxOccurs = bParticle.fMaxOccurs;
-
-                bChildren = new Vector(bsubGroup.length+1);
-                for (int i = 0; i < bsubGroup.length; i++) {
-                  addElementToParticleVector(bChildren, bsubGroup[i]);
-                }
-                addElementToParticleVector(bChildren, bElement);
-                // Set the handler to null, to indicate that we've finished handling
-                // substitution groups for this particle.
-                bSGHandler = null;
-             }
-           }
-       }
-
-       //
-       // O.K. - Figure out which particle derivation rule applies and call it
-       //
-       switch (dType) {
-         case XSParticleDecl.PARTICLE_ELEMENT:
-         {
-            switch (bType) {
-
-              // Elt:Elt NameAndTypeOK
-              case XSParticleDecl.PARTICLE_ELEMENT:
-              {
-                 checkNameAndTypeOK((XSElementDecl)dParticle.fValue,dMinOccurs,dMaxOccurs,
-                                    (XSElementDecl)bParticle.fValue,bMinOccurs,bMaxOccurs);
-                 return;
-              }
-
-              // Elt:Any NSCompat
-              case XSParticleDecl.PARTICLE_WILDCARD:
-              {
-                 checkNSCompat((XSElementDecl)dParticle.fValue,dMinOccurs,dMaxOccurs,
-                               (XSWildcardDecl)bParticle.fValue,bMinOccurs,bMaxOccurs);
-                 return;
-              }
-
-              // Elt:All RecurseAsIfGroup
-              case XSParticleDecl.PARTICLE_CHOICE:
-              {
-                 // Treat the element as if it were in a group of the same type
-                 // as the base Particle
-                 dChildren = new Vector();
-                 dChildren.addElement(dParticle);
-
-                 checkRecurseLax(dChildren, dMinOccurs, dMaxOccurs, dSGHandler,
-                                 bChildren, bMinOccurs, bMaxOccurs, bSGHandler);
-                 return;
-              }
-              case XSParticleDecl.PARTICLE_SEQUENCE:
-              case XSParticleDecl.PARTICLE_ALL:
-              {
-                 // Treat the element as if it were in a group of the same type
-                 // as the base Particle
-                 dChildren = new Vector();
-                 dChildren.addElement(dParticle);
-
-                 checkRecurse(dChildren, dMinOccurs, dMaxOccurs, dSGHandler,
-                              bChildren, bMinOccurs, bMaxOccurs, bSGHandler);
-                 return;
-              }
-
-              default:
-              {
-                throw new XMLSchemaException("Internal-Error",
-                                             new Object[]{"in particleValidRestriction"});
-              }
-            }
-         }
-
-         case XSParticleDecl.PARTICLE_WILDCARD:
-         {
-            switch (bType) {
-
-              // Any:Any NSSubset
-              case XSParticleDecl.PARTICLE_WILDCARD:
-              {
-                 checkNSSubset((XSWildcardDecl)dParticle.fValue, dMinOccurs, dMaxOccurs,
-                               (XSWildcardDecl)bParticle.fValue, bMinOccurs, bMaxOccurs);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_CHOICE:
-              case XSParticleDecl.PARTICLE_SEQUENCE:
-              case XSParticleDecl.PARTICLE_ALL:
-              case XSParticleDecl.PARTICLE_ELEMENT:
-              {
-                 throw new XMLSchemaException("cos-particle-restrict.2",
-                                        new Object[]{"any:choice,sequence,all,elt"});
-              }
-
-              default:
-              {
-                throw new XMLSchemaException("Internal-Error",
-                                             new Object[]{"in particleValidRestriction"});
-              }
-            }
-         }
-
-         case XSParticleDecl.PARTICLE_ALL:
-         {
-            switch (bType) {
-
-              // All:Any NSRecurseCheckCardinality
-              case XSParticleDecl.PARTICLE_WILDCARD:
-              {
-                 if (dMinEffectiveTotalRange != OCCURRENCE_UNKNOWN)
-                    dMinEffectiveTotalRange = dParticle.minEffectiveTotalRange();
-                 if (dMaxEffectiveTotalRange != OCCURRENCE_UNKNOWN)
-                    dMaxEffectiveTotalRange = dParticle.maxEffectiveTotalRange();
-
-                 checkNSRecurseCheckCardinality(dChildren, dMinEffectiveTotalRange,
-                                                dMaxEffectiveTotalRange,
-                                                dSGHandler,
-                                                bParticle,bMinOccurs,bMaxOccurs);
-
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_ALL:
-              {
-                 checkRecurse(dChildren, dMinOccurs, dMaxOccurs, dSGHandler,
-                              bChildren, bMinOccurs, bMaxOccurs, bSGHandler);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_CHOICE:
-              case XSParticleDecl.PARTICLE_SEQUENCE:
-              case XSParticleDecl.PARTICLE_ELEMENT:
-              {
-                 throw new XMLSchemaException("cos-particle-restrict.2",
-                                        new Object[]{"all:choice,sequence,elt"});
-              }
-
-              default:
-              {
-                throw new XMLSchemaException("Internal-Error",
-                                             new Object[]{"in particleValidRestriction"});
-              }
-            }
-         }
-
-         case XSParticleDecl.PARTICLE_CHOICE:
-         {
-            switch (bType) {
-
-              // Choice:Any NSRecurseCheckCardinality
-              case XSParticleDecl.PARTICLE_WILDCARD:
-              {
-                 if (dMinEffectiveTotalRange != OCCURRENCE_UNKNOWN)
-                    dMinEffectiveTotalRange = dParticle.minEffectiveTotalRange();
-                 if (dMaxEffectiveTotalRange != OCCURRENCE_UNKNOWN)
-                    dMaxEffectiveTotalRange = dParticle.maxEffectiveTotalRange();
-
-                 checkNSRecurseCheckCardinality(dChildren, dMinEffectiveTotalRange,
-                                                dMaxEffectiveTotalRange,
-                                                dSGHandler,
-                                                bParticle,bMinOccurs,bMaxOccurs);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_CHOICE:
-              {
-                 checkRecurseLax(dChildren, dMinOccurs, dMaxOccurs, dSGHandler,
-                                 bChildren, bMinOccurs, bMaxOccurs, bSGHandler);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_ALL:
-              case XSParticleDecl.PARTICLE_SEQUENCE:
-              case XSParticleDecl.PARTICLE_ELEMENT:
-              {
-                 throw new XMLSchemaException("cos-particle-restrict.2",
-                                        new Object[]{"choice:all,sequence,elt"});
-              }
-
-              default:
-              {
-                throw new XMLSchemaException("Internal-Error",
-                                             new Object[]{"in particleValidRestriction"});
-              }
-            }
-         }
-
-
-         case XSParticleDecl.PARTICLE_SEQUENCE:
-         {
-            switch (bType) {
-
-              // Choice:Any NSRecurseCheckCardinality
-              case XSParticleDecl.PARTICLE_WILDCARD:
-              {
-                 if (dMinEffectiveTotalRange != OCCURRENCE_UNKNOWN)
-                    dMinEffectiveTotalRange = dParticle.minEffectiveTotalRange();
-                 if (dMaxEffectiveTotalRange != OCCURRENCE_UNKNOWN)
-                    dMaxEffectiveTotalRange = dParticle.maxEffectiveTotalRange();
-
-                 checkNSRecurseCheckCardinality(dChildren, dMinEffectiveTotalRange,
-                                                dMaxEffectiveTotalRange,
-                                                dSGHandler,
-                                                bParticle,bMinOccurs,bMaxOccurs);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_ALL:
-              {
-                 checkRecurseUnordered(dChildren, dMinOccurs, dMaxOccurs, dSGHandler,
-                                       bChildren, bMinOccurs, bMaxOccurs, bSGHandler);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_SEQUENCE:
-              {
-                 checkRecurse(dChildren, dMinOccurs, dMaxOccurs, dSGHandler,
-                              bChildren, bMinOccurs, bMaxOccurs, bSGHandler);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_CHOICE:
-              {
-                 int min1 = dMinOccurs * dChildren.size();
-                 int max1 = (dMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED)?
-                             dMaxOccurs : dMaxOccurs * dChildren.size();
-                 checkMapAndSum(dChildren, min1, max1, dSGHandler,
-                                bChildren, bMinOccurs, bMaxOccurs, bSGHandler);
-                 return;
-              }
-
-              case XSParticleDecl.PARTICLE_ELEMENT:
-              {
-                 throw new XMLSchemaException("cos-particle-restrict.2",
-                                        new Object[]{"seq:elt"});
-              }
-
-              default:
-              {
-                throw new XMLSchemaException("Internal-Error",
-                                             new Object[]{"in particleValidRestriction"});
-              }
-            }
-         }
-
-       }
-    }
-
-    private static void addElementToParticleVector (Vector v, XSElementDecl d)  {
-
-       XSParticleDecl p = new XSParticleDecl();
-       p.fValue = d;
-       p.fType = XSParticleDecl.PARTICLE_ELEMENT;
-       v.addElement(p);
-
-    }
-
-    private static XSParticleDecl getNonUnaryGroup(XSParticleDecl p) {
-
-       if (p.fType == XSParticleDecl.PARTICLE_ELEMENT ||
-           p.fType == XSParticleDecl.PARTICLE_WILDCARD)
-         return p;
-
-       if (p.fMinOccurs==1 && p.fMaxOccurs==1 &&
-           p.fValue!=null && p.fOtherValue==null)
-         return getNonUnaryGroup((XSParticleDecl)p.fValue);
-       else
-         return p;
-    }
-
-    private static Vector removePointlessChildren(XSParticleDecl p)  {
-
-
-       if (p.fType == XSParticleDecl.PARTICLE_ELEMENT ||
-           p.fType == XSParticleDecl.PARTICLE_WILDCARD ||
-           p.fType == XSParticleDecl.PARTICLE_EMPTY)
-         return null;
-
-       Vector children = new Vector();
-
-       gatherChildren(p.fType, (XSParticleDecl)p.fValue, children);
-       if (p.fOtherValue != null) {
-         gatherChildren(p.fType, (XSParticleDecl)p.fOtherValue, children);
-       }
-
-       return children;
-    }
-
-
-    private static void gatherChildren(int parentType, XSParticleDecl p, Vector children) {
-
-       int min = p.fMinOccurs;
-       int max = p.fMaxOccurs;
-       int type = p.fType;
-
-       if (type == XSParticleDecl.PARTICLE_EMPTY)
-          return;
-
-       if (type == XSParticleDecl.PARTICLE_ELEMENT ||
-           type== XSParticleDecl.PARTICLE_WILDCARD) {
-          children.addElement(p);
-          return;
-       }
-
-       XSParticleDecl left = (XSParticleDecl)p.fValue;
-       XSParticleDecl right = (XSParticleDecl)p.fOtherValue;
-       if (! (min==1 && max==1)) {
-          children.addElement(p);
-       }
-       else if (parentType == type) {
-          gatherChildren(type,left,children);
-          if (right != null) {
-            gatherChildren(type,right,children);
-          }
-       }
-       else if (!p.isEmpty()) {
-          children.addElement(p);
-       }
-
-    }
-
-    private static void checkNameAndTypeOK(XSElementDecl dElement, int dMin, int dMax,
-                                           XSElementDecl bElement, int bMin, int bMax)
-                                   throws XMLSchemaException {
-
-
-      //
-      // Check that the names are the same
-      //
-      if (dElement.fName != bElement.fName ||
-          dElement.fTargetNamespace != bElement.fTargetNamespace) {
-          throw new XMLSchemaException(
-              "rcase-NameAndTypeOK.1",new Object[]{dElement.fName,
-               dElement.fTargetNamespace, bElement.fName, bElement.fTargetNamespace});
-      }
-
-      //
-      // Check nillable
-      //
-      if (! (bElement.isNillable() || !dElement.isNillable())) {
-        throw new XMLSchemaException("rcase-NameAndTypeOK.2",
-                                      new Object[]{dElement.fName});
-      }
-
-      //
-      // Check occurrence range
-      //
-      if (!checkOccurrenceRange(dMin, dMax, bMin, bMax)) {
-        throw new XMLSchemaException("rcase-NameAndTypeOK.3",
-                                      new Object[]{dElement.fName});
-      }
-
-      //
-      // Check for consistent fixed values
-      //
-      if (bElement.getConstraintType() == XSElementDecl.FIXED_VALUE) {
-         // derived one has to have a fixed value
-         if (dElement.getConstraintType() != XSElementDecl.FIXED_VALUE) {
-            throw new XMLSchemaException("rcase-NameAndTypeOK.4",
-                                      new Object[]{dElement.fName});
-         }
-
-         // get simple type
-         XSSimpleType dv = null;
-         if (dElement.fType.getXSType() == XSTypeDecl.SIMPLE_TYPE)
-            dv = (XSSimpleType)dElement.fType;
-         else if (((XSComplexTypeDecl)dElement.fType).fContentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE)
-            dv = ((XSComplexTypeDecl)dElement.fType).fXSSimpleType;
-
-         // if there is no simple type, then compare based on string
-         if (dv == null && !bElement.fDefault.normalizedValue.equals(dElement.fDefault.normalizedValue) ||
-             dv != null && !dv.isEqual(bElement.fDefault.actualValue, dElement.fDefault.actualValue)) {
-            throw new XMLSchemaException("rcase-NameAndTypeOK.4",
-                                      new Object[]{dElement.fName});
-         }
-      }
-
-      //
-      // Check identity constraints
-      //
-      checkIDConstraintRestriction(dElement, bElement);
-
-      //
-      // Check for disallowed substitutions
-      //
-      int blockSet1 = dElement.fBlock;
-      int blockSet2 = bElement.fBlock;
-      if (((blockSet1 & blockSet2)!=blockSet2) ||
-            (blockSet1==SchemaSymbols.EMPTY_SET && blockSet2!=SchemaSymbols.EMPTY_SET))
-        throw new XMLSchemaException("rcase-NameAndTypeOK.6",
-                                  new Object[]{dElement.fName});
-
-
-      //
-      // Check that the derived element's type is derived from the base's.
-      //
-      if (!checkTypeDerivationOk(dElement.fType, bElement.fType, bElement.fFinal)) {
-          throw new XMLSchemaException("rcase-NameAndTypeOK.7",
-                                  new Object[]{dElement.fName});
-      }
-
-    }
-
-
-    private static void checkIDConstraintRestriction(XSElementDecl derivedElemDecl,
-                                                     XSElementDecl baseElemDecl)
-                                             throws XMLSchemaException {
-        // TODO
-    } // checkIDConstraintRestriction
-
-
-    private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {
-
-      if ((min1 >= min2) &&
-          ((max2==SchemaSymbols.OCCURRENCE_UNBOUNDED) ||
-           (max1!=SchemaSymbols.OCCURRENCE_UNBOUNDED && max1<=max2)))
-        return true;
-      else
-        return false;
-    }
-
-    private static void checkNSCompat(XSElementDecl elem, int min1, int max1,
-                                      XSWildcardDecl wildcard, int min2, int max2)
-                              throws XMLSchemaException {
-
-      // check Occurrence ranges
-      if (!checkOccurrenceRange(min1,max1,min2,max2)) {
-        throw new XMLSchemaException("rcase-NSCompat.2",
-                                  new Object[]{elem.fName});
-      }
-
-      // check wildcard allows namespace of element
-      if (!wildcard.allowNamespace(elem.fTargetNamespace))  {
-        throw new XMLSchemaException("rcase-NSCompat.1",
-                                  new Object[]{elem.fName,elem.fTargetNamespace});
-      }
-
-    }
-
-    private static void checkNSSubset(XSWildcardDecl dWildcard, int min1, int max1,
-                                      XSWildcardDecl bWildcard, int min2, int max2)
-                              throws XMLSchemaException {
-
-      // check Occurrence ranges
-      if (!checkOccurrenceRange(min1,max1,min2,max2)) {
-        throw new XMLSchemaException("rcase-NSSubset.2",null);
-      }
-
-      // check wildcard subset
-      if (!dWildcard.isSubsetOf(bWildcard)) {
-         throw new XMLSchemaException("rcase-NSSubset.1",null);
-      }
-
-
-    }
-
-
-    private static void checkNSRecurseCheckCardinality(Vector children, int min1, int max1,
-                                          SubstitutionGroupHandler dSGHandler,
-                                          XSParticleDecl wildcard, int min2, int max2)
-                                          throws XMLSchemaException {
-
-
-      // check Occurrence ranges
-      if (!checkOccurrenceRange(min1,max1,min2,max2)) {
-         throw new XMLSchemaException("rcase-NSRecurseCheckCardinality.2", null);
-      }
-
-      // Check that each member of the group is a valid restriction of the wildcard
-      int count = children.size();
-      try {
-        for (int i = 0; i < count; i++) {
-           XSParticleDecl particle1 = (XSParticleDecl)children.elementAt(i);
-           particleValidRestriction(particle1, dSGHandler, wildcard, null);
-
-        }
-      }
-      catch (XMLSchemaException e) {
-         throw new XMLSchemaException("rcase-NSRecurseCheckCardinality.1", null);
-      }
-
-    }
-
-    private static void checkRecurse(Vector dChildren, int min1, int max1,
-                                     SubstitutionGroupHandler dSGHandler,
-                                     Vector bChildren, int min2, int max2,
-                                     SubstitutionGroupHandler bSGHandler)
-                                     throws XMLSchemaException {
-
-      // check Occurrence ranges
-      if (!checkOccurrenceRange(min1,max1,min2,max2)) {
-        throw new XMLSchemaException("rcase-Recurse.1", null);
-      }
-
-      int count1= dChildren.size();
-      int count2= bChildren.size();
-
-      int current = 0;
-      label: for (int i = 0; i<count1; i++) {
-
-        XSParticleDecl particle1 = (XSParticleDecl)dChildren.elementAt(i);
-        for (int j = current; j<count2; j++) {
-           XSParticleDecl particle2 = (XSParticleDecl)bChildren.elementAt(j);
-           current +=1;
-           try {
-             particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);
-             continue label;
-           }
-           catch (XMLSchemaException e) {
-             if (!particle2.emptiable())
-                throw new XMLSchemaException("rcase-Recurse.2", null);
-           }
-        }
-        throw new XMLSchemaException("rcase-Recurse.2", null);
-      }
-
-      // Now, see if there are some elements in the base we didn't match up
-      for (int j=current; j < count2; j++) {
-        XSParticleDecl particle2 = (XSParticleDecl)bChildren.elementAt(j);
-        if (!particle2.emptiable()) {
-          throw new XMLSchemaException("rcase-Recurse.2", null);
-        }
-      }
-
-    }
-
-    private static void checkRecurseUnordered(Vector dChildren, int min1, int max1,
-                                       SubstitutionGroupHandler dSGHandler,
-                                       Vector bChildren, int min2, int max2,
-                                       SubstitutionGroupHandler bSGHandler)
-                                       throws XMLSchemaException {
-
-
-      // check Occurrence ranges
-      if (!checkOccurrenceRange(min1,max1,min2,max2)) {
-        throw new XMLSchemaException("rcase-RecurseUnordered.1", null);
-      }
-
-      int count1= dChildren.size();
-      int count2 = bChildren.size();
-
-      boolean foundIt[] = new boolean[count2];
-
-      label: for (int i = 0; i<count1; i++) {
-        XSParticleDecl particle1 = (XSParticleDecl)dChildren.elementAt(i);
-
-        for (int j = 0; j<count2; j++) {
-           XSParticleDecl particle2 = (XSParticleDecl)bChildren.elementAt(j);
-           try {
-             particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);
-             if (foundIt[j])
-                throw new XMLSchemaException("rcase-RecurseUnordered.2", null);
-             else
-                foundIt[j]=true;
-
-             continue label;
-           }
-           catch (XMLSchemaException e) {
-           }
-        }
-        // didn't find a match.  Detect an error
-        throw new XMLSchemaException("rcase-RecurseUnordered.2", null);
-      }
-
-      // Now, see if there are some elements in the base we didn't match up
-      for (int j=0; j < count2; j++) {
-        XSParticleDecl particle2 = (XSParticleDecl)bChildren.elementAt(j);
-        if (!foundIt[j] && !particle2.emptiable()) {
-          throw new XMLSchemaException("rcase-RecurseUnordered.2", null);
-        }
-      }
-
-    }
-
-    private static void checkRecurseLax(Vector dChildren, int min1, int max1,
-                                       SubstitutionGroupHandler dSGHandler,
-                                       Vector bChildren, int min2, int max2,
-                                       SubstitutionGroupHandler  bSGHandler)
-                                       throws XMLSchemaException {
-
-      // check Occurrence ranges
-      if (!checkOccurrenceRange(min1,max1,min2,max2)) {
-        throw new XMLSchemaException("rcase-RecurseLax.1", null);
-      }
-
-      int count1= dChildren.size();
-      int count2 = bChildren.size();
-
-      int current = 0;
-      label: for (int i = 0; i<count1; i++) {
-
-        XSParticleDecl particle1 = (XSParticleDecl)dChildren.elementAt(i);
-        for (int j = current; j<count2; j++) {
-           XSParticleDecl particle2 = (XSParticleDecl)bChildren.elementAt(j);
-           current +=1;
-           try {
-             particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);
-             continue label;
-           }
-           catch (XMLSchemaException e) {
-           }
-        }
-        // didn't find a match.  Detect an error
-        throw new XMLSchemaException("rcase-RecurseLax.2", null);
-
-      }
-
-    }
-
-    private static void checkMapAndSum(Vector dChildren, int min1, int max1,
-                                       SubstitutionGroupHandler dSGHandler,
-                                       Vector bChildren, int min2, int max2,
-                                       SubstitutionGroupHandler bSGHandler)
-                                       throws XMLSchemaException {
-
-      // See if the sequence group is a valid restriction of the choice
-
-      // Here is an example of a valid restriction:
-      //   <choice minOccurs="2">
-      //       <a/>
-      //       <b/>
-      //       <c/>
-      //   </choice>
-      //
-      //   <sequence>
-      //        <b/>
-      //        <a/>
-      //   </sequence>
-
-      // check Occurrence ranges
-      if (!checkOccurrenceRange(min1,max1,min2,max2)) {
-        throw new XMLSchemaException("rcase-MapAndSum.2", null);
-      }
-
-      int count1 = dChildren.size();
-      int count2 = bChildren.size();
-
-      label: for (int i = 0; i<count1; i++) {
-
-        XSParticleDecl particle1 = (XSParticleDecl)dChildren.elementAt(i);
-        for (int j = 0; j<count2; j++) {
-           XSParticleDecl particle2 = (XSParticleDecl)bChildren.elementAt(j);
-           try {
-             particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);
-             continue label;
-           }
-           catch (XMLSchemaException e) {
-           }
-        }
-        // didn't find a match.  Detect an error
-        throw new XMLSchemaException("rcase-MapAndSum.1", null);
-      }
-    }
-    // to check whether two element overlap, as defined in constraint UPA
-    public static boolean overlapUPA(XSElementDecl element1,
-                                     XSElementDecl element2,
-                                     SubstitutionGroupHandler sgHandler) {
-        // if the two element have the same name and namespace,
-        if (element1.fName == element2.fName &&
-            element1.fTargetNamespace == element2.fTargetNamespace) {
-            return true;
-        }
-
-        // or if there is an element decl in element1's substitution group,
-        // who has the same name/namespace with element2
-        XSElementDecl[] subGroup = sgHandler.getSubstitutionGroup(element1);
-        for (int i = subGroup.length-1; i >= 0; i--) {
-            if (subGroup[i].fName == element2.fName &&
-                subGroup[i].fTargetNamespace == element2.fTargetNamespace) {
-                return true;
-            }
-        }
-
-        // or if there is an element decl in element2's substitution group,
-        // who has the same name/namespace with element1
-        subGroup = sgHandler.getSubstitutionGroup(element2);
-        for (int i = subGroup.length-1; i >= 0; i--) {
-            if (subGroup[i].fName == element1.fName &&
-                subGroup[i].fTargetNamespace == element1.fTargetNamespace) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    // to check whether an element overlaps with a wildcard,
-    // as defined in constraint UPA
-    public static boolean overlapUPA(XSElementDecl element,
-                                     XSWildcardDecl wildcard,
-                                     SubstitutionGroupHandler sgHandler) {
-        // if the wildcard allows the element
-        if (wildcard.allowNamespace(element.fTargetNamespace))
-            return true;
-
-        // or if the wildcard allows any element in the substitution group
-        XSElementDecl[] subGroup = sgHandler.getSubstitutionGroup(element);
-        for (int i = subGroup.length-1; i >= 0; i--) {
-            if (wildcard.allowNamespace(subGroup[i].fTargetNamespace))
-                return true;
-        }
-
-        return false;
-    }
-
-    public static boolean overlapUPA(XSWildcardDecl wildcard1,
-                                     XSWildcardDecl wildcard2) {
-        // if the intersection of the two wildcard is not empty list
-        XSWildcardDecl intersect = wildcard1.performIntersectionWith(wildcard2, wildcard1.fProcessContents);
-        if (intersect == null ||
-            intersect.fType != XSWildcardDecl.WILDCARD_LIST ||
-            intersect.fNamespaceList.length != 0) {
-            return true;
-        }
-
-        return false;
-    }
-
-    // call one of the above methods according to the type of decls
-    public static boolean overlapUPA(Object decl1, Object decl2,
-                                     SubstitutionGroupHandler sgHandler) {
-        if (decl1 instanceof XSElementDecl) {
-            if (decl2 instanceof XSElementDecl) {
-                return overlapUPA((XSElementDecl)decl1,
-                                  (XSElementDecl)decl2,
-                                  sgHandler);
-            } else {
-                return overlapUPA((XSElementDecl)decl1,
-                                  (XSWildcardDecl)decl2,
-                                  sgHandler);
-            }
-        } else {
-            if (decl2 instanceof XSElementDecl) {
-                return overlapUPA((XSElementDecl)decl2,
-                                  (XSWildcardDecl)decl1,
-                                  sgHandler);
-            } else {
-                return overlapUPA((XSWildcardDecl)decl1,
-                                  (XSWildcardDecl)decl2);
-            }
-        }
-    }
-
-} // class XSContraints
diff --git a/src/org/apache/xerces/impl/xs/XSDeclarationPool.java b/src/org/apache/xerces/impl/xs/XSDeclarationPool.java
deleted file mode 100644
index b2eb8f3..0000000
--- a/src/org/apache/xerces/impl/xs/XSDeclarationPool.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-/**
- * This class is pool that enables caching of XML Schema declaration objects.
- * Before a compiled grammar object is garbage collected,
- * the implementation will add all XML Schema component
- * declarations to the pool.
- * Note: The cashing mechanism is not implemented yet.
- * 
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public final class XSDeclarationPool {
-
-    public final  XSElementDecl getElementDecl(){
-        return new XSElementDecl();
-
-    }
-
-    public final XSAttributeDecl getAttributeDecl(){
-        return new XSAttributeDecl();
-
-    }
-
-    public final XSAttributeUse getAttributeUse(){
-        return new XSAttributeUse();
-
-    }
-    
-    public final XSComplexTypeDecl getComplexTypeDecl(){
-        return new XSComplexTypeDecl();
-
-    }
-
-    public final XSParticleDecl getParticleDecl(){
-        return new XSParticleDecl();
-
-    }
-
-    // REVISIT: add method getSimpleTypeDecl
-
-    // REVISIT: add methods for adding decls to the pool.
-
-}
diff --git a/src/org/apache/xerces/impl/xs/XSElementDecl.java b/src/org/apache/xerces/impl/xs/XSElementDecl.java
deleted file mode 100644
index 373cf25..0000000
--- a/src/org/apache/xerces/impl/xs/XSElementDecl.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.impl.xs.identity.IdentityConstraint;
-import org.apache.xerces.impl.dv.ValidatedInfo;
-
-/**
- * The XML representation for an element declaration
- * schema component is an <element> element information item
- *
- * @author Elena Litani, IBM
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class XSElementDecl {
-
-    // types of value constraint
-    public final static short     NO_CONSTRAINT       = 0;
-    public final static short     DEFAULT_VALUE       = 1;
-    public final static short     FIXED_VALUE         = 2;
-
-    // name of the element
-    public String fName = null;
-    // target namespace of the element
-    public String fTargetNamespace = null;
-    // type of the element
-    public XSTypeDecl fType = null;
-    // misc flag of the element: nillable/abstract/fixed
-    short fMiscFlags = 0;
-    // block set (disallowed substitutions) of the element
-    public short fBlock = SchemaSymbols.EMPTY_SET;
-    // final set (substitution group exclusions) of the element
-    public short fFinal = SchemaSymbols.EMPTY_SET;
-    // value constraint value
-    public ValidatedInfo fDefault = null;
-    // the substitution group affiliation of the element
-    public XSElementDecl fSubGroup = null;
-    // identity constraints
-    static final int INITIAL_SIZE = 2;
-    int fIDCPos = 0;
-    IdentityConstraint[] fIDConstraints = new IdentityConstraint[INITIAL_SIZE];
-
-    private static final short CONSTRAINT_MASK = 3;
-    private static final short NILLABLE        = 4;
-    private static final short ABSTRACT        = 8;
-    private static final short GLOBAL          = 16;
-
-    // methods to get/set misc flag
-
-    public short getConstraintType() {
-        return (short)(fMiscFlags & CONSTRAINT_MASK);
-    }
-    public boolean isNillable() {
-        return ((fMiscFlags & NILLABLE) != 0);
-    }
-    public boolean isAbstract() {
-        return ((fMiscFlags & ABSTRACT) != 0);
-    }
-    public boolean isGlobal() {
-        return ((fMiscFlags & GLOBAL) != 0);
-    }
-
-    public void setConstraintType(short constraintType) {
-        // first clear the bits
-        fMiscFlags ^= (fMiscFlags & CONSTRAINT_MASK);
-        // then set the proper one
-        fMiscFlags |= (constraintType & CONSTRAINT_MASK);
-    }
-    public void setIsNillable() {
-        fMiscFlags |= NILLABLE;
-    }
-    public void setIsAbstract() {
-        fMiscFlags |= ABSTRACT;
-    }
-    public void setIsGlobal() {
-        fMiscFlags |= GLOBAL;
-    }
-
-    public void addIDConstaint(IdentityConstraint idc) {
-        if (fIDCPos == fIDConstraints.length) {
-            fIDConstraints = resize(fIDConstraints, fIDCPos*2);
-        }
-        fIDConstraints[fIDCPos++] = idc;
-    }
-
-    public IdentityConstraint[] getIDConstraints() {
-        if (fIDCPos < fIDConstraints.length) {
-            fIDConstraints = resize(fIDConstraints, fIDCPos);
-        }
-        return fIDConstraints;
-    }
-
-    static final IdentityConstraint[] resize(IdentityConstraint[] oldArray, int newSize) {
-        IdentityConstraint[] newArray = new IdentityConstraint[newSize];
-        System.arraycopy(oldArray, 0, newArray, 0, Math.min(oldArray.length, newSize));
-        return newArray;
-    }
-
-    /**
-     * get the string description of this element
-     */
-    private String fDescription = null;
-    public String toString() {
-        if (fDescription == null) {
-            StringBuffer buffer = new StringBuffer();
-            buffer.append("\"");
-            if (fTargetNamespace != null)
-                buffer.append(fTargetNamespace);
-            buffer.append("\"");
-            buffer.append(":");
-            buffer.append(fName);
-            fDescription = buffer.toString();
-        }
-        return fDescription;
-    }
-
-    /**
-     * get the hash code
-     */
-    public int hashCode() {
-        int code = fName.hashCode();
-        if (fTargetNamespace != null)
-            code = (code<<16)+fTargetNamespace.hashCode();
-        return code;
-    }
-
-    /**
-     * whether two decls are the same
-     */
-    public boolean equals(Object o) {
-        return o == this;
-    }
-} // class XMLElementDecl
diff --git a/src/org/apache/xerces/impl/xs/XSGrammarResolver.java b/src/org/apache/xerces/impl/xs/XSGrammarResolver.java
deleted file mode 100644
index ed3ffb2..0000000
--- a/src/org/apache/xerces/impl/xs/XSGrammarResolver.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-/**
- * A class used to hold the internal schema grammar set for the current instance
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class XSGrammarResolver {
-
-    // Data
-
-    /**
-     * Hashtable that maps between Namespace and a Grammar
-     */
-    private Hashtable fGrammarRegistry = new Hashtable();
-    private SchemaGrammar fNoNSGrammar = null;
-
-    /**
-     * Get the schema grammar for the specified namespace
-     *
-     * @param namespace
-     * @return SchemaGrammar associated with the namespace
-     */
-    public SchemaGrammar getGrammar(String namespace) {
-        if (namespace == null)
-            return fNoNSGrammar;
-        return (SchemaGrammar)fGrammarRegistry.get(namespace);
-    }
-
-    /**
-     * put a schema grammar into the registry
-     *
-     * @param grammar   the grammar to put in the registry
-     */
-    public void putGrammar(SchemaGrammar grammar) {
-        if (grammar.getTargetNamespace() == null)
-            fNoNSGrammar = grammar;
-        else
-            fGrammarRegistry.put(grammar.getTargetNamespace(), grammar);
-    }
-
-    /**
-     * put a schema grammar into the registry
-     * this method is for the grammar of schema namespace:
-     * the namespace in the grammar is not added into the current symbol table,
-     * so we provide the namespace, which is from the current symbol table.
-     *
-     * @param namespace the namespace of this grammar
-     * @param grammar   the grammar to put in the registry
-     */
-    public void putGrammar(String namespace, SchemaGrammar grammar) {
-        if (namespace == null)
-            fNoNSGrammar = grammar;
-        else
-            fGrammarRegistry.put(namespace, grammar);
-    }
-
-    /**
-     * get all grammars in the registry
-     *
-     * @return an array of SchemaGrammars.
-     */
-    public SchemaGrammar[] getGrammars() {
-        // get the number of grammars
-        int count = fGrammarRegistry.size() + (fNoNSGrammar==null ? 0 : 1);
-        SchemaGrammar[] grammars = new SchemaGrammar[count];
-        // get grammars with target namespace
-        Enumeration enum = fGrammarRegistry.elements();
-        int i = 0;
-        while (enum.hasMoreElements())
-            grammars[i++] = (SchemaGrammar)enum.nextElement();
-        // add the grammar without target namespace, if any
-        if (fNoNSGrammar != null)
-            grammars[count-1] = fNoNSGrammar;
-        return grammars;
-    }
-
-    /**
-     * Clear the registry.
-     * REVISIT: update to use another XMLGrammarResolver
-     */
-    public void reset() {
-        fNoNSGrammar = null;
-        fGrammarRegistry.clear();
-    }
-
-} // class XSGrammarResolver
diff --git a/src/org/apache/xerces/impl/xs/XSGroupDecl.java b/src/org/apache/xerces/impl/xs/XSGroupDecl.java
deleted file mode 100644
index f065929..0000000
--- a/src/org/apache/xerces/impl/xs/XSGroupDecl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-/**
- * The XML representation for a group declaration
- * schema component is a global <group> element information item
- *
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class XSGroupDecl {
-
-    // name of the group
-    public String fName = null;
-    // target namespace of the group
-    public String fTargetNamespace = null;
-    // particle of the group
-    public XSParticleDecl fParticle = null;
-
-} // class XSGroupDecl
diff --git a/src/org/apache/xerces/impl/xs/XSMessageFormatter.java b/src/org/apache/xerces/impl/xs/XSMessageFormatter.java
deleted file mode 100644
index 29f05b9..0000000
--- a/src/org/apache/xerces/impl/xs/XSMessageFormatter.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-import java.util.PropertyResourceBundle;
-import org.apache.xerces.util.MessageFormatter;
-
-
-/**
- * SchemaMessageProvider implements an XMLMessageProvider that
- * provides localizable error messages for the W3C XML Schema Language
- * 
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public class XSMessageFormatter implements MessageFormatter {
-    /**
-     * The domain of messages concerning the XML Schema: Structures specification.
-     */
-    public static final String SCHEMA_DOMAIN = "http://www.w3.org/TR/xml-schema-1";
-
-
-    // private objects to cache the locale and resource bundle
-    private Locale fLocale = null;
-    private ResourceBundle fResourceBundle = null;
-
-    /**
-     * Formats a message with the specified arguments using the given
-     * locale information.
-     * 
-     * @param locale    The locale of the message.
-     * @param key       The message key.
-     * @param arguments The message replacement text arguments. The order
-     *                  of the arguments must match that of the placeholders
-     *                  in the actual message.
-     * 
-     * @return Returns the formatted message.
-     *
-     * @throws MissingResourceException Thrown if the message with the
-     *                                  specified key cannot be found.
-     */
-     public String formatMessage(Locale locale, String key, Object[] arguments)
-        throws MissingResourceException {
-        
-        if (fResourceBundle == null || locale != fLocale) {
-            if (locale != null) {
-                fResourceBundle = PropertyResourceBundle.getBundle("org.apache.xerces.impl.msg.XMLSchemaMessages", locale);
-                // memorize the most-recent locale
-                fLocale = locale;
-            }
-            if (fResourceBundle == null)
-                fResourceBundle = PropertyResourceBundle.getBundle("org.apache.xerces.impl.msg.XMLSchemaMessages");
-        }
-        
-        String msg = fResourceBundle.getString(key);
-        if (arguments != null) {
-            try {
-                msg = java.text.MessageFormat.format(msg, arguments);
-            } catch (Exception e) {
-                msg = fResourceBundle.getString("FormatFailed");
-                msg += " " + fResourceBundle.getString(key);
-            }
-        } 
-
-        if (msg == null) {
-            msg = fResourceBundle.getString("BadMessageKey");
-            throw new MissingResourceException(msg, "org.apache.xerces.impl.msg.SchemaMessages", key);
-        }
-
-        return msg;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/XSNotationDecl.java b/src/org/apache/xerces/impl/xs/XSNotationDecl.java
deleted file mode 100644
index 49df05c..0000000
--- a/src/org/apache/xerces/impl/xs/XSNotationDecl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-/**
- * The XML representation for a NOTATION declaration
- * schema component is a global <notation> element information item
- *
- * @author Rahul Srivastava, Sun Microsystems Inc.
- * @version $Id$
- */
-public class XSNotationDecl {
-
-    // name of the group
-    public String fName = null;
-    // target namespace of the group
-    public String fTargetNamespace = null;
-    // public id of the notation
-    public String fPublicId = null;
-    // system id of the notation
-    public String fSystemId = null;
-
-} // class XSNotationDecl
diff --git a/src/org/apache/xerces/impl/xs/XSParticleDecl.java b/src/org/apache/xerces/impl/xs/XSParticleDecl.java
deleted file mode 100644
index c7490a9..0000000
--- a/src/org/apache/xerces/impl/xs/XSParticleDecl.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * RedifBufferibution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. RedifBuffeributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. RedifBuffeributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    difBufferibution.
- *
- * 3. The end-user documentation included with the redifBufferibution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-/**
- * Store schema particle declaration.
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-public class XSParticleDecl {
-
-    // types of particles
-    public static final short PARTICLE_EMPTY        = 0;
-    public static final short PARTICLE_ELEMENT      = 1;
-    public static final short PARTICLE_WILDCARD     = 2;
-    public static final short PARTICLE_CHOICE       = 3;
-    public static final short PARTICLE_SEQUENCE     = 4;
-    public static final short PARTICLE_ALL          = 5;
-    public static final short PARTICLE_ZERO_OR_ONE  = 6;
-    public static final short PARTICLE_ZERO_OR_MORE = 7;
-    public static final short PARTICLE_ONE_OR_MORE  = 8;
-
-    // type of the particle
-    public short fType = PARTICLE_EMPTY;
-    // left-hand value of the particle
-    // for PARTICLE_ELEMENT : the element decl
-    // for PARTICLE_WILDCARD: the wildcard decl
-    // for PARTICLE_CHOICE/SEQUENCE/ALL: the particle of the first child
-    // for PARTICLE_?*+: the child particle
-    public Object fValue = null;
-    // for PARTICLE_CHOICE/SEQUENCE/ALL: the particle of the other child
-    public Object fOtherValue = null;
-    // minimum occurrence of this particle
-    public int fMinOccurs = 1;
-    // maximum occurrence of this particle
-    public int fMaxOccurs = 1;
-
-    /**
-     * 3.9.6 Schema Component Constraint: Particle Emptiable
-     * whether this particle is emptible
-     */
-    public boolean emptiable() {
-        return minEffectiveTotalRange() == 0;
-    }
-
-    public boolean isEmpty() {
-        if (fType==PARTICLE_ELEMENT || fType==PARTICLE_WILDCARD) return false; 
-
-        if (fType==PARTICLE_EMPTY) return true; 
-        
-        boolean leftIsEmpty  = (fValue==null || ((XSParticleDecl)fValue).isEmpty());
-        boolean rightIsEmpty  = (fOtherValue==null || 
-                                 ((XSParticleDecl)fOtherValue).isEmpty());
-
-        return (leftIsEmpty && rightIsEmpty) ;
-    }
-
-    /**
-     * 3.8.6 Effective Total Range (all and sequence) and
-     *       Effective Total Range (choice)
-     * The following methods are used to return min/max range for a particle.
-     * They are not exactly the same as it's described in the spec, but all the
-     * values from the spec are retrievable by these methods.
-     */
-    public int minEffectiveTotalRange() {
-        switch (fType) {
-        case PARTICLE_ALL:
-        case PARTICLE_SEQUENCE:
-            return minEffectiveTotalRangeAllSeq();
-        case PARTICLE_CHOICE:
-            return minEffectiveTotalRangeChoice();
-        default:
-            return fMinOccurs;
-        }
-    }
-
-    private int minEffectiveTotalRangeAllSeq() {
-        int fromLeft = ((XSParticleDecl)fValue).minEffectiveTotalRange();
-        if (fOtherValue != null)
-            fromLeft += ((XSParticleDecl)fOtherValue).minEffectiveTotalRange();
-        return fMinOccurs * fromLeft;
-    }
-
-    private int minEffectiveTotalRangeChoice() {
-        int fromLeft = ((XSParticleDecl)fValue).minEffectiveTotalRange();
-        if (fOtherValue != null) {
-            int fromRight = ((XSParticleDecl)fOtherValue).minEffectiveTotalRange();
-            if (fromRight < fromLeft)
-                fromLeft = fromRight;
-        }
-        return fMinOccurs * fromLeft;
-    }
-
-    public int maxEffectiveTotalRange() {
-        switch (fType) {
-        case PARTICLE_ALL:
-        case PARTICLE_SEQUENCE:
-            return maxEffectiveTotalRangeAllSeq();
-        case PARTICLE_CHOICE:
-            return maxEffectiveTotalRangeChoice();
-        default:
-            return fMaxOccurs;
-        }
-    }
-
-    private int maxEffectiveTotalRangeAllSeq() {
-        int fromLeft = ((XSParticleDecl)fValue).maxEffectiveTotalRange();
-        if (fromLeft == SchemaSymbols.OCCURRENCE_UNBOUNDED)
-            return SchemaSymbols.OCCURRENCE_UNBOUNDED;
-        if (fOtherValue != null) {
-            int fromRight = ((XSParticleDecl)fValue).maxEffectiveTotalRange();
-            if (fromRight == SchemaSymbols.OCCURRENCE_UNBOUNDED)
-                return SchemaSymbols.OCCURRENCE_UNBOUNDED;
-            fromLeft += fromRight;
-        }
-
-        if (fromLeft != 0 && fMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED)
-            return SchemaSymbols.OCCURRENCE_UNBOUNDED;
-
-        return fMaxOccurs * fromLeft;
-    }
-
-    private int maxEffectiveTotalRangeChoice() {
-        int fromLeft = ((XSParticleDecl)fValue).maxEffectiveTotalRange();
-        if (fromLeft == SchemaSymbols.OCCURRENCE_UNBOUNDED)
-            return SchemaSymbols.OCCURRENCE_UNBOUNDED;
-        if (fOtherValue != null) {
-            int fromRight = ((XSParticleDecl)fValue).maxEffectiveTotalRange();
-            if (fromRight == SchemaSymbols.OCCURRENCE_UNBOUNDED)
-                return SchemaSymbols.OCCURRENCE_UNBOUNDED;
-            if (fromRight < fromLeft)
-                fromLeft = fromRight;
-        }
-
-        if (fromLeft != 0 && fMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED)
-            return SchemaSymbols.OCCURRENCE_UNBOUNDED;
-
-        return fMaxOccurs * fromLeft;
-    }
-
-    /**
-     * get the string description of this particle
-     */
-    private String fDescription = null;
-    public String toString() {
-        if (fDescription == null) {
-            StringBuffer buffer = new StringBuffer();
-            appendParticle(buffer);
-            // REVISIT: what would be the best form?
-            // how to output "unbounded"?
-            if (!(fMinOccurs == 0 && fMaxOccurs == 0 ||
-                  fMinOccurs == 1 && fMaxOccurs == 1)) {
-                buffer.append("{" + fMinOccurs);
-                if (fMaxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED)
-                    buffer.append("-UNBOUNDED");
-                else if (fMinOccurs != fMaxOccurs)
-                    buffer.append("-" + fMaxOccurs);
-                buffer.append("}");
-            }
-            fDescription = buffer.toString();
-        }
-        return fDescription;
-    }
-
-    /**
-     * append the string description of this particle to the string buffer
-     * this is for error message.
-     */
-    void appendParticle(StringBuffer fBuffer) {
-        switch (fType) {
-        case PARTICLE_EMPTY:
-            fBuffer.append("EMPTY");
-            break;
-        case PARTICLE_ELEMENT:
-        case PARTICLE_WILDCARD:
-            fBuffer.append('(');
-            fBuffer.append(fValue.toString());
-            fBuffer.append(')');
-            break;
-        case PARTICLE_CHOICE:
-        case PARTICLE_SEQUENCE:
-        case PARTICLE_ALL:
-            if (fOtherValue == null) {
-                fBuffer.append(fValue.toString());
-            } else {
-                if (fType == PARTICLE_ALL)
-                    fBuffer.append("all(");
-                else
-                    fBuffer.append('(');
-                fBuffer.append(fValue.toString());
-                if (fType == PARTICLE_CHOICE)
-                    fBuffer.append('|');
-                else
-                    fBuffer.append(',');
-                fBuffer.append(fOtherValue.toString());
-                fBuffer.append(')');
-            }
-            break;
-        }
-    }
-} // class XSParticle
diff --git a/src/org/apache/xerces/impl/xs/XSTypeDecl.java b/src/org/apache/xerces/impl/xs/XSTypeDecl.java
deleted file mode 100644
index e120a44..0000000
--- a/src/org/apache/xerces/impl/xs/XSTypeDecl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-/**
- * The XML representation for a type declaration
- * schema component is a <simpleType> or <complexType> element information item
- *
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public interface XSTypeDecl {
-
-    public static final short COMPLEX_TYPE   = 1;
-    public static final short SIMPLE_TYPE    = 2;
-
-    public short getXSType();
-    public String getTypeName();
-    public String getTargetNamespace();
-    public XSTypeDecl getBaseType();
-    public short getFinalSet();
-    public boolean isAnonymous();
-
-}
diff --git a/src/org/apache/xerces/impl/xs/XSWildcardDecl.java b/src/org/apache/xerces/impl/xs/XSWildcardDecl.java
deleted file mode 100644
index a18d3ef..0000000
--- a/src/org/apache/xerces/impl/xs/XSWildcardDecl.java
+++ /dev/null
@@ -1,549 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs;
-
-import org.apache.xerces.xni.QName;
-import java.util.Vector;
-
-
-/**
- * The XML representation for a wildcard declaration
- * schema component is an <any> or <anyAttribute> element information item
- *
- * @author Sandy Gao, IBM
- * @author Rahul Srivastava, Sun Microsystems Inc.
- *
- * @version $Id$
- */
-public class XSWildcardDecl  {
-
-    //REVISIT: Should this be here. Is this required at all.
-    public static final String ABSENT = null;
-
-    // types of wildcard
-    // namespace="##any"
-    public static final short WILDCARD_ANY   = 0;
-    // namespace="##other"
-    public static final short WILDCARD_OTHER = 1;
-    // namespace= (list of (anyURI | ##targetNamespace | ##local))
-    public static final short WILDCARD_LIST  = 2;
-
-    // types of process contents
-    // processContents="strict"
-    public static final short WILDCARD_STRICT = 0;
-    // processContents="lax"
-    public static final short WILDCARD_LAX    = 1;
-    // processContents="skip"
-    public static final short WILDCARD_SKIP   = 2;
-
-    // the type of wildcard: any, other, or list
-    public short fType = WILDCARD_ANY;
-    // the type of process contents: strict, lax, or skip
-    public short fProcessContents = WILDCARD_STRICT;
-    // the namespace list:
-    // for WILDCARD_LIST, it means one of the namespaces in the list
-    // for WILDCARD_OTHER, it means not any of the namespaces in the list
-    public String[] fNamespaceList;
-
-    // I'm trying to implement the following constraint exactly as what the
-    // spec describes. Sometimes it seems redundant, and sometimes there seems
-    // to be much easier solutions. But it makes it easy to understand,
-    // easy to maintain, and easy to find a bug (either in the code, or in the
-    // spec). -SG
-    //
-    // NOTE: Schema spec only requires that ##other not(tNS,absent).
-    //       The way we store ##other is not(NS1,NS2,...,NSN), which covers
-    //       what's required by Schema, and allows future enhanced features.
-    //
-    // In the following in-line comments:
-    // - Bullet removed from w3c specification.
-    // + Bullet added as proposed by Sandy Gao, IBM.
-    // / Since we store ##other as not(NS1,NS2,...,NSN), we need to put some
-    //   comments on where we didn't follow the spec exactly.
-    // * When we really support not(NS1,NS2,...,NSN), we need to revisit these items.
-
-    /**
-     * Validation Rule: Wildcard allows Namespace Name
-     */
-    public boolean allowNamespace(String namespace) {
-        // For a value which is either a namespace name or absent to be valid with respect to a wildcard constraint (the value of a {namespace constraint}) one of the following must be true:
-
-        // 1 The constraint must be any.
-        if (fType == WILDCARD_ANY)
-            return true;
-
-        // 2 All of the following must be true:
-        // 2.1 The constraint is a pair of not and a namespace name or absent ([Definition:]  call this the namespace test).
-        // 2.2 The value must not be identical to the namespace test.
-        // 2.3 The value must not be absent.
-        // / we store ##other as not(list), so our actual rule is
-        // / 2 The constraint is a pair of not and a set, and the value is not in such set.
-        if (fType == WILDCARD_OTHER) {
-            boolean found = false;
-            int listNum = fNamespaceList.length;
-            for (int i = 0; i < listNum && !found; i++) {
-                if (namespace == fNamespaceList[i])
-                    found = true;
-            }
-
-            if (!found)
-                return true;
-        }
-
-        // 3 The constraint is a set, and the value is identical to one of the members of the set.
-        if (fType == WILDCARD_LIST) {
-            int listNum = fNamespaceList.length;
-            for (int i = 0; i < listNum; i++) {
-                if (namespace == fNamespaceList[i])
-                    return true;
-            }
-        }
-
-        // none of the above conditions applied, so return false.
-        return false;
-    }
-
-    /**
-     *  Schema Component Constraint: Wildcard Subset
-     */
-    public boolean isSubsetOf(XSWildcardDecl superWildcard) {
-        // if the super is null (not expressible), return false
-        if (superWildcard == null)
-            return false;
-
-        // For a namespace constraint (call it sub) to be an intensional subset of another
-        // namespace constraint (call it super) one of the following must be true:
-
-        // 1 super must be any.
-        if (superWildcard.fType == WILDCARD_ANY) {
-            return true;
-        }
-
-        // 2 All of the following must be true:
-        //   2.1 sub must be a pair of not and a namespace name or absent.
-        //   2.2 super must be a pair of not and the same value.
-        //   * we can't just compare whether the namespace are the same value
-        //     since we store other as not(list)
-        if (fType == WILDCARD_OTHER) {
-            if (superWildcard.fType == WILDCARD_OTHER &&
-                fNamespaceList[0] == superWildcard.fNamespaceList[0]) {
-                return true;
-            }
-        }
-
-        // 3 All of the following must be true:
-        //   3.1 sub must be a set whose members are either namespace names or absent.
-        //   3.2 One of the following must be true:
-        //       3.2.1 super must be the same set or a superset thereof.
-        //       -3.2.2 super must be a pair of not and a namespace name or absent and
-        //              that value must not be in sub's set.
-        //       +3.2.2 super must be a pair of not and a namespace name or absent and
-        //              either that value or absent must not be in sub's set.
-        //       * since we store ##other as not(list), we acturally need to make sure
-        //         that none of the namespaces in super.list is in sub.list.
-        if (fType == WILDCARD_LIST) {
-            if (superWildcard.fType == WILDCARD_LIST &&
-                subset2sets(fNamespaceList, superWildcard.fNamespaceList)) {
-                return true;
-            }
-
-            if (superWildcard.fType == WILDCARD_OTHER &&
-                !elementInSet(superWildcard.fNamespaceList[0], fNamespaceList) &&
-                !elementInSet(ABSENT, fNamespaceList)) {
-                return true;
-            }
-        }
-
-        // none of the above conditions applied, so return false.
-        return false;
-
-    } // isSubsetOf
-
-    /**
-     * Schema Component Constraint: Attribute Wildcard Union
-     */
-    public XSWildcardDecl performUnionWith(XSWildcardDecl wildcard,
-                                           short processContents) {
-        // if the other wildcard is not expressible, the result is still not expressible
-        if (wildcard == null)
-            return null;
-
-        // For a wildcard's {namespace constraint} value to be the intensional union of two
-        // other such values (call them O1 and O2): the appropriate case among the following
-        // must be true:
-
-        XSWildcardDecl unionWildcard = new XSWildcardDecl();
-        unionWildcard.fProcessContents = processContents;
-
-        // 1 If O1 and O2 are the same value, then that value must be the value.
-        if (areSame(wildcard)) {
-            unionWildcard.fType = fType;
-            unionWildcard.fNamespaceList = fNamespaceList;
-        }
-
-        // 2 If either O1 or O2 is any, then any must be the value.
-        else if ( (fType == WILDCARD_ANY) || (wildcard.fType == WILDCARD_ANY) ) {
-            unionWildcard.fType = WILDCARD_ANY;
-        }
-
-        // 3 If both O1 and O2 are sets of (namespace names or absent), then the union of
-        //   those sets must be the value.
-        else if ( (fType == WILDCARD_LIST) && (wildcard.fType == WILDCARD_LIST) ) {
-            unionWildcard.fType = WILDCARD_LIST;
-            unionWildcard.fNamespaceList = union2sets(fNamespaceList, wildcard.fNamespaceList);
-        }
-
-        // -4 If the two are negations of different namespace names, then the intersection
-        //    is not expressible.
-        // +4 If the two are negations of different namespace names or absent, then
-        //    a pair of not and absent must be the value.
-        // * now we store ##other as not(list), the result should be
-        //   not(intersection of two lists).
-        else if (fType == WILDCARD_OTHER && wildcard.fType == WILDCARD_OTHER) {
-            unionWildcard.fType = WILDCARD_OTHER;
-            unionWildcard.fNamespaceList = new String[2];
-            unionWildcard.fNamespaceList[0] = ABSENT;
-            unionWildcard.fNamespaceList[1] = ABSENT;
-        }
-
-        // 5 If either O1 or O2 is a pair of not and a namespace name and the other is a set of
-        //   (namespace names or absent), then The appropriate case among the following must be true:
-        //      -5.1 If the set includes the negated namespace name, then any must be the value.
-        //      -5.2 If the set does not include the negated namespace name, then whichever of O1 or O2
-        //           is a pair of not and a namespace name must be the value.
-        //    +5.1 If the negated value is a namespace name, then The appropriate case
-        //         among the following must be true:
-        //        +5.1.1 If the set includes both the namespace name and absent, then any
-        //               must be the value.
-        //        +5.1.2 If the set includes the namespace name but does not include
-        //               absent, then a pair of not and absent must be the value.
-        //        +5.1.3 If the set does not include the namespace name but includes
-        //               absent, then the union is not expressible.
-        //        +5.1.4 If the set does not include either the namespace name or absent,
-        //               then whichever of O1 or O2 is a pair of not and a namespace name must be
-        //               the value.
-        //    +5.2 If the negated value is absent, then The appropriate case among the
-        //         following must be true:
-        //        +5.2.1 If the set includes absent, then any must be the value.
-        //        +5.2.2 If the set does not include absent, then whichever of O1 or O2 is
-        //               a pair of not and a namespace name must be the value.
-        // * when we have not(list), the operation is just not(otherlist-list)
-        else if ( ((fType == WILDCARD_OTHER) && (wildcard.fType == WILDCARD_LIST)) ||
-                  ((fType == WILDCARD_LIST) && (wildcard.fType == WILDCARD_OTHER)) ) {
-            String[] other = null;
-            String[] list = null;
-
-            if (fType == WILDCARD_OTHER) {
-                other = fNamespaceList;
-                list = wildcard.fNamespaceList;
-            }
-            else {
-                other = wildcard.fNamespaceList;
-                list = fNamespaceList;
-            }
-
-            boolean foundAbsent = elementInSet(ABSENT, list);
-
-            if (other[0] != ABSENT) {
-                boolean foundNS = elementInSet(other[0], list);
-                if (foundNS && foundAbsent) {
-                    unionWildcard.fType = WILDCARD_ANY;
-                } else if (foundNS && !foundAbsent) {
-                    unionWildcard.fType = WILDCARD_OTHER;
-                    unionWildcard.fNamespaceList = new String[2];
-                    unionWildcard.fNamespaceList[0] = ABSENT;
-                    unionWildcard.fNamespaceList[1] = ABSENT;
-                } else if (!foundNS && foundAbsent) {
-                    return null;
-                } else { // !foundNS && !foundAbsent
-                    unionWildcard.fType = WILDCARD_OTHER;
-                    unionWildcard.fNamespaceList = other;
-                }
-            } else { // other[0] == ABSENT
-                if (foundAbsent) {
-                    unionWildcard.fType = WILDCARD_ANY;
-                } else { // !foundAbsent
-                    unionWildcard.fType = WILDCARD_OTHER;
-                    unionWildcard.fNamespaceList = other;
-                }
-            }
-        }
-
-        return unionWildcard;
-
-    } // performUnionWith
-
-    /**
-     * Schema Component Constraint: Attribute Wildcard Intersection
-     */
-    public XSWildcardDecl performIntersectionWith(XSWildcardDecl wildcard,
-                                                  short processContents) {
-        // if the other wildcard is not expressible, the result is still not expressible
-        if (wildcard == null)
-            return null;
-
-        // For a wildcard's {namespace constraint} value to be the intensional intersection of
-        // two other such values (call them O1 and O2): the appropriate case among the following
-        // must be true:
-
-        XSWildcardDecl intersectWildcard = new XSWildcardDecl();
-        intersectWildcard.fProcessContents = processContents;
-
-        // 1 If O1 and O2 are the same value, then that value must be the value.
-        if (areSame(wildcard)) {
-            intersectWildcard.fType = fType;
-            intersectWildcard.fNamespaceList = fNamespaceList;
-        }
-
-        // 2 If either O1 or O2 is any, then the other must be the value.
-        else if ( (fType == WILDCARD_ANY) || (wildcard.fType == WILDCARD_ANY) ) {
-            // both cannot be ANY, if we have reached here.
-            XSWildcardDecl other = this;
-
-            if (fType == WILDCARD_ANY)
-                other = wildcard;
-
-            intersectWildcard.fType = other.fType;
-            intersectWildcard.fNamespaceList = other.fNamespaceList;
-        }
-
-        // -3 If either O1 or O2 is a pair of not and a namespace name and the other is a set of
-        //    (namespace names or absent), then that set, minus the negated namespace name if
-        //    it was in the set, must be the value.
-        // +3 If either O1 or O2 is a pair of not and a namespace name and the other
-        //    is a set of (namespace names or absent), then that set, minus the negated
-        //    namespace name if it was in the set, then minus absent if it was in the
-        //    set, must be the value.
-        // * when we have not(list), the operation is just list-otherlist
-        else if ( ((fType == WILDCARD_OTHER) && (wildcard.fType == WILDCARD_LIST)) ||
-                  ((fType == WILDCARD_LIST) && (wildcard.fType == WILDCARD_OTHER)) ) {
-            String[] list = null;
-            String[] other = null;
-
-            if (fType == WILDCARD_OTHER) {
-                other = fNamespaceList;
-                list = wildcard.fNamespaceList;
-            }
-            else {
-                other = wildcard.fNamespaceList;
-                list = fNamespaceList;
-            }
-
-            int listSize = list.length;
-            String[] intersect = new String[listSize];
-            int newSize = 0;
-            for (int i = 0; i < listSize; i++) {
-                if (list[i] != other[0] && list[i] != ABSENT)
-                    intersect[newSize++] = list[i];
-            }
-
-            intersectWildcard.fType = WILDCARD_LIST;
-            intersectWildcard.fNamespaceList = new String[newSize];
-            System.arraycopy(intersect, 0, intersectWildcard.fNamespaceList, 0, newSize);
-        }
-
-        // 4 If both O1 and O2 are sets of (namespace names or absent), then the intersection of those
-        //   sets must be the value.
-        else if ( (fType == WILDCARD_LIST) && (wildcard.fType == WILDCARD_LIST) ) {
-            intersectWildcard.fType = WILDCARD_LIST;
-            intersectWildcard.fNamespaceList = intersect2sets(fNamespaceList, wildcard.fNamespaceList);
-        }
-
-        // -5 If the two are negations of different namespace names, then the intersection is not expressible.
-        // +5 If the two are negations of namespace names or absent, then The
-        //    appropriate case among the following must be true:
-        //    +5.1 If the two are negations of different namespace names, then the
-        //         intersection is not expressible.
-        //    +5.2 If one of the two is a pair of not and absent, the other must be
-        //         the value.
-        // * when we have not(list), the operation is just not(onelist+otherlist)
-        else if (fType == WILDCARD_OTHER && wildcard.fType == WILDCARD_OTHER) {
-            if (fNamespaceList[0] != ABSENT && wildcard.fNamespaceList[0] != ABSENT)
-                return null;
-
-            XSWildcardDecl other = this;
-            if (fNamespaceList[0] == ABSENT)
-                other = wildcard;
-
-            intersectWildcard.fType = other.fType;
-            intersectWildcard.fNamespaceList = other.fNamespaceList;
-        }
-
-        return intersectWildcard;
-
-    } // performIntersectionWith
-
-    private boolean areSame(XSWildcardDecl wildcard) {
-        if (fType == wildcard.fType) {
-            // ##any, true
-            if (fType == WILDCARD_ANY)
-                return true;
-
-            // ##other, only check the negated value
-            // * when we support not(list), we need to check in the same way
-            //   as for WILDCARD_LIST.
-            if (fType == WILDCARD_OTHER)
-                return fNamespaceList[0] == wildcard.fNamespaceList[0];
-
-            // ## list, must have the same length,
-            // and each item in one list must appear in the other one
-            // (we are assuming that there are no duplicate items in a list)
-            if (fNamespaceList.length == wildcard.fNamespaceList.length) {
-                for (int i=0; i<fNamespaceList.length; i++) {
-                    if (!elementInSet(fNamespaceList[i], wildcard.fNamespaceList))
-                        return false;
-                }
-                return true;
-            }
-        }
-
-        return false;
-    } // areSame
-
-    String[] intersect2sets(String[] one, String[] theOther){
-        String[] result = new String[Math.min(one.length,theOther.length)];
-
-        // simple implemention,
-        int count = 0;
-        for (int i=0; i<one.length; i++) {
-            if (elementInSet(one[i], theOther))
-                result[count++] = one[i];
-        }
-
-        String[] result2 = new String[count];
-        System.arraycopy(result, 0, result2, 0, count);
-
-        return result2;
-    }
-
-    String[] union2sets(String[] one, String[] theOther){
-        String[] result1 = new String[one.length];
-
-        // simple implemention,
-        int count = 0;
-        for (int i=0; i<one.length; i++) {
-            if (!elementInSet(one[i], theOther))
-                result1[count++] = one[i];
-        }
-
-        String[] result2 = new String[count+theOther.length];
-        System.arraycopy(result1, 0, result2, 0, count);
-        System.arraycopy(theOther, 0, result2, count, theOther.length);
-
-        return result2;
-    }
-
-    boolean subset2sets(String[] subSet, String[] superSet){
-        for (int i=0; i<subSet.length; i++) {
-            if (!elementInSet(subSet[i], superSet))
-                return false;
-        }
-
-        return true;
-    }
-
-    boolean elementInSet(String ele, String[] set){
-        boolean found = false;
-        for (int i=0; i<set.length && !found; i++) {
-            if (ele==set[i])
-                found = true;
-        }
-
-        return found;
-    }
-
-    /**
-     * get the string description of this wildcard
-     */
-    private String fDescription = null;
-    public String toString() {
-        if (fDescription == null) {
-            StringBuffer buffer = new StringBuffer();
-            buffer.append("WC[");
-            switch (fType) {
-            case WILDCARD_ANY:
-                buffer.append(SchemaSymbols.ATTVAL_TWOPOUNDANY);
-                break;
-            case WILDCARD_OTHER:
-                buffer.append(SchemaSymbols.ATTVAL_TWOPOUNDOTHER);
-                buffer.append(":\"");
-                if (fNamespaceList[0] != null)
-                    buffer.append(fNamespaceList[0]);
-                buffer.append("\"");
-                break;
-            case WILDCARD_LIST:
-                buffer.append("\"");
-                if (fNamespaceList[0] != null)
-                    buffer.append(fNamespaceList[0]);
-                buffer.append("\"");
-                for (int i = 1; i < fNamespaceList.length; i++) {
-                    buffer.append(",\"");
-                    if (fNamespaceList[i] != null)
-                        buffer.append(fNamespaceList[i]);
-                    buffer.append("\"");
-                }
-                break;
-            }
-            buffer.append("]");
-            fDescription = buffer.toString();
-        }
-
-        return fDescription;
-    }
-    
-} // class XSWildcardDecl
diff --git a/src/org/apache/xerces/impl/xs/identity/Field.java b/src/org/apache/xerces/impl/xs/identity/Field.java
deleted file mode 100644
index 6a07f31..0000000
--- a/src/org/apache/xerces/impl/xs/identity/Field.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.xpath.*;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.NamespaceContext;
-
-import org.xml.sax.SAXException;
-
-/**
- * Schema identity constraint field.
- *
- * @author Andy Clark, IBM
- * @version $Id$
- */
-public class Field {
-
-    //
-    // Data
-    //
-
-    /** Field XPath. */
-    protected Field.XPath fXPath;
-
-    /** Datatype. */
-    // Unfortunately, a Field may conceivably match values of varying
-    // datatypes.  Hence, this member no longer makes sense; see the IDValue class.
-    // protected XSSimpleType fXSSimpleType;
-
-    /** Identity constraint. */
-    protected IdentityConstraint fIdentityConstraint;
-
-    // whether this field can be matched; used to catch instance documents
-    // that try and match a field several times in the same scope.
-    protected boolean mayMatch = true;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a field. */
-    public Field(Field.XPath xpath, 
-                 IdentityConstraint identityConstraint) {
-        fXPath = xpath;
-        fIdentityConstraint = identityConstraint;
-    } // <init>(Field.XPath,IdentityConstraint)
-
-    //
-    // Public methods
-    //
-
-    // sets mayMatch
-    public void setMayMatch(boolean b) {
-        mayMatch = b;
-    } // setMayMatch(boolean);
-    
-    // returns mayMatch
-    public boolean mayMatch() {
-        return mayMatch;
-    } // mayMatch():boolean
-    
-    /** Returns the field XPath. */
-    public org.apache.xerces.impl.xpath.XPath getXPath() {
-        return fXPath;
-    } // getXPath():org.apache.xerces.impl.v1.schema.identity.XPath
-
-    /** Returns the identity constraint. */
-    public IdentityConstraint getIdentityConstraint() {
-        return fIdentityConstraint;
-    } // getIdentityConstraint():IdentityConstraint
-
-    // factory method
-
-    /** Creates a field matcher. */
-    public XPathMatcher createMatcher(ValueStore store) {
-        return new Field.Matcher(fXPath, store);
-    } // createMatcher(ValueStore):XPathMatcher
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-        return fXPath.toString();
-    } // toString():String
-
-    //
-    // Classes
-    //
-
-    /**
-     * Field XPath.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static class XPath
-        extends org.apache.xerces.impl.xpath.XPath {
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a field XPath expression. */
-        public XPath(String xpath, 
-                     SymbolTable symbolTable,
-                     NamespaceContext context) throws XPathException {
-            // NOTE: We have to prefix the field XPath with "./" in
-            //       order to handle selectors such as "@attr" that 
-            //       select the attribute because the fields could be
-            //       relative to the selector element. -Ac
-			//       Unless xpath starts with a descendant node -Achille Fokoue
-            //      ... or a / or a . - NG
-			super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
-				    xpath:"./"+xpath), 
-                  symbolTable, context);
-			
-        } // <init>(String,SymbolTable,NamespacesContext)
-
-    } // class XPath
-
-    /**
-     * Field matcher.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class Matcher
-        extends XPathMatcher {
-
-        //
-        // Data
-        //
-
-        /** Value store for data values. */
-        protected ValueStore fStore;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a field matcher. */
-        public Matcher(Field.XPath xpath, ValueStore store) {
-            super(xpath, true, null);
-            fStore = store;
-        } // <init>(Field.XPath,ValueStore)
-
-        //
-        // XPathHandler methods
-        //
-
-        /**
-         * This method is called when the XPath handler matches the
-         * XPath expression.
-         */
-        protected void matched(String content, XSSimpleType val, boolean isNil) {
-            super.matched(content, val, isNil);
-            if(isNil) {
-                fStore.reportNilError(fIdentityConstraint);
-            }
-            fStore.addValue(Field.this, new IDValue(content, val));
-            // once we've stored the value for this field, we set the mayMatch
-            // member to false so that, in the same scope, we don't match any more
-            // values (and throw an error instead).
-            mayMatch = false;
-        } // matched(String)
-
-    } // class Matcher
-
-} // class Field
diff --git a/src/org/apache/xerces/impl/xs/identity/FieldActivator.java b/src/org/apache/xerces/impl/xs/identity/FieldActivator.java
deleted file mode 100644
index cf45727..0000000
--- a/src/org/apache/xerces/impl/xs/identity/FieldActivator.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-import org.xml.sax.SAXException;
-
-/**
- * Interface for a field activator. The field activator is responsible
- * for activating fields within a specific scope; the caller merely
- * requests the fields to be activated.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface FieldActivator {
-    
-    //
-    // FieldActivator methods
-    //
-
-    /**
-     * Start the value scope for the specified identity constraint. This 
-     * method is called when the selector matches in order to initialize 
-     * the value store.
-     *
-     * @param identityConstraint The identity constraint.
-     */
-    public void startValueScopeFor(IdentityConstraint identityConstraint);
-
-    /** 
-     * Request to activate the specified field. This method returns the
-     * matcher for the field.
-     * It's also important for the implementor to ensure that the Field realizes that
-     * it is permitted to match a value--that is, to call the field's setMayMatch(boolean) method.
-     *
-     * @param field The field to activate.
-     */
-    public XPathMatcher activateField(Field field);
-
-    /**
-     * Ends the value scope for the specified identity constraint.
-     *
-     * @param identityConstraint The identity constraint.
-     */
-    public void endValueScopeFor(IdentityConstraint identityConstraint);
-
-} // interface FieldActivator
diff --git a/src/org/apache/xerces/impl/xs/identity/IDValue.java b/src/org/apache/xerces/impl/xs/identity/IDValue.java
deleted file mode 100644
index 6a36e7a..0000000
--- a/src/org/apache/xerces/impl/xs/identity/IDValue.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.validation.ValidationState;
-
-/**
- * Stores a value associated with a particular field of an identity constraint that
- * has successfully matched some string in an instance document.
- * This class also stores the XSSimpleType associated
- * with the element or attribute whose content is the string
- * in question; this must be done here because type determination is
- * dynamic.
- * <p> This class also makes it its business to provide
- * functionality to determine whether two instances are duplicates.</p>
- *
- * @author Neil Graham, IBM
- *
- */
-public class IDValue {
-
-    // data
-
-    protected String fValue;
-    protected XSSimpleType fValidator;
-
-    // constructor
-
-    public IDValue(String value, XSSimpleType val) {
-        fValue = value;
-        fValidator = val;
-    }
-
-    //
-    // IDValue methods
-    //
-
-    /**
-     * Returns whether the supplied IDValue is a duplicate of this IDValue.
-     * It is a duplicate only if either of these conditions are true:
-     * - The Datatypes are the same or related by derivation and
-     * the values are in the same valuespace.
-     * - The datatypes are unrelated and the values are Stringwise identical.
-     *
-     * @param value The value to compare.
-     *              once within a selection scope.
-     */
-    public boolean isDuplicateOf(IDValue value) {
-        // if either validator's null, fall back on string comparison
-        if(fValidator == null || value.fValidator == null)
-            return(fValue.equals(value.fValue));
-        // are the validators equal?
-        // As always we are obliged to compare by reference...
-        if (fValidator == value.fValidator) {
-            return (isDuplicateOf(fValidator, fValue, value.fValue));
-        }
-        // see if this.fValidator is derived from value.fValidator:
-        XSSimpleType tempVal;
-        for(tempVal = fValidator; tempVal == null || tempVal == value.fValidator; tempVal = (XSSimpleType)tempVal.getBaseType());
-        if(tempVal != null) { // was derived!
-            return (isDuplicateOf(fValidator, fValue, value.fValue));
-        }
-        // see if value.fValidator is derived from this.fValidator:
-        for(tempVal = value.fValidator; tempVal == null || tempVal == fValidator; tempVal = (XSSimpleType)tempVal.getBaseType());
-        if(tempVal != null) { // was derived!
-            return (value.isDuplicateOf(fValidator, fValue, value.fValue));
-        }
-        // if we're here it means the types weren't related.  Must fall back to strings:
-        return(fValue.equals(value.fValue));
-    } // end compare(IDValue):boolean
-
-    static final ValidationState VS = new ValidationState();
-    static {
-        VS.setExtraChecking(false);
-        VS.setFacetChecking(false);
-    }
-    private boolean isDuplicateOf(XSSimpleType dv, String v1, String v2) {
-        //REVISIT: now we always store string values in IDValue, so we have to
-        //         validate the two string again to get actual values.
-        //         we should store actual values in IDValue.
-        try {
-            Object av1 = dv.validate(v1, VS, null);
-            Object av2 = dv.validate(v2, VS, null);
-            return dv.isEqual(av1, av2);
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    // Object methods:
-    public String toString() {
-        return ("ID Value:  " + fValue );
-    }
-} // class IDValue
diff --git a/src/org/apache/xerces/impl/xs/identity/IdentityConstraint.java b/src/org/apache/xerces/impl/xs/identity/IdentityConstraint.java
deleted file mode 100644
index 2239541..0000000
--- a/src/org/apache/xerces/impl/xs/identity/IdentityConstraint.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-/**
- * Base class of Schema identity constraint.
- *
- * @author Andy Clark, IBM
- * @version $Id$
- */
-public abstract class IdentityConstraint {
-
-    //
-    // Constants
-    //
-
-    /** Type: unique. */
-    public static final short UNIQUE = 0;
-
-    /** Type: key. */
-    public static final short KEY = 1;
-
-    /** Type: key reference. */
-    public static final short KEYREF = 2;
-
-    //
-    // Data
-    //
-
-    /** type */
-    protected short type;
-
-    /** Identity constraint name. */
-    protected String fIdentityConstraintName;
-
-    /** name of owning element */
-    protected String fElementName;
-
-    /** Selector. */
-    protected Selector fSelector;
-
-    /** Field count. */
-    protected int fFieldCount;
-
-    /** Fields. */
-    protected Field[] fFields;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    protected IdentityConstraint(String identityConstraintName, String elemName) {
-        fIdentityConstraintName = identityConstraintName;
-        fElementName = elemName;
-    } // <init>(String,String)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the identity constraint type. */
-    public short getType() {
-        return type;
-    } // getType():  short
-
-    /** Returns the identity constraint name. */
-    public String getIdentityConstraintName() {
-        return fIdentityConstraintName;
-    } // getIdentityConstraintName():String
-
-    /** Sets the selector. */
-    public void setSelector(Selector selector) {
-        fSelector = selector;
-    } // setSelector(Selector)
-
-    /** Returns the selector. */
-    public Selector getSelector() {
-        return fSelector;
-    } // getSelector():Selector
-
-    /** Adds a field. */
-    public void addField(Field field) {
-        if (fFields == null)
-            fFields = new Field[4];
-        else if (fFieldCount == fFields.length)
-            fFields = resize(fFields, fFieldCount*2);
-        fFields[fFieldCount++] = field;
-    } // addField(Field)
-
-    /** Returns the field count. */
-    public int getFieldCount() {
-        return fFieldCount;
-    } // getFieldCount():int
-
-    /** Returns the field at the specified index. */
-    public Field getFieldAt(int index) {
-        return fFields[index];
-    } // getFieldAt(int):Field
-
-    // get the name of the owning element
-    public String getElementName () {
-        return fElementName;
-    } // getElementName(): String
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-        String s = super.toString();
-        int index1 = s.lastIndexOf('$');
-        if (index1 != -1) {
-            return s.substring(index1 + 1);
-        }
-        int index2 = s.lastIndexOf('.');
-        if (index2 != -1) {
-            return s.substring(index2 + 1);
-        }
-        return s;
-    } // toString():String
-
-    // equals:  returns true if and only if the String
-    // representations of all members of both objects (except for
-    // the elenemtName field) are equal.
-    public boolean equals(IdentityConstraint id) {
-        boolean areEqual = fIdentityConstraintName.equals(id.fIdentityConstraintName);
-        if(!areEqual) return false;
-        areEqual = fSelector.toString().equals(id.fSelector.toString());
-        if(!areEqual) return false;
-        areEqual = (fFieldCount == id.fFieldCount);
-        if(!areEqual) return false;
-        for(int i=0; i<fFieldCount; i++)
-            if(!fFields[i].toString().equals(id.fFields[i].toString())) return false;
-        return true;
-    } // equals
-
-    static final Field[] resize(Field[] oldArray, int newSize) {
-        Field[] newArray = new Field[newSize];
-        System.arraycopy(oldArray, 0, newArray, 0, newSize);
-        return newArray;
-    }
-
-} // class IdentityConstraint
diff --git a/src/org/apache/xerces/impl/xs/identity/KeyRef.java b/src/org/apache/xerces/impl/xs/identity/KeyRef.java
deleted file mode 100644
index 4f28989..0000000
--- a/src/org/apache/xerces/impl/xs/identity/KeyRef.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-/**
- * Schema key reference identity constraint.
- *
- * @author Andy Clark, IBM
- * @version $Id$
- */
-public class KeyRef
-    extends IdentityConstraint {
-
-    //
-    // Data
-    //
-
-    /** The key (or unique) being referred to. */
-    protected UniqueOrKey fKey;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a keyref with the specified name. */
-    public KeyRef(String identityConstraintName, String elemName, UniqueOrKey key) {
-        super(identityConstraintName, elemName);
-        fKey = key;
-        type = KEYREF;
-    } // <init>(String,String,String)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the key being referred to.  */
-    public UniqueOrKey getKey() {
-        return fKey;
-    } // getKey(): int
-
-} // class KeyRef
diff --git a/src/org/apache/xerces/impl/xs/identity/Selector.java b/src/org/apache/xerces/impl/xs/identity/Selector.java
deleted file mode 100644
index a053443..0000000
--- a/src/org/apache/xerces/impl/xs/identity/Selector.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xpath.*;
-import org.apache.xerces.xni.NamespaceContext;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
-
-import org.xml.sax.SAXException;
-
-/**
- * Schema identity constraint selector.
- *
- * @author Andy Clark, IBM
- * @version $Id$
- */
-public class Selector {
-
-    //
-    // Data
-    //
-
-    /** XPath. */
-    protected Selector.XPath fXPath;
-
-    /** Identity constraint. */
-    protected IdentityConstraint fIdentityConstraint;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a selector. */
-    public Selector(Selector.XPath xpath, 
-                    IdentityConstraint identityConstraint) {
-        fXPath = xpath;
-        fIdentityConstraint = identityConstraint;
-    } // <init>(Selector.XPath,IdentityConstraint)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the selector XPath. */
-    public org.apache.xerces.impl.xpath.XPath getXPath() {
-        return fXPath;
-    } // getXPath():org.apache.xerces.v1.schema.identity.XPath
-
-    /** Returns the identity constraint. */
-    public IdentityConstraint getIdentityConstraint() {
-        return fIdentityConstraint;
-    } // getIdentityConstraint():IdentityConstraint
-
-    // factory method
-
-    /** Creates a selector matcher. */
-    public XPathMatcher createMatcher(FieldActivator activator) {
-        return new Selector.Matcher(fXPath, activator);
-    } // createMatcher(FieldActivator):XPathMatcher
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-        return fXPath.toString();
-    } // toString():String
-
-    //
-    // Classes
-    //
-
-    /**
-     * Schema identity constraint selector XPath expression.
-     *
-     * @author Andy Clark, IBM
-     * @version $Id$
-     */
-    public static class XPath
-    extends org.apache.xerces.impl.xpath.XPath {
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a selector XPath expression. */
-        public XPath(String xpath, SymbolTable symbolTable, 
-                     NamespaceContext context) throws XPathException {
-            // NOTE: We have to prefix the selector XPath with "./" in
-            //       order to handle selectors such as "." that select
-            //       the element container because the fields could be
-            //       relative to that element. -Ac
-            //       Unless xpath starts with a descendant node -Achille Fokoue
-            //      ... or a '.' or a '/' - NG
-            super(((xpath.trim().startsWith("/") ||xpath.trim().startsWith("."))?
-                   xpath:"./"+xpath), symbolTable, context);
-
-            // verify that an attribute is not selected
-            for (int i=0;i<fLocationPaths.length;i++) {
-                org.apache.xerces.impl.xpath.XPath.Axis axis =
-                fLocationPaths[i].steps[fLocationPaths[i].steps.length-1].axis;
-                if (axis.type == axis.ATTRIBUTE) {
-                    throw new XPathException("selectors cannot select attributes");
-                }
-            }
-
-        } // <init>(String,SymbolTable,NamespacesScope)
-
-    } // class Selector.XPath
-
-    /**
-     * Selector matcher.
-     *
-     * @author Andy Clark, IBM
-     */
-    protected class Matcher
-    extends XPathMatcher {
-
-        //
-        // Data
-        //
-
-        /** Field activator. */
-        protected FieldActivator fFieldActivator;
-
-        /** Element depth. */
-        protected int fElementDepth;
-
-        /** Depth at match. */
-        protected int fMatchedDepth;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a selector matcher. */
-        public Matcher(Selector.XPath xpath, FieldActivator activator) {
-            super(xpath, false, Selector.this.fIdentityConstraint);
-            fFieldActivator = activator;
-        } // <init>(Selector.XPath,FieldActivator)
-
-        //
-        // XMLDocumentFragmentHandler methods
-        //
-
-        public void startDocumentFragment(SymbolTable symbolTable)
-        throws XNIException {
-            super.startDocumentFragment(symbolTable);
-            //super.startDocumentFragment(context, symbolTable);
-            fElementDepth = 0;
-            fMatchedDepth = -1;
-        } // startDocumentFragment(SymbolTable)
-
-        /**
-         * The start of an element. If the document specifies the start element
-         * by using an empty tag, then the startElement method will immediately
-         * be followed by the endElement method, with no intervening methods.
-         * 
-         * @param element    The name of the element.
-         * @param attributes The element attributes.
-         * @param elementDecl:  The element declaration 
-         *
-         * @throws SAXException Thrown by handler to signal an error.
-         */
-        public void startElement(QName element, XMLAttributes attributes, 
-                                 XSElementDecl elementDecl) throws XNIException {
-            super.startElement(element, attributes, elementDecl);
-            fElementDepth++;
-
-            // activate the fields, if selector is matched
-            if (fMatchedDepth == -1 && isMatched()) {
-                fMatchedDepth = fElementDepth;
-                fFieldActivator.startValueScopeFor(fIdentityConstraint);
-                int count = fIdentityConstraint.getFieldCount();
-                for (int i = 0; i < count; i++) {
-                    Field field = fIdentityConstraint.getFieldAt(i);
-                    XPathMatcher matcher = fFieldActivator.activateField(field);
-                    matcher.startElement(element, attributes, elementDecl);
-                }
-            }
-
-        } // startElement(QName,XMLAttrList,int)
-
-        public void endElement(QName element, XSElementDecl eDecl) {
-            super.endElement(element, eDecl);
-            if (fElementDepth-- == fMatchedDepth) {
-                fMatchedDepth = -1;
-                fFieldActivator.endValueScopeFor(fIdentityConstraint);
-            }
-        }
-
-    } // class Matcher
-
-} // class Selector
diff --git a/src/org/apache/xerces/impl/xs/identity/UniqueOrKey.java b/src/org/apache/xerces/impl/xs/identity/UniqueOrKey.java
deleted file mode 100644
index fcf8791..0000000
--- a/src/org/apache/xerces/impl/xs/identity/UniqueOrKey.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-/**
- * Schema unique or key identity constraint.
- * These two kinds of identity constraint have been combined to save 
- * the creation of a separate Vector object for any element that 
- * has both.  A short int is used to distinguish which this object is.
- *
- * @author Andy Clark, IBM
- * @version $Id$
- */
-public class UniqueOrKey 
-    extends IdentityConstraint {
-
-    // CONSTANTS
-    public static short UNIQUE_TYPE = 1;
-    public static short KEY_TYPE = 2;
-
-    // DATA
-    public short type;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a unique or a key identity constraint. */
-    public UniqueOrKey(String identityConstraintName, String elemName, short type) {
-        super(identityConstraintName, elemName);
-        this.type = type;
-    } // <init>(String,String)
-
-    //
-    // Public methods
-    //
-
-} // class Unique
diff --git a/src/org/apache/xerces/impl/xs/identity/ValueStore.java b/src/org/apache/xerces/impl/xs/identity/ValueStore.java
deleted file mode 100644
index 58dc202..0000000
--- a/src/org/apache/xerces/impl/xs/identity/ValueStore.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-import org.xml.sax.SAXException;
-
-/**
- * Interface for storing values associated to an identity constraint. 
- * Each value stored corresponds to a field declared for the identity
- * constraint. One instance of an object implementing this interface
- * is created for each identity constraint per element declaration in
- * the instance document to store the information for this identity
- * constraint.
- * <p>
- * <strong>Note:</strong> The component performing identity constraint
- * collection and validation is responsible for providing an 
- * implementation of this interface. The component is also responsible
- * for performing the necessary checks required by each type of identity
- * constraint.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface ValueStore {
-    
-    //
-    // ValueStore methods
-    //
-
-    /** 
-     * Adds the specified value to the value store.
-     *
-     * @param value The value to add.
-     * @param field The field associated to the value. This reference
-     *              is used to ensure that each field only adds a value
-     *              once within a selection scope.
-     */
-    public void addValue(Field field, IDValue value);
-
-    /* report an error if a nillable element is being keyed on.
-     * the implementor must check that a <key> really is present, not a <unique> or <keyref>.
-     * @param:  id:  the IdentityConstraint that has matched.
-     */
-    public void reportNilError(IdentityConstraint id);
-
-} // interface ValueStore
diff --git a/src/org/apache/xerces/impl/xs/identity/XPathMatcher.java b/src/org/apache/xerces/impl/xs/identity/XPathMatcher.java
deleted file mode 100644
index 897585f..0000000
--- a/src/org/apache/xerces/impl/xs/identity/XPathMatcher.java
+++ /dev/null
@@ -1,693 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.identity;
-
-import org.apache.xerces.impl.xs.XSAttributeDecl;
-import org.apache.xerces.impl.xs.XSAttributeUse;
-import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-import org.apache.xerces.impl.xs.XSComplexTypeDecl;
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xpath.*;
-import org.apache.xerces.util.IntStack;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.NamespaceContext;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLString;
-
-/**
- * XPath matcher.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XPathMatcher {
-
-    //
-    // Constants
-    //
-
-    // debugging
-
-    /** Compile to true to debug everything. */
-    protected static final boolean DEBUG_ALL = false;
-
-    /** Compile to true to debug method callbacks. */
-    protected static final boolean DEBUG_METHODS = false || DEBUG_ALL;
-
-    /** Compile to true to debug important method callbacks. */
-    protected static final boolean DEBUG_METHODS2 = false || DEBUG_METHODS || DEBUG_ALL;
-
-    /** Compile to true to debug the <em>really</em> important methods. */
-    protected static final boolean DEBUG_METHODS3 = false || DEBUG_METHODS || DEBUG_ALL;
-
-    /** Compile to true to debug match. */
-    protected static final boolean DEBUG_MATCH = false || DEBUG_ALL;
-
-    /** Compile to true to debug step index stack. */
-    protected static final boolean DEBUG_STACK = false || DEBUG_ALL;
-
-    /** Don't touch this value unless you add more debug constants. */
-    protected static final boolean DEBUG_ANY = DEBUG_METHODS ||
-                                               DEBUG_METHODS2 ||
-                                               DEBUG_METHODS3 ||
-                                               DEBUG_MATCH ||
-                                               DEBUG_STACK;
-
-    //
-    // Data
-    //
-
-    /** XPath location path. */
-    private XPath.LocationPath[] fLocationPaths;
-
-    /** Application preference to buffer content or not. */
-    private boolean fShouldBufferContent;
-
-    /** True if should buffer character content <em>at this time</em>. */
-    private boolean fBufferContent;
-
-    /** Buffer to hold match text. */
-    private StringBuffer fMatchedBuffer = new StringBuffer();
-
-    /** True if XPath has been matched. */
-    private boolean[] fMatched;
-
-    /** The matching string. */
-    private String fMatchedString;
-
-    /** Integer stack of step indexes. */
-    private IntStack[] fStepIndexes;
-
-    /** Current step. */
-    private int[] fCurrentStep;
-
-    /**
-     * No match depth. The value of this field will be zero while
-     * matching is successful for the given xpath expression.
-     */
-    private int [] fNoMatchDepth;
-
-    // Xerces 1.x framework
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    /** Namespace scope. */
-    /*** REVISIT:  do we need this?  -NG
-    protected NamespaceContext fNamespacesScope;
-    */
-
-    // the Identity constraint we're the matcher for.  Only
-    // used for selectors!
-    protected IdentityConstraint fIDConstraint;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs an XPath matcher that implements a document fragment
-     * handler.
-     *
-     * @param xpath   The xpath.
-     */
-    public XPathMatcher(XPath xpath) {
-        this(xpath, false, null);
-    } // <init>(XPath)
-
-    /**
-     * Constructs an XPath matcher that implements a document fragment
-     * handler.
-     *
-     * @param xpath   The xpath.
-     * @param shouldBufferContent True if the matcher should buffer the
-     *                            matched content.
-     * @param idConstraint:  the identity constraint we're matching for;
-     *      null unless it's a Selector.
-     */
-    public XPathMatcher(XPath xpath, boolean shouldBufferContent, IdentityConstraint idConstraint) {
-        fLocationPaths = xpath.getLocationPaths();
-        fShouldBufferContent = shouldBufferContent;
-        fIDConstraint = idConstraint;
-        fStepIndexes = new IntStack[fLocationPaths.length];
-        for(int i=0; i<fStepIndexes.length; i++) fStepIndexes[i] = new IntStack();
-        fCurrentStep = new int[fLocationPaths.length];
-        fNoMatchDepth = new int[fLocationPaths.length];
-        fMatched = new boolean[fLocationPaths.length];
-        if (DEBUG_METHODS) {
-            System.out.println(toString()+"#<init>()");
-        }
-    } // <init>(XPath,boolean)
-
-    //
-    // Public methods
-    //
-
-    /** Returns true if XPath has been matched. */
-    public boolean isMatched() {
-        // xpath has been matched if any one of the members of the union have matched.
-        for (int i=0; i < fLocationPaths.length; i++)
-            if (fMatched[i]) return true;
-        return false;
-    } // isMatched():boolean
-
-    // returns whether this XPathMatcher was matching a Selector
-    public boolean getIsSelector() {
-        return (fIDConstraint == null);
-    } // end getIsSelector():boolean
-
-    // returns the ID constraint
-    public IdentityConstraint getIDConstraint() {
-        return fIDConstraint;
-    } // end getIDConstraint():IdentityConstraint
-
-    /** Returns the matched string. */
-    public String getMatchedString() {
-        return fMatchedString;
-    } // getMatchedString():String
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * This method is called when the XPath handler matches the
-     * XPath expression. Subclasses can override this method to
-     * provide default handling upon a match.
-     */
-    protected void matched(String content, XSSimpleType val, boolean isNil) throws XNIException {
-        if (DEBUG_METHODS3) {
-            System.out.println(toString()+"#matched(\""+normalize(content)+"\")");
-        }
-    } // matched(String content, XSSimpleType val)
-
-    //
-    // ~XMLDocumentFragmentHandler methods
-    //
-
-    /**
-     * The start of the document fragment.
-     *
-     * @param context The namespace scope in effect at the
-     *                start of this document fragment.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocumentFragment(SymbolTable symbolTable)
-        throws XNIException {
-        if (DEBUG_METHODS) {
-            System.out.println(toString()+"#startDocumentFragment("+
-                               //"stringPool="+stringPool+','+
-                               ")");
-        }
-
-        // reset state
-        clear();
-        for(int i = 0; i < fLocationPaths.length; i++) {
-            fStepIndexes[i].clear();
-            fCurrentStep[i] = 0;
-            fNoMatchDepth[i] = 0;
-            fMatched[i]=false;
-        }
-
-        // keep values
-        /****
-        fNamespacesScope = context;
-        */
-        fSymbolTable = symbolTable;
-
-    } // startDocumentFragment(NamespaceContext)
-
-    /**
-     * The start of an element. If the document specifies the start element
-     * by using an empty tag, then the startElement method will immediately
-     * be followed by the endElement method, with no intervening methods.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param elementDecl: The element declaration for the element
-     *
-     * @throws SAXException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes,
-                             XSElementDecl elementDecl)
-        throws XNIException {
-        if (DEBUG_METHODS2) {
-            System.out.println(toString()+"#startElement("+
-                               "element={"+element+"},"+
-                               "attributes=..."+attributes+
-                               ")");
-        }
-
-        for(int i = 0; i < fLocationPaths.length; i++) {
-            // push context
-            int startStep = fCurrentStep[i];
-            fStepIndexes[i].push(startStep);
-
-            // try next xpath, if not matching
-            if (fMatched[i] || fNoMatchDepth[i] > 0) {
-                fNoMatchDepth[i]++;
-                continue;
-            }
-
-            if (DEBUG_STACK) {
-                System.out.println(toString()+": "+fStepIndexes[i]);
-            }
-
-            // consume self::node() steps
-            XPath.Step[] steps = fLocationPaths[i].steps;
-            while (fCurrentStep[i] < steps.length &&
-                    steps[fCurrentStep[i]].axis.type == XPath.Axis.SELF) {
-                if (DEBUG_MATCH) {
-                    XPath.Step step = steps[fCurrentStep[i]];
-                    System.out.println(toString()+" [SELF] MATCHED!");
-                }
-                fCurrentStep[i]++;
-            }
-            if (fCurrentStep[i] == steps.length) {
-                if (DEBUG_MATCH) {
-                    System.out.println(toString()+" XPath MATCHED!");
-                }
-                fMatched[i] = true;
-                int j=0;
-                for(; j<i && !fMatched[j]; j++);
-                if(j==i)
-                    fBufferContent = fShouldBufferContent;
-                continue;
-            }
-
-            // now if the current step is a descendant step, we let the next
-            // step do its thing; if it fails, we reset ourselves
-            // to look at this step for next time we're called.
-            // so first consume all descendants:
-            int descendantStep = fCurrentStep[i];
-            while(fCurrentStep[i] < steps.length && steps[fCurrentStep[i]].axis.type == XPath.Axis.DESCENDANT) {
-                if (DEBUG_MATCH) {
-                    XPath.Step step = steps[fCurrentStep[i]];
-                    System.out.println(toString()+" [DESCENDANT] MATCHED!");
-                }
-                fCurrentStep[i]++;
-            }
-            if (fCurrentStep[i] == steps.length) {
-                if (DEBUG_MATCH) {
-                    System.out.println(toString()+" XPath DIDN'T MATCH!");
-                }
-                fNoMatchDepth[i]++;
-                if (DEBUG_MATCH) {
-                    System.out.println(toString()+" [CHILD] after NO MATCH");
-                }
-                continue;
-            }
-
-            // match child::... step, if haven't consumed any self::node()
-            if ((fCurrentStep[i] == startStep || fCurrentStep[i] > descendantStep) &&
-                steps[fCurrentStep[i]].axis.type == XPath.Axis.CHILD) {
-                XPath.Step step = steps[fCurrentStep[i]];
-                XPath.NodeTest nodeTest = step.nodeTest;
-                if (DEBUG_MATCH) {
-                    System.out.println(toString()+" [CHILD] before");
-                }
-                if (nodeTest.type == XPath.NodeTest.QNAME) {
-                    if (!nodeTest.name.equals(element)) {
-                        if(fCurrentStep[i] > descendantStep) {
-                            fCurrentStep[i] = descendantStep;
-                            continue;
-                        }
-                        fNoMatchDepth[i]++;
-                        if (DEBUG_MATCH) {
-                            System.out.println(toString()+" [CHILD] after NO MATCH");
-                        }
-                        continue;
-                    }
-                }
-                fCurrentStep[i]++;
-                if (DEBUG_MATCH) {
-                    System.out.println(toString()+" [CHILD] after MATCHED!");
-                }
-            }
-            if (fCurrentStep[i] == steps.length) {
-                fMatched[i] = true;
-                int j=0;
-                for(; j<i && !fMatched[j]; j++);
-                if(j==i)
-                    fBufferContent = fShouldBufferContent;
-                continue;
-            }
-
-            // match attribute::... step
-            if (fCurrentStep[i] < steps.length &&
-                steps[fCurrentStep[i]].axis.type == XPath.Axis.ATTRIBUTE) {
-                if (DEBUG_MATCH) {
-                    System.out.println(toString()+" [ATTRIBUTE] before");
-                }
-                int attrCount = attributes.getLength();
-                if (attrCount > 0) {
-                    XPath.NodeTest nodeTest = steps[fCurrentStep[i]].nodeTest;
-                    QName aname = new QName(); // REVISIT: cache this
-
-                    // Get the list of attributes from the element decl.
-                    // REVISIT - is this correct?   This is what was done in xerces-1,
-                    // but is it right?
-                    XSAttributeGroupDecl attrGrp = null;
-                    if (elementDecl != null) {
-                        XSTypeDecl type = elementDecl.fType;
-                        if (type != null) {
-                          if (type.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-                            XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;
-                            attrGrp = ctype.fAttrGrp;
-                          }
-                        }
-                    }
-
-                    for (int aindex = 0; aindex < attrCount; aindex++) {
-                        attributes.getName(aindex, aname);
-                        if (nodeTest.type != XPath.NodeTest.QNAME ||
-                            nodeTest.name.equals(aname)) {
-                            fCurrentStep[i]++;
-                            if (fCurrentStep[i] == steps.length) {
-                                fMatched[i] = true;
-                                int j=0;
-                                for(; j<i && !fMatched[j]; j++);
-                                if(j==i) {
-                                    String avalue = attributes.getValue(aindex);
-                                    fMatchedString = avalue;
-                                    // now, we have to go on the hunt for
-                                    // datatype validator; not an easy or pleasant task...
-
-                                    XSSimpleType aValidator = null;
-                                    if (attrGrp != null) {
-                                      XSAttributeUse tempAttUse = attrGrp.getAttributeUse(aname.uri, aname.localpart);
-                                      if (tempAttUse != null) {
-                                        XSAttributeDecl tempAttDecl = tempAttUse.fAttrDecl;
-                                        aValidator = tempAttDecl.fType;
-                                      }
-                                    }
-                                    matched(fMatchedString, aValidator, false);
-                                }
-                            }
-                            break;
-                        }
-                    }
-                }
-                if (!fMatched[i]) {
-                    if(fCurrentStep[i] > descendantStep) {
-                        fCurrentStep[i] = descendantStep;
-                        continue;
-                    }
-                    fNoMatchDepth[i]++;
-                    if (DEBUG_MATCH) {
-                        System.out.println(toString()+" [ATTRIBUTE] after");
-                    }
-                    continue;
-                }
-                if (DEBUG_MATCH) {
-                    System.out.println(toString()+" [ATTRIBUTE] after MATCHED!");
-                }
-            }
-        }
-
-    } // startElement(QName,XMLAttrList,int)
-
-    /** Character content. */
-    public void characters(XMLString text)
-        throws XNIException {
-        if (DEBUG_METHODS) {
-            System.out.println(toString()+"#characters("+
-                               "text="+normalize(text.toString())+
-                               ")");
-        }
-
-        // collect match content
-        // so long as one of our paths is matching, store the content
-        for(int i=0; i<fLocationPaths.length; i++)
-            if (fBufferContent && fNoMatchDepth[i] == 0) {
-                if (!DEBUG_METHODS && DEBUG_METHODS2) {
-                    System.out.println(toString()+"#characters("+
-                                   "text="+normalize(text.toString())+
-                                   ")");
-                }
-                fMatchedBuffer.append(text);
-                break;
-            }
-
-    } // characters(char[],int,int)
-
-    /**
-     * The end of an element.
-     *
-     * @param element The name of the element.
-     * @param eDecl:  the element declaration
-     *
-     * @throws SAXException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, XSElementDecl eDecl) {
-        if (DEBUG_METHODS2) {
-            System.out.println(toString()+"#endElement("+
-                               "element={"+element+"},"+
-                               "ID constraint="+fIDConstraint+
-                               ")");
-        }
-        for(int i = 0; i<fLocationPaths.length; i++) {
-            // don't do anything, if not matching
-            if (fNoMatchDepth[i] > 0) {
-                fNoMatchDepth[i]--;
-            }
-
-            // signal match, if appropriate
-            else {
-                int j=0;
-                for(; j<i && !fMatched[j]; j++);
-                if (j<i) continue;
-                if (fBufferContent) {
-                    fBufferContent = false;
-                    fMatchedString = fMatchedBuffer.toString();
-                    // REVISIT: cache this.
-                    // REVISIT:  make sure type's from same schema!
-                    // REVISIT:  make sure type is simple!
-                    XSSimpleType val=null;
-
-                    if (eDecl!=null) {
-                      XSTypeDecl type = eDecl.fType;
-                      if (type != null) {
-                        if (type.getXSType() == XSTypeDecl.COMPLEX_TYPE) {
-                          XSComplexTypeDecl ctype = (XSComplexTypeDecl)type;
-                          val = ctype.fXSSimpleType;
-                        }
-                        else {
-                          val = (XSSimpleType)(type);
-                        }
-                      }
-                    }
-
-                    if(eDecl != null) {
-                        matched(fMatchedString, val, (eDecl.isNillable()));
-                    } else
-                        matched(fMatchedString, val, false);
-
-                }
-                clear();
-            }
-
-            // go back a step
-            fCurrentStep[i] = fStepIndexes[i].pop();
-
-            if (DEBUG_STACK) {
-                System.out.println(toString()+": "+fStepIndexes[i]);
-            }
-        }
-
-    } // endElement(QName)
-
-    /**
-     * The end of the document fragment.
-     *
-     * @throws SAXException Thrown by handler to signal an error.
-     */
-    public void endDocumentFragment() throws XNIException {
-        if (DEBUG_METHODS) {
-            System.out.println(toString()+"#endDocumentFragment()");
-        }
-        clear();
-    } // endDocumentFragment()
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-        /***
-        return fLocationPath.toString();
-        /***/
-        StringBuffer str = new StringBuffer();
-        String s = super.toString();
-        int index2 = s.lastIndexOf('.');
-        if (index2 != -1) {
-            s = s.substring(index2 + 1);
-        }
-        str.append(s);
-        for(int i =0;i<fLocationPaths.length; i++) {
-            str.append('[');
-            XPath.Step[] steps = fLocationPaths[i].steps;
-            for (int j = 0; j < steps.length; j++) {
-                if (j == fCurrentStep[i]) {
-                    str.append('^');
-                }
-                str.append(steps[i].toString());
-                if (j < steps.length - 1) {
-                    str.append('/');
-                }
-            }
-            if (fCurrentStep[i] == steps.length) {
-                str.append('^');
-            }
-            str.append(']');
-            str.append(',');
-        }
-        return str.toString();
-    } // toString():String
-
-    //
-    // Private methods
-    //
-
-    /** Clears the match values. */
-    private void clear() {
-        fBufferContent = false;
-        fMatchedBuffer.setLength(0);
-        fMatchedString = null;
-        for(int i = 0; i<fLocationPaths.length; i++)
-            fMatched[i] = false;
-    } // clear()
-
-    /** Normalizes text. */
-    private String normalize(String s) {
-        StringBuffer str = new StringBuffer();
-        int length = s.length();
-        for (int i = 0; i < length; i++) {
-            char c = s.charAt(i);
-            switch (c) {
-                case '\n': {
-                    str.append("\\n");
-                    break;
-                }
-                default: {
-                    str.append(c);
-                }
-            }
-        }
-        return str.toString();
-    } // normalize(String):String
-
-    //
-    // MAIN
-    //
-
-    // NOTE: The main of this class is here for debugging purposes.
-    //       However, javac (JDK 1.1.8) has an internal compiler
-    //       error when compiling. Jikes has no problem, though.
-    //
-    //       If you want to use this main, use Jikes to compile but
-    //       *never* check in this code to CVS without commenting it
-    //       out. -Ac
-
-    /** Main program. */
-    /***
-    public static void main(String[] argv) throws XNIException {
-
-        if (DEBUG_ANY) {
-            for (int i = 0; i < argv.length; i++) {
-                final String expr = argv[i];
-                final XPath xpath = new XPath(expr, symbols, null);
-                final XPathMatcher matcher = new XPathMatcher(xpath, true);
-                org.apache.xerces.parsers.SAXParser parser =
-                    new org.apache.xerces.parsers.SAXParser(symbols) {
-                    public void startDocument() throws XNIException {
-                        matcher.startDocumentFragment(symbols, null);
-                    }
-                    public void startElement(QName element, XMLAttrList attributes, int handle) throws XNIException {
-                        matcher.startElement(element, attributes, handle);
-                    }
-                    public void characters(char[] ch, int offset, int length) throws XNIException {
-                        matcher.characters(ch, offset, length);
-                    }
-                    public void endElement(QName element) throws XNIException {
-                        matcher.endElement(element);
-                    }
-                    public void endDocument() throws XNIException {
-                        matcher.endDocumentFragment();
-                    }
-                };
-                System.out.println("#### argv["+i+"]: \""+expr+"\" -> \""+xpath.toString()+'"');
-                final String uri = argv[++i];
-                System.out.println("#### argv["+i+"]: "+uri);
-                parser.parse(uri);
-            }
-        }
-
-    } // main(String[])
-    /***/
-
-} // class XPathMatcher
diff --git a/src/org/apache/xerces/impl/xs/models/CMBuilder.java b/src/org/apache/xerces/impl/xs/models/CMBuilder.java
deleted file mode 100644
index eedfbe7..0000000
--- a/src/org/apache/xerces/impl/xs/models/CMBuilder.java
+++ /dev/null
@@ -1,520 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.dtd.models.CMNode;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSDeclarationPool;
-import org.apache.xerces.impl.xs.XSComplexTypeDecl;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.models.*;
-
-/**
- * This class constructs content models for a given grammar.
- *
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public class CMBuilder {
-
-    private final QName fQName1 = new QName();
-    private final QName fQName2 = new QName();
-
-    private XSDeclarationPool fDeclPool = null;
-
-    // needed for DFA construction
-    private int fLeafCount;
-
-    public CMBuilder (XSDeclarationPool pool){
-        fDeclPool = pool;
-    }
-
-    /**
-     * Get content model for the a given type
-     *
-     * @param elementDeclIndex
-     * @param comparator
-     * @return a content model validator
-     * @exception RuntimeException
-     */
-    public XSCMValidator getContentModel(XSComplexTypeDecl typeDecl) {
-
-        // REVISIT: can we assume that this method never called for elements of simpleType
-        // content?
-        short contentType = typeDecl.fContentType;
-        if (contentType == XSComplexTypeDecl.CONTENTTYPE_SIMPLE ||
-            contentType == XSComplexTypeDecl.CONTENTTYPE_EMPTY) {
-            return null;
-        }
-
-        XSCMValidator cmValidator = null;
-
-        XSParticleDecl particle = typeDecl.fParticle;
-
-        // This check is performed in XSComplexTypeDecl.
-        //if (cmValidator != null)
-        //    return cmValidator;
-
-
-        if (particle != null)
-            particle = expandParticleTree( (XSParticleDecl)particle);
-
-        // REVISIT: should we expand?? or throw away the expanded tree??
-        //typeDecl.fParticle
-
-        // And create the content model according to the spec type
-
-        if (particle == null) {
-            // create special content model for no element content
-            cmValidator = new XSEmptyCM();
-        }
-        else if (contentType == XSComplexTypeDecl.CONTENTTYPE_MIXED) {
-               //
-              // Create a child model as
-              // per the element-only case
-            cmValidator = createChildModel(particle, true);
-        }
-        else if (contentType == XSComplexTypeDecl.CONTENTTYPE_ELEMENT) {
-            //  This method will create an optimal model for the complexity
-            //  of the element's defined model. If its simple, it will create
-            //  a SimpleContentModel object. If its a simple list, it will
-            //  create a SimpleListContentModel object. If its complex, it
-            //  will create a DFAContentModel object.
-            //
-            cmValidator = createChildModel(particle, false);
-        }
-        else {
-            throw new RuntimeException("Unknown content type for a element decl "
-                                       + "in getElementContentModelValidator() in Grammar class");
-        }
-
-        return cmValidator;
-    }
-
-
-    private XSParticleDecl expandParticleTree( XSParticleDecl particle) {
-
-        // We may want to consider trying to combine this with buildSyntaxTree at some
-        // point (if possible)
-
-        //REVISIT: need access to grammar object
-        //if (!grammar.fDeferParticleExpantion) {
-        //    return particle;
-        //}
-        int maxOccurs = particle.fMaxOccurs;
-        int minOccurs = particle.fMinOccurs;
-        short type = particle.fType;
-        if ((type == XSParticleDecl.PARTICLE_WILDCARD) ||
-            (type == XSParticleDecl.PARTICLE_ELEMENT)) {
-            return expandContentModel(particle, minOccurs, maxOccurs);
-        }
-        else if (type == XSParticleDecl.PARTICLE_CHOICE ||
-                 type == XSParticleDecl.PARTICLE_ALL ||
-                 type == XSParticleDecl.PARTICLE_SEQUENCE) {
-
-            Object left = particle.fValue;
-            Object right = particle.fOtherValue;
-
-            left =  expandParticleTree( (XSParticleDecl)left);
-            if (right != null)
-                right =  expandParticleTree( (XSParticleDecl)right);
-
-            // At this point, by expanding the particle tree, we may have a null left or right
-            if (left==null && right==null)
-                return null;
-
-            if (left == null)
-                return expandContentModel((XSParticleDecl)right, minOccurs, maxOccurs);
-
-            if (right == null)
-                return expandContentModel((XSParticleDecl)left, minOccurs, maxOccurs);
-
-            XSParticleDecl newParticle = new XSParticleDecl();
-            newParticle.fType = particle.fType;
-            newParticle.fValue = left;
-            newParticle.fOtherValue = right;
-            return expandContentModel((XSParticleDecl)newParticle, minOccurs, maxOccurs);
-        }
-        else if (type == XSParticleDecl.PARTICLE_EMPTY) {
-            return null;
-        }
-
-        return particle;
-    }
-
-
-
-    /**
-     * When the element has a 'CONTENTTYPE_ELEMENT' model, this method is called to
-     * create the content model object. It looks for some special case simple
-     * models and creates SimpleContentModel objects for those. For the rest
-     * it creates the standard DFA style model.
-     *
-     * @param grammar
-     * @param fParticleIndex
-     * @return
-     */
-    private XSCMValidator createChildModel(XSParticleDecl particle, boolean isMixed) {
-
-        //
-        //  Get the content spec node for the element we are working on.
-        //  This will tell us what kind of node it is, which tells us what
-        //  kind of model we will try to create.
-        //
-        //XMLContentSpec fParticle = new XMLContentSpec();
-        short type = particle.fType;
-        if (type == XSParticleDecl.PARTICLE_WILDCARD) {
-            // let fall through to build a DFAContentModel
-        }
-        else if (isMixed) {
-            if (type ==XSParticleDecl.PARTICLE_ALL) {
-                // All the nodes under an ALL must be additional ALL nodes and
-                // ELEMENTs (or ELEMENTs under ZERO_OR_ONE nodes.)
-                // We collapse the ELEMENTs into a single vector.
-                XSAllCM allContent = new XSAllCM(false);
-                gatherAllLeaves ((XSParticleDecl)(particle.fValue), allContent);
-                gatherAllLeaves ((XSParticleDecl)(particle.fOtherValue), allContent);
-                return allContent;
-
-            }
-            else if (type == XSParticleDecl.PARTICLE_ZERO_OR_ONE) {
-                 XSParticleDecl left = (XSParticleDecl)particle.fValue;
-
-
-                // An ALL node can appear under a ZERO_OR_ONE node.
-                if (type ==XSParticleDecl.PARTICLE_ALL) {
-                    XSAllCM allContent = new XSAllCM(true);
-                    gatherAllLeaves (left, allContent);
-                    return allContent;
-
-                }
-            }
-            // otherwise, let fall through to build a DFAContentModel
-        }
-        else if (type == XSParticleDecl.PARTICLE_ELEMENT) {
-            //
-            //  Check that the left value is not null, since any content model
-            //  with PCDATA should be MIXED, so we should not have gotten here.
-            //
-            if (particle.fValue == null &&
-                particle.fOtherValue == null)
-                throw new RuntimeException("ImplementationMessages.VAL_NPCD");
-
-            //
-            //  Its a single leaf, so its an 'a' type of content model, i.e.
-            //  just one instance of one element. That one is definitely a
-            //  simple content model.
-            //
-            // pass element declaration
-
-            return new XSSimpleCM(type, (XSElementDecl)particle.fValue);
-        }
-        else if ((type == XSParticleDecl.PARTICLE_CHOICE)
-                 ||  (type == XSParticleDecl.PARTICLE_SEQUENCE)) {
-            //
-            //  Lets see if both of the children are leafs. If so, then it
-            //  it has to be a simple content model
-            //
-            XSParticleDecl left = (XSParticleDecl)particle.fValue;
-            XSParticleDecl right = (XSParticleDecl)particle.fOtherValue;
-
-            if ((right.fType == XSParticleDecl.PARTICLE_ELEMENT)
-                &&  (left.fType == XSParticleDecl.PARTICLE_ELEMENT)) {
-                //
-                //  Its a simple choice or sequence, so we can do a simple
-                //  content model for it.
-                //
-                // pass both element decls
-                return new XSSimpleCM(type, (XSElementDecl)left.fValue, (XSElementDecl)right.fValue);
-            }
-
-        }
-    else if (type == XSParticleDecl.PARTICLE_ALL) {
-
-            XSParticleDecl left = (XSParticleDecl)particle.fValue;
-            XSParticleDecl right = (XSParticleDecl)particle.fOtherValue;
-
-            XSAllCM allContent = new XSAllCM(false);
-
-            gatherAllLeaves (left, allContent);
-            gatherAllLeaves (right, allContent);
-            return allContent;
-        }
-        else if ((type == XSParticleDecl.PARTICLE_ZERO_OR_ONE)
-                 ||  (type == XSParticleDecl.PARTICLE_ZERO_OR_MORE)
-                 ||  (type == XSParticleDecl.PARTICLE_ONE_OR_MORE)) {
-            //
-            //  Its a repetition, so see if its one child is a leaf. If so
-            //  its a repetition of a single element, so we can do a simple
-            //  content model for that.
-            XSParticleDecl left = (XSParticleDecl) particle.fValue;
-
-            if (left.fType == XSParticleDecl.PARTICLE_ELEMENT) {
-                //
-                //  It is, so we can create a simple content model here that
-                //  will check for this repetition. We pass -1 for the unused
-                //  right node.
-                //
-                return new XSSimpleCM(type, (XSElementDecl)left.fValue);
-            }
-            else if (left.fType==XSParticleDecl.PARTICLE_ALL) {
-                 XSAllCM allContent = new XSAllCM(true);
-                gatherAllLeaves (left, allContent);
-                return allContent;
-            }
-
-
-        }
-        else {
-            throw new RuntimeException("ImplementationMessages.VAL_CST");
-        }
-
-        //
-        //  Its not a simple content model, so here we have to create a DFA
-        //  for this element. So we create a DFAContentModel object. He
-        //  encapsulates all of the work to create the DFA.
-        //
-
-        fLeafCount = 0;
-        CMNode node = buildSyntaxTree(particle);
-        return new XSDFACM(node, fLeafCount, isMixed);
-    }
-
-
-
-    private XSParticleDecl expandContentModel(XSParticleDecl particle,
-                                              int minOccurs, int maxOccurs) {
-
-        XSParticleDecl leafParticle = particle;
-        XSParticleDecl optional = null;
-        if (minOccurs==1 && maxOccurs==1) {
-            return particle;
-        }
-        else if (minOccurs==0 && maxOccurs==1) {
-            //zero or one
-            return createParticle ( XSParticleDecl.PARTICLE_ZERO_OR_ONE,particle,null);
-        }
-        else if (minOccurs == 0 && maxOccurs==SchemaSymbols.OCCURRENCE_UNBOUNDED) {
-            //zero or more
-            return createParticle (XSParticleDecl.PARTICLE_ZERO_OR_MORE, particle, null);
-        }
-        else if (minOccurs == 1 && maxOccurs==SchemaSymbols.OCCURRENCE_UNBOUNDED) {
-            //one or more
-            return createParticle (XSParticleDecl.PARTICLE_ONE_OR_MORE, particle, null);
-        }
-        else if (maxOccurs == SchemaSymbols.OCCURRENCE_UNBOUNDED) {
-            // REVISIT: should we handle (maxOccurs - minOccurs) = {1,2} as
-            //          separate case?
-            if (minOccurs<2) {
-            }
-
-            // => a,a,..,a+
-            particle = createParticle (XSParticleDecl.PARTICLE_ONE_OR_MORE,
-                                       particle, null);
-
-            for (int i=0; i < (minOccurs-1); i++) {
-                particle = createParticle (XSParticleDecl.PARTICLE_SEQUENCE, leafParticle, particle);
-            }
-            return particle;
-
-        }
-        else {
-            // {n,m} => a,a,a,...(a),(a),...
-
-
-            if (minOccurs==0) {
-                optional = createParticle (XSParticleDecl.PARTICLE_ZERO_OR_ONE,
-                                           leafParticle,
-                                           null);
-                particle = optional;
-                for (int i=0; i < (maxOccurs-minOccurs-1); i++) {
-                    particle = createParticle (XSParticleDecl.PARTICLE_SEQUENCE,
-                                               particle,
-                                               optional);
-                }
-            }
-            else {
-                for (int i=0; i<(minOccurs-1); i++) {
-                    particle = createParticle (XSParticleDecl.PARTICLE_SEQUENCE,
-                                               particle,
-                                               leafParticle);
-                }
-
-                optional = createParticle(XSParticleDecl.PARTICLE_ZERO_OR_ONE,
-                                          leafParticle,
-                                          null);
-
-                for (int i=0; i < (maxOccurs-minOccurs); i++) {
-                    particle = createParticle(XSParticleDecl.PARTICLE_SEQUENCE,
-                                              particle,
-                                              optional);
-                }
-            }
-        }
-
-        return particle;
-    }
-
-    /**
-     *  Recursively builds an AllContentModel based on a particle tree
-     *  rooted at an ALL node.
-     */
-     private void gatherAllLeaves(XSParticleDecl particle,
-                                        XSAllCM allContent) {
-        Object left = particle.fValue;
-        Object right = particle.fOtherValue;
-        int type = particle.fType;
-
-        if (type == XSParticleDecl.PARTICLE_ALL) {
-
-            // At an all node, visit left and right subtrees
-            gatherAllLeaves ((XSParticleDecl)left, allContent);
-            gatherAllLeaves ((XSParticleDecl) particle.fOtherValue, allContent);
-        }
-        else if (type == XSParticleDecl.PARTICLE_ELEMENT) {
-
-            // At leaf, add the element to list of elements permitted in the all
-            allContent.addElement ((XSElementDecl)left, false);
-        }
-        else if (type == XSParticleDecl.PARTICLE_ZERO_OR_ONE) {
-
-            // At ZERO_OR_ONE node, subtree must be an element
-            // that was specified with minOccurs=0, maxOccurs=1
-            // Add the optional element to list of elements permitted in the all
-
-            if (((XSParticleDecl)left).fType == XSParticleDecl.PARTICLE_ELEMENT) {
-                allContent.addElement ((XSElementDecl)(((XSParticleDecl)left).fValue), true);
-            }
-            else {
-            // report error
-        throw new RuntimeException("ImplementationMessages.VAL_CST");
-            }
-        }
-        else {
-            // report error
-            throw new RuntimeException("ImplementationMessages.VAL_CSTA");
-        }
-    }
-
-    private XSParticleDecl createParticle (short type,
-                                           XSParticleDecl left,
-                                           XSParticleDecl right) {
-
-        XSParticleDecl newParticle = new XSParticleDecl();
-        newParticle.fType = type;
-        newParticle.fValue = (Object) left;
-        newParticle.fOtherValue = (Object)right;
-        return newParticle;
-    }
-
-    // this method is needed to convert a tree of ParticleDecl
-    // nodes into a tree of content models that XSDFACM methods can then use as input.
-    private final CMNode buildSyntaxTree(XSParticleDecl startNode) {
-
-        // We will build a node at this level for the new tree
-        CMNode nodeRet = null;
-        if (startNode.fType == XSParticleDecl.PARTICLE_WILDCARD) {
-            nodeRet = new XSCMLeaf(startNode, fLeafCount++);
-        }
-        //
-        //  If this node is a leaf, then its an easy one. We just add it
-        //  to the tree.
-        //
-        else if (startNode.fType == XSParticleDecl.PARTICLE_ELEMENT) {
-            //
-            //  Create a new leaf node, and pass it the current leaf count,
-            //  which is its DFA state position. Bump the leaf count after
-            //  storing it. This makes the positions zero based since we
-            //  store first and then increment.
-            //
-            nodeRet = new XSCMLeaf(startNode, fLeafCount++);
-        }
-        else {
-            //
-            //  Its not a leaf, so we have to recurse its left and maybe right
-            //  nodes. Save both values before we recurse and trash the node.
-            final XSParticleDecl leftNode = ((XSParticleDecl)startNode.fValue);
-            final XSParticleDecl rightNode = ((XSParticleDecl)startNode.fOtherValue);
-
-            if ((startNode.fType == XSParticleDecl.PARTICLE_CHOICE)
-                ||  (startNode.fType == XSParticleDecl.PARTICLE_SEQUENCE)) {
-                //
-                //  Recurse on both children, and return a binary op node
-                //  with the two created sub nodes as its children. The node
-                //  type is the same type as the source.
-                //
-
-                nodeRet = new XSCMBinOp( startNode.fType, buildSyntaxTree(leftNode)
-                                       , buildSyntaxTree(rightNode));
-            }
-            else if (startNode.fType == XSParticleDecl.PARTICLE_ZERO_OR_MORE
-               || startNode.fType == XSParticleDecl.PARTICLE_ZERO_OR_ONE
-               || startNode.fType == XSParticleDecl.PARTICLE_ONE_OR_MORE) {
-                nodeRet = new XSCMUniOp(startNode.fType, buildSyntaxTree(leftNode));
-            }
-            else {
-                throw new RuntimeException("ImplementationMessages.VAL_CST");
-            }
-        }
-        // And return our new node for this level
-        return nodeRet;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/xs/models/XSAllCM.java b/src/org/apache/xerces/impl/xs/models/XSAllCM.java
deleted file mode 100644
index 28a4654..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSAllCM.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.SubstitutionGroupHandler;
-import org.apache.xerces.impl.xs.XMLSchemaException;
-import org.apache.xerces.impl.xs.XSConstraints;
-
-/**
- * XSAllCM implements XSCMValidator and handles <all>
- *
- * @author Pavani Mukthipudi, Sun Microsystems Inc.
- * @version $Id$
- */
-public class XSAllCM implements XSCMValidator {
-
-    //
-    // Constants
-    //
-
-    // start the content model: did not see any children
-    private static final short STATE_START = 0;
-    private static final short STATE_VALID = 1;
-
-
-    //
-    // Data
-    //
-
-    private XSElementDecl fAllElements[] = new XSElementDecl[10];
-    private boolean fIsOptionalElement[] = new boolean[10];
-    private boolean fHasOptionalContent = false;
-    // private boolean fIsMixed = false;
-
-    private int fNumElements = 0;
-    private int fNumRequired = 0;
-
-    //
-    // Constructors
-    //
-
-    public XSAllCM (boolean hasOptionalContent) {
-        fHasOptionalContent = hasOptionalContent;
-    }
-
-    // REVISIT : do we need this ?
-    // public XSAllCM (boolean hasOptionalContent, boolean isMixed) {
-    //     this(hasOptionalContent);
-    //     fIsMixed = isMixed;
-    // }
-
-    public void addElement (XSElementDecl element, boolean isOptional) {
-
-        // resize arrays if necessary
-        if (fNumElements >= fAllElements.length) {
-            XSElementDecl newAllElements[] = new XSElementDecl [2*fAllElements.length];
-            boolean newIsOptionalElements[] =
-                                      new boolean[2*fIsOptionalElement.length];
-            System.arraycopy(fAllElements, 0, newAllElements, 0,
-                             fAllElements.length);
-            System.arraycopy(fIsOptionalElement, 0, newIsOptionalElements, 0,
-                             fIsOptionalElement.length);
-
-            fAllElements = newAllElements;
-            fIsOptionalElement = newIsOptionalElements;
-        }
-
-        fAllElements[fNumElements] = element;
-        fIsOptionalElement[fNumElements] = isOptional;
-
-        fNumElements++;
-
-        // keeping track of the number of elements that are required
-        if (!isOptional) {
-            fNumRequired++;
-        }
-
-    }
-
-
-    // REVISIT : to implement Unique Particle Attribution
-    // public void checkUniqueParticleAttribution()
-
-
-    //
-    // XSCMValidator methods
-    //
-
-    /**
-     * This methods to be called on entering a first element whose type
-     * has this content model. It will return the initial state of the
-     * content model
-     *
-     * @return Start state of the content model
-     */
-    public int[] startContentModel() {
-
-        int[] state = new int[fNumElements + 1];
-
-        for (int i = 0; i <= fNumElements; i++) {
-            state[i] = STATE_START;
-        }
-        return state;
-    }
-
-
-    /**
-     * The method corresponds to one transition in the content model.
-     *
-     * @param elementName
-     * @param state  Current state
-     * @return an element decl object
-     */
-    public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler) {
-
-        Object matchingDecl = null;
-
-        for (int i = 0; i < fNumElements; i++) {
-
-            matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fAllElements[i]);
-            if (matchingDecl != null) {
-
-                if (currentState[i+1] == STATE_START) {
-                    currentState[i+1] = STATE_VALID;
-                }
-                else if (currentState[i+1] == STATE_VALID) {
-                    // duplicate element
-                    currentState[i+1] = XSCMValidator.FIRST_ERROR;
-                    currentState[0] = XSCMValidator.FIRST_ERROR;
-                }
-                else if (currentState[i+1] == XSCMValidator.FIRST_ERROR) {
-                    currentState[i+1] = XSCMValidator.SUBSEQUENT_ERROR;
-                    currentState[0] = XSCMValidator.SUBSEQUENT_ERROR;
-                }
-
-                if (currentState[0] == STATE_START) {
-                    currentState[0] = STATE_VALID;
-                }
-
-                return matchingDecl;
-            }
-        }
-
-        if (currentState[0] == XSCMValidator.FIRST_ERROR)
-            currentState[0] = XSCMValidator.SUBSEQUENT_ERROR;
-        else if (currentState[0] == STATE_START || currentState[0] == STATE_VALID)
-            currentState[0] = XSCMValidator.FIRST_ERROR;
-
-        return null;
-    }
-
-
-    /**
-     * The method indicates the end of list of children
-     *
-     * @param state  Current state of the content model
-     * @return true if the last state was a valid final state
-     */
-    public boolean endContentModel (int[] currentState) {
-
-        int state = currentState[0];
-
-        if (state == XSCMValidator.FIRST_ERROR || state == XSCMValidator.SUBSEQUENT_ERROR) {
-            return false;
-        }
-
-        // If <all> has minOccurs of zero and there are
-        // no children to validate, it is trivially valid
-
-        if (fHasOptionalContent && fNumElements == 0) {
-            return true;
-        }
-
-        int numRequiredSeen = 0;
-
-        for (int i = 0; i < fNumElements; i++) {
-            if (!fIsOptionalElement[i] && currentState[i+1] != STATE_START)
-                numRequiredSeen++;
-        }
-
-        if (fNumRequired == numRequiredSeen ) {
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * check whether this content violates UPA constraint.
-     *
-     * @param errors to hold the UPA errors
-     * @return true if this content model contains other or list wildcard
-     */
-    public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException {
-        // check whether there is conflict between any two leaves
-        for (int i = 0; i < fNumElements; i++) {
-            for (int j = i+1; j < fNumElements; j++) {
-                if (XSConstraints.overlapUPA(fAllElements[i], fAllElements[j], subGroupHandler)) {
-                    // REVISIT: do we want to report all errors? or just one?
-                    throw new XMLSchemaException("cos-nonambig", new Object[]{fAllElements[i].toString(),
-                                                                              fAllElements[j].toString()});
-                }
-            }
-        }
-
-        return false;
-    }
-
-} // class XSAllCM
-
diff --git a/src/org/apache/xerces/impl/xs/models/XSCMBinOp.java b/src/org/apache/xerces/impl/xs/models/XSCMBinOp.java
deleted file mode 100644
index 365bcc6..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSCMBinOp.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENCEUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.impl.dtd.models.CMNode;
-import org.apache.xerces.impl.dtd.models.CMStateSet;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-
-/**
- *
- * Content model Bin-Op node.
- *
- * @author Neil Graham, IBM
- * @version $$
- */
-public class XSCMBinOp extends CMNode {
-    // -------------------------------------------------------------------
-    //  Constructors
-    // -------------------------------------------------------------------
-    public XSCMBinOp(int type, CMNode leftNode, CMNode rightNode) 
-    {
-        super(type);
-
-        // Insure that its one of the types we require
-        if ((type() != XSParticleDecl.PARTICLE_CHOICE)
-        &&  (type() != XSParticleDecl.PARTICLE_SEQUENCE)) {
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-        }
-
-        // Store the nodes and init any data that needs it
-        fLeftChild = leftNode;
-        fRightChild = rightNode;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, final methods
-    // -------------------------------------------------------------------
-    final CMNode getLeft() {
-        return fLeftChild;
-    }
-
-    final CMNode getRight() {
-        return fRightChild;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, inherited methods
-    // -------------------------------------------------------------------
-    public boolean isNullable() {
-        //
-        //  If its an alternation, then if either child is nullable then
-        //  this node is nullable. If its a concatenation, then both of
-        //  them have to be nullable.
-        //
-        if (type() == XSParticleDecl.PARTICLE_CHOICE)
-            return (fLeftChild.isNullable() || fRightChild.isNullable());
-        else if (type() == XSParticleDecl.PARTICLE_SEQUENCE)
-            return (fLeftChild.isNullable() && fRightChild.isNullable());
-        else
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Protected, inherited methods
-    // -------------------------------------------------------------------
-    protected void calcFirstPos(CMStateSet toSet) {
-        if (type() == XSParticleDecl.PARTICLE_CHOICE) {
-            // Its the the union of the first positions of our children.
-            toSet.setTo(fLeftChild.firstPos());
-            toSet.union(fRightChild.firstPos());
-        }
-         else if (type() == XSParticleDecl.PARTICLE_SEQUENCE) {
-            //
-            //  If our left child is nullable, then its the union of our
-            //  children's first positions. Else is our left child's first
-            //  positions.
-            //
-            toSet.setTo(fLeftChild.firstPos());
-            if (fLeftChild.isNullable())
-                toSet.union(fRightChild.firstPos());
-        }
-         else {
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-        }
-    }
-
-    protected void calcLastPos(CMStateSet toSet) {
-        if (type() == XSParticleDecl.PARTICLE_CHOICE) {
-            // Its the the union of the first positions of our children.
-            toSet.setTo(fLeftChild.lastPos());
-            toSet.union(fRightChild.lastPos());
-        }
-        else if (type() == XSParticleDecl.PARTICLE_SEQUENCE) {
-            //
-            //  If our right child is nullable, then its the union of our
-            //  children's last positions. Else is our right child's last
-            //  positions.
-            //
-            toSet.setTo(fRightChild.lastPos());
-            if (fRightChild.isNullable())
-                toSet.union(fLeftChild.lastPos());
-        }
-        else {
-            throw new RuntimeException("ImplementationMessages.VAL_BST");
-        }
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Private data members
-    //
-    //  fLeftChild
-    //  fRightChild
-    //      These are the references to the two nodes that are on either
-    //      side of this binary operation.
-    // -------------------------------------------------------------------
-    private CMNode  fLeftChild;
-    private CMNode  fRightChild;
-} // XSCMBinOp
-
diff --git a/src/org/apache/xerces/impl/xs/models/XSCMLeaf.java b/src/org/apache/xerces/impl/xs/models/XSCMLeaf.java
deleted file mode 100644
index 4a0e57c..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSCMLeaf.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.impl.dtd.models.CMNode;
-import org.apache.xerces.impl.dtd.models.CMStateSet;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.impl.xs.XSWildcardDecl;
-
-/**
- * Content model leaf node.
- *
- * @author Neil Graham, IBM
- * @version $$
- */
-public class XSCMLeaf
-    extends CMNode {
-
-    //
-    // Data
-    //
-
-    /** This is the leaf particle. */
-    private XSParticleDecl fLeaf = null;
-
-    /**
-     * Part of the algorithm to convert a regex directly to a DFA
-     * numbers each leaf sequentially. If its -1, that means its an
-     * epsilon node. Zero and greater are non-epsilon positions.
-     */
-    private int fPosition = -1;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a content model leaf. */
-    public XSCMLeaf(XSParticleDecl leaf, int position)  {
-        super(leaf.fType);
-
-        // Store the element index and position
-        fLeaf = leaf;
-        fPosition = position;
-    }
-
-    /** Constructs a content model leaf. */
-    public XSCMLeaf(XSParticleDecl leaf)  {
-        this(leaf, -1);
-    }
-
-    //
-    // Package methods
-    //
-
-    final XSParticleDecl getLeaf() {
-        return fLeaf;
-    }
-
-    final int getPosition() {
-        return fPosition;
-    }
-
-    final void setPosition(int newPosition) {
-        fPosition = newPosition;
-    }
-
-    //
-    // CMNode methods
-    //
-
-    // package
-
-    public boolean isNullable() {
-        // Leaf nodes are never nullable unless its an epsilon node
-        return (fPosition == -1);
-    }
-
-    public String toString() {
-        StringBuffer strRet = new StringBuffer(fLeaf.fValue.toString());
-        if (fPosition >= 0) {
-            strRet.append
-            (
-                " (Pos:"
-                + new Integer(fPosition).toString()
-                + ")"
-            );
-        }
-        return strRet.toString();
-    }
-
-    // protected
-
-    protected void calcFirstPos(CMStateSet toSet) {
-        // If we are an epsilon node, then the first pos is an empty set
-        if (fPosition == -1)
-            toSet.zeroBits();
-
-        // Otherwise, its just the one bit of our position
-        else
-            toSet.setBit(fPosition);
-    }
-
-    protected void calcLastPos(CMStateSet toSet) {
-        // If we are an epsilon node, then the last pos is an empty set
-        if (fPosition == -1)
-            toSet.zeroBits();
-
-        // Otherwise, its just the one bit of our position
-        else
-            toSet.setBit(fPosition);
-    }
-
-} // class XSCMLeaf
-
-
diff --git a/src/org/apache/xerces/impl/xs/models/XSCMUniOp.java b/src/org/apache/xerces/impl/xs/models/XSCMUniOp.java
deleted file mode 100644
index 132287a..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSCMUniOp.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.impl.dtd.models.CMNode;
-import org.apache.xerces.impl.dtd.models.CMStateSet;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-
-/**
- *
- * Content model Uni-Op node.
- *
- * @author Neil Graham, IBM
- * @version $$
- */
-public class XSCMUniOp extends CMNode {
-    // -------------------------------------------------------------------
-    //  Constructors
-    // -------------------------------------------------------------------
-    public XSCMUniOp(int type, CMNode childNode) {
-        super(type);
-
-        // Insure that its one of the types we require
-        if ((type() != XSParticleDecl.PARTICLE_ZERO_OR_ONE)
-        &&  (type() != XSParticleDecl.PARTICLE_ZERO_OR_MORE)
-        &&  (type() != XSParticleDecl.PARTICLE_ONE_OR_MORE)) {
-            throw new RuntimeException("ImplementationMessages.VAL_UST");
-        }
-
-        // Store the node and init any data that needs it
-        fChild = childNode;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, final methods
-    // -------------------------------------------------------------------
-    final CMNode getChild() {
-        return fChild;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Package, inherited methods
-    // -------------------------------------------------------------------
-    public boolean isNullable() {
-        //
-        //  For debugging purposes, make sure we got rid of all non '*'
-        //  repetitions. Otherwise, '*' style nodes are always nullable.
-        //
-        if (type() == XSParticleDecl.PARTICLE_ONE_OR_MORE)
-	        return fChild.isNullable();
-	    else
-	        return true;
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Protected, inherited methods
-    // -------------------------------------------------------------------
-    protected void calcFirstPos(CMStateSet toSet) {
-        // Its just based on our child node's first pos
-        toSet.setTo(fChild.firstPos());
-    }
-
-    protected void calcLastPos(CMStateSet toSet) {
-        // Its just based on our child node's last pos
-        toSet.setTo(fChild.lastPos());
-    }
-
-
-    // -------------------------------------------------------------------
-    //  Private data members
-    //
-    //  fChild
-    //      This is the reference to the one child that we have for this
-    //      unary operation.
-    // -------------------------------------------------------------------
-    private CMNode  fChild;
-} // XSCMUniOp
-
diff --git a/src/org/apache/xerces/impl/xs/models/XSCMValidator.java b/src/org/apache/xerces/impl/xs/models/XSCMValidator.java
deleted file mode 100644
index de87563..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSCMValidator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.xs.SubstitutionGroupHandler;
-import org.apache.xerces.impl.xs.XMLSchemaException;
-
-/**
- * Note: State of the content model is stored in the validator
- *
- * @author Sandy Gao, IBM
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public interface XSCMValidator {
-
-
-    public static final short FIRST_ERROR = -1;
-
-    // on subsequent errors the validator should not report
-    // an error
-    //
-    public static final short SUBSEQUENT_ERROR = -2;
-
-    /**
-     * This methods to be called on entering a first element whose type
-     * has this content model. It will return the initial state of the content model
-     *
-     * @return Start state of the content model
-     */
-    public int[] startContentModel();
-
-
-    /**
-     * The method corresponds to one transaction in the content model.
-     *
-     * @param elementName
-     * @param state  Current state
-     * @return element decl or wildcard decl that
-     *         corresponds to the element from the Schema grammar
-     */
-    public Object oneTransition (QName elementName, int[] state, SubstitutionGroupHandler subGroupHandler);
-
-
-    /**
-     * The method indicates the end of list of children
-     *
-     * @param state  Current state of the content model
-     * @return true if the last state was a valid final state
-     */
-    public boolean endContentModel (int[] state);
-
-    /**
-     * check whether this content violates UPA constraint.
-     *
-     * @param errors to hold the UPA errors
-     * @return true if this content model contains other or list wildcard
-     */
-    public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException;
-
-} // XSCMValidator
\ No newline at end of file
diff --git a/src/org/apache/xerces/impl/xs/models/XSDFACM.java b/src/org/apache/xerces/impl/xs/models/XSDFACM.java
deleted file mode 100644
index bb4152f..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSDFACM.java
+++ /dev/null
@@ -1,1007 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.impl.msg.ImplementationMessages;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.dtd.models.CMNode;
-import org.apache.xerces.impl.dtd.models.CMStateSet;
-import org.apache.xerces.impl.xs.SubstitutionGroupHandler;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.impl.xs.XSWildcardDecl;
-import org.apache.xerces.impl.xs.XMLSchemaException;
-import org.apache.xerces.impl.xs.XSConstraints;
-
-/**
- * DFAContentModel is the implementation of XSCMValidator that does
- * all of the non-trivial element content validation. This class does
- * the conversion from the regular expression to the DFA that
- * it then uses in its validation algorithm.
- *
- * @author Neil Graham, IBM
- * @version $Id$
- */
-public class XSDFACM
-    implements XSCMValidator {
-
-    //
-    // Constants
-    //
-    private static final boolean DEBUG = false;
-
-    // special strings
-
-    // debugging
-
-    /** Set to true to debug content model validation. */
-    private static final boolean DEBUG_VALIDATE_CONTENT = false;
-
-    //
-    // Data
-    //
-
-    /**
-     * This is the map of unique input symbol elements to indices into
-     * each state's per-input symbol transition table entry. This is part
-     * of the built DFA information that must be kept around to do the
-     * actual validation.  Note tat since either XSElementDecl or XSParticleDecl object
-     * can live here, we've got to use an Object.
-     */
-    private XSParticleDecl fElemMap[] = null;
-
-    /**
-     * This is a map of whether the element map contains information
-     * related to ANY models.
-     */
-    private int fElemMapType[] = null;
-
-    /** The element map size. */
-    private int fElemMapSize = 0;
-
-    /* Used to indicate a mixed model */
-    private boolean fMixed;
-
-    /**
-     * The string index for the 'end of content' string that we add to
-     * the string pool. This is used as the special name of an element
-     * that represents the end of the syntax tree.
-     */
-    private static final XSParticleDecl fEOCParticle = new XSParticleDecl();
-    static {
-        fEOCParticle.fType = XSParticleDecl.PARTICLE_ELEMENT;
-    }
-
-    /**
-     * The NFA position of the special EOC (end of content) node. This
-     * is saved away since it's used during the DFA build.
-     */
-    private int fEOCPos = 0;
-
-    /**
-     * This is an array of booleans, one per state (there are
-     * fTransTableSize states in the DFA) that indicates whether that
-     * state is a final state.
-     */
-    private boolean fFinalStateFlags[] = null;
-
-    /**
-     * The list of follow positions for each NFA position (i.e. for each
-     * non-epsilon leaf node.) This is only used during the building of
-     * the DFA, and is let go afterwards.
-     */
-    private CMStateSet fFollowList[] = null;
-
-    /**
-     * This is the head node of our intermediate representation. It is
-     * only non-null during the building of the DFA (just so that it
-     * does not have to be passed all around.) Once the DFA is built,
-     * this is no longer required so its nulled out.
-     */
-    private CMNode fHeadNode = null;
-
-    /**
-     * The count of leaf nodes. This is an important number that set some
-     * limits on the sizes of data structures in the DFA process.
-     */
-    private int fLeafCount = 0;
-
-    /**
-     * An array of non-epsilon leaf nodes, which is used during the DFA
-     * build operation, then dropped.
-     */
-    private XSCMLeaf fLeafList[] = null;
-
-    /** Array mapping ANY types to the leaf list. */
-    private int fLeafListType[] = null;
-
-    /**
-     * This is the transition table that is the main by product of all
-     * of the effort here. It is an array of arrays of ints. The first
-     * dimension is the number of states we end up with in the DFA. The
-     * second dimensions is the number of unique elements in the content
-     * model (fElemMapSize). Each entry in the second dimension indicates
-     * the new state given that input for the first dimension's start
-     * state.
-     * <p>
-     * The fElemMap array handles mapping from element indexes to
-     * positions in the second dimension of the transition table.
-     */
-    private int fTransTable[][] = null;
-
-    /**
-     * The number of valid entries in the transition table, and in the other
-     * related tables such as fFinalStateFlags.
-     */
-    private int fTransTableSize = 0;
-
-    /**
-     * Flag that indicates that even though we have a "complicated"
-     * content model, it is valid to have no content. In other words,
-     * all parts of the content model are optional. For example:
-     * <pre>
-     *      &lt;!ELEMENT AllOptional (Optional*,NotRequired?)&gt;
-     * </pre>
-     */
-    private boolean fEmptyContentIsValid = false;
-
-    // temp variables
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a DFA content model.
-     *
-     * @param symbolTable    The symbol table.
-     * @param syntaxTree    The syntax tree of the content model.
-     * @param leafCount     The number of leaves.
-     *
-     * @exception RuntimeException Thrown if DFA can't be built.
-     */
-
-   public XSDFACM(CMNode syntaxTree,
-                          int leafCount) {
-       this(syntaxTree, leafCount, false);
-   }
-
-    /**
-     * Constructs a DFA content model.
-     *
-     * @param symbolTable    The symbol table.
-     * @param syntaxTree    The syntax tree of the content model.
-     * @param leafCount     The number of leaves.
-     *
-     * @exception RuntimeException Thrown if DFA can't be built.
-     */
-
-   public XSDFACM(CMNode syntaxTree,
-                          int leafCount, boolean mixed) {
-
-        // Store away our index and pools in members
-        fLeafCount = leafCount;
-
-        //
-        //  Create some string pool indexes that represent the names of some
-        //  magical nodes in the syntax tree.
-        //  (already done in static initialization...
-        //
-
-        fMixed = mixed;
-
-        //
-        //  Ok, so lets grind through the building of the DFA. This method
-        //  handles the high level logic of the algorithm, but it uses a
-        //  number of helper classes to do its thing.
-        //
-        //  In order to avoid having hundreds of references to the error and
-        //  string handlers around, this guy and all of his helper classes
-        //  just throw a simple exception and we then pass it along.
-        //
-
-        if(DEBUG_VALIDATE_CONTENT) {
-            XSDFACM.time -= System.currentTimeMillis();
-        }
-
-        buildDFA(syntaxTree);
-
-        if(DEBUG_VALIDATE_CONTENT) {
-            XSDFACM.time += System.currentTimeMillis();
-            System.out.println("DFA build: " + XSDFACM.time + "ms");
-        }
-    }
-
-    private static long time = 0;
-
-    //
-    // XSCMValidator methods
-    //
-
-    /**
-     * check whether the given state is one of the final states
-     *
-     * @param state       the state to check
-     *
-     * @return whether it's a final state
-     */
-    public boolean isFinalState (int state) {
-        return (state < 0)? false :
-            fFinalStateFlags[state];
-    }
-
-    /**
-     * one transition only
-     *
-     * @param curElem     The current element's QName
-     * @param stateStack  stack to store the previous state
-     * @param curPos      the current position of the stack
-     *
-     * @return:  null if transition is invalid; otherwise the Object corresponding to the
-     *      XSElementDecl or XSWildcardDecl identified.  Also, the
-     *      state array will be modified to include the new state; this so that the validator can
-     *      store it away.
-     *
-     * @exception RuntimeException thrown on error
-     */
-    public Object oneTransition(QName curElem, int[] state, SubstitutionGroupHandler subGroupHandler) {
-        int curState = state[0];
-
-        if(curState == XSCMValidator.FIRST_ERROR || curState == XSCMValidator.SUBSEQUENT_ERROR) {
-            // there was an error last time; so just go find correct Object in fElemmMap.
-            // ... after resetting state[0].
-            if(curState == XSCMValidator.FIRST_ERROR)
-                state[0] = XSCMValidator.SUBSEQUENT_ERROR;
-
-            return findMatchingDecl(curElem, subGroupHandler);
-        }
-
-        int nextState = 0;
-        int elemIndex = 0;
-        Object matchingDecl = null;
-
-        for (; elemIndex < fElemMapSize; elemIndex++) {
-            int type = fElemMapType[elemIndex] ;
-            if (type == XSParticleDecl.PARTICLE_ELEMENT) {
-                matchingDecl = subGroupHandler.getMatchingElemDecl(curElem, (XSElementDecl)fElemMap[elemIndex].fValue);
-
-                if (matchingDecl != null) {
-                    nextState = fTransTable[curState][elemIndex];
-                    if (nextState != -1)
-                        break;
-                }
-            }
-            else if (type == XSParticleDecl.PARTICLE_WILDCARD) {
-                if(((XSWildcardDecl)fElemMap[elemIndex].fValue).allowNamespace(curElem.uri)) {
-                    matchingDecl = fElemMap[elemIndex].fValue;
-                    nextState = fTransTable[curState][elemIndex];
-                    if (nextState != -1)
-                      break;
-                }
-            }
-        }
-
-        // if we still can't find a match, set the state to first_error
-        // and return null
-        if (elemIndex == fElemMapSize) {
-            state[0] = XSCMValidator.FIRST_ERROR;
-            return findMatchingDecl(curElem, subGroupHandler);
-        }
-
-        state[0] = nextState;
-        return matchingDecl;
-    } // oneTransition(QName, int[], SubstitutionGroupHandler):  Object
-
-    Object findMatchingDecl(QName curElem, SubstitutionGroupHandler subGroupHandler) {
-        Object matchingDecl = null;
-
-        for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
-            int type = fElemMapType[elemIndex] ;
-            if (type == XSParticleDecl.PARTICLE_ELEMENT) {
-                matchingDecl = subGroupHandler.getMatchingElemDecl(curElem, (XSElementDecl)fElemMap[elemIndex].fValue);
-                if (matchingDecl != null) {
-                    return matchingDecl;
-                }
-            }
-            else if (type == XSParticleDecl.PARTICLE_WILDCARD) {
-                if(((XSWildcardDecl)fElemMap[elemIndex].fValue).allowNamespace(curElem.uri))
-                    return fElemMap[elemIndex].fValue;
-            }
-        }
-
-        return null;
-    }
-
-    // This method returns the start states of the content model.
-    public int[] startContentModel() {
-        int[] val = new int[1];
-        val[0]=0;
-        return val;
-    } // startContentModel():int[]
-
-    // this method returns whether the last state was a valid final state
-    public boolean endContentModel(int[] state) {
-        return fFinalStateFlags[state[0]];
-    } // endContentModel(int[]):  boolean
-
-    // Killed off whatCanGoHere; we may need it for DOM canInsert(...) etc.,
-    // but we can put it back later.
-
-    //
-    // Private methods
-    //
-
-    /**
-     * Builds the internal DFA transition table from the given syntax tree.
-     *
-     * @param syntaxTree The syntax tree.
-     *
-     * @exception RuntimeException Thrown if DFA cannot be built.
-     */
-    private void buildDFA(CMNode syntaxTree) {
-        //
-        //  The first step we need to take is to rewrite the content model
-        //  using our CMNode objects, and in the process get rid of any
-        //  repetition short cuts, converting them into '*' style repetitions
-        //  or getting rid of repetitions altogether.
-        //
-        //  The conversions done are:
-        //
-        //  x+ -> (x|x*)
-        //  x? -> (x|epsilon)
-        //
-        //  This is a relatively complex scenario. What is happening is that
-        //  we create a top level binary node of which the special EOC value
-        //  is set as the right side node. The the left side is set to the
-        //  rewritten syntax tree. The source is the original content model
-        //  info from the decl pool. The rewrite is done by buildSyntaxTree()
-        //  which recurses the decl pool's content of the element and builds
-        //  a new tree in the process.
-        //
-        //  Note that, during this operation, we set each non-epsilon leaf
-        //  node's DFA state position and count the number of such leafs, which
-        //  is left in the fLeafCount member.
-        //
-        //  The nodeTmp object is passed in just as a temp node to use during
-        //  the recursion. Otherwise, we'd have to create a new node on every
-        //  level of recursion, which would be piggy in Java (as is everything
-        //  for that matter.)
-        //
-
-        /* MODIFIED (Jan, 2001)
-         *
-         * Use following rules.
-         *   nullable(x+) := nullable(x), first(x+) := first(x),  last(x+) := last(x)
-         *   nullable(x?) := true, first(x?) := first(x),  last(x?) := last(x)
-         *
-         * The same computation of follow as x* is applied to x+
-         *
-         * The modification drastically reduces computation time of
-         * "(a, (b, a+, (c, (b, a+)+, a+, (d,  (c, (b, a+)+, a+)+, (b, a+)+, a+)+)+)+)+"
-         */
-
-        XSCMLeaf nodeEOC = new XSCMLeaf(fEOCParticle);
-        fHeadNode = new XSCMBinOp(
-        XSParticleDecl.PARTICLE_SEQUENCE
-            , syntaxTree
-            , nodeEOC
-        );
-
-        //
-        //  And handle specially the EOC node, which also must be numbered
-        //  and counted as a non-epsilon leaf node. It could not be handled
-        //  in the above tree build because it was created before all that
-        //  started. We save the EOC position since its used during the DFA
-        //  building loop.
-        //
-        fEOCPos = fLeafCount;
-        nodeEOC.setPosition(fLeafCount++);
-
-        //
-        //  Ok, so now we have to iterate the new tree and do a little more
-        //  work now that we know the leaf count. One thing we need to do is
-        //  to calculate the first and last position sets of each node. This
-        //  is cached away in each of the nodes.
-        //
-        //  Along the way we also set the leaf count in each node as the
-        //  maximum state count. They must know this in order to create their
-        //  first/last pos sets.
-        //
-        //  We also need to build an array of references to the non-epsilon
-        //  leaf nodes. Since we iterate it in the same way as before, this
-        //  will put them in the array according to their position values.
-        //
-        fLeafList = new XSCMLeaf[fLeafCount];
-        fLeafListType = new int[fLeafCount];
-        postTreeBuildInit(fHeadNode, 0);
-
-        //
-        //  And, moving onward... We now need to build the follow position
-        //  sets for all the nodes. So we allocate an array of state sets,
-        //  one for each leaf node (i.e. each DFA position.)
-        //
-        fFollowList = new CMStateSet[fLeafCount];
-        for (int index = 0; index < fLeafCount; index++)
-            fFollowList[index] = new CMStateSet(fLeafCount);
-        calcFollowList(fHeadNode);
-        //
-        //  And finally the big push... Now we build the DFA using all the
-        //  states and the tree we've built up. First we set up the various
-        //  data structures we are going to use while we do this.
-        //
-        //  First of all we need an array of unique element names in our
-        //  content model. For each transition table entry, we need a set of
-        //  contiguous indices to represent the transitions for a particular
-        //  input element. So we need to a zero based range of indexes that
-        //  map to element types. This element map provides that mapping.
-        //
-        fElemMap = new XSParticleDecl[fLeafCount];
-        fElemMapType = new int[fLeafCount];
-        fElemMapSize = 0;
-        for (int outIndex = 0; outIndex < fLeafCount; outIndex++) {
-            // optimization from Henry Zongaro:
-            //fElemMap[outIndex] = new Object ();
-            fElemMap[outIndex] = null;
-
-            int inIndex = 0;
-            final XSParticleDecl decl = fLeafList[outIndex].getLeaf();
-            for (; inIndex < fElemMapSize; inIndex++) {
-                if (decl == fElemMap[inIndex])
-                    break;
-            }
-
-            // If it was not in the list, then add it, if not the EOC node
-            if (inIndex == fElemMapSize) {
-                fElemMap[fElemMapSize] = decl;
-                fElemMapType[fElemMapSize] = fLeafListType[outIndex];
-                fElemMapSize++;
-            }
-        }
-
-        // the last entry in the element map must be the EOC element.
-        // remove it from the map.
-        if (DEBUG) {
-            if (fElemMap[fElemMapSize-1] != fEOCParticle)
-                System.err.println("interal error in DFA: last element is not EOC.");
-        }
-        fElemMapSize--;
-
-        /***
-         * Optimization(Jan, 2001); We sort fLeafList according to
-         * elemIndex which is *uniquely* associated to each leaf.
-         * We are *assuming* that each element appears in at least one leaf.
-         **/
-
-        int[] fLeafSorter = new int[fLeafCount + fElemMapSize];
-        int fSortCount = 0;
-
-        for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
-            final XSParticleDecl decl = fElemMap[elemIndex];
-            for (int leafIndex = 0; leafIndex < fLeafCount; leafIndex++) {
-                if (decl == fLeafList[leafIndex].getLeaf())
-                    fLeafSorter[fSortCount++] = leafIndex;
-            }
-            fLeafSorter[fSortCount++] = -1;
-        }
-
-        /* Optimization(Jan, 2001) */
-
-        //
-        //  Next lets create some arrays, some that hold transient
-        //  information during the DFA build and some that are permament.
-        //  These are kind of sticky since we cannot know how big they will
-        //  get, but we don't want to use any Java collections because of
-        //  performance.
-        //
-        //  Basically they will probably be about fLeafCount*2 on average,
-        //  but can be as large as 2^(fLeafCount*2), worst case. So we start
-        //  with fLeafCount*4 as a middle ground. This will be very unlikely
-        //  to ever have to expand, though it if does, the overhead will be
-        //  somewhat ugly.
-        //
-        int curArraySize = fLeafCount * 4;
-        CMStateSet[] statesToDo = new CMStateSet[curArraySize];
-        fFinalStateFlags = new boolean[curArraySize];
-        fTransTable = new int[curArraySize][];
-
-        //
-        //  Ok we start with the initial set as the first pos set of the
-        //  head node (which is the seq node that holds the content model
-        //  and the EOC node.)
-        //
-        CMStateSet setT = fHeadNode.firstPos();
-
-        //
-        //  Init our two state flags. Basically the unmarked state counter
-        //  is always chasing the current state counter. When it catches up,
-        //  that means we made a pass through that did not add any new states
-        //  to the lists, at which time we are done. We could have used a
-        //  expanding array of flags which we used to mark off states as we
-        //  complete them, but this is easier though less readable maybe.
-        //
-        int unmarkedState = 0;
-        int curState = 0;
-
-        //
-        //  Init the first transition table entry, and put the initial state
-        //  into the states to do list, then bump the current state.
-        //
-        fTransTable[curState] = makeDefStateList();
-        statesToDo[curState] = setT;
-        curState++;
-
-        /* Optimization(Jan, 2001); This is faster for
-         * a large content model such as, "(t001+|t002+|.... |t500+)".
-         */
-
-        java.util.Hashtable stateTable = new java.util.Hashtable();
-
-        /* Optimization(Jan, 2001) */
-
-        //
-        //  Ok, almost done with the algorithm... We now enter the
-        //  loop where we go until the states done counter catches up with
-        //  the states to do counter.
-        //
-        while (unmarkedState < curState) {
-            //
-            //  Get the first unmarked state out of the list of states to do.
-            //  And get the associated transition table entry.
-            //
-            setT = statesToDo[unmarkedState];
-            int[] transEntry = fTransTable[unmarkedState];
-
-            // Mark this one final if it contains the EOC state
-            fFinalStateFlags[unmarkedState] = setT.getBit(fEOCPos);
-
-            // Bump up the unmarked state count, marking this state done
-            unmarkedState++;
-
-            // Loop through each possible input symbol in the element map
-            CMStateSet newSet = null;
-            /* Optimization(Jan, 2001) */
-            int sorterIndex = 0;
-            /* Optimization(Jan, 2001) */
-            for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
-                //
-                //  Build up a set of states which is the union of all of
-                //  the follow sets of DFA positions that are in the current
-                //  state. If we gave away the new set last time through then
-                //  create a new one. Otherwise, zero out the existing one.
-                //
-                if (newSet == null)
-                    newSet = new CMStateSet(fLeafCount);
-                else
-                    newSet.zeroBits();
-
-                /* Optimization(Jan, 2001) */
-                int leafIndex = fLeafSorter[sorterIndex++];
-
-                while (leafIndex != -1) {
-                    // If this leaf index (DFA position) is in the current set...
-                    if (setT.getBit(leafIndex)) {
-                        //
-                        //  If this leaf is the current input symbol, then we
-                        //  want to add its follow list to the set of states to
-                        //  transition to from the current state.
-                        //
-                        newSet.union(fFollowList[leafIndex]);
-                    }
-
-                   leafIndex = fLeafSorter[sorterIndex++];
-                }
-                /* Optimization(Jan, 2001) */
-
-                //
-                //  If this new set is not empty, then see if its in the list
-                //  of states to do. If not, then add it.
-                //
-                if (!newSet.isEmpty()) {
-                    //
-                    //  Search the 'states to do' list to see if this new
-                    //  state set is already in there.
-                    //
-
-                    /* Optimization(Jan, 2001) */
-                    Integer stateObj = (Integer)stateTable.get(newSet);
-                    int stateIndex = (stateObj == null ? curState : stateObj.intValue());
-                    /* Optimization(Jan, 2001) */
-
-                    // If we did not find it, then add it
-                    if (stateIndex == curState) {
-                        //
-                        //  Put this new state into the states to do and init
-                        //  a new entry at the same index in the transition
-                        //  table.
-                        //
-                        statesToDo[curState] = newSet;
-                        fTransTable[curState] = makeDefStateList();
-
-                        /* Optimization(Jan, 2001) */
-                        stateTable.put(newSet, new Integer(curState));
-                        /* Optimization(Jan, 2001) */
-
-                        // We now have a new state to do so bump the count
-                        curState++;
-
-                        //
-                        //  Null out the new set to indicate we adopted it.
-                        //  This will cause the creation of a new set on the
-                        //  next time around the loop.
-                        //
-                        newSet = null;
-                    }
-
-                    //
-                    //  Now set this state in the transition table's entry
-                    //  for this element (using its index), with the DFA
-                    //  state we will move to from the current state when we
-                    //  see this input element.
-                    //
-                    transEntry[elemIndex] = stateIndex;
-
-                    // Expand the arrays if we're full
-                    if (curState == curArraySize) {
-                        //
-                        //  Yikes, we overflowed the initial array size, so
-                        //  we've got to expand all of these arrays. So adjust
-                        //  up the size by 50% and allocate new arrays.
-                        //
-                        final int newSize = (int)(curArraySize * 1.5);
-                        CMStateSet[] newToDo = new CMStateSet[newSize];
-                        boolean[] newFinalFlags = new boolean[newSize];
-                        int[][] newTransTable = new int[newSize][];
-
-                        // Copy over all of the existing content
-                        for (int expIndex = 0; expIndex < curArraySize; expIndex++) {
-                            newToDo[expIndex] = statesToDo[expIndex];
-                            newFinalFlags[expIndex] = fFinalStateFlags[expIndex];
-                            newTransTable[expIndex] = fTransTable[expIndex];
-                        }
-
-                        // Store the new array size
-                        curArraySize = newSize;
-                        statesToDo = newToDo;
-                        fFinalStateFlags = newFinalFlags;
-                        fTransTable = newTransTable;
-                    }
-                }
-            }
-        }
-
-        // Check to see if we can set the fEmptyContentIsValid flag.
-        fEmptyContentIsValid = ((XSCMBinOp)fHeadNode).getLeft().isNullable();
-
-        //
-        //  And now we can say bye bye to the temp representation since we've
-        //  built the DFA.
-        //
-        if (DEBUG_VALIDATE_CONTENT)
-            dumpTree(fHeadNode, 0);
-        fHeadNode = null;
-        fLeafList = null;
-        fFollowList = null;
-
-    }
-
-    /**
-     * Calculates the follow list of the current node.
-     *
-     * @param nodeCur The curent node.
-     *
-     * @exception RuntimeException Thrown if follow list cannot be calculated.
-     */
-    private void calcFollowList(CMNode nodeCur) {
-        // Recurse as required
-        if (nodeCur.type() == XSParticleDecl.PARTICLE_CHOICE) {
-            // Recurse only
-            calcFollowList(((XSCMBinOp)nodeCur).getLeft());
-            calcFollowList(((XSCMBinOp)nodeCur).getRight());
-        }
-         else if (nodeCur.type() == XSParticleDecl.PARTICLE_SEQUENCE) {
-            // Recurse first
-            calcFollowList(((XSCMBinOp)nodeCur).getLeft());
-            calcFollowList(((XSCMBinOp)nodeCur).getRight());
-
-            //
-            //  Now handle our level. We use our left child's last pos
-            //  set and our right child's first pos set, so go ahead and
-            //  get them ahead of time.
-            //
-            final CMStateSet last  = ((XSCMBinOp)nodeCur).getLeft().lastPos();
-            final CMStateSet first = ((XSCMBinOp)nodeCur).getRight().firstPos();
-
-            //
-            //  Now, for every position which is in our left child's last set
-            //  add all of the states in our right child's first set to the
-            //  follow set for that position.
-            //
-            for (int index = 0; index < fLeafCount; index++) {
-                if (last.getBit(index))
-                    fFollowList[index].union(first);
-            }
-        }
-         else if (nodeCur.type() == XSParticleDecl.PARTICLE_ZERO_OR_MORE
-        || nodeCur.type() == XSParticleDecl.PARTICLE_ONE_OR_MORE) {
-            // Recurse first
-            calcFollowList(((XSCMUniOp)nodeCur).getChild());
-
-            //
-            //  Now handle our level. We use our own first and last position
-            //  sets, so get them up front.
-            //
-            final CMStateSet first = nodeCur.firstPos();
-            final CMStateSet last  = nodeCur.lastPos();
-
-            //
-            //  For every position which is in our last position set, add all
-            //  of our first position states to the follow set for that
-            //  position.
-            //
-            for (int index = 0; index < fLeafCount; index++) {
-                if (last.getBit(index))
-                    fFollowList[index].union(first);
-            }
-        }
-
-        else if (nodeCur.type() == XSParticleDecl.PARTICLE_ZERO_OR_ONE) {
-            // Recurse only
-            calcFollowList(((XSCMUniOp)nodeCur).getChild());
-        }
-
-    }
-
-    /**
-     * Dumps the tree of the current node to standard output.
-     *
-     * @param nodeCur The current node.
-     * @param level   The maximum levels to output.
-     *
-     * @exception RuntimeException Thrown on error.
-     */
-    private void dumpTree(CMNode nodeCur, int level) {
-        for (int index = 0; index < level; index++)
-            System.out.print("   ");
-
-        int type = nodeCur.type();
-
-        switch(type ) {
-
-        case XSParticleDecl.PARTICLE_CHOICE:
-        case XSParticleDecl.PARTICLE_SEQUENCE: {
-            if (type == XSParticleDecl.PARTICLE_CHOICE)
-                System.out.print("Choice Node ");
-            else
-                System.out.print("Seq Node ");
-
-            if (nodeCur.isNullable())
-                System.out.print("Nullable ");
-
-            System.out.print("firstPos=");
-            System.out.print(nodeCur.firstPos().toString());
-            System.out.print(" lastPos=");
-            System.out.println(nodeCur.lastPos().toString());
-
-            dumpTree(((XSCMBinOp)nodeCur).getLeft(), level+1);
-            dumpTree(((XSCMBinOp)nodeCur).getRight(), level+1);
-            break;
-        }
-        case XSParticleDecl.PARTICLE_ZERO_OR_MORE:
-        case XSParticleDecl.PARTICLE_ONE_OR_MORE:
-        case XSParticleDecl.PARTICLE_ZERO_OR_ONE: {
-            System.out.print("Rep Node ");
-
-            if (nodeCur.isNullable())
-                System.out.print("Nullable ");
-
-            System.out.print("firstPos=");
-            System.out.print(nodeCur.firstPos().toString());
-            System.out.print(" lastPos=");
-            System.out.println(nodeCur.lastPos().toString());
-
-            dumpTree(((XSCMUniOp)nodeCur).getChild(), level+1);
-            break;
-        }
-        case XSParticleDecl.PARTICLE_ELEMENT: {
-            System.out.print
-            (
-                "Leaf: (pos="
-                + ((XSCMLeaf)nodeCur).getPosition()
-                + "), "
-                + ((XSCMLeaf)nodeCur).getLeaf().fValue
-                + "(elemIndex="
-                + ((XSCMLeaf)nodeCur).getLeaf().fValue
-                + ") "
-            );
-
-            if (nodeCur.isNullable())
-                System.out.print(" Nullable ");
-
-            System.out.print("firstPos=");
-            System.out.print(nodeCur.firstPos().toString());
-            System.out.print(" lastPos=");
-            System.out.println(nodeCur.lastPos().toString());
-            break;
-        }
-        case XSParticleDecl.PARTICLE_WILDCARD:
-              System.out.print("Any Node: ");
-
-            System.out.print("firstPos=");
-            System.out.print(nodeCur.firstPos().toString());
-            System.out.print(" lastPos=");
-            System.out.println(nodeCur.lastPos().toString());
-            break;
-        default: {
-            throw new RuntimeException("ImplementationMessages.VAL_NIICM");
-        }
-        }
-
-    }
-
-
-    /**
-     * -1 is used to represent bad transitions in the transition table
-     * entry for each state. So each entry is initialized to an all -1
-     * array. This method creates a new entry and initializes it.
-     */
-    private int[] makeDefStateList()
-    {
-        int[] retArray = new int[fElemMapSize];
-        for (int index = 0; index < fElemMapSize; index++)
-            retArray[index] = -1;
-        return retArray;
-    }
-
-    /** Post tree build initialization. */
-    private int postTreeBuildInit(CMNode nodeCur, int curIndex) throws RuntimeException {
-        // Set the maximum states on this node
-        nodeCur.setMaxStates(fLeafCount);
-
-        // Recurse as required
-        if (nodeCur.type() == XSParticleDecl.PARTICLE_WILDCARD) {
-            fLeafList[curIndex] = (XSCMLeaf)nodeCur;
-            fLeafListType[curIndex] = XSParticleDecl.PARTICLE_WILDCARD;
-            curIndex++;
-        }
-        else if ((nodeCur.type() == XSParticleDecl.PARTICLE_CHOICE)
-        ||  (nodeCur.type() == XSParticleDecl.PARTICLE_SEQUENCE))
-        {
-            curIndex = postTreeBuildInit(((XSCMBinOp)nodeCur).getLeft(), curIndex);
-            curIndex = postTreeBuildInit(((XSCMBinOp)nodeCur).getRight(), curIndex);
-        }
-         else if (nodeCur.type() == XSParticleDecl.PARTICLE_ZERO_OR_MORE
-         || nodeCur.type() == XSParticleDecl.PARTICLE_ONE_OR_MORE
-         || nodeCur.type() == XSParticleDecl.PARTICLE_ZERO_OR_ONE)
-        {
-            curIndex = postTreeBuildInit(((XSCMUniOp)nodeCur).getChild(), curIndex);
-        }
-         else if (nodeCur.type() == XSParticleDecl.PARTICLE_ELEMENT) {
-            //
-            //  Put this node in the leaf list at the current index if its
-            //  a non-epsilon leaf.
-            //
-            fLeafList[curIndex] = (XSCMLeaf)nodeCur;
-            fLeafListType[curIndex] = XSParticleDecl.PARTICLE_ELEMENT;
-            curIndex++;
-        }
-         else
-        {
-            throw new RuntimeException("ImplementationMessages.VAL_NIICM");
-        }
-        return curIndex;
-    }
-
-    /**
-     * check whether this content violates UPA constraint.
-     *
-     * @param errors to hold the UPA errors
-     * @return true if this content model contains other or list wildcard
-     */
-    public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException {
-        // Unique Particle Attribution
-        // store the conflict results between any two elements in fElemMap
-        // 0: not compared; -1: no conflict; 1: conflict
-        // initialize the conflict table (all 0 initially)
-        byte conflictTable[][] = new byte[fElemMapSize][fElemMapSize];
-
-        // for each state, check whether it has overlap transitions
-        for (int i = 0; i < fTransTable.length && fTransTable[i] != null; i++) {
-            for (int j = 0; j < fElemMapSize; j++) {
-                for (int k = j+1; k < fElemMapSize; k++) {
-                    if (fTransTable[i][j] != -1 &&
-                        fTransTable[i][k] != -1) {
-                        if (conflictTable[j][k] == 0) {
-                            conflictTable[j][k] = XSConstraints.overlapUPA
-                                                   (fElemMap[j].fValue,fElemMap[k].fValue,
-                                                   subGroupHandler) ?
-                                                   (byte)1 : (byte)-1;
-                        }
-                    }
-                }
-            }
-        }
-
-        // report all errors
-        for (int i = 0; i < fElemMapSize; i++) {
-            for (int j = 0; j < fElemMapSize; j++) {
-                if (conflictTable[i][j] == 1) {
-                    //errors.newError("cos-nonambig", new Object[]{fElemMap[i].toString(),
-                    //                                             fElemMap[j].toString()});
-                    // REVISIT: do we want to report all errors? or just one?
-                    throw new XMLSchemaException("cos-nonambig", new Object[]{fElemMap[i].toString(),
-                                                                              fElemMap[j].toString()});
-                }
-            }
-        }
-
-        // if there is a other or list wildcard, we need to check this CM
-        // again, if this grammar is cached.
-        for (int i = 0; i < fElemMapSize; i++) {
-            if (fElemMapType[i] == XSParticleDecl.PARTICLE_WILDCARD) {
-                XSWildcardDecl wildcard = (XSWildcardDecl)fElemMap[i].fValue;
-                if (wildcard.fType == XSWildcardDecl.WILDCARD_LIST ||
-                    wildcard.fType == XSWildcardDecl.WILDCARD_OTHER) {
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-} // class DFAContentModel
diff --git a/src/org/apache/xerces/impl/xs/models/XSEmptyCM.java b/src/org/apache/xerces/impl/xs/models/XSEmptyCM.java
deleted file mode 100644
index 66f81eb..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSEmptyCM.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.xs.SubstitutionGroupHandler;
-import org.apache.xerces.impl.xs.XMLSchemaException;
-
-/**
- * XSEmptyCM is a derivative of the abstract content model base class that
- * handles a content model with no chilren (elements).
- *
- * This model validated on the way in.
- *
- * @author Elena Litani, Lisa Martin
- * @author IBM
- */
-public class XSEmptyCM  implements XSCMValidator {
-
-    //
-    // Constants
-    //
-
-    // start the content model: did not see any children
-    private static final short STATE_START = 0;
-
-    //
-    // Data
-    //
-
-    //
-    // XSCMValidator methods
-    //
-
-    /**
-     * This methods to be called on entering a first element whose type
-     * has this content model. It will return the initial state of the content model
-     *
-     * @return Start state of the content model
-     */
-    public int[] startContentModel(){
-        return (new int[] {STATE_START});
-    }
-
-
-    /**
-     * The method corresponds to one transaction in the content model.
-     *
-     * @param elementName
-     * @param state  Current state
-     * @return element index corresponding to the element from the Schema grammar
-     */
-    public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler){
-
-        // error state
-        if (currentState[0] == XSCMValidator.FIRST_ERROR) {
-            currentState[0] = XSCMValidator.SUBSEQUENT_ERROR;
-            return null;
-        }
-
-        currentState[0] = XSCMValidator.FIRST_ERROR;
-        return null;
-    }
-
-
-    /**
-     * The method indicates the end of list of children
-     *
-     * @param state  Current state of the content model
-     * @return true if the last state was a valid final state
-     */
-    public boolean endContentModel (int[] currentState){
-        boolean isFinal =  false;
-        int state = currentState[0];
-
-        // restore content model state:
-
-        // error
-        if (state < 0) {
-            return false;
-        }
-
-
-        return true;
-    }
-
-    /**
-     * check whether this content violates UPA constraint.
-     *
-     * @param errors to hold the UPA errors
-     * @return true if this content model contains other or list wildcard
-     */
-    public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException {
-        return false;
-    }
-
-} // class XSEmptyCM
diff --git a/src/org/apache/xerces/impl/xs/models/XSSimpleCM.java b/src/org/apache/xerces/impl/xs/models/XSSimpleCM.java
deleted file mode 100644
index f1a13b9..0000000
--- a/src/org/apache/xerces/impl/xs/models/XSSimpleCM.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.models;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.xs.SubstitutionGroupHandler;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XMLSchemaException;
-import org.apache.xerces.impl.xs.XSConstraints;
-
-/**
- * XSSimpleCM is a derivative of the abstract content model base
- * class that handles a small set of simple content models that are just
- * way overkill to give the DFA treatment.
- * <p>
- * This class handles the following scenarios:
- * <ul>
- * <li> a
- * <li> a?
- * <li> a
- * <li> a+
- * <li> a,b
- * <li> a|b
- * </ul>
- * <p>
- * These all involve a unary operation with one element type, or a binary
- * operation with two elements. These are very simple and can be checked
- * in a simple way without a DFA and without the overhead of setting up a
- * DFA for such a simple check.
- * This model validated on the way in.
- *
- * @author Elena Litani, IBM
- * @version $Id$
- */
-public class XSSimpleCM
-implements XSCMValidator {
-
-    //
-    // Constants
-    //
-
-    // start the content model: did not see any children
-    private static final short STATE_START = 0;
-    // seen first child
-    private static final short STATE_FIRST = 1;
-    private static final short STATE_VALID = 2;
-
-    //
-    // Data
-    //
-
-
-    // element declaration in the XML Schema grammar.
-    private XSElementDecl fFirstElement = null;
-    private XSElementDecl fSecondElement = null;
-
-    /**
-     * The operation that this object represents. Since this class only
-     * does simple contents, there is only ever a single operation
-     * involved (i.e. the children of the operation are always one or
-     * two leafs.)
-     */
-    private short fOperator;
-
-
-    //
-    // Constructors
-    //
-
-     /**
-     * Constructs a simple content model.
-     *
-     *
-     */
-    public XSSimpleCM(short operator, XSElementDecl elem) {
-        fFirstElement = elem;
-        fOperator = operator;
-
-    }
-
-    /**
-     * Constructs a simple content model.
-     *
-     *
-     */
-    public XSSimpleCM(short operator, XSElementDecl elem1, XSElementDecl elem2) {
-        fFirstElement = elem1;
-        fSecondElement = elem2;
-        fOperator = operator;
-
-    }
-
-
-
-    //
-    // XSCMValidator methods
-    //
-
-    /**
-     * This methods to be called on entering a first element whose type
-     * has this content model. It will return the initial state of the content model
-     *
-     * @return Start state of the content model
-     */
-    public int[] startContentModel(){
-        return (new int[] {STATE_START});
-    }
-
-
-    /**
-     * The method corresponds to one transaction in the content model.
-     *
-     * @param elementName
-     * @param state  Current state
-     * @return element index corresponding to the element from the Schema grammar
-     */
-    public Object oneTransition (QName elementName, int[] currentState, SubstitutionGroupHandler subGroupHandler){
-
-        // error state
-        if (currentState[0] == XSCMValidator.FIRST_ERROR) {
-            currentState[0] = XSCMValidator.SUBSEQUENT_ERROR;
-            return null;
-        }
-
-        int state = currentState[0];
-        Object matchingDecl = null;
-
-        switch (fOperator) {
-        case XSParticleDecl.PARTICLE_ELEMENT :
-        case XSParticleDecl.PARTICLE_ZERO_OR_ONE :
-            if (state == STATE_START) {
-                matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fFirstElement);
-                if (matchingDecl != null) {
-                    currentState[0] = STATE_VALID;
-                    return matchingDecl;
-                }
-                //error
-            }
-            break;
-
-        case XSParticleDecl.PARTICLE_ZERO_OR_MORE :
-        case XSParticleDecl.PARTICLE_ONE_OR_MORE :
-            matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fFirstElement);
-            if (matchingDecl != null) {
-                currentState[0] = STATE_VALID;
-                return matchingDecl;
-            }
-            break;
-
-        case XSParticleDecl.PARTICLE_CHOICE :
-            if (state == STATE_START) {
-                matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fFirstElement);
-                if (matchingDecl != null) {
-                    currentState[0] = STATE_VALID;
-                    return matchingDecl;
-                }
-                matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fSecondElement);
-                if (matchingDecl != null) {
-                    currentState[0] = STATE_VALID;
-                    return matchingDecl;
-                }
-                //error
-            }
-
-            break;
-
-        case XSParticleDecl.PARTICLE_SEQUENCE :
-            //
-            //  There must be two children and they must be the two values
-            //  we stored, in the stored order.
-            //
-            if (state == STATE_START) {
-                matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fFirstElement);
-                if (matchingDecl != null) {
-                    currentState[0] = STATE_FIRST;
-                    return matchingDecl;
-                }
-                //error
-            }
-            else if (state == STATE_FIRST) {
-                matchingDecl = subGroupHandler.getMatchingElemDecl(elementName, fSecondElement);
-                if (matchingDecl != null) {
-                    currentState[0] = STATE_VALID;
-                    return matchingDecl;
-                }
-                //error
-            }
-
-            break;
-        default :
-            throw new RuntimeException("ImplementationMessages.VAL_CST");
-        }
-
-        //if we reach here there was an error
-        currentState[0] = XSCMValidator.FIRST_ERROR;
-        return null;
-    }
-
-
-    /**
-     * The method indicates the end of list of children
-     *
-     * @param state  Current state of the content model
-     * @return true if the last state was a valid final state
-     */
-    public boolean endContentModel (int[] currentState){
-        boolean isFinal =  false;
-        int state = currentState[0];
-
-        // error
-        if (state < 0) {
-            return false;
-        }
-
-        switch (fOperator) {
-        case XSParticleDecl.PARTICLE_ELEMENT :
-        case XSParticleDecl.PARTICLE_ONE_OR_MORE :
-        case XSParticleDecl.PARTICLE_CHOICE :
-        case XSParticleDecl.PARTICLE_SEQUENCE :
-            isFinal = (state == STATE_VALID)? true: false;
-        break;
-        case XSParticleDecl.PARTICLE_ZERO_OR_ONE :
-        case XSParticleDecl.PARTICLE_ZERO_OR_MORE :
-            isFinal = (state == STATE_VALID || state == STATE_START)? true:false;
-        break;
-        default :
-            throw new RuntimeException("ImplementationMessages.VAL_CST");
-        }
-
-
-        return isFinal;
-    }
-
-    /**
-     * check whether this content violates UPA constraint.
-     *
-     * @param errors to hold the UPA errors
-     * @return true if this content model contains other or list wildcard
-     */
-    public boolean checkUniqueParticleAttribution(SubstitutionGroupHandler subGroupHandler) throws XMLSchemaException{
-        if (fOperator == XSParticleDecl.PARTICLE_CHOICE) {
-            // only when it's a choice, and the two elements overlap,
-            // is it a UPA violation.
-            if (XSConstraints.overlapUPA(fFirstElement, fSecondElement, subGroupHandler)) {
-                throw new XMLSchemaException("cos-nonambig", new Object[]{fFirstElement.toString(),
-                                                                          fSecondElement.toString()});
-            }
-        }
-
-        return false;
-    }
-
-} // class XSSimpleCM
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java b/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
deleted file mode 100644
index 5af283a..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
+++ /dev/null
@@ -1,1704 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *1
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.StringTokenizer;
-import java.util.Enumeration;
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.xs.SchemaNamespaceSupport;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.XSWildcardDecl;
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.apache.xerces.impl.xs.XSAttributeDecl;
-import org.apache.xerces.impl.xs.XSGrammarResolver;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.impl.xs.util.XIntPool;
-import org.apache.xerces.xni.QName;
-
-/**
- * Class <code>XSAttributeCheck</code> is used to check the validity of attributes
- * appearing in the schema document. It
- * - reports an error for invalid element (invalid namespace, invalid name)
- * - reports an error for invalid attribute (invalid namespace, invalid name)
- * - reports an error for invalid attribute value
- * - return compiled values for attriute values
- * - provide default value for missing optional attributes
- * - provide default value for incorrect attribute values
- *
- * But it's the caller's responsibility to check whether a required attribute
- * is present.
- *
- * Things need revisiting:
- * - Whether to return non-schema attributes/values
- * - We need NamespaceScope to generate QName
- * - Do we need to update NamespaceScope and ErrorReporter when reset()?
- * - Should have the datatype validators return compiled value
- * - Should return compiled form for wildcard namespace
- * - use symbol table instead of many hashtables
- *
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-
-public class XSAttributeChecker {
-
-    // REVISIT: only local element and attribute are different from others.
-    //          it's possible to have either name or ref. all the others
-    //          are only allowed to have one of name or ref, or neither of them.
-    //          we'd better remove such checking to the traverser.
-    private static final String ELEMENT_N = "element_n";
-    private static final String ELEMENT_R = "element_r";
-    private static final String ATTRIBUTE_N = "attribute_n";
-    private static final String ATTRIBUTE_R = "attribute_r";
-
-    public static       int ATTIDX_COUNT           = 0;
-    public static final int ATTIDX_ABSTRACT        = ATTIDX_COUNT++;
-    public static final int ATTIDX_AFORMDEFAULT    = ATTIDX_COUNT++;
-    public static final int ATTIDX_BASE            = ATTIDX_COUNT++;
-    public static final int ATTIDX_BLOCK           = ATTIDX_COUNT++;
-    public static final int ATTIDX_BLOCKDEFAULT    = ATTIDX_COUNT++;
-    public static final int ATTIDX_DEFAULT         = ATTIDX_COUNT++;
-    public static final int ATTIDX_EFORMDEFAULT    = ATTIDX_COUNT++;
-    public static final int ATTIDX_FINAL           = ATTIDX_COUNT++;
-    public static final int ATTIDX_FINALDEFAULT    = ATTIDX_COUNT++;
-    public static final int ATTIDX_FIXED           = ATTIDX_COUNT++;
-    public static final int ATTIDX_FORM            = ATTIDX_COUNT++;
-    public static final int ATTIDX_ID              = ATTIDX_COUNT++;
-    public static final int ATTIDX_ITEMTYPE        = ATTIDX_COUNT++;
-    public static final int ATTIDX_MAXOCCURS       = ATTIDX_COUNT++;
-    public static final int ATTIDX_MEMBERTYPES     = ATTIDX_COUNT++;
-    public static final int ATTIDX_MINOCCURS       = ATTIDX_COUNT++;
-    public static final int ATTIDX_MIXED           = ATTIDX_COUNT++;
-    public static final int ATTIDX_NAME            = ATTIDX_COUNT++;
-    public static final int ATTIDX_NAMESPACE       = ATTIDX_COUNT++;
-    public static final int ATTIDX_NILLABLE        = ATTIDX_COUNT++;
-    public static final int ATTIDX_PROCESSCONTENTS = ATTIDX_COUNT++;
-    public static final int ATTIDX_PUBLIC          = ATTIDX_COUNT++;
-    public static final int ATTIDX_REF             = ATTIDX_COUNT++;
-    public static final int ATTIDX_REFER           = ATTIDX_COUNT++;
-    public static final int ATTIDX_SCHEMALOCATION  = ATTIDX_COUNT++;
-    public static final int ATTIDX_SOURCE          = ATTIDX_COUNT++;
-    public static final int ATTIDX_SUBSGROUP       = ATTIDX_COUNT++;
-    public static final int ATTIDX_SYSTEM          = ATTIDX_COUNT++;
-    public static final int ATTIDX_TARGETNAMESPACE = ATTIDX_COUNT++;
-    public static final int ATTIDX_TYPE            = ATTIDX_COUNT++;
-    public static final int ATTIDX_USE             = ATTIDX_COUNT++;
-    public static final int ATTIDX_VALUE           = ATTIDX_COUNT++;
-    public static final int ATTIDX_VERSION         = ATTIDX_COUNT++;
-    public static final int ATTIDX_XPATH           = ATTIDX_COUNT++;
-    public static final int ATTIDX_FROMDEFAULT     = ATTIDX_COUNT++;
-    //public static final int ATTIDX_OTHERVALUES     = ATTIDX_COUNT++;
-    public static final int ATTIDX_ISRETURNED      = ATTIDX_COUNT++;
-
-    private static final XIntPool fXIntPool = new XIntPool();
-    // constants to return
-    private static final XInt INT_QUALIFIED      = fXIntPool.getXInt(SchemaSymbols.FORM_QUALIFIED);
-    private static final XInt INT_UNQUALIFIED    = fXIntPool.getXInt(SchemaSymbols.FORM_UNQUALIFIED);
-    private static final XInt INT_EMPTY_SET      = fXIntPool.getXInt(SchemaSymbols.EMPTY_SET);
-    private static final XInt INT_ANY_STRICT     = fXIntPool.getXInt(SchemaSymbols.ANY_STRICT);
-    private static final XInt INT_ANY_LAX        = fXIntPool.getXInt(SchemaSymbols.ANY_LAX);
-    private static final XInt INT_ANY_SKIP       = fXIntPool.getXInt(SchemaSymbols.ANY_SKIP);
-    private static final XInt INT_USE_OPTIONAL   = fXIntPool.getXInt(SchemaSymbols.USE_OPTIONAL);
-    private static final XInt INT_USE_REQUIRED   = fXIntPool.getXInt(SchemaSymbols.USE_REQUIRED);
-    private static final XInt INT_USE_PROHIBITED = fXIntPool.getXInt(SchemaSymbols.USE_PROHIBITED);
-    private static final XInt INT_WS_PRESERVE    = fXIntPool.getXInt(SchemaSymbols.WS_PRESERVE);
-    private static final XInt INT_WS_REPLACE     = fXIntPool.getXInt(SchemaSymbols.WS_REPLACE);
-    private static final XInt INT_WS_COLLAPSE    = fXIntPool.getXInt(SchemaSymbols.WS_COLLAPSE);
-    private static final XInt INT_UNBOUNDED      = fXIntPool.getXInt(SchemaSymbols.OCCURRENCE_UNBOUNDED);
-
-    // default wildcard to return
-    private static final XSWildcardDecl WC_ANY   = new XSWildcardDecl();
-
-    // used to store the map from element name to attribute list
-    protected static Hashtable fEleAttrsMapG = new Hashtable();
-    protected static Hashtable fEleAttrsMapL = new Hashtable();
-
-    // used to initialize fEleAttrsMap
-    // step 1: all possible data types
-    // DT_??? >= 0 : validate using a validator, which is initialized staticly
-    // DT_??? <  0 : validate directly, which is done in "validate()"
-
-    protected static final int DT_ANYURI           = 0;
-    protected static final int DT_ID               = 1;
-    protected static final int DT_QNAME            = 2;
-    protected static final int DT_STRING           = 3;
-    protected static final int DT_TOKEN            = 4;
-    protected static final int DT_NCNAME           = 5;
-    protected static final int DT_XPATH            = 6;
-    protected static final int DT_XPATH1           = 7;
-
-    // used to store extra datatype validators
-    protected static final int DT_COUNT            = DT_XPATH1 + 1;
-    protected static XSSimpleType[] fExtraDVs = new XSSimpleType[DT_COUNT];
-    static {
-        // step 5: register all datatype validators for new types
-        SchemaGrammar grammar = SchemaGrammar.SG_SchemaNS;
-        // anyURI
-        fExtraDVs[DT_ANYURI] = (XSSimpleType)grammar.getGlobalTypeDecl(SchemaSymbols.ATTVAL_ANYURI);
-        // ID
-        fExtraDVs[DT_ID] = (XSSimpleType)grammar.getGlobalTypeDecl(SchemaSymbols.ATTVAL_ID);
-        // QName
-        fExtraDVs[DT_QNAME] = (XSSimpleType)grammar.getGlobalTypeDecl(SchemaSymbols.ATTVAL_QNAME);
-        // string
-        fExtraDVs[DT_STRING] = (XSSimpleType)grammar.getGlobalTypeDecl(SchemaSymbols.ATTVAL_STRING);
-        // token
-        fExtraDVs[DT_TOKEN] = (XSSimpleType)grammar.getGlobalTypeDecl(SchemaSymbols.ATTVAL_TOKEN);
-        // NCName
-        fExtraDVs[DT_NCNAME] = (XSSimpleType)grammar.getGlobalTypeDecl(SchemaSymbols.ATTVAL_NCNAME);
-        // xpath = a subset of XPath expression
-        fExtraDVs[DT_XPATH] = fExtraDVs[DT_STRING];
-        // xpath = a subset of XPath expression
-        fExtraDVs[DT_XPATH] = fExtraDVs[DT_STRING];
-    }
-
-    protected static final int DT_BLOCK            = -1;
-    protected static final int DT_BLOCK1           = -2;
-    protected static final int DT_FINAL            = -3;
-    protected static final int DT_FINAL1           = -4;
-    protected static final int DT_FORM             = -5;
-    protected static final int DT_MAXOCCURS        = -6;
-    protected static final int DT_MAXOCCURS1       = -7;
-    protected static final int DT_MEMBERTYPES      = -8;
-    protected static final int DT_MINOCCURS1       = -9;
-    protected static final int DT_NAMESPACE        = -10;
-    protected static final int DT_PROCESSCONTENTS  = -11;
-    protected static final int DT_PUBLIC           = -12;
-    protected static final int DT_USE              = -13;
-    protected static final int DT_WHITESPACE       = -14;
-    protected static final int DT_BOOLEAN          = -15;
-    protected static final int DT_NONNEGINT        = -16;
-
-    static {
-        // step 2: all possible attributes for all elements
-        int attCount = 0;
-        int ATT_ABSTRACT_D          = attCount++;
-        int ATT_ATTRIBUTE_FD_D      = attCount++;
-        int ATT_BASE_R              = attCount++;
-        int ATT_BASE_N              = attCount++;
-        int ATT_BLOCK_N             = attCount++;
-        int ATT_BLOCK1_N            = attCount++;
-        int ATT_BLOCK_D_D           = attCount++;
-        int ATT_DEFAULT_N           = attCount++;
-        int ATT_ELEMENT_FD_D        = attCount++;
-        int ATT_FINAL_N             = attCount++;
-        int ATT_FINAL1_N            = attCount++;
-        int ATT_FINAL_D_D           = attCount++;
-        int ATT_FIXED_N             = attCount++;
-        int ATT_FIXED_D             = attCount++;
-        int ATT_FORM_N              = attCount++;
-        int ATT_ID_N                = attCount++;
-        int ATT_ITEMTYPE_N          = attCount++;
-        int ATT_MAXOCCURS_D         = attCount++;
-        int ATT_MAXOCCURS1_D        = attCount++;
-        int ATT_MEMBER_T_N          = attCount++;
-        int ATT_MINOCCURS_D         = attCount++;
-        int ATT_MINOCCURS1_D        = attCount++;
-        int ATT_MIXED_D             = attCount++;
-        int ATT_MIXED_N             = attCount++;
-        int ATT_NAME_R              = attCount++;
-        int ATT_NAMESPACE_D         = attCount++;
-        int ATT_NAMESPACE_N         = attCount++;
-        int ATT_NILLABLE_D          = attCount++;
-        int ATT_PROCESS_C_D         = attCount++;
-        int ATT_PUBLIC_R            = attCount++;
-        int ATT_REF_R               = attCount++;
-        int ATT_REFER_R             = attCount++;
-        int ATT_SCHEMA_L_R          = attCount++;
-        int ATT_SCHEMA_L_N          = attCount++;
-        int ATT_SOURCE_N            = attCount++;
-        int ATT_SUBSTITUTION_G_N    = attCount++;
-        int ATT_SYSTEM_N            = attCount++;
-        int ATT_TARGET_N_N          = attCount++;
-        int ATT_TYPE_N              = attCount++;
-        int ATT_USE_D               = attCount++;
-        int ATT_VALUE_NNI_N         = attCount++;
-        int ATT_VALUE_STR_N         = attCount++;
-        int ATT_VALUE_WS_N          = attCount++;
-        int ATT_VERSION_N           = attCount++;
-        int ATT_XPATH_R             = attCount++;
-        int ATT_XPATH1_R            = attCount++;
-
-        // step 3: store all these attributes in an array
-        OneAttr[] allAttrs = new OneAttr[attCount];
-        allAttrs[ATT_ABSTRACT_D]        =   new OneAttr(SchemaSymbols.ATT_ABSTRACT,
-                                                        DT_BOOLEAN,
-                                                        ATTIDX_ABSTRACT,
-                                                        Boolean.FALSE);
-        allAttrs[ATT_ATTRIBUTE_FD_D]    =   new OneAttr(SchemaSymbols.ATT_ATTRIBUTEFORMDEFAULT,
-                                                        DT_FORM,
-                                                        ATTIDX_AFORMDEFAULT,
-                                                        INT_UNQUALIFIED);
-        allAttrs[ATT_BASE_R]            =   new OneAttr(SchemaSymbols.ATT_BASE,
-                                                        DT_QNAME,
-                                                        ATTIDX_BASE,
-                                                        null);
-        allAttrs[ATT_BASE_N]            =   new OneAttr(SchemaSymbols.ATT_BASE,
-                                                        DT_QNAME,
-                                                        ATTIDX_BASE,
-                                                        null);
-        allAttrs[ATT_BLOCK_N]           =   new OneAttr(SchemaSymbols.ATT_BLOCK,
-                                                        DT_BLOCK,
-                                                        ATTIDX_BLOCK,
-                                                        null);
-        allAttrs[ATT_BLOCK1_N]          =   new OneAttr(SchemaSymbols.ATT_BLOCK,
-                                                        DT_BLOCK1,
-                                                        ATTIDX_BLOCK,
-                                                        null);
-        allAttrs[ATT_BLOCK_D_D]         =   new OneAttr(SchemaSymbols.ATT_BLOCKDEFAULT,
-                                                        DT_BLOCK,
-                                                        ATTIDX_BLOCKDEFAULT,
-                                                        INT_EMPTY_SET);
-        allAttrs[ATT_DEFAULT_N]         =   new OneAttr(SchemaSymbols.ATT_DEFAULT,
-                                                        DT_STRING,
-                                                        ATTIDX_DEFAULT,
-                                                        null);
-        allAttrs[ATT_ELEMENT_FD_D]      =   new OneAttr(SchemaSymbols.ATT_ELEMENTFORMDEFAULT,
-                                                        DT_FORM,
-                                                        ATTIDX_EFORMDEFAULT,
-                                                        INT_UNQUALIFIED);
-        allAttrs[ATT_FINAL_N]           =   new OneAttr(SchemaSymbols.ATT_FINAL,
-                                                        DT_FINAL,
-                                                        ATTIDX_FINAL,
-                                                        null);
-        allAttrs[ATT_FINAL1_N]          =   new OneAttr(SchemaSymbols.ATT_FINAL,
-                                                        DT_FINAL1,
-                                                        ATTIDX_FINAL,
-                                                        null);
-        allAttrs[ATT_FINAL_D_D]         =   new OneAttr(SchemaSymbols.ATT_FINALDEFAULT,
-                                                        DT_FINAL,
-                                                        ATTIDX_FINALDEFAULT,
-                                                        INT_EMPTY_SET);
-        allAttrs[ATT_FIXED_N]           =   new OneAttr(SchemaSymbols.ATT_FIXED,
-                                                        DT_STRING,
-                                                        ATTIDX_FIXED,
-                                                        null);
-        allAttrs[ATT_FIXED_D]           =   new OneAttr(SchemaSymbols.ATT_FIXED,
-                                                        DT_BOOLEAN,
-                                                        ATTIDX_FIXED,
-                                                        Boolean.FALSE);
-        allAttrs[ATT_FORM_N]            =   new OneAttr(SchemaSymbols.ATT_FORM,
-                                                        DT_FORM,
-                                                        ATTIDX_FORM,
-                                                        null);
-        allAttrs[ATT_ID_N]              =   new OneAttr(SchemaSymbols.ATT_ID,
-                                                        DT_ID,
-                                                        ATTIDX_ID,
-                                                        null);
-        allAttrs[ATT_ITEMTYPE_N]        =   new OneAttr(SchemaSymbols.ATT_ITEMTYPE,
-                                                        DT_QNAME,
-                                                        ATTIDX_ITEMTYPE,
-                                                        null);
-        allAttrs[ATT_MAXOCCURS_D]       =   new OneAttr(SchemaSymbols.ATT_MAXOCCURS,
-                                                        DT_MAXOCCURS,
-                                                        ATTIDX_MAXOCCURS,
-                                                        fXIntPool.getXInt(1));
-        allAttrs[ATT_MAXOCCURS1_D]      =   new OneAttr(SchemaSymbols.ATT_MAXOCCURS,
-                                                        DT_MAXOCCURS1,
-                                                        ATTIDX_MAXOCCURS,
-                                                        fXIntPool.getXInt(1));
-        allAttrs[ATT_MEMBER_T_N]        =   new OneAttr(SchemaSymbols.ATT_MEMBERTYPES,
-                                                        DT_MEMBERTYPES,
-                                                        ATTIDX_MEMBERTYPES,
-                                                        null);
-        allAttrs[ATT_MINOCCURS_D]       =   new OneAttr(SchemaSymbols.ATT_MINOCCURS,
-                                                        DT_NONNEGINT,
-                                                        ATTIDX_MINOCCURS,
-                                                        fXIntPool.getXInt(1));
-        allAttrs[ATT_MINOCCURS1_D]      =   new OneAttr(SchemaSymbols.ATT_MINOCCURS,
-                                                        DT_MINOCCURS1,
-                                                        ATTIDX_MINOCCURS,
-                                                        fXIntPool.getXInt(1));
-        allAttrs[ATT_MIXED_D]           =   new OneAttr(SchemaSymbols.ATT_MIXED,
-                                                        DT_BOOLEAN,
-                                                        ATTIDX_MIXED,
-                                                        Boolean.FALSE);
-        allAttrs[ATT_MIXED_N]           =   new OneAttr(SchemaSymbols.ATT_MIXED,
-                                                        DT_BOOLEAN,
-                                                        ATTIDX_MIXED,
-                                                        null);
-        allAttrs[ATT_NAME_R]            =   new OneAttr(SchemaSymbols.ATT_NAME,
-                                                        DT_NCNAME,
-                                                        ATTIDX_NAME,
-                                                        null);
-        allAttrs[ATT_NAMESPACE_D]       =   new OneAttr(SchemaSymbols.ATT_NAMESPACE,
-                                                        DT_NAMESPACE,
-                                                        ATTIDX_NAMESPACE,
-                                                        WC_ANY);
-        allAttrs[ATT_NAMESPACE_N]       =   new OneAttr(SchemaSymbols.ATT_NAMESPACE,
-                                                        DT_ANYURI,
-                                                        ATTIDX_NAMESPACE,
-                                                        null);
-        allAttrs[ATT_NILLABLE_D]        =   new OneAttr(SchemaSymbols.ATT_NILLABLE,
-                                                        DT_BOOLEAN,
-                                                        ATTIDX_NILLABLE,
-                                                        Boolean.FALSE);
-        allAttrs[ATT_PROCESS_C_D]       =   new OneAttr(SchemaSymbols.ATT_PROCESSCONTENTS,
-                                                        DT_PROCESSCONTENTS,
-                                                        ATTIDX_PROCESSCONTENTS,
-                                                        INT_ANY_STRICT);
-        allAttrs[ATT_PUBLIC_R]          =   new OneAttr(SchemaSymbols.ATT_PUBLIC,
-                                                        DT_PUBLIC,
-                                                        ATTIDX_PUBLIC,
-                                                        null);
-        allAttrs[ATT_REF_R]             =   new OneAttr(SchemaSymbols.ATT_REF,
-                                                        DT_QNAME,
-                                                        ATTIDX_REF,
-                                                        null);
-        allAttrs[ATT_REFER_R]           =   new OneAttr(SchemaSymbols.ATT_REFER,
-                                                        DT_QNAME,
-                                                        ATTIDX_REFER,
-                                                        null);
-        allAttrs[ATT_SCHEMA_L_R]        =   new OneAttr(SchemaSymbols.ATT_SCHEMALOCATION,
-                                                        DT_ANYURI,
-                                                        ATTIDX_SCHEMALOCATION,
-                                                        null);
-        allAttrs[ATT_SCHEMA_L_N]        =   new OneAttr(SchemaSymbols.ATT_SCHEMALOCATION,
-                                                        DT_ANYURI,
-                                                        ATTIDX_SCHEMALOCATION,
-                                                        null);
-        allAttrs[ATT_SOURCE_N]          =   new OneAttr(SchemaSymbols.ATT_SOURCE,
-                                                        DT_ANYURI,
-                                                        ATTIDX_SOURCE,
-                                                        null);
-        allAttrs[ATT_SUBSTITUTION_G_N]  =   new OneAttr(SchemaSymbols.ATT_SUBSTITUTIONGROUP,
-                                                        DT_QNAME,
-                                                        ATTIDX_SUBSGROUP,
-                                                        null);
-        allAttrs[ATT_SYSTEM_N]          =   new OneAttr(SchemaSymbols.ATT_SYSTEM,
-                                                        DT_ANYURI,
-                                                        ATTIDX_SYSTEM,
-                                                        null);
-        allAttrs[ATT_TARGET_N_N]        =   new OneAttr(SchemaSymbols.ATT_TARGETNAMESPACE,
-                                                        DT_ANYURI,
-                                                        ATTIDX_TARGETNAMESPACE,
-                                                        null);
-        allAttrs[ATT_TYPE_N]            =   new OneAttr(SchemaSymbols.ATT_TYPE,
-                                                        DT_QNAME,
-                                                        ATTIDX_TYPE,
-                                                        null);
-        allAttrs[ATT_USE_D]             =   new OneAttr(SchemaSymbols.ATT_USE,
-                                                        DT_USE,
-                                                        ATTIDX_USE,
-                                                        INT_USE_OPTIONAL);
-        allAttrs[ATT_VALUE_NNI_N]       =   new OneAttr(SchemaSymbols.ATT_VALUE,
-                                                        DT_NONNEGINT,
-                                                        ATTIDX_VALUE,
-                                                        null);
-        allAttrs[ATT_VALUE_STR_N]       =   new OneAttr(SchemaSymbols.ATT_VALUE,
-                                                        DT_STRING,
-                                                        ATTIDX_VALUE,
-                                                        null);
-        allAttrs[ATT_VALUE_WS_N]        =   new OneAttr(SchemaSymbols.ATT_VALUE,
-                                                        DT_WHITESPACE,
-                                                        ATTIDX_VALUE,
-                                                        null);
-        allAttrs[ATT_VERSION_N]         =   new OneAttr(SchemaSymbols.ATT_VERSION,
-                                                        DT_TOKEN,
-                                                        ATTIDX_VERSION,
-                                                        null);
-        allAttrs[ATT_XPATH_R]           =   new OneAttr(SchemaSymbols.ATT_XPATH,
-                                                        DT_XPATH,
-                                                        ATTIDX_XPATH,
-                                                        null);
-        allAttrs[ATT_XPATH1_R]          =   new OneAttr(SchemaSymbols.ATT_XPATH,
-                                                        DT_XPATH1,
-                                                        ATTIDX_XPATH,
-                                                        null);
-
-        // step 4: for each element, make a list of possible attributes
-        Hashtable attrList;
-        OneElement oneEle;
-
-        // for element "attribute" - global
-        attrList = new Hashtable();
-        // default = string
-        attrList.put(SchemaSymbols.ATT_DEFAULT, allAttrs[ATT_DEFAULT_N]);
-        // fixed = string
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        // type = QName
-        attrList.put(SchemaSymbols.ATT_TYPE, allAttrs[ATT_TYPE_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_ATTRIBUTE, oneEle);
-
-        // for element "attribute" - local name
-        attrList = new Hashtable();
-        // default = string
-        attrList.put(SchemaSymbols.ATT_DEFAULT, allAttrs[ATT_DEFAULT_N]);
-        // fixed = string
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_N]);
-        // form = (qualified | unqualified)
-        attrList.put(SchemaSymbols.ATT_FORM, allAttrs[ATT_FORM_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        // type = QName
-        attrList.put(SchemaSymbols.ATT_TYPE, allAttrs[ATT_TYPE_N]);
-        // use = (optional | prohibited | required) : optional
-        attrList.put(SchemaSymbols.ATT_USE, allAttrs[ATT_USE_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(ATTRIBUTE_N, oneEle);
-
-        // for element "attribute" - local ref
-        attrList = new Hashtable();
-        // default = string
-        attrList.put(SchemaSymbols.ATT_DEFAULT, allAttrs[ATT_DEFAULT_N]);
-        // fixed = string
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // ref = QName
-        attrList.put(SchemaSymbols.ATT_REF, allAttrs[ATT_REF_R]);
-        // use = (optional | prohibited | required) : optional
-        attrList.put(SchemaSymbols.ATT_USE, allAttrs[ATT_USE_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(ATTRIBUTE_R, oneEle);
-
-        // for element "element" - global
-        attrList = new Hashtable();
-        // abstract = boolean : false
-        attrList.put(SchemaSymbols.ATT_ABSTRACT, allAttrs[ATT_ABSTRACT_D]);
-        // block = (#all | List of (substitution | extension | restriction | list | union))
-        attrList.put(SchemaSymbols.ATT_BLOCK, allAttrs[ATT_BLOCK_N]);
-        // default = string
-        attrList.put(SchemaSymbols.ATT_DEFAULT, allAttrs[ATT_DEFAULT_N]);
-        // final = (#all | List of (extension | restriction))
-        attrList.put(SchemaSymbols.ATT_FINAL, allAttrs[ATT_FINAL_N]);
-        // fixed = string
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        // nillable = boolean : false
-        attrList.put(SchemaSymbols.ATT_NILLABLE, allAttrs[ATT_NILLABLE_D]);
-        // substitutionGroup = QName
-        attrList.put(SchemaSymbols.ATT_SUBSTITUTIONGROUP, allAttrs[ATT_SUBSTITUTION_G_N]);
-        // type = QName
-        attrList.put(SchemaSymbols.ATT_TYPE, allAttrs[ATT_TYPE_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_ELEMENT, oneEle);
-
-        // for element "element" - local name
-        attrList = new Hashtable();
-        // block = (#all | List of (substitution | extension | restriction | list | union))
-        attrList.put(SchemaSymbols.ATT_BLOCK, allAttrs[ATT_BLOCK_N]);
-        // default = string
-        attrList.put(SchemaSymbols.ATT_DEFAULT, allAttrs[ATT_DEFAULT_N]);
-        // fixed = string
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_N]);
-        // form = (qualified | unqualified)
-        attrList.put(SchemaSymbols.ATT_FORM, allAttrs[ATT_FORM_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // maxOccurs = (nonNegativeInteger | unbounded)  : 1
-        attrList.put(SchemaSymbols.ATT_MAXOCCURS, allAttrs[ATT_MAXOCCURS_D]);
-        // minOccurs = nonNegativeInteger : 1
-        attrList.put(SchemaSymbols.ATT_MINOCCURS, allAttrs[ATT_MINOCCURS_D]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        // nillable = boolean : false
-        attrList.put(SchemaSymbols.ATT_NILLABLE, allAttrs[ATT_NILLABLE_D]);
-        // type = QName
-        attrList.put(SchemaSymbols.ATT_TYPE, allAttrs[ATT_TYPE_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(ELEMENT_N, oneEle);
-
-        // for element "element" - local ref
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // maxOccurs = (nonNegativeInteger | unbounded)  : 1
-        attrList.put(SchemaSymbols.ATT_MAXOCCURS, allAttrs[ATT_MAXOCCURS_D]);
-        // minOccurs = nonNegativeInteger : 1
-        attrList.put(SchemaSymbols.ATT_MINOCCURS, allAttrs[ATT_MINOCCURS_D]);
-        // ref = QName
-        attrList.put(SchemaSymbols.ATT_REF, allAttrs[ATT_REF_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(ELEMENT_R, oneEle);
-
-        // for element "complexType" - global
-        attrList = new Hashtable();
-        // abstract = boolean : false
-        attrList.put(SchemaSymbols.ATT_ABSTRACT, allAttrs[ATT_ABSTRACT_D]);
-        // block = (#all | List of (extension | restriction))
-        attrList.put(SchemaSymbols.ATT_BLOCK, allAttrs[ATT_BLOCK1_N]);
-        // final = (#all | List of (extension | restriction))
-        attrList.put(SchemaSymbols.ATT_FINAL, allAttrs[ATT_FINAL_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // mixed = boolean : false
-        attrList.put(SchemaSymbols.ATT_MIXED, allAttrs[ATT_MIXED_D]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_COMPLEXTYPE, oneEle);
-
-        // for element "notation" - global
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        // public = A public identifier, per ISO 8879
-        attrList.put(SchemaSymbols.ATT_PUBLIC, allAttrs[ATT_PUBLIC_R]);
-        // system = anyURI
-        attrList.put(SchemaSymbols.ATT_SYSTEM, allAttrs[ATT_SYSTEM_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_NOTATION, oneEle);
-
-
-        // for element "complexType" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // mixed = boolean : false
-        attrList.put(SchemaSymbols.ATT_MIXED, allAttrs[ATT_MIXED_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_COMPLEXTYPE, oneEle);
-
-        // for element "simpleContent" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_SIMPLECONTENT, oneEle);
-
-        // for element "restriction" - local
-        attrList = new Hashtable();
-        // base = QName
-        attrList.put(SchemaSymbols.ATT_BASE, allAttrs[ATT_BASE_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_RESTRICTION, oneEle);
-
-        // for element "extension" - local
-        attrList = new Hashtable();
-        // base = QName
-        attrList.put(SchemaSymbols.ATT_BASE, allAttrs[ATT_BASE_R]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_EXTENSION, oneEle);
-
-        // for element "attributeGroup" - local ref
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // ref = QName
-        attrList.put(SchemaSymbols.ATT_REF, allAttrs[ATT_REF_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_ATTRIBUTEGROUP, oneEle);
-
-        // for element "anyAttribute" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )  : ##any
-        attrList.put(SchemaSymbols.ATT_NAMESPACE, allAttrs[ATT_NAMESPACE_D]);
-        // processContents = (lax | skip | strict) : strict
-        attrList.put(SchemaSymbols.ATT_PROCESSCONTENTS, allAttrs[ATT_PROCESS_C_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_ANYATTRIBUTE, oneEle);
-
-        // for element "complexContent" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // mixed = boolean
-        attrList.put(SchemaSymbols.ATT_MIXED, allAttrs[ATT_MIXED_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_COMPLEXCONTENT, oneEle);
-
-        // for element "attributeGroup" - global
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_ATTRIBUTEGROUP, oneEle);
-
-        // for element "group" - global
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_GROUP, oneEle);
-
-        // for element "group" - local ref
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // maxOccurs = (nonNegativeInteger | unbounded)  : 1
-        attrList.put(SchemaSymbols.ATT_MAXOCCURS, allAttrs[ATT_MAXOCCURS_D]);
-        // minOccurs = nonNegativeInteger : 1
-        attrList.put(SchemaSymbols.ATT_MINOCCURS, allAttrs[ATT_MINOCCURS_D]);
-        // ref = QName
-        attrList.put(SchemaSymbols.ATT_REF, allAttrs[ATT_REF_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_GROUP, oneEle);
-
-        // for element "all" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // maxOccurs = 1 : 1
-        attrList.put(SchemaSymbols.ATT_MAXOCCURS, allAttrs[ATT_MAXOCCURS1_D]);
-        // minOccurs = (0 | 1) : 1
-        attrList.put(SchemaSymbols.ATT_MINOCCURS, allAttrs[ATT_MINOCCURS1_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_ALL, oneEle);
-
-        // for element "choice" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // maxOccurs = (nonNegativeInteger | unbounded)  : 1
-        attrList.put(SchemaSymbols.ATT_MAXOCCURS, allAttrs[ATT_MAXOCCURS_D]);
-        // minOccurs = nonNegativeInteger : 1
-        attrList.put(SchemaSymbols.ATT_MINOCCURS, allAttrs[ATT_MINOCCURS_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_CHOICE, oneEle);
-        // for element "sequence" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_SEQUENCE, oneEle);
-
-        // for element "any" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // maxOccurs = (nonNegativeInteger | unbounded)  : 1
-        attrList.put(SchemaSymbols.ATT_MAXOCCURS, allAttrs[ATT_MAXOCCURS_D]);
-        // minOccurs = nonNegativeInteger : 1
-        attrList.put(SchemaSymbols.ATT_MINOCCURS, allAttrs[ATT_MINOCCURS_D]);
-        // namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )  : ##any
-        attrList.put(SchemaSymbols.ATT_NAMESPACE, allAttrs[ATT_NAMESPACE_D]);
-        // processContents = (lax | skip | strict) : strict
-        attrList.put(SchemaSymbols.ATT_PROCESSCONTENTS, allAttrs[ATT_PROCESS_C_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_ANY, oneEle);
-
-        // for element "unique" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_UNIQUE, oneEle);
-        // for element "key" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_KEY, oneEle);
-
-        // for element "keyref" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        // refer = QName
-        attrList.put(SchemaSymbols.ATT_REFER, allAttrs[ATT_REFER_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_KEYREF, oneEle);
-
-        // for element "selector" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // xpath = a subset of XPath expression
-        attrList.put(SchemaSymbols.ATT_XPATH, allAttrs[ATT_XPATH_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_SELECTOR, oneEle);
-
-        // for element "field" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // xpath = a subset of XPath expression
-        attrList.put(SchemaSymbols.ATT_XPATH, allAttrs[ATT_XPATH1_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_FIELD, oneEle);
-
-        // for element "annotation" - global
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_ANNOTATION, oneEle);
-        // for element "annotation" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_ANNOTATION, oneEle);
-
-        // for element "appinfo" - local
-        attrList = new Hashtable();
-        // source = anyURI
-        attrList.put(SchemaSymbols.ATT_SOURCE, allAttrs[ATT_SOURCE_N]);
-        oneEle = new OneElement (attrList, false);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_APPINFO, oneEle);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_APPINFO, oneEle);
-
-        // for element "documentation" - local
-        attrList = new Hashtable();
-        // source = anyURI
-        attrList.put(SchemaSymbols.ATT_SOURCE, allAttrs[ATT_SOURCE_N]);
-        // xml:lang = language ???
-        oneEle = new OneElement (attrList, false);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_DOCUMENTATION, oneEle);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_DOCUMENTATION, oneEle);
-
-        // for element "simpleType" - global
-        attrList = new Hashtable();
-        // final = (#all | (list | union | restriction))
-        attrList.put(SchemaSymbols.ATT_FINAL, allAttrs[ATT_FINAL1_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // name = NCName
-        attrList.put(SchemaSymbols.ATT_NAME, allAttrs[ATT_NAME_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_SIMPLETYPE, oneEle);
-
-        // for element "simpleType" - local
-        attrList = new Hashtable();
-        // final = (#all | (list | union | restriction))
-        attrList.put(SchemaSymbols.ATT_FINAL, allAttrs[ATT_FINAL1_N]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_SIMPLETYPE, oneEle);
-
-        // for element "restriction" - local
-        // already registered for complexType
-
-        // for element "list" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // itemType = QName
-        attrList.put(SchemaSymbols.ATT_ITEMTYPE, allAttrs[ATT_ITEMTYPE_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_LIST, oneEle);
-
-        // for element "union" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // memberTypes = List of QName
-        attrList.put(SchemaSymbols.ATT_MEMBERTYPES, allAttrs[ATT_MEMBER_T_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_UNION, oneEle);
-
-        // for element "schema" - global
-        attrList = new Hashtable();
-        // attributeFormDefault = (qualified | unqualified) : unqualified
-        attrList.put(SchemaSymbols.ATT_ATTRIBUTEFORMDEFAULT, allAttrs[ATT_ATTRIBUTE_FD_D]);
-        // blockDefault = (#all | List of (substitution | extension | restriction | list | union))  : ''
-        attrList.put(SchemaSymbols.ATT_BLOCKDEFAULT, allAttrs[ATT_BLOCK_D_D]);
-        // elementFormDefault = (qualified | unqualified) : unqualified
-        attrList.put(SchemaSymbols.ATT_ELEMENTFORMDEFAULT, allAttrs[ATT_ELEMENT_FD_D]);
-        // finalDefault = (#all | List of (extension | restriction))  : ''
-        attrList.put(SchemaSymbols.ATT_FINALDEFAULT, allAttrs[ATT_FINAL_D_D]);
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // targetNamespace = anyURI
-        attrList.put(SchemaSymbols.ATT_TARGETNAMESPACE, allAttrs[ATT_TARGET_N_N]);
-        // version = token
-        attrList.put(SchemaSymbols.ATT_VERSION, allAttrs[ATT_VERSION_N]);
-        // xml:lang = language ???
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_SCHEMA, oneEle);
-
-        // for element "include" - global
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // schemaLocation = anyURI
-        attrList.put(SchemaSymbols.ATT_SCHEMALOCATION, allAttrs[ATT_SCHEMA_L_R]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_INCLUDE, oneEle);
-        // for element "redefine" - global
-        fEleAttrsMapG.put(SchemaSymbols.ELT_REDEFINE, oneEle);
-
-        // for element "import" - global
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // namespace = anyURI
-        attrList.put(SchemaSymbols.ATT_NAMESPACE, allAttrs[ATT_NAMESPACE_N]);
-        // schemaLocation = anyURI
-        attrList.put(SchemaSymbols.ATT_SCHEMALOCATION, allAttrs[ATT_SCHEMA_L_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapG.put(SchemaSymbols.ELT_IMPORT, oneEle);
-
-        // for element "length" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // value = nonNegativeInteger
-        attrList.put(SchemaSymbols.ATT_VALUE, allAttrs[ATT_VALUE_NNI_N]);
-        // fixed = boolean : false
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_LENGTH, oneEle);
-        // for element "minLength" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_MINLENGTH, oneEle);
-        // for element "maxLength" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_MAXLENGTH, oneEle);
-        // for element "totalDigits" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_TOTALDIGITS, oneEle);
-        // for element "fractionDigits" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_FRACTIONDIGITS, oneEle);
-
-        // for element "pattern" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // value = string
-        attrList.put(SchemaSymbols.ATT_VALUE, allAttrs[ATT_VALUE_STR_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_PATTERN, oneEle);
-
-        // for element "enumeration" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // value = anySimpleType
-        attrList.put(SchemaSymbols.ATT_VALUE, allAttrs[ATT_VALUE_STR_N]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_ENUMERATION, oneEle);
-
-        // for element "whiteSpace" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // value = preserve | replace | collapse
-        attrList.put(SchemaSymbols.ATT_VALUE, allAttrs[ATT_VALUE_WS_N]);
-        // fixed = boolean : false
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_WHITESPACE, oneEle);
-
-        // for element "maxInclusive" - local
-        attrList = new Hashtable();
-        // id = ID
-        attrList.put(SchemaSymbols.ATT_ID, allAttrs[ATT_ID_N]);
-        // value = anySimpleType
-        attrList.put(SchemaSymbols.ATT_VALUE, allAttrs[ATT_VALUE_STR_N]);
-        // fixed = boolean : false
-        attrList.put(SchemaSymbols.ATT_FIXED, allAttrs[ATT_FIXED_D]);
-        oneEle = new OneElement (attrList);
-        fEleAttrsMapL.put(SchemaSymbols.ELT_MAXINCLUSIVE, oneEle);
-        // for element "maxExclusive" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_MAXEXCLUSIVE, oneEle);
-        // for element "minInclusive" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_MININCLUSIVE, oneEle);
-        // for element "minExclusive" - local
-        fEleAttrsMapL.put(SchemaSymbols.ELT_MINEXCLUSIVE, oneEle);
-    }
-
-    // used to resolver namespace prefixes
-    protected XSDHandler fSchemaHandler = null;
-
-    // used to store utility reference: error reproter. set via constructor.
-    protected XMLErrorReporter fErrorReporter = null;
-
-    // used to store symbols.
-    protected SymbolTable fSymbolTable = null;
-
-    // used to store the mapping from processed element to attributes
-    protected Hashtable fNonSchemaAttrs = new Hashtable();
-
-    // constructor. Sets fErrorReproter and get datatype validators
-    public XSAttributeChecker(XSDHandler schemaHandler) {
-        fSchemaHandler = schemaHandler;
-    }
-
-    public void reset(XMLErrorReporter er, SymbolTable symbolTable) {
-        fErrorReporter = er;
-        fSymbolTable = symbolTable;
-        fNonSchemaAttrs.clear();
-    }
-
-    /**
-     * check whether the specified element conforms to the attributes restriction
-     * an array of attribute values is returned. the caller must call
-     * <code>returnAttrArray</code> to return that array.
-     *
-     * @param: element    - which element to check
-     * @param: isGlobal   - whether a child of <schema> or <redefine>
-     * @return: Hashtable - list of attributes and values
-     */
-    public Object[] checkAttributes(Element element, boolean isGlobal,
-                                    XSDocumentInfo schemaDoc) {
-        if (element == null)
-            return null;
-        // update NamespaceSupport
-        resolveNamespace(element, schemaDoc.fNamespaceSupport);
-
-        String uri = DOMUtil.getNamespaceURI(element);
-        String elName = DOMUtil.getLocalName(element);
-
-        if (uri == null || !uri.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)) {
-            reportSchemaError("s4s-elt-schema-ns", new Object[] {elName});
-        }
-
-        Hashtable eleAttrsMap = fEleAttrsMapG;
-        String lookupName = elName;
-
-        // REVISIT: only local element and attribute are different from others.
-        //          it's possible to have either name or ref. all the others
-        //          are only allowed to have one of name or ref, or neither of them.
-        //          we'd better remove such checking to the traverser.
-        if (!isGlobal) {
-            eleAttrsMap = fEleAttrsMapL;
-            if (elName.equals(SchemaSymbols.ELT_ELEMENT)) {
-                if (DOMUtil.getAttr(element, SchemaSymbols.ATT_REF) != null)
-                    lookupName = ELEMENT_R;
-                else
-                    lookupName = ELEMENT_N;
-            } else if (elName.equals(SchemaSymbols.ELT_ATTRIBUTE)) {
-                if (DOMUtil.getAttr(element, SchemaSymbols.ATT_REF) != null)
-                    lookupName = ATTRIBUTE_R;
-                else
-                    lookupName = ATTRIBUTE_N;
-            }
-        }
-
-        // get desired attribute list of this element
-        OneElement oneEle = (OneElement)eleAttrsMap.get(lookupName);
-        if (oneEle == null) {
-            // should never gets here.
-            // when this method is called, the call already knows that
-            // the element can appear.
-            reportSchemaError ("s4s-elt-invalid", new Object[] {elName});
-            return null;
-        }
-
-        //Hashtable attrValues = new Hashtable();
-        Object[] attrValues = getAvailableArray();
-        //Hashtable otherValues = new Hashtable();
-        long fromDefault = 0;
-        Hashtable attrList = oneEle.attrList;
-
-        // traverse all attributes
-        Attr[] attrs = DOMUtil.getAttrs(element);
-        Attr sattr = null;
-        for (int i = 0; i < attrs.length; i++) {
-            sattr = attrs[i];
-            // get the attribute name/value
-            //String attrName = DOMUtil.getLocalName(sattr);
-            String attrName = sattr.getName();
-            String attrVal = DOMUtil.getValue(sattr);
-
-            // skip anything starts with x/X m/M l/L
-            // simply put their values in the return hashtable
-            if (attrName.toLowerCase().startsWith("xml")) {
-                //attrValues.put(attrName, attrVal);
-                //otherValues.put(attrName, attrVal);
-                continue;
-            }
-
-            // for attributes with namespace prefix
-            //
-            String attrURI = DOMUtil.getNamespaceURI(sattr);
-            if (attrURI != null && attrURI.length() != 0) {
-                // attributes with schema namespace are not allowed
-                // and not allowed on "document" and "appInfo"
-                if (attrURI.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) ||
-                    !oneEle.allowNonSchemaAttr) {
-                    reportSchemaError ("s4s-att-not-allowed", new Object[] {elName, attrName});
-                }
-                else {
-                    // for attributes from other namespace
-                    // store them in a list, and TRY to validate them after
-                    // schema traversal (because it's "lax")
-                    //otherValues.put(attrName, attrVal);
-                    String attrRName = attrURI + "," + attrName;
-                    Vector values = (Vector)fNonSchemaAttrs.get(attrRName);
-                    if (values == null) {
-                        values = new Vector();
-                        values.addElement(attrName);
-                        values.addElement(elName);
-                        values.addElement(attrVal);
-                        fNonSchemaAttrs.put(attrRName, values);
-                    }
-                    else {
-                        values.addElement(elName);
-                        values.addElement(attrVal);
-                    }
-                }
-                continue;
-            }
-
-            // check whether this attribute is allowed
-            OneAttr oneAttr = (OneAttr)attrList.get(attrName);
-            if (oneAttr == null) {
-                reportSchemaError ("s4s-att-not-allowed",
-                                   new Object[] {elName, attrName});
-                continue;
-            }
-
-            // check the value against the datatype
-            try {
-                // no checking on string needs to be done here.
-                // no checking on xpath needs to be done here.
-                // xpath values are validated in xpath parser
-                if (oneAttr.dvIndex >= 0) {
-                    if (oneAttr.dvIndex != DT_STRING &&
-                        oneAttr.dvIndex != DT_XPATH &&
-                        oneAttr.dvIndex != DT_XPATH1) {
-                        XSSimpleType dv = fExtraDVs[oneAttr.dvIndex];
-                        Object avalue = dv.validate(attrVal, schemaDoc.fValidationContext, null);
-                        // kludge to handle chameleon includes/redefines...
-                        if (oneAttr.dvIndex == DT_QNAME) {
-                            QName qname = (QName)avalue;
-                            if(qname.prefix == fSchemaHandler.EMPTY_STRING && qname.uri == null && schemaDoc.fIsChameleonSchema)
-                                qname.uri = schemaDoc.fTargetNamespace;
-                        }
-                        attrValues[oneAttr.valueIndex] = avalue;
-                    } else {
-                        attrValues[oneAttr.valueIndex] = attrVal;
-                    }
-                }
-                else {
-                    attrValues[oneAttr.valueIndex] = validate(attrName, attrVal, oneAttr.dvIndex, schemaDoc);
-                }
-            } catch (InvalidDatatypeValueException ide) {
-                reportSchemaError ("s4s-att-invalid-value",
-                                   new Object[] {elName, attrName, ide.getLocalizedMessage()});
-                if (oneAttr.dfltValue != null)
-                    //attrValues.put(attrName, oneAttr.dfltValue);
-                    attrValues[oneAttr.valueIndex] = oneAttr.dfltValue;
-            }
-        }
-        // traverse all required attributes
-        OneAttr[] reqAttrs = oneEle.attrArray;
-        for (int i = 0; i < reqAttrs.length; i++) {
-            OneAttr oneAttr = reqAttrs[i];
-
-            // REVISIT: throw an error on required attribute that does not
-            // appear test case schema_invalid/S3_14/ibm3_14si12.xml
-
-            // if the attribute didn't apprear, and
-            // if the attribute is optional with default value, apply it
-            if (oneAttr.dfltValue != null &&
-                DOMUtil.getAttr(element, oneAttr.name) == null) {
-                //attrValues.put(oneAttr.name, oneAttr.dfltValue);
-                attrValues[oneAttr.valueIndex] = oneAttr.dfltValue;
-                fromDefault |= (1<<oneAttr.valueIndex);
-            }
-        }
-
-        attrValues[ATTIDX_FROMDEFAULT] = new Long(fromDefault);
-        //attrValues[ATTIDX_OTHERVALUES] = otherValues;
-
-        // Check that minOccurs isn't greater than maxOccurs.
-        // p-props-correct 2.1
-        if (attrValues[ATTIDX_MAXOCCURS] != null) {
-            int min = ((XInt)attrValues[ATTIDX_MINOCCURS]).intValue();
-            int max = ((XInt)attrValues[ATTIDX_MAXOCCURS]).intValue();
-            if (max != SchemaSymbols.OCCURRENCE_UNBOUNDED) {
-                if (min > max) {
-                    reportSchemaError ("p-props-correct.2.1",
-                                       new Object[] {elName, attrValues[ATTIDX_MINOCCURS], attrValues[ATTIDX_MAXOCCURS]});
-                    attrValues[ATTIDX_MINOCCURS] = attrValues[ATTIDX_MAXOCCURS];
-                }
-            }
-        }
-
-        return attrValues;
-    }
-
-    private Object validate(String attr, String ivalue, int dvIndex,
-                            XSDocumentInfo schemaDoc) throws InvalidDatatypeValueException {
-        if (ivalue == null)
-            return null;
-
-        // the whiteSpace facet of all types here have the value "collapse"
-        String value = normalize(ivalue, XSSimpleType.WS_COLLAPSE);
-        Object retValue = value;
-        Vector memberType;
-        int choice;
-
-        switch (dvIndex) {
-        case DT_BOOLEAN:
-            if (value.equals(SchemaSymbols.ATTVAL_FALSE) ||
-                value.equals(SchemaSymbols.ATTVAL_FALSE_0)) {
-                retValue = Boolean.FALSE;
-            } else if (value.equals(SchemaSymbols.ATTVAL_TRUE) ||
-                       value.equals(SchemaSymbols.ATTVAL_TRUE_1)) {
-                retValue = Boolean.TRUE;
-            } else {
-                throw new InvalidDatatypeValueException("the value '"+value+"' is not a valid boolean");
-            }
-            break;
-        case DT_NONNEGINT:
-            try {
-                retValue = fXIntPool.getXInt(Integer.parseInt(value));
-            } catch (NumberFormatException e) {
-                throw new InvalidDatatypeValueException("the value '"+value+"' is not a valid nonNegativeInteger");
-            }
-            if (((XInt)retValue).intValue() < 0)
-                throw new InvalidDatatypeValueException("the value '"+value+"' is not a valid nonNegativeInteger");
-            break;
-        case DT_BLOCK:
-            // block = (#all | List of (substitution | extension | restriction | list | union))
-            choice = 0;
-            if (value.equals (SchemaSymbols.ATTVAL_POUNDALL)) {
-                choice = SchemaSymbols.SUBSTITUTION|SchemaSymbols.EXTENSION|
-                         SchemaSymbols.RESTRICTION|SchemaSymbols.LIST|
-                         SchemaSymbols.UNION;
-            }
-            else {
-                StringTokenizer t = new StringTokenizer (value, " ");
-                while (t.hasMoreTokens()) {
-                    String token = t.nextToken ();
-
-                    if (token.equals (SchemaSymbols.ATTVAL_SUBSTITUTION)) {
-                        choice |= SchemaSymbols.SUBSTITUTION;
-                    }
-                    else if (token.equals (SchemaSymbols.ATTVAL_EXTENSION)) {
-                        choice |= SchemaSymbols.EXTENSION;
-                    }
-                    else if (token.equals (SchemaSymbols.ATTVAL_RESTRICTION)) {
-                        choice |= SchemaSymbols.RESTRICTION;
-                    }
-                    else if (token.equals (SchemaSymbols.ATTVAL_LIST)) {
-                        choice |= SchemaSymbols.LIST;
-                    }
-                    else if (token.equals (SchemaSymbols.ATTVAL_UNION)) {
-                        choice |= SchemaSymbols.RESTRICTION;
-                    }
-                    else {
-                        throw new InvalidDatatypeValueException("the value '"+value+"' must match (#all | List of (substitution | extension | restriction | list | union))");
-                    }
-                }
-            }
-            retValue = fXIntPool.getXInt(choice);
-            break;
-        case DT_BLOCK1:
-        case DT_FINAL:
-            // block = (#all | List of (extension | restriction))
-            // final = (#all | List of (extension | restriction))
-            choice = 0;
-            if (value.equals (SchemaSymbols.ATTVAL_POUNDALL)) {
-                //choice = SchemaSymbols.EXTENSION|SchemaSymbols.RESTRICTION;
-                // REVISIT: if #all, then make the result the combination of
-                //          everything: substitution/externsion/restriction/list/union.
-                //          would this be a problem?
-                // the reason doing so is that when final/blockFinal on <schema>
-                // is #all, it's not always the same as the conbination of those
-                // values allowed by final/blockFinal.
-                // for example, finalDefault="#all" is not always the same as
-                // finalDefault="extension restriction".
-                // if finalDefault="#all", final on any simple type would be
-                // "extension restriction list union".
-                choice = SchemaSymbols.SUBSTITUTION|SchemaSymbols.EXTENSION|
-                         SchemaSymbols.RESTRICTION|SchemaSymbols.LIST|
-                         SchemaSymbols.UNION;
-            }
-            else {
-                StringTokenizer t = new StringTokenizer (value, " ");
-                while (t.hasMoreTokens()) {
-                    String token = t.nextToken ();
-
-                    if (token.equals (SchemaSymbols.ATTVAL_EXTENSION)) {
-                        choice |= SchemaSymbols.EXTENSION;
-                    }
-                    else if (token.equals (SchemaSymbols.ATTVAL_RESTRICTION)) {
-                        choice |= SchemaSymbols.RESTRICTION;
-                    }
-                    else {
-                        throw new InvalidDatatypeValueException("the value '"+value+"' must match (#all | List of (extension | restriction))");
-                    }
-                }
-            }
-            retValue = fXIntPool.getXInt(choice);
-            break;
-        case DT_FINAL1:
-            // final = (#all | (list | union | restriction))
-            choice = 0;
-            if (value.equals (SchemaSymbols.ATTVAL_POUNDALL)) {
-                //choice = SchemaSymbols.RESTRICTION|SchemaSymbols.LIST|
-                //         SchemaSymbols.UNION;
-                // REVISIT: if #all, then make the result the combination of
-                //          everything: substitution/externsion/restriction/list/union.
-                //          would this be a problem?
-                // same reason as above DT_BLOCK1/DT_FINAL
-                choice = SchemaSymbols.SUBSTITUTION|SchemaSymbols.EXTENSION|
-                         SchemaSymbols.RESTRICTION|SchemaSymbols.LIST|
-                         SchemaSymbols.UNION;
-            }
-            else if (value.equals (SchemaSymbols.ATTVAL_LIST)) {
-                choice = SchemaSymbols.LIST;
-            }
-            else if (value.equals (SchemaSymbols.ATTVAL_UNION)) {
-                choice = SchemaSymbols.UNION;
-            }
-            else if (value.equals (SchemaSymbols.ATTVAL_RESTRICTION)) {
-                choice = SchemaSymbols.RESTRICTION;
-            }
-            else {
-                throw new InvalidDatatypeValueException("the value '"+value+"' must match (#all | (list | union | restriction))");
-            }
-            retValue = fXIntPool.getXInt(choice);
-            break;
-        case DT_FORM:
-            // form = (qualified | unqualified)
-            if (value.equals (SchemaSymbols.ATTVAL_QUALIFIED))
-                retValue = INT_QUALIFIED;
-            else if (value.equals (SchemaSymbols.ATTVAL_UNQUALIFIED))
-                retValue = INT_UNQUALIFIED;
-            else
-                throw new InvalidDatatypeValueException("the value '"+value+"' must match (qualified | unqualified)");
-            break;
-        case DT_MAXOCCURS:
-            // maxOccurs = (nonNegativeInteger | unbounded)
-            if (value.equals(SchemaSymbols.ATTVAL_UNBOUNDED)) {
-                retValue = INT_UNBOUNDED;
-            } else {
-                try {
-                    retValue = validate(attr, value, DT_NONNEGINT, schemaDoc);
-                } catch (NumberFormatException e) {
-                    throw new InvalidDatatypeValueException("the value '"+value+"' must match (nonNegativeInteger | unbounded)");
-                }
-            }
-            break;
-        case DT_MAXOCCURS1:
-            // maxOccurs = 1
-            if (value.equals("1"))
-                retValue = fXIntPool.getXInt(1);
-            else
-                throw new InvalidDatatypeValueException("the value '"+value+"' must be '1'");
-            break;
-        case DT_MEMBERTYPES:
-            // memberTypes = List of QName
-            memberType = new Vector();
-            try {
-                StringTokenizer t = new StringTokenizer (value, " ");
-                while (t.hasMoreTokens()) {
-                    String token = t.nextToken ();
-                    QName qname = (QName)fExtraDVs[DT_QNAME].validate(token, schemaDoc.fValidationContext, null);
-                    // kludge to handle chameleon includes/redefines...
-                    if(qname.prefix == fSchemaHandler.EMPTY_STRING && qname.uri == null && schemaDoc.fIsChameleonSchema)
-                        qname.uri = schemaDoc.fTargetNamespace;
-                    memberType.addElement(qname);
-                }
-                retValue = memberType;
-            }
-            catch (InvalidDatatypeValueException ide) {
-                throw new InvalidDatatypeValueException("the value '"+value+"' must match (List of QName)");
-            }
-            break;
-        case DT_MINOCCURS1:
-            // minOccurs = (0 | 1)
-            if (value.equals("0"))
-                retValue = fXIntPool.getXInt(0);
-            else if (value.equals("1"))
-                retValue = fXIntPool.getXInt(1);
-            else
-                throw new InvalidDatatypeValueException("the value '"+value+"' must be '0' or '1'");
-            break;
-        case DT_NAMESPACE:
-            // namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )
-            XSWildcardDecl wildcard = null;
-            if (value.equals(SchemaSymbols.ATTVAL_TWOPOUNDANY)) {
-                // ##any
-                wildcard = WC_ANY;
-            } else if (value.equals(SchemaSymbols.ATTVAL_TWOPOUNDOTHER)) {
-                // ##other
-                wildcard = new XSWildcardDecl();
-                wildcard.fType = XSWildcardDecl.WILDCARD_OTHER;
-                wildcard.fNamespaceList = new String[2];
-                wildcard.fNamespaceList[0] = schemaDoc.fTargetNamespace;
-                wildcard.fNamespaceList[1] = null;
-            } else {
-                // list
-                wildcard = new XSWildcardDecl();
-                wildcard.fType = XSWildcardDecl.WILDCARD_LIST;
-
-                // tokenize
-                StringTokenizer tokens = new StringTokenizer(value);
-                String[] namespaceList = new String[tokens.countTokens()];
-                int nsNum = 0;
-                String token;
-                String tempNamespace;
-                try {
-                    while (tokens.hasMoreTokens()) {
-                        token = tokens.nextToken();
-                        if (token.equals(SchemaSymbols.ATTVAL_TWOPOUNDLOCAL)) {
-                            tempNamespace = null;
-                        } else if (token.equals(SchemaSymbols.ATTVAL_TWOPOUNDTARGETNS)) {
-                            tempNamespace = schemaDoc.fTargetNamespace;
-                        } else {
-                            // we have found namespace URI here
-                            // need to add it to the symbol table
-                            fExtraDVs[DT_ANYURI].validate(token, schemaDoc.fValidationContext, null);
-                            tempNamespace = fSymbolTable.addSymbol(token);
-                        }
-
-                        //check for duplicate namespaces in the list
-                        int j = 0;
-                        for (; j < nsNum; j++) {
-                            if (tempNamespace == namespaceList[j])
-                                break;
-                        }
-                        if (j == nsNum) {
-                            // this means traversed whole for loop
-                            // i.e. not a duplicate namespace
-                            namespaceList[nsNum++] = tempNamespace;
-                        }
-                    }
-                } catch (InvalidDatatypeValueException ide) {
-                    throw new InvalidDatatypeValueException("the value '"+value+"' must match ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )");
-                }
-
-                // resize the array, so there is no empty entry
-                if (nsNum == namespaceList.length) {
-                    wildcard.fNamespaceList = namespaceList;
-                } else {
-                    wildcard.fNamespaceList = new String[nsNum];
-                    System.arraycopy(namespaceList, 0, wildcard.fNamespaceList, 0, nsNum);
-                }
-
-            }
-            retValue = wildcard;
-            break;
-        case DT_PROCESSCONTENTS:
-            // processContents = (lax | skip | strict)
-            if (value.equals (SchemaSymbols.ATTVAL_STRICT))
-                retValue = INT_ANY_STRICT;
-            else if (value.equals (SchemaSymbols.ATTVAL_LAX))
-                retValue = INT_ANY_LAX;
-            else if (value.equals (SchemaSymbols.ATTVAL_SKIP))
-                retValue = INT_ANY_SKIP;
-            else
-                throw new InvalidDatatypeValueException("the value '"+value+"' must match (lax | skip | strict)");
-            break;
-        case DT_PUBLIC:
-            // public = A public identifier, per ISO 8879
-            // REVISIT: how to validate "public"???
-            fExtraDVs[DT_TOKEN].validate(value, schemaDoc.fValidationContext, null);
-            break;
-        case DT_USE:
-            // use = (optional | prohibited | required)
-            if (value.equals (SchemaSymbols.ATTVAL_OPTIONAL))
-                retValue = INT_USE_OPTIONAL;
-            else if (value.equals (SchemaSymbols.ATTVAL_REQUIRED))
-                retValue = INT_USE_REQUIRED;
-            else if (value.equals (SchemaSymbols.ATTVAL_PROHIBITED))
-                retValue = INT_USE_PROHIBITED;
-            else
-                throw new InvalidDatatypeValueException("the value '"+value+"' must match (optional | prohibited | required)");
-            break;
-        case DT_WHITESPACE:
-            // value = preserve | replace | collapse
-            if (value.equals (SchemaSymbols.ATTVAL_PRESERVE))
-                retValue = INT_WS_PRESERVE;
-            else if (value.equals (SchemaSymbols.ATTVAL_REPLACE))
-                retValue = INT_WS_REPLACE;
-            else if (value.equals (SchemaSymbols.ATTVAL_COLLAPSE))
-                retValue = INT_WS_COLLAPSE;
-            else
-                throw new InvalidDatatypeValueException("the value '"+value+"' must match (preserve | replace | collapse)");
-            break;
-        }
-
-        return retValue;
-    }
-
-    private void reportSchemaError(String key, Object args[]) {
-        fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                   key,
-                                   args,
-                                   XMLErrorReporter.SEVERITY_ERROR);
-    }
-
-    // validate attriubtes from non-schema namespaces
-    public void checkNonSchemaAttributes(XSGrammarResolver grammarResolver) {
-        // for all attributes
-        Enumeration enum = fNonSchemaAttrs.keys();
-        XSAttributeDecl attrDecl;
-        while (enum.hasMoreElements()) {
-            // get name, uri, localpart
-            String attrRName = (String)enum.nextElement();
-            String attrURI = attrRName.substring(0,attrRName.indexOf(','));
-            String attrLocal = attrRName.substring(attrRName.indexOf(',')+1);
-            // find associated grammar
-            SchemaGrammar sGrammar = grammarResolver.getGrammar(attrURI);
-            if (sGrammar == null)
-                continue;
-            // and get the datatype validator, if there is one
-            attrDecl = sGrammar.getGlobalAttributeDecl(attrLocal);
-            if (attrDecl == null)
-                continue;
-            XSSimpleType dv = (XSSimpleType)attrDecl.fType;
-            if (dv == null)
-                continue;
-
-            // get all values appeared with this attribute name
-            Vector values = (Vector)fNonSchemaAttrs.get(attrRName);
-            String elName, attrVal;
-            String attrName = (String)values.elementAt(0);
-            // for each of the values
-            int count = values.size();
-            for (int i = 1; i < count; i += 2) {
-                elName = (String)values.elementAt(i);
-                try {
-                    // and validate it using the XSSimpleType
-                    // REVISIT: what would be the proper validation context?
-                    //          guess we need to save that in the vectors too.
-                    dv.validate((String)values.elementAt(i+1), null, null);
-                } catch(InvalidDatatypeValueException ide) {
-                    reportSchemaError ("s4s-att-invalid-value",
-                                       new Object[] {elName, attrName, ide.getLocalizedMessage()});
-                }
-            }
-        }
-    }
-
-    // normalize the string according to the whiteSpace facet
-    public static String normalize(String content, short ws) {
-        int len = content == null ? 0 : content.length();
-        if (len == 0 || ws == XSSimpleType.WS_PRESERVE)
-            return content;
-
-        StringBuffer sb = new StringBuffer();
-        if (ws == XSSimpleType.WS_REPLACE) {
-            char ch;
-            // when it's replace, just replace #x9, #xa, #xd by #x20
-            for (int i = 0; i < len; i++) {
-                ch = content.charAt(i);
-                if (ch != 0x9 && ch != 0xa && ch != 0xd)
-                    sb.append(ch);
-                else
-                    sb.append((char)0x20);
-            }
-        } else {
-            char ch;
-            int i;
-            boolean isLeading = true;
-            // when it's collapse
-            for (i = 0; i < len; i++) {
-                ch = content.charAt(i);
-                // append real characters, so we passed leading ws
-                if (ch != 0x9 && ch != 0xa && ch != 0xd && ch != 0x20) {
-                    sb.append(ch);
-                    isLeading = false;
-                }
-                else {
-                    // for whitespaces, we skip all following ws
-                    for (; i < len-1; i++) {
-                        ch = content.charAt(i+1);
-                        if (ch != 0x9 && ch != 0xa && ch != 0xd && ch != 0x20)
-                            break;
-                    }
-                    // if it's not a leading or tailing ws, then append a space
-                    if (i < len - 1 && !isLeading)
-                        sb.append((char)0x20);
-                }
-            }
-        }
-
-        return sb.toString();
-    }
-
-    // the following part implements an attribute-value-array pool.
-    // when checkAttribute is called, it calls getAvailableArray to get
-    // an array from the pool; when the caller is done with the array,
-    // it calls returnAttrArray to return that array to the pool.
-
-    // initial size of the array pool. 10 is big enough
-    static final int INIT_POOL_SIZE = 10;
-    // the incremental size of the array pool
-    static final int INC_POOL_SIZE  = 10;
-    // the array pool
-    Object[][] fArrayPool = new Object[INIT_POOL_SIZE][ATTIDX_COUNT];
-    // used to clear the returned array
-    // I think System.arrayCopy is more efficient than setting 35 fields to null
-    private static Object[] fTempArray = new Object[ATTIDX_COUNT];
-    // current position of the array pool (# of arrays not returned)
-    int fPoolPos = 0;
-
-    // get the next available array
-    protected Object[] getAvailableArray() {
-        // if no array left in the pool, increase the pool size
-        if (fArrayPool.length == fPoolPos) {
-            // increase size
-            fArrayPool = new Object[fPoolPos+INC_POOL_SIZE][];
-            // initialize each *new* array
-            for (int i = fPoolPos; i < fArrayPool.length; i++)
-                fArrayPool[i] = new Object[ATTIDX_COUNT];
-        }
-        // get the next available one
-        Object[] retArray = fArrayPool[fPoolPos];
-        // clear it from the pool. this is for GC: if a caller forget to
-        // return the array, we want that array to be GCed.
-        fArrayPool[fPoolPos++] = null;
-        // to make sure that one array is not returned twice, we use
-        // the last entry to indicate whether an array is already returned
-        // now set it to false.
-        System.arraycopy(fTempArray, 0, retArray, 0, ATTIDX_COUNT-1);
-        retArray[ATTIDX_ISRETURNED] = Boolean.FALSE;
-
-        return retArray;
-    }
-
-    // return an array back to the pool
-    public void returnAttrArray(Object[] attrArray, XSDocumentInfo schemaDoc) {
-        // pop the namespace context
-        schemaDoc.fNamespaceSupport.popContext();
-
-        // if 1. the pool is full; 2. the array is null;
-        // 3. the array is of wrong size; 4. the array is already returned
-        // then we can't accept this array to be returned
-        if (fPoolPos == 0 ||
-            attrArray == null ||
-            attrArray.length != ATTIDX_COUNT ||
-            ((Boolean)attrArray[ATTIDX_ISRETURNED]).booleanValue()) {
-            return;
-        }
-
-        // mark this array as returned
-        attrArray[ATTIDX_ISRETURNED] = Boolean.TRUE;
-        // and put it into the pool
-        fArrayPool[--fPoolPos] = attrArray;
-    }
-
-    public void resolveNamespace(Element element, SchemaNamespaceSupport nsSupport) {
-        // push the namespace context
-        nsSupport.pushContext();
-
-        // search for new namespace bindings
-        Attr[] attrs = DOMUtil.getAttrs(element);
-        Attr sattr = null;
-        String rawname, prefix, uri;
-        for (int i = 0; i < attrs.length; i++) {
-            sattr = attrs[i];
-            rawname = DOMUtil.getName(sattr);
-            if (rawname == SchemaSymbols.XMLNS || rawname.startsWith("xmlns:")) {
-                prefix = null;
-                if (rawname.length() == 5)
-                    prefix = fSchemaHandler.EMPTY_STRING;
-                else if (rawname.charAt(5) == ':')
-                    prefix = fSymbolTable.addSymbol(DOMUtil.getLocalName(sattr));
-                if (prefix != null) {
-                    uri = fSymbolTable.addSymbol(DOMUtil.getValue(sattr));
-                    // REVISIT: copied from namespce binder
-                    nsSupport.declarePrefix(prefix, uri.length()!=0 ? uri : null);
-                }
-            }
-        }
-    }
-}
-
-class OneAttr {
-    // name of the attribute
-    public String name;
-    // index of the datatype validator
-    public int dvIndex;
-    // whether it's optional, and has default value
-    public int valueIndex;
-    // the default value of this attribute
-    public Object dfltValue;
-
-    public OneAttr(String name, int dvIndex, int valueIndex, Object dfltValue) {
-        this.name = name;
-        this.dvIndex = dvIndex;
-        this.valueIndex = valueIndex;
-        this.dfltValue = dfltValue;
-    }
-}
-
-class OneElement {
-    // the list of attributes that can appear in one element
-    public Hashtable attrList;
-    // the array of attributes that can appear in one element
-    public OneAttr[] attrArray;
-    // does this element allow attributes from non-schema namespace
-    public boolean allowNonSchemaAttr;
-
-    public OneElement (Hashtable attrList) {
-        this(attrList, true);
-    }
-
-    public OneElement (Hashtable attrList, boolean allowNonSchemaAttr) {
-        this.attrList = attrList;
-
-        int count = attrList.size();
-        this.attrArray = new OneAttr[count];
-        Enumeration enum = attrList.elements();
-        for (int i = 0; i < count; i++)
-            this.attrArray[i] = (OneAttr)enum.nextElement();
-
-        this.allowNonSchemaAttr = allowNonSchemaAttr;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java
deleted file mode 100644
index efb9238..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDAbstractIDConstraintTraverser.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import  org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.SchemaNamespaceSupport;
-
-import  org.apache.xerces.util.DOMUtil;
-import  org.w3c.dom.Element;
-import org.apache.xerces.impl.xs.identity.*;
-import org.apache.xerces.impl.xpath.*;
-
-/**
- * This class contains code that all three IdentityConstraint
- * traversers (the XSDUniqueTraverser, XSDKeyTraverser and
- * XSDKeyrefTraverser) rely upon.
- *
- * @version $Id$
- */
-class XSDAbstractIDConstraintTraverser extends XSDAbstractTraverser {
-
-    public XSDAbstractIDConstraintTraverser (XSDHandler handler,
-                                  XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-    void traverseIdentityConstraint(IdentityConstraint ic,
-            Element icElem, XSDocumentInfo schemaDoc, Object [] icElemAttrs) {
-
-        // General Attribute Checking will have been done on icElem by caller
-
-        // check for <annotation> and get selector
-        Element sElem = DOMUtil.getFirstChildElement(icElem);
-        if(sElem == null) {
-            // REVISIT: localize
-            reportGenericSchemaError("The content of an identity constraint must match (annotation?, selector, field+)");
-            return;
-        }
-
-        // General Attribute Checking on sElem
-        // first child could be an annotation
-        if (DOMUtil.getLocalName(sElem).equals(SchemaSymbols.ELT_ANNOTATION)) {
-            traverseAnnotationDecl(sElem, icElemAttrs, false, schemaDoc);
-            sElem = DOMUtil.getNextSiblingElement(sElem);
-        }
-        // if no more children report an error
-        if(sElem == null) {
-            // REVISIT: localize
-            reportGenericSchemaError("The content of an identity constraint must match (annotation?, selector, field+)");
-            return;
-        }
-        Object [] attrValues = fAttrChecker.checkAttributes(sElem, false, schemaDoc);
-        
-        // if more than one annotation report an error
-        if(!DOMUtil.getLocalName(sElem).equals(SchemaSymbols.ELT_SELECTOR)) {
-            // REVISIT: localize
-            reportGenericSchemaError("The content of an identity constraint must match (annotation?, selector, field+)");
-        }
-        // and make sure <selector>'s content is fine:
-        Element selChild = DOMUtil.getFirstChildElement(sElem);
-        
-        if (selChild !=null) {
-            // traverse annotation if any
-            if (DOMUtil.getLocalName(selChild).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(selChild, attrValues, false, schemaDoc);
-                selChild = DOMUtil.getNextSiblingElement(selChild);
-            }
-            else {
-                reportGenericSchemaError("The content of an identity constraint must match (annotation?, selector, field+)");
-            }
-            if (selChild != null) {
-                reportSchemaError("src-identity-constraint.1", new Object [] {icElemAttrs[XSAttributeChecker.ATTIDX_NAME]});
-            }
-        }
-
-        String sText = ((String)attrValues[XSAttributeChecker.ATTIDX_XPATH]);
-        if(sText == null) {
-            reportSchemaError("s4s-att-must-appear", new Object [] {SchemaSymbols.ELT_SELECTOR, SchemaSymbols.ATT_XPATH});
-            return;
-        }
-        sText = sText.trim();
-
-        Selector.XPath sXpath = null;
-        try {
-            sXpath = new Selector.XPath(sText, fSymbolTable,
-                                        schemaDoc.fNamespaceSupport);
-            Selector selector = new Selector(sXpath, ic);
-            ic.setSelector(selector);
-        }
-        catch (XPathException e) {
-            // REVISIT: Add error message.
-            reportGenericSchemaError(e.getMessage());
-            // put back attr values...
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-            return;
-        }
-
-        // put back attr values...
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        // get fields
-        Element fElem = DOMUtil.getNextSiblingElement(sElem);
-        if(fElem == null) {
-            // REVISIT:  localize
-            reportGenericSchemaError("The content of an identity constraint must match (annotation?, selector, field+)");
-        }
-        while (fElem != null) {
-            // General Attribute Checking
-            attrValues = fAttrChecker.checkAttributes(fElem, false, schemaDoc);
-
-            if(!DOMUtil.getLocalName(fElem).equals(SchemaSymbols.ELT_FIELD))
-                // REVISIT: localize
-                reportGenericSchemaError("The content of an identity constraint must match (annotation?, selector, field+)");
-            
-            // and make sure <field>'s content is fine:
-            Element fieldChild = DOMUtil.getFirstChildElement(fElem);
-            if (fieldChild != null) {            
-                // traverse annotation
-                if (DOMUtil.getLocalName(fieldChild).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    traverseAnnotationDecl(fieldChild, attrValues, false, schemaDoc);
-                    fieldChild = DOMUtil.getNextSiblingElement(fieldChild);
-                }
-            }
-            if (fieldChild != null) {
-                reportSchemaError("src-identity-constraint.1", new Object [] {icElemAttrs[XSAttributeChecker.ATTIDX_NAME]});
-            }
-            String fText = ((String)attrValues[XSAttributeChecker.ATTIDX_XPATH]);
-            if(fText == null) {
-                reportSchemaError("s4s-att-must-appear", new Object [] {SchemaSymbols.ELT_FIELD, SchemaSymbols.ATT_XPATH});
-                return;
-            }
-            fText = fText.trim();
-            try {
-                Field.XPath fXpath = new Field.XPath(fText, fSymbolTable,
-                                                     schemaDoc.fNamespaceSupport);
-                Field field = new Field(fXpath, ic);
-                ic.addField(field);
-            }
-            catch (XPathException e) {
-                // REVISIT: Add error message.
-                reportGenericSchemaError(e.getMessage());
-                // put back attr values...
-                fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-                return;
-            }
-            fElem = DOMUtil.getNextSiblingElement(fElem);
-            // put back attr values...
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-        }
-
-    } // traverseIdentityConstraint(IdentityConstraint,Element, XSDocumentInfo)
-} // XSDAbstractIDConstraintTraverser
-
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDAbstractParticleTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDAbstractParticleTraverser.java
deleted file mode 100644
index cf82861..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDAbstractParticleTraverser.java
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.w3c.dom.Element;
-
-/**
- * @author Elena Litani, IBM
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-abstract class XSDAbstractParticleTraverser extends XSDAbstractTraverser {
-
-    XSDAbstractParticleTraverser (XSDHandler handler,
-                                  XSAttributeChecker gAttrCheck) {
-
-        super(handler, gAttrCheck);
-    }
-
-    /**
-     *
-     * Traverse the "All" declaration
-     *
-     * <all
-     *   id = ID
-     *   maxOccurs = 1 : 1
-     *   minOccurs = (0 | 1) : 1>
-     *   Content: (annotation? , element*)
-     * </all>
-     **/
-    XSParticleDecl traverseAll(Element allDecl,
-                               XSDocumentInfo schemaDoc,
-                               SchemaGrammar grammar,
-                               int allContextFlags) {
-
-        // General Attribute Checking
-
-        Object[] attrValues = fAttrChecker.checkAttributes(allDecl, false, schemaDoc);
-
-        Element child = DOMUtil.getFirstChildElement(allDecl);
-
-        if (child !=null) {
-            // traverse Annotation
-            if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-        }
-        XSParticleDecl left = null;
-        XSParticleDecl right = null;
-        String childName = null;
-        XSParticleDecl particle, temp;
-        for (; child != null; child = DOMUtil.getNextSiblingElement(child)) {
-
-            particle = null;
-            childName = DOMUtil.getLocalName(child);
-
-            // Only elements are allowed in <all>
-            if (childName.equals(SchemaSymbols.ELT_ELEMENT)) {
-                particle = fSchemaHandler.fElementTraverser.traverseLocal(child, schemaDoc, grammar, PROCESSING_ALL_EL);
-            }
-            else {
-                Object[] args = { childName};
-                reportSchemaError("AllContentRestricted", args);
-            }
-
-            if (left == null) {
-                left = particle;
-            }
-            else if (right == null) {
-                right = particle;
-            }
-            else {
-                temp = new XSParticleDecl();
-                temp.fType = XSParticleDecl.PARTICLE_ALL;
-                temp.fValue = left;
-                temp.fOtherValue = right;
-                left = temp;
-                right = particle;
-            }
-        }
-
-        if (left != null) {
-            temp = new XSParticleDecl();
-            temp.fType = XSParticleDecl.PARTICLE_ALL;
-            temp.fValue = left;
-            temp.fOtherValue = right;
-            left = temp;
-        }
-
-        // REVISIT: model group
-        // Quick fix for the case that particle <all> does not have any children.
-        // For now we return null. In the future we might want to return model group decl.
-        if (left != null) {
-
-            XInt minAtt = (XInt)attrValues[XSAttributeChecker.ATTIDX_MINOCCURS];
-            XInt maxAtt = (XInt)attrValues[XSAttributeChecker.ATTIDX_MAXOCCURS];
-            Long defaultVals = (Long)attrValues[XSAttributeChecker.ATTIDX_FROMDEFAULT];
-            left.fMinOccurs = minAtt.intValue();
-            left.fMaxOccurs = maxAtt.intValue();
-
-            left = checkOccurrences(left,
-                                    SchemaSymbols.ELT_ALL,
-                                    (Element)allDecl.getParentNode(),
-                                    allContextFlags,
-                                    defaultVals.longValue());
-        }
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return left;
-    }
-
-    /**
-     * Traverse the Sequence declaration
-     *
-     * <sequence
-     *   id = ID
-     *   maxOccurs = string
-     *   minOccurs = nonNegativeInteger>
-     *   Content: (annotation? , (element | group | choice | sequence | any)*)
-     * </sequence>
-     *
-     * @param seqDecl
-     * @param schemaDoc
-     * @param grammar
-     * @return
-     */
-    XSParticleDecl traverseSequence(Element seqDecl,
-                                    XSDocumentInfo schemaDoc,
-                                    SchemaGrammar grammar,
-                                    int allContextFlags) {
-
-        return traverseSeqChoice(seqDecl, schemaDoc, grammar, allContextFlags, false);
-    }
-
-    /**
-     * Traverse the Choice declaration
-     *
-     * <choice
-     *   id = ID
-     *   maxOccurs = string
-     *   minOccurs = nonNegativeInteger>
-     *   Content: (annotation? , (element | group | choice | sequence | any)*)
-     * </choice>
-     *
-     * @param choiceDecl
-     * @param schemaDoc
-     * @param grammar
-     * @return
-     */
-    XSParticleDecl traverseChoice(Element choiceDecl,
-                                  XSDocumentInfo schemaDoc,
-                                  SchemaGrammar grammar,
-                                  int allContextFlags) {
-
-        return traverseSeqChoice (choiceDecl, schemaDoc, grammar, allContextFlags, true);
-    }
-
-    /**
-     * Common traversal for <choice> and <sequence>
-     *
-     * @param decl
-     * @param schemaDoc
-     * @param grammar
-     * @param choice    If traversing <choice> this parameter is true.
-     * @return
-     */
-    private XSParticleDecl traverseSeqChoice(Element decl,
-                                             XSDocumentInfo schemaDoc,
-                                             SchemaGrammar grammar,
-                                             int allContextFlags,
-                                             boolean choice) {
-
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(decl, false, schemaDoc);
-
-        Element child = DOMUtil.getFirstChildElement(decl);
-        if (child !=null) {
-            // traverse Annotation
-            if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-        }
-        XSParticleDecl left = null;
-        XSParticleDecl right = null;
-        boolean hadContent = false;
-        String childName = null;
-        XSParticleDecl particle, temp;
-        for (;child != null;child = DOMUtil.getNextSiblingElement(child)) {
-
-            particle = null;
-
-            childName = DOMUtil.getLocalName(child);
-            if (childName.equals(SchemaSymbols.ELT_ELEMENT)) {
-                particle = fSchemaHandler.fElementTraverser.traverseLocal(child, schemaDoc, grammar, NOT_ALL_CONTEXT);
-            }
-            else if (childName.equals(SchemaSymbols.ELT_GROUP)) {
-                particle = fSchemaHandler.fGroupTraverser.traverseLocal(child, schemaDoc, grammar);
-
-                // A content type of all can only appear
-                // as the content type of a complex type definition.
-                if (hasAllContent(particle)) {
-                    // don't insert the "all" particle, otherwise we won't be
-                    // able to create DFA from this content model
-                    particle = null;
-                    Object [] args;
-                    if (choice) {
-                        args = new Object[]{SchemaSymbols.ELT_CHOICE};
-                    }
-                    else {
-                        args = new Object[]{SchemaSymbols.ELT_SEQUENCE};
-                    }
-                    reportSchemaError("AllContentLimited",args);
-                }
-
-            }
-            else if (childName.equals(SchemaSymbols.ELT_CHOICE)) {
-                particle = traverseChoice( child,schemaDoc, grammar, NOT_ALL_CONTEXT);
-            }
-            else if (childName.equals(SchemaSymbols.ELT_SEQUENCE)) {
-                particle = traverseSequence(child,schemaDoc, grammar, NOT_ALL_CONTEXT);
-            }
-            else if (childName.equals(SchemaSymbols.ELT_ANY)) {
-                particle = fSchemaHandler.fWildCardTraverser.traverseAny(child, schemaDoc, grammar);
-            }
-            else {
-                Object [] args;
-                if (choice) {
-                    args = new Object[]{SchemaSymbols.ELT_CHOICE};
-                }
-                else {
-                    args = new Object[]{SchemaSymbols.ELT_SEQUENCE};
-                }
-                reportSchemaError("SeqChoiceContentRestricted", args);
-            }
-
-
-            if (left == null) {
-                left = particle;
-            }
-            else if (right == null) {
-                right = particle;
-            }
-            else {
-                temp = new XSParticleDecl();
-                if (choice)
-                    temp.fType = XSParticleDecl.PARTICLE_CHOICE;
-                else
-                    temp.fType = XSParticleDecl.PARTICLE_SEQUENCE;
-                temp.fValue = left;
-                temp.fOtherValue = right;
-                left = temp;
-                right = particle;
-            }
-        }
-
-        // REVISIT: model group
-        // Quick fix for the case that particles <choice> | <sequence> do not have any children.
-        // For now we return null. In the future we might want to return model group decl.
-
-        if (left != null) {
-            temp = new XSParticleDecl();
-            if (choice)
-                temp.fType = XSParticleDecl.PARTICLE_CHOICE;
-            else
-                temp.fType = XSParticleDecl.PARTICLE_SEQUENCE;
-            temp.fValue = left;
-            temp.fOtherValue = right;
-            left = temp;
-
-            XInt minAtt = (XInt)attrValues[XSAttributeChecker.ATTIDX_MINOCCURS];
-            XInt maxAtt = (XInt)attrValues[XSAttributeChecker.ATTIDX_MAXOCCURS];
-            Long defaultVals = (Long)attrValues[XSAttributeChecker.ATTIDX_FROMDEFAULT];
-            left.fMinOccurs = minAtt.intValue();
-            left.fMaxOccurs = maxAtt.intValue();
-            left = checkOccurrences(left,
-                                    choice ? SchemaSymbols.ELT_CHOICE : SchemaSymbols.ELT_SEQUENCE,
-                                    (Element)decl.getParentNode(),
-                                    allContextFlags,
-                                    defaultVals.longValue());
-        }
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return left;
-    }
-
-    // Determines whether a content spec tree represents an "all" content model
-    protected boolean hasAllContent(XSParticleDecl particle) {
-        // If the content is not empty, is the top node ALL?
-        if (particle != null) {
-
-            // REVISIT: defered?
-            // An ALL node could be optional, so we have to be prepared
-            // to look one level below a ZERO_OR_ONE node for an ALL.
-            //if (fParticle.type == XSParticleDecl.CONTENTSPECNODE_ZERO_OR_ONE) {
-            //    fSchemaGrammar.getContentSpec(content.value, content);
-            //}
-
-            return(particle.fType == XSParticleDecl.PARTICLE_ALL);
-        }
-
-        return false;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java
deleted file mode 100644
index 23460ce..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java
+++ /dev/null
@@ -1,588 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.XSFacets;
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.apache.xerces.impl.xs.XSNotationDecl;
-import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
-import org.apache.xerces.impl.xs.XSAttributeUse;
-import org.apache.xerces.impl.xs.XSWildcardDecl;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.impl.validation.ValidationState;
-import org.w3c.dom.Element;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.lang.reflect.*;
-import org.apache.xerces.util.DOMUtil;
-
-/**
- * Class <code>XSDAbstractTraverser</code> serves as the base class for all
- * other <code>XSD???Traverser</code>s. It holds the common data and provide
- * a unified way to initialize these data.
- *
- * @author Elena Litani, IBM
- * @author Rahul Srivastava, Sun Microsystems Inc.
- * @author Neeraj Bajaj, Sun Microsystems Inc.
- *
- * @version $Id$
- */
-abstract class XSDAbstractTraverser {
-
-    protected static final String NO_NAME      = "(no name)";
-
-    // Flags for checkOccurrences to indicate any special
-    // restrictions on minOccurs and maxOccurs relating to "all".
-    //    NOT_ALL_CONTEXT    - not processing an <all>
-    //    PROCESSING_ALL_EL  - processing an <element> in an <all>
-    //    GROUP_REF_WITH_ALL - processing <group> reference that contained <all>
-    //    CHILD_OF_GROUP     - processing a child of a model group definition
-    //    PROCESSING_ALL_GP  - processing an <all> group itself
-
-    protected static final int NOT_ALL_CONTEXT    = 0;
-    protected static final int PROCESSING_ALL_EL  = 1;
-    protected static final int GROUP_REF_WITH_ALL = 2;
-    protected static final int CHILD_OF_GROUP     = 4;
-    protected static final int PROCESSING_ALL_GP  = 8;
-
-    //Shared data
-    protected XSDHandler            fSchemaHandler = null;
-    protected SymbolTable           fSymbolTable = null;
-    protected XSAttributeChecker    fAttrChecker = null;
-    protected XMLErrorReporter      fErrorReporter = null;
-
-    // used to validate default/fixed attribute values
-    ValidationState fValidationState = new ValidationState();
-
-    XSDAbstractTraverser (XSDHandler handler,
-                          XSAttributeChecker attrChecker) {
-        fSchemaHandler = handler;
-        fAttrChecker = attrChecker;
-    }
-
-    void reset(XMLErrorReporter errorReporter, SymbolTable symbolTable) {
-        fErrorReporter = errorReporter;
-        fSymbolTable = symbolTable;
-        fValidationState.setExtraChecking(false);
-        fValidationState.setSymbolTable(symbolTable);
-    }
-
-    // traverse the annotation declaration
-    // REVISIT: store annotation information for PSVI
-    // REVISIT: how to pass the parentAttrs? as DOM attributes?
-    //          as name/value pairs (string)? in parsed form?
-    // REVISIT: what to return
-    void traverseAnnotationDecl(Element annotationDecl, Object[] parentAttrs,
-                                boolean isGlobal, XSDocumentInfo schemaDoc) {
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(annotationDecl, isGlobal, schemaDoc);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        for (Element child = DOMUtil.getFirstChildElement(annotationDecl);
-            child != null;
-            child = DOMUtil.getNextSiblingElement(child)) {
-            String name = DOMUtil.getLocalName(child);
-
-            // the only valid children of "annotation" are
-            // "appinfo" and "documentation"
-            if (!((name.equals(SchemaSymbols.ELT_APPINFO)) ||
-                  (name.equals(SchemaSymbols.ELT_DOCUMENTATION)))) {
-                reportGenericSchemaError("an <annotation> can only contain <appinfo> and <documentation> elements");
-            }
-
-            // General Attribute Checking
-            // There is no difference between global or local appinfo/documentation,
-            // so we assume it's always global.
-            attrValues = fAttrChecker.checkAttributes(child, true, schemaDoc);
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-        }
-
-        // REVISIT: an annotation decl should be returned when we support PSVI
-    }
-
-    // the QName simple type used to resolve qnames
-    private static final XSSimpleType fQNameDV = (XSSimpleType)SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(SchemaSymbols.ATTVAL_QNAME);
-    // Temp data structures to be re-used in traversing facets
-    private StringBuffer fPattern = new StringBuffer();
-    private final XSFacets xsFacets = new XSFacets();
-
-    class FacetInfo {
-        XSFacets facetdata;
-        Element nodeAfterFacets;
-        short fPresentFacets;
-        short fFixedFacets;
-    }
-
-    FacetInfo traverseFacets(Element content, Object[] contentAttrs, String simpleTypeName,
-                             XSSimpleType baseValidator, XSDocumentInfo schemaDoc,
-                             SchemaGrammar grammar) {
-
-        short facetsPresent = 0 ;
-        short facetsFixed = 0; // facets that have fixed="true"
-
-        String facet;
-        Vector enumData = new Vector();
-        int currentFacet = 0;
-        while (content != null) {
-            // General Attribute Checking
-            Object[] attrs = null;
-            facet = DOMUtil.getLocalName(content);
-            /*if (facet.equals(SchemaSymbols.ELT_ANNOTATION) || facet.equals(SchemaSymbols.ELT_SIMPLETYPE)) {
-                Object[] args = {simpleTypeName};
-                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                           "ListUnionRestrictionError",
-                                           args,
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }*/
-            if (facet.equals(SchemaSymbols.ELT_ENUMERATION)) {
-                attrs = fAttrChecker.checkAttributes(content, false, schemaDoc);
-                String enumVal = (String)attrs[XSAttributeChecker.ATTIDX_VALUE];
-
-                if (baseValidator.isNOTATIONType()) {
-                    try{
-                        QName temp = (QName)fQNameDV.validate(enumVal, schemaDoc.fValidationContext, null);
-                        if (fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.NOTATION_TYPE, temp) == null) {
-                            reportGenericSchemaError("Notation '" + temp.localpart +
-                                                     "' not found in the grammar "+ temp.uri);
-                        }
-                    }catch(InvalidDatatypeValueException ex){
-                        reportGenericSchemaError(ex.getMessage());
-                    }
-                }
-
-                enumData.addElement(enumVal);
-                Element child = DOMUtil.getFirstChildElement( content );
-
-                if (child != null) {
-                     // traverse annotation if any
-                     if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                         traverseAnnotationDecl(child, attrs, false, schemaDoc);
-                         child = DOMUtil.getNextSiblingElement(child);
-                     }
-                     if (child !=null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                          reportGenericSchemaError("Enumeration facet has more than one annotation.");
-                     }
-               }
-            }
-            else if (facet.equals(SchemaSymbols.ELT_PATTERN)) {
-                attrs = fAttrChecker.checkAttributes(content, false, schemaDoc);
-                if (fPattern.length() == 0) {
-                    fPattern.append((String)attrs[XSAttributeChecker.ATTIDX_VALUE]);
-                } else {
-                    // ---------------------------------------------
-                    //datatypes: 5.2.4 pattern: src-multiple-pattern
-                    // ---------------------------------------------
-                    fPattern.append("|");
-                    fPattern.append((String)attrs[XSAttributeChecker.ATTIDX_VALUE]);
-
-                    Element child = DOMUtil.getFirstChildElement( content );
-                    if (child != null) {
-                         // traverse annotation if any
-                         if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                             traverseAnnotationDecl(child, attrs, false, schemaDoc);
-                             child = DOMUtil.getNextSiblingElement(child);
-                         }
-                         if (child !=null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                              reportGenericSchemaError("Pattern facet has more than one annotation.");
-                         }
-                   }
-                }
-            }
-            else {
-                if (facet.equals(SchemaSymbols.ELT_MINLENGTH)) {
-                    currentFacet = XSSimpleType.FACET_MINLENGTH;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_MAXLENGTH)) {
-                    currentFacet = XSSimpleType.FACET_MAXLENGTH;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_MAXEXCLUSIVE)) {
-                    currentFacet = XSSimpleType.FACET_MAXEXCLUSIVE;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_MAXINCLUSIVE)) {
-                    currentFacet = XSSimpleType.FACET_MAXINCLUSIVE;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_MINEXCLUSIVE)) {
-                    currentFacet = XSSimpleType.FACET_MINEXCLUSIVE;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_MININCLUSIVE)) {
-                    currentFacet = XSSimpleType.FACET_MININCLUSIVE;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_TOTALDIGITS)) {
-                    currentFacet = XSSimpleType.FACET_TOTALDIGITS;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_FRACTIONDIGITS)) {
-                    currentFacet = XSSimpleType.FACET_FRACTIONDIGITS;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_WHITESPACE)) {
-                    currentFacet = XSSimpleType.FACET_WHITESPACE;
-                }
-                else if (facet.equals(SchemaSymbols.ELT_LENGTH)) {
-                    currentFacet = XSSimpleType.FACET_LENGTH;
-                }
-                else {
-                    break;   // a non-facet
-                }
-
-                attrs = fAttrChecker.checkAttributes(content, false, schemaDoc);
-
-                // check for duplicate facets
-                if ((facetsPresent & currentFacet) != 0) {
-                    fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                               "DatatypeError",
-                                               new Object[]{"The facet '" + facet + "' is defined more than once."},
-                                               XMLErrorReporter.SEVERITY_ERROR);
-                } else if (attrs[XSAttributeChecker.ATTIDX_VALUE] != null) {
-                    facetsPresent |= currentFacet;
-                    // check for fixed facet
-                    if (((Boolean)attrs[XSAttributeChecker.ATTIDX_FIXED]).booleanValue()) {
-                        facetsFixed |= currentFacet;
-                    }
-                    switch (currentFacet) {
-                        case XSSimpleType.FACET_MINLENGTH:
-                            xsFacets.minLength = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue();
-                            break;
-                        case XSSimpleType.FACET_MAXLENGTH:
-                            xsFacets.maxLength = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue();
-                            break;
-                        case XSSimpleType.FACET_MAXEXCLUSIVE:
-                            xsFacets.maxExclusive = (String)attrs[XSAttributeChecker.ATTIDX_VALUE];
-                            break;
-                        case XSSimpleType.FACET_MAXINCLUSIVE:
-                            xsFacets.maxInclusive = (String)attrs[XSAttributeChecker.ATTIDX_VALUE];
-                            break;
-                        case XSSimpleType.FACET_MINEXCLUSIVE:
-                            xsFacets.minExclusive = (String)attrs[XSAttributeChecker.ATTIDX_VALUE];
-                            break;
-                        case XSSimpleType.FACET_MININCLUSIVE:
-                            xsFacets.minInclusive = (String)attrs[XSAttributeChecker.ATTIDX_VALUE];
-                            break;
-                        case XSSimpleType.FACET_TOTALDIGITS:
-                            xsFacets.totalDigits = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue();
-                            break;
-                        case XSSimpleType.FACET_FRACTIONDIGITS:
-                            xsFacets.fractionDigits = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue();
-                            break;
-                        case XSSimpleType.FACET_WHITESPACE:
-                            xsFacets.whiteSpace = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).shortValue();
-                            break;
-                        case XSSimpleType.FACET_LENGTH:
-                            xsFacets.length = ((XInt)attrs[XSAttributeChecker.ATTIDX_VALUE]).intValue();
-                            break;
-                    }
-                }
-
-                Element child = DOMUtil.getFirstChildElement( content );
-                if (child != null) {
-                    // traverse annotation if any
-                    if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                        traverseAnnotationDecl(child, attrs, false, schemaDoc);
-                        child = DOMUtil.getNextSiblingElement(child);
-                    }
-                    if (child !=null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                         reportGenericSchemaError(facet+" facet has more than one annotation.");
-                    }
-                }
-            }
-            // REVISIT: when to return the array
-            fAttrChecker.returnAttrArray (attrs, schemaDoc);
-            content = DOMUtil.getNextSiblingElement(content);
-        }
-        if (enumData.size() > 0) {
-            facetsPresent |= XSSimpleType.FACET_ENUMERATION;
-            xsFacets.enumeration = enumData;
-        }
-        if (fPattern.length() != 0) {
-            facetsPresent |= XSSimpleType.FACET_PATTERN;
-            xsFacets.pattern = fPattern.toString();
-        }
-
-        fPattern.setLength(0);
-
-        FacetInfo fi = new FacetInfo();
-        fi.facetdata = xsFacets;
-        fi.nodeAfterFacets = content;
-        fi.fPresentFacets = facetsPresent;
-        fi.fFixedFacets = facetsFixed;
-        return fi;
-    }
-
-    //
-    // Traverse a set of attribute and attribute group elements
-    // Needed by complexType and attributeGroup traversal
-    // This method will return the first non-attribute/attrgrp found
-    //
-    Element traverseAttrsAndAttrGrps(Element firstAttr, XSAttributeGroupDecl attrGrp,
-                                     XSDocumentInfo schemaDoc, SchemaGrammar grammar ) {
-
-        Element child=null;
-        XSAttributeGroupDecl tempAttrGrp = null;
-        XSAttributeUse tempAttrUse = null;
-        String childName;
-
-        for (child=firstAttr; child!=null; child=DOMUtil.getNextSiblingElement(child)) {
-            childName = DOMUtil.getLocalName(child);
-            if (childName.equals(SchemaSymbols.ELT_ATTRIBUTE)) {
-                tempAttrUse = fSchemaHandler.fAttributeTraverser.traverseLocal(child,
-                                                                               schemaDoc, grammar);
-                if (tempAttrUse == null) break;
-                if (attrGrp.getAttributeUse(tempAttrUse.fAttrDecl.fTargetNamespace,
-                                            tempAttrUse.fAttrDecl.fName)==null) {
-                    String idName = attrGrp.addAttributeUse(tempAttrUse);
-                    if (idName != null) {
-                        reportGenericSchemaError("Two distinct members of the {attribute uses} '" +
-                                                 idName + "' and '" + tempAttrUse.fAttrDecl.fName +
-                                                 "' have {attribute declaration}s both of whose {type definition}s are or are derived from ID");
-                    }
-                }
-                else {
-                    // REVISIT: what if one of the attribute uses is "prohibited"
-                    reportGenericSchemaError("Duplicate attribute " +
-                                             tempAttrUse.fAttrDecl.fName + " found ");
-                }
-            }
-            else if (childName.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) {
-                //REVISIT: do we need to save some state at this point??
-                tempAttrGrp = fSchemaHandler.fAttributeGroupTraverser.traverseLocal(
-                       child, schemaDoc, grammar);
-                if(tempAttrGrp == null ) break;
-                XSAttributeUse[] attrUseS = tempAttrGrp.getAttributeUses();
-                XSAttributeUse existingAttrUse = null;
-                for (int i=0; i<attrUseS.length; i++) {
-                    existingAttrUse = attrGrp.getAttributeUse(attrUseS[i].fAttrDecl.fTargetNamespace,
-                                                              attrUseS[i].fAttrDecl.fName);
-                    if (existingAttrUse == null) {
-                        String idName = attrGrp.addAttributeUse(attrUseS[i]);
-                        if (idName != null) {
-                            reportGenericSchemaError("Two distinct members of the {attribute uses} '" +
-                                                     idName + "' and '" + attrUseS[i].fAttrDecl.fName +
-                                                     "' have {attribute declaration}s both of whose {type definition}s are or are derived from ID");
-                        }
-                    }
-                    else {
-                        // REVISIT: what if one of the attribute uses is "prohibited"
-                        reportGenericSchemaError("Duplicate attribute " +
-                                                 existingAttrUse.fAttrDecl.fName + " found ");
-                    }
-                }
-
-                if (tempAttrGrp.fAttributeWC != null) {
-                    if (attrGrp.fAttributeWC == null) {
-                        attrGrp.fAttributeWC = tempAttrGrp.fAttributeWC;
-                    }
-                    // perform intersection of attribute wildcard
-                    else {
-                        attrGrp.fAttributeWC = attrGrp.fAttributeWC.
-                                               performIntersectionWith(tempAttrGrp.fAttributeWC, attrGrp.fAttributeWC.fProcessContents);
-                        if (attrGrp.fAttributeWC == null) {
-                            reportGenericSchemaError("intersection of wildcards is not expressible");
-                        }
-                    }
-                }
-            }
-            else
-                break;
-        } // for
-
-        if (child != null) {
-            childName = DOMUtil.getLocalName(child);
-            if (childName.equals(SchemaSymbols.ELT_ANYATTRIBUTE)) {
-                XSWildcardDecl tempAttrWC = fSchemaHandler.fWildCardTraverser.
-                                            traverseAnyAttribute(child, schemaDoc, grammar);
-                if (attrGrp.fAttributeWC == null) {
-                    attrGrp.fAttributeWC = tempAttrWC;
-                }
-                // perform intersection of attribute wildcard
-                else {
-                    attrGrp.fAttributeWC = tempAttrWC.
-                                           performIntersectionWith(attrGrp.fAttributeWC, tempAttrWC.fProcessContents);
-                    if (attrGrp.fAttributeWC == null) {
-                        reportGenericSchemaError("intersection of wildcards is not expressible");
-                    }
-                }
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-        }
-
-        // Success
-        return child;
-
-    }
-
-    void reportSchemaError (String key, Object[] args) {
-        fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                   key, args,
-                                   XMLErrorReporter.SEVERITY_ERROR);
-    }
-
-    // REVISIT: is it how we want to handle error reporting?
-    void reportGenericSchemaError (String error) {
-        fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                   "General",
-                                   new Object[]{error},
-                                   XMLErrorReporter.SEVERITY_ERROR);
-    }
-
-
-    /**
-     * Element/Attribute traversers call this method to check whether
-     * the type is NOTATION without enumeration facet
-     */
-    void checkNotationType(String refName, XSTypeDecl typeDecl) {
-        if (typeDecl.getXSType() == typeDecl.SIMPLE_TYPE && ((XSSimpleType)typeDecl).isNOTATIONType()) {
-            if ((((XSSimpleType)typeDecl).getDefinedFacets() & XSSimpleType.FACET_ENUMERATION) == 0) {
-                reportSchemaError("dt-enumeration-notation", new Object[]{refName});
-            }
-        }
-    }
-
-    // Checks constraints for minOccurs, maxOccurs
-    protected XSParticleDecl checkOccurrences(XSParticleDecl particle,
-                                              String particleName, Element parent,
-                                              int allContextFlags,
-                                              long defaultVals) {
-
-
-        int min = particle.fMinOccurs;
-        int max = particle.fMaxOccurs;
-        boolean defaultMin = (defaultVals & (1 << XSAttributeChecker.ATTIDX_MINOCCURS)) != 0;
-        boolean defaultMax = (defaultVals & (1 << XSAttributeChecker.ATTIDX_MAXOCCURS)) != 0;
-
-        boolean processingAllEl = ((allContextFlags & PROCESSING_ALL_EL) != 0);
-        boolean processingAllGP = ((allContextFlags & PROCESSING_ALL_GP) != 0);
-        boolean groupRefWithAll = ((allContextFlags & GROUP_REF_WITH_ALL) != 0);
-        boolean isGroupChild    = ((allContextFlags & CHILD_OF_GROUP) != 0);
-
-        // Neither minOccurs nor maxOccurs may be specified
-        // for the child of a model group definition.
-        if (isGroupChild && (!defaultMin || !defaultMax)) {
-            Object[] args = new Object[]{parent.getAttribute(SchemaSymbols.ATT_NAME),
-                particleName};
-            fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                       "MinMaxOnGroupChild",
-                                       args,
-                                       XMLErrorReporter.SEVERITY_ERROR);
-            min = max = 1;
-        }
-
-        // If minOccurs=maxOccurs=0, no component is specified
-        if (min == 0 && max== 0) {
-            particle.fType = XSParticleDecl.PARTICLE_EMPTY;
-            return null;
-        }
-
-        // For the elements referenced in an <all>, minOccurs attribute
-        // must be zero or one, and maxOccurs attribute must be one.
-        // For a complex type definition that contains an <all> or a
-        // reference a <group> whose model group is an all model group,
-        // minOccurs and maxOccurs must be one.
-        if (processingAllEl || groupRefWithAll || processingAllGP) {
-            String errorMsg;
-            if ((processingAllGP||groupRefWithAll||min!=0) && min !=1) {
-                if (processingAllEl) {
-                    errorMsg = "BadMinMaxForAllElem";
-                }
-                else if (processingAllGP) {
-                    errorMsg = "BadMinMaxForAllGp";
-                }
-                else {
-                    errorMsg = "BadMinMaxForGroupWithAll";
-                }
-                Object[] args = new Object [] {"minOccurs", Integer.toString(min)};
-                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                           errorMsg,
-                                           args,
-                                           XMLErrorReporter.SEVERITY_ERROR);
-                min = 1;
-            }
-
-            if (max != 1) {
-
-                if (processingAllEl) {
-                    errorMsg = "BadMinMaxForAllElem";
-                }
-                else if (processingAllGP) {
-                    errorMsg = "BadMinMaxForAllGp";
-                }
-                else {
-                    errorMsg = "BadMinMaxForGroupWithAll";
-                }
-
-                Object[] args = new Object [] {"maxOccurs", Integer.toString(max)};
-                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                           errorMsg,
-                                           args,
-                                           XMLErrorReporter.SEVERITY_ERROR);
-                max = 1;
-            }
-        }
-
-        particle.fMaxOccurs = min;
-        particle.fMaxOccurs = max;
-
-        return particle;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java
deleted file mode 100644
index d56db04..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDAttributeGroupTraverser.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.xni.QName;
-import org.w3c.dom.Element;
-
-/**
- * The attribute group definition schema component traverser.
- *
- * <attributeGroup
- *   id = ID
- *   name = NCName
- *   ref = QName
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?))
- * </attributeGroup>
- *
- * @author Rahul Srivastava, Sun Microsystems Inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-class XSDAttributeGroupTraverser extends XSDAbstractTraverser {
-
-    XSDAttributeGroupTraverser (XSDHandler handler,
-                                XSAttributeChecker gAttrCheck) {
-
-        super(handler, gAttrCheck);
-    }
-
-
-    XSAttributeGroupDecl traverseLocal(Element elmNode,
-                                       XSDocumentInfo schemaDoc,
-                                       SchemaGrammar grammar) {
-
-        // General Attribute Checking for elmNode declared locally
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc);
-
-        // get attribute
-        QName   refAttr	= (QName)   attrValues[XSAttributeChecker.ATTIDX_REF];
-
-        XSAttributeGroupDecl attrGrp = null;
-
-        // ref should be here.
-        if (refAttr == null) {
-            reportGenericSchemaError("Local attributeGroup declaration should have ref.");
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-            return null;
-        }
-
-        // get global decl
-        attrGrp = (XSAttributeGroupDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.ATTRIBUTEGROUP_TYPE, refAttr);
-
-
-        // no children are allowed here except annotation, which is optional.
-        Element child = DOMUtil.getFirstChildElement(elmNode);
-        if (child != null) {
-            String childName = DOMUtil.getLocalName(child);
-            if (childName.equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-
-            if (child != null) {
-                Object[] args = new Object [] {refAttr};
-                reportSchemaError("src-attribute_group", args);
-            }
-         } // if
-
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-        return attrGrp;
-
-    } // traverseLocal
-
-    XSAttributeGroupDecl traverseGlobal(Element elmNode,
-                                        XSDocumentInfo schemaDoc,
-                                        SchemaGrammar grammar) {
-
-        XSAttributeGroupDecl attrGrp = new XSAttributeGroupDecl();
-
-        // General Attribute Checking for elmNode declared globally
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, true, schemaDoc);
-
-        String  nameAttr   = (String) attrValues[XSAttributeChecker.ATTIDX_NAME];
-
-        // global declaration must have a name
-        if (nameAttr == null) {
-            reportGenericSchemaError("Global attributeGroup declaration must have a name.");
-            nameAttr = "no name";
-        }
-
-        attrGrp.fName = nameAttr;
-        attrGrp.fTargetNamespace = schemaDoc.fTargetNamespace;
-
-        // check the content
-        Element child = DOMUtil.getFirstChildElement(elmNode);
-
-        if (child!=null) {
-            String childName = DOMUtil.getLocalName(child);
-            if (childName.equals(SchemaSymbols.ELT_ANNOTATION)) {
-              traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-              child = DOMUtil.getNextSiblingElement(child);
-          }
-        }
-
-        // Traverse the attribute and attribute group elements and fill in the 
-        // attributeGroup structure
-
-        Element nextNode = traverseAttrsAndAttrGrps(child, attrGrp, schemaDoc, grammar);
-        if (nextNode!=null) {
-            // An invalid element was found...
-            Object[] args = new Object [] {nameAttr, DOMUtil.getLocalName(nextNode)};
-            reportSchemaError("src-attribute_group", args);
-        } 
- 
-        // Remove prohibited attributes from the set
-        attrGrp.removeProhibitedAttrs();
-        
-        // check for restricted redefine:
-        XSAttributeGroupDecl redefinedAttrGrp = (XSAttributeGroupDecl)fSchemaHandler.getGrpOrAttrGrpRedefinedByRestriction(
-                XSDHandler.ATTRIBUTEGROUP_TYPE, 
-                new QName(fSchemaHandler.EMPTY_STRING, nameAttr, nameAttr, schemaDoc.fTargetNamespace), 
-                schemaDoc); 
-        if(redefinedAttrGrp != null) {
-            String err = attrGrp.validRestrictionOf(redefinedAttrGrp);
-            if (err != null) {
-                reportSchemaError("src-redefine.7.2.2", new Object [] {nameAttr, err});
-            }
-        }
-
-        // make an entry in global declarations.
-        grammar.addGlobalAttributeGroupDecl(attrGrp);
-
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-        return attrGrp;
-
-    } // traverseGlobal
-
-} // XSDAttributeGroupTraverser
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java
deleted file mode 100644
index 530a50e..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDAttributeTraverser.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.ValidatedInfo;
-import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSAttributeDecl;
-import org.apache.xerces.impl.xs.XSAttributeUse;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.impl.validation.ValidationState;
-import org.w3c.dom.Element;
-
-/**
- * The attribute declaration schema component traverser.
- *
- * <attribute
- *   default = string
- *   fixed = string
- *   form = (qualified | unqualified)
- *   id = ID
- *   name = NCName
- *   ref = QName
- *   type = QName
- *   use = (optional | prohibited | required) : optional
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, (simpleType?))
- * </attribute>
- *
- * @author Sandy Gao, IBM
- * @author Neeraj Bajaj, Sun Microsystems, inc.
- * @version $Id$
- */
-class XSDAttributeTraverser extends XSDAbstractTraverser {
-
-    public XSDAttributeTraverser (XSDHandler handler,
-                                  XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-    protected XSAttributeUse traverseLocal(Element attrDecl,
-                                           XSDocumentInfo schemaDoc,
-                                           SchemaGrammar grammar) {
-
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, false, schemaDoc);
-
-        String defaultAtt = (String) attrValues[XSAttributeChecker.ATTIDX_DEFAULT];
-        String fixedAtt   = (String) attrValues[XSAttributeChecker.ATTIDX_FIXED];
-        String nameAtt    = (String) attrValues[XSAttributeChecker.ATTIDX_NAME];
-        QName  refAtt     = (QName)  attrValues[XSAttributeChecker.ATTIDX_REF];
-        XInt   useAtt     = (XInt)   attrValues[XSAttributeChecker.ATTIDX_USE];
-
-        // get 'attribute declaration'
-        XSAttributeDecl attribute = null;
-        if (attrDecl.getAttributeNode(SchemaSymbols.ATT_REF) != null) {
-            if (refAtt != null) {
-                attribute = (XSAttributeDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.ATTRIBUTE_TYPE, refAtt);
-
-                Element child = DOMUtil.getFirstChildElement(attrDecl);
-                if(child != null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-                    child = DOMUtil.getNextSiblingElement(child);
-                }
-
-                if (child != null) {
-                    reportSchemaError("src-attribute.3.2", new Object[]{refAtt});
-                }
-                // for error reporting
-                nameAtt = refAtt.localpart;
-            } else {
-                attribute = null;
-            }
-        } else {
-            attribute = traverseNamedAttr(attrDecl, attrValues, schemaDoc, grammar, false);
-        }
-
-        // get 'value constraint'
-        short consType = XSAttributeDecl.NO_CONSTRAINT;
-        if (defaultAtt != null) {
-            consType = XSAttributeDecl.DEFAULT_VALUE;
-        } else if (fixedAtt != null) {
-            consType = XSAttributeDecl.FIXED_VALUE;
-            defaultAtt = fixedAtt;
-            fixedAtt = null;
-        }
-
-        XSAttributeUse attrUse = null;
-        if (attribute != null) {
-            attrUse = new XSAttributeUse();
-            attrUse.fAttrDecl = attribute;
-            attrUse.fUse = useAtt.shortValue();
-            attrUse.fConstraintType = consType;
-            if (defaultAtt != null) {
-                attrUse.fDefault = new ValidatedInfo();
-                attrUse.fDefault.normalizedValue = defaultAtt;
-            }
-        }
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        //src-attribute
-
-        // 1 default and fixed must not both be present.
-        if (defaultAtt != null && fixedAtt != null) {
-            reportSchemaError("src-attribute.1", new Object[]{nameAtt});
-        }
-
-        // 2 If default and use are both present, use must have the actual value optional.
-        if (consType == XSAttributeDecl.DEFAULT_VALUE &&
-            useAtt != null && useAtt.intValue() != SchemaSymbols.USE_OPTIONAL) {
-            reportSchemaError("src-attribute.2", new Object[]{nameAtt});
-        }
-
-        // a-props-correct
-
-        if (defaultAtt != null && attrUse != null) {
-            // 2 if there is a {value constraint}, the canonical lexical representation of its value must be valid with respect to the {type definition} as defined in String Valid (3.14.4).
-            fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
-            if (!checkDefaultValid(attrUse)) {
-                reportSchemaError ("a-props-correct.2", new Object[]{nameAtt, defaultAtt});
-            }
-
-            // 3 If the {type definition} is or is derived from ID then there must not be a {value constraint}.
-            if (attribute.fType.isIDType() ) {
-                reportSchemaError ("a-props-correct.3", new Object[]{nameAtt});
-            }
-
-            // check 3.5.6 constraint
-            // Attribute Use Correct
-            // 2 If the {attribute declaration} has a fixed {value constraint}, then if the attribute use itself has a {value constraint}, it must also be fixed and its value must match that of the {attribute declaration}'s {value constraint}.
-            if (attrUse.fAttrDecl.getConstraintType() == XSAttributeDecl.FIXED_VALUE &&
-                attrUse.fConstraintType != XSAttributeDecl.NO_CONSTRAINT) {
-                if (attrUse.fConstraintType != XSAttributeDecl.FIXED_VALUE ||
-                    attrUse.fAttrDecl.fType.isEqual(attrUse.fAttrDecl.fDefault.actualValue,
-                                                    attrUse.fDefault.actualValue)) {
-                    reportSchemaError ("au-props-correct.2", new Object[]{nameAtt});
-                }
-            }
-        }
-
-        return attrUse;
-    }
-
-    protected XSAttributeDecl traverseGlobal(Element attrDecl,
-                                             XSDocumentInfo schemaDoc,
-                                             SchemaGrammar grammar) {
-
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, true, schemaDoc);
-
-        XSAttributeDecl attribute = traverseNamedAttr(attrDecl, attrValues, schemaDoc, grammar, true);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        if (attribute != null)
-            attribute.setIsGlobal();
-
-        return attribute;
-    }
-
-    /**
-     * Traverse a globally declared attribute.
-     *
-     * @param  attrDecl
-     * @param  attrValues
-     * @param  schemaDoc
-     * @param  grammar
-     * @param  isGlobal
-     * @return the attribute declaration index
-     */
-    XSAttributeDecl traverseNamedAttr(Element attrDecl,
-                                      Object[] attrValues,
-                                      XSDocumentInfo schemaDoc,
-                                      SchemaGrammar grammar,
-                                      boolean isGlobal) {
-
-        String  defaultAtt = (String) attrValues[XSAttributeChecker.ATTIDX_DEFAULT];
-        String  fixedAtt   = (String) attrValues[XSAttributeChecker.ATTIDX_FIXED];
-        XInt    formAtt    = (XInt)   attrValues[XSAttributeChecker.ATTIDX_FORM];
-        String  nameAtt    = (String) attrValues[XSAttributeChecker.ATTIDX_NAME];
-        QName   typeAtt    = (QName)  attrValues[XSAttributeChecker.ATTIDX_TYPE];
-
-        // Step 1: get declaration information
-        XSAttributeDecl attribute = new XSAttributeDecl();
-
-        // get 'name'
-        if (nameAtt != null)
-            attribute.fName = fSymbolTable.addSymbol(nameAtt);
-
-        // get 'target namespace'
-        if (isGlobal) {
-            attribute.fTargetNamespace = schemaDoc.fTargetNamespace;
-        }
-        else if (formAtt != null) {
-            if (formAtt.intValue() == SchemaSymbols.FORM_QUALIFIED)
-                attribute.fTargetNamespace = schemaDoc.fTargetNamespace;
-            else
-                attribute.fTargetNamespace = null;
-        } else if (schemaDoc.fAreLocalAttributesQualified) {
-            attribute.fTargetNamespace = schemaDoc.fTargetNamespace;
-        } else {
-            attribute.fTargetNamespace = null;
-        }
-
-        // get 'value constraint'
-        // for local named attribute, value constraint is absent
-        if (isGlobal) {
-            if (fixedAtt != null) {
-                attribute.fDefault = new ValidatedInfo();
-                attribute.fDefault.normalizedValue = fixedAtt;
-                attribute.setConstraintType(XSElementDecl.FIXED_VALUE);
-            } else if (defaultAtt != null) {
-                attribute.fDefault = new ValidatedInfo();
-                attribute.fDefault.normalizedValue = defaultAtt;
-                attribute.setConstraintType(XSElementDecl.DEFAULT_VALUE);
-            } else {
-                attribute.setConstraintType(XSElementDecl.NO_CONSTRAINT);
-            }
-        }
-
-        // get 'annotation'
-        Element child = DOMUtil.getFirstChildElement(attrDecl);
-        if(child != null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-            traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-            child = DOMUtil.getNextSiblingElement(child);
-        }
-
-        // get 'type definition'
-        XSSimpleType attrType = null;
-        boolean haveAnonType = false;
-
-        // Handle Anonymous type if there is one
-        if (child != null) {
-            String childName = DOMUtil.getLocalName(child);
-
-            if (childName.equals(SchemaSymbols.ELT_SIMPLETYPE)) {
-                attrType = fSchemaHandler.fSimpleTypeTraverser.traverseLocal(child, schemaDoc, grammar);
-                haveAnonType = true;
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-        }
-
-        // Handler type attribute
-        if (attrType == null && typeAtt != null) {
-            XSTypeDecl type = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, typeAtt);
-            if (type != null && type.getXSType() == XSTypeDecl.SIMPLE_TYPE)
-                attrType = (XSSimpleType)type;
-            else
-                // REVISIT: what should be the error code here
-                reportGenericSchemaError("the type for attribute '"+nameAtt+"' must be a simpleType");
-        }
-
-        if (attrType == null) {
-            attrType = SchemaGrammar.fAnySimpleType;
-        }
-
-        attribute.fType = attrType;
-
-        // Step 2: register attribute decl to the grammar
-        if (isGlobal && nameAtt != null)
-            grammar.addGlobalAttributeDecl(attribute);
-
-        // Step 3: check against schema for schemas
-
-        // required attributes
-        if (nameAtt == null) {
-            if (isGlobal)
-                reportSchemaError("s4s-att-must-appear", new Object[]{SchemaSymbols.ELT_ATTRIBUTE, SchemaSymbols.ATT_NAME});
-            else
-                reportSchemaError("src-attribute.3.1", null);
-            nameAtt = NO_NAME;
-        }
-
-        // element
-        if (child != null) {
-            reportSchemaError("s4s-elt-must-match", new Object[]{nameAtt, "(annotation?, (simpleType?))"});
-        }
-
-        // Step 4: check 3.2.3 constraints
-
-        // src-attribute
-
-        // 1 default and fixed must not both be present.
-        if (defaultAtt != null && fixedAtt != null) {
-            reportSchemaError("src-attribute.1", new Object[]{nameAtt});
-        }
-
-        // 2 If default and use are both present, use must have the actual value optional.
-        // This is checked in "traverse" method
-
-        // 3 If the item's parent is not <schema>, then all of the following must be true:
-        // 3.1 One of ref or name must be present, but not both.
-        // This is checked in XSAttributeChecker
-
-        // 3.2 If ref is present, then all of <simpleType>, form and type must be absent.
-        // Attributes are checked in XSAttributeChecker, elements are checked in "traverse" method
-
-        // 4 type and <simpleType> must not both be present.
-        if (haveAnonType && (typeAtt != null)) {
-            reportSchemaError( "src-attribute.4", new Object[]{nameAtt});
-        }
-
-        // Step 5: check 3.2.6 constraints
-        // check for NOTATION type
-        checkNotationType(nameAtt, attrType);
-
-        // a-props-correct
-
-        // 2 if there is a {value constraint}, the canonical lexical representation of its value must be valid with respect to the {type definition} as defined in String Valid (3.14.4).
-        if (attribute.fDefault != null) {
-            fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
-            if (!checkDefaultValid(attribute)) {
-                reportSchemaError ("a-props-correct.2", new Object[]{nameAtt, defaultAtt});
-            }
-        }
-
-        // 3 If the {type definition} is or is derived from ID then there must not be a {value constraint}.
-        if (attribute.fDefault != null) {
-            if (attrType.isIDType() ) {
-                reportSchemaError ("a-props-correct.3", new Object[]{nameAtt});
-            }
-        }
-
-        // no-xmlns
-
-        // The {name} of an attribute declaration must not match xmlns.
-        if (nameAtt != null && nameAtt.equals(SchemaSymbols.XMLNS)) {
-            reportSchemaError("no-xmlns", null);
-        }
-
-        // no-xsi
-
-        // The {target namespace} of an attribute declaration, whether local or top-level, must not match http://www.w3.org/2001/XMLSchema-instance (unless it is one of the four built-in declarations given in the next section).
-        if (attribute.fTargetNamespace != null && attribute.fTargetNamespace.equals(SchemaSymbols.URI_XSI)) {
-            reportSchemaError("no-xsi", new Object[]{SchemaSymbols.URI_XSI});
-        }
-
-        return attribute;
-    }
-
-    // return whether the constraint value is valid for the given type
-    boolean checkDefaultValid(XSAttributeDecl attribute) {
-
-        boolean ret = true;
-
-        try {
-            //set the actual value
-            attribute.fType.validate(attribute.fDefault.normalizedValue, fValidationState, attribute.fDefault);
-        } catch (InvalidDatatypeValueException ide) {
-            ret = false;
-        }
-
-        return ret;
-    }
-
-    // return whether the constraint value is valid for the given type
-    boolean checkDefaultValid(XSAttributeUse attrUse) {
-
-        boolean ret = true;
-
-        try {
-            //set the actual value
-            attrUse.fAttrDecl.fType.validate(attrUse.fDefault.normalizedValue, fValidationState, attrUse.fDefault);
-        } catch (InvalidDatatypeValueException ide) {
-            ret = false;
-        }
-
-        return ret;
-    }
-
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
deleted file mode 100644
index 06c9ab8..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
+++ /dev/null
@@ -1,938 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.SchemaDVFactory;
-import org.apache.xerces.impl.dv.XSFacets;
-import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.XSConstraints;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSComplexTypeDecl;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-import org.apache.xerces.impl.xs.XSAttributeGroupDecl;
-import org.apache.xerces.impl.xs.XSAttributeUse;
-import org.apache.xerces.impl.xs.XSWildcardDecl;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.impl.xs.util.XIntPool;
-import org.apache.xerces.xni.QName;
-import org.w3c.dom.Element;
-import java.util.Hashtable;
-
-/**
- * A complex type definition schema component traverser.
- *
- * <complexType
- *   abstract = boolean : false
- *   block = (#all | List of (extension | restriction))
- *   final = (#all | List of (extension | restriction))
- *   id = ID
- *   mixed = boolean : false
- *   name = NCName
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, (simpleContent | complexContent |
- *            ((group | all | choice | sequence)?,
- *            ((attribute | attributeGroup)*, anyAttribute?))))
- * </complexType>
- * @version $Id$
- */
-
-class  XSDComplexTypeTraverser extends XSDAbstractParticleTraverser {
-
-
-    XSDComplexTypeTraverser (XSDHandler handler,
-                             XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-
-    private static final boolean DEBUG=false;
-
-    private static XSParticleDecl fErrorContent=null;
-    private SchemaDVFactory schemaFactory = SchemaDVFactory.getInstance();
-
-    private class ComplexTypeRecoverableError extends Exception {
-
-        Object[] errorSubstText=null;
-        ComplexTypeRecoverableError() {
-            super();
-        }
-        ComplexTypeRecoverableError(String msgKey) {
-            super(msgKey);
-        }
-        ComplexTypeRecoverableError(String msgKey, Object[] args) {
-            super(msgKey);
-            errorSubstText=args;
-        }
-
-    }
-
-    /**
-     * Traverse local complexType declarations
-     *
-     * @param Element
-     * @param XSDocumentInfo
-     * @param SchemaGrammar
-     * @return XSComplexTypeDecl
-     */
-    XSComplexTypeDecl traverseLocal(Element complexTypeNode,
-                                    XSDocumentInfo schemaDoc,
-                                    SchemaGrammar grammar) {
-
-
-        Object[] attrValues = fAttrChecker.checkAttributes(complexTypeNode, false,
-                                                           schemaDoc);
-        String complexTypeName = genAnonTypeName(complexTypeNode);
-        XSComplexTypeDecl type = traverseComplexTypeDecl (complexTypeNode,
-                                                          complexTypeName, attrValues, schemaDoc, grammar);
-        // need to add the type to the grammar for later constraint checking
-        grammar.addComplexTypeDecl(type);
-        type.setIsAnonymous();
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return type;
-    }
-
-    /**
-     * Traverse global complexType declarations
-     *
-     * @param Element
-     * @param XSDocumentInfo
-     * @param SchemaGrammar
-     * @return XSComplexTypeDecXSComplexTypeDecl
-     */
-    XSComplexTypeDecl traverseGlobal (Element complexTypeNode,
-                                      XSDocumentInfo schemaDoc,
-                                      SchemaGrammar grammar) {
-
-        Object[] attrValues = fAttrChecker.checkAttributes(complexTypeNode, true,
-                                                           schemaDoc);
-        String complexTypeName = (String)  attrValues[XSAttributeChecker.ATTIDX_NAME];
-        XSComplexTypeDecl type = traverseComplexTypeDecl (complexTypeNode,
-                                                          complexTypeName, attrValues, schemaDoc, grammar);
-        if (complexTypeName == null) {
-            reportSchemaError("s4s-att-must-appear", new Object[]{SchemaSymbols.ELT_COMPLEXTYPE, SchemaSymbols.ATT_NAME});
-        } else {
-            grammar.addGlobalTypeDecl(type);
-        }
-        // need to add the type to the grammar for later constraint checking
-        grammar.addComplexTypeDecl(type);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return type;
-    }
-
-
-    private XSComplexTypeDecl traverseComplexTypeDecl(Element complexTypeDecl,
-                                                      String complexTypeName,
-                                                      Object[] attrValues,
-                                                      XSDocumentInfo schemaDoc,
-                                                      SchemaGrammar grammar) {
-
-        Boolean abstractAtt  = (Boolean) attrValues[XSAttributeChecker.ATTIDX_ABSTRACT];
-        XInt    blockAtt     = (XInt)    attrValues[XSAttributeChecker.ATTIDX_BLOCK];
-        Boolean mixedAtt     = (Boolean) attrValues[XSAttributeChecker.ATTIDX_MIXED];
-        XInt    finalAtt     = (XInt)    attrValues[XSAttributeChecker.ATTIDX_FINAL];
-
-        XSComplexTypeDecl complexType = new XSComplexTypeDecl();
-        complexType.fName = complexTypeName;
-        complexType.fTargetNamespace = schemaDoc.fTargetNamespace;
-        complexType.fBlock = blockAtt == null ?
-                             schemaDoc.fBlockDefault : blockAtt.shortValue();
-        complexType.fFinal = finalAtt == null ?
-                             schemaDoc.fFinalDefault : finalAtt.shortValue();
-        if (abstractAtt != null && abstractAtt.booleanValue())
-            complexType.setIsAbstractType();
-
-
-        Element child = null;
-
-        try {
-            // ---------------------------------------------------------------
-            // First, handle any ANNOTATION declaration and get next child
-            // ---------------------------------------------------------------
-            child = DOMUtil.getFirstChildElement(complexTypeDecl);
-
-            if (child != null) {
-                // traverse annotation if any
-                if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-                    child = DOMUtil.getNextSiblingElement(child);
-                }
-                if (child !=null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    throw new ComplexTypeRecoverableError("src-ct.0.1",
-                           new Object[]{complexType.fName,SchemaSymbols.ELT_ANNOTATION});
-                }
-            }
-            // ---------------------------------------------------------------
-            // Process the content of the complex type definition
-            // ---------------------------------------------------------------
-            if (child==null) {
-                //
-                // EMPTY complexType with complexContent
-                //
-
-                // set the base to the anyType
-                complexType.fBaseType = SchemaGrammar.fAnyType;
-                processComplexContent(child, complexType, mixedAtt.booleanValue(), false,
-                                      schemaDoc, grammar);
-            }
-            else if (DOMUtil.getLocalName(child).equals
-                     (SchemaSymbols.ELT_SIMPLECONTENT)) {
-                //
-                // SIMPLE CONTENT
-                //
-                traverseSimpleContent(child, complexType, schemaDoc, grammar);
-                if (DOMUtil.getNextSiblingElement(child)!=null) {
-                    String siblingName = DOMUtil.getLocalName(DOMUtil.getNextSiblingElement(child));
-                    throw new ComplexTypeRecoverableError("src-ct.0.1",
-                                                          new Object[]{complexType.fName,siblingName});
-                }
-            }
-            else if (DOMUtil.getLocalName(child).equals
-                     (SchemaSymbols.ELT_COMPLEXCONTENT)) {
-                traverseComplexContent(child, complexType, mixedAtt.booleanValue(),
-                                       schemaDoc, grammar);
-                if (DOMUtil.getNextSiblingElement(child)!=null) {
-                    String siblingName = DOMUtil.getLocalName(DOMUtil.getNextSiblingElement(child));
-                    throw new ComplexTypeRecoverableError("src-ct.0.1",
-                                                          new Object[]{complexType.fName,siblingName});
-                }
-            }
-            else {
-                //
-                // We must have ....
-                // GROUP, ALL, SEQUENCE or CHOICE, followed by optional attributes
-                // Note that it's possible that only attributes are specified.
-                //
-
-                // set the base to the anyType
-                complexType.fBaseType = SchemaGrammar.fAnyType;
-                processComplexContent(child, complexType, mixedAtt.booleanValue(), false,
-                                      schemaDoc, grammar);
-            }
-
-        }
-        catch (ComplexTypeRecoverableError e) {
-            handleComplexTypeError(e.getMessage(),e.errorSubstText, complexType);
-        }
-
-        if (DEBUG) {
-            System.out.println(complexType.toString());
-        }
-        return complexType;
-
-
-    }
-
-
-    private void traverseSimpleContent(Element simpleContentElement,
-                                       XSComplexTypeDecl typeInfo,
-                                       XSDocumentInfo schemaDoc,
-                                       SchemaGrammar grammar)
-    throws ComplexTypeRecoverableError {
-
-
-        String typeName = typeInfo.fName;
-        Object[] attrValues = fAttrChecker.checkAttributes(simpleContentElement, false,
-                                                           schemaDoc);
-
-        // -----------------------------------------------------------------------
-        // Set content type
-        // -----------------------------------------------------------------------
-        typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_SIMPLE;
-        typeInfo.fParticle = null;
-
-        Element simpleContent = DOMUtil.getFirstChildElement(simpleContentElement);
-        if (simpleContent != null) {
-            // traverse annotation if any
-            if (DOMUtil.getLocalName(simpleContent).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(simpleContent, attrValues, false, schemaDoc);
-                simpleContent = DOMUtil.getNextSiblingElement(simpleContent);
-            }
-        }
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        // If there are no children, return
-        if (simpleContent==null) {
-            throw new ComplexTypeRecoverableError("src-ct.0.2",
-                            new Object[]{typeInfo.fName,SchemaSymbols.ELT_SIMPLECONTENT});
-        }
-
-        // -----------------------------------------------------------------------
-        // The content should be either "restriction" or "extension"
-        // -----------------------------------------------------------------------
-        String simpleContentName = DOMUtil.getLocalName(simpleContent);
-        if (simpleContentName.equals(SchemaSymbols.ELT_RESTRICTION))
-            typeInfo.fDerivedBy = SchemaSymbols.RESTRICTION;
-        else if (simpleContentName.equals(SchemaSymbols.ELT_EXTENSION))
-            typeInfo.fDerivedBy = SchemaSymbols.EXTENSION;
-        else {
-            throw new ComplexTypeRecoverableError("src-ct.0.1",
-                            new Object[]{typeInfo.fName,simpleContentName});
-        }
-        if (DOMUtil.getNextSiblingElement(simpleContent) != null) {
-            String siblingName = DOMUtil.getLocalName(DOMUtil.getNextSiblingElement(simpleContent));
-            throw new ComplexTypeRecoverableError("src-ct.0.1",
-                            new Object[]{typeInfo.fName,siblingName});
-        }
-
-        attrValues = fAttrChecker.checkAttributes(simpleContent, false,
-                                                  schemaDoc);
-        QName baseTypeName = (QName)  attrValues[XSAttributeChecker.ATTIDX_BASE];
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-
-        // -----------------------------------------------------------------------
-        // Need a base type.
-        // -----------------------------------------------------------------------
-        if (baseTypeName==null) {
-            throw new ComplexTypeRecoverableError("src-ct.0.3",
-                            new Object[]{typeInfo.fName});
-        }
-
-        XSTypeDecl type = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc,
-                                      XSDHandler.TYPEDECL_TYPE, baseTypeName);
-        if (type==null)
-            throw new ComplexTypeRecoverableError();
-
-        typeInfo.fBaseType = type;
-
-        XSSimpleType baseValidator = null;
-        XSComplexTypeDecl baseComplexType = null;
-        int baseFinalSet = 0;
-
-        // If the base type is complex, it must have simpleContent
-        if ((type.getXSType() == XSTypeDecl.COMPLEX_TYPE)) {
-
-            baseComplexType = (XSComplexTypeDecl)type;
-            if (baseComplexType.fContentType != XSComplexTypeDecl.CONTENTTYPE_SIMPLE) {
-                throw new ComplexTypeRecoverableError("src-ct.2",
-                                new Object[]{typeInfo.fName});
-            }
-            baseFinalSet = baseComplexType.fFinal;
-            baseValidator = baseComplexType.fXSSimpleType;
-        }
-        else {
-            baseValidator = (XSSimpleType)type;
-            if (typeInfo.fDerivedBy == SchemaSymbols.RESTRICTION) {
-                throw new ComplexTypeRecoverableError("src-ct.2",
-                                new Object[]{typeInfo.fName});
-            }
-            baseFinalSet=baseValidator.getFinalSet();
-        }
-
-        // -----------------------------------------------------------------------
-        // Check that the base permits the derivation
-        // -----------------------------------------------------------------------
-        if ((baseFinalSet & typeInfo.fDerivedBy)!=0) {
-            String errorKey = (typeInfo.fDerivedBy==SchemaSymbols.EXTENSION) ?
-                              "cos-ct-extends.1.1" : "derivation-ok-restriction.1";
-            throw new ComplexTypeRecoverableError(errorKey,
-                                new Object[]{typeInfo.fName});
-        }
-
-        // -----------------------------------------------------------------------
-        // Skip over any potential annotations
-        // -----------------------------------------------------------------------
-        simpleContent = DOMUtil.getFirstChildElement(simpleContent);
-        if (simpleContent != null) {
-            // traverse annotation if any
-
-            if (DOMUtil.getLocalName(simpleContent).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(simpleContent, null, false, schemaDoc);
-                simpleContent = DOMUtil.getNextSiblingElement(simpleContent);
-            }
-
-            if (simpleContent !=null &&
-                DOMUtil.getLocalName(simpleContent).equals(SchemaSymbols.ELT_ANNOTATION)){
-                throw new ComplexTypeRecoverableError("src-ct.0.1",
-                       new Object[]{typeName,SchemaSymbols.ELT_ANNOTATION});
-            }
-        }
-
-        // -----------------------------------------------------------------------
-        // Process a RESTRICTION
-        // -----------------------------------------------------------------------
-        if (typeInfo.fDerivedBy == SchemaSymbols.RESTRICTION) {
-
-            // -----------------------------------------------------------------------
-            // There may be a simple type definition in the restriction element
-            // The data type validator will be based on it, if specified
-            // -----------------------------------------------------------------------
-            if (simpleContent !=null &&
-            DOMUtil.getLocalName(simpleContent).equals(SchemaSymbols.ELT_SIMPLETYPE )) {
-
-                XSSimpleType dv = fSchemaHandler.fSimpleTypeTraverser.traverseLocal(
-                      simpleContent, schemaDoc, grammar);
-                if (dv == null)
-                    throw new ComplexTypeRecoverableError();
-
-                //check that this datatype validator is validly derived from the base
-                //according to derivation-ok-restriction 5.1.1
-
-                if (!XSConstraints.checkSimpleDerivationOk(dv, baseValidator,
-                                                           baseValidator.getFinalSet())) {
-                    throw new ComplexTypeRecoverableError("derivation-ok-restriction.5.1.1",
-                           new Object[]{typeName});
-                }
-                baseValidator = dv;
-                simpleContent = DOMUtil.getNextSiblingElement(simpleContent);
-            }
-
-            // -----------------------------------------------------------------------
-            // Traverse any facets
-            // -----------------------------------------------------------------------
-            Element attrNode = null;
-            XSFacets facetData = null;
-            short presentFacets = 0 ;
-            short fixedFacets = 0 ;
-
-            if (simpleContent!=null) {
-                FacetInfo fi = traverseFacets(simpleContent, null, typeName, baseValidator,
-                                              schemaDoc, grammar);
-                attrNode = fi.nodeAfterFacets;
-                facetData = fi.facetdata;
-                presentFacets = fi.fPresentFacets;
-                fixedFacets = fi.fFixedFacets;
-            }
-
-            typeInfo.fXSSimpleType = schemaFactory.createTypeRestriction(null,schemaDoc.fTargetNamespace,(short)0,baseValidator);
-            try{
-                fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
-                typeInfo.fXSSimpleType.applyFacets(facetData, presentFacets, fixedFacets, fValidationState);
-            }catch(InvalidDatatypeFacetException ex){
-                reportGenericSchemaError(ex.getLocalizedMessage());
-            }
-
-            // -----------------------------------------------------------------------
-            // Traverse any attributes
-            // -----------------------------------------------------------------------
-            if (attrNode != null) {
-                if (!isAttrOrAttrGroup(attrNode)) {
-                    throw new ComplexTypeRecoverableError("src-ct.0.1",
-                             new Object[]{typeInfo.fName,DOMUtil.getLocalName(attrNode)});
-                }
-                Element node=traverseAttrsAndAttrGrps(attrNode,typeInfo.fAttrGrp,
-                                                      schemaDoc,grammar);
-                if (node!=null) {
-                    throw new ComplexTypeRecoverableError("src-ct.0.1",
-                             new Object[]{typeInfo.fName,DOMUtil.getLocalName(node)});
-                }
-            }
-
-            mergeAttributes(baseComplexType.fAttrGrp, typeInfo.fAttrGrp, typeName, false);
-            // Prohibited uses must be removed after merge for RESTRICTION
-            typeInfo.fAttrGrp.removeProhibitedAttrs();
-
-            String errorCode=typeInfo.fAttrGrp.validRestrictionOf(baseComplexType.fAttrGrp);
-            if (errorCode != null) {
-                throw new ComplexTypeRecoverableError(errorCode,
-                             new Object[]{typeInfo.fName});
-            }
-
-        }
-        // -----------------------------------------------------------------------
-        // Process a EXTENSION
-        // -----------------------------------------------------------------------
-        else {
-            typeInfo.fXSSimpleType = baseValidator;
-            if (simpleContent != null) {
-                // -----------------------------------------------------------------------
-                // Traverse any attributes
-                // -----------------------------------------------------------------------
-                Element attrNode = simpleContent;
-                if (!isAttrOrAttrGroup(attrNode)) {
-                    throw new ComplexTypeRecoverableError("src-ct.0.1",
-                                                          new Object[]{typeInfo.fName,DOMUtil.getLocalName(attrNode)});
-                }
-                Element node=traverseAttrsAndAttrGrps(attrNode,typeInfo.fAttrGrp,
-                                                      schemaDoc,grammar);
-
-                if (node!=null) {
-                    throw new ComplexTypeRecoverableError("src-ct.0.1",
-                                                          new Object[]{typeInfo.fName,DOMUtil.getLocalName(node)});
-                }
-                // Remove prohibited uses.   Should be done prior to any merge.
-                typeInfo.fAttrGrp.removeProhibitedAttrs();
-
-                if (baseComplexType != null) {
-                    mergeAttributes(baseComplexType.fAttrGrp, typeInfo.fAttrGrp, typeName, true);
-                }
-            }
-        }
-
-    }
-
-    private void traverseComplexContent(Element complexContentElement,
-                                        XSComplexTypeDecl typeInfo,
-                                        boolean mixedOnType, XSDocumentInfo schemaDoc,
-                                        SchemaGrammar grammar)
-    throws ComplexTypeRecoverableError {
-
-
-        String typeName = typeInfo.fName;
-        Object[] attrValues = fAttrChecker.checkAttributes(complexContentElement, false,
-                                                           schemaDoc);
-
-
-        // -----------------------------------------------------------------------
-        // Determine if this is mixed content
-        // -----------------------------------------------------------------------
-        boolean mixedContent = mixedOnType;
-        Boolean mixedAtt     = (Boolean) attrValues[XSAttributeChecker.ATTIDX_MIXED];
-        if (mixedAtt != null) {
-            mixedContent = mixedAtt.booleanValue();
-        }
-
-
-        // -----------------------------------------------------------------------
-        // Since the type must have complex content, set the simple type validators
-        // to null
-        // -----------------------------------------------------------------------
-        typeInfo.fXSSimpleType = null;
-
-        Element complexContent = DOMUtil.getFirstChildElement(complexContentElement);
-        if (complexContent != null) {
-            // traverse annotation if any
-            if (DOMUtil.getLocalName(complexContent).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(complexContent, attrValues, false, schemaDoc);
-                complexContent = DOMUtil.getNextSiblingElement(complexContent);
-            }
-        }
-
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-        // If there are no children, return
-        if (complexContent==null) {
-            throw new ComplexTypeRecoverableError("src-ct.0.2",
-                      new Object[]{typeName,SchemaSymbols.ELT_COMPLEXCONTENT});
-        }
-
-        // -----------------------------------------------------------------------
-        // The content should be either "restriction" or "extension"
-        // -----------------------------------------------------------------------
-        String complexContentName = DOMUtil.getLocalName(complexContent);
-        if (complexContentName.equals(SchemaSymbols.ELT_RESTRICTION))
-            typeInfo.fDerivedBy = SchemaSymbols.RESTRICTION;
-        else if (complexContentName.equals(SchemaSymbols.ELT_EXTENSION))
-            typeInfo.fDerivedBy = SchemaSymbols.EXTENSION;
-        else {
-            throw new ComplexTypeRecoverableError("src-ct.0.1",
-                      new Object[]{typeName, complexContentName});
-        }
-        if (DOMUtil.getNextSiblingElement(complexContent) != null) {
-            String siblingName = DOMUtil.getLocalName(DOMUtil.getNextSiblingElement(complexContent));
-            throw new ComplexTypeRecoverableError("src-ct.0.1",
-                      new Object[]{typeName, siblingName});
-        }
-
-        attrValues = fAttrChecker.checkAttributes(complexContent, false,
-                                                  schemaDoc);
-        QName baseTypeName = (QName)  attrValues[XSAttributeChecker.ATTIDX_BASE];
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-
-        // -----------------------------------------------------------------------
-        // Need a base type.  Check that it's a complex type
-        // -----------------------------------------------------------------------
-        if (baseTypeName==null) {
-            throw new ComplexTypeRecoverableError("src-ct.0.3",
-                      new Object[]{typeName});
-        }
-
-        XSTypeDecl type = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc,
-                                                                   XSDHandler.TYPEDECL_TYPE, baseTypeName);
-
-        if (type==null)
-            throw new ComplexTypeRecoverableError();
-
-        if (! (type instanceof XSComplexTypeDecl)) {
-            throw new ComplexTypeRecoverableError("src-ct.1",
-                      new Object[]{typeName});
-        }
-        XSComplexTypeDecl baseType = (XSComplexTypeDecl)type;
-        typeInfo.fBaseType = baseType;
-
-        // -----------------------------------------------------------------------
-        // Check that the base permits the derivation
-        // -----------------------------------------------------------------------
-        if ((baseType.fFinal & typeInfo.fDerivedBy)!=0) {
-            String errorKey = (typeInfo.fDerivedBy==SchemaSymbols.EXTENSION) ?
-                              "cos-ct-extends.1.1" : "derivation-ok-restriction.1";
-            throw new ComplexTypeRecoverableError(errorKey,
-                                new Object[]{typeInfo.fName});
-        }
-
-        // -----------------------------------------------------------------------
-        // Skip over any potential annotations
-        // -----------------------------------------------------------------------
-        complexContent = DOMUtil.getFirstChildElement(complexContent);
-
-        if (complexContent != null) {
-            // traverse annotation if any
-            if (DOMUtil.getLocalName(complexContent).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(complexContent, null, false, schemaDoc);
-                complexContent = DOMUtil.getNextSiblingElement(complexContent);
-            }
-            if (complexContent !=null &&
-               DOMUtil.getLocalName(complexContent).equals(SchemaSymbols.ELT_ANNOTATION)){
-                throw new ComplexTypeRecoverableError("src-ct.0.1",
-                       new Object[]{typeName,SchemaSymbols.ELT_ANNOTATION});
-            }
-        }
-        // -----------------------------------------------------------------------
-        // Process the content.  Note:  should I try to catch any complexType errors
-        // here in order to return the attr array?
-        // -----------------------------------------------------------------------
-        processComplexContent(complexContent, typeInfo, mixedContent, true, schemaDoc,
-                              grammar);
-
-        // -----------------------------------------------------------------------
-        // Compose the final content and attribute uses
-        // -----------------------------------------------------------------------
-        XSParticleDecl baseContent = baseType.fParticle;
-        if (typeInfo.fDerivedBy==SchemaSymbols.RESTRICTION) {
-
-            // This is an RESTRICTION
-
-            if (typeInfo.fParticle==null && (!(baseContent==null ||
-                                               baseContent.emptiable()))) {
-                throw new ComplexTypeRecoverableError("derivation-ok-restriction.5.2",
-                                          new Object[]{typeName});
-            }
-            if (typeInfo.fParticle!=null && baseContent==null) {
-                //REVISIT - need better error msg
-                throw new ComplexTypeRecoverableError("derivation-ok-restriction.5.3",
-                                          new Object[]{typeName});
-            }
-
-            mergeAttributes(baseType.fAttrGrp, typeInfo.fAttrGrp, typeName, false);
-            String error = typeInfo.fAttrGrp.validRestrictionOf(baseType.fAttrGrp);
-            if (error != null) {
-                throw new ComplexTypeRecoverableError(error,
-                          new Object[]{typeName});
-            }
-
-            // Remove prohibited uses.   Must be done after merge for RESTRICTION.
-            typeInfo.fAttrGrp.removeProhibitedAttrs();
-
-        }
-        else {
-
-            // This is an EXTENSION
-
-            //
-            // Check if the contentType of the base is consistent with the new type
-            // cos-ct-extends.1.4.2.2
-            if (baseType.fContentType != XSComplexTypeDecl.CONTENTTYPE_EMPTY) {
-                if (((baseType.fContentType ==
-                      XSComplexTypeDecl.CONTENTTYPE_ELEMENT) &&
-                     mixedContent) ||
-                    ((baseType.fContentType ==
-                      XSComplexTypeDecl.CONTENTTYPE_MIXED) && !mixedContent)) {
-
-                    throw new ComplexTypeRecoverableError("cos-ct-extends.1.4.2.2.2.2.1",
-                          new Object[]{typeName});
-                }
-
-            }
-
-            // Create the particle
-            if (typeInfo.fParticle == null) {
-                typeInfo.fParticle = baseContent;
-            }
-            else if (baseContent==null) {
-            }
-            else {
-                if (typeInfo.fParticle.fType == XSParticleDecl.PARTICLE_ALL ||
-                    baseType.fParticle.fType == XSParticleDecl.PARTICLE_ALL) {
-                    throw new ComplexTypeRecoverableError("cos-all-limited.1.2",
-                          new Object[]{typeName});
-                }
-                XSParticleDecl temp = new XSParticleDecl();
-                temp.fType = XSParticleDecl.PARTICLE_SEQUENCE;
-                temp.fValue = baseContent;
-                temp.fOtherValue = typeInfo.fParticle;
-                typeInfo.fParticle = temp;
-            }
-
-            // Set the contentType
-            if (mixedContent)
-                typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_MIXED;
-            else if (typeInfo.fParticle == null)
-                typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_EMPTY;
-            else
-                typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_ELEMENT;
-
-            // Remove prohibited uses.   Must be done before merge for EXTENSION.
-            typeInfo.fAttrGrp.removeProhibitedAttrs();
-            mergeAttributes(baseType.fAttrGrp, typeInfo.fAttrGrp, typeName, true);
-
-        }
-
-    } // end of traverseComplexContent
-
-
-    // This method merges attribute uses from the base, into the derived set.
-    // The first duplicate attribute, if any, is returned.
-    // LM: may want to merge with attributeGroup processing.
-    private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp,
-                                 XSAttributeGroupDecl toAttrGrp,
-                                 String typeName,
-                                 boolean extension)
-    throws ComplexTypeRecoverableError {
-
-        XSAttributeUse[] attrUseS = fromAttrGrp.getAttributeUses();
-        XSAttributeUse existingAttrUse, duplicateAttrUse =  null;
-        for (int i=0; i<attrUseS.length; i++) {
-            existingAttrUse = toAttrGrp.getAttributeUse(attrUseS[i].fAttrDecl.fTargetNamespace,
-                                                        attrUseS[i].fAttrDecl.fName);
-            if (existingAttrUse == null) {
-                String idName = toAttrGrp.addAttributeUse(attrUseS[i]);
-                if (idName != null) {
-                    throw new ComplexTypeRecoverableError("ct-props-correct.5",
-                          new Object[]{typeName, idName, attrUseS[i].fAttrDecl.fName});
-                }
-            }
-            else {
-                if (extension) {
-                    throw new ComplexTypeRecoverableError("ct-props-correct.4",
-                          new Object[]{typeName, existingAttrUse.fAttrDecl.fName});
-                }
-            }
-        }
-
-        // For extension, the wildcard must be formed by doing a union of the wildcards
-        if (extension) {
-            if (toAttrGrp.fAttributeWC==null) {
-                toAttrGrp.fAttributeWC = fromAttrGrp.fAttributeWC;
-            }
-            else if (fromAttrGrp.fAttributeWC != null) {
-                toAttrGrp.fAttributeWC = toAttrGrp.fAttributeWC.performUnionWith(fromAttrGrp.fAttributeWC, toAttrGrp.fAttributeWC.fProcessContents);
-            }
-
-        }
-    }
-
-
-
-    private void processComplexContent(Element complexContentChild,
-                                       XSComplexTypeDecl typeInfo,
-                                       boolean isMixed, boolean isDerivation,
-                                       XSDocumentInfo schemaDoc, SchemaGrammar grammar)
-    throws ComplexTypeRecoverableError {
-
-        Element attrNode = null;
-        XSParticleDecl particle = null;
-        String typeName = typeInfo.fName;
-
-        if (complexContentChild != null) {
-            // -------------------------------------------------------------
-            // GROUP, ALL, SEQUENCE or CHOICE, followed by attributes, if specified.
-            // Note that it's possible that only attributes are specified.
-            // -------------------------------------------------------------
-
-
-            String childName = DOMUtil.getLocalName(complexContentChild);
-
-            if (childName.equals(SchemaSymbols.ELT_GROUP)) {
-
-                particle = fSchemaHandler.fGroupTraverser.traverseLocal(complexContentChild,
-                                                                        schemaDoc, grammar);
-                attrNode = DOMUtil.getNextSiblingElement(complexContentChild);
-            }
-            else if (childName.equals(SchemaSymbols.ELT_SEQUENCE)) {
-                particle = traverseSequence(complexContentChild,schemaDoc,grammar,
-                                            NOT_ALL_CONTEXT);
-                attrNode = DOMUtil.getNextSiblingElement(complexContentChild);
-            }
-            else if (childName.equals(SchemaSymbols.ELT_CHOICE)) {
-                particle = traverseChoice(complexContentChild,schemaDoc,grammar,
-                                          NOT_ALL_CONTEXT);
-                attrNode = DOMUtil.getNextSiblingElement(complexContentChild);
-            }
-            else if (childName.equals(SchemaSymbols.ELT_ALL)) {
-                particle = traverseAll(complexContentChild,schemaDoc,grammar,
-                                       PROCESSING_ALL_GP);
-                attrNode = DOMUtil.getNextSiblingElement(complexContentChild);
-            }
-            else {
-                // Should be attributes here - will check below...
-                attrNode = complexContentChild;
-            }
-        }
-
-        typeInfo.fParticle = particle;
-
-        // -----------------------------------------------------------------------
-        // Set the content type
-        // -----------------------------------------------------------------------
-
-        if (isMixed) {
-            typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_MIXED;
-        }
-        else if (typeInfo.fParticle == null)
-            typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_EMPTY;
-        else
-            typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_ELEMENT;
-
-
-        // -------------------------------------------------------------
-        // Now, process attributes
-        // -------------------------------------------------------------
-        if (attrNode != null) {
-            if (!isAttrOrAttrGroup(attrNode)) {
-                throw new ComplexTypeRecoverableError("src-ct.0.1",
-                                                      new Object[]{typeInfo.fName,DOMUtil.getLocalName(attrNode)});
-            }
-            Element node =
-            traverseAttrsAndAttrGrps(attrNode,typeInfo.fAttrGrp,schemaDoc,grammar);
-            if (node!=null) {
-                throw new ComplexTypeRecoverableError("src-ct.0.1",
-                                                      new Object[]{typeInfo.fName,DOMUtil.getLocalName(node)});
-            }
-            // Only remove prohibited attribute uses if this isn't a derived type
-            // Derivation-specific code worries about this elsewhere
-            if (!isDerivation) {
-                typeInfo.fAttrGrp.removeProhibitedAttrs();
-            }
-        }
-
-
-
-    } // end processComplexContent
-
-
-    private boolean isAttrOrAttrGroup(Element e) {
-        String elementName = DOMUtil.getLocalName(e);
-
-        if (elementName.equals(SchemaSymbols.ELT_ATTRIBUTE) ||
-            elementName.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP) ||
-            elementName.equals(SchemaSymbols.ELT_ANYATTRIBUTE))
-            return true;
-        else
-            return false;
-    }
-
-    private void traverseSimpleContentDecl(Element simpleContentDecl,
-                                           XSComplexTypeDecl typeInfo) {
-    }
-
-    private void traverseComplexContentDecl(Element complexContentDecl,
-                                            XSComplexTypeDecl typeInfo,
-                                            boolean mixedOnComplexTypeDecl) {
-    }
-
-    /*
-     * Generate a name for an anonymous type
-     */
-    private String genAnonTypeName(Element complexTypeDecl) {
-
-        // Generate a unique name for the anonymous type by concatenating together the
-        // names of parent nodes
-        // The name is quite good for debugging/error purposes, but we may want to
-        // revisit how this is done for performance reasons (LM).
-        String typeName;
-        Element node = DOMUtil.getParent(complexTypeDecl);
-        typeName="#AnonType_";
-        while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) {
-            typeName = typeName+node.getAttribute(SchemaSymbols.ATT_NAME);
-            node = DOMUtil.getParent(node);
-        }
-        return typeName;
-    }
-
-
-    private void handleComplexTypeError(String messageId,Object[] args,
-                                        XSComplexTypeDecl typeInfo) {
-
-        if (messageId!=null) {
-            reportSchemaError(messageId, args);
-        }
-
-        //
-        //  Mock up the typeInfo structure so that there won't be problems during
-        //  validation
-        //
-        typeInfo.fContentType = XSComplexTypeDecl.CONTENTTYPE_MIXED;
-        typeInfo.fParticle = getErrorContent();
-
-        return;
-
-    }
-
-    private static XSParticleDecl getErrorContent() {
-        if (fErrorContent==null) {
-            fErrorContent = new XSParticleDecl();
-            fErrorContent.fType = XSParticleDecl.PARTICLE_SEQUENCE;
-            XSParticleDecl particle = new XSParticleDecl();
-            XSWildcardDecl wildcard = new XSWildcardDecl();
-            wildcard.fProcessContents = XSWildcardDecl.WILDCARD_SKIP;
-            particle.fType = XSParticleDecl.PARTICLE_WILDCARD;
-            particle.fValue = wildcard;
-            particle.fMinOccurs = 0;
-            particle.fMaxOccurs = SchemaSymbols.OCCURRENCE_UNBOUNDED;
-            fErrorContent.fValue = particle;
-            fErrorContent.fOtherValue = null;
-        }
-        return fErrorContent;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDElementTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDElementTraverser.java
deleted file mode 100644
index 8526d92..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDElementTraverser.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.ValidatedInfo;
-import org.apache.xerces.impl.validation.ValidationContext;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.XSConstraints;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.impl.xs.XSComplexTypeDecl;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.impl.xs.util.XIntPool;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.QName;
-import  org.w3c.dom.Element;
-
-/**
- * The element declaration schema component traverser.
- * <element
- *   abstract = boolean : false
- *   block = (#all | List of (extension | restriction | substitution))
- *   default = string
- *   final = (#all | List of (extension | restriction))
- *   fixed = string
- *   form = (qualified | unqualified)
- *   id = ID
- *   maxOccurs = (nonNegativeInteger | unbounded)  : 1
- *   minOccurs = nonNegativeInteger : 1
- *   name = NCName
- *   nillable = boolean : false
- *   ref = QName
- *   substitutionGroup = QName
- *   type = QName
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*))
- * </element>
- *
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-class XSDElementTraverser extends XSDAbstractTraverser {
-
-    protected XSElementDecl  fTempElementDecl  = new XSElementDecl();
-    protected XSParticleDecl fTempParticleDecl = new XSParticleDecl();
-
-    // this controls what happens when a local element is encountered.
-    // We may not encounter all local elements when first parsing.
-    boolean fDeferTraversingLocalElements;
-
-    XSDElementTraverser (XSDHandler handler,
-                         XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-    /**
-     * Traverse a locally declared element (or an element reference).
-     *
-     * To handle the recursive cases efficiently, we delay the traversal
-     * and return an empty particle node. We'll fill in this particle node
-     * later after we've done with all the global declarations.
-     * This method causes a number of data structures in the schema handler to be filled in.
-     *
-     * @param  elmDecl
-     * @param  schemaDoc
-     * @param  grammar
-     * @return the particle
-     */
-    XSParticleDecl traverseLocal(Element elmDecl,
-                                 XSDocumentInfo schemaDoc,
-                                 SchemaGrammar grammar,
-                                 int allContextFlags) {
-
-        XSParticleDecl particle = new XSParticleDecl();
-
-        if(fDeferTraversingLocalElements) {
-            fSchemaHandler.fillInLocalElemInfo(elmDecl, schemaDoc, allContextFlags, particle);
-        } else {
-            traverseLocal(particle, elmDecl, schemaDoc, grammar, allContextFlags);
-        }
-
-        return particle;
-    }
-
-    /**
-     * Traverse a locally declared element (or an element reference).
-     *
-     * This is the real traversal method. It's called after we've done with
-     * all the global declarations.
-     *
-     * @param  index
-     */
-    protected void traverseLocal(XSParticleDecl particle, Element elmDecl,
-                               XSDocumentInfo schemaDoc,
-                               SchemaGrammar grammar,
-                               int allContextFlags) {
-
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(elmDecl, false, schemaDoc);
-
-        QName refAtt = (QName) attrValues[XSAttributeChecker.ATTIDX_REF];
-        XInt  minAtt = (XInt)  attrValues[XSAttributeChecker.ATTIDX_MINOCCURS];
-        XInt  maxAtt = (XInt)  attrValues[XSAttributeChecker.ATTIDX_MAXOCCURS];
-
-        XSElementDecl element = null;
-        if (elmDecl.getAttributeNode(SchemaSymbols.ATT_REF) != null) {
-            if (refAtt != null) {
-                element = (XSElementDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.ELEMENT_TYPE, refAtt);
-
-                Element child = DOMUtil.getFirstChildElement(elmDecl);
-                if (child != null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-                    child = DOMUtil.getNextSiblingElement(child);
-                }
-
-                // Element Declaration Representation OK
-                // 2 If the item's parent is not <schema>, then all of the following must be true:
-                // 2.1 One of ref or name must be present, but not both.
-                // 2.2 If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>, nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs, id are allowed in addition to ref, along with <annotation>.
-                if (child != null) {
-                    reportSchemaError("src-element.2.2", new Object[]{refAtt});
-                }
-            } else {
-                element = null;
-            }
-        } else {
-            element = traverseNamedElement(elmDecl, attrValues, schemaDoc, grammar, false);
-        }
-
-        particle.fMinOccurs = minAtt.intValue();
-        particle.fMaxOccurs = maxAtt.intValue();
-        if (element != null) {
-            particle.fType = XSParticleDecl.PARTICLE_ELEMENT;
-            particle.fValue = element;
-        }
-        Long defaultVals = (Long)attrValues[XSAttributeChecker.ATTIDX_FROMDEFAULT];
-        checkOccurrences(particle, SchemaSymbols.ELT_ELEMENT,
-                         (Element)elmDecl.getParentNode(), allContextFlags,
-                         defaultVals.longValue());
-
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-    }
-
-    /**
-     * Traverse a globally declared element.
-     *
-     * @param  elmDecl
-     * @param  schemaDoc
-     * @param  grammar
-     * @return the element declaration
-     */
-    XSElementDecl traverseGlobal(Element elmDecl,
-                                 XSDocumentInfo schemaDoc,
-                                 SchemaGrammar grammar) {
-
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(elmDecl, true, schemaDoc);
-        XSElementDecl element = traverseNamedElement(elmDecl, attrValues, schemaDoc, grammar, true);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        // set the scope of the element as global
-        if (element != null)
-            element.setIsGlobal();
-
-        return element;
-    }
-
-    /**
-     * Traverse a globally declared element.
-     *
-     * @param  elmDecl
-     * @param  attrValues
-     * @param  schemaDoc
-     * @param  grammar
-     * @param  isGlobal
-     * @return the element declaration
-     */
-    XSElementDecl traverseNamedElement(Element elmDecl,
-                                       Object[] attrValues,
-                                       XSDocumentInfo schemaDoc,
-                                       SchemaGrammar grammar,
-                                       boolean isGlobal) {
-
-        Boolean abstractAtt  = (Boolean) attrValues[XSAttributeChecker.ATTIDX_ABSTRACT];
-        XInt    blockAtt     = (XInt)    attrValues[XSAttributeChecker.ATTIDX_BLOCK];
-        String  defaultAtt   = (String)  attrValues[XSAttributeChecker.ATTIDX_DEFAULT];
-        XInt    finalAtt     = (XInt)    attrValues[XSAttributeChecker.ATTIDX_FINAL];
-        String  fixedAtt     = (String)  attrValues[XSAttributeChecker.ATTIDX_FIXED];
-        XInt    formAtt      = (XInt)    attrValues[XSAttributeChecker.ATTIDX_FORM];
-        String  nameAtt      = (String)  attrValues[XSAttributeChecker.ATTIDX_NAME];
-        Boolean nillableAtt  = (Boolean) attrValues[XSAttributeChecker.ATTIDX_NILLABLE];
-        QName   subGroupAtt  = (QName)   attrValues[XSAttributeChecker.ATTIDX_SUBSGROUP];
-        QName   typeAtt      = (QName)   attrValues[XSAttributeChecker.ATTIDX_TYPE];
-
-        // Step 1: get declaration information
-        XSElementDecl element = new XSElementDecl();
-
-        // get 'name'
-        if (nameAtt != null)
-            element.fName = fSymbolTable.addSymbol(nameAtt);
-
-        // get 'target namespace'
-        if (isGlobal) {
-            element.fTargetNamespace = schemaDoc.fTargetNamespace;
-        }
-        else if (formAtt != null) {
-            if (formAtt.intValue() == SchemaSymbols.FORM_QUALIFIED)
-                element.fTargetNamespace = schemaDoc.fTargetNamespace;
-            else
-                element.fTargetNamespace = null;
-        } else if (schemaDoc.fAreLocalElementsQualified) {
-            element.fTargetNamespace = schemaDoc.fTargetNamespace;
-        } else {
-            element.fTargetNamespace = null;
-        }
-
-        // get 'block', 'final', 'nillable', 'abstract'
-        element.fBlock = blockAtt == null ? schemaDoc.fBlockDefault : blockAtt.shortValue();
-        element.fFinal = finalAtt == null ? schemaDoc.fFinalDefault : finalAtt.shortValue();
-        if (nillableAtt.booleanValue())
-            element.setIsNillable();
-        if (abstractAtt != null && abstractAtt.booleanValue())
-            element.setIsAbstract();
-
-        // get 'value constraint'
-        if (fixedAtt != null) {
-            element.fDefault = new ValidatedInfo();
-            element.fDefault.normalizedValue = fixedAtt;
-            element.setConstraintType(XSElementDecl.FIXED_VALUE);
-        } else if (defaultAtt != null) {
-            element.fDefault = new ValidatedInfo();
-            element.fDefault.normalizedValue = defaultAtt;
-            element.setConstraintType(XSElementDecl.DEFAULT_VALUE);
-        } else {
-            element.setConstraintType(XSElementDecl.NO_CONSTRAINT);
-        }
-
-        // get 'substitutionGroup affiliation'
-        // REVISIT: allow mutual-substitution
-        //          we need to back-patch both fSubGroup and fType
-        //          if there is no type attribute and no anonymous type
-        if (subGroupAtt != null) {
-            element.fSubGroup = (XSElementDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.ELEMENT_TYPE, subGroupAtt);
-        }
-
-        // get 'annotation'
-        Element child = DOMUtil.getFirstChildElement(elmDecl);
-        if(child != null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-            traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-            child = DOMUtil.getNextSiblingElement(child);
-        }
-
-        // get 'type definition'
-        XSTypeDecl elementType = null;
-        boolean haveAnonType = false;
-
-        // Handle Anonymous type if there is one
-        if (child != null) {
-            String childName = DOMUtil.getLocalName(child);
-
-            if (childName.equals(SchemaSymbols.ELT_COMPLEXTYPE)) {
-                elementType = fSchemaHandler.fComplexTypeTraverser.traverseLocal(child, schemaDoc, grammar);
-                haveAnonType = true;
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-            else if (childName.equals(SchemaSymbols.ELT_SIMPLETYPE)) {
-                elementType = fSchemaHandler.fSimpleTypeTraverser.traverseLocal(child, schemaDoc, grammar);
-                haveAnonType = true;
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-        }
-
-        // Handler type attribute
-        if (elementType == null && typeAtt != null) {
-            elementType = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.TYPEDECL_TYPE, typeAtt);
-        }
-
-        // Get it from the substitutionGroup declaration
-        if (elementType == null && element.fSubGroup != null) {
-            elementType = element.fSubGroup.fType;
-        }
-
-        if (elementType == null) {
-            elementType = SchemaGrammar.fAnyType;
-        }
-
-        element.fType = elementType;
-
-        // get 'identity constraint'
-
-        // see if there's something here; it had better be key, keyref or unique.
-        if (child != null) {
-            String childName = DOMUtil.getLocalName(child);
-            while (child != null &&
-                   (childName.equals(SchemaSymbols.ELT_KEY) ||
-                    childName.equals(SchemaSymbols.ELT_KEYREF) ||
-                    childName.equals(SchemaSymbols.ELT_UNIQUE))) {
-
-                if (childName.equals(SchemaSymbols.ELT_KEY) ||
-                        childName.equals(SchemaSymbols.ELT_UNIQUE)) {
-                    // need to set <key>/<unique> to hidden before traversing it,
-                    // because it has global scope
-                    DOMUtil.setHidden(child);
-                    fSchemaHandler.fUniqueOrKeyTraverser.traverse(child, element, schemaDoc, grammar);
-                    if(DOMUtil.getAttrValue(child, SchemaSymbols.ATT_NAME).length() != 0 ) {
-                        fSchemaHandler.checkForDuplicateNames(
-                            (schemaDoc.fTargetNamespace == null) ? ","+DOMUtil.getAttrValue(child, SchemaSymbols.ATT_NAME)
-                            : schemaDoc.fTargetNamespace+","+ DOMUtil.getAttrValue(child, SchemaSymbols.ATT_NAME),
-                            fSchemaHandler.getIDRegistry(),
-                            child, schemaDoc);
-                    }
-                } else if (childName.equals(SchemaSymbols.ELT_KEYREF)) {
-                    fSchemaHandler.storeKeyRef(child, schemaDoc, element);
-                }
-                child = DOMUtil.getNextSiblingElement(child);
-                if (child != null) {
-                    childName = DOMUtil.getLocalName(child);
-                }
-            }
-        }
-
-        // Step 2: register the element decl to the grammar
-        if (isGlobal && nameAtt != null)
-            grammar.addGlobalElementDecl(element);
-
-        // Step 3: check against schema for schemas
-
-        // required attributes
-        if (nameAtt == null) {
-            if (isGlobal)
-                reportSchemaError("s4s-att-must-appear", new Object[]{SchemaSymbols.ELT_ELEMENT, SchemaSymbols.ATT_NAME});
-            else
-                reportSchemaError("src-element.2.1", null);
-            nameAtt = NO_NAME;
-        }
-
-        // element
-        if (child != null) {
-            reportSchemaError("s4s-elt-must-match", new Object[]{nameAtt, "(annotation?, (simpleType | complexType)?, (unique | key | keyref)*))"});
-        }
-
-        // Step 4: check 3.3.3 constraints
-
-        // src-element
-
-        // 1 default and fixed must not both be present.
-        if (defaultAtt != null && fixedAtt != null) {
-            reportSchemaError("src-element.1", new Object[]{nameAtt});
-        }
-
-        // 2 If the item's parent is not <schema>, then all of the following must be true:
-        // 2.1 One of ref or name must be present, but not both.
-        // This is checked in XSAttributeChecker
-
-        // 2.2 If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>, nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs, id are allowed in addition to ref, along with <annotation>.
-        // Attributes are checked in XSAttributeChecker, elements are checked in "traverse" method
-
-        // 3 type and either <simpleType> or <complexType> are mutually exclusive.
-        if (haveAnonType && (typeAtt != null)) {
-            reportSchemaError("src-element.3", new Object[]{nameAtt});
-        }
-
-        // Step 5: check 3.3.6 constraints
-        // check for NOTATION type
-        checkNotationType(nameAtt, elementType);
-
-        // e-props-correct
-
-        // 2 If there is a {value constraint}, the canonical lexical representation of its value must be valid with respect to the {type definition} as defined in Element Default Valid (Immediate) (3.3.6).
-        if (element.fDefault != null) {
-            fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
-            XSConstraints.ElementDefaultValidImmediate(element.fType, element.fDefault.normalizedValue, fValidationState, element.fDefault);
-            if (element.fDefault.actualValue == null) {
-                reportSchemaError ("e-props-correct.2", new Object[]{nameAtt, element.fDefault.normalizedValue});
-                element.setConstraintType(XSElementDecl.NO_CONSTRAINT);
-            }
-        }
-
-        // 3 If there is an {substitution group affiliation}, the {type definition} of the element declaration must be validly derived from the {type definition} of the {substitution group affiliation}, given the value of the {substitution group exclusions} of the {substitution group affiliation}, as defined in Type Derivation OK (Complex) (3.4.6) (if the {type definition} is complex) or as defined in Type Derivation OK (Simple) (3.14.6) (if the {type definition} is simple).
-        if (element.fSubGroup != null) {
-           if (!XSConstraints.checkTypeDerivationOk(element.fType, element.fSubGroup.fType, element.fSubGroup.fFinal)) {
-                reportSchemaError ("e-props-correct.3", new Object[]{nameAtt, subGroupAtt.prefix+":"+subGroupAtt.localpart});
-           }
-        }
-
-        // 4 If the {type definition} or {type definition}'s {content type} is or is derived from ID then there must not be a {value constraint}.
-        if (element.fDefault != null) {
-            if ((elementType.getXSType() == XSTypeDecl.SIMPLE_TYPE &&
-                 ((XSSimpleType)elementType).isIDType()) ||
-                (elementType.getXSType() == XSTypeDecl.COMPLEX_TYPE &&
-                 ((XSComplexTypeDecl)elementType).containsTypeID())) {
-                reportSchemaError ("e-props-correct.4", new Object[]{element.fName});
-            }
-        }
-
-        return element;
-    }
-
-    void reset(XMLErrorReporter reporter, SymbolTable symbolTable) {
-        super.reset(reporter, symbolTable);
-        fDeferTraversingLocalElements = true;
-    } // reset()
-
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java
deleted file mode 100644
index 1011ae9..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDGroupTraverser.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.impl.xs.XSGroupDecl;
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.xni.QName;
-import org.w3c.dom.Element;
-
-/**
- * The model group schema component traverser.
- *
- * <group
- *   name = NCName>
- *   Content: (annotation?, (all | choice | sequence))
- * </group>
- *
- * @author Rahul Srivastava, Sun Microsystems Inc.
- * @author Elena Litani, IBM
- * @author Lisa Martin,  IBM
- * @version $Id$
- */
-class  XSDGroupTraverser extends XSDAbstractParticleTraverser {
-
-    XSDGroupTraverser (XSDHandler handler,
-                       XSAttributeChecker gAttrCheck) {
-
-        super(handler, gAttrCheck);
-    }
-
-    XSParticleDecl traverseLocal(Element elmNode,
-                                 XSDocumentInfo schemaDoc,
-                                 SchemaGrammar grammar) {
-
-        // General Attribute Checking for elmNode declared locally
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false,
-                              schemaDoc);
-        QName refAttr = (QName) attrValues[XSAttributeChecker.ATTIDX_REF];
-        XInt  minAttr = (XInt)  attrValues[XSAttributeChecker.ATTIDX_MINOCCURS];
-        XInt  maxAttr = (XInt)  attrValues[XSAttributeChecker.ATTIDX_MAXOCCURS];
-
-        XSGroupDecl group = null;
-
-        // ref should be here.
-        if (refAttr == null) {
-            reportGenericSchemaError("Local group declaration should have ref.");
-        } else {
-            // get global decl
-            // index is a particle index.
-            group = (XSGroupDecl)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.GROUP_TYPE, refAttr);
-        }
-
-        // no children are allowed
-        if (DOMUtil.getFirstChildElement(elmNode) != null) {
-            reportGenericSchemaError("Local group declaration cannot have a child.");
-        }
-
-        int minOccurs = minAttr.intValue();
-        int maxOccurs = maxAttr.intValue();
-
-        XSParticleDecl particle = null;
-
-        if (group != null) {
-            // empty particle
-            if (minOccurs == 0 && maxOccurs == 0) {
-            } else if (minOccurs == 1 && maxOccurs == 1) {
-                particle = group.fParticle;
-            }
-            else if (!( minOccurs == 1 && maxOccurs == 1)) {
-                // if minOccurs==maxOccurs==1 we don't need to create new particle
-                // create new particle in the grammar if minOccurs<maxOccurs
-                particle = new XSParticleDecl();
-                particle.fType = group.fParticle.fType;
-                particle.fValue = group.fParticle;
-                particle.fMinOccurs = minOccurs;
-                particle.fMaxOccurs = maxOccurs;
-            }
-        }
-
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return particle;
-
-    } // traverseLocal
-
-    XSGroupDecl traverseGlobal(Element elmNode,
-                               XSDocumentInfo schemaDoc,
-                               SchemaGrammar grammar) {
-
-        // General Attribute Checking for elmNode declared globally
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, true,
-                              schemaDoc);
-        String  strNameAttr = (String)  attrValues[XSAttributeChecker.ATTIDX_NAME];
-
-        // must have a name
-        if (strNameAttr == null) {
-            reportGenericSchemaError("Global group declaration must have a name.");
-        }
-
-        XSGroupDecl group = null;
-        XSParticleDecl particle = null;
-
-        // must have at least one child
-        Element l_elmChild = DOMUtil.getFirstChildElement(elmNode);
-        if (l_elmChild == null) {
-            reportGenericSchemaError("Global group declaration must have a child.");
-        } else {
-            String childName = l_elmChild.getLocalName();
-            if (childName.equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(l_elmChild, attrValues, true, schemaDoc);
-                l_elmChild = DOMUtil.getNextSiblingElement(l_elmChild);
-                if (l_elmChild != null)
-                    childName = l_elmChild.getLocalName();
-            }
-
-            if (l_elmChild == null) {
-                reportGenericSchemaError("Global group element must have a child <all>, <choice> or <sequence>.");
-            } else if (childName.equals(SchemaSymbols.ELT_ALL)) {
-                particle = traverseAll(l_elmChild, schemaDoc, grammar, CHILD_OF_GROUP);
-            } else if (childName.equals(SchemaSymbols.ELT_CHOICE)) {
-                particle = traverseChoice(l_elmChild, schemaDoc, grammar, CHILD_OF_GROUP);
-            } else if (childName.equals(SchemaSymbols.ELT_SEQUENCE)) {
-                particle = traverseSequence(l_elmChild, schemaDoc, grammar, CHILD_OF_GROUP);
-            } else {
-                Object[] args = new Object [] { "group", childName};
-                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                           "GroupContentRestricted",
-                                           args,
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }
-
-            if (l_elmChild != null &&
-                DOMUtil.getNextSiblingElement(l_elmChild) != null) {
-                Object[] args = new Object [] { "group", childName};
-                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                           "GroupContentRestricted",
-                                           args,
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }
-
-            // add global group declaration to the grammar
-            if (particle != null && strNameAttr != null) {
-                group = new XSGroupDecl();
-                group.fName = strNameAttr;
-                group.fTargetNamespace = schemaDoc.fTargetNamespace;
-                group.fParticle = particle;
-                grammar.addGlobalGroupDecl(group);
-            }
-        }
-        if(group != null) { 
-            // store groups redefined by restriction in the grammar so
-            // that we can get at them at full-schema-checking time.
-            Object redefinedGrp = fSchemaHandler.getGrpOrAttrGrpRedefinedByRestriction(XSDHandler.GROUP_TYPE,
-                new QName(fSchemaHandler.EMPTY_STRING, strNameAttr, strNameAttr, schemaDoc.fTargetNamespace),
-                schemaDoc);
-            if(redefinedGrp != null) {
-                // store in grammar
-                grammar.addRedefinedGroupDecl(group, (XSGroupDecl)redefinedGrp);
-            }
-        }
-
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return group;
-
-    } // traverseGlobal
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java b/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
deleted file mode 100644
index 3e4ba6c..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
+++ /dev/null
@@ -1,1602 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.xs.XSGrammarResolver;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.impl.xs.SchemaNamespaceSupport;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.XSComplexTypeDecl;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.apache.xerces.impl.xs.XMLSchemaValidator;
-import org.apache.xerces.parsers.StandardParserConfiguration;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.XMLEntityManager;
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.SymbolHash;
-import org.apache.xerces.util.DOMUtil;
-
-import org.w3c.dom.Document;
-import org.apache.xerces.dom.DocumentImpl;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-
-import java.util.Hashtable;
-import java.util.Stack;
-import java.util.Vector;
-import java.util.StringTokenizer;
-import java.io.IOException;
-
-/**
- * The purpose of this class is to co-ordinate the construction of a
- * grammar object corresponding to a schema.  To do this, it must be
- * prepared to parse several schema documents (for instance if the
- * schema document originally referred to contains <include> or
- * <redefined> information items).  If any of the schemas imports a
- * schema, other grammars may be constructed as a side-effect.
- *
- * @author Neil Graham, IBM
- * @version $Id$
- */
-
-public class XSDHandler {
-
-    // data
-
-    // different sorts of declarations; should make lookup and
-    // traverser calling more efficient/less bulky.
-    final static int ATTRIBUTE_TYPE          = 1;
-    final static int ATTRIBUTEGROUP_TYPE     = 2;
-    final static int ELEMENT_TYPE            = 3;
-    final static int GROUP_TYPE              = 4;
-    final static int IDENTITYCONSTRAINT_TYPE = 5;
-    final static int NOTATION_TYPE           = 6;
-    final static int TYPEDECL_TYPE           = 7;
-
-    // this string gets appended to redefined names; it's purpose is to be
-    // as unlikely as possible to cause collisions.
-    public final static String REDEF_IDENTIFIER = "_fn3dktizrknc9pi";
-
-    // please note the difference between SchemaHandler.EMPTY_STRING and
-    // SchemaSymbols.EMPTY_STRING:
-    //   the one in SchemaHandler is only for namespace binding purpose, it's
-    //   used as a legal prefix, and it's added to the current symbol table;
-    //   while the one in SchemaSymbols is for general purpose: just empty.
-    public String EMPTY_STRING;
-
-    //
-    //protected data that can be accessable by any traverser
-    // stores <notation> decl
-    protected Hashtable fNotationRegistry = new Hashtable();
-
-    // These tables correspond to the symbol spaces defined in the
-    // spec.
-    // They are keyed with a QName (that is, String("URI,localpart) and
-    // their values are nodes corresponding to the given name's decl.
-    // By asking the node for its ownerDocument and looking in
-    // XSDocumentInfoRegistry we can easily get the corresponding
-    // XSDocumentInfo object.
-    private Hashtable fUnparsedAttributeRegistry = new Hashtable();
-    private Hashtable fUnparsedAttributeGroupRegistry = new Hashtable();
-    private Hashtable fUnparsedElementRegistry = new Hashtable();
-    private Hashtable fUnparsedGroupRegistry = new Hashtable();
-    private Hashtable fUnparsedIdentityConstraintRegistry = new Hashtable();
-    private Hashtable fUnparsedNotationRegistry = new Hashtable();
-    private Hashtable fUnparsedTypeRegistry = new Hashtable();
-    // this is keyed with a documentNode (or the schemaRoot nodes
-    // contained in the XSDocumentInfo objects) and its value is the
-    // XSDocumentInfo object corresponding to that document.
-    // Basically, the function of this registry is to be a link
-    // between the nodes we fetch from calls to the fUnparsed*
-    // arrays and the XSDocumentInfos they live in.
-    private Hashtable fXSDocumentInfoRegistry = new Hashtable();
-
-    // this hashtable is keyed on by XSDocumentInfo objects.  Its values
-    // are Vectors containing the XSDocumentInfo objects <include>d,
-    // <import>ed or <redefine>d by the key XSDocumentInfo.
-    private Hashtable fDependencyMap = new Hashtable();
-
-    // This vector stores strings which are combinations of the
-    // publicId and systemId of the inputSource corresponding to a
-    // schema document.  This combination is used so that the user's
-    // EntityResolver can provide a consistent way of identifying a
-    // schema document that is included in multiple other schemas.
-    private SymbolHash fTraversed = new SymbolHash();
-
-    // this hashtable contains a mapping from Document to its systemId
-    // this is useful to resolve a uri relative to the referring document
-    private Hashtable fDoc2SystemId = new Hashtable();
-
-    // the primary XSDocumentInfo we were called to parse
-    private XSDocumentInfo fRoot = null;
-
-    // This hashtable's job is to act as a link between the document
-    // node at the root of the parsed schema's tree and its
-    // XSDocumentInfo object.
-    private Hashtable fDoc2XSDocumentMap = new Hashtable();
-
-    // map between <redefine> elements and the XSDocumentInfo
-    // objects that correspond to the documents being redefined.
-    private Hashtable fRedefine2XSDMap = new Hashtable();
-
-    // these objects store a mapping between the names of redefining
-    // groups/attributeGroups and the groups/AttributeGroups which
-    // they redefine by restriction (implicitly).  It is up to the
-    // Group and AttributeGroup traversers to check these restrictions for
-    // validity.
-    private Hashtable fRedefinedRestrictedAttributeGroupRegistry = new Hashtable();
-    private Hashtable fRedefinedRestrictedGroupRegistry = new Hashtable();
-
-    // a variable storing whether the last schema document
-    // processed (by getSchema) was a duplicate.
-    private boolean fLastSchemaWasDuplicate;
-
-    // the XMLErrorReporter
-    private XMLErrorReporter fErrorReporter;
-
-    // the XSAttributeChecker
-    private XSAttributeChecker fAttributeChecker;
-
-    // this class is to make use of the schema location property values.
-    // we store the namespace/location pairs in a hashtable (use "" as the
-    // namespace of absent namespace). when resolving an entity, we first try
-    // to find in the hashtable whether there is a value for that namespace,
-    // if so, pass that location value to the user-defined entity resolver.
-    protected class LocationResolver {
-        // the user-defined entity resolver
-        public XMLEntityResolver fExternalResolver = null;
-        // namespace/location pairs
-        public Hashtable fLocationPairs = new Hashtable();
-
-        public void reset(XMLEntityResolver entityResolver,
-                          String sLocation, String nsLocation) {
-            fLocationPairs.clear();
-            fExternalResolver = entityResolver;
-
-            if (sLocation != null) {
-                StringTokenizer t = new StringTokenizer(sLocation, " \n\t\r");
-                String namespace, location;
-                while (t.hasMoreTokens()) {
-                    namespace = t.nextToken ();
-                    if (!t.hasMoreTokens()) {
-                        break;
-                    }
-                    location = t.nextToken();
-                    fLocationPairs.put(namespace, location);
-                }
-            }
-            if (nsLocation != null) {
-                fLocationPairs.put(EMPTY_STRING, nsLocation);
-            }
-        }
-
-        public XMLInputSource resolveEntity(String namespace, String location, String base, boolean useProperties) throws IOException {
-            if (fExternalResolver == null)
-                return null;
-
-            String loc = null;
-            // we consider the schema location properties for import
-            if (useProperties) {
-                // use empty string as the key for absent namespace
-                String ns = namespace == null ? EMPTY_STRING : namespace;
-                // get the location hint for that namespace
-                loc = (String)fLocationPairs.get(ns);
-            }
-
-            // if it's not import, or if the target namespace is not set
-            // in the schema location properties, use location hint
-            if (loc == null)
-                loc = location;
-
-            // REVISIT: resolve the entity. passing null as public id, instead
-            // of passing namespace value. -SG
-            return fExternalResolver.resolveEntity(null, loc, base);
-        }
-    }
-
-    // the schema location resolver
-    private LocationResolver fLocationResolver = new LocationResolver();
-
-    // the symbol table
-    private SymbolTable fSymbolTable;
-
-    // the GrammarResolver
-    private XSGrammarResolver fGrammarResolver;
-
-    //************ Traversers **********
-    XSDAttributeGroupTraverser fAttributeGroupTraverser;
-    XSDAttributeTraverser fAttributeTraverser;
-    XSDComplexTypeTraverser fComplexTypeTraverser;
-    XSDElementTraverser fElementTraverser;
-    XSDGroupTraverser fGroupTraverser;
-    XSDKeyrefTraverser fKeyrefTraverser;
-    XSDNotationTraverser fNotationTraverser;
-    XSDSimpleTypeTraverser fSimpleTypeTraverser;
-    XSDUniqueOrKeyTraverser fUniqueOrKeyTraverser;
-    XSDWildcardTraverser fWildCardTraverser;
-
-    DOMParser fSchemaParser;
-
-    // these data members are needed for the deferred traversal
-    // of local elements.
-
-    // the initial size of the array to store deferred local elements
-    private static final int INIT_STACK_SIZE = 30;
-    // the incremental size of the array to store deferred local elements
-    private static final int INC_STACK_SIZE  = 10;
-    // current position of the array (# of deferred local elements)
-    private int fLocalElemStackPos;
-
-    private XSParticleDecl[] fParticle;
-    private Element[] fLocalElementDecl;
-    private int[] fAllContext;
-    private String [][] fLocalElemNamespaceContext;
-
-    // these data members are needed for the deferred traversal
-    // of keyrefs.
-
-    // the initial size of the array to store deferred keyrefs
-    private static final int INIT_KEYREF_STACK = 2;
-    // the incremental size of the array to store deferred keyrefs
-    private static final int INC_KEYREF_STACK_AMOUNT = 2;
-    // current position of the array (# of deferred keyrefs)
-    private int fKeyrefStackPos;
-
-    private Element [] fKeyrefs;
-    private XSElementDecl [] fKeyrefElems;
-    private String [][] fKeyrefNamespaceContext;
-
-    // Constructors
-
-    // it should be possible to use the same XSDHandler to parse
-    // multiple schema documents; this will allow one to be
-    // constructed.
-    public XSDHandler (XSGrammarResolver gResolver) {
-        fGrammarResolver = gResolver;
-
-        // REVISIT: do we use shadowed or synchronized symbol table of
-        //          SchemaSymbols.fSymbolTable?
-        // REVISIT: don't use SchemaConfiguration internally
-        //          we will get stack overflaw because
-        //          XMLSchemaValidator will be instantiating XSDHandler...
-        fSchemaParser = new DOMParser(new StandardParserConfiguration(new SchemaSymbols.SchemaSymbolTable()));
-        // set ErrorHandler and EntityResolver (doesn't seem that
-        // XMLErrorHandler or XMLEntityResolver will work with
-        // standard DOMParser...
-        //REVISIT: disable deferred dom expansion. there are bugs.
-        try {
-            fSchemaParser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false);
-        }
-        catch (Exception e) {
-        }
-
-        createTraversers();
-    } // end constructor
-
-    // This method initiates the parse of a schema.  It will likely be
-    // called from the Validator and it will make the
-    // resulting grammar available; it returns a reference to this object just
-    // in case.  An ErrorHandler, EntityResolver, GrammarPool and SymbolTable must
-    // already have been set; the last thing this method does is reset
-    // this object (i.e., clean the registries, etc.).
-    public SchemaGrammar parseSchema(String schemaNamespace,
-                                     String schemaHint) {
-
-        // first phase:  construct trees.
-        Document schemaRoot = getSchema(schemaNamespace, schemaHint, null, true, true);
-        if (schemaRoot == null) {
-            // something went wrong right off the hop
-            reportGenericSchemaError("Could not locate a schema document corresponding to grammar " + schemaNamespace);
-            return null;
-        }
-        // handle empty string URI as null
-        if (schemaNamespace != null) {
-            schemaNamespace = fSymbolTable.addSymbol(schemaNamespace);
-        }
-        fRoot = constructTrees(schemaRoot, schemaNamespace);
-        if (fRoot == null) {
-            // REVISIT:  something went wrong; print error about no schema found
-            reportGenericSchemaError("Could not locate a schema document");
-            return null;
-        }
-
-        // second phase:  fill global registries.
-        buildGlobalNameRegistries();
-
-        // third phase:  call traversers
-        traverseSchemas();
-
-        // fourth phase: handle local element decls
-        traverseLocalElements();
-
-        // fifth phase:  handle Keyrefs
-        resolveKeyRefs();
-
-        // sixth phase: validate attribute of non-schema namespaces
-        // REVISIT: skip this for now. we reall don't want to do it.
-        //fAttributeChecker.checkNonSchemaAttributes(fGrammarResolver);
-
-        // and return.
-        return fGrammarResolver.getGrammar(schemaNamespace);
-    } // end parseSchema
-
-    // may wish to have setter methods for ErrorHandler,
-    // EntityResolver...
-
-    // This method does several things:
-    // It constructs an instance of an XSDocumentInfo object using the
-    // schemaRoot node.  Then, for each <include>,
-    // <redefine>, and <import> children, it attempts to resolve the
-    // requested schema document, initiates a DOM parse, and calls
-    // itself recursively on that document's root.  It also records in
-    // the DependencyMap object what XSDocumentInfo objects its XSDocumentInfo
-    // depends on.
-    // It also makes sure the targetNamespace of the schema it was
-    // called to parse is correct.
-    protected XSDocumentInfo constructTrees(Document schemaRoot, String callerTNS) {
-        if (schemaRoot == null) return null;
-        XSDocumentInfo currSchemaInfo = new XSDocumentInfo(schemaRoot, fAttributeChecker, fSymbolTable);
-
-        // Modified by Pavani Mukthipudi, Sun Microsystems Inc.
-        fDoc2XSDocumentMap.put(schemaRoot, currSchemaInfo);
-
-        if (callerTNS != null) {
-            // only set if we were included or redefined in.
-            if (currSchemaInfo.fTargetNamespace == null) {
-                currSchemaInfo.fTargetNamespace = callerTNS;
-                currSchemaInfo.fIsChameleonSchema = true;
-            }
-            else if (callerTNS != currSchemaInfo.fTargetNamespace) {
-                reportSchemaError("src-include.2", new Object [] {callerTNS, currSchemaInfo.fTargetNamespace});
-            }
-        }
-        SchemaGrammar sg = null;
-        if ((sg = fGrammarResolver.getGrammar(currSchemaInfo.fTargetNamespace)) == null) {
-            sg = new SchemaGrammar(fSymbolTable, currSchemaInfo.fTargetNamespace);
-            fGrammarResolver.putGrammar(sg);
-        }
-
-        Vector dependencies = new Vector();
-        Element rootNode = DOMUtil.getRoot(schemaRoot);
-
-        Document newSchemaRoot = null;
-        for (Element child = DOMUtil.getFirstChildElement(rootNode);
-            child != null;
-            child = DOMUtil.getNextSiblingElement(child)) {
-            String schemaNamespace=null;
-            String schemaHint=null;
-            String localName = DOMUtil.getLocalName(child);
-            if (localName.equals(SchemaSymbols.ELT_ANNOTATION))
-                continue;
-            else if (localName.equals(SchemaSymbols.ELT_IMPORT)) {
-                // have to handle some validation here too!
-                // call XSAttributeChecker to fill in attrs
-                Object[] includeAttrs = fAttributeChecker.checkAttributes(child, true, currSchemaInfo);
-                schemaHint = (String)includeAttrs[XSAttributeChecker.ATTIDX_SCHEMALOCATION];
-                schemaNamespace = (String)includeAttrs[XSAttributeChecker.ATTIDX_NAMESPACE];
-                if (schemaNamespace != null)
-                    schemaNamespace = fSymbolTable.addSymbol(schemaNamespace);
-                if (schemaNamespace == currSchemaInfo.fTargetNamespace) {
-                    reportSchemaError("src-import.1.1", new Object [] {schemaNamespace});
-                }
-                fAttributeChecker.returnAttrArray(includeAttrs, currSchemaInfo);
-                // consciously throw away whether was a duplicate; don't care.
-                // pass the systemId of the current document as the base systemId
-                newSchemaRoot = getSchema(schemaNamespace, schemaHint, (String)fDoc2SystemId.get(schemaRoot), false, true);
-            }
-            else if ((localName.equals(SchemaSymbols.ELT_INCLUDE)) ||
-                     (localName.equals(SchemaSymbols.ELT_REDEFINE))) {
-                // validation for redefine/include will be the same here; just
-                // make sure TNS is right (don't care about redef contents
-                // yet).
-                Object[] includeAttrs = fAttributeChecker.checkAttributes(child, true, currSchemaInfo);
-                schemaHint = (String)includeAttrs[XSAttributeChecker.ATTIDX_SCHEMALOCATION];
-                fAttributeChecker.returnAttrArray(includeAttrs, currSchemaInfo);
-                // schemaLocation is required on <include> and <redefine>
-                if (schemaHint == null)
-                    reportGenericSchemaError("schemaLocation attribute must appear in <include> and <redefine>");
-                // pass the systemId of the current document as the base systemId
-                boolean mustResolve = false;
-                if(localName.equals(SchemaSymbols.ELT_REDEFINE)) {
-                    mustResolve = nonAnnotationContent(child);
-                }
-                newSchemaRoot = getSchema(null, schemaHint, (String)fDoc2SystemId.get(schemaRoot), mustResolve, false);
-                schemaNamespace = currSchemaInfo.fTargetNamespace;
-            }
-            else {
-                // no more possibility of schema references in well-formed
-                // schema...
-                break;
-            }
-
-            // If the schema is duplicate, we needn't call constructTrees() again.
-            // To handle mutual <include>s
-
-            // REVISIT: this creates a bug if the same document is both
-            //          imported and included. then only the first one takes
-            //          effect.
-
-            XSDocumentInfo newSchemaInfo = null;
-            if (fLastSchemaWasDuplicate) {
-                newSchemaInfo = (XSDocumentInfo)fDoc2XSDocumentMap.get(newSchemaRoot);
-            }
-            else {
-                newSchemaInfo = constructTrees(newSchemaRoot, schemaNamespace);
-            }
-            if (localName.equals(SchemaSymbols.ELT_REDEFINE) &&
-                newSchemaInfo != null) {
-                // must record which schema we're redefining so that we can
-                // rename the right things later!
-                fRedefine2XSDMap.put(child, newSchemaInfo);
-            }
-            if (newSchemaRoot != null) {
-                dependencies.addElement(newSchemaInfo);
-                newSchemaRoot = null;
-            }
-        }
-        fDependencyMap.put(currSchemaInfo, dependencies);
-        return currSchemaInfo;
-    } // end constructTrees
-
-    // This method builds registries for all globally-referenceable
-    // names.  A registry will be built for each symbol space defined
-    // by the spec.  It is also this method's job to rename redefined
-    // components, and to record which components redefine others (so
-    // that implicit redefinitions of groups and attributeGroups can be handled).
-    protected void buildGlobalNameRegistries() {
-        /* Starting with fRoot, we examine each child of the schema
-         * element.  Skipping all imports and includes, we record the names
-         * of all other global components (and children of <redefine>).  We
-         * also put <redefine> names in a registry that we look through in
-         * case something needs renaming.  Once we're done with a schema we
-         * set its Document node to hidden so that we don't try to traverse
-         * it again; then we look to its Dependency map entry.  We keep a
-         * stack of schemas that we haven't yet finished processing; this
-         * is a depth-first traversal.
-         */
-        Stack schemasToProcess = new Stack();
-        schemasToProcess.push(fRoot);
-        while (!schemasToProcess.empty()) {
-            XSDocumentInfo currSchemaDoc =
-            (XSDocumentInfo)schemasToProcess.pop();
-            Document currDoc = currSchemaDoc.fSchemaDoc;
-            if (DOMUtil.isHidden(currDoc)) {
-                // must have processed this already!
-                continue;
-            }
-            Element currRoot = DOMUtil.getRoot(currDoc);
-
-            // process this schema's global decls
-            boolean dependenciesCanOccur = true;
-            for (Element globalComp =
-                 DOMUtil.getFirstChildElement(currRoot);
-                globalComp != null;
-                globalComp = DOMUtil.getNextSiblingElement(globalComp)) {
-                // this loop makes sure the <schema> element ordering is
-                // also valid.
-                if (DOMUtil.getLocalName(globalComp).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    //skip it; traverse it later
-                    continue;
-                }
-                else if (DOMUtil.getLocalName(globalComp).equals(SchemaSymbols.ELT_INCLUDE) ||
-                         DOMUtil.getLocalName(globalComp).equals(SchemaSymbols.ELT_IMPORT)) {
-                    if (!dependenciesCanOccur) {
-                        reportSchemaError("sch-props-correct.1", new Object [] {DOMUtil.getLocalName(globalComp)});
-                    }
-                    // we've dealt with this; mark as traversed
-                    DOMUtil.setHidden(globalComp);
-                }
-                else if (DOMUtil.getLocalName(globalComp).equals(SchemaSymbols.ELT_REDEFINE)) {
-                    if (!dependenciesCanOccur) {
-                        reportSchemaError("sch-props-correct.1", new Object [] {DOMUtil.getLocalName(globalComp)});
-                    }
-                    for (Element redefineComp = DOMUtil.getFirstChildElement(globalComp);
-                        redefineComp != null;
-                        redefineComp = DOMUtil.getNextSiblingElement(redefineComp)) {
-                        String lName = DOMUtil.getAttrValue(redefineComp, SchemaSymbols.ATT_NAME);
-                        if (lName.length() == 0) // an error we'll catch later
-                            continue;
-                        String qName = currSchemaDoc.fTargetNamespace == null ?
-                                       ","+lName:
-                                       currSchemaDoc.fTargetNamespace +","+lName;
-                        String componentType = DOMUtil.getLocalName(redefineComp);
-                        if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) {
-                            checkForDuplicateNames(qName, fUnparsedAttributeGroupRegistry, redefineComp, currSchemaDoc);
-                            // the check will have changed our name;
-                            String targetLName = DOMUtil.getAttrValue(redefineComp, SchemaSymbols.ATT_NAME)+REDEF_IDENTIFIER;
-                            // and all we need to do is error-check+rename our kkids:
-                            renameRedefiningComponents(currSchemaDoc, redefineComp, SchemaSymbols.ELT_ATTRIBUTEGROUP,
-                                                       lName, targetLName);
-                        }
-                        else if ((componentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) ||
-                                 (componentType.equals(SchemaSymbols.ELT_SIMPLETYPE))) {
-                            checkForDuplicateNames(qName, fUnparsedTypeRegistry, redefineComp, currSchemaDoc);
-                            // the check will have changed our name;
-                            String targetLName = DOMUtil.getAttrValue(redefineComp, SchemaSymbols.ATT_NAME) + REDEF_IDENTIFIER;
-                            // and all we need to do is error-check+rename our kkids:
-                            if (componentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) {
-                                renameRedefiningComponents(currSchemaDoc, redefineComp, SchemaSymbols.ELT_COMPLEXTYPE,
-                                                           lName, targetLName);
-                            }
-                            else { // must be simpleType
-                                renameRedefiningComponents(currSchemaDoc, redefineComp, SchemaSymbols.ELT_SIMPLETYPE,
-                                                           lName, targetLName);
-                            }
-                        }
-                        else if (componentType.equals(SchemaSymbols.ELT_GROUP)) {
-                            checkForDuplicateNames(qName, fUnparsedGroupRegistry, redefineComp, currSchemaDoc);
-                            // the check will have changed our name;
-                            String targetLName = DOMUtil.getAttrValue(redefineComp, SchemaSymbols.ATT_NAME)+REDEF_IDENTIFIER;
-                            // and all we need to do is error-check+rename our kids:
-                            renameRedefiningComponents(currSchemaDoc, redefineComp, SchemaSymbols.ELT_GROUP,
-                                                       lName, targetLName);
-                        }
-                    } // end march through <redefine> children
-                    // and now set as traversed
-                    //DOMUtil.setHidden(globalComp);
-                }
-                else {
-                    dependenciesCanOccur = false;
-                    String lName = DOMUtil.getAttrValue(globalComp, SchemaSymbols.ATT_NAME);
-                    if (lName.length() == 0) // an error we'll catch later
-                        continue;
-                    String qName = currSchemaDoc.fTargetNamespace == null?
-                                   ","+lName:
-                                   currSchemaDoc.fTargetNamespace +","+lName;
-                    String componentType = DOMUtil.getLocalName(globalComp);
-                    if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTE)) {
-                        checkForDuplicateNames(qName, fUnparsedAttributeRegistry, globalComp, currSchemaDoc);
-                    }
-                    else if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) {
-                        checkForDuplicateNames(qName, fUnparsedAttributeGroupRegistry, globalComp, currSchemaDoc);
-                    }
-                    else if ((componentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) ||
-                             (componentType.equals(SchemaSymbols.ELT_SIMPLETYPE))) {
-                        checkForDuplicateNames(qName, fUnparsedTypeRegistry, globalComp, currSchemaDoc);
-                    }
-                    else if (componentType.equals(SchemaSymbols.ELT_ELEMENT)) {
-                        checkForDuplicateNames(qName, fUnparsedElementRegistry, globalComp, currSchemaDoc);
-                    }
-                    else if (componentType.equals(SchemaSymbols.ELT_GROUP)) {
-                        checkForDuplicateNames(qName, fUnparsedGroupRegistry, globalComp, currSchemaDoc);
-                    }
-                    else if (componentType.equals(SchemaSymbols.ELT_NOTATION)) {
-                        checkForDuplicateNames(qName, fUnparsedNotationRegistry, globalComp, currSchemaDoc);
-                    }
-                }
-            } // end for
-
-            // now we're done with this one!
-            DOMUtil.setHidden(currDoc);
-            // now add the schemas this guy depends on
-            Vector currSchemaDepends = (Vector)fDependencyMap.get(currSchemaDoc);
-            for (int i = 0; i < currSchemaDepends.size(); i++) {
-                schemasToProcess.push(currSchemaDepends.elementAt(i));
-            }
-        } // while
-    } // end buildGlobalNameRegistries
-
-    // Beginning at the first schema processing was requested for
-    // (fRoot), this method
-    // examines each child (global schema information item) of each
-    // schema document (and of each <redefine> element)
-    // corresponding to an XSDocumentInfo object.  If the
-    // readOnly field on that node has not been set, it calls an
-    // appropriate traverser to traverse it.  Once all global decls in
-    // an XSDocumentInfo object have been traversed, it marks that object
-    // as traversed (or hidden) in order to avoid infinite loops.  It completes
-    // when it has visited all XSDocumentInfo objects in the
-    // DependencyMap and marked them as traversed.
-    protected void traverseSchemas() {
-        // the process here is very similar to that in
-        // buildGlobalRegistries, except we can't set our schemas as
-        // hidden for a second time; so make them all visible again
-        // first!
-        setSchemasVisible(fRoot);
-        Stack schemasToProcess = new Stack();
-        schemasToProcess.push(fRoot);
-        while (!schemasToProcess.empty()) {
-            XSDocumentInfo currSchemaDoc =
-            (XSDocumentInfo)schemasToProcess.pop();
-            Document currDoc = currSchemaDoc.fSchemaDoc;
-            SchemaGrammar currSG = fGrammarResolver.getGrammar(currSchemaDoc.fTargetNamespace);
-            if (DOMUtil.isHidden(currDoc)) {
-                // must have processed this already!
-                continue;
-            }
-            Element currRoot = DOMUtil.getRoot(currDoc);
-
-            // traverse this schema's global decls
-            for (Element globalComp =
-                 DOMUtil.getFirstVisibleChildElement(currRoot);
-                globalComp != null;
-                globalComp = DOMUtil.getNextVisibleSiblingElement(globalComp)) {
-                // We'll always want to set this as hidden!
-                DOMUtil.setHidden(globalComp);
-                String componentType = DOMUtil.getLocalName(globalComp);
-                // includes and imports will not show up here!
-                if (DOMUtil.getLocalName(globalComp).equals(SchemaSymbols.ELT_REDEFINE)) {
-                    for (Element redefinedComp = DOMUtil.getFirstVisibleChildElement(globalComp);
-                        redefinedComp != null;
-                        redefinedComp = DOMUtil.getNextVisibleSiblingElement(redefinedComp)) {
-                        String redefinedComponentType = DOMUtil.getLocalName(redefinedComp);
-                        DOMUtil.setHidden(redefinedComp);
-                        if (redefinedComponentType.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) {
-                            fAttributeGroupTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG);
-                        }
-                        else if (redefinedComponentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) {
-                            fComplexTypeTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG);
-                        }
-                        else if (redefinedComponentType.equals(SchemaSymbols.ELT_GROUP)) {
-                            fGroupTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG);
-                        }
-                        else if (redefinedComponentType.equals(SchemaSymbols.ELT_SIMPLETYPE)) {
-                            fSimpleTypeTraverser.traverseGlobal(redefinedComp, currSchemaDoc, currSG);
-                        }
-                        else if (redefinedComponentType.equals(SchemaSymbols.ELT_ANNOTATION)) {
-                            // REVISIT:  according to 3.13.2 the PSVI needs the parent's attributes;
-                            // thus this should be done in buildGlobalNameRegistries not here...
-                            fElementTraverser.traverseAnnotationDecl(redefinedComp, null, true, currSchemaDoc);
-                        }
-                        else {
-                            reportSchemaError("src-redefine", new Object [] {componentType});
-                        }
-                    } // end march through <redefine> children
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTE)) {
-                    fAttributeTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG);
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) {
-                    fAttributeGroupTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG);
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) {
-                    fComplexTypeTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG);
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_ELEMENT)) {
-                    fElementTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG);
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_GROUP)) {
-                    fGroupTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG);
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_NOTATION)) {
-                    fNotationTraverser.traverse(globalComp, currSchemaDoc, currSG);
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_SIMPLETYPE)) {
-                    fSimpleTypeTraverser.traverseGlobal(globalComp, currSchemaDoc, currSG);
-                }
-                else if (componentType.equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    // REVISIT:  according to 3.13.2 the PSVI needs the parent's attributes;
-                    // thus this should be done in buildGlobalNameRegistries not here...
-                    fElementTraverser.traverseAnnotationDecl(globalComp, null, true, currSchemaDoc);
-                }
-                else {
-                    reportSchemaError("sch-props-correct.1", new Object [] {DOMUtil.getLocalName(globalComp)});
-                }
-            } // end for
-
-            // now we're done with this one!
-            DOMUtil.setHidden(currDoc);
-            // now add the schemas this guy depends on
-            Vector currSchemaDepends = (Vector)fDependencyMap.get(currSchemaDoc);
-            for (int i = 0; i < currSchemaDepends.size(); i++) {
-                schemasToProcess.push(currSchemaDepends.elementAt(i));
-            }
-        } // while
-    } // end traverseSchemas
-
-    private static final String[] COMP_TYPE = {
-        null,               // index 0
-        "attribute declaration",
-        "attribute group",
-        "elment declaration",
-        "group",
-        "identity constraint",
-        "notation",
-        "type definition",
-    };
-
-    // since it is forbidden for traversers to talk to each other
-    // directly (except wen a traverser encounters a local declaration),
-    // this provides a generic means for a traverser to call
-    // for the traversal of some declaration.  An XSDocumentInfo is
-    // required because the XSDocumentInfo that the traverser is traversing
-    // may bear no relation to the one the handler is operating on.
-    // This method will:
-    // 1.  See if a global definition matching declToTraverse exists;
-    // 2. if so, determine if there is a path from currSchema to the
-    // schema document where declToTraverse lives (i.e., do a lookup
-    // in DependencyMap);
-    // 3. depending on declType (which will be relevant to step 1 as
-    // well), call the appropriate traverser with the appropriate
-    // XSDocumentInfo object.
-    // This method returns whatever the traverser it called returned;
-    // this will be an Object of some kind
-    // that lives in the Grammar.
-    protected Object getGlobalDecl(XSDocumentInfo currSchema,
-                                   int declType,
-                                   QName declToTraverse) {
-
-        // from the schema spec, all built-in types are present in all schemas,
-        // so if the requested component is a type, and could be found in the
-        // default schema grammar, we should return that type.
-        // otherwise (since we would support user-defined schema grammar) we'll
-        // use the normal way to get the decl
-        if (declToTraverse.uri != null &&
-            declToTraverse.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA) {
-            if (declType == TYPEDECL_TYPE) {
-                Object retObj = SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(declToTraverse.localpart);
-                if (retObj != null)
-                    return retObj;
-            }
-        }
-
-        XSDocumentInfo schemaWithDecl = null;
-        Element decl = null;
-
-        String declKey = declToTraverse.uri == null? ","+declToTraverse.localpart:
-                         declToTraverse.uri+","+declToTraverse.localpart;
-        switch (declType) {
-        case ATTRIBUTE_TYPE :
-            decl = (Element)fUnparsedAttributeRegistry.get(declKey);
-            break;
-        case ATTRIBUTEGROUP_TYPE :
-            decl = (Element)fUnparsedAttributeGroupRegistry.get(declKey);
-            break;
-        case ELEMENT_TYPE :
-            decl = (Element)fUnparsedElementRegistry.get(declKey);
-            break;
-        case GROUP_TYPE :
-            decl = (Element)fUnparsedGroupRegistry.get(declKey);
-            break;
-        case IDENTITYCONSTRAINT_TYPE :
-            decl = (Element)fUnparsedIdentityConstraintRegistry.get(declKey);
-            break;
-        case NOTATION_TYPE :
-            decl = (Element)fUnparsedNotationRegistry.get(declKey);
-            break;
-        case TYPEDECL_TYPE :
-            decl = (Element)fUnparsedTypeRegistry.get(declKey);
-            break;
-        default:
-            // REVISIT: report internal error...
-            reportGenericSchemaError("XSDHandler asked to locate component of type " + declType + "; it does not recognize this type (internal error!)");
-        }
-        if (decl != null)
-            schemaWithDecl = findXSDocumentForDecl(currSchema, decl);
-        else {
-            reportSchemaError("src-resolve", new Object[]{declToTraverse.rawname, COMP_TYPE[declType]});
-            return null;
-        }
-
-        if (schemaWithDecl == null) {
-            // cannot get to this schema from the one containing the requesting decl
-            reportSchemaError("src-resolve.4", new Object[]{currSchema, declToTraverse.uri});
-            return null;
-        }
-        SchemaGrammar sGrammar = fGrammarResolver.getGrammar(schemaWithDecl.fTargetNamespace);
-
-        Object retObj = null;
-        switch (declType) {
-        case ATTRIBUTE_TYPE :
-            retObj = sGrammar.getGlobalAttributeDecl(declToTraverse.localpart);
-            break;
-        case ATTRIBUTEGROUP_TYPE :
-            retObj = sGrammar.getGlobalAttributeGroupDecl(declToTraverse.localpart);
-            break;
-        case ELEMENT_TYPE :
-            retObj = sGrammar.getGlobalElementDecl(declToTraverse.localpart);
-            break;
-        case GROUP_TYPE :
-            retObj = sGrammar.getGlobalGroupDecl(declToTraverse.localpart);
-            break;
-        case IDENTITYCONSTRAINT_TYPE :
-            retObj = sGrammar.getIDConstraintDecl(declToTraverse.localpart);
-            break;
-        case NOTATION_TYPE :
-            retObj = sGrammar.getNotationDecl(declToTraverse.localpart);
-            break;
-        case TYPEDECL_TYPE :
-            retObj = sGrammar.getGlobalTypeDecl(declToTraverse.localpart);
-            break;
-        }
-
-        if (retObj != null)
-            return retObj;
-
-        if (DOMUtil.isHidden(decl)) {
-            // decl must not be null if we're here...
-            //REVISIT: report an error: circular reference
-            reportGenericSchemaError("Circular reference detected in schema component named " + declToTraverse.prefix+":"+declToTraverse.localpart);
-            return null;
-        }
-
-        DOMUtil.setHidden(decl);
-
-        // back up the current SchemaNamespaceSupport, because we need to provide
-        // a fresh one to the traverseGlobal methods.
-        schemaWithDecl.backupNSSupport();
-
-        switch (declType) {
-        case ATTRIBUTE_TYPE :
-            retObj = fAttributeTraverser.traverseGlobal(decl, schemaWithDecl, sGrammar);
-            break;
-        case ATTRIBUTEGROUP_TYPE :
-            retObj = fAttributeGroupTraverser.traverseGlobal(decl, schemaWithDecl, sGrammar);
-            break;
-        case ELEMENT_TYPE :
-            retObj = fElementTraverser.traverseGlobal(decl, schemaWithDecl, sGrammar);
-            break;
-        case GROUP_TYPE :
-            retObj = fGroupTraverser.traverseGlobal(decl, schemaWithDecl, sGrammar);
-            break;
-        case IDENTITYCONSTRAINT_TYPE :
-            // identity constraints should have been parsed already...
-            // we should never get here
-            retObj = null;
-            break;
-        case NOTATION_TYPE :
-            retObj = fNotationTraverser.traverse(decl, schemaWithDecl, sGrammar);
-            break;
-        case TYPEDECL_TYPE :
-            if (DOMUtil.getLocalName(decl).equals(SchemaSymbols.ELT_COMPLEXTYPE))
-                retObj = fComplexTypeTraverser.traverseGlobal(decl, schemaWithDecl, sGrammar);
-            else
-                retObj = fSimpleTypeTraverser.traverseGlobal(decl, schemaWithDecl, sGrammar);
-        }
-
-        // restore the previous SchemaNamespaceSupport, so that the caller can get
-        // proper namespace binding.
-        schemaWithDecl.restoreNSSupport();
-
-        return retObj;
-    } // getGlobalDecl(XSDocumentInfo, int, QName):  Object
-
-    // This method determines whether there is a group
-    // (attributeGroup) which the given one has redefined by
-    // restriction.  If so, it returns it; else it returns null.
-    // @param type:  whether what's been redefined is an
-    // attributeGroup or a group;
-    // @param name:  the QName of the component doing the redefining.
-    // @param currSchema:  schema doc in which the redefining component lives.
-    // @return:  Object representing decl redefined if present, null
-    // otherwise.
-    Object getGrpOrAttrGrpRedefinedByRestriction(int type, QName name, XSDocumentInfo currSchema) {
-        String realName = name.uri != null?name.uri+","+name.localpart:
-                ","+name.localpart;
-        String nameToFind = null;
-        switch (type) {
-        case ATTRIBUTEGROUP_TYPE:
-            nameToFind = (String)fRedefinedRestrictedAttributeGroupRegistry.get(realName);
-            break;
-        case GROUP_TYPE:
-            nameToFind = (String)fRedefinedRestrictedGroupRegistry.get(realName);
-            break;
-        default:
-            return null;
-        }
-        if (nameToFind == null) return null;
-        int commaPos = nameToFind.indexOf(",");
-        QName qNameToFind = new QName(EMPTY_STRING, nameToFind.substring(commaPos+1),
-            nameToFind.substring(commaPos), (commaPos == 0)? null : nameToFind.substring(0, commaPos));
-        Object retObj = getGlobalDecl(currSchema, type, qNameToFind);
-        if(retObj == null) {
-            switch (type) {
-            case ATTRIBUTEGROUP_TYPE:
-                reportSchemaError("src-redefine.7.2.1", new Object []{name.localpart});
-                break;
-            case GROUP_TYPE:
-                reportSchemaError("src-redefine.6.2.1", new Object []{name.localpart});
-                break;
-            }
-            return null;
-        }
-        return retObj;
-    } // getGrpOrAttrGrpRedefinedByRestriction(int, QName, XSDocumentInfo):  Object
-
-    // Since ID constraints can occur in local elements, unless we
-    // wish to completely traverse all our DOM trees looking for ID
-    // constraints while we're building our global name registries,
-    // which seems terribly inefficient, we need to resolve keyrefs
-    // after all parsing is complete.  This we can simply do by running through
-    // fIdentityConstraintRegistry and calling traverseKeyRef on all
-    // of the KeyRef nodes.  This unfortunately removes this knowledge
-    // from the elementTraverser class (which must ignore keyrefs),
-    // but there seems to be no efficient way around this...
-    protected void resolveKeyRefs() {
-        for (int i=0; i<fKeyrefStackPos; i++) {
-            Document keyrefDoc = DOMUtil.getDocument(fKeyrefs[i]);
-            XSDocumentInfo keyrefSchemaDoc = (XSDocumentInfo)fDoc2XSDocumentMap.get(keyrefDoc);
-            keyrefSchemaDoc.fNamespaceSupport.makeGlobal();
-            keyrefSchemaDoc.fNamespaceSupport.setEffectiveContext( fKeyrefNamespaceContext[i] );
-            SchemaGrammar keyrefGrammar = fGrammarResolver.getGrammar(keyrefSchemaDoc.fTargetNamespace);
-            // need to set <keyref> to hidden before traversing it,
-            // because it has global scope
-            DOMUtil.setHidden(fKeyrefs[i]);
-            fKeyrefTraverser.traverse(fKeyrefs[i], fKeyrefElems[i], keyrefSchemaDoc, keyrefGrammar);
-        }
-    } // end resolveKeyRefs
-
-    // an accessor method.  Just makes sure callers
-    // who want the Identity constraint registry vaguely know what they're about.
-    protected Hashtable getIDRegistry() {
-        return fUnparsedIdentityConstraintRegistry;
-    }
-
-    // This method squirrels away <keyref> declarations--along with the element
-    // decls and namespace bindings they might find handy.
-    protected void storeKeyRef (Element keyrefToStore, XSDocumentInfo schemaDoc,
-                                XSElementDecl currElemDecl) {
-        String keyrefName = DOMUtil.getAttrValue(keyrefToStore, SchemaSymbols.ATT_NAME);
-        if (keyrefName.length() != 0) {
-            String keyrefQName = schemaDoc.fTargetNamespace == null?
-                                 "," + keyrefName: schemaDoc.fTargetNamespace+","+keyrefName;
-            checkForDuplicateNames(keyrefQName, fUnparsedIdentityConstraintRegistry, keyrefToStore, schemaDoc);
-        }
-        // now set up all the registries we'll need...
-
-        // check array sizes
-        if (fKeyrefStackPos == fKeyrefs.length) {
-            Element [] elemArray = new Element [fKeyrefStackPos + INC_KEYREF_STACK_AMOUNT];
-            System.arraycopy(fKeyrefs, 0, elemArray, 0, fKeyrefStackPos);
-            fKeyrefs = elemArray;
-            XSElementDecl [] declArray = new XSElementDecl [fKeyrefStackPos + INC_KEYREF_STACK_AMOUNT];
-            System.arraycopy(fKeyrefElems, 0, declArray, 0, fKeyrefStackPos);
-            fKeyrefElems = declArray;
-            String[][] stringArray = new String [fKeyrefStackPos + INC_KEYREF_STACK_AMOUNT][];
-            System.arraycopy(fKeyrefNamespaceContext, 0, stringArray, 0, fKeyrefStackPos);
-            fKeyrefNamespaceContext = stringArray;
-        }
-        fKeyrefs[fKeyrefStackPos] = keyrefToStore;
-        fKeyrefElems[fKeyrefStackPos] = currElemDecl;
-        fKeyrefNamespaceContext[fKeyrefStackPos++] = schemaDoc.fNamespaceSupport.getEffectiveLocalContext();
-    } // storeKeyref (Element, XSDocumentInfo, XSElementDecl): void
-
-    // This method is responsible for schema resolution.  If it finds
-    // a schema document that the XMLEntityResolver resolves to with
-    // the given namespace and hint, it returns it.  It returns true
-    // if this is the first time it's seen this document, false
-    // otherwise.  schemaDoc is null if and only if no schema document
-    // was resolved to.
-    private Document getSchema(String schemaNamespace, String schemaHint,
-                               String baseSystemId, boolean mustResolve, boolean useProperties) {
-        // contents of this method will depend on the system we adopt for entity resolution--i.e., XMLEntityHandler, EntityHandler, etc.
-        XMLInputSource schemaSource=null;
-        Document schemaDoc = null;
-        try {
-            schemaSource = fLocationResolver.resolveEntity(schemaNamespace, schemaHint, baseSystemId, useProperties);
-            // REVISIT: when the system id and byte stream and character stream
-            //          of the input source are all null, it's
-            //          impossible to find the schema document. so we skip in
-            //          this case. otherwise we'll receive some NPE or
-            //          file not found errors. but schemaHint=="" is perfectly
-            //          legal for import.
-            if (schemaSource != null &&
-                (schemaSource.getSystemId() != null ||
-                 schemaSource.getByteStream() != null ||
-                 schemaSource.getCharacterStream() != null)) {
-
-                // When the system id of the input source is used, first try to
-                // expand it, and check whether the same document has been
-                // parsed before. If so, return the document corresponding to
-                // that system id.
-                String schemaId = null;
-                if (schemaSource.getByteStream() == null &&
-                    schemaSource.getCharacterStream() == null) {
-                    schemaId = XMLEntityManager.expandSystemId(schemaSource.getSystemId(), schemaSource.getBaseSystemId());
-                    if (fTraversed.get(schemaId) != null) {
-                        fLastSchemaWasDuplicate = true;
-                        return(Document)(fTraversed.get(schemaId));
-                    }
-                }
-                fSchemaParser.reset();
-                fSchemaParser.parse(schemaSource);
-                schemaDoc = fSchemaParser.getDocument();
-                // now we need to store the mapping information from system id
-                // to the document. also from the document to the system id.
-                if (schemaId != null) {
-                    fTraversed.put(schemaId, schemaDoc );
-                    fDoc2SystemId.put(schemaDoc, schemaId );
-                }
-                fLastSchemaWasDuplicate = false;
-                return schemaDoc;
-            }
-
-        }
-        catch (java.io.FileNotFoundException ex) {
-            // REVISIT: how to report an error for missing files
-            fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                       "General",
-                                       new Object[]{"file not found: " + schemaHint},
-                                       // when using namespace, then hint is optional,
-                                       // and it's not an error if the file is not found
-                                       // but if not using namespace (include),
-                                       // it's a warning if the file is not found.
-                                       mustResolve ?
-                                       XMLErrorReporter.SEVERITY_ERROR: 
-                                       XMLErrorReporter.SEVERITY_WARNING); 
-        }
-        catch (IOException ex) {
-            // REVISIT: report an error!
-            reportGenericSchemaError("error reading schema document: " + schemaHint);
-        }
-
-        schemaDoc = null;
-        fLastSchemaWasDuplicate = false;
-        return null;
-    } // getSchema(String, String, String, boolean, boolean):  Document
-
-    // initialize all the traversers.
-    // this should only need to be called once during the construction
-    // of this object; it creates the traversers that will be used to
-
-    // construct schemaGrammars.
-    private void createTraversers() {
-        fAttributeChecker = new XSAttributeChecker(this);
-        fAttributeGroupTraverser = new XSDAttributeGroupTraverser(this, fAttributeChecker);
-        fAttributeTraverser = new XSDAttributeTraverser(this, fAttributeChecker);
-        fComplexTypeTraverser = new XSDComplexTypeTraverser(this, fAttributeChecker);
-        fElementTraverser = new XSDElementTraverser(this, fAttributeChecker);
-        fGroupTraverser = new XSDGroupTraverser(this, fAttributeChecker);
-        fKeyrefTraverser = new XSDKeyrefTraverser(this, fAttributeChecker);
-        fNotationTraverser = new XSDNotationTraverser(this, fAttributeChecker);
-        fSimpleTypeTraverser = new XSDSimpleTypeTraverser(this, fAttributeChecker);
-        fUniqueOrKeyTraverser = new XSDUniqueOrKeyTraverser(this, fAttributeChecker);
-        fWildCardTraverser = new XSDWildcardTraverser(this, fAttributeChecker);
-    } // createTraversers()
-
-    // this method clears all the global structs of this object
-    // (except those passed in via the constructor).
-    public void reset(XMLErrorReporter errorReporter,
-                      XMLEntityResolver entityResolver,
-                      SymbolTable symbolTable,
-                      String externalSchemaLocation,
-                      String externalNoNSSchemaLocation) {
-
-        fErrorReporter = errorReporter;
-        fSymbolTable = symbolTable;
-
-        EMPTY_STRING = fSymbolTable.addSymbol(SchemaSymbols.EMPTY_STRING);
-
-        fLocationResolver.reset(entityResolver, externalSchemaLocation, externalNoNSSchemaLocation);
-
-        try {
-            fSchemaParser.setProperty(XMLSchemaValidator.ERROR_REPORTER, fErrorReporter);
-        }
-        catch (Exception e) {
-        }
-
-        fUnparsedAttributeRegistry.clear();
-        fUnparsedAttributeGroupRegistry.clear();
-        fUnparsedElementRegistry.clear();
-        fUnparsedGroupRegistry.clear();
-        fUnparsedIdentityConstraintRegistry.clear();
-        fUnparsedNotationRegistry.clear();
-        fUnparsedTypeRegistry.clear();
-
-        fXSDocumentInfoRegistry.clear();
-        fDependencyMap.clear();
-        fTraversed.clear();
-        fDoc2SystemId.clear();
-        fDoc2XSDocumentMap.clear();
-        fRedefine2XSDMap.clear();
-        fRoot = null;
-        fLastSchemaWasDuplicate = false;
-
-        fLocalElemStackPos = 0;
-        fParticle = new XSParticleDecl[INIT_STACK_SIZE];
-        fLocalElementDecl = new Element[INIT_STACK_SIZE];
-        fAllContext = new int[INIT_STACK_SIZE];
-        // err on the small side for num. of local namespaces declared...
-        fLocalElemNamespaceContext = new String [INIT_STACK_SIZE][1];
-
-        // and do same for keyrefs.
-        fKeyrefStackPos = 0;
-        fKeyrefs = new Element[INIT_KEYREF_STACK];
-        fKeyrefElems = new XSElementDecl [INIT_KEYREF_STACK];
-        fKeyrefNamespaceContext = new String[INIT_KEYREF_STACK][1];
-
-        // reset traversers
-        fAttributeChecker.reset(fErrorReporter, fSymbolTable);
-        fAttributeGroupTraverser.reset(fErrorReporter, fSymbolTable);
-        fAttributeTraverser.reset(fErrorReporter, fSymbolTable);
-        fComplexTypeTraverser.reset(fErrorReporter, fSymbolTable);
-        fElementTraverser.reset(fErrorReporter, fSymbolTable);
-        fGroupTraverser.reset(fErrorReporter, fSymbolTable);
-        fKeyrefTraverser.reset(fErrorReporter, fSymbolTable);
-        fNotationTraverser.reset(fErrorReporter, fSymbolTable);
-        fSimpleTypeTraverser.reset(fErrorReporter, fSymbolTable);
-        fUniqueOrKeyTraverser.reset(fErrorReporter, fSymbolTable);
-        fWildCardTraverser.reset(fErrorReporter, fSymbolTable);
-
-        fRedefinedRestrictedAttributeGroupRegistry.clear();
-        fRedefinedRestrictedGroupRegistry.clear();
-    } // reset(ErrorReporter, EntityResolver, SymbolTable)
-
-    /**
-     * Traverse all the deferred local elements. This method should be called
-     * by traverseSchemas after we've done with all the global declarations.
-     */
-    void traverseLocalElements() {
-        fElementTraverser.fDeferTraversingLocalElements = false;
-
-        for (int i = 0; i < fLocalElemStackPos; i++) {
-            Element currElem = fLocalElementDecl[i];
-            XSDocumentInfo currSchema = (XSDocumentInfo)fDoc2XSDocumentMap.get(DOMUtil.getDocument(currElem));
-            SchemaGrammar currGrammar = fGrammarResolver.getGrammar(currSchema.fTargetNamespace);
-            fElementTraverser.traverseLocal (fParticle[i], currElem, currSchema, currGrammar, fAllContext[i]);
-        }
-    }
-
-    // the purpose of this method is to keep up-to-date structures
-    // we'll need for the feferred traversal of local elements.
-    void fillInLocalElemInfo(Element elmDecl,
-                             XSDocumentInfo schemaDoc,
-                             int allContextFlags,
-                             XSParticleDecl particle) {
-
-        // if the stack is full, increase the size
-        if (fParticle.length == fLocalElemStackPos) {
-            // increase size
-            XSParticleDecl[] newStackP = new XSParticleDecl[fLocalElemStackPos+INC_STACK_SIZE];
-            System.arraycopy(fParticle, 0, newStackP, 0, fLocalElemStackPos);
-            fParticle = newStackP;
-            Element[] newStackE = new Element[fLocalElemStackPos+INC_STACK_SIZE];
-            System.arraycopy(fLocalElementDecl, 0, newStackE, 0, fLocalElemStackPos);
-            fLocalElementDecl = newStackE;
-            int[] newStackI = new int[fLocalElemStackPos+INC_STACK_SIZE];
-            System.arraycopy(fAllContext, 0, newStackI, 0, fLocalElemStackPos);
-            fAllContext = newStackI;
-            String [][] newStackN = new String [fLocalElemStackPos+INC_STACK_SIZE][];
-            System.arraycopy(fLocalElemNamespaceContext, 0, newStackN, 0, fLocalElemStackPos);
-            fLocalElemNamespaceContext = newStackN;
-        }
-
-        fParticle[fLocalElemStackPos] = particle;
-        fLocalElementDecl[fLocalElemStackPos] = elmDecl;
-        fAllContext[fLocalElemStackPos] = allContextFlags;
-        fLocalElemNamespaceContext[fLocalElemStackPos++] = schemaDoc.fNamespaceSupport.getEffectiveLocalContext();
-    } // end fillInLocalElemInfo(...)
-
-    /** This method makes sure that
-     * if this component is being redefined that it lives in the
-     * right schema.  It then renames the component correctly.  If it
-     * detects a collision--a duplicate definition--then it complains.
-     * Note that redefines must be handled carefully:  if there
-     * is a collision, it may be because we're redefining something we know about
-     * or because we've found the thing we're redefining.
-     */
-    void checkForDuplicateNames(String qName,
-                                Hashtable registry, Element currComp,
-                                XSDocumentInfo currSchema) {
-        Object objElem = null;
-        // REVISIT:  when we add derivation checking, we'll have to make
-        // sure that ID constraint collisions don't necessarily result in error messages.
-        if ((objElem = registry.get(qName)) == null) {
-            // just add it in!
-            registry.put(qName, currComp);
-        }
-        else {
-            Element collidingElem = (Element)objElem;
-            if (collidingElem == currComp) return;
-            Element elemParent = null;
-            XSDocumentInfo redefinedSchema = null;
-            // case where we've collided with a redefining element
-            // (the parent of the colliding element is a redefine)
-            boolean collidedWithRedefine = true;
-            if ((DOMUtil.getLocalName((elemParent = DOMUtil.getParent(collidingElem))).equals(SchemaSymbols.ELT_REDEFINE))) {
-                redefinedSchema = (XSDocumentInfo)(fRedefine2XSDMap.get(elemParent));
-                // case where we're a redefining element.
-            }
-            else if ((DOMUtil.getLocalName(DOMUtil.getParent(currComp)).equals(SchemaSymbols.ELT_REDEFINE))) {
-                redefinedSchema = (XSDocumentInfo)(fDoc2XSDocumentMap.get(DOMUtil.getDocument(collidingElem)));
-                collidedWithRedefine = false;
-            }
-            if (redefinedSchema != null) { //redefinition involved somehow
-                String newName = qName.substring(qName.lastIndexOf(',')+1)+REDEF_IDENTIFIER;
-                if (redefinedSchema == currSchema) { // object comp. okay here
-                    // now have to do some renaming...
-                    currComp.setAttribute(SchemaSymbols.ATT_NAME, newName);
-                    if (currSchema.fTargetNamespace == null)
-                        registry.put(","+newName, currComp);
-                    else
-                        registry.put(currSchema.fTargetNamespace+","+newName, currComp);
-                    // and take care of nested redefines by calling recursively:
-                    if (currSchema.fTargetNamespace == null)
-                        checkForDuplicateNames(","+newName, registry, currComp, currSchema);
-                    else
-                        checkForDuplicateNames(currSchema.fTargetNamespace+","+newName, registry, currComp, currSchema);
-                }
-                else { // we may be redefining the wrong schema
-                    if (collidedWithRedefine) {
-                        if (currSchema.fTargetNamespace == null)
-                            checkForDuplicateNames(","+newName, registry, currComp, currSchema);
-                        else
-                            checkForDuplicateNames(currSchema.fTargetNamespace+","+newName, registry, currComp, currSchema);
-                    }
-                    else {
-                        // REVISIT:  error that redefined element in wrong schema
-                        reportSchemaError("src-redefine.1", new Object [] {qName});
-                    }
-                }
-            }
-            else { // we've just got a flat-out collision
-                reportSchemaError("sch-props-correct.2", new Object []{qName});
-            }
-        }
-    } // checkForDuplicateNames(String, Hashtable, Element, XSDocumentInfo):void
-
-
-    //
-    //!!!!!!!!!!!!!!!! IMPLEMENT the following functions !!!!!!!!!!
-    //
-    //REVISIT: implement namescope support!!!
-    protected String resolvePrefixToURI (String prefix) {
-        //String uriStr = fStringPool.toString(fNamespacesScope.getNamespaceForPrefix(fStringPool.addSymbol(prefix)));
-        //if (uriStr.length() == 0 && prefix.length() > 0) {
-        // REVISIT: Localize
-        //// REVISIT:  reportGenericSchemaError("prefix : [" + prefix +"] cannot be resolved to a URI");
-        //return "";
-        //}
-
-        return null;
-    }
-
-    // the purpose of this method is to take the component of the
-    // specified type and rename references to itself so that they
-    // refer to the object being redefined.  It takes special care of
-    // <group>s and <attributeGroup>s to ensure that information
-    // relating to implicit restrictions is preserved for those
-    // traversers.
-    private void renameRedefiningComponents(XSDocumentInfo currSchema,
-                                            Element child, String componentType,
-                                            String oldName, String newName) {
-
-        SchemaNamespaceSupport currNSMap = currSchema.fNamespaceSupport;
-        if (componentType.equals(SchemaSymbols.ELT_SIMPLETYPE)) {
-            String processedTypeName = currSchema.fTargetNamespace == null?
-                                       ","+oldName:currSchema.fTargetNamespace+","+oldName;
-            Element grandKid = DOMUtil.getFirstChildElement(child);
-            if (grandKid == null) {
-                // fRedefineSucceeded = false;
-                reportSchemaError("src-redefine.5", null);
-            }
-            else {
-                String grandKidName = grandKid.getLocalName();
-                if (grandKidName.equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    grandKid = DOMUtil.getNextSiblingElement(grandKid);
-                    grandKidName = grandKid.getLocalName();
-                }
-                if (grandKid == null) {
-                    // fRedefineSucceeded = false;
-                    reportSchemaError("src-redefine.5", null);
-                }
-                else if (!grandKidName.equals(SchemaSymbols.ELT_RESTRICTION)) {
-                    // fRedefineSucceeded = false;
-                    reportSchemaError("src-redefine.5", null);
-                }
-                else {
-                    String derivedBase = grandKid.getAttribute( SchemaSymbols.ATT_BASE );
-                    String processedDerivedBase = findQName(derivedBase, currSchema);
-                    if (!processedTypeName.equals(processedDerivedBase)) {
-                        // fRedefineSucceeded = false;
-                        reportSchemaError("src-redefine.5", null);
-                    }
-                    else {
-                        // now we have to do the renaming...
-                        int colonptr = derivedBase.indexOf(":");
-                        if (colonptr > 0)
-                            grandKid.setAttribute( SchemaSymbols.ATT_BASE,
-                                                   derivedBase.substring(0,colonptr) + ":" + newName );
-                        else
-                            grandKid.setAttribute( SchemaSymbols.ATT_BASE, newName );
-//                        return true;
-                    }
-                }
-            }
-        }
-        else if (componentType.equals(SchemaSymbols.ELT_COMPLEXTYPE)) {
-            String processedTypeName = currSchema.fTargetNamespace == null?
-                                       ","+oldName:currSchema.fTargetNamespace+","+oldName;
-            Element grandKid = DOMUtil.getFirstChildElement(child);
-            if (grandKid == null) {
-                // fRedefineSucceeded = false;
-                reportSchemaError("src-redefine.5", null);
-            }
-            else {
-                if (grandKid.getLocalName().equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    grandKid = DOMUtil.getNextSiblingElement(grandKid);
-                }
-                if (grandKid == null) {
-                    // fRedefineSucceeded = false;
-                    reportSchemaError("src-redefine.5", null);
-                }
-                else {
-                    // have to go one more level down; let another pass worry whether complexType is valid.
-                    Element greatGrandKid = DOMUtil.getFirstChildElement(grandKid);
-                    if (greatGrandKid == null) {
-                        // fRedefineSucceeded = false;
-                        reportSchemaError("src-redefine.5", null);
-                    }
-                    else {
-                        String greatGrandKidName = greatGrandKid.getLocalName();
-                        if (greatGrandKidName.equals(SchemaSymbols.ELT_ANNOTATION)) {
-                            greatGrandKid = DOMUtil.getNextSiblingElement(greatGrandKid);
-                            greatGrandKidName = greatGrandKid.getLocalName();
-                        }
-                        if (greatGrandKid == null) {
-                            // fRedefineSucceeded = false;
-                            reportSchemaError("src-redefine.5", null);
-                        }
-                        else if (!greatGrandKidName.equals(SchemaSymbols.ELT_RESTRICTION) &&
-                                 !greatGrandKidName.equals(SchemaSymbols.ELT_EXTENSION)) {
-                            // fRedefineSucceeded = false;
-                            reportSchemaError("src-redefine.5", null);
-                        }
-                        else {
-                            String derivedBase = greatGrandKid.getAttribute( SchemaSymbols.ATT_BASE );
-                            String processedDerivedBase = findQName(derivedBase, currSchema);
-                            if (!processedTypeName.equals(processedDerivedBase)) {
-                                // fRedefineSucceeded = false;
-                                reportSchemaError("src-redefine.5", null);
-                            }
-                            else {
-                                // now we have to do the renaming...
-                                int colonptr = derivedBase.indexOf(":");
-                                if (colonptr > 0)
-                                    greatGrandKid.setAttribute( SchemaSymbols.ATT_BASE,
-                                                                derivedBase.substring(0,colonptr) + ":" + newName );
-                                else
-                                    greatGrandKid.setAttribute( SchemaSymbols.ATT_BASE,
-                                                                newName );
-//                                return true;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        else if (componentType.equals(SchemaSymbols.ELT_ATTRIBUTEGROUP)) {
-            String processedBaseName = (currSchema.fTargetNamespace == null)?
-                                       ","+oldName:currSchema.fTargetNamespace+","+oldName;
-            int attGroupRefsCount = changeRedefineGroup(processedBaseName, componentType, newName, child, currSchema);
-            if (attGroupRefsCount > 1) {
-                // fRedefineSucceeded = false;
-                reportSchemaError("src-redefine.7.1", new Object []{new Integer(attGroupRefsCount)});
-            }
-            else if (attGroupRefsCount == 1) {
-//                return true;
-            }
-            else
-                if (currSchema.fTargetNamespace == null)
-                fRedefinedRestrictedAttributeGroupRegistry.put(processedBaseName, ","+newName);
-            else
-                fRedefinedRestrictedAttributeGroupRegistry.put(processedBaseName, currSchema.fTargetNamespace+","+newName);
-        }
-        else if (componentType.equals(SchemaSymbols.ELT_GROUP)) {
-            String processedBaseName = (currSchema.fTargetNamespace == null)?
-                                       ","+oldName:currSchema.fTargetNamespace+","+oldName;
-            int groupRefsCount = changeRedefineGroup(processedBaseName, componentType, newName, child, currSchema);
-            if (groupRefsCount > 1) {
-                // fRedefineSucceeded = false;
-                reportSchemaError("src-redefine.6.1.1", new Object []{new Integer(groupRefsCount)});
-            }
-            else if (groupRefsCount == 1) {
-//                return true;
-            }
-            else {
-                if (currSchema.fTargetNamespace == null)
-                    fRedefinedRestrictedGroupRegistry.put(processedBaseName, ","+newName);
-                else
-                    fRedefinedRestrictedGroupRegistry.put(processedBaseName, currSchema.fTargetNamespace+","+newName);
-            }
-        }
-        else {
-            // fRedefineSucceeded = false;
-            // REVISIT: Localize
-            reportGenericSchemaError("internal Xerces error; please submit a bug with schema as testcase");
-        }
-        // if we get here then we must have reported an error and failed somewhere...
-//        return false;
-    } // renameRedefiningComponents(XSDocumentInfo, Element, String, String, String):void
-
-    // this method takes a name of the form a:b, determines the URI mapped
-    // to by a in the current SchemaNamespaceSupport object, and returns this
-    // information in the form (nsURI,b) suitable for lookups in the global
-    // decl Hashtables.
-    // REVISIT: should have it return QName, instead of String. this would
-    //          save lots of string concatenation time. we can use
-    //          QName#equals() to compare two QNames, and use QName directly
-    //          as a key to the SymbolHash.
-    //          And when the DV's are ready to return compiled values from
-    //          validate() method, we should just call QNameDV.validate()
-    //          in this method.
-    private String findQName(String name, XSDocumentInfo schemaDoc) {
-        SchemaNamespaceSupport currNSMap = schemaDoc.fNamespaceSupport;
-        int colonPtr = name.indexOf(':');
-        String prefix = EMPTY_STRING;
-        if (colonPtr > 0)
-            prefix = name.substring(0, colonPtr);
-        String uri = currNSMap.getURI(fSymbolTable.addSymbol(prefix));
-        String localpart = (colonPtr == 0)?name:name.substring(colonPtr+1);
-        if (prefix == this.EMPTY_STRING && uri == null && schemaDoc.fIsChameleonSchema)
-            uri = schemaDoc.fTargetNamespace;
-        if (uri == null)
-            return ","+localpart;
-        return uri+","+localpart;
-    } // findQName(String, XSDocumentInfo):  String
-
-    // This function looks among the children of curr for an element of type elementSought.
-    // If it finds one, it evaluates whether its ref attribute contains a reference
-    // to originalQName.  If it does, it returns 1 + the value returned by
-    // calls to itself on all other children.  In all other cases it returns 0 plus
-    // the sum of the values returned by calls to itself on curr's children.
-    // It also resets the value of ref so that it will refer to the renamed type from the schema
-    // being redefined.
-    private int changeRedefineGroup(String originalQName, String elementSought,
-                                    String newName, Element curr, XSDocumentInfo schemaDoc) {
-        SchemaNamespaceSupport currNSMap = schemaDoc.fNamespaceSupport;
-        int result = 0;
-        for (Element child = DOMUtil.getFirstChildElement(curr);
-            child != null; child = DOMUtil.getNextSiblingElement(child)) {
-            String name = child.getLocalName();
-            if (!name.equals(elementSought))
-                result += changeRedefineGroup(originalQName, elementSought, newName, child, schemaDoc);
-            else {
-                String ref = child.getAttribute( SchemaSymbols.ATT_REF );
-                if (ref.length() != 0) {
-                    String processedRef = findQName(ref, schemaDoc);
-                    if (originalQName.equals(processedRef)) {
-                        String prefix = EMPTY_STRING;
-                        String localpart = ref;
-                        int colonptr = ref.indexOf(":");
-                        if (colonptr > 0) {
-                            prefix = ref.substring(0,colonptr);
-                            child.setAttribute(SchemaSymbols.ATT_REF, prefix + ":" + newName);
-                        }
-                        else
-                            child.setAttribute(SchemaSymbols.ATT_REF, newName);
-                        result++;
-                        if (elementSought.equals(SchemaSymbols.ELT_GROUP)) {
-                            String minOccurs = child.getAttribute( SchemaSymbols.ATT_MINOCCURS );
-                            String maxOccurs = child.getAttribute( SchemaSymbols.ATT_MAXOCCURS );
-                            if (!((maxOccurs.length() == 0 || maxOccurs.equals("1"))
-                                  && (minOccurs.length() == 0 || minOccurs.equals("1")))) {
-                                reportSchemaError("src-redefine.6.1.2", new Object [] {ref});
-                            }
-                        }
-                    }
-                } // if ref was null some other stage of processing will flag the error
-            }
-        }
-        return result;
-    } // changeRedefineGroup
-
-    // this method returns the XSDocumentInfo object that contains the
-    // component corresponding to decl.  If components from this
-    // document cannot be referred to from those of currSchema, this
-    // method returns null; it's up to the caller to throw an error.
-    // @param:  currSchema:  the XSDocumentInfo object containing the
-    // decl ref'ing us.
-    // @param:  decl:  the declaration being ref'd.
-    private XSDocumentInfo findXSDocumentForDecl(XSDocumentInfo currSchema,
-                                                 Element decl) {
-        Document declDoc = DOMUtil.getDocument(decl);
-        Object temp = fDoc2XSDocumentMap.get(declDoc);
-        if (temp == null) {
-            // something went badly wrong; we don't know this doc?
-            return null;
-        }
-        XSDocumentInfo declDocInfo = (XSDocumentInfo)temp;
-        return declDocInfo;
-        /*********
-        Logic here is unnecessary after schema WG's recent decision to allow
-        schema components from one document to refer to components of any other,
-        so long as there's some include/import/redefine path amongst them.
-        If they rver reverse this decision the code's right here though...  - neilg
-        // now look in fDependencyMap to see if this is reachable
-        if(((Vector)fDependencyMap.get(currSchema)).contains(declDocInfo)) {
-            return declDocInfo;
-        }
-        // obviously the requesting doc didn't include, redefine or
-        // import the one containing decl...
-        return null;
-        **********/
-    } // findXSDocumentForDecl(XSDocumentInfo, Element):  XSDocumentInfo
-
-    // returns whether more than <annotation>s occur in children of elem
-    private boolean nonAnnotationContent(Element elem) {
-        for(Element child = DOMUtil.getFirstChildElement(elem); child != null; child = DOMUtil.getNextSiblingElement(child)) {
-            if(!(DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION))) return true;
-        }
-        return false;
-    } // nonAnnotationContent(Element):  boolean
-
-    private void setSchemasVisible(XSDocumentInfo startSchema) {
-        if (DOMUtil.isHidden(startSchema.fSchemaDoc)) {
-            // make it visible
-            DOMUtil.setVisible(startSchema.fSchemaDoc);
-            Vector dependingSchemas = (Vector)fDependencyMap.get(startSchema);
-            for (int i = 0; i < dependingSchemas.size(); i++) {
-                setSchemasVisible((XSDocumentInfo)dependingSchemas.elementAt(i));
-            }
-        }
-        // if it's visible already than so must be its children
-    } // setSchemasVisible(XSDocumentInfo): void
-
-    // report schema error
-    void reportSchemaError (String key, Object[] args) {
-        fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                   key, args,
-                                   XMLErrorReporter.SEVERITY_ERROR);
-    }
-
-    // REVISIT: is it how we want to handle error reporting?
-    void reportGenericSchemaError (String error) {
-        fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                   "General",
-                                   new Object[]{error},
-                                   XMLErrorReporter.SEVERITY_ERROR);
-    }
-
-} // XSDHandler
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDKeyrefTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDKeyrefTraverser.java
deleted file mode 100644
index 7dfc350..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDKeyrefTraverser.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.xni.QName;
-import org.w3c.dom.Element;
-import org.apache.xerces.impl.xs.identity.*;
-import org.apache.xerces.impl.xpath.*;
-
-/**
- * This class contains code that is used to traverse <keyref>s.
- *
- * @author Neil Graham, IBM
- * @version $Id$
- */
-class XSDKeyrefTraverser extends XSDAbstractIDConstraintTraverser {
-
-    public XSDKeyrefTraverser (XSDHandler handler,
-                                  XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-    void traverse(Element krElem, XSElementDecl element,
-            XSDocumentInfo schemaDoc, SchemaGrammar grammar) {
-
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(krElem, false, schemaDoc);
-
-        // create identity constraint
-        String krName = (String)attrValues[XSAttributeChecker.ATTIDX_NAME];
-        if(krName == null){
-            reportSchemaError("s4s-att-must-appear", new Object [] {SchemaSymbols.ELT_KEYREF , SchemaSymbols.ATT_NAME });
-            //return this array back to pool
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-            return;
-        }
-        QName kName = (QName)attrValues[XSAttributeChecker.ATTIDX_REFER];
-        if(kName == null){
-            reportSchemaError("s4s-att-must-appear", new Object [] {SchemaSymbols.ELT_KEYREF , SchemaSymbols.ATT_REFER });
-            //return this array back to pool
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-            return;
-        }
-
-        UniqueOrKey key = null;
-        IdentityConstraint ret = (IdentityConstraint)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.IDENTITYCONSTRAINT_TYPE, kName);
-        // if ret == null, we've already reported an error in getGlobalDecl
-        // we report an error only when ret != null, and the return type keyref
-        if (ret != null) {
-            if (ret.getType() == IdentityConstraint.KEY ||
-                ret.getType() == IdentityConstraint.UNIQUE) {
-                key = (UniqueOrKey)ret;
-            } else {
-                reportSchemaError("src-resolve", new Object[]{kName.rawname, "identity constraint key/unique"});
-            }
-        }
-
-        if(key == null) {
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-            return;
-        }
-
-        KeyRef keyRef = new KeyRef(krName, element.fName, key);
-
-        // add to element decl
-        traverseIdentityConstraint(keyRef, krElem, schemaDoc, attrValues);
-
-        //Schema Component Constraint: Identity-constraint Definition Properties Correct
-        //2 If the {identity-constraint category} is keyref, the cardinality of the {fields} must equal that of the {fields} of the {referenced key}.
-        if(key.getFieldCount() != keyRef.getFieldCount()) {
-            reportSchemaError("c-props-correct.2" , new Object [] {krName,key.getIdentityConstraintName()});
-        } else {
-            // add key reference to element decl
-            // and stuff this in the grammar
-            grammar.addIDConstraintDecl(element, keyRef);
-        }
-
-        // and put back attributes
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-    } // traverse(Element,int,XSDocumentInfo, SchemaGrammar)
-} // XSDKeyrefTraverser
-
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDNotationTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDNotationTraverser.java
deleted file mode 100644
index 8ca6237..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDNotationTraverser.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSNotationDecl;
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.w3c.dom.Element;
-import org.apache.xerces.util.DOMUtil;
-
-/**
- * The notation declaration schema component traverser.
- *
- * <notation
- *   id = ID
- *   name = NCName
- *   public = anyURI
- *   system = anyURI
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?)
- * </notation>
- *
- * @author Rahul Srivastava, Sun Microsystems Inc.
- * @author Elena Litani, IBM
- * @version $Id$
- */
-class  XSDNotationTraverser extends XSDAbstractTraverser {
-
-    XSDNotationTraverser (XSDHandler handler,
-                          XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-    XSNotationDecl traverse(Element elmNode,
-                            XSDocumentInfo schemaDoc,
-                            SchemaGrammar grammar) {
-
-        // General Attribute Checking for elmNode
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, true, schemaDoc);
-        //get attributes
-        String  nameAttr   = (String) attrValues[XSAttributeChecker.ATTIDX_NAME];
-
-        String  publicAttr = (String) attrValues[XSAttributeChecker.ATTIDX_PUBLIC];
-        String  systemAttr = (String) attrValues[XSAttributeChecker.ATTIDX_SYSTEM];
-        if (nameAttr == null) {
-            reportGenericSchemaError("<notation> must have a name");
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-            return null;
-        }
-
-        if (publicAttr == null) {
-            reportGenericSchemaError("<notation> must have 'public' attribute");
-        }
-
-        XSNotationDecl notation = new XSNotationDecl();
-        notation.fName = nameAttr;
-        notation.fTargetNamespace = schemaDoc.fTargetNamespace;
-        notation.fPublicId = publicAttr;
-        notation.fSystemId = systemAttr;
-
-        //check content
-        Element content = DOMUtil.getFirstChildElement(elmNode);
-
-        if (content != null) {
-            // traverse annotation if any
-            if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(content, attrValues, false, schemaDoc);
-                content = DOMUtil.getNextSiblingElement(content);
-            }
-        }
-        if (content!=null){
-             Object[] args = new Object [] { DOMUtil.getLocalName(content) };
-             fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                           "NotationContentRestricted",
-                                           args,
-                                           XMLErrorReporter.SEVERITY_ERROR);
-
-        }
-        grammar.addGlobalNotationDecl(notation);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return notation;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java
deleted file mode 100644
index cb93f47..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.dv.SchemaDVFactory;
-import org.apache.xerces.impl.dv.XSSimpleType;
-import org.apache.xerces.impl.dv.XSUnionSimpleType;
-import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
-import org.apache.xerces.impl.dv.XSFacets;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSTypeDecl;
-
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.impl.xs.util.XIntPool;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.util.NamespaceSupport;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-import java.lang.reflect.*;
-import java.util.Hashtable;
-import java.util.Vector;
-import java.util.StringTokenizer;
-
-/**
- * The simple type definition schema component traverser.
- *
- * <simpleType
- *   final = (#all | (list | union | restriction))
- *   id = ID
- *   name = NCName
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, (restriction | list | union))
- * </simpleType>
- *
- * <restriction
- *   base = QName
- *   id = ID
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*))
- * </restriction>
- *
- * <list
- *   id = ID
- *   itemType = QName
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, (simpleType?))
- * </list>
- *
- * <union
- *   id = ID
- *   memberTypes = List of QName
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?, (simpleType*))
- * </union>
- *
- * @author Elena Litani, IBM
- * @author Neeraj Bajaj, Sun Microsystems, Inc.
- * @version $Id$
- */
-class XSDSimpleTypeTraverser extends XSDAbstractTraverser {
-
-    //private data
-    private String fListName = "";
-
-    private int fSimpleTypeAnonCount = 0;
-    private final QName fQName = new QName();
-    private final SchemaDVFactory schemaFactory = SchemaDVFactory.getInstance();
-
-    XSDSimpleTypeTraverser (XSDHandler handler,
-                            XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-    //return qualified name of simpleType or empty string if error occured
-    XSSimpleType traverseGlobal(Element elmNode,
-                                     XSDocumentInfo schemaDoc,
-                                     SchemaGrammar grammar) {
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, true, schemaDoc);
-        String nameAtt = (String)attrValues[XSAttributeChecker.ATTIDX_NAME];
-        XSSimpleType type = traverseSimpleTypeDecl(elmNode, attrValues, schemaDoc, grammar, true);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        if (nameAtt == null)
-            reportSchemaError("s4s-att-must-appear", new Object[]{SchemaSymbols.ELT_SIMPLETYPE, SchemaSymbols.ATT_NAME});
-
-        return type;
-    }
-
-    XSSimpleType traverseLocal(Element elmNode,
-                                    XSDocumentInfo schemaDoc,
-                                    SchemaGrammar grammar) {
-
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc);
-        XSSimpleType type = traverseSimpleTypeDecl (elmNode, attrValues, schemaDoc, grammar, false);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return type;
-    }
-
-    private XSSimpleType traverseSimpleTypeDecl(Element simpleTypeDecl, Object[] attrValues,
-                                                XSDocumentInfo schemaDoc,
-                                                SchemaGrammar grammar, boolean isGlobal) {
-
-        String nameProperty  = (String)attrValues[XSAttributeChecker.ATTIDX_NAME];
-        String qualifiedName = nameProperty;
-
-        //---------------------------------------------------
-        // set qualified name
-        //---------------------------------------------------
-        if (nameProperty == null) { // anonymous simpleType
-            qualifiedName = schemaDoc.fTargetNamespace == null?
-                ",#s#"+(fSimpleTypeAnonCount++):
-                schemaDoc.fTargetNamespace+",#S#"+(fSimpleTypeAnonCount++);
-            //REVISIT:
-            // add to symbol table?
-        }
-        else {
-            qualifiedName = schemaDoc.fTargetNamespace == null?
-                ","+nameProperty:
-                schemaDoc.fTargetNamespace+","+nameProperty;
-            //REVISIT:
-            // add to symbol table?
-
-        }
-
-        //----------------------------------------------------------
-        // REVISIT!
-        // update _final_ registry
-        //----------------------------------------------------------
-        XInt finalAttr = (XInt)attrValues[XSAttributeChecker.ATTIDX_FINAL];
-        int finalProperty = finalAttr == null ? schemaDoc.fFinalDefault : finalAttr.intValue();
-
-        //----------------------------------------------------------
-        //annotation?,(list|restriction|union)
-        //----------------------------------------------------------
-        Element content = DOMUtil.getFirstChildElement(simpleTypeDecl);
-        if (content != null) {
-            // traverse annotation if any
-            if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(content, attrValues, false, schemaDoc);
-                content = DOMUtil.getNextSiblingElement(content);
-            }
-        }
-
-        if (content == null) {
-            reportSchemaError("dt-simpleType", new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"});
-            return null;
-        }
-
-        // General Attribute Checking
-        Object[] contentAttrs = fAttrChecker.checkAttributes(content, false, schemaDoc);
-        // REVISIT: when to return the array
-        fAttrChecker.returnAttrArray(contentAttrs, schemaDoc);
-
-        //----------------------------------------------------------------------
-        //use content.getLocalName for the cases there "xsd:" is a prefix, ei. "xsd:list"
-        //----------------------------------------------------------------------
-        String varietyProperty =  DOMUtil.getLocalName(content);
-        QName baseTypeName = null;
-        Vector memberTypes = null;
-        Vector dTValidators = null;
-        int size = 0;
-        boolean list = false;
-        boolean union = false;
-        boolean restriction = false;
-        int numOfTypes = 0; //list/restriction = 1, union = "+"
-
-        if (varietyProperty.equals(SchemaSymbols.ELT_LIST)) { //traverse List
-            baseTypeName = (QName)contentAttrs[XSAttributeChecker.ATTIDX_ITEMTYPE];
-            list = true;
-            if (fListName.length() != 0) { // parent is <list> datatype
-                reportCosListOfAtomic(qualifiedName);
-                return null;
-            }
-            else {
-                fListName = qualifiedName;
-            }
-        }
-        else if (varietyProperty.equals(SchemaSymbols.ELT_RESTRICTION)) { //traverse Restriction
-            baseTypeName = (QName)contentAttrs[XSAttributeChecker.ATTIDX_BASE];
-            //content.getAttribute( SchemaSymbols.ATT_BASE );
-            restriction= true;
-        }
-        else if (varietyProperty.equals(SchemaSymbols.ELT_UNION)) { //traverse union
-            union = true;
-            memberTypes = (Vector)contentAttrs[XSAttributeChecker.ATTIDX_MEMBERTYPES];
-            //content.getAttribute( SchemaSymbols.ATT_MEMBERTYPES);
-            if (memberTypes != null) {
-                size = memberTypes.size();
-            }
-            else {
-                size = 1; //at least one must be seen as <simpleType> decl
-            }
-            dTValidators = new Vector (size, 2);
-        }
-        else {
-            Object[] args = { varietyProperty};
-            reportSchemaError("dt-unsupported-derivation", args);
-        }
-        if (DOMUtil.getNextSiblingElement(content) != null) {
-            reportSchemaError("dt-simpleType", new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"});
-        }
-
-        XSSimpleType baseValidator = null;
-        if (baseTypeName == null && memberTypes == null) {
-            //---------------------------
-            //must 'see' <simpleType>
-            //---------------------------
-
-            //content = {annotation?,simpleType?...}
-            content = DOMUtil.getFirstChildElement(content);
-
-            //check content (annotation?, ...)
-            if (content != null) {
-                // traverse annotation if any
-                if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    traverseAnnotationDecl(content, attrValues, false, schemaDoc);
-                    content = DOMUtil.getNextSiblingElement(content);
-                }
-            }
-            if (content == null) {
-                reportSchemaError("dt-simpleType", new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"});
-                return null;
-            }
-            if (DOMUtil.getLocalName(content).equals( SchemaSymbols.ELT_SIMPLETYPE )) {
-                baseValidator = traverseLocal(content, schemaDoc, grammar);
-                if (baseValidator != null && union) {
-                    if (baseValidator.getVariety() == XSSimpleType.VARIETY_UNION) {
-                        XSSimpleType[] types = ((XSUnionSimpleType)baseValidator).getMemberTypes();
-                        for (int i = 0; i < types.length; i++)
-                            dTValidators.addElement(types[i]);
-                    } else {
-                        dTValidators.addElement(baseValidator);
-                    }
-                }
-                if (baseValidator == null) {
-                    Object[] args = {content.getAttribute( SchemaSymbols.ATT_BASE )};
-                    reportSchemaError("dt-unknown-basetype", args);
-                    return SchemaGrammar.fAnySimpleType;
-                }
-            }
-            else {
-                Object[] args = { simpleTypeDecl.getAttribute( SchemaSymbols.ATT_NAME )};
-                reportSchemaError("dt-simpleType",new Object[]{SchemaSymbols.ELT_SIMPLETYPE, nameProperty, "(annotation?, (restriction | list | union))"});
-                return SchemaGrammar.fAnySimpleType;
-            }
-        }
-        else {
-            //-----------------------------
-            //base was provided - get proper validator.
-            //-----------------------------
-            numOfTypes = 1;
-            if (union) {
-                numOfTypes= size;
-            }
-            //--------------------------------------------------------------------
-            // this loop is also where we need to find out whether the type being used as
-            // a base (or itemType or whatever) allows such things.
-            //--------------------------------------------------------------------
-            short baseRefContext = restriction ? SchemaSymbols.RESTRICTION :
-                                   (union ? SchemaSymbols.UNION : SchemaSymbols.LIST);
-            for (int i=0; i<numOfTypes; i++) {  //find all validators
-                if (union) {
-                    baseTypeName = (QName)memberTypes.elementAt(i);
-                }
-                baseValidator = findDTValidator ( simpleTypeDecl, baseTypeName, baseRefContext, schemaDoc);
-                if (baseValidator == null) {
-                    Object[] args = { content.getAttribute( SchemaSymbols.ATT_BASE ), nameProperty};
-                    reportSchemaError("dt-unknown-basetype", args);
-                    baseValidator = SchemaGrammar.fAnySimpleType;
-                }
-                // ------------------------------
-                // (variety is list)cos-list-of-atomic
-                // ------------------------------
-                if (fListName.length() != 0) {
-                    if (baseValidator.getVariety() == XSSimpleType.VARIETY_LIST) {
-                        reportCosListOfAtomic(qualifiedName);
-                        return null;
-                    }
-                    //-----------------------------------------------------
-                    // if baseValidator is of type (union) need to look
-                    // at Union validators to make sure that List is not one of them
-                    //-----------------------------------------------------
-                    if (isListDatatype(baseValidator)) {
-                        reportCosListOfAtomic(qualifiedName);
-                        return null;
-
-                    }
-
-                }
-                if (union) {
-                    if (baseValidator.getVariety() == XSSimpleType.VARIETY_UNION) {
-                        XSSimpleType[] types = ((XSUnionSimpleType)baseValidator).getMemberTypes();
-                        for (int j = 0; j < types.length; j++)
-                            dTValidators.addElement(types[j]);
-                    } else {
-                        dTValidators.addElement(baseValidator);
-                    }
-                }
-            }
-        } //end - base is available
-
-        // ------------------------------------------
-        // move to next child
-        // <base==empty)->[simpleType]->[facets]  OR
-        // <base!=empty)->[facets]
-        // ------------------------------------------
-        if (baseTypeName == null) {
-            content = DOMUtil.getNextSiblingElement( content );
-        }
-        else {
-            content = DOMUtil.getFirstChildElement(content);
-            if (content != null) {
-                // traverse annotation if any
-                if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    traverseAnnotationDecl(content, attrValues, false, schemaDoc);
-                    content = DOMUtil.getNextSiblingElement(content);
-                }
-            }
-        }
-
-        // ------------------------------------------
-        //get more types for union if any
-        // ------------------------------------------
-        if (union) {
-            if (memberTypes != null) {
-                if (content != null) {
-                    // traverse annotation if any
-                    if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                        traverseAnnotationDecl(content, attrValues, false, schemaDoc);
-                        content = DOMUtil.getNextSiblingElement(content);
-                    }
-                }
-                if (content !=null) {
-                    if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                        Object[] args = {nameProperty};
-                        reportSchemaError("dt-union-memberType", args);
-                    }
-                }
-            }
-            while (content!=null) {
-                baseValidator = traverseLocal(content, schemaDoc, grammar);
-                if (baseValidator != null) {
-                    if (fListName.length() != 0 && baseValidator.getVariety() == XSSimpleType.VARIETY_LIST) {
-                        reportCosListOfAtomic(qualifiedName);
-                        return null;
-                    }
-                    if (baseValidator.getVariety() == XSSimpleType.VARIETY_UNION) {
-                        XSSimpleType[] types = ((XSUnionSimpleType)baseValidator).getMemberTypes();
-                        for (int i = 0; i < types.length; i++)
-                            dTValidators.addElement(types[i]);
-                    } else {
-                        dTValidators.addElement(baseValidator);
-                    }
-                }
-                if (baseValidator == null) {
-                    Object[] args = { content.getAttribute( SchemaSymbols.ATT_BASE ), nameProperty};
-                    reportSchemaError("dt-unknown-basetype", args);
-                    baseValidator = SchemaGrammar.fAnySimpleType;
-                }
-                content   = DOMUtil.getNextSiblingElement( content );
-            }
-        } // end - traverse Union
-
-        if (fListName.length() != 0) {
-            // reset fListName, meaning that we are done with
-            // traversing <list> and its itemType resolves to atomic value
-            if (fListName.equals(qualifiedName)) {
-                fListName = SchemaSymbols.EMPTY_STRING;
-            }
-        }
-
-        XSFacets facetData = null;
-        short presentFacets = 0;
-        short fixedFacets = 0 ;
-
-        if (restriction && content != null) { //we are on the facets now..
-            FacetInfo fi = traverseFacets(content, contentAttrs,nameProperty, baseValidator, schemaDoc, grammar);
-            content = fi.nodeAfterFacets;
-            if (content != null) {
-                content = null;
-                reportSchemaError("s4s-elt-must-match", new Object[]{SchemaSymbols.ELT_RESTRICTION, "(annotation?, (simpleType?, (minExclusive | minInclusive | maxExclusive | maxInclusive | totalDigits | fractionDigits | length | minLength | maxLength | enumeration | whiteSpace | pattern)*))"});
-            }
-            facetData = fi.facetdata ;
-            presentFacets = fi.fPresentFacets;
-            fixedFacets = fi.fFixedFacets;
-        }
-        else if (list && content!=null) {
-            // report error - must not have any children!
-            if (baseTypeName !=null) {
-                // traverse annotation if any
-                if (DOMUtil.getLocalName(content).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                    traverseAnnotationDecl(content, attrValues, false, schemaDoc);
-                    content = DOMUtil.getNextSiblingElement(content);
-                }
-                if (content !=null) {
-                    Object[] args = {nameProperty};
-                    reportSchemaError("dt-list-itemType", args);
-                }
-            }
-            else {
-                reportSchemaError("s4s-elt-must-match", new Object[]{SchemaSymbols.ELT_LIST, "(annotation?, (simpleType?))"});
-            }
-        }
-        else if (union && content!=null) {
-            //report error - must not have any children!
-            reportSchemaError("s4s-elt-must-match", new Object[]{SchemaSymbols.ELT_UNION, "(annotation?, (simpleType?))"});
-        }
-
-        XSSimpleType newDecl = null;
-        if (list) {
-            newDecl = schemaFactory.createTypeList(nameProperty, schemaDoc.fTargetNamespace, (short)finalProperty, baseValidator);
-        }
-        else if (restriction) {
-            newDecl = schemaFactory.createTypeRestriction(nameProperty, schemaDoc.fTargetNamespace, (short)finalProperty, baseValidator);
-            try {
-                fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
-                newDecl.applyFacets(facetData , presentFacets , fixedFacets, fValidationState);
-            } catch (InvalidDatatypeFacetException ex) {
-                reportGenericSchemaError("facet error when creating type '" + qualifiedName + "': " + ex.getLocalizedMessage());
-            }
-        }
-        else { //union
-            XSSimpleType[] memberDecls = new XSSimpleType[dTValidators.size()];
-            for (int i = 0; i < dTValidators.size(); i++)
-                memberDecls[i] = (XSSimpleType)dTValidators.elementAt(i);
-            newDecl = schemaFactory.createTypeUnion(nameProperty, schemaDoc.fTargetNamespace, (short)finalProperty, memberDecls);
-        }
-
-        // if it's a global type without a name, return null
-        if (nameProperty == null && isGlobal) {
-            return null;
-        }
-
-        // don't add global components without name to the grammar
-        if (newDecl != null && isGlobal) {
-            grammar.addGlobalTypeDecl(newDecl);
-        }
-
-        return newDecl;
-    }
-
-    private void reportCosListOfAtomic (String qualifiedName) {
-        fListName = "";
-        reportSchemaError("cos-list-of-atomic", new Object[]{qualifiedName});
-    }
-
-    //@param: elm - top element
-    //@param: baseTypeStr - type (base/itemType/memberTypes)
-    //@param: baseRefContext:  whether the caller is using this type as a base for restriction, union or list
-    //return XSSimpleType available for the baseTypeStr, null if not found or disallowed.
-    // also throws an error if the base type won't allow itself to be used in this context.
-    // REVISIT: can this code be re-used?
-    private XSSimpleType findDTValidator (Element elm, QName baseTypeStr, short baseRefContext, XSDocumentInfo schemaDoc) {
-        if(baseTypeStr == null)
-            return null;
-
-        if (baseTypeStr.uri != null && baseTypeStr.uri.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) &&
-            (baseTypeStr.localpart.equals(SchemaSymbols.ATTVAL_ANYSIMPLETYPE) ||
-             baseTypeStr.localpart.equals(SchemaSymbols.ATTVAL_ANYTYPE)) &&
-            baseRefContext == SchemaSymbols.RESTRICTION) {
-            reportSchemaError("dt-unknown-basetype", new Object[] {
-                                       DOMUtil.getAttrValue(elm, SchemaSymbols.ATT_NAME), DOMUtil.getAttrValue(elm, SchemaSymbols.ATT_BASE)});
-            return SchemaGrammar.fAnySimpleType;
-        }
-
-        XSTypeDecl baseType = (XSTypeDecl)fSchemaHandler.getGlobalDecl(schemaDoc, fSchemaHandler.TYPEDECL_TYPE, baseTypeStr);
-        if (baseType != null) {
-            if (baseType.getXSType() != XSTypeDecl.SIMPLE_TYPE) {
-                reportSchemaError("st-props-correct.4.1", new Object[] { baseTypeStr.rawname} );
-                return SchemaGrammar.fAnySimpleType;
-            }
-            if ((baseType.getFinalSet() & baseRefContext) != 0) {
-                reportSchemaError("dt-restiction-final", new Object[] { baseTypeStr.rawname} );
-            }
-        }
-
-        return (XSSimpleType)baseType;
-    }
-
-    // find if union datatype validator has list datatype member.
-    private boolean isListDatatype(XSSimpleType validator) {
-        if (validator.getVariety() == XSSimpleType.VARIETY_LIST)
-            return true;
-
-        if (validator.getVariety() == XSSimpleType.VARIETY_UNION) {
-            XSSimpleType[] temp = ((XSUnionSimpleType)validator).getMemberTypes();
-            for (int i = 0; i < temp.length; i++) {
-                if (temp[i].getVariety() == XSSimpleType.VARIETY_LIST) {
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }//isListDatatype(XSSimpleTypeDecl):boolean
-
-}//class XSDSimpleTypeTraverser
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDUniqueOrKeyTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDUniqueOrKeyTraverser.java
deleted file mode 100644
index 78e133e..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDUniqueOrKeyTraverser.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import  org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSElementDecl;
-import  org.apache.xerces.util.DOMUtil;
-import  org.w3c.dom.Element;
-import org.apache.xerces.impl.xs.identity.*;
-import org.apache.xerces.impl.xpath.*;
-
-/**
- * This class contains code that is used to traverse both <key>s and
- * <unique>s.
- *
- * @author Neil Graham, IBM
- * @version $Id$
- */
-class XSDUniqueOrKeyTraverser extends XSDAbstractIDConstraintTraverser {
-
-    public XSDUniqueOrKeyTraverser (XSDHandler handler,
-                                  XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-
-    void traverse(Element uElem, XSElementDecl element,
-            XSDocumentInfo schemaDoc, SchemaGrammar grammar) {
-
-        // General Attribute Checking
-        Object[] attrValues = fAttrChecker.checkAttributes(uElem, false, schemaDoc);
-
-        // create identity constraint
-        String uName = (String)attrValues[XSAttributeChecker.ATTIDX_NAME];
-
-        if(uName == null){
-            reportSchemaError("s4s-att-must-appear", new Object [] {DOMUtil.getLocalName(uElem) , SchemaSymbols.ATT_NAME });
-            //return this array back to pool
-            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-            return;
-        }
-
-        UniqueOrKey uniqueOrKey = null;
-        if(DOMUtil.getLocalName(uElem).equals(SchemaSymbols.ELT_UNIQUE)) {
-            uniqueOrKey = new UniqueOrKey(uName, element.fName, IdentityConstraint.UNIQUE);
-        } else {
-            uniqueOrKey = new UniqueOrKey(uName, element.fName, IdentityConstraint.KEY);
-        }
-        // it's XSDElementTraverser's job to ensure that there's no
-        // duplication (or if there is that restriction is involved
-        // and there's identity).
-
-        // get selector and fields
-        traverseIdentityConstraint(uniqueOrKey, uElem, schemaDoc, attrValues);
-
-        // and stuff this in the grammar
-        grammar.addIDConstraintDecl(element, uniqueOrKey);
-
-        // and fix up attributeChecker
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-    } // traverse(Element,XSDElementDecl,XSDocumentInfo, SchemaGrammar)
-} // XSDUniqueOrKeyTraverser
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDWildcardTraverser.java b/src/org/apache/xerces/impl/xs/traversers/XSDWildcardTraverser.java
deleted file mode 100644
index 6e3c5af..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDWildcardTraverser.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.XSWildcardDecl;
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.apache.xerces.impl.xs.XSParticleDecl;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.w3c.dom.Element;
-import java.util.StringTokenizer;
-
-/**
- * The wildcard schema component traverser.
- *
- * <any
- *   id = ID
- *   maxOccurs = (nonNegativeInteger | unbounded)  : 1
- *   minOccurs = nonNegativeInteger : 1
- *   namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )  : ##any
- *   processContents = (lax | skip | strict) : strict
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?)
- * </any>
- *
- * <anyAttribute
- *   id = ID
- *   namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )  : ##any
- *   processContents = (lax | skip | strict) : strict
- *   {any attributes with non-schema namespace . . .}>
- *   Content: (annotation?)
- * </anyAttribute>
- *
- * @author Rahul Srivastava, Sun Microsystems Inc.
- * @author Sandy Gao, IBM
- *
- * @version $Id$
- */
-class XSDWildcardTraverser extends XSDAbstractTraverser {
-
-    /**
-     * constructor
-     *
-     * @param  handler
-     * @param  errorReporter
-     * @param  gAttrCheck
-     */
-    XSDWildcardTraverser (XSDHandler handler,
-                          XSAttributeChecker gAttrCheck) {
-        super(handler, gAttrCheck);
-    }
-
-
-    /**
-     * Traverse <any>
-     *
-     * @param  elmNode
-     * @param  schemaDoc
-     * @param  grammar
-     * @return the wildcard node index
-     */
-    XSParticleDecl traverseAny(Element elmNode,
-                               XSDocumentInfo schemaDoc,
-                               SchemaGrammar grammar) {
-
-        // General Attribute Checking for elmNode
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc);
-        XSWildcardDecl wildcard = traverseWildcardDecl(elmNode, attrValues, schemaDoc, grammar);
-
-        // for <any>, need to create a new particle to reflect the min/max values
-        XSParticleDecl particle = null;
-        if (wildcard != null) {
-            int min = ((XInt)attrValues[XSAttributeChecker.ATTIDX_MINOCCURS]).intValue();
-            int max = ((XInt)attrValues[XSAttributeChecker.ATTIDX_MAXOCCURS]).intValue();
-            if (max != 0) {
-                particle = new XSParticleDecl();
-                particle.fType = XSParticleDecl.PARTICLE_WILDCARD;
-                particle.fValue = wildcard;
-                particle.fMinOccurs = min;
-                particle.fMaxOccurs = max;
-            }
-        }
-
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return particle;
-    }
-
-
-    /**
-     * Traverse <anyAttribute>
-     *
-     * @param  elmNode
-     * @param  schemaDoc
-     * @param  grammar
-     * @return the wildcard node index
-     */
-    XSWildcardDecl traverseAnyAttribute(Element elmNode,
-                                        XSDocumentInfo schemaDoc,
-                                        SchemaGrammar grammar) {
-
-        // General Attribute Checking for elmNode
-        Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc);
-        XSWildcardDecl wildcard = traverseWildcardDecl(elmNode, attrValues, schemaDoc, grammar);
-        fAttrChecker.returnAttrArray(attrValues, schemaDoc);
-
-        return wildcard;
-    }
-
-
-    /**
-     *
-     * @param  elmNode
-     * @param  attrValues
-     * @param  schemaDoc
-     * @param  grammar
-     * @return the wildcard node index
-     */
-     XSWildcardDecl traverseWildcardDecl(Element elmNode,
-                                         Object[] attrValues,
-                                         XSDocumentInfo schemaDoc,
-                                         SchemaGrammar grammar) {
-
-        //get all attributes
-        XSWildcardDecl wildcard = (XSWildcardDecl) attrValues[XSAttributeChecker.ATTIDX_NAMESPACE];
-        XInt processContentsAttr = (XInt) attrValues[XSAttributeChecker.ATTIDX_PROCESSCONTENTS];
-
-        // process contents
-        wildcard.fProcessContents = processContentsAttr.shortValue();
-
-        //check content
-        Element child = DOMUtil.getFirstChildElement(elmNode);
-        if (child != null)
-        {
-            if (DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
-                traverseAnnotationDecl(child, attrValues, false, schemaDoc);
-                child = DOMUtil.getNextSiblingElement(child);
-            }
-
-            if (child != null) {
-                fErrorReporter.reportError(XSMessageFormatter.SCHEMA_DOMAIN,
-                                           "s4s-elt-must-match",
-                                           new Object[]{"wildcard", "(annotation?)"},
-                                           XMLErrorReporter.SEVERITY_ERROR);
-            }
-        }
-
-        return wildcard;
-
-    } // traverseWildcardDecl
-
-} // XSDWildcardTraverser
diff --git a/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java b/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
deleted file mode 100644
index 5be260e..0000000
--- a/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.traversers;
-
-import org.apache.xerces.impl.xs.SchemaNamespaceSupport;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.validation.ValidationState;
-import org.apache.xerces.util.DOMUtil;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.impl.xs.util.XInt;
-import org.apache.xerces.impl.xs.util.XIntPool;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import java.util.Hashtable;
-import java.util.Stack;
-
-/*
- * Objects of this class hold all information pecular to a
- * particular XML Schema document.  This is needed because
- * namespace bindings and other settings on the <schema/> element
- * affect the contents of that schema document alone.
- *
- * @author Neil Graham, IBM
- * @version $Id$
- */
-class XSDocumentInfo {
-
-    // Data
-    protected SchemaNamespaceSupport fNamespaceSupport;
-    protected SchemaNamespaceSupport fNamespaceSupportRoot;
-    protected Stack SchemaNamespaceSupportStack = new Stack();
-
-    // schema's attributeFormDefault
-    protected boolean fAreLocalAttributesQualified;
-
-    // elementFormDefault
-    protected boolean fAreLocalElementsQualified;
-
-    // [block | final]Default
-    protected short fBlockDefault;
-    protected short fFinalDefault;
-
-    // targetNamespace
-    protected String fTargetNamespace;
-
-    // represents whether this is a chameleon schema (i.e., whether its TNS is natural or comes from without)
-    protected boolean fIsChameleonSchema;
-
-    // the root of the schema Document tree itself
-    protected Document fSchemaDoc;
-
-    protected ValidationState fValidationContext = new ValidationState();
-
-    SymbolTable fSymbolTable = null;
-
-    XSDocumentInfo (Document schemaDoc, XSAttributeChecker attrChecker, SymbolTable symbolTable) {
-        fSchemaDoc = schemaDoc;
-        fNamespaceSupport = new SchemaNamespaceSupport();
-        fIsChameleonSchema = false;
-        
-        fSymbolTable = symbolTable;
-        // During XML Schema traversal bind "xml" prefix to 
-        // "http://www.w3.org/XML/1998/namespace"
-        // per Namespace Constraint: Prefix Declared (Namespaces in XML REC)
-        fNamespaceSupport.declarePrefix(symbolTable.addSymbol("xml"), symbolTable.addSymbol("http://www.w3.org/XML/1998/namespace"));
-
-        if(schemaDoc != null) {
-            Element root = DOMUtil.getRoot(schemaDoc);
-            Object[] schemaAttrs = attrChecker.checkAttributes(root, true, this);
-            fAreLocalAttributesQualified =
-                ((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_AFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
-            fAreLocalElementsQualified =
-                ((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_EFORMDEFAULT]).intValue() == SchemaSymbols.FORM_QUALIFIED;
-            fBlockDefault =
-                ((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_BLOCKDEFAULT]).shortValue();
-            fFinalDefault =
-                ((XInt)schemaAttrs[XSAttributeChecker.ATTIDX_FINALDEFAULT]).shortValue();
-            fTargetNamespace =
-                (String)schemaAttrs[XSAttributeChecker.ATTIDX_TARGETNAMESPACE];
-            if(fTargetNamespace != null && fTargetNamespace.length() == 0)
-                fTargetNamespace = null;
-            if (fTargetNamespace != null)
-                fTargetNamespace = symbolTable.addSymbol(fTargetNamespace);
-
-            fNamespaceSupportRoot = new SchemaNamespaceSupport(fNamespaceSupport);
-
-            //set namespace support
-            fValidationContext.setNamespaceSupport(fNamespaceSupport);
-            fValidationContext.setSymbolTable(symbolTable);
-            // REVISIT: we can't return, becaues we can't pop fNamespaceSupport
-            //attrChecker.returnAttrArray(schemaAttrs, this);
-        }
-    }
-
-    void backupNSSupport() {
-        SchemaNamespaceSupportStack.push(fNamespaceSupport);
-        fNamespaceSupport = new SchemaNamespaceSupport(fNamespaceSupportRoot);
-
-        // bind "xml" prefix to "http://www.w3.org/XML/1998/namespace"
-        // per Namespace Constraint: Prefix Declared (Namespaces in XML REC)
-        fNamespaceSupport.declarePrefix(fSymbolTable.addSymbol("xml"), fSymbolTable.addSymbol("http://www.w3.org/XML/1998/namespace"));
-
-        fValidationContext.setNamespaceSupport(fNamespaceSupport);
-    }
-
-    void restoreNSSupport() {
-        fNamespaceSupport = (SchemaNamespaceSupport)SchemaNamespaceSupportStack.pop();
-        fValidationContext.setNamespaceSupport(fNamespaceSupport);
-    }
-
-    // some Object methods
-    public String toString() {
-        return fTargetNamespace == null?"no targetNamspace":"targetNamespace is " + fTargetNamespace;
-    }
-
-} // XSDocumentInfo
diff --git a/src/org/apache/xerces/impl/xs/util/Base64.java b/src/org/apache/xerces/impl/xs/util/Base64.java
deleted file mode 100644
index 55ae40d..0000000
--- a/src/org/apache/xerces/impl/xs/util/Base64.java
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.util;
-
-/**
- * This class provides encode/decode for RFC 2045 Base64 as
- * defined by RFC 2045, N. Freed and N. Borenstein.
- * RFC 2045: Multipurpose Internet Mail Extensions (MIME)
- * Part One: Format of Internet Message Bodies. Reference
- * 1996 Available at: http://www.ietf.org/rfc/rfc2045.txt
- * This class is used by XML Schema binary format validation
- * 
- * This implementation does not encode/decode streaming 
- * data. You need the data that you will encode/decode
- * already on a byte arrray.
- * 
- * @author Jeffrey Rodriguez
- * @author Sandy Gao
- * @version $Id$
- */
-public final class  Base64 {
-    static private final int  BASELENGTH         = 255;
-    static private final int  LOOKUPLENGTH       = 64;
-    static private final int  TWENTYFOURBITGROUP = 24;
-    static private final int  EIGHTBIT           = 8;
-    static private final int  SIXTEENBIT         = 16;
-    static private final int  SIXBIT             = 6;
-    static private final int  FOURBYTE           = 4;
-    static private final int  SIGN               = -128;
-    static private final byte PAD                = ( byte ) '=';
-    static private final boolean fDebug          = false;
-    static private byte [] base64Alphabet       = new byte[BASELENGTH];
-    static private byte [] lookUpBase64Alphabet = new byte[LOOKUPLENGTH];
-
-
-    static {
-
-        for (int i = 0; i<BASELENGTH; i++) {
-            base64Alphabet[i] = -1;
-        }
-        for (int i = 'Z'; i >= 'A'; i--) {
-            base64Alphabet[i] = (byte) (i-'A');
-        }
-        for (int i = 'z'; i>= 'a'; i--) {
-            base64Alphabet[i] = (byte) ( i-'a' + 26);
-        }
-
-        for (int i = '9'; i >= '0'; i--) {
-            base64Alphabet[i] = (byte) (i-'0' + 52);
-        }
-
-        base64Alphabet['+']  = 62;
-        base64Alphabet['/']  = 63;
-
-        for (int i = 0; i<=25; i++)
-            lookUpBase64Alphabet[i] = (byte) ('A'+i );
-
-        for (int i = 26,  j = 0; i<=51; i++, j++)
-            lookUpBase64Alphabet[i] = (byte) ('a'+ j );
-
-        for (int i = 52,  j = 0; i<=61; i++, j++)
-            lookUpBase64Alphabet[i] = (byte) ('0' + j );
-        lookUpBase64Alphabet[62] = (byte) '+';
-        lookUpBase64Alphabet[63] = (byte) '/';
-
-    }
-
-    protected static boolean isWhiteSpace (byte octect) {
-        return(octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9);
-    }
-
-    protected static boolean isPad (byte octect) {
-        return(octect == PAD);
-    }
-
-    protected static boolean isData (byte octect) {
-        return( base64Alphabet[octect] != -1);
-    }
-
-    public static boolean isBase64( String isValidString ) {
-        if (isValidString == null)
-            return false;
-        return( isArrayByteBase64( isValidString.getBytes()));
-    }
-
-
-    public static boolean isBase64( byte octect ) {
-        return( isWhiteSpace(octect) || isPad(octect) || isData(octect));
-    }
-
-
-    /**
-     * remove WhiteSpace from MIME containing encoded Base64
-     * data.
-     * e.g.
-     * "   sdffferererrereresfsdfsdfsdff\n\r
-     * iiiiiiiiierejrlkwjerklwjerwerwr==\n\r"
-     * 
-     * @param data
-     * @return byte array with whitespace removed
-     */
-    public static synchronized byte[] removeWhiteSpace( byte[] data ) {
-        if (data == null)
-            return null;
-
-        int newSize = 0;
-        int len     = data.length;
-        int i =0;
-        for (; i<len; i++) {
-            if (!isWhiteSpace( data[i] ))
-                newSize++;
-        }
-
-        if (newSize == len)
-            return data;//return input array since no whiteSpace
-
-
-        byte[] arrayWithoutSpaces = new byte[newSize];//Allocate new array without whiteSpace
-
-        int j = 0;
-        for (i=0;i<len;i++) {
-            if (isWhiteSpace( data[i] ))
-                continue;
-            else
-                arrayWithoutSpaces[j++] = data[i];//copy non-WhiteSpace 
-        }
-        return arrayWithoutSpaces;
-
-    }
-
-    public static synchronized boolean isArrayByteBase64( byte[] arrayOctect ) {
-        return(getDecodedDataLength(arrayOctect) >= 0);
-    }
-
-    /**
-     * Encodes hex octects into Base64
-     *
-     * @param binaryData Array containing binaryData
-     * @return Encoded Base64 array
-     */
-    public static synchronized byte[] encode( byte[] binaryData ) {
-        if (binaryData == null)
-            return null;
-
-        int      lengthDataBits    = binaryData.length*EIGHTBIT;
-        int      fewerThan24bits   = lengthDataBits%TWENTYFOURBITGROUP;
-        int      numberTriplets    = lengthDataBits/TWENTYFOURBITGROUP;
-        byte     encodedData[]     = null;
-
-
-        if (fewerThan24bits != 0) //data not divisible by 24 bit
-            encodedData = new byte[ (numberTriplets + 1 )*4  ];
-        else // 16 or 8 bit
-            encodedData = new byte[ numberTriplets*4 ];
-
-        byte k=0, l=0, b1=0,b2=0,b3=0;
-
-        int encodedIndex = 0;
-        int dataIndex   = 0;
-        int i           = 0;
-        if (fDebug) {
-            System.out.println("number of triplets = " + numberTriplets );
-        }
-        for (i = 0; i<numberTriplets; i++) {
-
-            dataIndex = i*3;
-            b1 = binaryData[dataIndex];
-            b2 = binaryData[dataIndex + 1];
-            b3 = binaryData[dataIndex + 2];
-
-            if (fDebug) {
-                System.out.println( "b1= " + b1 +", b2= " + b2 + ", b3= " + b3 );
-            }
-
-            l  = (byte)(b2 & 0x0f);
-            k  = (byte)(b1 & 0x03);
-
-            encodedIndex = i*4;
-            byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
-
-            byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
-            byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);
-
-            encodedData[encodedIndex]   = lookUpBase64Alphabet[ val1 ];
-            if (fDebug) {
-                System.out.println( "val2 = " + val2 );
-                System.out.println( "k4   = " + (k<<4));
-                System.out.println( "vak  = " + (val2 | (k<<4)));
-            }
-
-            encodedData[encodedIndex+1] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
-            encodedData[encodedIndex+2] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];
-            encodedData[encodedIndex+3] = lookUpBase64Alphabet[ b3 & 0x3f ];
-        }
-
-        // form integral number of 6-bit groups
-        dataIndex    = i*3;
-        encodedIndex = i*4;
-        if (fewerThan24bits == EIGHTBIT) {
-            b1 = binaryData[dataIndex];
-            k = (byte) ( b1 &0x03 );
-            if (fDebug) {
-                System.out.println("b1=" + b1);
-                System.out.println("b1<<2 = " + (b1>>2) );
-            }
-            byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
-            encodedData[encodedIndex]     = lookUpBase64Alphabet[ val1 ];
-            encodedData[encodedIndex + 1] = lookUpBase64Alphabet[ k<<4 ];
-            encodedData[encodedIndex + 2] = PAD;
-            encodedData[encodedIndex + 3] = PAD;
-        } else if (fewerThan24bits == SIXTEENBIT) {
-
-            b1 = binaryData[dataIndex];
-            b2 = binaryData[dataIndex +1 ];
-            l = ( byte ) ( b2 &0x0f );
-            k = ( byte ) ( b1 &0x03 );
-
-            byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);
-            byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);
-
-            encodedData[encodedIndex]     = lookUpBase64Alphabet[ val1 ];
-            encodedData[encodedIndex + 1] = lookUpBase64Alphabet[ val2 | ( k<<4 )];
-            encodedData[encodedIndex + 2] = lookUpBase64Alphabet[ l<<2 ];
-            encodedData[encodedIndex + 3] = PAD;
-        }
-        return encodedData;
-    }
-
-    /**
-     * Decodes Base64 data into octects
-     *
-     * @param binaryData Byte array containing Base64 data
-     * @return Array containind decoded data.
-     */
-    public static synchronized byte[] decode( byte[] base64Data ) {
-
-        if (base64Data == null)
-            return null;
-
-        byte[]   normalizedBase64Data = removeWhiteSpace( base64Data );
-
-        if (normalizedBase64Data.length%FOURBYTE != 0) {
-            return null;//should be divisible by four
-        }
-
-        int      numberQuadruple    = (normalizedBase64Data.length/FOURBYTE );
-
-        if (numberQuadruple == 0)
-            return new byte[0];
-
-        byte     decodedData[]      = null;
-        byte     b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0;
-        byte     d1=0,d2=0,d3=0,d4=0;
-
-
-
-        // Throw away anything not in normalizedBase64Data
-        // Adjust size
-        int i = 0;
-        int encodedIndex = 0;
-        int dataIndex    = 0;
-        decodedData      = new byte[ (numberQuadruple)*3];
-
-        for (; i<numberQuadruple-1; i++) {
-
-            if (!isData( (d1 = normalizedBase64Data[dataIndex++]) )||  
-                !isData( (d2 = normalizedBase64Data[dataIndex++]) )||
-                !isData( (d3 = normalizedBase64Data[dataIndex++]) )||
-                !isData( (d4 = normalizedBase64Data[dataIndex++]) ))
-                return null;//if found "no data" just return null
-
-            b1 = base64Alphabet[d1]; 
-            b2 = base64Alphabet[d2];
-            b3 = base64Alphabet[d3];
-            b4 = base64Alphabet[d4];
-
-            decodedData[encodedIndex++] = (byte)(  b1 <<2 | b2>>4 ) ;
-            decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
-            decodedData[encodedIndex++] = (byte)( b3<<6 | b4 ); 
-        }
-
-
-        if (!isData( (d1 = normalizedBase64Data[dataIndex++]) ) ||  
-            !isData( (d2 = normalizedBase64Data[dataIndex++]) )) {
-            return null;//if found "no data" just return null
-        }
-
-
-        b1 = base64Alphabet[d1]; 
-        b2 = base64Alphabet[d2];
-
-        d3 = normalizedBase64Data[dataIndex++];
-        d4 = normalizedBase64Data[dataIndex++];
-        if (!isData( (d3 ) ) ||
-            !isData( (d4 ) )) {//Check if they are PAD characters
-            if (isPad( d3 ) && isPad( d4)) {               //Two PAD e.g. 3c[Pad][Pad]
-                if ((b2 & 0xf) != 0)//last 4 bits should be zero
-                    return null;
-                byte[] tmp = new byte[ i*3 + 1 ];
-                System.arraycopy( decodedData, 0, tmp, 0, i*3 ); 
-                tmp[encodedIndex]   = (byte)(  b1 <<2 | b2>>4 ) ; 
-                return tmp;
-            } else if (!isPad( d3) && isPad(d4)) {               //One PAD  e.g. 3cQ[Pad]
-                b3 = base64Alphabet[ d3 ];
-                if ((b3 & 0x3 ) != 0)//last 2 bits should be zero
-                    return null;
-                byte[] tmp = new byte[ i*3 + 2 ];
-                System.arraycopy( decodedData, 0, tmp, 0, i*3 );
-                tmp[encodedIndex++] = (byte)(  b1 <<2 | b2>>4 );
-                tmp[encodedIndex]   = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
-                return tmp;
-            } else {
-                return null;//an error  like "3c[Pad]r", "3cdX", "3cXd", "3cXX" where X is non data 
-            }
-        } else { //No PAD e.g 3cQl
-            b3 = base64Alphabet[ d3 ];
-            b4 = base64Alphabet[ d4 ];
-            decodedData[encodedIndex++] = (byte)(  b1 <<2 | b2>>4 ) ;
-            decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );
-            decodedData[encodedIndex++] = (byte)( b3<<6 | b4 ); 
-
-        }
-
-        return decodedData;
-    }
-
-
-    /**
-     * returns length of decoded data given an
-     * array containing encoded data.
-     * WhiteSpace removing is done if data array not
-     * valid.
-     * 
-     * @param base64Data
-     * @return         a -1 would be return if not
-     */
-    static public synchronized int getDecodedDataLength( byte[] base64Data ) {
-
-        if (base64Data == null)
-            return -1;
-
-        if (base64Data.length == 0)
-            return 0;
-
-        //byte[] normalizedBase64Data =  removeWhiteSpace( base64Data );//Remove any whiteSpace 
-        byte[] decodedData = null;
-
-        if ((decodedData = decode( base64Data ) ) == null)//decode could return a null byte array
-            return -1;
-
-        return decodedData.length;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/util/HexBin.java b/src/org/apache/xerces/impl/xs/util/HexBin.java
deleted file mode 100644
index 411cf0f..0000000
--- a/src/org/apache/xerces/impl/xs/util/HexBin.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.util;
-
-/**
- * format validation
- *
- * This class encodes/decodes hexadecimal data
- * @author Jeffrey Rodriguez
- * @version $Id$
- */
-public final class  HexBin {
-    static private final int  BASELENGTH   = 255;
-    static private final int  LOOKUPLENGTH = 16;
-    static private byte [] hexNumberTable       = new byte[BASELENGTH];
-    static private byte [] lookUpHexAlphabet = new byte[LOOKUPLENGTH];
-
-
-    static {
-        for (int i = 0; i<BASELENGTH; i++ ) {
-            hexNumberTable[i] = -1;
-        }
-        for ( int i = '9'; i >= '0'; i--) {
-            hexNumberTable[i] = (byte) (i-'0');
-        }
-        for ( int i = 'F'; i>= 'A'; i--) {
-            hexNumberTable[i] = (byte) ( i-'A' + 10 );
-        }
-        for ( int i = 'f'; i>= 'a'; i--) {
-           hexNumberTable[i] = (byte) ( i-'a' + 10 );
-        }
-
-        for(int i = 0; i<10; i++ )
-            lookUpHexAlphabet[i] = (byte) ('0'+i );
-        for(int i = 10; i<=15; i++ )
-            lookUpHexAlphabet[i] = (byte) ('A'+i -10);
-    }
-
-    /**
-     * byte to be tested if it is Base64 alphabet
-     *
-     * @param octect
-     * @return
-     */
-    static boolean isHex( byte octect ) {
-        //shall we ignore white space? JEFF??
-        return( hexNumberTable[octect] != -1 );
-    }
-
-
-    /**
-     *       Array of bytes to check against Hex Table
-     *
-     * @param arrayOctect
-     * @return
-     */
-    static boolean isArrayByteHex( byte[] arrayOctect ) {
-        if (arrayOctect == null)
-            return false;
-        int length = arrayOctect.length;
-        if (length % 2 != 0)
-            return false;
-        for( int i=0; i < length; i++ ){
-            if( HexBin.isHex( arrayOctect[i] ) == false)
-                return false;
-       }
-       return true;
-   }
-
-    public static boolean isHex( String isValidString ){
-      if (isValidString == null)
-        return false;
-      return( isArrayByteHex( isValidString.getBytes()));
-  }
-
-    /**
-     * array of byte to encode
-     *
-     * @param binaryData
-     * @return return encode binary array
-     */
-    static public byte[] encode( byte[] binaryData ) {
-        if (binaryData == null)
-            return null;
-        int lengthData   = binaryData.length;
-        int lengthEncode = lengthData * 2;
-        byte[] encodedData = new byte[lengthEncode];
-        for( int i = 0; i<lengthData; i++ ){
-            encodedData[i*2] = lookUpHexAlphabet[ binaryData[i] >> 4];
-            encodedData[i*2+1] = lookUpHexAlphabet[ binaryData[i] & 0xf];
-        }
-        return encodedData;
-    }
-
-    static public  byte[] decode ( byte[]  binaryData ) {
-        if (binaryData == null)
-            return null;
-        int lengthData   = binaryData.length;
-        if (lengthData % 2 != 0)
-            return null;
-
-        int lengthDecode = lengthData / 2;
-        byte[] decodedData = new byte[lengthDecode];
-        for( int i = 0; i<lengthDecode; i++ ){
-            decodedData[i] = (byte)((hexNumberTable[binaryData[i*2]] << 4) | hexNumberTable[binaryData[i*2+1]]);
-        }
-        return decodedData;
-    }
-
-    static public int getDecodedDataLength (byte[] hexData) {
-        if (!isArrayByteHex(hexData))
-            return -1;
-
-        return hexData.length / 2;
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/util/XInt.java b/src/org/apache/xerces/impl/xs/util/XInt.java
deleted file mode 100644
index d0d3a43..0000000
--- a/src/org/apache/xerces/impl/xs/util/XInt.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.util;
-
-/**
- * @author Henry Zongaro, IBM
- * @version $Id$
- */
-
-public final class XInt {
-
-    private int fValue;
-
-    XInt(int value) {
-        fValue = value;
-    }
-
-    public final int intValue() {
-        return fValue;
-    }
-
-    public final short shortValue() {
-        return (short)fValue;
-    }
-
-    public final boolean equals(XInt compareVal) {
-        return (this.fValue == compareVal.fValue);
-    }
-
-    public String toString() {
-        return Integer.toString(fValue);
-    }
-}
diff --git a/src/org/apache/xerces/impl/xs/util/XIntPool.java b/src/org/apache/xerces/impl/xs/util/XIntPool.java
deleted file mode 100644
index 5e15585..0000000
--- a/src/org/apache/xerces/impl/xs/util/XIntPool.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.impl.xs.util;
-
-/**
- * @author Henry Zongaro, IBM
- * @version $Id$
- */
-public final class XIntPool {
-    private static final short POOL_SIZE = 10;
-    private static final XInt[] fXIntPool = new XInt[POOL_SIZE];
-
-    static {
-        for (int i = 0; i < POOL_SIZE; i++)
-            fXIntPool[i] = new XInt(i);
-    }
-
-    public final XInt getXInt(int value) {
-        if (value >= 0 && value < fXIntPool.length)
-            return fXIntPool[value];
-        else
-            return new XInt(value);
-    }
-}
diff --git a/src/org/apache/xerces/jaxp/DefaultValidationErrorHandler.java b/src/org/apache/xerces/jaxp/DefaultValidationErrorHandler.java
deleted file mode 100644
index be81ca8..0000000
--- a/src/org/apache/xerces/jaxp/DefaultValidationErrorHandler.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Sun Microsystems, Inc., 
- * http://www.sun.com.  For more information on the Apache Software 
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package org.apache.xerces.jaxp;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
-
-class DefaultValidationErrorHandler extends DefaultHandler {
-    static private int ERROR_COUNT_LIMIT = 10;
-    private int errorCount = 0;
-
-    // XXX Fix message i18n
-    public void error(SAXParseException e) throws SAXException {
-        if (errorCount >= ERROR_COUNT_LIMIT) {
-            // Ignore all errors after reaching the limit
-            return;
-        } else if (errorCount == 0) {
-            // Print a warning before the first error
-            System.err.println("Warning: validation was turned on but an org.xml.sax.ErrorHandler was not");
-            System.err.println("set, which is probably not what is desired.  Parser will use a default");
-            System.err.println("ErrorHandler to print the first " +
-                               ERROR_COUNT_LIMIT +               " errors.  Please call");
-            System.err.println("the 'setErrorHandler' method to fix this.");
-        }
-
-        String systemId = e.getSystemId();
-        if (systemId == null) {
-            systemId = "null";
-        }
-        String message = "Error: URI=" + systemId +
-            " Line=" + e.getLineNumber() +
-            ": " + e.getMessage();
-        System.err.println(message);
-        errorCount++;
-    }
-}
diff --git a/src/org/apache/xerces/jaxp/DocumentBuilderFactoryImpl.java b/src/org/apache/xerces/jaxp/DocumentBuilderFactoryImpl.java
deleted file mode 100644
index 86aacc3..0000000
--- a/src/org/apache/xerces/jaxp/DocumentBuilderFactoryImpl.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * $Id$
- *
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Sun Microsystems, Inc., 
- * http://www.sun.com.  For more information on the Apache Software 
- * Foundation, please see <http://www.apache.org/>.
- */
-
-
-package org.apache.xerces.jaxp;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.xml.sax.SAXException;
-
-import java.util.Hashtable;
-
-import org.apache.xerces.parsers.DOMParser;
-
-/**
- * @author Rajiv Mordani
- * @author Edwin Goei
- */
-public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory {
-    /** These are DocumentBuilderFactory attributes not DOM attributes */
-    private Hashtable attributes;
-
-    public DocumentBuilderFactoryImpl() {
-        // Set the default schema language to DTD
-        try {
-            setAttribute(DocumentBuilderImpl.JAXP_SCHEMA_LANGUAGE, "DTD");
-        } catch (IllegalArgumentException x) {
-            // Assume this is b/c parser does not support this feature and
-            // so we just ignore it
-        }
-    }
-
-    /**
-     * 
-     */
-    public DocumentBuilder newDocumentBuilder()
-        throws ParserConfigurationException 
-    {
-        try {
-            return new DocumentBuilderImpl(this, attributes);
-        } catch (SAXException se) {
-            // Handles both SAXNotSupportedException, SAXNotRecognizedException
-            throw new ParserConfigurationException(se.getMessage());
-        }
-    }
-
-    /**
-     * Allows the user to set specific attributes on the underlying 
-     * implementation.
-     */
-    public void setAttribute(String name, Object value)
-        throws IllegalArgumentException
-    {
-        // XXX This is ugly.  We have to collect the attributes and then
-        // later create a DocumentBuilderImpl to verify the attributes.
-        if (attributes == null) {
-            attributes = new Hashtable();
-        }
-        attributes.put(name, value);
-
-        // Test the attribute name by possibly throwing an exception
-        try {
-            new DocumentBuilderImpl(this, attributes);
-        } catch (Exception e) {
-            attributes.remove(name);
-            throw new IllegalArgumentException(e.getMessage());
-        }
-    }
-
-    /**
-     * Allows the user to retrieve specific attributes on the underlying 
-     * implementation.
-     */
-    public Object getAttribute(String name)
-        throws IllegalArgumentException
-    {
-        // See if it's in the attributes Hashtable
-        if (attributes != null) {
-            Object val = attributes.get(name);
-            if (val != null) {
-                return val;
-            }
-        }
-
-        DOMParser domParser = null;
-        try {
-            // We create a dummy DocumentBuilderImpl in case the attribute
-            // name is not one that is in the attributes hashtable.
-            domParser =
-                new DocumentBuilderImpl(this, attributes).getDOMParser();
-            return domParser.getProperty(name);
-        } catch (SAXException se1) {
-            // assert(name is not recognized or not supported), try feature
-            try {
-                boolean result = domParser.getFeature(name);
-                // Must have been a feature
-                return result ? Boolean.TRUE : Boolean.FALSE;
-            } catch (SAXException se2) {
-                // Not a property or a feature
-                throw new IllegalArgumentException(se1.getMessage());
-            }
-        }
-    }
-}
diff --git a/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java b/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java
deleted file mode 100644
index d3acad0..0000000
--- a/src/org/apache/xerces/jaxp/DocumentBuilderImpl.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * $Id$
- *
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Sun Microsystems, Inc., 
- * http://www.sun.com.  For more information on the Apache Software 
- * Foundation, please see <http://www.apache.org/>.
- */
-
-
-package org.apache.xerces.jaxp;
-
-import java.util.Hashtable;
-import java.util.Enumeration;
-import java.io.IOException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.DocumentType;
-
-import org.xml.sax.XMLReader;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.helpers.DefaultHandler;
-
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.dom.DOMImplementationImpl;
-import org.apache.xerces.impl.Constants;
-
-/**
- * @author Rajiv Mordani
- * @author Edwin Goei
- */
-public class DocumentBuilderImpl extends DocumentBuilder {
-    /** JAXP 1.2 features and values */
-    static final String JAXP_SCHEMA_LANGUAGE =
-        "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
-    static final String W3C_XML_SCHEMA =
-        "http://www.w3.org/2001/XMLSchema";
-
-    private EntityResolver er = null;
-    private ErrorHandler eh = null;
-    private DOMParser domParser = null;
-
-    private boolean namespaceAware = false;
-    private boolean validating = false;
-
-    DocumentBuilderImpl(DocumentBuilderFactory dbf, Hashtable dbfAttrs)
-        throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-        domParser = new DOMParser();
-
-        // Validation
-        validating = dbf.isValidating();
-
-        // If validating, provide a default ErrorHandler that prints
-        // validation errors with a warning telling the user to set an
-        // ErrorHandler
-        if (validating) {
-            setErrorHandler(new DefaultValidationErrorHandler());
-        }
-
-        // "namespaceAware" == SAX Namespaces feature
-        namespaceAware = dbf.isNamespaceAware();
-        domParser.setFeature("http://xml.org/sax/features/namespaces",
-                             namespaceAware);
-
-        // Set various parameters obtained from DocumentBuilderFactory
-        //
-        // XXX Note: Ignore features that are not yet implemented in
-        // Xerces 2.  This code is different than in Xerces 1!
-        try {
-            domParser.setFeature(Constants.XERCES_FEATURE_PREFIX +
-                                 Constants.INCLUDE_IGNORABLE_WHITESPACE,
-                                 !dbf.isIgnoringElementContentWhitespace());
-            domParser.setFeature(Constants.XERCES_FEATURE_PREFIX +
-                                 Constants.CREATE_ENTITY_REF_NODES_FEATURE,
-                                 !dbf.isExpandEntityReferences());
-        } catch (Exception e) {
-        }
-
-        // XXX No way to control dbf.isIgnoringComments() or
-        // dbf.isCoalescing()
-
-        setDocumentBuilderFactoryAttributes(dbfAttrs);
-    }
-
-    /**
-     * Set any DocumentBuilderFactory attributes of our underlying DOMParser
-     *
-     * Note: code does not handle possible conflicts between DOMParser
-     * attribute names and JAXP specific attribute names,
-     * eg. DocumentBuilderFactory.setValidating()
-     */
-    private void setDocumentBuilderFactoryAttributes(Hashtable dbfAttrs)
-        throws SAXNotSupportedException, SAXNotRecognizedException
-    {
-        if (dbfAttrs == null) {
-            // Nothing to do
-            return;
-        }
-
-        for (Enumeration e = dbfAttrs.keys(); e.hasMoreElements();) {
-            String name = (String)e.nextElement();
-            Object val = dbfAttrs.get(name);
-            if (val instanceof Boolean) {
-                // Assume feature
-                domParser.setFeature(name, ((Boolean)val).booleanValue());
-            } else {
-                // Assume property
-
-                if (JAXP_SCHEMA_LANGUAGE.equals(name)) {
-                    if ("DTD".equals(val)) {
-                        domParser.setFeature(
-                            Constants.SAX_FEATURE_PREFIX +
-                            Constants.VALIDATION_FEATURE, validating);
-                        domParser.setFeature(
-                            Constants.XERCES_FEATURE_PREFIX +
-                            Constants.SCHEMA_VALIDATION_FEATURE, false);
-                    } else if (W3C_XML_SCHEMA.equals(val)) {
-                        domParser.setFeature(
-                            Constants.SAX_FEATURE_PREFIX +
-                            Constants.VALIDATION_FEATURE, false);
-                        domParser.setFeature(
-                            Constants.XERCES_FEATURE_PREFIX +
-                            Constants.SCHEMA_VALIDATION_FEATURE,
-                            validating);
-                    } else {
-                        // In case Xerces parser supports other values
-                        domParser.setProperty(name, val);
-                    }
-                } else {
-                    // Assume Xerces property
-                    domParser.setProperty(name, val);
-                }
-            }
-        }
-    }
-
-    /**
-     * Non-preferred: use the getDOMImplementation() method instead of this
-     * one to get a DOM Level 2 DOMImplementation object and then use DOM
-     * Level 2 methods to create a DOM Document object.
-     */
-    public Document newDocument() {
-        return new org.apache.xerces.dom.DocumentImpl();
-    }
-
-    public DOMImplementation getDOMImplementation() {
-        return DOMImplementationImpl.getDOMImplementation();
-    }
-
-    public Document parse(InputSource is) throws SAXException, IOException {
-        if (is == null) {
-            throw new IllegalArgumentException("InputSource cannot be null");
-        }
-
-        if (er != null) {
-            domParser.setEntityResolver(er);
-        }
-
-        if (eh != null) {
-            domParser.setErrorHandler(eh);      
-        }
-
-        domParser.parse(is);
-        return domParser.getDocument();
-    }
-
-    public boolean isNamespaceAware() {
-        return namespaceAware;
-    }
-
-    public boolean isValidating() {
-        return validating;
-    }
-
-    public void setEntityResolver(org.xml.sax.EntityResolver er) {
-        this.er = er;
-    }
-
-    public void setErrorHandler(org.xml.sax.ErrorHandler eh) {
-        // If app passes in a ErrorHandler of null, then ignore all errors
-        // and warnings
-        this.eh = (eh == null) ? new DefaultHandler() : eh;
-    }
-
-    // package private
-    DOMParser getDOMParser() {
-        return domParser;
-    }
-}
diff --git a/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java b/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java
deleted file mode 100644
index b22872e..0000000
--- a/src/org/apache/xerces/jaxp/SAXParserFactoryImpl.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * $Id$
- *
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Sun Microsystems, Inc., 
- * http://www.sun.com.  For more information on the Apache Software 
- * Foundation, please see <http://www.apache.org/>.
- */
-
-
-package org.apache.xerces.jaxp;
-
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.ParserConfigurationException;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-
-import java.util.Hashtable;
-
-/**
- * @author Rajiv Mordani
- * @author Edwin Goei
- */
-
-/**
- * This is the implementation specific class for the
- * <code>javax.xml.parsers.SAXParserFactory</code>. This is the platform
- * default implementation for the platform.
- */
-public class SAXParserFactoryImpl extends SAXParserFactory {
-    private Hashtable features;
-
-    /**
-     * Creates a new instance of <code>SAXParser</code> using the currently
-     * configured factory parameters.
-     * @return javax.xml.parsers.SAXParser
-     */
-    public SAXParser newSAXParser()
-        throws ParserConfigurationException
-    {
-        SAXParser saxParserImpl;
-        try {
-            saxParserImpl = new SAXParserImpl(this, features);
-        } catch (SAXException se) {
-            // Translate to ParserConfigurationException
-            throw new ParserConfigurationException(se.getMessage());
-        }
-	return saxParserImpl;
-    }
-
-    /**
-     * Common code for translating exceptions
-     */
-    private SAXParserImpl newSAXParserImpl()
-        throws ParserConfigurationException, SAXNotRecognizedException, 
-        SAXNotSupportedException
-    {
-        SAXParserImpl saxParserImpl;
-        try {
-            saxParserImpl = new SAXParserImpl(this, features);
-        } catch (SAXNotSupportedException e) {
-            throw e;
-        } catch (SAXNotRecognizedException e) {
-            throw e;
-        } catch (SAXException se) {
-            throw new ParserConfigurationException(se.getMessage());
-        }
-        return saxParserImpl;
-    }
-
-    /**
-     * Sets the particular feature in the underlying implementation of 
-     * org.xml.sax.XMLReader.
-     */
-    public void setFeature(String name, boolean value)
-        throws ParserConfigurationException, SAXNotRecognizedException, 
-		SAXNotSupportedException
-    {
-        // XXX This is ugly.  We have to collect the features and then
-        // later create an XMLReader to verify the features.
-        if (features == null) {
-            features = new Hashtable();
-        }
-        features.put(name, value ? Boolean.TRUE : Boolean.FALSE);
-
-        // Test the feature by possibly throwing SAX exceptions
-        try {
-            newSAXParserImpl();
-        } catch (SAXNotSupportedException e) {
-            features.remove(name);
-            throw e;
-        } catch (SAXNotRecognizedException e) {
-            features.remove(name);
-            throw e;
-        }
-    }
-
-    /**
-     * returns the particular property requested for in the underlying 
-     * implementation of org.xml.sax.XMLReader.
-     */
-    public boolean getFeature(String name)
-        throws ParserConfigurationException, SAXNotRecognizedException,
-		SAXNotSupportedException
-    {
-        // Check for valid name by creating a dummy XMLReader to get
-        // feature value
-        return newSAXParserImpl().getXMLReader().getFeature(name);
-    }
-}
diff --git a/src/org/apache/xerces/jaxp/SAXParserImpl.java b/src/org/apache/xerces/jaxp/SAXParserImpl.java
deleted file mode 100644
index 5b17be2..0000000
--- a/src/org/apache/xerces/jaxp/SAXParserImpl.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * $Id$
- *
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, Sun Microsystems, Inc., 
- * http://www.sun.com.  For more information on the Apache Software 
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package org.apache.xerces.jaxp;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.HandlerBase;
-import org.xml.sax.Parser;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderAdapter;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-import org.apache.xerces.impl.Constants;
-
-import java.util.*;
-
-/**
- * @author Rajiv Mordani
- * @author Edwin Goei
- */
-
-/**
- * This is the implementation specific class for the
- * <code>javax.xml.parsers.SAXParser</code>. 
- */
-public class SAXParserImpl extends javax.xml.parsers.SAXParser {
-    private XMLReader xmlReader;
-    private Parser parser = null;
-
-    private boolean validating = false;
-    private boolean namespaceAware = false;
-    private String schemaLanguage = "DTD";
-    
-    /**
-     * Create a SAX parser with the associated features
-     * @param features Hashtable of SAX features, may be null
-     */
-    SAXParserImpl(SAXParserFactory spf, Hashtable features)
-        throws SAXException
-    {
-        // Instantiate a SAXParser directly and not through SAX so that we
-        // use the right ClassLoader
-        xmlReader = new org.apache.xerces.parsers.SAXParser();
-
-        // Default Xerces2 configuration automatically enables XML Schema
-        // validation which is not backward compatible w/ JAXP so turn it
-        // off by default
-        xmlReader.setFeature(Constants.XERCES_FEATURE_PREFIX +
-                             Constants.SCHEMA_VALIDATION_FEATURE, false);
-
-        // Validation
-        validating = spf.isValidating();
-
-        // If validating, provide a default ErrorHandler that prints
-        // validation errors with a warning telling the user to set an
-        // ErrorHandler.
-        if (validating) {
-            xmlReader.setErrorHandler(new DefaultValidationErrorHandler());
-        }
-
-        xmlReader.setFeature(Constants.SAX_FEATURE_PREFIX +
-                             Constants.VALIDATION_FEATURE, validating);
-
-        // "namespaceAware" == SAX Namespaces feature
-        // Note: there is a compatibility problem here with default values:
-        // JAXP default is false while SAX 2 default is true!
-        namespaceAware = spf.isNamespaceAware();
-        String namespaces = "http://xml.org/sax/features/namespaces";
-        xmlReader.setFeature(namespaces, namespaceAware);
-
-        // SAX "namespaces" and "namespace-prefixes" features must not both
-        // be false as specified by SAX
-        if (namespaceAware == false) {
-            String prefixes = "http://xml.org/sax/features/namespace-prefixes";
-            xmlReader.setFeature(prefixes, true);
-        }
-
-        setFeatures(features);
-    }
-
-    /**
-     * Set any features of our XMLReader based on any features set on the
-     * SAXParserFactory.
-     *
-     * XXX Does not handle possible conflicts between SAX feature names and
-     * JAXP specific feature names, eg. SAXParserFactory.isValidating()
-     */
-    private void setFeatures(Hashtable features)
-        throws SAXNotSupportedException, SAXNotRecognizedException
-    {
-        if (features != null) {
-            for (Enumeration e = features.keys(); e.hasMoreElements();) {
-                String feature = (String)e.nextElement();
-                boolean value = ((Boolean)features.get(feature)).booleanValue();
-                xmlReader.setFeature(feature, value);
-            }
-        }
-    }
-
-    public Parser getParser() throws SAXException {
-        if (parser == null) {
-            // Adapt a SAX2 XMLReader into a SAX1 Parser
-            parser = new XMLReaderAdapter(xmlReader);
-
-            // Set a DocumentHandler that does nothing to avoid getting
-            // exceptions if no DocumentHandler is set by the app
-            parser.setDocumentHandler(new HandlerBase());
-        }
-        return parser;
-    }
-
-    /**
-     * Returns the XMLReader that is encapsulated by the implementation of
-     * this class.
-     */
-    public XMLReader getXMLReader() {
-        return xmlReader;
-    }
-
-    public boolean isNamespaceAware() {
-        return namespaceAware;
-    }
-
-    public boolean isValidating() {
-        return validating;
-    }
-
-    /**
-     * Sets the particular property in the underlying implementation of 
-     * org.xml.sax.XMLReader.
-     */
-    public void setProperty(String name, Object value)
-        throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-        if (DocumentBuilderImpl.JAXP_SCHEMA_LANGUAGE.equals(name)) {
-            // JAXP 1.2 support
-            if (DocumentBuilderImpl.W3C_XML_SCHEMA.equals(value)) {
-                schemaLanguage = DocumentBuilderImpl.W3C_XML_SCHEMA;
-                xmlReader.setFeature(Constants.SAX_FEATURE_PREFIX +
-                                     Constants.VALIDATION_FEATURE, false);
-                xmlReader.setFeature(Constants.XERCES_FEATURE_PREFIX +
-                                     Constants.SCHEMA_VALIDATION_FEATURE,
-                                     validating);
-            } else if ("DTD".equals(value)) {
-                schemaLanguage = "DTD";
-                xmlReader.setFeature(Constants.SAX_FEATURE_PREFIX +
-                                     Constants.VALIDATION_FEATURE, validating);
-                xmlReader.setFeature(Constants.XERCES_FEATURE_PREFIX +
-                                     Constants.SCHEMA_VALIDATION_FEATURE,
-                                     false);
-            } else {
-                throw new SAXNotSupportedException(
-                    "Unsupported schema language");
-            }
-        } else {
-            xmlReader.setProperty(name, value);
-        }
-    }
-
-    /**
-     * returns the particular property requested for in the underlying 
-     * implementation of org.xml.sax.XMLReader.
-     */
-    public Object getProperty(String name)
-        throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-        if (DocumentBuilderImpl.JAXP_SCHEMA_LANGUAGE.equals(name)) {
-            // JAXP 1.2 support
-            return schemaLanguage;
-        } else {
-            return xmlReader.getProperty(name);
-        }
-    }
-}
diff --git a/src/org/apache/xerces/jaxp/javax.xml.parsers.DocumentBuilderFactory b/src/org/apache/xerces/jaxp/javax.xml.parsers.DocumentBuilderFactory
deleted file mode 100644
index 3845cc1..0000000
--- a/src/org/apache/xerces/jaxp/javax.xml.parsers.DocumentBuilderFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
diff --git a/src/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory b/src/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory
deleted file mode 100644
index 88b247c..0000000
--- a/src/org/apache/xerces/jaxp/javax.xml.parsers.SAXParserFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.xerces.jaxp.SAXParserFactoryImpl
diff --git a/src/org/apache/xerces/parsers/AbstractDOMParser.java b/src/org/apache/xerces/parsers/AbstractDOMParser.java
deleted file mode 100644
index 5b8145d..0000000
--- a/src/org/apache/xerces/parsers/AbstractDOMParser.java
+++ /dev/null
@@ -1,1561 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import org.apache.xerces.dom.AttrImpl;
-import org.apache.xerces.dom.DeferredDocumentImpl;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.dom.DocumentTypeImpl;
-import org.apache.xerces.dom.ElementDefinitionImpl;
-import org.apache.xerces.dom.EntityImpl;
-import org.apache.xerces.dom.EntityReferenceImpl;
-import org.apache.xerces.dom.NodeImpl;
-import org.apache.xerces.dom.NotationImpl;
-import org.apache.xerces.dom.TextImpl;
-import org.apache.xerces.impl.Constants;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.NamespaceContext;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Comment;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-/**
- * This is the base class of all DOM parsers. It implements the XNI
- * callback methods to create the DOM tree. After a successful parse of
- * an XML document, the DOM Document object can be queried using the
- * <code>getDocument</code> method. The actual pipeline is defined in
- * parser configuration.
- *
- * @author Arnaud Le Hors, IBM
- * @author Andy Clark, IBM
- * @author Elena Litani, IBM
- *
- * @version $Id$
- */
-public abstract class AbstractDOMParser
-    extends AbstractXMLDocumentParser {
-
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Feature id: create entity ref nodes. */
-    protected static final String CREATE_ENTITY_REF_NODES =
-        "http://apache.org/xml/features/dom/create-entity-ref-nodes";
-
-    /** Feature id: namespace. */
-    protected static final String NAMESPACES =
-        Constants.SAX_FEATURE_PREFIX+Constants.NAMESPACES_FEATURE;
-
-    /** Feature id: include comments. */
-    protected static final String INCLUDE_COMMENTS_FEATURE = Constants.INCLUDE_COMMENTS_FEATURE;
-
-    /** Feature id: create cdata nodes. */
-    protected static final String CREATE_CDATA_NODES_FEATURE = Constants.CREATE_CDATA_NODES_FEATURE;
-
-    /** Feature id: include ignorable whitespace. */
-    protected static final String INCLUDE_IGNORABLE_WHITESPACE =
-        "http://apache.org/xml/features/dom/include-ignorable-whitespace";
-
-    /** Feature id: defer node expansion. */
-    protected static final String DEFER_NODE_EXPANSION =
-        "http://apache.org/xml/features/dom/defer-node-expansion";
-
-    // property ids
-
-    /** Property id: document class name. */
-    protected static final String DOCUMENT_CLASS_NAME =
-        "http://apache.org/xml/properties/dom/document-class-name";
-
-    // other
-
-    /** Default document class name. */
-    protected static final String DEFAULT_DOCUMENT_CLASS_NAME =
-        "org.apache.xerces.dom.DocumentImpl";
-
-    // debugging
-
-    /** Set to true and recompile to debug entity references. */
-    private static final boolean DEBUG_ENTITY_REF = false;
-
-
-    //
-    // Data
-    //
-
-    // features
-
-    /** Create entity reference nodes. */
-    protected boolean fCreateEntityRefNodes;
-
-    /** Include ignorable whitespace. */
-    protected boolean fIncludeIgnorableWhitespace;
-
-    /** Include Comments. */
-    protected boolean fIncludeComments;
-
-    /** Create cdata nodes. */
-    protected boolean fCreateCDATANodes;
-
-    // dom information
-
-    /** The document. */
-    protected Document fDocument;
-
-    /** The default Xerces document implementation, if used. */
-    protected DocumentImpl fDocumentImpl;
-
-    /** The document class name to use. */
-    protected String  fDocumentClassName;
-
-    /** The document type node. */
-    protected DocumentType fDocumentType;
-
-    /** Current node. */
-    protected Node fCurrentNode;
-    protected CDATASection fCurrentCDATASection;
-
-    // internal subset
-
-    /** Internal subset buffer. */
-    protected StringBuffer fInternalSubset;
-
-    // deferred expansion data
-
-    protected boolean              fDeferNodeExpansion;
-    protected boolean              fNamespaceAware;
-    protected DeferredDocumentImpl fDeferredDocumentImpl;
-    protected int                  fDocumentIndex;
-    protected int                  fDocumentTypeIndex;
-    protected int                  fCurrentNodeIndex;
-    protected int                  fCurrentCDATASectionIndex;
-
-    // state
-
-    /** True if inside DTD external subset. */
-    protected boolean fInDTDExternalSubset;
-
-    /** True if inside document. */
-    protected boolean fInDocument;
-
-    /** True if inside CDATA section. */
-    protected boolean fInCDATASection;
-
-    // data
-
-    /** Attribute QName. */
-    private QName fAttrQName = new QName();
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    protected AbstractDOMParser(XMLParserConfiguration config) {
-        super(config);
-
-        // add recognized features
-        final String[] recognizedFeatures = {
-            CREATE_ENTITY_REF_NODES,
-            INCLUDE_IGNORABLE_WHITESPACE,
-            DEFER_NODE_EXPANSION,
-            INCLUDE_COMMENTS_FEATURE,
-            CREATE_CDATA_NODES_FEATURE
-        };
-        fConfiguration.addRecognizedFeatures(recognizedFeatures);
-
-        // set default values
-        fConfiguration.setFeature(CREATE_ENTITY_REF_NODES, true);
-        fConfiguration.setFeature(INCLUDE_IGNORABLE_WHITESPACE, true);
-        fConfiguration.setFeature(DEFER_NODE_EXPANSION, true);
-        fConfiguration.setFeature(INCLUDE_COMMENTS_FEATURE, true);
-        fConfiguration.setFeature(CREATE_CDATA_NODES_FEATURE, true);
-
-        // add recognized properties
-        final String[] recognizedProperties = {
-            DOCUMENT_CLASS_NAME
-        };
-        fConfiguration.addRecognizedProperties(recognizedProperties);
-
-        // set default values
-        fConfiguration.setProperty(DOCUMENT_CLASS_NAME,
-                                   DEFAULT_DOCUMENT_CLASS_NAME);
-
-    } // <init>(XMLParserConfiguration)
-
-    /**
-     * This method allows the programmer to decide which document
-     * factory to use when constructing the DOM tree. However, doing
-     * so will lose the functionality of the default factory. Also,
-     * a document class other than the default will lose the ability
-     * to defer node expansion on the DOM tree produced.
-     *
-     * @param documentClassName The fully qualified class name of the
-     *                      document factory to use when constructing
-     *                      the DOM tree.
-     *
-     * @see #getDocumentClassName
-     * @see #DEFAULT_DOCUMENT_CLASS_NAME
-     */
-    protected void setDocumentClassName(String documentClassName) {
-
-        // normalize class name
-        if (documentClassName == null) {
-            documentClassName = DEFAULT_DOCUMENT_CLASS_NAME;
-        }
-
-        // verify that this class exists and is of the right type
-        try {
-            Class _class = Class.forName(documentClassName);
-            //if (!_class.isAssignableFrom(Document.class)) {
-            if (!Document.class.isAssignableFrom(_class)) {
-                // REVISIT: message
-                throw new IllegalArgumentException("PAR002 Class, \"" +
-                                                   documentClassName +
-                                 "\", is not of type org.w3c.dom.Document.\n" +
-                                                   documentClassName);
-            }
-        }
-        catch (ClassNotFoundException e) {
-            // REVISIT: message
-            throw new IllegalArgumentException("PAR003 Class, \"" +
-                                               documentClassName +
-                                               "\", not found.\n" +
-                                               documentClassName);
-        }
-
-        // set document class name
-        fDocumentClassName = documentClassName;
-        if (!documentClassName.equals(DEFAULT_DOCUMENT_CLASS_NAME)) {
-            fDeferNodeExpansion = false;
-        }
-
-    } // setDocumentClassName(String)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the DOM document object. */
-    public Document getDocument() {
-        return fDocument;
-    } // getDocument():Document
-
-    //
-    // XMLDocumentParser methods
-    //
-
-    /**
-     * Resets the parser state.
-     *
-     * @throws SAXException Thrown on initialization error.
-     */
-    public void reset() throws XNIException {
-        super.reset();
-
-        // get feature state
-        fCreateEntityRefNodes =
-            fConfiguration.getFeature(CREATE_ENTITY_REF_NODES);
-
-        fIncludeIgnorableWhitespace =
-            fConfiguration.getFeature(INCLUDE_IGNORABLE_WHITESPACE);
-
-        fDeferNodeExpansion =
-            fConfiguration.getFeature(DEFER_NODE_EXPANSION);
-
-        fNamespaceAware = fConfiguration.getFeature(NAMESPACES);
-
-        fIncludeComments = fConfiguration.getFeature(INCLUDE_COMMENTS_FEATURE);
-
-        fCreateCDATANodes = fConfiguration.getFeature(CREATE_CDATA_NODES_FEATURE);
-
-        // get property
-        setDocumentClassName((String)
-                             fConfiguration.getProperty(DOCUMENT_CLASS_NAME));
-
-        // reset dom information
-        fDocument = null;
-        fDocumentImpl = null;
-        fDocumentType = null;
-        fDocumentTypeIndex = -1;
-        fDeferredDocumentImpl = null;
-        fCurrentNode = null;
-
-        // reset state information
-        fInDocument = false;
-        fInDTD = false;
-        fInDTDExternalSubset = false;
-        fInCDATASection = false;
-        fCurrentCDATASection = null;
-        fCurrentCDATASectionIndex = -1;
-
-    } // reset()
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
-     * general entity names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding, 
-                            Augmentations augs) throws XNIException {
-
-        // REVISIT: investigate fInDTD & fInDocument flags
-        // this method now only called by DocumentHandler
-        // comment(), endEntity(), processingInstruction(), textDecl()
-        // REVISIT: need to set the Entity.actualEncoding somehow
-        if (fInDocument && !fInDTD && fCreateEntityRefNodes ) {
-            if (!fDeferNodeExpansion) {
-                EntityReference er = fDocument.createEntityReference(name);
-                fCurrentNode.appendChild(er);
-                fCurrentNode = er;
-            }
-            else {
-                int er =
-                    fDeferredDocumentImpl.createDeferredEntityReference(name);
-                fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, er);
-                fCurrentNodeIndex = er;
-            }
-        }
-
-    } // startEntity(String,String,String,String)
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     * @param augs       Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
-        if (!fDeferNodeExpansion) {
-            // REVISIT: when DOM Level 3 is REC rely on Document.support
-            //          instead of specific class
-            if (fDocumentType != null) {
-                NamedNodeMap entities = fDocumentType.getEntities();
-                String name = fCurrentNode.getNodeName();
-                EntityImpl entity = (EntityImpl) entities.getNamedItem(name);
-                if (entity != null) {
-                    entity.setVersion(version);
-                    entity.setEncoding(encoding);
-                }
-            }
-        }
-        else {
-            String name = fDeferredDocumentImpl.getNodeName(fCurrentNodeIndex, false);
-            if (fDocumentTypeIndex != -1 && name != null) {
-                // find corresponding Entity decl
-                boolean found = false;
-                int node = fDeferredDocumentImpl.getLastChild(fDocumentTypeIndex, false);
-                while (node != -1) {
-                    short nodeType = fDeferredDocumentImpl.getNodeType(node, false);
-                    if (nodeType == Node.ENTITY_NODE) {
-                        String nodeName =
-                            fDeferredDocumentImpl.getNodeName(node, false);
-                        if (nodeName.equals(name)) {
-                            found = true;
-                            break;
-                        }
-                    }
-                    node = fDeferredDocumentImpl.getRealPrevSibling(node, false);
-                }
-                if (found) {
-                    fDeferredDocumentImpl.setEntityInfo(node, version, encoding);
-                }
-            }
-        }
-    } // textDecl(String,String)
-
-    /**
-     * A comment.
-     *
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-        
-        if (!fIncludeComments) {
-              return;
-        }
-        if (!fDeferNodeExpansion) {
-            Comment comment = fDocument.createComment(text.toString());
-            fCurrentNode.appendChild(comment);
-        }
-        else {
-            int comment =
-                fDeferredDocumentImpl.createDeferredComment(text.toString());
-            fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, comment);
-        }
-
-    } // comment(XMLString)
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     *
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException {
-
-        if (!fDeferNodeExpansion) {
-            ProcessingInstruction pi =
-                fDocument.createProcessingInstruction(target, data.toString());
-            fCurrentNode.appendChild(pi);
-        }
-        else {
-            int pi = fDeferredDocumentImpl.
-                createDeferredProcessingInstruction(target, data.toString());
-            fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, pi);
-        }
-
-    } // processingInstruction(String,XMLString)
-
-    /**
-     * The start of the document.
-     *
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-        throws XNIException {
-
-        fInDocument = true;
-        if (!fDeferNodeExpansion) {
-            if (fDocumentClassName.equals(DEFAULT_DOCUMENT_CLASS_NAME)) {
-                fDocument = new DocumentImpl();
-                fDocumentImpl = (DocumentImpl)fDocument;
-                // REVISIT: when DOM Level 3 is REC rely on Document.support
-                //          instead of specific class
-                // set DOM error checking off
-                fDocumentImpl.setStrictErrorChecking(false);
-                // set actual encoding
-                fDocumentImpl.setActualEncoding(encoding);
-            }
-            else {
-                // use specified document class
-                try {
-                    Class documentClass = Class.forName(fDocumentClassName);
-                    fDocument = (Document)documentClass.newInstance();
-                    // if subclass of our own class that's cool too
-                    Class defaultDocClass =
-                        Class.forName(DEFAULT_DOCUMENT_CLASS_NAME);
-                    if (defaultDocClass.isAssignableFrom(documentClass)) {
-                        fDocumentImpl = (DocumentImpl)fDocument;
-                        // REVISIT: when DOM Level 3 is REC rely on
-                        //          Document.support instead of specific class
-                        // set DOM error checking off
-                        fDocumentImpl.setStrictErrorChecking(false);
-                    }
-                }
-                catch (ClassNotFoundException e) {
-                    // won't happen we already checked that earlier
-                }
-                catch (Exception e) {
-                    // REVISIT: Localize this message.
-                    throw new RuntimeException(
-                                 "Failed to create document object of class: "
-                                 + fDocumentClassName);
-                }
-            }
-            fCurrentNode = fDocument;
-        }
-        else {
-            fDeferredDocumentImpl = new DeferredDocumentImpl(fNamespaceAware);
-            fDocument = fDeferredDocumentImpl;
-            fDocumentIndex = fDeferredDocumentImpl.createDeferredDocument();
-            fCurrentNodeIndex = fDocumentIndex;
-        }
-
-    } // startDocument(String,String)
-
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     * 
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.
-     * @param augs       Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, String standalone, 
-                        Augmentations augs)
-        throws XNIException {
-        if (!fDeferNodeExpansion) {
-            // REVISIT: when DOM Level 3 is REC rely on Document.support
-            //          instead of specific class
-            if (fDocumentImpl != null) {
-                fDocumentImpl.setVersion(version);
-                fDocumentImpl.setEncoding(encoding);
-                fDocumentImpl.setStandalone("true".equals(standalone));
-            }
-        }
-        else {
-            fDeferredDocumentImpl.setVersion(version);
-            fDeferredDocumentImpl.setEncoding(encoding);
-            fDeferredDocumentImpl.setStandalone("true".equals(standalone));
-        }
-    } // xmlDecl(String,String,String)
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     *
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     *                    otherwise.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement,
-                            String publicId, String systemId, Augmentations augs)
-        throws XNIException {
-
-        if (!fDeferNodeExpansion) {
-            if (fDocumentImpl != null) {
-                fDocumentType = fDocumentImpl.createDocumentType(
-                                    rootElement, publicId, systemId);
-                fCurrentNode.appendChild(fDocumentType);
-            }
-        }
-        else {
-            fDocumentTypeIndex = fDeferredDocumentImpl.
-                createDeferredDocumentType(rootElement, publicId, systemId);
-            fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, fDocumentTypeIndex);
-        }
-
-    } // doctypeDecl(String,String,String)
-
-    /**
-     * The start of an element. If the document specifies the start element
-     * by using an empty tag, then the startElement method will immediately
-     * be followed by the endElement method, with no intervening methods.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-        if (!fDeferNodeExpansion) {
-            Element el;
-            if (fNamespaceAware) {
-                el = fDocument.createElementNS(element.uri, element.rawname);
-            }
-            else {
-                el = fDocument.createElement(element.rawname);
-            } 
-            
-            int attrCount = attributes.getLength();
-            for (int i = 0; i < attrCount; i++) {
-                attributes.getName(i, fAttrQName);
-                // DOM Level 2 wants all namespace declaration attributes
-                // to be bound to "http://www.w3.org/2000/xmlns/"
-                String attributeName = fAttrQName.rawname;
-                if (attributeName !=null && (attributeName.startsWith("xmlns:") ||
-                    attributeName.equals("xmlns"))) {
-                    fAttrQName.uri = NamespaceContext.XMLNS_URI;
-                }
-                Attr attr;
-                if (fNamespaceAware) {
-                    attr = fDocument.createAttributeNS(fAttrQName.uri,
-                                                   fAttrQName.rawname);
-                }
-                else {
-                    attr = fDocument.createAttribute(fAttrQName.rawname);
-                }
-                String attrValue = attributes.getValue(i);
-                attr.setValue(attrValue);
-                el.setAttributeNode(attr);
-                // NOTE: The specified value MUST be set after you set
-                //       the node value because that turns the "specified"
-                //       flag to "true" which may overwrite a "false"
-                //       value from the attribute list. -Ac
-                if (fDocumentImpl != null) {
-                    AttrImpl attrImpl = (AttrImpl)attr;
-                    boolean specified = attributes.isSpecified(i);
-                    attrImpl.setSpecified(specified);
-                }
-                // REVISIT: Handle entities in attribute value.
-            }
-            fCurrentNode.appendChild(el);
-            fCurrentNode = el;
-
-            // identifier registration
-            for (int i = 0; i < attrCount; i++) {
-                 if (attributes.getType(i).equals("ID")) {
-                        String identifier = attributes.getValue(i);
-                        fDocumentImpl.putIdentifier(identifier, el);
-                    }
-            }
-        }
-        else {
-            int el = fDeferredDocumentImpl.
-                createDeferredElement(fNamespaceAware ?
-                                      element.uri : null,
-                                      element.rawname, attributes);
-
-            fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, el);
-            fCurrentNodeIndex = el;
-
-            // identifier registration
-            int attrCount = attributes.getLength();
-            for (int i = 0; i < attrCount; i++) {
-                 if (attributes.getType(i).equals("ID")) {
-                        String identifier = attributes.getValue(i);
-                        fDeferredDocumentImpl.putIdentifier(identifier, el);
-                 }
-                   
-            }
-            
-        }
-    } // startElement(QName,XMLAttributes)
-
-    /**
-     * Character content.
-     *
-     * @param text The content.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-        if (!fDeferNodeExpansion) {
-            if (fInCDATASection && fCreateCDATANodes) {
-                if (fCurrentCDATASection == null) {
-                    fCurrentCDATASection =
-                        fDocument.createCDATASection(text.toString());
-                    fCurrentNode.appendChild(fCurrentCDATASection);
-                    fCurrentNode = fCurrentCDATASection;
-                }
-                else {
-                    fCurrentCDATASection.appendData(text.toString());
-                }
-            }
-            else if (!fInDTD) {
-                Node child = fCurrentNode.getLastChild();
-                if (child != null && child.getNodeType() == Node.TEXT_NODE) {
-                    Text textNode = (Text)child;
-                    textNode.appendData(text.toString());
-                }
-                else {
-                    Text textNode = fDocument.createTextNode(text.toString());
-                    fCurrentNode.appendChild(textNode);
-                }
-            }
-        }
-        else {
-            // The Text and CDATASection normalization is taken care of within
-            // the DOM in the deferred case.
-            if (fInCDATASection && fCreateCDATANodes) {
-                if (fCurrentCDATASectionIndex == -1) {
-                    int cs = fDeferredDocumentImpl.
-                        createDeferredCDATASection(text.toString());
-
-                    fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, cs);
-                    fCurrentCDATASectionIndex = cs;
-                    fCurrentNodeIndex = cs;
-                }
-                else {
-                    int txt = fDeferredDocumentImpl.
-                        createDeferredTextNode(text.toString(), false);
-                    fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, txt);
-                }
-            } else if (!fInDTD) {
-                int txt = fDeferredDocumentImpl.
-                    createDeferredTextNode(text.toString(), false);
-                fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, txt);
-            }
-        }
-    } // characters(XMLString)
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     *
-     * @param text The ignorable whitespace.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-
-        if (!fIncludeIgnorableWhitespace) {
-            return;
-        }
-
-        if (!fDeferNodeExpansion) {
-            Node child = fCurrentNode.getLastChild();
-            if (child != null && child.getNodeType() == Node.TEXT_NODE) {
-                Text textNode = (Text)child;
-                textNode.appendData(text.toString());
-            }
-            else {
-                Text textNode = fDocument.createTextNode(text.toString());
-                if (fDocumentImpl != null) {
-                    TextImpl textNodeImpl = (TextImpl)textNode;
-                    textNodeImpl.setIgnorableWhitespace(true);
-                }
-                fCurrentNode.appendChild(textNode);
-            }
-        }
-        else {
-            // The Text normalization is taken care of within the DOM in the
-            // deferred case.
-            int txt = fDeferredDocumentImpl.
-                createDeferredTextNode(text.toString(), true);
-            fDeferredDocumentImpl.appendChild(fCurrentNodeIndex, txt);
-        }
-
-    } // ignorableWhitespace(XMLString)
-
-    /**
-     * The end of an element.
-     *
-     * @param element The name of the element.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-        if (!fDeferNodeExpansion) {
-            fCurrentNode = fCurrentNode.getParentNode();
-        }
-        else {
-            fCurrentNodeIndex =
-                fDeferredDocumentImpl.getParentNode(fCurrentNodeIndex, false);
-        }
-
-
-    } // endElement(QName)
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
-    } // endPrefixMapping(String)
-
-    /**
-     * The start of a CDATA section.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-
-        fInCDATASection = true;
-    } // startCDATA()
-
-    /**
-     * The end of a CDATA section.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException {
-
-        fInCDATASection = false;
-        if (!fDeferNodeExpansion) {
-            if (fCurrentCDATASection !=null) {
-                fCurrentNode = fCurrentNode.getParentNode();
-                fCurrentCDATASection = null;
-            }
-        }
-        else {
-            if (fCurrentCDATASectionIndex !=-1) {            
-                fCurrentNodeIndex =
-                fDeferredDocumentImpl.getParentNode(fCurrentNodeIndex, false);
-                fCurrentCDATASectionIndex = -1;
-            }
-        } 
-
-    } // endCDATA()
-
-    /**
-     * The end of the document.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException {
-
-        fInDocument = false;
-        if (!fDeferNodeExpansion) {
-            // REVISIT: when DOM Level 3 is REC rely on Document.support
-            //          instead of specific class
-            // set DOM error checking back on
-            if (fDocumentImpl != null) {
-                fDocumentImpl.setStrictErrorChecking(true);
-            }
-            fCurrentNode = null;
-        }
-        else {
-            fCurrentNodeIndex = -1;
-        }
-
-    } // endDocument()
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" parameter entity names start with '%'; and general entity
-     * names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name The name of the entity.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-
-        if (fInDocument && !fInDTD && fCreateEntityRefNodes) {
-            if (!fDeferNodeExpansion) {
-                if (fDocumentType != null) {
-                    NamedNodeMap entities = fDocumentType.getEntities();
-                    NodeImpl entity = (NodeImpl)entities.getNamedItem(name);
-                    if (entity != null && entity.getFirstChild() == null) {
-                        entity.setReadOnly(false, true);
-                        Node child = fCurrentNode.getFirstChild();
-                        while (child != null) {
-                            Node copy = child.cloneNode(true);
-                            entity.appendChild(copy);
-                            child = child.getNextSibling();
-                        }
-                        entity.setReadOnly(true, true);
-                        entities.setNamedItem(entity);
-                    }
-                }
-                fCurrentNode = fCurrentNode.getParentNode();
-            }
-            else {
-                int entityIndex = -1;
-                int dtChildIndex = fDeferredDocumentImpl.getLastChild(fDocumentTypeIndex, false);
-                while (dtChildIndex != -1) {
-                    short nodeType = fDeferredDocumentImpl.getNodeType(dtChildIndex, false);
-                    if (nodeType == Node.ENTITY_NODE) {
-                        String nodeName = fDeferredDocumentImpl.getNodeName(dtChildIndex, false);
-                        if (nodeName.equals(name)) {
-                            if (fDeferredDocumentImpl.getLastChild(dtChildIndex, false) == -1) {
-                                entityIndex = dtChildIndex;
-                            }
-                            break;
-                        }
-                    }
-                    dtChildIndex = fDeferredDocumentImpl.getRealPrevSibling(dtChildIndex, false);
-                }
-                if (entityIndex != -1) {
-                    int prevIndex = -1;
-                    int childIndex = fDeferredDocumentImpl.getLastChild(fCurrentNodeIndex, false);
-                    while (childIndex != -1) {
-                        int cloneIndex = fDeferredDocumentImpl.cloneNode(childIndex, true);
-                        fDeferredDocumentImpl.insertBefore(entityIndex, cloneIndex, prevIndex);
-                        prevIndex = cloneIndex;
-                        childIndex = fDeferredDocumentImpl.getRealPrevSibling(childIndex, false);
-                    }
-                }
-                fCurrentNodeIndex =
-                    fDeferredDocumentImpl.getParentNode(fCurrentNodeIndex,
-                                                        false);
-            }
-        }
-
-    } // endEntity(String)
-
-    //
-    // XMLDTDHandler methods
-    //
-
-    /**
-     * The start of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDTD(XMLLocator locator) throws XNIException {
-        super.startDTD(locator);
-        if (fDeferNodeExpansion || fDocumentImpl != null) {
-            fInternalSubset = new StringBuffer(1024);
-        }
-    } // startDTD(XMLLocator)
-
-    /**
-     * The end of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDTD() throws XNIException {
-        super.endDTD();
-        String internalSubset = fInternalSubset != null && fInternalSubset.length() > 0
-                              ? fInternalSubset.toString() : null;
-        if (fDeferNodeExpansion) {
-            if (internalSubset != null) {
-                fDeferredDocumentImpl.setInternalSubset(fDocumentTypeIndex, internalSubset);
-            }
-        }
-        else if (fDocumentImpl != null) {
-            if (internalSubset != null) {
-                ((DocumentTypeImpl)fDocumentType).setInternalSubset(internalSubset);
-            }
-        }
-    } // endDTD()
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the 
-     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-        if (name.equals("[dtd]")) {
-            fInDTDExternalSubset = true;
-        }
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-        if (name.equals("[dtd]")) {
-            fInDTDExternalSubset = false;
-        }
-    } // endEntity(String)
-
-    /**
-     * An internal entity declaration.
-     * 
-     * @param name The name of the entity. Parameter entity names start with
-     *             '%', whereas the name of a general entity is just the 
-     *             entity name.
-     * @param text The value of the entity.
-     * @param nonNormalizedText The non-normalized value of the entity. This
-     *             value contains the same sequence of characters that was in 
-     *             the internal entity declaration, without any entity
-     *             references expanded.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void internalEntityDecl(String name, XMLString text, 
-                                   XMLString nonNormalizedText) 
-        throws XNIException {
-
-        // internal subset string
-        if (fInternalSubset != null && !fInDTDExternalSubset) {
-            fInternalSubset.append("<!ENTITY ");
-            if (name.startsWith("%")) {
-                fInternalSubset.append("% ");
-                fInternalSubset.append(name.substring(1));
-            }
-            else {
-                fInternalSubset.append(name);
-            }
-            fInternalSubset.append(' ');
-            String value = nonNormalizedText.toString();
-            boolean singleQuote = value.indexOf('\'') == -1;
-            fInternalSubset.append(singleQuote ? '\'' : '"');
-            fInternalSubset.append(value);
-            fInternalSubset.append(singleQuote ? '\'' : '"');
-            fInternalSubset.append(">\n");
-        }
-
-        // NOTE: We only know how to create these nodes for the Xerces
-        //       DOM implementation because DOM Level 2 does not specify 
-        //       that functionality. -Ac
-
-        // create full node
-        // don't add parameter entities!
-        if(name.startsWith("%"))
-            return;
-        if (fDocumentType != null) {
-            NamedNodeMap entities = fDocumentType.getEntities();
-            EntityImpl entity = (EntityImpl)entities.getNamedItem(name);
-            if (entity == null) {
-                entity = (EntityImpl)fDocumentImpl.createEntity(name);
-                entities.setNamedItem(entity);
-            }
-        }
-            
-        // create deferred node        
-        if (fDocumentTypeIndex != -1) {
-            boolean found = false;
-            int node = fDeferredDocumentImpl.getLastChild(fDocumentTypeIndex, false);
-            while (node != -1) {
-                short nodeType = fDeferredDocumentImpl.getNodeType(node, false);
-                if (nodeType == Node.ENTITY_NODE) {
-                    String nodeName = fDeferredDocumentImpl.getNodeName(node, false);
-                    if (nodeName.equals(name)) {
-                        found = true;
-                        break;
-                    }
-                }
-                node = fDeferredDocumentImpl.getRealPrevSibling(node, false);
-            }
-            if (!found) {
-                int entityIndex =
-                    fDeferredDocumentImpl.createDeferredEntity(name, null, null, null);
-                fDeferredDocumentImpl.appendChild(fDocumentTypeIndex, entityIndex);
-            }
-        }
-    
-    } // internalEntityDecl(String,XMLString,XMLString)
-
-    /**
-     * An external entity declaration.
-     * 
-     * @param name     The name of the entity. Parameter entity names start
-     *                 with '%', whereas the name of a general entity is just
-     *                 the entity name.
-     * @param publicId The public identifier of the entity or null if the
-     *                 the entity was specified with SYSTEM.
-     * @param systemId The system identifier of the entity.
-     * @param baseSystemId The base system identifier where this entity
-     *                     is declared.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void externalEntityDecl(String name, 
-                                   String publicId, String systemId,
-                                   String baseSystemId) throws XNIException {
-
-        // internal subset string
-        if (fInternalSubset != null && !fInDTDExternalSubset) {
-            fInternalSubset.append("<!ENTITY ");
-            if (name.startsWith("%")) {
-                fInternalSubset.append("% ");
-                fInternalSubset.append(name.substring(1));
-            }
-            else {
-                fInternalSubset.append(name);
-            }
-            fInternalSubset.append(' ');
-            if (publicId != null) {
-                fInternalSubset.append("PUBLIC '");
-                fInternalSubset.append(publicId);
-                fInternalSubset.append("' '");
-            }
-            else {
-                fInternalSubset.append("SYSTEM '");
-            }
-            fInternalSubset.append(systemId);
-            fInternalSubset.append("'>\n");
-        }
-
-        // NOTE: We only know how to create these nodes for the Xerces
-        //       DOM implementation because DOM Level 2 does not specify 
-        //       that functionality. -Ac
-
-        // create full node
-        // don't add parameter entities!
-        if(name.startsWith("%"))
-            return;
-        if (fDocumentType != null) {
-            NamedNodeMap entities = fDocumentType.getEntities();
-            EntityImpl entity = (EntityImpl)entities.getNamedItem(name);
-            if (entity == null) {
-                entity = (EntityImpl)fDocumentImpl.createEntity(name);
-                entity.setPublicId(publicId);
-                entity.setSystemId(systemId);
-                entities.setNamedItem(entity);
-            }
-        }
-            
-        // create deferred node
-        if (fDocumentTypeIndex != -1) {
-            boolean found = false;
-            int nodeIndex = fDeferredDocumentImpl.getLastChild(fDocumentTypeIndex, false);
-            while (nodeIndex != -1) {
-                short nodeType = fDeferredDocumentImpl.getNodeType(nodeIndex, false);
-                if (nodeType == Node.ENTITY_NODE) {
-                    String nodeName = fDeferredDocumentImpl.getNodeName(nodeIndex, false);
-                    if (nodeName.equals(name)) {
-                        found = true;
-                        break;
-                    }
-                }
-                nodeIndex = fDeferredDocumentImpl.getRealPrevSibling(nodeIndex, false);
-            }
-            if (!found) {
-                int entityIndex = fDeferredDocumentImpl.createDeferredEntity(
-                                    name, publicId, systemId, null);
-                fDeferredDocumentImpl.appendChild(fDocumentTypeIndex, entityIndex);
-            }
-        }
-    
-    } // externalEntityDecl(String,String,String,String)
-
-    /**
-     * An unparsed entity declaration.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the entity, or null if not
-     *                 specified.
-     * @param notation The name of the notation.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void unparsedEntityDecl(String name, 
-                                   String publicId, String systemId, 
-                                   String notation) throws XNIException {
-
-        // internal subset string
-        if (fInternalSubset != null && !fInDTDExternalSubset) {
-            fInternalSubset.append("<!ENTITY ");
-            fInternalSubset.append(name);
-            fInternalSubset.append(' ');
-            if (publicId != null) {
-                fInternalSubset.append("PUBLIC '");
-                fInternalSubset.append(publicId);
-                if (systemId != null) {
-                    fInternalSubset.append("' '");
-                    fInternalSubset.append(systemId);
-                }
-            }
-            else {
-                fInternalSubset.append("SYSTEM '");
-                fInternalSubset.append(systemId);
-            }
-            fInternalSubset.append("' NDATA ");
-            fInternalSubset.append(notation);
-            fInternalSubset.append(">\n");
-        }
-
-        // NOTE: We only know how to create these nodes for the Xerces
-        //       DOM implementation because DOM Level 2 does not specify 
-        //       that functionality. -Ac
-
-        // create full node
-        if (fDocumentType != null) {
-            NamedNodeMap entities = fDocumentType.getEntities();
-            EntityImpl entity = (EntityImpl)entities.getNamedItem(name);
-            if (entity == null) {
-                entity = (EntityImpl)fDocumentImpl.createEntity(name);
-                entity.setPublicId(publicId);
-                entity.setSystemId(systemId);
-                entity.setNotationName(notation);
-                entities.setNamedItem(entity);
-            }
-        }
-            
-        // create deferred node        
-        if (fDocumentTypeIndex != -1) {
-            boolean found = false;
-            int nodeIndex = fDeferredDocumentImpl.getLastChild(fDocumentTypeIndex, false);
-            while (nodeIndex != -1) {
-                short nodeType = fDeferredDocumentImpl.getNodeType(nodeIndex, false);
-                if (nodeType == Node.ENTITY_NODE) {
-                    String nodeName = fDeferredDocumentImpl.getNodeName(nodeIndex, false);
-                    if (nodeName.equals(name)) {
-                        found = true;
-                        break;
-                    }
-                }
-                nodeIndex = fDeferredDocumentImpl.getRealPrevSibling(nodeIndex, false);
-            }
-            if (!found) {
-                int entityIndex = fDeferredDocumentImpl.createDeferredEntity(
-                                    name, publicId, systemId, notation);
-                fDeferredDocumentImpl.appendChild(fDocumentTypeIndex, entityIndex);
-            }
-        }
-    
-    } // unparsedEntityDecl(String,String,String,String)
-
-    /**
-     * A notation declaration
-     * 
-     * @param name     The name of the notation.
-     * @param publicId The public identifier of the notation, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the notation, or null if not
-     *                 specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws XNIException {
-
-        // internal subset string
-        if (fInternalSubset != null && !fInDTDExternalSubset) {
-            fInternalSubset.append("<!NOTATION ");
-            if (publicId != null) {
-                fInternalSubset.append("PUBLIC '");
-                fInternalSubset.append(publicId);
-                if (systemId != null) {
-                    fInternalSubset.append("' '");
-                    fInternalSubset.append(systemId);
-                }
-            }
-            else {
-                fInternalSubset.append("SYSTEM '");
-                fInternalSubset.append(systemId);
-            }
-            fInternalSubset.append("'>\n");
-        }
-
-        // NOTE: We only know how to create these nodes for the Xerces
-        //       DOM implementation because DOM Level 2 does not specify 
-        //       that functionality. -Ac
-
-        // create full node
-        if (fDocumentType != null) {
-            NamedNodeMap notations = fDocumentType.getNotations();
-            if (notations.getNamedItem(name) == null) {
-                NotationImpl notation = (NotationImpl)fDocumentImpl.createNotation(name);
-                notation.setPublicId(publicId);
-                notation.setSystemId(systemId);
-                notations.setNamedItem(notation);
-            }
-        }
-
-        // create deferred node
-        if (fDocumentTypeIndex != -1) {
-            boolean found = false;
-            int nodeIndex = fDeferredDocumentImpl.getLastChild(fDocumentTypeIndex, false);
-            while (nodeIndex != -1) {
-                short nodeType = fDeferredDocumentImpl.getNodeType(nodeIndex, false);
-                if (nodeType == Node.NOTATION_NODE) {
-                    String nodeName = fDeferredDocumentImpl.getNodeName(nodeIndex, false);
-                    if (nodeName.equals(name)) {
-                        found = true;
-                        break;
-                    }
-                }
-                nodeIndex = fDeferredDocumentImpl.getPrevSibling(nodeIndex, false);
-            }
-            if (!found) {
-                int notationIndex = fDeferredDocumentImpl.createDeferredNotation(
-                                        name, publicId, systemId);
-                fDeferredDocumentImpl.appendChild(fDocumentTypeIndex, notationIndex);
-            }
-        }
-
-    } // notationDecl(String,String,String)
-
-    /**
-     * An element declaration.
-     * 
-     * @param name         The name of the element.
-     * @param contentModel The element content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void elementDecl(String name, String contentModel)
-        throws XNIException {
-
-        // internal subset string
-        if (fInternalSubset != null && !fInDTDExternalSubset) {
-            fInternalSubset.append("<!ELEMENT ");
-            fInternalSubset.append(name);
-            fInternalSubset.append(' ');
-            fInternalSubset.append(contentModel);
-            fInternalSubset.append(">\n");
-        }
-
-    } // elementDecl(String,String)
-
-    /**
-     * An attribute declaration.
-     * 
-     * @param elementName   The name of the element that this attribute
-     *                      is associated with.
-     * @param attributeName The name of the attribute.
-     * @param type          The attribute type. This value will be one of
-     *                      the following: "CDATA", "ENTITY", "ENTITIES",
-     *                      "ENUMERATION", "ID", "IDREF", "IDREFS", 
-     *                      "NMTOKEN", "NMTOKENS", or "NOTATION".
-     * @param enumeration   If the type has the value "ENUMERATION" or
-     *                      "NOTATION", this array holds the allowed attribute
-     *                      values; otherwise, this array is null.
-     * @param defaultType   The attribute default type. This value will be
-     *                      one of the following: "#FIXED", "#IMPLIED",
-     *                      "#REQUIRED", or null.
-     * @param defaultValue  The attribute default value, or null if no
-     *                      default value is specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void attributeDecl(String elementName, String attributeName, 
-                              String type, String[] enumeration, 
-                              String defaultType, XMLString defaultValue)
-        throws XNIException {
-
-        // internal subset string
-        if (fInternalSubset != null && !fInDTDExternalSubset) {
-            fInternalSubset.append("<!ATTLIST ");
-            fInternalSubset.append(elementName);
-            fInternalSubset.append(' ');
-            fInternalSubset.append(attributeName);
-            fInternalSubset.append(' ');
-            if (type.equals("ENUMERATION")) {
-                fInternalSubset.append('(');
-                for (int i = 0; i < enumeration.length; i++) {
-                    if (i > 0) {
-                        fInternalSubset.append('|');
-                    }
-                    fInternalSubset.append(enumeration[i]);
-                }
-                fInternalSubset.append(')');
-            }
-            else {
-                fInternalSubset.append(type);
-            }
-            if (defaultType != null) {
-                fInternalSubset.append(' ');
-                fInternalSubset.append(defaultType);
-            }
-            if (defaultValue != null) {
-                fInternalSubset.append(" '");
-                for (int i = 0; i < defaultValue.length; i++) {
-                    char c = defaultValue.ch[defaultValue.offset + i];
-                    if (c == '\'') {
-                        fInternalSubset.append("&apos;");
-                    }
-                    else {
-                        fInternalSubset.append(c);
-                    }
-                }
-                fInternalSubset.append('\'');
-            }
-            fInternalSubset.append(">\n");
-        }
-
-        // deferred expansion
-        if (fDeferredDocumentImpl != null) {
-
-            // get the default value
-            if (defaultValue != null) {
-
-                // get element definition
-                int elementDefIndex  = fDeferredDocumentImpl.lookupElementDefinition(elementName);
-
-                // create element definition if not already there
-                if (elementDefIndex == -1) {
-                    elementDefIndex = fDeferredDocumentImpl.createDeferredElementDefinition(elementName);
-                    fDeferredDocumentImpl.appendChild(fDocumentTypeIndex, elementDefIndex);
-                }
-
-                // add default attribute
-                int attrIndex = fDeferredDocumentImpl.createDeferredAttribute(
-                                    attributeName, defaultValue.toString(), false);
-                fDeferredDocumentImpl.appendChild(elementDefIndex, attrIndex);
-            }
-
-        } // if deferred
-
-        // full expansion
-        else if (fDocumentImpl != null) {
-
-            // get the default value
-            if (defaultValue != null) {
-
-                // get element definition node
-                NamedNodeMap elements = ((DocumentTypeImpl)fDocumentType).getElements();
-                ElementDefinitionImpl elementDef = (ElementDefinitionImpl)elements.getNamedItem(elementName);
-                if (elementDef == null) {
-                    elementDef = fDocumentImpl.createElementDefinition(elementName);
-                    ((DocumentTypeImpl)fDocumentType).getElements().setNamedItem(elementDef);
-                }
-
-                // REVISIT: Check for uniqueness of element name? -Ac
-
-                // create attribute and set properties
-                boolean nsEnabled = fNamespaceAware;
-                AttrImpl attr;
-                if (nsEnabled) {
-                    String namespaceURI = null;
-                    // DOM Level 2 wants all namespace declaration attributes
-                    // to be bound to "http://www.w3.org/2000/xmlns/"
-                    // So as long as the XML parser doesn't do it, it needs to
-                    // done here.
-                    if (attributeName.startsWith("xmlns:") ||
-                        attributeName.equals("xmlns")) {
-                        namespaceURI = NamespaceContext.XMLNS_URI;
-                    }
-                    attr = (AttrImpl)fDocumentImpl.createAttributeNS(namespaceURI,
-                                                                attributeName);
-                }
-                else {
-                    attr = (AttrImpl)fDocumentImpl.createAttribute(attributeName);
-                }
-                attr.setValue(defaultValue.toString());
-                attr.setSpecified(false);
-
-                // add default attribute to element definition
-                if (nsEnabled){
-                    elementDef.getAttributes().setNamedItemNS(attr);
-                }
-                else {
-                    elementDef.getAttributes().setNamedItem(attr);
-                }
-            }
-
-        } // if NOT defer-node-expansion
-
-    } // attributeDecl(String,String,String,String[],String,XMLString)
-
-} // class AbstractDOMParser
diff --git a/src/org/apache/xerces/parsers/AbstractSAXParser.java b/src/org/apache/xerces/parsers/AbstractSAXParser.java
deleted file mode 100644
index 28f6511..0000000
--- a/src/org/apache/xerces/parsers/AbstractSAXParser.java
+++ /dev/null
@@ -1,1983 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Hashtable;
-import java.util.Locale;
-
-import org.apache.xerces.impl.Constants;
-
-import org.apache.xerces.util.EntityResolverWrapper;
-import org.apache.xerces.util.ErrorHandlerWrapper;
-import org.apache.xerces.util.SymbolTable;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLParseException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.ext.DeclHandler;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * This is the base class of all SAX parsers. It implements both the
- * SAX1 and SAX2 parser functionality, while the actual pipeline is
- * defined in the parser configuration.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Arnaud Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public abstract class AbstractSAXParser
-    extends AbstractXMLDocumentParser
-    implements Parser, XMLReader // SAX1, SAX2
-{
-
-    //
-    // Constants
-    //
-
-    // features
-
-    /** Feature identifier: namespaces. */
-    protected static final String NAMESPACES =
-        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
-    /** Feature identifier: namespace prefixes. */
-    protected static final String NAMESPACE_PREFIXES =
-        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACE_PREFIXES_FEATURE;
-
-    // NOTE: The symbol table properties is for internal use. -Ac
-
-    /** Property identifier: symbol table. */
-    protected static final String SYMBOL_TABLE =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    //
-    // Data
-    //
-
-    // features
-
-    /** Namespaces. */
-    protected boolean fNamespaces;
-
-    /** Namespace prefixes. */
-    protected boolean fNamespacePrefixes = false;
-
-    // parser handlers
-
-    /** Content handler. */
-    protected ContentHandler fContentHandler;
-
-    /** Document handler. */
-    protected DocumentHandler fDocumentHandler;
-
-    /** DTD handler. */
-    protected org.xml.sax.DTDHandler fDTDHandler;
-
-    /** Decl handler. */
-    protected DeclHandler fDeclHandler;
-
-    /** Lexical handler. */
-    protected LexicalHandler fLexicalHandler;
-
-    protected QName fQName = new QName();
-
-    // symbols
-
-    /** Symbol: empty string (""). */
-    private String fEmptySymbol;
-    private String fXmlnsSymbol;
-
-    // state
-
-    /**
-     * True if a parse is in progress. This state is needed because
-     * some features/properties cannot be set while parsing (e.g.
-     * validation and namespaces).
-     */
-    protected boolean fParseInProgress = false;
-
-    // temp vars
-    private final AttributesProxy fAttributesProxy = new AttributesProxy();
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    protected AbstractSAXParser(XMLParserConfiguration config) {
-        super(config);
-
-        final String[] recognizedFeatures = {
-            NAMESPACES,
-            NAMESPACE_PREFIXES,
-            Constants.SAX_FEATURE_PREFIX + Constants.STRING_INTERNING_FEATURE,
-        };
-        config.addRecognizedFeatures(recognizedFeatures);
-
-        final String[] recognizedProperties = {
-            Constants.SAX_PROPERTY_PREFIX + Constants.LEXICAL_HANDLER_PROPERTY,
-            Constants.SAX_PROPERTY_PREFIX + Constants.DECLARATION_HANDLER_PROPERTY,
-            Constants.SAX_PROPERTY_PREFIX + Constants.DOM_NODE_PROPERTY,
-        };
-        config.addRecognizedProperties(recognizedProperties);
-
-    } // <init>(XMLParserConfiguration)
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * The start of the document.
-     *
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs)
-        throws XNIException {
-
-        try {
-            // SAX1
-            if (fDocumentHandler != null) {
-                if (locator != null) {
-                    fDocumentHandler.setDocumentLocator(new LocatorProxy(locator));
-                }
-                fDocumentHandler.startDocument();
-            }
-
-            // SAX2
-            if (fContentHandler != null) {
-                if (locator != null) {
-                    fContentHandler.setDocumentLocator(new LocatorProxy(locator));
-                }
-                fContentHandler.startDocument();
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // startDocument(String,String)
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     *
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     *                    otherwise.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement,
-                            String publicId, String systemId, Augmentations augs)
-        throws XNIException {
-        fInDTD = true;
-
-        try {
-            // SAX2 extension
-            if (fLexicalHandler != null) {
-                fLexicalHandler.startDTD(rootElement, publicId, systemId);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // doctypeDecl(String,String,String)
-
-        /**
-     * This method notifies of the start of an entity. The DTD has the
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
-     * general entity names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> Since the document is an entity, the handler
-     * will be notified of the start of the document entity by calling the
-     * startEntity method with the entity name "[xml]" <em>before</em> calling
-     * the startDocument method. When exposing entity boundaries through the
-     * SAX API, the document entity is never reported, however.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, String publicId, String systemId,
-                            String baseSystemId, String encoding, Augmentations augs)
-        throws XNIException {
-        
-        startEntity(name, publicId, systemId, baseSystemId, encoding);
-
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" parameter entity names start with '%'; and general entity
-     * names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> Since the document is an entity, the handler
-     * will be notified of the end of the document entity by calling the
-     * endEntity method with the entity name "[xml]" <em>after</em> calling
-     * the endDocument method. When exposing entity boundaries through the
-     * SAX API, the document entity is never reported, however.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name The name of the entity.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException {
-
-        endEntity(name);
-
-    } // endEntity(String)
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-        throws XNIException {
-
-        try {
-            // SAX2
-            if (fContentHandler != null) {
-                fContentHandler.startPrefixMapping(prefix, uri);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // startPrefixMapping(String prefix, String uri)
-
-    /**
-     * The start of an element. If the document specifies the start element
-     * by using an empty tag, then the startElement method will immediately
-     * be followed by the endElement method, with no intervening methods.
-     *
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-
-        try {
-            // SAX1
-            if (fDocumentHandler != null) {
-                fAttributesProxy.setAttributes(attributes);
-                fDocumentHandler.startElement(element.rawname, fAttributesProxy);
-            }
-
-            // SAX2
-            if (fContentHandler != null) {
-
-                int len = attributes.getLength();
-                for (int i = len - 1; i >= 0; i--) {
-                    attributes.getName(i, fQName);
-                    if (fQName.prefix == fXmlnsSymbol || 
-                        fQName.rawname == fXmlnsSymbol) {
-                        if (!fNamespacePrefixes) {
-                            // remove namespace declaration attributes
-                            attributes.removeAttributeAt(i);
-                        }
-                        else if (fNamespaces && fNamespacePrefixes) {
-                            // localpart should be empty string as per SAX documentation:
-                            // http://www.saxproject.org/?selected=namespaces
-                            fQName.prefix = fEmptySymbol;
-                            fQName.localpart = fEmptySymbol;
-                            attributes.setName(i, fQName);
-                        }
-                    }
-                  
-                }
-                
-                String uri = element.uri != null ? element.uri : fEmptySymbol;
-                String localpart = fNamespaces ? element.localpart : fEmptySymbol;
-                fAttributesProxy.setAttributes(attributes);
-                fContentHandler.startElement(uri, localpart, element.rawname,
-                                             fAttributesProxy);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // startElement(QName,XMLAttributes)
-
-    /**
-     * Character content.
-     *
-     * @param text The content.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-
-
-        try {
-            // SAX1
-            if (fDocumentHandler != null) {
-                fDocumentHandler.characters(text.ch, text.offset, text.length);
-            }
-
-            // SAX2
-            if (fContentHandler != null) {
-                fContentHandler.characters(text.ch, text.offset, text.length);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // characters(XMLString)
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     *
-     * @param text The ignorable whitespace.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-
-        try {
-            // SAX1
-            if (fDocumentHandler != null) {
-                fDocumentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
-            }
-
-            // SAX2
-            if (fContentHandler != null) {
-                fContentHandler.ignorableWhitespace(text.ch, text.offset, text.length);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // ignorableWhitespace(XMLString)
-
-    /**
-     * The end of an element.
-     *
-     * @param element The name of the element.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-        
-
-        try {
-            // SAX1
-            if (fDocumentHandler != null) {
-                fDocumentHandler.endElement(element.rawname);
-            }
-
-            // SAX2
-            if (fContentHandler != null) {
-                String uri = element.uri != null ? element.uri : fEmptySymbol;
-                String localpart = fNamespaces ? element.localpart : fEmptySymbol;
-                fContentHandler.endElement(uri, localpart,
-                                           element.rawname);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // endElement(QName)
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     *
-     * @param prefix The namespace prefix.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs)  throws XNIException {
-
-        try {
-            // SAX2
-            if (fContentHandler != null) {
-                fContentHandler.endPrefixMapping(prefix);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // endPrefixMapping(String)
-
-        /**
-     * The start of a CDATA section.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fLexicalHandler != null) {
-                fLexicalHandler.startCDATA();
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // startCDATA()
-
-    /**
-     * The end of a CDATA section.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fLexicalHandler != null) {
-                fLexicalHandler.endCDATA();
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // endCDATA()
-
-    /**
-     * A comment.
-     *
-     * @param text The text in the comment.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException {
-
-            comment (text);
-
-    } // comment(XMLString)
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     *
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException {
-
-        processingInstruction (target, data);
-
-    } // processingInstruction(String,XMLString)
-
-
-    /**
-     * The end of the document.
-     * @param augs     Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException {
-
-        try {
-            // SAX1
-            if (fDocumentHandler != null) {
-                fDocumentHandler.endDocument();
-            }
-
-            // SAX2
-            if (fContentHandler != null) {
-                fContentHandler.endDocument();
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // endDocument()
-
-
-    //
-    // XMLDTDHandler methods
-    //
-
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     *
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data)
-        throws XNIException {
-
-        //
-        // REVISIT - I keep running into SAX apps that expect
-        //   null data to be an empty string, which is contrary
-        //   to the comment for this method in the SAX API.
-        //
-
-        try {
-            // SAX1
-            if (fDocumentHandler != null) {
-                fDocumentHandler.processingInstruction(target,
-                                                       data.toString());
-            }
-
-            // SAX2
-            if (fContentHandler != null) {
-                fContentHandler.processingInstruction(target, data.toString());
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // processingInstruction(String,XMLString)
-
-
-
-    /**
-     * A comment.
-     *
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text) throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fLexicalHandler != null) {
-                fLexicalHandler.comment(text.ch, 0, text.length);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // comment(XMLString)
-
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the
-     * pseudo-name of "[dtd]" parameter entity names start with '%'; and
-     * general entity names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> Since the document is an entity, the handler
-     * will be notified of the start of the document entity by calling the
-     * startEntity method with the entity name "[xml]" <em>before</em> calling
-     * the startDocument method. When exposing entity boundaries through the
-     * SAX API, the document entity is never reported, however.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, String publicId, String systemId,
-                            String baseSystemId, String encoding)
-        throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fLexicalHandler != null) {
-                fLexicalHandler.startEntity(name);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" parameter entity names start with '%'; and general entity
-     * names are just the entity name.
-     * <p>
-     * <strong>Note:</strong> Since the document is an entity, the handler
-     * will be notified of the end of the document entity by calling the
-     * endEntity method with the entity name "[xml]" <em>after</em> calling
-     * the endDocument method. When exposing entity boundaries through the
-     * SAX API, the document entity is never reported, however.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     *
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fLexicalHandler != null) {
-                fLexicalHandler.endEntity(name);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // endEntity(String)
-
-    /**
-     * An element declaration.
-     *
-     * @param name         The name of the element.
-     * @param contentModel The element content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void elementDecl(String name, String contentModel)
-        throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fDeclHandler != null) {
-                fDeclHandler.elementDecl(name, contentModel);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // elementDecl(String,String)
-
-    /**
-     * An attribute declaration.
-     *
-     * @param elementName   The name of the element that this attribute
-     *                      is associated with.
-     * @param attributeName The name of the attribute.
-     * @param type          The attribute type. This value will be one of
-     *                      the following: "CDATA", "ENTITY", "ENTITIES",
-     *                      "ENUMERATION", "ID", "IDREF", "IDREFS",
-     *                      "NMTOKEN", "NMTOKENS", or "NOTATION".
-     * @param enumeration   If the type has the value "ENUMERATION" or
-     *                      "NOTATION", this array holds the allowed attribute
-     *                      values; otherwise, this array is null.
-     * @param defaultType   The attribute default type. This value will be
-     *                      one of the following: "#FIXED", "#IMPLIED",
-     *                      "#REQUIRED", or null.
-     * @param defaultValue  The attribute default value, or null if no
-     *                      default value is specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void attributeDecl(String elementName, String attributeName,
-                              String type, String[] enumeration,
-                              String defaultType, XMLString defaultValue)
-        throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fDeclHandler != null) {
-                if (type.equals("NOTATION") || 
-                    type.equals("ENUMERATION")) {
-
-                    StringBuffer str = new StringBuffer();
-                    if (type.equals("NOTATION")) {
-                      str.append(type);
-                      str.append(" (");
-                    }
-                    else {
-                      str.append("(");
-                    }
-                    for (int i = 0; i < enumeration.length; i++) {
-                        str.append(enumeration[i]);
-                        if (i < enumeration.length - 1) {
-                            str.append('|');
-                        }
-                    }
-                    str.append(')');
-                    type = str.toString();
-                }
-                String value = (defaultValue==null) ? null : defaultValue.toString();
-                fDeclHandler.attributeDecl(elementName, attributeName,
-                                           type, defaultType, value);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // attributeDecl(String,String,String,String[],String,XMLString)
-
-    /**
-     * An internal entity declaration.
-     *
-     * @param name The name of the entity. Parameter entity names start with
-     *             '%', whereas the name of a general entity is just the
-     *             entity name.
-     * @param text The value of the entity.
-     * @param nonNormalizedText The non-normalized value of the entity. This
-     *             value contains the same sequence of characters that was in
-     *             the internal entity declaration, without any entity
-     *             references expanded.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void internalEntityDecl(String name, XMLString text,
-                                   XMLString nonNormalizedText)
-        throws XNIException {
-
-        try {
-            // SAX2 extensions
-            if (fDeclHandler != null) {
-                fDeclHandler.internalEntityDecl(name, text.toString());
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // internalEntityDecl(String,XMLString,XMLString)
-
-    /**
-     * An external entity declaration.
-     *
-     * @param name     The name of the entity. Parameter entity names start
-     *                 with '%', whereas the name of a general entity is just
-     *                 the entity name.
-     * @param publicId The public identifier of the entity or null if the
-     *                 the entity was specified with SYSTEM.
-     * @param systemId The system identifier of the entity.
-     * @param baseSystemId The baseSystem identifier of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void externalEntityDecl(String name, String publicId,
-                                   String systemId, String baseSystemId) throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fDeclHandler != null) {
-                fDeclHandler.externalEntityDecl(name, publicId, systemId);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // externalEntityDecl(String,String,String,String)
-
-    /**
-     * An unparsed entity declaration.
-     *
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the entity, or null if not
-     *                 specified.
-     * @param notation The name of the notation.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void unparsedEntityDecl(String name, String publicId,
-                                   String systemId, String notation)
-        throws XNIException {
-
-        try {
-            // SAX2 extension
-            if (fDTDHandler != null) {
-                fDTDHandler.unparsedEntityDecl(name, publicId,
-                                               systemId, notation);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // unparsedEntityDecl(String,String,String,String)
-
-    /**
-     * A notation declaration
-     *
-     * @param name     The name of the notation.
-     * @param publicId The public identifier of the notation, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the notation, or null if not
-     *                 specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws XNIException {
-
-        try {
-            // SAX1 and SAX2
-            if (fDTDHandler != null) {
-                fDTDHandler.notationDecl(name, publicId, systemId);
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // notationDecl(String,String,String)
-
-    /**
-     * The end of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDTD() throws XNIException {
-        fInDTD = false;
-
-        try {
-            // SAX2 extension
-            if (fLexicalHandler != null) {
-                fLexicalHandler.endDTD();
-            }
-        }
-        catch (SAXException e) {
-            throw new XNIException(e);
-        }
-
-    } // endDTD()
-
-    //
-    // Parser and XMLReader methods
-    //
-
-    /**
-     * Parses the input source specified by the given system identifier.
-     * <p>
-     * This method is equivalent to the following:
-     * <pre>
-     *     parse(new InputSource(systemId));
-     * </pre>
-     *
-     * @param source The input source.
-     *
-     * @exception org.xml.sax.SAXException Throws exception on SAX error.
-     * @exception java.io.IOException Throws exception on i/o error.
-     */
-    public void parse(String systemId) throws SAXException, IOException {
-
-        // parse document
-        XMLInputSource source = new XMLInputSource(null, systemId, null);
-        try {
-            parse(source);
-        }
-
-        // wrap XNI exceptions as SAX exceptions
-        catch (XMLParseException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                // must be a parser exception; mine it for locator info and throw
-                // a SAXParseException
-                LocatorImpl locatorImpl = new LocatorImpl();
-                locatorImpl.setPublicId(e.getPublicId());
-                locatorImpl.setSystemId(e.getSystemId());
-                locatorImpl.setLineNumber(e.getLineNumber());
-                locatorImpl.setColumnNumber(e.getColumnNumber());
-                throw new SAXParseException(e.getMessage(), locatorImpl);
-            }
-            if (ex instanceof SAXException) {
-                // why did we create an XMLParseException?
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-        catch (XNIException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                throw new SAXException(e.getMessage());
-            }
-            if (ex instanceof SAXException) {
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-
-        // close stream opened by the parser
-        finally {
-            try {
-                Reader reader = source.getCharacterStream();
-                if (reader != null) {
-                    reader.close();
-                }
-                else {
-                    InputStream is = source.getByteStream();
-                    if (is != null) {
-                        is.close();
-                    }
-                }
-            }
-            catch (IOException e) {
-                // ignore
-            }
-        }
-
-    } // parse(String)
-
-    /**
-     * parse
-     *
-     * @param inputSource
-     *
-     * @exception org.xml.sax.SAXException
-     * @exception java.io.IOException
-     */
-    public void parse(InputSource inputSource)
-        throws SAXException, IOException {
-
-        // parse document
-        try {
-            XMLInputSource xmlInputSource =
-                new XMLInputSource(inputSource.getPublicId(),
-                                   inputSource.getSystemId(),
-                                   null);
-            xmlInputSource.setByteStream(inputSource.getByteStream());
-            xmlInputSource.setCharacterStream(inputSource.getCharacterStream());
-            xmlInputSource.setEncoding(inputSource.getEncoding());
-            parse(xmlInputSource);
-        }
-
-        // wrap XNI exceptions as SAX exceptions
-        catch (XMLParseException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                // must be a parser exception; mine it for locator info and throw
-                // a SAXParseException
-                LocatorImpl locatorImpl = new LocatorImpl();
-                locatorImpl.setPublicId(e.getPublicId());
-                locatorImpl.setSystemId(e.getSystemId());
-                locatorImpl.setLineNumber(e.getLineNumber());
-                locatorImpl.setColumnNumber(e.getColumnNumber());
-                throw new SAXParseException(e.getMessage(), locatorImpl);
-            }
-            if (ex instanceof SAXException) {
-                // why did we create an XMLParseException?
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-        catch (XNIException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                throw new SAXException(e.getMessage());
-            }
-            if (ex instanceof SAXException) {
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-
-    } // parse(InputSource)
-
-    /**
-     * Sets the resolver used to resolve external entities. The EntityResolver
-     * interface supports resolution of public and system identifiers.
-     *
-     * @param resolver The new entity resolver. Passing a null value will
-     *                 uninstall the currently installed resolver.
-     */
-    public void setEntityResolver(EntityResolver resolver) {
-
-        try {
-            fConfiguration.setProperty(ENTITY_RESOLVER,
-                                       new EntityResolverWrapper(resolver));
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-
-    } // setEntityResolver(EntityResolver)
-
-    /**
-     * Return the current entity resolver.
-     *
-     * @return The current entity resolver, or null if none
-     *         has been registered.
-     * @see #setEntityResolver
-     */
-    public EntityResolver getEntityResolver() {
-
-        EntityResolver entityResolver = null;
-        try {
-            XMLEntityResolver xmlEntityResolver =
-                (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
-            if (xmlEntityResolver != null &&
-                xmlEntityResolver instanceof EntityResolverWrapper) {
-                entityResolver = ((EntityResolverWrapper)xmlEntityResolver).getEntityResolver();
-            }
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-        return entityResolver;
-
-    } // getEntityResolver():EntityResolver
-
-    /**
-     * Allow an application to register an error event handler.
-     *
-     * <p>If the application does not register an error handler, all
-     * error events reported by the SAX parser will be silently
-     * ignored; however, normal processing may not continue.  It is
-     * highly recommended that all SAX applications implement an
-     * error handler to avoid unexpected bugs.</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param errorHandler The error handler.
-     * @exception java.lang.NullPointerException If the handler
-     *            argument is null.
-     * @see #getErrorHandler
-     */
-    public void setErrorHandler(ErrorHandler errorHandler) {
-
-        try {
-            fConfiguration.setProperty(ERROR_HANDLER,
-                                       new ErrorHandlerWrapper(errorHandler));
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-
-    } // setErrorHandler(ErrorHandler)
-
-    /**
-     * Return the current error handler.
-     *
-     * @return The current error handler, or null if none
-     *         has been registered.
-     * @see #setErrorHandler
-     */
-    public ErrorHandler getErrorHandler() {
-
-        ErrorHandler errorHandler = null;
-        try {
-            XMLErrorHandler xmlErrorHandler =
-                (XMLErrorHandler)fConfiguration.getProperty(ERROR_HANDLER);
-            if (xmlErrorHandler != null &&
-                xmlErrorHandler instanceof ErrorHandlerWrapper) {
-                errorHandler = ((ErrorHandlerWrapper)xmlErrorHandler).getErrorHandler();
-            }
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-        return errorHandler;
-
-    } // getErrorHandler():ErrorHandler
-
-    /**
-     * Set the locale to use for messages.
-     *
-     * @param locale The locale object to use for localization of messages.
-     *
-     * @exception SAXException An exception thrown if the parser does not
-     *                         support the specified locale.
-     *
-     * @see org.xml.sax.Parser
-     */
-    public void setLocale(Locale locale) throws SAXException {
-
-        fConfiguration.setLocale(locale);
-
-    } // setLocale(Locale)
-
-    /**
-     * Allow an application to register a DTD event handler.
-     * <p>
-     * If the application does not register a DTD handler, all DTD
-     * events reported by the SAX parser will be silently ignored.
-     * <p>
-     * Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.
-     *
-     * @param dtdHandler The DTD handler.
-     *
-     * @exception java.lang.NullPointerException If the handler
-     *            argument is null.
-     *
-     * @see #getDTDHandler
-     */
-    public void setDTDHandler(DTDHandler dtdHandler) {
-        // REVISIT: SAX1 doesn't require a null pointer exception
-        //          to be thrown but SAX2 does. [Q] How do we
-        //          resolve this? Currently I'm erring on the side
-        //          of SAX2. -Ac
-        if (dtdHandler == null) {
-            throw new NullPointerException();
-        }
-        fDTDHandler = dtdHandler;
-    } // setDTDHandler(DTDHandler)
-
-    //
-    // Parser methods
-    //
-
-    /**
-     * Allow an application to register a document event handler.
-     * <p>
-     * If the application does not register a document handler, all
-     * document events reported by the SAX parser will be silently
-     * ignored (this is the default behaviour implemented by
-     * HandlerBase).
-     * <p>
-     * Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.
-     *
-     * @param documentHandler The document handler.
-     */
-    public void setDocumentHandler(DocumentHandler documentHandler) {
-        fDocumentHandler = documentHandler;
-    } // setDocumentHandler(DocumentHandler)
-
-    //
-    // XMLReader methods
-    //
-
-    /**
-     * Allow an application to register a content event handler.
-     * <p>
-     * If the application does not register a content handler, all
-     * content events reported by the SAX parser will be silently
-     * ignored.
-     * <p>
-     * Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.
-     *
-     * @param contentHandler The content handler.
-     *
-     * @exception java.lang.NullPointerException If the handler
-     *            argument is null.
-     *
-     * @see #getContentHandler
-     */
-    public void setContentHandler(ContentHandler contentHandler) {
-        fContentHandler = contentHandler;
-    } // setContentHandler(ContentHandler)
-
-    /**
-     * Return the current content handler.
-     *
-     * @return The current content handler, or null if none
-     *         has been registered.
-     *
-     * @see #setContentHandler
-     */
-    public ContentHandler getContentHandler() {
-        return fContentHandler;
-    } // getContentHandler():ContentHandler
-
-    /**
-     * Return the current DTD handler.
-     *
-     * @return The current DTD handler, or null if none
-     *         has been registered.
-     * @see #setDTDHandler
-     */
-    public DTDHandler getDTDHandler() {
-        return fDTDHandler;
-    } // getDTDHandler():DTDHandler
-
-    /**
-     * Set the state of any feature in a SAX2 parser.  The parser
-     * might not recognize the feature, and if it does recognize
-     * it, it might not be able to fulfill the request.
-     *
-     * @param featureId The unique identifier (URI) of the feature.
-     * @param state The requested state of the feature (true or false).
-     *
-     * @exception SAXNotRecognizedException If the
-     *            requested feature is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested feature is known, but the requested
-     *            state is not supported.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            //
-            // SAX2 Features
-            //
-
-            if (featureId.startsWith(Constants.SAX_FEATURE_PREFIX)) {
-                String feature = featureId.substring(Constants.SAX_FEATURE_PREFIX.length());
-
-                // http://xml.org/sax/features/namespaces
-                if (feature.equals(Constants.NAMESPACES_FEATURE)) {
-                    fConfiguration.setFeature(featureId, state);
-                    fNamespaces = state;
-                    return;
-                }
-                // http://xml.org/sax/features/namespace-prefixes
-                //   controls the reporting of raw prefixed names and Namespace
-                //   declarations (xmlns* attributes): when this feature is false
-                //   (the default), raw prefixed names may optionally be reported,
-                //   and xmlns* attributes must not be reported.
-                //
-                if (feature.equals(Constants.NAMESPACE_PREFIXES_FEATURE)) {
-                    fConfiguration.setFeature(featureId, state);
-                    fNamespacePrefixes = state;
-                    return;
-                }
-                // http://xml.org/sax/features/string-interning
-                //   controls the use of java.lang.String#intern() for strings
-                //   passed to SAX handlers.
-                //
-                if (feature.equals(Constants.STRING_INTERNING_FEATURE)) {
-                    if (!state) {
-                        // REVISIT: Localize this error message. -Ac
-                        throw new SAXNotSupportedException(
-                            "PAR018 " + state + " state for feature \"" + featureId
-                            + "\" is not supported.\n" + state + '\t' + featureId);
-                    }
-                    return;
-                }
-
-                //
-                // Drop through and perform default processing
-                //
-            }
-
-            //
-            // Xerces Features
-            //
-
-            /*
-            else if (featureId.startsWith(XERCES_FEATURES_PREFIX)) {
-                String feature = featureId.substring(XERCES_FEATURES_PREFIX.length());
-                //
-                // Drop through and perform default processing
-                //
-            }
-            */
-
-            //
-            // Default handling
-            //
-
-            fConfiguration.setFeature(featureId, state);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // setFeature(String,boolean)
-
-    /**
-     * Query the state of a feature.
-     *
-     * Query the current state of any feature in a SAX2 parser.  The
-     * parser might not recognize the feature.
-     *
-     * @param featureId The unique identifier (URI) of the feature
-     *                  being set.
-     * @return The current state of the feature.
-     * @exception org.xml.sax.SAXNotRecognizedException If the
-     *            requested feature is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested feature is known but not supported.
-     */
-    public boolean getFeature(String featureId)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            //
-            // SAX2 Features
-            //
-
-            if (featureId.startsWith(Constants.SAX_FEATURE_PREFIX)) {
-                String feature =
-                    featureId.substring(Constants.SAX_FEATURE_PREFIX.length());
-
-                // http://xml.org/sax/features/namespace-prefixes
-                //   controls the reporting of raw prefixed names and Namespace
-                //   declarations (xmlns* attributes): when this feature is false
-                //   (the default), raw prefixed names may optionally be reported,
-                //   and xmlns* attributes must not be reported.
-                //
-                if (feature.equals(Constants.NAMESPACE_PREFIXES_FEATURE)) {
-                    boolean state = fConfiguration.getFeature(featureId);
-                    return state;
-                }
-                // http://xml.org/sax/features/string-interning
-                //   controls the use of java.lang.String#intern() for strings
-                //   passed to SAX handlers.
-                //
-                if (feature.equals(Constants.STRING_INTERNING_FEATURE)) {
-                    return true;
-                }
-
-                //
-                // Drop through and perform default processing
-                //
-            }
-
-            //
-            // Xerces Features
-            //
-
-            /*
-            else if (featureId.startsWith(XERCES_FEATURES_PREFIX)) {
-                //
-                // Drop through and perform default processing
-                //
-            }
-            */
-
-            return fConfiguration.getFeature(featureId);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // getFeature(String):boolean
-
-    /**
-     * Set the value of any property in a SAX2 parser.  The parser
-     * might not recognize the property, and if it does recognize
-     * it, it might not support the requested value.
-     *
-     * @param propertyId The unique identifier (URI) of the property
-     *                   being set.
-     * @param Object The value to which the property is being set.
-     *
-     * @exception SAXNotRecognizedException If the
-     *            requested property is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested property is known, but the requested
-     *            value is not supported.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            //
-            // SAX2 core properties
-            //
-
-            if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
-                String property =
-                    propertyId.substring(Constants.SAX_PROPERTY_PREFIX.length());
-                //
-                // http://xml.org/sax/properties/lexical-handler
-                // Value type: org.xml.sax.ext.LexicalHandler
-                // Access: read/write, pre-parse only
-                //   Set the lexical event handler.
-                //
-                if (property.equals(Constants.LEXICAL_HANDLER_PROPERTY)) {
-                    try {
-                        setLexicalHandler((LexicalHandler)value);
-                    }
-                    catch (ClassCastException e) {
-                        // REVISIT: Localize this error message. -ac
-                        throw new SAXNotSupportedException(
-                        "PAR012 For propertyID \""
-                        +propertyId+"\", the value \""
-                        +value+"\" cannot be cast to LexicalHandler."
-                        +'\n'+propertyId+'\t'+value+"\tLexicalHandler");
-                    }
-                    return;
-                }
-                //
-                // http://xml.org/sax/properties/declaration-handler
-                // Value type: org.xml.sax.ext.DeclHandler
-                // Access: read/write, pre-parse only
-                //   Set the DTD declaration event handler.
-                //
-                if (property.equals(Constants.DECLARATION_HANDLER_PROPERTY)) {
-                    try {
-                        setDeclHandler((DeclHandler)value);
-                    }
-                    catch (ClassCastException e) {
-                        // REVISIT: Localize this error message. -ac
-                        throw new SAXNotSupportedException(
-                        "PAR012 For propertyID \""
-                        +propertyId+"\", the value \""
-                        +value+"\" cannot be cast to DeclHandler."
-                        +'\n'+propertyId+'\t'+value+"\tDeclHandler"
-                        );
-                    }
-                    return;
-                }
-                //
-                // http://xml.org/sax/properties/dom-node
-                // Value type: DOM Node
-                // Access: read-only
-                //   Get the DOM node currently being visited, if the SAX parser is
-                //   iterating over a DOM tree.  If the parser recognises and
-                //   supports this property but is not currently visiting a DOM
-                //   node, it should return null (this is a good way to check for
-                //   availability before the parse begins).
-                //
-                if (property.equals(Constants.DOM_NODE_PROPERTY)) {
-                    // REVISIT: Localize this error message. -ac
-                    throw new SAXNotSupportedException(
-                        "PAR013 Property \""+propertyId+"\" is read only."
-                        +'\n'+propertyId
-                        ); // read-only property
-                }
-                //
-                // Drop through and perform default processing
-                //
-            }
-
-            //
-            // Xerces Properties
-            //
-
-            /*
-            else if (propertyId.startsWith(XERCES_PROPERTIES_PREFIX)) {
-                //
-                // Drop through and perform default processing
-                //
-            }
-            */
-
-            //
-            // Perform default processing
-            //
-
-            fConfiguration.setProperty(propertyId, value);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // setProperty(String,Object)
-
-    /**
-     * Query the value of a property.
-     *
-     * Return the current value of a property in a SAX2 parser.
-     * The parser might not recognize the property.
-     *
-     * @param propertyId The unique identifier (URI) of the property
-     *                   being set.
-     * @return The current value of the property.
-     * @exception org.xml.sax.SAXNotRecognizedException If the
-     *            requested property is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested property is known but not supported.
-     */
-    public Object getProperty(String propertyId)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            //
-            // SAX2 core properties
-            //
-
-            if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
-                String property =
-                    propertyId.substring(Constants.SAX_PROPERTY_PREFIX.length());
-                //
-                // http://xml.org/sax/properties/lexical-handler
-                // Value type: org.xml.sax.ext.LexicalHandler
-                // Access: read/write, pre-parse only
-                //   Set the lexical event handler.
-                //
-                if (property.equals(Constants.LEXICAL_HANDLER_PROPERTY)) {
-                    return getLexicalHandler();
-                }
-                //
-                // http://xml.org/sax/properties/declaration-handler
-                // Value type: org.xml.sax.ext.DeclHandler
-                // Access: read/write, pre-parse only
-                //   Set the DTD declaration event handler.
-                //
-                if (property.equals(Constants.DECLARATION_HANDLER_PROPERTY)) {
-                    return getDeclHandler();
-                }
-                //
-                // http://xml.org/sax/properties/dom-node
-                // Value type: DOM Node
-                // Access: read-only
-                //   Get the DOM node currently being visited, if the SAX parser is
-                //   iterating over a DOM tree.  If the parser recognises and
-                //   supports this property but is not currently visiting a DOM
-                //   node, it should return null (this is a good way to check for
-                //   availability before the parse begins).
-                //
-                if (property.equals(Constants.DOM_NODE_PROPERTY)) {
-                    // REVISIT: Localize this error message. -Ac
-                    throw new SAXNotSupportedException(
-                    "PAR014 Cannot getProperty(\""+propertyId
-                    +"\". No DOM Tree exists.\n"+propertyId
-                    ); // we are not iterating a DOM tree
-                }
-                //
-                // Drop through and perform default processing
-                //
-            }
-
-            //
-            // Xerces properties
-            //
-
-            /*
-            else if (propertyId.startsWith(XERCES_PROPERTIES_PREFIX)) {
-                //
-                // Drop through and perform default processing
-                //
-            }
-            */
-
-            //
-            // Perform default processing
-            //
-
-            return fConfiguration.getProperty(propertyId);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // getProperty(String):Object
-
-    //
-    // Protected methods
-    //
-
-    // SAX2 core properties
-
-    /**
-     * Set the DTD declaration event handler.
-     * <p>
-     * This method is the equivalent to the property:
-     * <pre>
-     * http://xml.org/sax/properties/declaration-handler
-     * </pre>
-     *
-     * @param handler The new handler.
-     *
-     * @see #getDeclHandler
-     * @see #setProperty
-     */
-    protected void setDeclHandler(DeclHandler handler)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        if (fParseInProgress) {
-            // REVISIT: Localize this error message. -Ac
-            throw new SAXNotSupportedException(
-                "PAR011 Feature: http://xml.org/sax/properties/declaration-handler"
-                +" is not supported during parse."
-                +"\nhttp://xml.org/sax/properties/declaration-handler");
-        }
-        fDeclHandler = handler;
-
-    } // setDeclHandler(DeclHandler)
-
-    /**
-     * Returns the DTD declaration event handler.
-     *
-     * @see #setDeclHandler
-     */
-    protected DeclHandler getDeclHandler()
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-        return fDeclHandler;
-    } // getDeclHandler():DeclHandler
-
-    /**
-     * Set the lexical event handler.
-     * <p>
-     * This method is the equivalent to the property:
-     * <pre>
-     * http://xml.org/sax/properties/lexical-handler
-     * </pre>
-     *
-     * @param handler lexical event handler
-     *
-     * @see #getLexicalHandler
-     * @see #setProperty
-     */
-    protected void setLexicalHandler(LexicalHandler handler)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        if (fParseInProgress) {
-            // REVISIT: Localize this error message. -Ac
-            throw new SAXNotSupportedException(
-            "PAR011 Feature: http://xml.org/sax/properties/lexical-handler"
-            +" is not supported during parse."
-            +"\nhttp://xml.org/sax/properties/lexical-handler");
-        }
-        fLexicalHandler = handler;
-
-    } // setLexicalHandler(LexicalHandler)
-
-    /**
-     * Returns the lexical handler.
-     *
-     * @see #setLexicalHandler
-     */
-    protected LexicalHandler getLexicalHandler()
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-        return fLexicalHandler;
-    } // getLexicalHandler():LexicalHandler
-
-    //
-    // XMLDocumentParser methods
-    //
-
-    /**
-     * Reset all components before parsing.
-     *
-     * @throws XNIException Thrown if an error occurs during initialization.
-     */
-    public void reset() throws XNIException {
-        super.reset();
-
-        // reset state
-        fInDTD = false;
-
-        // features
-        fNamespaces = fConfiguration.getFeature(NAMESPACES);
-        fNamespacePrefixes = fConfiguration.getFeature(NAMESPACE_PREFIXES);
-
-        // save needed symbols
-        SymbolTable symbolTable = (SymbolTable)fConfiguration.getProperty(SYMBOL_TABLE);
-        if (symbolTable != null) {
-            fEmptySymbol = symbolTable.addSymbol("");
-            fXmlnsSymbol = symbolTable.addSymbol("xmlns");
-        }
-
-    } // reset()
-
-    //
-    // Classes
-    //
-
-    protected static class LocatorProxy
-        implements Locator {
-
-        //
-        // Data
-        //
-
-        /** XML locator. */
-        protected XMLLocator fLocator;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs an XML locator proxy. */
-        public LocatorProxy(XMLLocator locator) {
-            fLocator = locator;
-        }
-
-        //
-        // Locator methods
-        //
-
-        /** Public identifier. */
-        public String getPublicId() {
-            return fLocator.getPublicId();
-        }
-
-        /** System identifier. */
-        public String getSystemId() {
-            return fLocator.getSystemId();
-        }
-        /** Line number. */
-        public int getLineNumber() {
-            return fLocator.getLineNumber();
-        }
-
-        /** Column number. */
-        public int getColumnNumber() {
-            return fLocator.getColumnNumber();
-        }
-
-    } // class LocatorProxy
-
-    protected static final class AttributesProxy
-        implements AttributeList, Attributes {
-
-        //
-        // Data
-        //
-
-        /** XML attributes. */
-        protected XMLAttributes fAttributes;
-
-        //
-        // Public methods
-        //
-
-        /** Sets the XML attributes. */
-        public void setAttributes(XMLAttributes attributes) {
-            fAttributes = attributes;
-        } // setAttributes(XMLAttributes)
-
-        public int getLength() {
-            return fAttributes.getLength();
-        }
-
-        public String getName(int i) {
-            return fAttributes.getQName(i);
-        }
-
-        public String getQName(int index) {
-            return fAttributes.getQName(index);
-        }
-
-        public String getURI(int index) {
-            // REVISIT: this hides the fact that internally we use
-            //          null instead of empty string
-            //          SAX requires URI to be a string or an empty string
-            String uri= fAttributes.getURI(index);
-            return uri != null ? uri : "";
-        }
-
-        public String getLocalName(int index) {
-            return fAttributes.getLocalName(index);
-        }
-
-        public String getType(int i) {
-            return fAttributes.getType(i);
-        }
-
-        public String getType(String name) {
-            return fAttributes.getType(name);
-        }
-
-        public String getType(String uri, String localName) {
-            return uri.equals("") ? fAttributes.getType(null, localName) :
-                                    fAttributes.getType(uri, localName);
-        }
-
-        public String getValue(int i) {
-            return fAttributes.getValue(i);
-        }
-
-        public String getValue(String name) {
-            return fAttributes.getValue(name);
-        }
-
-        public String getValue(String uri, String localName) {
-            return uri.equals("") ? fAttributes.getValue(null, localName) :
-                                    fAttributes.getValue(uri, localName);
-        }
-
-        public int getIndex(String qName) {
-            return fAttributes.getIndex(qName);
-        }
-
-        public int getIndex(String uri, String localPart) {
-            return uri.equals("") ? fAttributes.getIndex(null, localPart) :
-                                    fAttributes.getIndex(uri, localPart);
-        }
-
-    } // class AttributesProxy
-
-} // class AbstractSAXParser
diff --git a/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java b/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java
deleted file mode 100644
index cf95b2c..0000000
--- a/src/org/apache/xerces/parsers/AbstractXMLDocumentParser.java
+++ /dev/null
@@ -1,740 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.IOException;
-
-import org.apache.xerces.xni.Augmentations;
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * This is the base class for all XML document parsers. XMLDocumentParser
- * provides a common implementation shared by the various document parsers
- * in the Xerces package. While this class is provided for convenience, it
- * does not prevent other kinds of parsers to be constructed using the XNI
- * interfaces.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public abstract class AbstractXMLDocumentParser
-    extends XMLParser
-    implements XMLDocumentHandler, XMLDTDHandler, XMLDTDContentModelHandler {
-
-    //
-    // Data
-    //
-
-    // state
-
-    /** True if inside DTD. */
-    protected boolean fInDTD;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a document parser using the default symbol table
-     * and grammar pool.
-     */
-    protected AbstractXMLDocumentParser(XMLParserConfiguration config) {
-        super(config);
-
-        // set handlers
-        config.setDocumentHandler(this);
-        config.setDTDHandler(this);
-        config.setDTDContentModelHandler(this);
-
-    } // <init>(XMLParserConfiguration)
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * The start of the document.
-     *
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader). 
-     * @param augs   Additional information that may include infoset augmentations    
-     *     
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs) 
-        throws XNIException {
-    } // startDocument(XMLLocator,String)
-
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     * 
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
-        throws XNIException {
-    } // xmlDecl(String,String,String)
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     * 
-     * @param rootElement The name of the root element.
-     * @param publicId    The public identifier if an external DTD or null
-     *                    if the external DTD is specified using SYSTEM.
-     * @param systemId    The system identifier if an external DTD, null
-     * @param augs   Additional information that may include infoset augmentations
-     *                    otherwise.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
-        throws XNIException {
-    } // doctypeDecl(String,String,String)
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-        throws XNIException {
-    } // startPrefixMapping(String,String)
-
-    /**
-     * The start of an element. If the document specifies the start element
-     * by using an empty tag, then the startElement method will immediately
-     * be followed by the endElement method, with no intervening methods.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-    } // startElement(QName,XMLAttributes)
-
-    /**
-     * An empty element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException {
-
-        startElement(element, attributes, augs);
-        endElement(element, augs);
-
-    } // emptyElement(QName,XMLAttributes)
-
-    /**
-     * Character content.
-     * 
-     * @param text The content.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException {
-    } // characters(XMLString)
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     * 
-     * @param text The ignorable whitespace.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
-    } // ignorableWhitespace(XMLString)
-
-    /**
-     * The end of an element.
-     * 
-     * @param element The name of the element.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs) throws XNIException {
-    } // endElement(QName)
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException {
-    } // endPrefixMapping(String)
-
-    /** 
-     * The start of a CDATA section. 
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException {
-    } // startCDATA()
-
-    /**
-     * The end of a CDATA section.
-     * @param augs   Additional information that may include infoset augmentations 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException {
-    } // endCDATA()
-
-    /**
-     * The end of the document.
-     * @param augs   Additional information that may include infoset augmentations
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException {
-    } // endDocument()
-
-
-    /**
-     * This method notifies the start of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId
-     *                 The base system identifier of the entity if
-     *                 the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs     Additional information that may include infoset augmentations
-     *                 
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding,
-                            Augmentations augs) throws XNIException{
-    }
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     * @param augs     Additional information that may include infoset augmentations
-     *                 
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException{
-    }
-
-    /**
-     * This method notifies the end of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name   The name of the entity.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException{
-    }
-
-
-    
-    /**
-     * A comment.
-     * 
-     * @param text   The text in the comment.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException{
-    }
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException{
-    }
-
-
-    //
-    // XMLDTDHandler methods
-    //
-    
-    /**
-     * The start of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDTD(XMLLocator locator) throws XNIException {
-        fInDTD = true;
-    } // startDTD(XMLLocator)
-
-
-    /**
-     * Character content.
-     * 
-     * @param text   The content.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-     public void characters(XMLString text) throws XNIException{
-     }
-
-    /**
-     * This method notifies of the start of an entity. The document entity
-     * has the pseudo-name of "[xml]"; The DTD has the pseudo-name of "[dtd]" 
-     * parameter entity names start with '%'; and general entity names are
-     * just the entity name.
-     * <p>
-     * <strong>Note:</strong> Since the document is an entity, the handler
-     * will be notified of the start of the document entity by calling the
-     * startEntity method with the entity name "[xml]" <em>before</em> calling
-     * the startDocument method. When exposing entity boundaries through the
-     * XNI API, the document entity is never reported, however.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException {
-    } // startEntity(String,String,String,String,String)
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding) throws XNIException {
-    } // textDecl(String,String)
-
-    /**
-     * A comment.
-     * 
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text) throws XNIException {
-    } // comment(XMLString)
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data)
-        throws XNIException {
-    } // processingInstruction(String,XMLString)
-
-    /**
-     * This method notifies the end of an entity. The document entity has
-     * the pseudo-name of "[xml]"; the DTD has the pseudo-name of "[dtd]" 
-     * parameter entity names start with '%'; and general entity names are
-     * just the entity name.
-     * <p>
-     * <strong>Note:</strong> Since the document is an entity, the handler
-     * will be notified of the end of the document entity by calling the
-     * endEntity method with the entity name "[xml]" <em>after</em> calling
-     * the endDocument method. When exposing entity boundaries through the
-     * XNI API, the document entity is never reported, however.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-    } // endEntity(String)
-
-    /**
-     * An element declaration.
-     * 
-     * @param name         The name of the element.
-     * @param contentModel The element content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void elementDecl(String name, String contentModel)
-        throws XNIException {
-    } // elementDecl(String,String)
-
-    /**
-     * The start of an attribute list.
-     * 
-     * @param elementName The name of the element that this attribute
-     *                    list is associated with.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startAttlist(String elementName) throws XNIException {
-    } // startAttlist(String)
-
-    /**
-     * An attribute declaration.
-     * 
-     * @param elementName   The name of the element that this attribute
-     *                      is associated with.
-     * @param attributeName The name of the attribute.
-     * @param type          The attribute type. This value will be one of
-     *                      the following: "CDATA", "ENTITY", "ENTITIES",
-     *                      "ENUMERATION", "ID", "IDREF", "IDREFS", 
-     *                      "NMTOKEN", "NMTOKENS", or "NOTATION".
-     * @param enumeration   If the type has the value "ENUMERATION", this
-     *                      array holds the allowed attribute values;
-     *                      otherwise, this array is null.
-     * @param defaultType   The attribute default type. This value will be
-     *                      one of the following: "#FIXED", "#IMPLIED",
-     *                      "#REQUIRED", or null.
-     * @param defaultValue  The attribute default value, or null if no
-     *                      default value is specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void attributeDecl(String elementName, String attributeName, 
-                              String type, String[] enumeration, 
-                              String defaultType, XMLString defaultValue)
-        throws XNIException {
-    } // attributeDecl(String,String,String,String[],String,XMLString)
-
-    /**
-     * The end of an attribute list.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endAttlist() throws XNIException {
-    } // endAttlist()
-
-    /**
-     * An internal entity declaration.
-     * 
-     * @param name The name of the entity. Parameter entity names start with
-     *             '%', whereas the name of a general entity is just the 
-     *             entity name.
-     * @param text The value of the entity.
-     * @param nonNormalizedText The non-normalized value of the entity. This
-     *             value contains the same sequence of characters that was in 
-     *             the internal entity declaration, without any entity
-     *             references expanded.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void internalEntityDecl(String name, XMLString text,
-                                   XMLString nonNormalizedText) 
-        throws XNIException {
-    } // internalEntityDecl(String,XMLString,XMLString)
-
-    /**
-     * An external entity declaration.
-     * 
-     * @param name     The name of the entity. Parameter entity names start
-     *                 with '%', whereas the name of a general entity is just
-     *                 the entity name.
-     * @param publicId The public identifier of the entity or null if the
-     *                 the entity was specified with SYSTEM.
-     * @param systemId The system identifier of the entity.
-     * @param baseSystemId The base system identifier where this entity
-     *                     is declared.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void externalEntityDecl(String name, 
-                                   String publicId, String systemId,
-                                   String baseSystemId) throws XNIException {
-    } // externalEntityDecl(String,String,String,String)
-
-    /**
-     * An unparsed entity declaration.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the entity, or null if not
-     *                 specified.
-     * @param notation The name of the notation.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void unparsedEntityDecl(String name, 
-                                   String publicId, String systemId, 
-                                   String notation) throws XNIException {
-    } // unparsedEntityDecl(String,String,String,String)
-
-    /**
-     * A notation declaration
-     * 
-     * @param name     The name of the notation.
-     * @param publicId The public identifier of the notation, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the notation, or null if not
-     *                 specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws XNIException {
-    } // notationDecl(String,String,String)
-
-    /**
-     * The start of a conditional section.
-     * 
-     * @param type The type of the conditional section. This value will
-     *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see XMLDTDHandler#CONDITIONAL_INCLUDE
-     * @see XMLDTDHandler#CONDITIONAL_IGNORE
-     */
-    public void startConditional(short type) throws XNIException {
-    } // startConditional(short)
-
-    /**
-     * The end of a conditional section.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endConditional() throws XNIException {
-    } // endConditional()
-
-    /**
-     * The end of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDTD() throws XNIException {
-        fInDTD = false;
-    } // endDTD()
-
-    //
-    // XMLDTDContentModelHandler methods
-    //
-
-    /** Start content model. */
-    public void startContentModel(String elementName) throws XNIException {}
-
-    /** ANY. */
-    public void any() throws XNIException {}
-
-    /** EMPTY. */
-    public void empty() throws XNIException {}
-
-    /** Start group. */
-    public void startGroup() throws XNIException {}
-
-    /** #PCDATA. */
-    public void pcdata() throws XNIException {}
-
-    /** Element. */
-    public void element(String elementName) throws XNIException {}
-
-    /** Separator. */
-    public void separator(short separator) throws XNIException {}
-
-    /** Occurrence. */
-    public void occurrence(short occurrence) throws XNIException {}
-
-    /** End group. */
-    public void endGroup() throws XNIException {}
-
-    /** End content model. */
-    public void endContentModel() throws XNIException {}
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * reset all components before parsing
-     */
-    protected void reset() throws XNIException {
-        super.reset();
-        fInDTD = false;
-    } // reset()
-
-} // class AbstractXMLDocumentParser
diff --git a/src/org/apache/xerces/parsers/BasicParserConfiguration.java b/src/org/apache/xerces/parsers/BasicParserConfiguration.java
deleted file mode 100644
index 8451674..0000000
--- a/src/org/apache/xerces/parsers/BasicParserConfiguration.java
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Hashtable;
-import java.util.Locale;
-import java.util.Vector;
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-import org.apache.xerces.util.ParserConfigurationSettings;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-/**
- * A very basic parser configuration. This configuration class can
- * be used as a base class for custom parser configurations. The
- * basic parser configuration creates the symbol table (if not
- * specified at construction time) and manages all of the recognized
- * features and properties.
- * <p>
- * The basic parser configuration does <strong>not</strong> mandate
- * any particular pipeline configuration or the use of specific 
- * components except for the symbol table. If even this is too much
- * for a basic parser configuration, the programmer can create a new
- * configuration class that implements the 
- * <code>XMLParserConfiguration</code> interface.
- * <p>
- * Subclasses of the basic parser configuration can add their own
- * recognized features and properties by calling the
- * <code>addRecognizedFeature</code> and 
- * <code>addRecognizedProperty</code> methods, respectively.
- * <p>
- * The basic parser configuration assumes that the configuration
- * will be made up of various parser components that implement the
- * <code>XMLComponent</code> interface. If subclasses of this
- * configuration create their own components for use in the 
- * parser configuration, then each component should be added to
- * the list of components by calling the <code>addComponent</code>
- * method. The basic parser configuration will make sure to call
- * the <code>reset</code> method of each registered component
- * before parsing an instance document.
- * <p>
- * This class recognizes the following features and properties:
- * <ul>
- * <li>Features
- *  <ul>
- *   <li>http://xml.org/sax/features/validation</li>
- *   <li>http://xml.org/sax/features/namespaces</li>
- *   <li>http://xml.org/sax/features/external-general-entities</li>
- *   <li>http://xml.org/sax/features/external-parameter-entities</li>
- *  </ul>
- * <li>Properties
- *  <ul>
- *   <li>http://xml.org/sax/properties/xml-string</li>
- *   <li>http://apache.org/xml/properties/internal/symbol-table</li>
- *   <li>http://apache.org/xml/properties/internal/error-handler</li>
- *   <li>http://apache.org/xml/properties/internal/entity-resolver</li>
- *  </ul>
- * </ul>
- *
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public abstract class BasicParserConfiguration
-    extends ParserConfigurationSettings
-    implements XMLParserConfiguration {
-
-    //
-    // Constants
-    //
-
-    // feature identifiers
-
-    /** Feature identifier: validation. */
-    protected static final String VALIDATION =
-        Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-    
-    /** Feature identifier: namespaces. */
-    protected static final String NAMESPACES =
-        Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-    
-    /** Feature identifier: external general entities. */
-    protected static final String EXTERNAL_GENERAL_ENTITIES =
-        Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-    
-    /** Feature identifier: external parameter entities. */
-    protected static final String EXTERNAL_PARAMETER_ENTITIES =
-        Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-    
-    // property identifiers
-
-    /** Property identifier: xml string. */
-    protected static final String XML_STRING = 
-        Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
-
-    /** Property identifier: symbol table. */
-    protected static final String SYMBOL_TABLE = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    /** Property identifier: error handler. */
-    protected static final String ERROR_HANDLER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
-
-    /** Property identifier: entity resolver. */
-    protected static final String ENTITY_RESOLVER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
-
-    //
-    // Data
-    //
-
-    // components (non-configurable)
-
-    /** Symbol table. */
-    protected SymbolTable fSymbolTable;
-
-    // data
-
-    /** Locale. */
-    protected Locale fLocale;
-
-    /** Components. */
-    protected Vector fComponents;
-
-    // handlers
-
-    /** The document handler. */
-    protected XMLDocumentHandler fDocumentHandler;
-
-    /** The DTD handler. */
-    protected XMLDTDHandler fDTDHandler;
-
-    /** The DTD content model handler. */
-    protected XMLDTDContentModelHandler fDTDContentModelHandler;
-
-    //
-    // Constructors
-    //
-
-    /** Default Constructor. */
-    protected BasicParserConfiguration() {
-        this(null, null);
-    } // <init>()
-
-    /** 
-     * Constructs a parser configuration using the specified symbol table. 
-     *
-     * @param symbolTable The symbol table to use.
-     */
-    protected BasicParserConfiguration(SymbolTable symbolTable) {
-        this(null, null);
-    } // <init>(SymbolTable)
-
-    /** 
-     * Constructs a parser configuration using the specified symbol table
-     * and parent settings.
-     *
-     * @param symbolTable    The symbol table to use.
-     * @param parentSettings The parent settings.
-     */
-    protected BasicParserConfiguration(SymbolTable symbolTable,
-                                       XMLComponentManager parentSettings) {
-        super(parentSettings);
-
-        // create a vector to hold all the components in use
-        fComponents = new Vector();
-
-        // create storage for recognized features and properties
-        fRecognizedFeatures = new Vector();
-        fRecognizedProperties = new Vector();
-
-        // create table for features and properties
-        fFeatures = new Hashtable();
-        fProperties = new Hashtable();
-
-        // add default recognized features
-        final String[] recognizedFeatures = {
-            VALIDATION,                 
-            NAMESPACES, 
-            EXTERNAL_GENERAL_ENTITIES,  
-            EXTERNAL_PARAMETER_ENTITIES,
-        };
-        addRecognizedFeatures(recognizedFeatures);
-
-        // set state for default features
-        setFeature(VALIDATION, false);
-        setFeature(NAMESPACES, true);
-        setFeature(EXTERNAL_GENERAL_ENTITIES, true);
-        setFeature(EXTERNAL_PARAMETER_ENTITIES, true);
-
-        // add default recognized properties
-        final String[] recognizedProperties = {
-            XML_STRING,     
-            SYMBOL_TABLE,
-            ERROR_HANDLER,  
-            ENTITY_RESOLVER,
-        };
-        addRecognizedProperties(recognizedProperties);
-
-        if (symbolTable == null) {
-            symbolTable = new SymbolTable();
-        }
-        fSymbolTable = symbolTable;
-        setProperty(SYMBOL_TABLE, fSymbolTable);
-
-    } // <init>(SymbolTable)
-
-    /** 
-     * Adds a component to the parser configuration. This method will
-     * also add all of the component's recognized features and properties
-     * to the list of default recognized features and properties.
-     *
-     * @param component The component to add.
-     */
-    protected void addComponent(XMLComponent component) {
-
-        // don't add a component more than once
-        if (fComponents.contains(component)) {
-            return;
-        }
-        fComponents.addElement(component);
-
-        // register component's recognized features
-        String[] recognizedFeatures = component.getRecognizedFeatures();
-        addRecognizedFeatures(recognizedFeatures);
-
-        // register component's recognized properties
-        String[] recognizedProperties = component.getRecognizedProperties();
-        addRecognizedProperties(recognizedProperties);
-
-    } // addComponent(XMLComponent)
-
-    //
-    // XMLParserConfiguration methods
-    //
-
-    /**
-     * Parse an XML document.
-     * <p>
-     * The parser can use this method to instruct this configuration
-     * to begin parsing an XML document from any valid input source
-     * (a character stream, a byte stream, or a URI).
-     * <p>
-     * Parsers may not invoke this method while a parse is in progress.
-     * Once a parse is complete, the parser may then parse another XML
-     * document.
-     * <p>
-     * This method is synchronous: it will not return until parsing
-     * has ended.  If a client application wants to terminate 
-     * parsing early, it should throw an exception.
-     *
-     * @param source The input source for the top-level of the
-     *               XML document.
-     *
-     * @exception XNIException Any XNI exception, possibly wrapping 
-     *                         another exception.
-     * @exception IOException  An IO exception from the parser, possibly
-     *                         from a byte stream or character stream
-     *                         supplied by the parser.
-     */
-    public abstract void parse(XMLInputSource inputSource) 
-        throws XNIException, IOException;
-
-    /**
-     * Sets the document handler to receive information about the document.
-     * 
-     * @param documentHandler The document handler.
-     */
-    public void setDocumentHandler(XMLDocumentHandler documentHandler) {
-        fDocumentHandler = documentHandler;
-    } // setDocumentHandler(XMLDocumentHandler)
-
-    /** Returns the registered document handler. */
-    public XMLDocumentHandler getDocumentHandler() {
-        return fDocumentHandler;
-    } // getDocumentHandler():XMLDocumentHandler
-
-    /**
-     * Sets the DTD handler.
-     * 
-     * @param dtdHandler The DTD handler.
-     */
-    public void setDTDHandler(XMLDTDHandler dtdHandler) {
-        fDTDHandler = dtdHandler;
-    } // setDTDHandler(XMLDTDHandler)
-
-    /** Returns the registered DTD handler. */
-    public XMLDTDHandler getDTDHandler() {
-        return fDTDHandler;
-    } // getDTDHandler():XMLDTDHandler
-
-    /**
-     * Sets the DTD content model handler.
-     * 
-     * @param handler The DTD content model handler.
-     */
-    public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
-        fDTDContentModelHandler = handler;
-    } // setDTDContentModelHandler(XMLDTDContentModelHandler)
-
-    /** Returns the registered DTD content model handler. */
-    public XMLDTDContentModelHandler getDTDContentModelHandler() {
-        return fDTDContentModelHandler;
-    } // getDTDContentModelHandler():XMLDTDContentModelHandler
-
-    /**
-     * Sets the resolver used to resolve external entities. The EntityResolver
-     * interface supports resolution of public and system identifiers.
-     *
-     * @param resolver The new entity resolver. Passing a null value will
-     *                 uninstall the currently installed resolver.
-     */
-    public void setEntityResolver(XMLEntityResolver resolver) {
-        // REVISIT: Should this be a property?
-        fProperties.put(ENTITY_RESOLVER, resolver);
-    } // setEntityResolver(XMLEntityResolver)
-
-    /**
-     * Return the current entity resolver.
-     *
-     * @return The current entity resolver, or null if none
-     *         has been registered.
-     * @see #setEntityResolver
-     */
-    public XMLEntityResolver getEntityResolver() {
-        // REVISIT: Should this be a property?
-        return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
-    } // getEntityResolver():XMLEntityResolver
-
-    /**
-     * Allow an application to register an error event handler.
-     *
-     * <p>If the application does not register an error handler, all
-     * error events reported by the SAX parser will be silently
-     * ignored; however, normal processing may not continue.  It is
-     * highly recommended that all SAX applications implement an
-     * error handler to avoid unexpected bugs.</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param errorHandler The error handler.
-     * @exception java.lang.NullPointerException If the handler 
-     *            argument is null.
-     * @see #getErrorHandler
-     */
-    public void setErrorHandler(XMLErrorHandler errorHandler) {
-        // REVISIT: Should this be a property?
-        fProperties.put(ERROR_HANDLER, errorHandler);
-    } // setErrorHandler(XMLErrorHandler)
-
-    /**
-     * Return the current error handler.
-     *
-     * @return The current error handler, or null if none
-     *         has been registered.
-     * @see #setErrorHandler
-     */
-    public XMLErrorHandler getErrorHandler() {
-        // REVISIT: Should this be a property?
-        return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
-    } // getErrorHandler():XMLErrorHandler
-
-    /**
-     * Set the state of a feature.
-     *
-     * Set the state of any feature in a SAX2 parser.  The parser
-     * might not recognize the feature, and if it does recognize
-     * it, it might not be able to fulfill the request.
-     *
-     * @param featureId The unique identifier (URI) of the feature.
-     * @param state The requested state of the feature (true or false).
-     *
-     * @exception org.apache.xerces.xni.parser.XMLConfigurationException If the
-     *            requested feature is not known.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-
-        // forward to every component
-        int count = fComponents.size();
-        for (int i = 0; i < count; i++) {
-            XMLComponent c = (XMLComponent) fComponents.elementAt(i);
-            c.setFeature(featureId, state);
-        }
-
-        // save state if noone "objects"
-        super.setFeature(featureId, state);
-
-    } // setFeature(String,boolean)
-
-    /**
-     * setProperty
-     * 
-     * @param propertyId 
-     * @param value 
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-
-        // forward to every component
-        int count = fComponents.size();
-        for (int i = 0; i < count; i++) {
-            XMLComponent c = (XMLComponent) fComponents.elementAt(i);
-            c.setProperty(propertyId, value);
-        }
-
-        // store value if noone "objects"
-        super.setProperty(propertyId, value);
-
-    } // setProperty(String,Object)
-
-    /**
-     * Set the locale to use for messages.
-     *
-     * @param locale The locale object to use for localization of messages.
-     *
-     * @exception XNIException Thrown if the parser does not support the
-     *                         specified locale.
-     */
-    public void setLocale(Locale locale) throws XNIException {
-        fLocale = locale;
-    } // setLocale(Locale)
-
-    /** Returns the locale. */
-    public Locale getLocale() {
-        return fLocale;
-    } // getLocale():Locale
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * reset all components before parsing
-     */
-    protected void reset() throws XNIException {
-
-        // reset every component
-        int count = fComponents.size();
-        for (int i = 0; i < count; i++) {
-            XMLComponent c = (XMLComponent) fComponents.elementAt(i);
-            c.reset(this);
-        }
-
-    } // reset()
-
-    /**
-     * Check a property. If the property is known and supported, this method
-     * simply returns. Otherwise, the appropriate exception is thrown.
-     *
-     * @param propertyId The unique identifier (URI) of the property
-     *                   being set.
-     * @exception org.apache.xerces.xni.parser.XMLConfigurationException If the
-     *            requested feature is not known or supported.
-     */
-    protected void checkProperty(String propertyId)
-        throws XMLConfigurationException {
-
-        // special cases
-        if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
-            String property =
-                propertyId.substring(Constants.SAX_PROPERTY_PREFIX.length());
-            //
-            // http://xml.org/sax/properties/xml-string
-            // Value type: String
-            // Access: read-only
-            //   Get the literal string of characters associated with the
-            //   current event.  If the parser recognises and supports this
-            //   property but is not currently parsing text, it should return
-            //   null (this is a good way to check for availability before the
-            //   parse begins).
-            //
-            if (property.equals(Constants.XML_STRING_PROPERTY)) {
-                // REVISIT - we should probably ask xml-dev for a precise
-                // definition of what this is actually supposed to return, and
-                // in exactly which circumstances.
-                short type = XMLConfigurationException.NOT_SUPPORTED;
-                throw new XMLConfigurationException(type, propertyId);
-            }
-        }
-
-        // check property
-        super.checkProperty(propertyId);
-
-    } // checkProperty(String)
-
-} // class XMLParser
diff --git a/src/org/apache/xerces/parsers/CachingParserPool.java b/src/org/apache/xerces/parsers/CachingParserPool.java
deleted file mode 100644
index 31cd716..0000000
--- a/src/org/apache/xerces/parsers/CachingParserPool.java
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import org.apache.xerces.impl.validation.Grammar;
-import org.apache.xerces.impl.validation.GrammarPool;
-
-import org.apache.xerces.util.SymbolTable;
-
-/**
- * A parser pool that enables caching of grammars. The caching parser
- * pool is constructed with a specific symbol table and grammar pool
- * that has already been populated with the grammars used by the
- * application.
- * <p>
- * Once the caching parser pool is constructed, specific parser
- * instances are created by calling the appropriate factory method
- * on the parser pool.
- * <p>
- * <strong>Note:</strong> There is a performance penalty for using
- * a caching parser pool due to thread safety. Access to the symbol 
- * table and grammar pool must be synchronized to ensure the safe
- * operation of the symbol table and grammar pool.
- * <p>
- * <strong>Note:</strong> If performance is critical, then another
- * mechanism needs to be used instead of the caching parser pool.
- * One approach would be to create parser instances that do not
- * share these structures. Instead, each instance would get its
- * own copy to use while parsing. This avoids the synchronization
- * overhead at the expense of more memory and the time required
- * to copy the structures for each new parser instance. And even
- * when a parser instance is re-used, there is a potential for a
- * memory leak due to new symbols being added to the symbol table
- * over time. In other words, always take caution to make sure
- * that your application is thread-safe and avoids leaking memory.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class CachingParserPool {
-
-    //
-    // Constants
-    //
-
-    /** Default shadow symbol table (false). */
-    public static final boolean DEFAULT_SHADOW_SYMBOL_TABLE = false;
-
-    /** Default shadow grammar pool (false). */
-    public static final boolean DEFAULT_SHADOW_GRAMMAR_POOL = false;
-
-    //
-    // Data
-    //
-
-    /** 
-     * Symbol table. The symbol table that the caching parser pool is
-     * constructed with is automatically wrapped in a synchronized
-     * version for thread-safety.
-     */
-    protected SymbolTable fSynchronizedSymbolTable;
-
-    /** 
-     * Grammar pool. The grammar pool that the caching parser pool is
-     * constructed with is automatically wrapped in a synchronized
-     * version for thread-safety.
-     */
-    protected GrammarPool fSynchronizedGrammarPool;
-
-    /** 
-     * Shadow the symbol table for new parser instances. If true,
-     * new parser instances use shadow copies of the main symbol
-     * table and are not allowed to add new symbols to the main
-     * symbol table. New symbols are added to the shadow symbol
-     * table and are local to the parser instance.
-     */
-    protected boolean fShadowSymbolTable = DEFAULT_SHADOW_SYMBOL_TABLE;
-
-    /** 
-     * Shadow the grammar pool for new parser instances. If true,
-     * new parser instances use shadow copies of the main grammar
-     * pool and are not allowed to add new grammars to the main
-     * grammar pool. New grammars are added to the shadow grammar
-     * pool and are local to the parser instance.
-     */
-    protected boolean fShadowGrammarPool = DEFAULT_SHADOW_GRAMMAR_POOL;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public CachingParserPool() {
-        this(new SymbolTable(), new GrammarPool());
-    } // <init>()
-
-    /**
-     * Constructs a caching parser pool with the specified symbol table
-     * and grammar pool.
-     * 
-     * @param symbolTable The symbol table.
-     * @param grammarPool The grammar pool.
-     */
-    public CachingParserPool(SymbolTable symbolTable, GrammarPool grammarPool) {
-        fSynchronizedSymbolTable = new SynchronizedSymbolTable(symbolTable);
-        fSynchronizedGrammarPool = new SynchronizedGrammarPool(grammarPool);
-    } // <init>(SymbolTable,GrammarPool)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the symbol table. */
-    public SymbolTable getSymbolTable() {
-        return fSynchronizedSymbolTable;
-    } // getSymbolTable():SymbolTable
-
-    /** Returns the grammar pool. */
-    public GrammarPool getGrammarPool() {
-        return fSynchronizedGrammarPool;
-    } // getGrammarPool():GrammarPool
-
-    // setters and getters
-
-    /** 
-     * Sets whether new parser instance receive shadow copies of the
-     * main symbol table.
-     *
-     * @param shadow If true, new parser instances use shadow copies 
-     *               of the main symbol table and are not allowed to
-     *               add new symbols to the main symbol table. New
-     *               symbols are added to the shadow symbol table and
-     *               are local to the parser instance. If false, new
-     *               parser instances are allowed to add new symbols
-     *               to the main symbol table.
-     */
-    public void setShadowSymbolTable(boolean shadow) {
-        fShadowSymbolTable = shadow;
-    } // setShadowSymbolTable(boolean)
-
-    // factory methods
-
-    /** Creates a new DOM parser. */
-    public DOMParser createDOMParser() {
-        SymbolTable symbolTable = fShadowSymbolTable
-                                ? new ShadowedSymbolTable(fSynchronizedSymbolTable)
-                                : fSynchronizedSymbolTable;
-        GrammarPool grammarPool = fShadowGrammarPool
-                                ? new ShadowedGrammarPool(fSynchronizedGrammarPool)
-                                : fSynchronizedGrammarPool;
-        return new DOMParser(symbolTable, grammarPool);
-    } // createDOMParser():DOMParser
-
-    /** Creates a new SAX parser. */
-    public SAXParser createSAXParser() {
-        SymbolTable symbolTable = fShadowSymbolTable
-                                ? new ShadowedSymbolTable(fSynchronizedSymbolTable)
-                                : fSynchronizedSymbolTable;
-        GrammarPool grammarPool = fShadowGrammarPool
-                                ? new ShadowedGrammarPool(fSynchronizedGrammarPool)
-                                : fSynchronizedGrammarPool;
-        return new SAXParser(symbolTable, grammarPool);
-    } // createSAXParser():SAXParser
-
-    //
-    // Classes
-    //
-
-    /**
-     * Synchronized symbol table.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static final class SynchronizedSymbolTable
-        extends SymbolTable {
-        
-        //
-        // Data
-        //
-
-        /** Main symbol table. */
-        protected SymbolTable fSymbolTable;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a synchronized symbol table. */
-        public SynchronizedSymbolTable(SymbolTable symbolTable) {
-            fSymbolTable = symbolTable;
-        } // <init>(SymbolTable)
-
-        //
-        // SymbolTable methods
-        //
-        
-        /**
-         * Adds the specified symbol to the symbol table and returns a
-         * reference to the unique symbol. If the symbol already exists, 
-         * the previous symbol reference is returned instead, in order
-         * guarantee that symbol references remain unique.
-         * 
-         * @param symbol The new symbol.
-         */
-        public String addSymbol(String symbol) {
-
-            synchronized (fSymbolTable) {
-                return fSymbolTable.addSymbol(symbol);
-            }
-
-        } // addSymbol(String)
-
-        /**
-         * Adds the specified symbol to the symbol table and returns a
-         * reference to the unique symbol. If the symbol already exists, 
-         * the previous symbol reference is returned instead, in order
-         * guarantee that symbol references remain unique.
-         * 
-         * @param buffer The buffer containing the new symbol.
-         * @param offset The offset into the buffer of the new symbol.
-         * @param length The length of the new symbol in the buffer.
-         */
-        public String addSymbol(char[] buffer, int offset, int length) {
-
-            synchronized (fSymbolTable) {
-                return fSymbolTable.addSymbol(buffer, offset, length);
-            }
-
-        } // addSymbol(char[],int,int):String
-
-        /** 
-         * Returns true if the symbol table already contains the specified
-         * symbol.
-         *
-         * @param symbol The symbol to look for.
-         */
-        public boolean containsSymbol(String symbol) {
-
-            synchronized (fSymbolTable) {
-                return fSymbolTable.containsSymbol(symbol);
-            }
-
-        } // containsSymbol(String):boolean
-
-        /** 
-         * Returns true if the symbol table already contains the specified
-         * symbol.
-         *
-         * @param buffer The buffer containing the symbol to look for.
-         * @param offset The offset into the buffer.
-         * @param length The length of the symbol in the buffer.
-         */
-        public boolean containsSymbol(char[] buffer, int offset, int length) {
-
-            synchronized (fSymbolTable) {
-                return fSymbolTable.containsSymbol(buffer, offset, length);
-            }
-
-        } // containsSymbol(char[],int,int):boolean
-
-    } // class SynchronizedSymbolTable
-
-    /**
-     * Shadowed symbol table.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static final class ShadowedSymbolTable
-        extends SymbolTable {
-        
-        //
-        // Data
-        //
-
-        /** Main symbol table. */
-        protected SymbolTable fSymbolTable;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a shadow of the specified symbol table. */
-        public ShadowedSymbolTable(SymbolTable symbolTable) {
-            fSymbolTable = symbolTable;
-        } // <init>(SymbolTable)
-
-        //
-        // SymbolTable methods
-        //
-        
-        /**
-         * Adds the specified symbol to the symbol table and returns a
-         * reference to the unique symbol. If the symbol already exists, 
-         * the previous symbol reference is returned instead, in order
-         * guarantee that symbol references remain unique.
-         * 
-         * @param symbol The new symbol.
-         */
-        public String addSymbol(String symbol) {
-
-            if (fSymbolTable.containsSymbol(symbol)) {
-                return fSymbolTable.addSymbol(symbol);
-            }
-            return super.addSymbol(symbol);
-
-        } // addSymbol(String)
-
-        /**
-         * Adds the specified symbol to the symbol table and returns a
-         * reference to the unique symbol. If the symbol already exists, 
-         * the previous symbol reference is returned instead, in order
-         * guarantee that symbol references remain unique.
-         * 
-         * @param buffer The buffer containing the new symbol.
-         * @param offset The offset into the buffer of the new symbol.
-         * @param length The length of the new symbol in the buffer.
-         */
-        public String addSymbol(char[] buffer, int offset, int length) {
-
-            if (fSymbolTable.containsSymbol(buffer, offset, length)) {
-                return fSymbolTable.addSymbol(buffer, offset, length);
-            }
-            return super.addSymbol(buffer, offset, length);
-
-        } // addSymbol(char[],int,int):String
-
-        /**
-         * Returns a hashcode value for the specified symbol. The value
-         * returned by this method must be identical to the value returned
-         * by the <code>hash(char[],int,int)</code> method when called
-         * with the character array that comprises the symbol string.
-         * 
-         * @param symbol The symbol to hash.
-         */
-        public int hash(String symbol) {
-            return fSymbolTable.hash(symbol);
-        } // hash(String):int
-
-        /**
-         * Returns a hashcode value for the specified symbol information. 
-         * The value returned by this method must be identical to the value
-         * returned by the <code>hash(String)</code> method when called
-         * with the string object created from the symbol information.
-         * 
-         * @param buffer The character buffer containing the symbol.
-         * @param offset The offset into the character buffer of the start
-         *               of the symbol.
-         * @param length The length of the symbol.
-         */
-        public int hash(char[] buffer, int offset, int length) {
-            return fSymbolTable.hash(buffer, offset, length);
-        } // hash(char[],int,int):int
-
-    } // class ShadowedSymbolTable
-
-    /**
-     * Synchronized grammar pool.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static final class SynchronizedGrammarPool
-        extends GrammarPool {
-
-        //
-        // Data
-        //
-
-        /** Main grammar pool. */
-        private GrammarPool fGrammarPool;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a synchronized grammar pool. */
-        public SynchronizedGrammarPool(GrammarPool grammarPool) {
-            fGrammarPool = grammarPool;
-        } // <init>(GrammarPool)
-
-        //
-        // GrammarPool methods
-        //
-
-        /**
-         * Puts the specified grammar into the grammar pool.
-         * 
-         * @param key Key to associate with grammar.
-         * @param grammar Grammar object.
-         */
-        public void putGrammar(String key, Grammar grammar) {
-            synchronized (fGrammarPool) {
-                fGrammarPool.putGrammar(key, grammar);
-            }
-        } // putGrammar(String,Grammar)
-
-        /**
-         * Returns the grammar associated to the specified key.
-         * 
-         * @param key The key of the grammar.
-         */
-        public Grammar getGrammar(String key) {
-            synchronized (fGrammarPool) {
-                return fGrammarPool.getGrammar(key);
-            }
-        } // getGrammar(String):Grammar
-
-        /**
-         * Removes the grammar associated to the specified key from the
-         * grammar pool and returns the removed grammar.
-         * 
-         * @param key The key of the grammar.
-         */
-        public Grammar removeGrammar(String key) {
-            synchronized (fGrammarPool) {
-                return fGrammarPool.removeGrammar(key);
-            }
-        } // removeGrammar(String):Grammar
-
-        /**
-         * Returns true if the grammar pool contains a grammar associated
-         * to the specified key.
-         *
-         * @param key The key of the grammar.
-         */
-        public boolean containsGrammar(String key) {
-            synchronized (fGrammarPool) {
-                return fGrammarPool.containsGrammar(key);
-            }
-        } // containsGrammar(String):boolean
-
-    } // class SynchronizedGrammarPool
-
-    /**
-     * Shadowed grammar pool.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static final class ShadowedGrammarPool
-        extends GrammarPool {
-
-        //
-        // Data
-        //
-
-        /** Main grammar pool. */
-        private GrammarPool fGrammarPool;
-
-        //
-        // Constructors
-        //
-
-        /** Constructs a shadowed grammar pool. */
-        public ShadowedGrammarPool(GrammarPool grammarPool) {
-            fGrammarPool = grammarPool;
-        } // <init>(GrammarPool)
-
-        //
-        // GrammarPool methods
-        //
-
-        /**
-         * Returns the grammar associated to the specified key.
-         * 
-         * @param key The key of the grammar.
-         */
-        public Grammar getGrammar(String key) {
-
-            if (super.containsGrammar(key)) {
-                return super.getGrammar(key);
-            }
-            return fGrammarPool.getGrammar(key);
-
-        } // getGrammar(String):Grammar
-
-        /**
-         * Returns true if the grammar pool contains a grammar associated
-         * to the specified key.
-         *
-         * @param key The key of the grammar.
-         */
-        public boolean containsGrammar(String key) {
-            return super.containsGrammar(key) || fGrammarPool.containsGrammar(key);
-        } // containsGrammar(String):boolean
-
-    } // class ShadowedGrammarPool
-
-} // class CachingParserPool
diff --git a/src/org/apache/xerces/parsers/DOMASBuilderImpl.java b/src/org/apache/xerces/parsers/DOMASBuilderImpl.java
deleted file mode 100644
index c869715..0000000
--- a/src/org/apache/xerces/parsers/DOMASBuilderImpl.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import org.apache.xerces.dom3.ls.DOMEntityResolver;
-import org.apache.xerces.dom3.ls.DOMInputSource;
-import org.apache.xerces.dom3.as.ASModel;
-import org.apache.xerces.dom3.as.DOMASBuilder;
-import org.apache.xerces.dom3.as.DOMASException;
-
-import org.apache.xerces.dom.ASModelImpl;
-import org.apache.xerces.util.DOMEntityResolverWrapper;
-import org.apache.xerces.util.DOMErrorHandlerWrapper;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.impl.xs.traversers.XSDHandler;
-import org.apache.xerces.impl.xs.XSGrammarResolver;
-import org.apache.xerces.impl.xs.SubstitutionGroupHandler;
-import org.apache.xerces.impl.xs.models.CMBuilder;
-import org.apache.xerces.impl.xs.SchemaSymbols;
-import org.apache.xerces.impl.xs.SchemaGrammar;
-import org.apache.xerces.impl.xs.XSConstraints;
-import org.apache.xerces.impl.xs.XSDeclarationPool;
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.SymbolHash;
-import org.apache.xerces.util.DOMUtil;
-
-
-/**
- * This is Abstract Schema DOM Builder class. It extends the DOMBuilderImpl
- * class. Provides support for preparsing schemas.
- *
- * @author Pavani Mukthipudi, Sun Microsystems Inc.
- * @author Neil Graham, IBM
- * @version $Id$
- *
- */
-
-public class DOMASBuilderImpl
-    extends DOMBuilderImpl implements DOMASBuilder {
-
-    //
-    // Constants
-    //
-
-    // Feature ids
-
-    protected static final String SCHEMA_FULL_CHECKING =
-        Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
-
-    // Property ids
-
-    protected static final String ERROR_REPORTER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
-    protected static final String SYMBOL_TABLE =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
-    protected static final String ENTITY_MANAGER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
-
-    //
-    // Data
-    //
-
-    protected XSGrammarResolver fGrammarResolver;
-    protected SubstitutionGroupHandler fSubGroupHandler;
-    protected CMBuilder fCMBuilder;
-    protected XSDHandler fSchemaHandler;
-    protected XMLErrorReporter fErrorReporter;
-    protected XMLEntityResolver fEntityResolver;
-    protected SymbolTable fSymbolTable;
-    protected GrammarPool fGrammarPool = null;
-
-    protected ASModelImpl fAbstractSchema;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a DOM Builder using the dtd/xml schema parser configuration.
-     */
-    public DOMASBuilderImpl() {
-        super(new DTDXSParserConfiguration());
-    } // <init>
-
-    /**
-     * Constructs a DOM Builder using the specified parser configuration.
-     */
-    public DOMASBuilderImpl(XMLParserConfiguration config) {
-        super(config);
-    } // <init>(XMLParserConfiguration)
-
-    /**
-     * Constructs a DOM Builder using the specified symbol table.
-     */
-    public DOMASBuilderImpl(SymbolTable symbolTable) {
-        super(new DTDXSParserConfiguration(symbolTable));
-    } // <init>(SymbolTable)
-
-
-    /**
-     * Constructs a DOM Builder using the specified symbol table and
-     * grammar pool.
-     */
-    public DOMASBuilderImpl(SymbolTable symbolTable, GrammarPool grammarPool) {
-        super(new DTDXSParserConfiguration(symbolTable, grammarPool));
-        fGrammarPool = grammarPool;
-    }
-
-    //
-    // DOMASBuilder methods
-    //
-
-    /**
-     * Associate an <code>ASModel</code> with a document instance. This
-     * <code>ASModel</code> will be used by the "
-     * <code>validate-if-schema</code>" and "
-     * <code>datatype-normalization</code>" options during the load of a new
-     * <code>Document</code>.
-     */
-    public ASModel getAbstractSchema() {
-        return fAbstractSchema;
-    }
-
-    /**
-     * Associate an <code>ASModel</code> with a document instance. This
-     * <code>ASModel</code> will be used by the "
-     * <code>validate-if-schema</code>" and "
-     * <code>datatype-normalization</code>" options during the load of a new
-     * <code>Document</code>.
-     */
-    public void setAbstractSchema(ASModel abstractSchema) {
-
-        // since the ASModel associated with this object is an attribute
-        // according to the DOM IDL, we must obliterate anything
-        // that was set before, rather than adding to it.
-        fAbstractSchema = (ASModelImpl)abstractSchema;
-
-        // make sure the GrammarPool is properly initialized.
-        if (fGrammarPool == null) {
-            fGrammarPool = (GrammarPool)fConfiguration.getProperty(StandardParserConfiguration.GRAMMAR_POOL);
-        }
-        initGrammarPool(fAbstractSchema);
-    }
-
-
-    // some constants that'll be added into the symbol table
-    String XMLNS;
-    String URI_XSI;
-    String XSI_SCHEMALOCATION;
-    String XSI_NONAMESPACESCHEMALOCATION;
-    String XSI_TYPE;
-    String XSI_NIL;
-    String URI_SCHEMAFORSCHEMA;
-
-    /**
-     * Parse a Abstract Schema from a location identified by an URI.
-     *
-     * @param uri The location of the Abstract Schema to be read.
-     * @return The newly created <code>Abstract Schema</code>.
-     * @exception DOMASException
-     *   Exceptions raised by <code>parseASURI()</code> originate with the
-     *   installed ErrorHandler, and thus depend on the implementation of
-     *   the <code>DOMErrorHandler</code> interfaces. The default error
-     *   handlers will raise a <code>DOMASException</code> if any form of
-     *   Abstract Schema inconsistencies or warning occurs during the parse,
-     *   but application defined errorHandlers are not required to do so.
-     *   <br> WRONG_MIME_TYPE_ERR: Raised when <code>mimeTypeCheck</code> is
-     *   <code>true</code> and the inputsource has an incorrect MIME Type.
-     *   See attribute <code>mimeTypeCheck</code>.
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parseURI()</code> originate with the
-     *   installed ErrorHandler, and thus depend on the implementation of
-     *   the <code>DOMErrorHandler</code> interfaces. The default error
-     *   handlers will raise a DOMSystemException if any form I/O or other
-     *   system error occurs during the parse, but application defined error
-     *   handlers are not required to do so.
-     */
-    public ASModel parseASURI(String uri)
-                              throws DOMASException, Exception {
-       if (fSchemaHandler == null) {
-           fGrammarResolver = new XSGrammarResolver();
-           fSubGroupHandler = new SubstitutionGroupHandler(fGrammarResolver);
-           fSchemaHandler = new XSDHandler(fGrammarResolver);
-           fCMBuilder = new CMBuilder(new XSDeclarationPool());
-       }
-
-       fErrorReporter = (XMLErrorReporter)fConfiguration.getProperty(ERROR_REPORTER);
-       fEntityResolver = (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
-       if (fEntityResolver == null)
-           fEntityResolver = (XMLEntityResolver)fConfiguration.getProperty(ENTITY_MANAGER);
-
-       fSymbolTable = (SymbolTable)fConfiguration.getProperty(SYMBOL_TABLE);
-       String externalSchemas =
-            (String)(fConfiguration.getProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SCHEMA_LOCATION));
-       String noNamespaceExternalSchemas =
-            (String)(fConfiguration.getProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SCHEMA_NONS_LOCATION));
-
-       XMLNS = fSymbolTable.addSymbol(SchemaSymbols.O_XMLNS);
-       URI_XSI = fSymbolTable.addSymbol(SchemaSymbols.URI_XSI);
-       XSI_SCHEMALOCATION = fSymbolTable.addSymbol(SchemaSymbols.OXSI_SCHEMALOCATION);
-       XSI_NONAMESPACESCHEMALOCATION = fSymbolTable.addSymbol(SchemaSymbols.OXSI_NONAMESPACESCHEMALOCATION);
-       XSI_TYPE = fSymbolTable.addSymbol(SchemaSymbols.OXSI_TYPE);
-       XSI_NIL = fSymbolTable.addSymbol(SchemaSymbols.OXSI_NIL);
-       URI_SCHEMAFORSCHEMA = fSymbolTable.addSymbol(SchemaSymbols.OURI_SCHEMAFORSCHEMA);
-
-       initGrammarResolver();
-       fSubGroupHandler.reset();
-       fSchemaHandler.reset(fErrorReporter, fEntityResolver, fSymbolTable, externalSchemas, noNamespaceExternalSchemas);
-
-       SchemaGrammar grammar = fSchemaHandler.parseSchema(null,uri);
-
-       if (getFeature(SCHEMA_FULL_CHECKING)) {
-           XSConstraints.fullSchemaChecking(fGrammarResolver, fSubGroupHandler, fCMBuilder, fErrorReporter);
-       }
-
-       ASModelImpl newAsModel = new ASModelImpl();
-       addGrammars(newAsModel, fGrammarResolver);
-       return newAsModel;
-    }
-
-    /**
-     * Parse a Abstract Schema from a location identified by an
-     * <code>DOMInputSource</code>.
-     *
-     * @param is The <code>DOMInputSource</code> from which the source
-     *   Abstract Schema is to be read.
-     * @return The newly created <code>ASModel</code>.
-     * @exception DOMASException
-     *   Exceptions raised by <code>parseASURI()</code> originate with the
-     *   installed ErrorHandler, and thus depend on the implementation of
-     *   the <code>DOMErrorHandler</code> interfaces. The default error
-     *   handlers will raise a <code>DOMASException</code> if any form of
-     *   Abstract Schema inconsistencies or warning occurs during the parse,
-     *   but application defined errorHandlers are not required to do so.
-     *   <br> WRONG_MIME_TYPE_ERR: Raised when <code>mimeTypeCheck</code> is
-     *   true and the inputsource has an incorrect MIME Type. See attribute
-     *   <code>mimeTypeCheck</code>.
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parseURI()</code> originate with the
-     *   installed ErrorHandler, and thus depend on the implementation of
-     *   the <code>DOMErrorHandler</code> interfaces. The default error
-     *   handlers will raise a DOMSystemException if any form I/O or other
-     *   system error occurs during the parse, but application defined error
-     *   handlers are not required to do so.
-     */
-    public ASModel parseASInputSource(DOMInputSource is)
-                                      throws DOMASException, Exception {
-       if (fSchemaHandler == null) {
-           fGrammarResolver = new XSGrammarResolver();
-           fSubGroupHandler = new SubstitutionGroupHandler(fGrammarResolver);
-           fSchemaHandler = new XSDHandler(fGrammarResolver);
-           fCMBuilder = new CMBuilder(new XSDeclarationPool());
-       }
-
-       fErrorReporter = (XMLErrorReporter)fConfiguration.getProperty(ERROR_REPORTER);
-       fEntityResolver = (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
-
-       fSymbolTable = (SymbolTable)fConfiguration.getProperty(SYMBOL_TABLE);
-       String externalSchemas =
-            (String)(fConfiguration.getProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SCHEMA_LOCATION));
-       String noNamespaceExternalSchemas =
-            (String)(fConfiguration.getProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SCHEMA_NONS_LOCATION));
-
-       XMLNS = fSymbolTable.addSymbol(SchemaSymbols.O_XMLNS);
-       URI_XSI = fSymbolTable.addSymbol(SchemaSymbols.URI_XSI);
-       XSI_SCHEMALOCATION = fSymbolTable.addSymbol(SchemaSymbols.OXSI_SCHEMALOCATION);
-       XSI_NONAMESPACESCHEMALOCATION = fSymbolTable.addSymbol(SchemaSymbols.OXSI_NONAMESPACESCHEMALOCATION);
-       XSI_TYPE = fSymbolTable.addSymbol(SchemaSymbols.OXSI_TYPE);
-       XSI_NIL = fSymbolTable.addSymbol(SchemaSymbols.OXSI_NIL);
-       URI_SCHEMAFORSCHEMA = fSymbolTable.addSymbol(SchemaSymbols.OURI_SCHEMAFORSCHEMA);
-
-       initGrammarResolver();
-       fSubGroupHandler.reset();
-       fSchemaHandler.reset(fErrorReporter, fEntityResolver, fSymbolTable, externalSchemas, noNamespaceExternalSchemas);
-
-       SchemaGrammar grammar = fSchemaHandler.parseSchema(is.getBaseURI(),is.getSystemId());
-
-       if (getFeature(SCHEMA_FULL_CHECKING)) {
-           XSConstraints.fullSchemaChecking(fGrammarResolver, fSubGroupHandler, fCMBuilder, fErrorReporter);
-       }
-
-       ASModelImpl newAsModel = new ASModelImpl();
-       addGrammars(newAsModel, fGrammarResolver);
-       return newAsModel;
-    }
-
-    // put all the grammars we have access to in the GrammarResolver
-    private void initGrammarResolver() {
-        fGrammarResolver.reset();
-        fGrammarResolver.putGrammar(URI_SCHEMAFORSCHEMA, SchemaGrammar.SG_SchemaNS);
-        if (fAbstractSchema != null)
-            initGrammarResolverRecurse(fAbstractSchema);
-    }
-    private void initGrammarResolverRecurse(ASModelImpl currModel) {
-        if(currModel.getGrammar() != null) {
-            fGrammarResolver.putGrammar(currModel.getGrammar());
-        }
-        for(int i = 0; i < currModel.getInternalASModels().size(); i++) {
-            ASModelImpl nextModel = (ASModelImpl)(currModel.getInternalASModels().elementAt(i));
-            initGrammarResolverRecurse(nextModel);
-        }
-    }
-
-    private void addGrammars(ASModelImpl model, XSGrammarResolver grammarResolver) {
-        SchemaGrammar [] grammarList = grammarResolver.getGrammars();
-        for(int i=0; i<grammarList.length; i++) {
-            ASModelImpl newModel = new ASModelImpl();
-            newModel.setGrammar(grammarList[i]);
-            model.addASModel(newModel);
-        }
-    } // addGrammars
-
-    private void initGrammarPool(ASModelImpl currModel) {
-        // put all the grammars in fAbstractSchema into the grammar pool.
-        SchemaGrammar grammar = null;
-        if((grammar = currModel.getGrammar()) != null) {
-            String tns = grammar.getTargetNamespace();
-            fGrammarPool.putGrammarNS(tns, grammar);
-        }
-        Vector modelStore = currModel.getInternalASModels();
-        for (int i = 0; i < modelStore.size(); i++) {
-            initGrammarPool((ASModelImpl)modelStore.elementAt(i));
-        }
-    }
-} // class DOMASBuilderImpl
diff --git a/src/org/apache/xerces/parsers/DOMBuilderImpl.java b/src/org/apache/xerces/parsers/DOMBuilderImpl.java
deleted file mode 100644
index 3f424bb..0000000
--- a/src/org/apache/xerces/parsers/DOMBuilderImpl.java
+++ /dev/null
@@ -1,688 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Hashtable;
-import java.util.Stack;
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import org.apache.xerces.dom3.DOMErrorHandler;
-import org.apache.xerces.dom3.ls.DOMBuilder;
-import org.apache.xerces.dom3.ls.DOMEntityResolver;
-import org.apache.xerces.dom3.ls.DOMBuilderFilter;
-import org.apache.xerces.dom3.ls.DOMInputSource;
-
-import org.apache.xerces.util.DOMEntityResolverWrapper;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.util.DOMErrorHandlerWrapper;
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-
-/**
- * This is Xerces DOM Builder class. It uses the abstract DOM
- * parser with a document scanner, a dtd scanner, and a validator, as 
- * well as a grammar pool.
- *
- * @author Pavani Mukthipudi, Sun Microsystems Inc.
- * @author Elena Litani, IBM
- * @author Rahul Srivastava, Sun Microsystems Inc.
- *
- */
-
-// REVISIT: 
-// 1. "load-as-infoset" should be implemented
-// 2. why do we need so many fields in this class (why don't we use AbstractDomParser fields)
-// 3. implementation of setFeature method (we are going via switch several times)
-// 4. include-comments - I've defined a constant for DOM feature in Constants. 
-//    I don't think we need to define corresponding feature for Xerces parser 
-//    (with Xerces prefix).
-//    We probably should define all DOM Feature constants in Constants.java
-//  --el
- 
-public class DOMBuilderImpl
-    extends AbstractDOMParser implements DOMBuilder {
-    
-    //
-    // Constants
-    //
-
-    // feature ids
-
-    /** Feature id: namespace declarations. */
-    protected static final String NAMESPACE_DECLARATIONS =
-        "namespace-declarations";
-        
-    /** Feature id: validation. */
-    protected static final String VALIDATION =
-        "validation";
-        
-    /** Feature id: external parameter entities. */
-    protected static final String EXTERNAL_PARAMETER_ENTITIES =
-        "external-parameter-entities";
-        
-    /** Feature id: external general entities. */
-    protected static final String EXTERNAL_GENERAL_ENTITIES =
-        "external-general-entities";
-        
-    /** Feature id: external dtd subset. */
-    protected static final String EXTERNAL_DTD_SUBSET =
-        "external-dtd-subset";
-        
-    /** Feature id: validate if schema. */
-    protected static final String VALIDATE_IF_SCHEMA =
-        "validate-if-schema";
-        
-    /** Feature id: validate against dtd. */
-    protected static final String VALIDATE_AGAINST_DTD =
-        "validate-against-dtd";  
-        
-    /** Feature id: datatype normalization. */
-    protected static final String DATATYPE_NORMALIZATION =
-        "datatype-normalization"; 
-        
-    /** Feature id: create entity ref nodes. */
-    protected static final String CREATE_ENTITY_REFERENCE_NODES =
-        "create-entity-ref-nodes"; 
-        
-    /** Feature id: create entity nodes. */
-    protected static final String CREATE_ENTITY_NODES =
-        "create-entity-nodes";
-           
-    /** Feature id: whitespace in element content. */
-    protected static final String WHITESPACE_IN_ELEMENT_CONTENT =
-        "whitespace-in-element-content"; 
-    
-    /** Feature id: comments. */
-    protected static final String COMMENTS =
-        "comments";  
-        
-    /** Feature id: charset overrides xml encoding. */
-    protected static final String CHARSET_OVERRIDES_XML_ENCODING =
-        "charset-overrides-xml-encoding";  
-        
-    /** Feature id: load as infoset. */
-    protected static final String LOAD_AS_INFOSET =
-        "load-as-infoset";  
-        
-    /** Feature id: supported mediatypes only. */
-    protected static final String SUPPORTED_MEDIATYPES_ONLY =
-        "supported-mediatypes-only";
-        
-    // SAX & Xerces feature ids
-
-    /** Feature id: validation. */
-    protected static final String VALIDATION_FEATURE =
-        Constants.SAX_FEATURE_PREFIX+Constants.VALIDATION_FEATURE;
-        
-    /** Feature id: external parameter entities. */
-    protected static final String EXTERNAL_PARAMETER_ENTITIES_FEATURE =
-        Constants.SAX_FEATURE_PREFIX+Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-        
-    /** Feature id: external general entities. */
-    protected static final String EXTERNAL_GENERAL_ENTITIES_FEATURE =
-        Constants.SAX_FEATURE_PREFIX+Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-        
-    /** Feature id: load external dtd. */
-    protected static final String LOAD_EXTERNAL_DTD_FEATURE =
-        Constants.XERCES_FEATURE_PREFIX+Constants.LOAD_EXTERNAL_DTD_FEATURE;
-        
-    //
-    // Data
-    //
-    
-    // features
-
-    /** Namespace declarations. */
-    protected boolean fNamespaceDeclarations;
-    
-    /** Validate if schema */
-    protected boolean fValidateIfSchema;
-    
-    /** Validate against DTD */
-    protected boolean fValidateAgainstDTD;
-    
-    /** Datatype normalization */
-    protected boolean fDatatypeNormalization;
-    
-    /** Create entity nodes */
-    protected boolean fCreateEntityNodes;
-        
-    /** Whitespace in element content */
-    protected boolean fWhitespaceInElementContent;
-    
-    /** Charset overrides xml encoding */
-    protected boolean fCharsetOverridesXmlEncoding;
-    
-    /** Load as infoset */
-    protected boolean fLoadAsInfoset;
-    
-    /** Supported mediatypes only */
-    protected boolean fSupportedMediatypesOnly;
-    
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a DOM Builder using the dtd/xml schema parser configuration.
-     */
-    public DOMBuilderImpl() {
-        this(new DTDXSParserConfiguration());
-    } // <init>
-
-    /**
-     * Constructs a DOM Builder using the specified parser configuration.
-     */
-    public DOMBuilderImpl(XMLParserConfiguration config) {
-        super(config);
-        
-        // add recognized features
-        final String[] domRecognizedFeatures = {
-            NAMESPACE_DECLARATIONS,
-            VALIDATE_IF_SCHEMA,
-            VALIDATE_AGAINST_DTD,
-            DATATYPE_NORMALIZATION,
-            CREATE_ENTITY_NODES,
-            WHITESPACE_IN_ELEMENT_CONTENT,
-            CHARSET_OVERRIDES_XML_ENCODING,
-            LOAD_AS_INFOSET,
-            SUPPORTED_MEDIATYPES_ONLY
-        };
-        
-        fConfiguration.addRecognizedFeatures(domRecognizedFeatures);
-
-        // set default values
-        fConfiguration.setFeature(NAMESPACE_DECLARATIONS, true);
-        fConfiguration.setFeature(VALIDATE_IF_SCHEMA, false);
-        fConfiguration.setFeature(VALIDATE_AGAINST_DTD, false);
-        fConfiguration.setFeature(DATATYPE_NORMALIZATION, false);
-        fConfiguration.setFeature(CREATE_ENTITY_NODES, true);
-        fConfiguration.setFeature(WHITESPACE_IN_ELEMENT_CONTENT, true);
-        fConfiguration.setFeature(CHARSET_OVERRIDES_XML_ENCODING, true);
-        fConfiguration.setFeature(LOAD_AS_INFOSET, false);
-        fConfiguration.setFeature(SUPPORTED_MEDIATYPES_ONLY, false);
-        
-    } // <init>(XMLParserConfiguration)
-    
-    /**
-     * Constructs a DOM Builder using the specified symbol table.
-     */
-    public DOMBuilderImpl(SymbolTable symbolTable) {
-        this(new DTDXSParserConfiguration(symbolTable));
-    } // <init>(SymbolTable)
-
-
-    /**
-     * Constructs a DOM Builder using the specified symbol table and
-     * grammar pool.
-     */
-    public DOMBuilderImpl(SymbolTable symbolTable, GrammarPool grammarPool) {
-        this(new DTDXSParserConfiguration(symbolTable, grammarPool));
-    }
-    
-    /**
-     * Resets the parser state.
-     *
-     * @throws SAXException Thrown on initialization error.
-     */
-    public void reset() {
-        super.reset();
-	try {
-            fNamespaceDeclarations = fConfiguration.getFeature(NAMESPACE_DECLARATIONS);
-            fValidateIfSchema = fConfiguration.getFeature(VALIDATE_IF_SCHEMA);
-            fValidateAgainstDTD = fConfiguration.getFeature(VALIDATE_AGAINST_DTD);
-            fDatatypeNormalization = fConfiguration.getFeature(DATATYPE_NORMALIZATION);
-            fWhitespaceInElementContent = fConfiguration.getFeature(WHITESPACE_IN_ELEMENT_CONTENT);
-            fCharsetOverridesXmlEncoding = fConfiguration.getFeature(CHARSET_OVERRIDES_XML_ENCODING);
-            fLoadAsInfoset = fConfiguration.getFeature(LOAD_AS_INFOSET);
-            fSupportedMediatypesOnly = fConfiguration.getFeature(SUPPORTED_MEDIATYPES_ONLY);
-        }
-        catch (XMLConfigurationException e) {
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR, e.getMessage());
-            }
-            else {
-                throw new DOMException(DOMException.NOT_SUPPORTED_ERR, e.getMessage());
-            }
-        }
-
-    } // reset() 
-    
-    //
-    // DOMBuilder methods
-    //
-
-    /**
-     * If a <code>DOMEntityResolver</code> has been specified, each time a 
-     * reference to an external entity is encountered the 
-     * <code>DOMBuilder</code> will pass the public and system IDs to the 
-     * entity resolver, which can then specify the actual source of the 
-     * entity.
-     */
-    public DOMEntityResolver getEntityResolver() {
-    	DOMEntityResolver domEntityResolver = null;
-        try {
-            DOMEntityResolver entityResolver = (DOMEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
-            if (entityResolver != null && 
-                entityResolver instanceof DOMEntityResolverWrapper) {
-                domEntityResolver = ((DOMEntityResolverWrapper)entityResolver).getEntityResolver();
-            }
-        }
-        catch (XMLConfigurationException e) {
-            
-        }
-        return domEntityResolver;
-    }
-    
-    /**
-     * If a <code>DOMEntityResolver</code> has been specified, each time a 
-     * reference to an external entity is encountered the 
-     * <code>DOMBuilder</code> will pass the public and system IDs to the 
-     * entity resolver, which can then specify the actual source of the 
-     * entity.
-     */
-    public void setEntityResolver(DOMEntityResolver entityResolver) {
-    	try {
-            fConfiguration.setProperty(ENTITY_RESOLVER, 
-            				new DOMEntityResolverWrapper(entityResolver));
-        }
-        catch (XMLConfigurationException e) {
-            
-        }
-    }
-
-    /**
-     *  In the event that an error is encountered in the XML document being 
-     * parsed, the <code>DOMDcoumentBuilder</code> will call back to the 
-     * <code>errorHandler</code> with the error information. When the 
-     * document loading process calls the error handler the node closest to 
-     * where the error occured is passed to the error handler if the 
-     * implementation, if the implementation is unable to pass the node 
-     * where the error occures the document Node is passed to the error 
-     * handler. Mutations to the document from within an error handler will 
-     * result in implementation dependent behavour. 
-     */
-    public DOMErrorHandler getErrorHandler() {
-    	DOMErrorHandler errorHandler = null;
-        try {
-            DOMErrorHandler domErrorHandler = 
-                (DOMErrorHandler)fConfiguration.getProperty(ERROR_HANDLER);
-            if (domErrorHandler != null && 
-                domErrorHandler instanceof DOMErrorHandlerWrapper) {
-                errorHandler = ((DOMErrorHandlerWrapper)domErrorHandler).getErrorHandler();
-            }
-        }
-        catch (XMLConfigurationException e) {
-            
-        }
-        return errorHandler;
-    }
-    
-    /**
-     *  In the event that an error is encountered in the XML document being 
-     * parsed, the <code>DOMDcoumentBuilder</code> will call back to the 
-     * <code>errorHandler</code> with the error information. When the 
-     * document loading process calls the error handler the node closest to 
-     * where the error occured is passed to the error handler if the 
-     * implementation, if the implementation is unable to pass the node 
-     * where the error occures the document Node is passed to the error 
-     * handler. Mutations to the document from within an error handler will 
-     * result in implementation dependent behavour. 
-     */
-    public void setErrorHandler(DOMErrorHandler errorHandler) {
-    	try {
-            fConfiguration.setProperty(ERROR_HANDLER, 
-                                       new DOMErrorHandlerWrapper(errorHandler));
-        }
-        catch (XMLConfigurationException e) {
-            
-        }
-    }
-
-    /**
-     *  When the application provides a filter, the parser will call out to 
-     * the filter at the completion of the construction of each 
-     * <code>Element</code> node. The filter implementation can choose to 
-     * remove the element from the document being constructed (unless the 
-     * element is the document element) or to terminate the parse early. If 
-     * the document is being validated when it's loaded the validation 
-     * happens before the filter is called. 
-     */
-    public DOMBuilderFilter getFilter() {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-    /**
-     *  When the application provides a filter, the parser will call out to 
-     * the filter at the completion of the construction of each 
-     * <code>Element</code> node. The filter implementation can choose to 
-     * remove the element from the document being constructed (unless the 
-     * element is the document element) or to terminate the parse early. If 
-     * the document is being validated when it's loaded the validation 
-     * happens before the filter is called. 
-     */
-    public void setFilter(DOMBuilderFilter filter) {
-    	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-
-    /**
-     * Set the state of a feature.
-     * 
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * <br>It is possible for a <code>DOMBuilder</code> to recognize a feature 
-     * name but to be unable to set its value.
-     * 
-     * @param name The feature name.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_SUPPORTED_ERR exception when the <code>DOMBuilder</code> 
-     *   recognizes the feature name but cannot set the requested value. 
-     *   <br>Raise a NOT_FOUND_ERR When the <code>DOMBuilder</code> does not 
-     *   recognize the feature name.
-     */
-    public void setFeature(String name, boolean state) throws DOMException {
-        try {
-    	    if (canSetFeature(name, state)) {
-            	if (name.equals(VALIDATION)) {
-            	    fConfiguration.setFeature(VALIDATION_FEATURE, state);
-            	}
-            	else if (name.equals(EXTERNAL_PARAMETER_ENTITIES)) {
-            	    fConfiguration.setFeature(EXTERNAL_PARAMETER_ENTITIES_FEATURE, state);
-            	}
-            	else if (name.equals(EXTERNAL_GENERAL_ENTITIES)) {
-            	    fConfiguration.setFeature(EXTERNAL_GENERAL_ENTITIES_FEATURE, state);
-            	}
-            	else if (name.equals(EXTERNAL_DTD_SUBSET)) {
-            	    fConfiguration.setFeature(LOAD_EXTERNAL_DTD_FEATURE, state);
-            	}
-            	else if (name.equals(COMMENTS)) {
-            	    fConfiguration.setFeature(INCLUDE_COMMENTS_FEATURE, state);
-            	}
-            	else if(name.equals(CREATE_ENTITY_REFERENCE_NODES)) {
-            	    fConfiguration.setFeature(CREATE_ENTITY_REF_NODES, state);
-            	}
-            	else {
-            	    fConfiguration.setFeature(name, state);
-            	}
-            }
-            else {
-            	throw new DOMException(DOMException.NOT_SUPPORTED_ERR,"Feature \""+name+"\" cannot be set to \""+state+"\"");
-            }
-        }
-        catch (XMLConfigurationException e) {
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR,"Feature \""+name+"\" not recognized");
-            }
-            else {
-                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,"Feature \""+name+"\" not supported");
-            }
-        }
-    }
-
-    /**
-     * Query whether setting a feature to a specific value is supported.
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * 
-     * @param name The feature name, which is a DOM has-feature style string.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @return <code>true</code> if the feature could be successfully set to 
-     *   the specified value, or <code>false</code> if the feature is not 
-     *   recognized or the requested value is not supported. The value of 
-     *   the feature itself is not changed.
-     */
-    public boolean canSetFeature(String name, boolean state) {
-    	if (name.equals(NAMESPACE_DECLARATIONS) && !state) {
-    	    return false;
-    	}
-    	else if(name.equals(VALIDATE_IF_SCHEMA) && state) {
-    	    return false;
-    	}
-    	else if(name.equals(VALIDATE_AGAINST_DTD) && state) {
-    	    return false;
-    	}
-    	else if(name.equals(CREATE_ENTITY_NODES) && !state) {
-    	    return false;
-    	}
-    	else if(name.equals(WHITESPACE_IN_ELEMENT_CONTENT) && !state) {
-    	    return false;
-    	}
-    	else if(name.equals(LOAD_AS_INFOSET) && state) {
-    	    return false;
-    	}
-    	else if(name.equals(SUPPORTED_MEDIATYPES_ONLY) && state) {
-    	    return false;
-    	}
-    	
-    	return true;
-    }
-
-    /**
-     * Look up the value of a feature.
-     * <br>The feature name has the same form as a DOM hasFeature string
-     * 
-     * @param name The feature name, which is a string with DOM has-feature 
-     *   syntax.
-     * @return The current state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_FOUND_ERR When the <code>DOMBuilder</code> does not 
-     *   recognize the feature name.
-     */
-    public boolean getFeature(String name) throws DOMException {
-    	try {
-            if (name.equals(VALIDATION)) {
-                return fConfiguration.getFeature(VALIDATION_FEATURE);
-            }
-            else if (name.equals(EXTERNAL_PARAMETER_ENTITIES)) {
-                return fConfiguration.getFeature(EXTERNAL_PARAMETER_ENTITIES_FEATURE);
-            }
-            else if (name.equals(EXTERNAL_GENERAL_ENTITIES)) {
-                return fConfiguration.getFeature(EXTERNAL_GENERAL_ENTITIES_FEATURE);
-            }
-            else if (name.equals(EXTERNAL_DTD_SUBSET)) {
-                return fConfiguration.getFeature(LOAD_EXTERNAL_DTD_FEATURE);
-            }
-            else if (name.equals(COMMENTS)) {
-                return fConfiguration.getFeature(INCLUDE_COMMENTS_FEATURE);
-            }
-            else if(name.equals(CREATE_ENTITY_REFERENCE_NODES)) {
-                return fConfiguration.getFeature(CREATE_ENTITY_REF_NODES);
-            }
-            else {
-                return fConfiguration.getFeature(name);
-            }
-        }
-        catch (XMLConfigurationException e) {
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new DOMException(DOMException.NOT_FOUND_ERR,"Feature \""+name+"\" not recognized");
-            }
-            else {
-                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,"Feature \""+name+"\" not supported");
-            }
-        }
-    }
-    
-    /**
-     * Parse an XML document from a location identified by an URI reference. 
-     * If the URI contains a fragment identifier (see section 4.1 in ), the 
-     * behavior is not defined by this specification.
-     *  
-     * @param uri The location of the XML document to be read.
-     * @return If the <code>DOMBuilder</code> is a synchronous 
-     *   <code>DOMBuilder</code> the newly created and populated 
-     *   <code>Document</code> is returned. If the <code>DOMBuilder</code> 
-     *   is asynchronous then <code>null</code> is returned since the 
-     *   document object is not yet parsed when this method returns.
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parseURI</code> originate with the 
-     *   installed ErrorHandler, and thus depend on the implementation of 
-     *   the <code>DOMErrorHandler</code> interfaces. The default error 
-     *   handlers will raise a DOMSystemException if any form I/O or other 
-     *   system error occurs during the parse, but application defined error 
-     *   handlers are not required to do so. 
-     */
-    public Document parseURI(String uri) throws Exception {
-        XMLInputSource source = new XMLInputSource(null, uri, null);
-        try {
-            parse(source);
-        }
-
-        catch (XNIException e) {
-            Exception ex = e.getException();
-            throw ex;
-        }
-            	
-        // close stream opened by the parser
-        finally {
-            try {
-                Reader reader = source.getCharacterStream();
-                if (reader != null) {
-                    reader.close();
-                }
-                else {
-                    InputStream is = source.getByteStream();
-                    if (is != null) {
-                        is.close();
-                    }
-                }
-            }
-            catch (IOException e) {
-                // ignore
-            }
-        }
-        return getDocument();
-    }
-
-    /**
-     * Parse an XML document from a resource identified by an 
-     * <code>DOMInputSource</code>.
-     * 
-     * @param is The <code>DOMInputSource</code> from which the source 
-     *   document is to be read. 
-     * @return If the <code>DOMBuilder</code> is a synchronous 
-     *   <code>DOMBuilder</code> the newly created and populated 
-     *   <code>Document</code> is returned. If the <code>DOMBuilder</code> 
-     *   is asynchronous then <code>null</code> is returned since the 
-     *   document object is not yet parsed when this method returns.
-     * @exception DOMSystemException
-     *   Exceptions raised by <code>parse</code> originate with the installed 
-     *   ErrorHandler, and thus depend on the implementation of the 
-     *   <code>DOMErrorHandler</code> interfaces. The default ErrorHandlers 
-     *   will raise a <code>DOMSystemException</code> if any form I/O or 
-     *   other system error occurs during the parse, but application defined 
-     *   ErrorHandlers are not required to do so. 
-     */
-    public Document parse(DOMInputSource is) throws Exception {
-    	
-    	try {
-            XMLInputSource xmlInputSource = 
-                new XMLInputSource(is.getPublicId(), is.getSystemId(), is.getBaseURI());
-            xmlInputSource.setByteStream(is.getByteStream());
-            xmlInputSource.setCharacterStream(is.getCharacterStream());
-            xmlInputSource.setEncoding(is.getEncoding());
-            parse(xmlInputSource);
-        }
-        catch (XNIException e) {
-            Exception ex = e.getException();
-            throw ex;
-        }
-                
-    	return getDocument();
-    }
-                          
-    /**
-     *  Parse an XML document or fragment from a resource identified by an 
-     * <code>DOMInputSource</code> and insert the content into an existing 
-     * document at the position epcified with the <code>contextNode</code> 
-     * and <code>action</code> arguments. When parsing the input stream the 
-     * context node is used for resolving unbound namespace prefixes.
-     *  
-     * @param is  The <code>DOMInputSource</code> from which the source 
-     *   document is to be read. 
-     * @param cnode  The <code>Node</code> that is used as the context for 
-     *   the data that is being parsed. 
-     * @param action This parameter describes which action should be taken 
-     *   between the new set of node being inserted and the existing 
-     *   children of the context node. The set of possible actions is 
-     *   defined above. 
-     * @exception DOMException
-     *   HIERARCHY_REQUEST_ERR: Thrown if this action results in an invalid 
-     *   hierarchy (i.e. a Document with more than one document element). 
-     */
-    public void parseWithContext(DOMInputSource is, Node cnode, 
-                                 short action) throws DOMException {
-        // REVISIT: need to implement.
-	throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Not supported");
-    }
-    
-        
-} // class DOMASBuilderImpl
diff --git a/src/org/apache/xerces/parsers/DOMParser.java b/src/org/apache/xerces/parsers/DOMParser.java
deleted file mode 100644
index 9b8c470..0000000
--- a/src/org/apache/xerces/parsers/DOMParser.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.util.EntityResolverWrapper;
-import org.apache.xerces.util.ErrorHandlerWrapper;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLParseException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.helpers.LocatorImpl;
-
-/**
- * This is the main Xerces DOM parser class. It uses the abstract DOM
- * parser with a document scanner, a dtd scanner, and a validator, as 
- * well as a grammar pool.
- *
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$ 
- */
-public class DOMParser
-    extends AbstractDOMParser {
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a DOM parser using the dtd/xml schema parser configuration.
-     */
-    public DOMParser() {
-        super(new StandardParserConfiguration());
-    } // <init>
-
-    /**
-     * Constructs a DOM parser using the specified parser configuration.
-     */
-    public DOMParser(XMLParserConfiguration config) {
-        super(config);
-    } // <init>(XMLParserConfiguration)
-
-    /**
-     * Constructs a DOM parser using the specified symbol table.
-     */
-    public DOMParser(SymbolTable symbolTable) {
-        super(new StandardParserConfiguration(symbolTable));
-    } // <init>(SymbolTable)
-
-
-    /**
-     * Constructs a DOM parser using the specified symbol table and
-     * grammar pool.
-     */
-    public DOMParser(SymbolTable symbolTable, GrammarPool grammarPool) {
-        super(new StandardParserConfiguration(symbolTable, grammarPool));
-    }
-
-    //
-    // XMLReader methods
-    //
-
-    /**
-     * Parses the input source specified by the given system identifier.
-     * <p>
-     * This method is equivalent to the following:
-     * <pre>
-     *     parse(new InputSource(systemId));
-     * </pre>
-     *
-     * @param source The input source.
-     *
-     * @exception org.xml.sax.SAXException Throws exception on SAX error.
-     * @exception java.io.IOException Throws exception on i/o error.
-     */
-    public void parse(String systemId) throws SAXException, IOException {
-
-        // parse document
-        XMLInputSource source = new XMLInputSource(null, systemId, null);
-        try {
-            parse(source);
-        }
-
-        // wrap XNI exceptions as SAX exceptions 
-        catch (XMLParseException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                // must be a parser exception; mine it for locator info and throw
-                // a SAXParseException
-                LocatorImpl locatorImpl = new LocatorImpl();
-                locatorImpl.setPublicId(e.getPublicId());
-                locatorImpl.setSystemId(e.getSystemId());
-                locatorImpl.setLineNumber(e.getLineNumber());
-                locatorImpl.setColumnNumber(e.getColumnNumber());
-                throw new SAXParseException(e.getMessage(), locatorImpl);
-            }
-            if (ex instanceof SAXException) {
-                // why did we create an XMLParseException?
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-        catch (XNIException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                throw new SAXException(e.getMessage());
-            }
-            if (ex instanceof SAXException) {
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-
-        // close stream opened by the parser
-        finally {
-            try {
-                Reader reader = source.getCharacterStream();
-                if (reader != null) {
-                    reader.close();
-                }
-                else {
-                    InputStream is = source.getByteStream();
-                    if (is != null) {
-                        is.close();
-                    }
-                }
-            }
-            catch (IOException e) {
-                // ignore
-            }
-        }
-
-    } // parse(String)
-
-    /**
-     * parse
-     *
-     * @param inputSource
-     *
-     * @exception org.xml.sax.SAXException
-     * @exception java.io.IOException
-     */
-    public void parse(InputSource inputSource) 
-        throws SAXException, IOException {
-
-        // parse document
-        try {
-            XMLInputSource xmlInputSource = 
-                new XMLInputSource(inputSource.getPublicId(),
-                                   inputSource.getSystemId(),
-                                   null);
-            xmlInputSource.setByteStream(inputSource.getByteStream());
-            xmlInputSource.setCharacterStream(inputSource.getCharacterStream());
-            xmlInputSource.setEncoding(inputSource.getEncoding());
-            parse(xmlInputSource);
-        }
-
-        // wrap XNI exceptions as SAX exceptions 
-        catch (XMLParseException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                // must be a parser exception; mine it for locator info and throw
-                // a SAXParseException
-                LocatorImpl locatorImpl = new LocatorImpl();
-                locatorImpl.setPublicId(e.getPublicId());
-                locatorImpl.setSystemId(e.getSystemId());
-                locatorImpl.setLineNumber(e.getLineNumber());
-                locatorImpl.setColumnNumber(e.getColumnNumber());
-                throw new SAXParseException(e.getMessage(), locatorImpl);
-            }
-            if (ex instanceof SAXException) {
-                // why did we create an XMLParseException?
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-        catch (XNIException e) {
-            Exception ex = e.getException();
-            if (ex == null) {
-                throw new SAXException(e.getMessage());
-            }
-            if (ex instanceof SAXException) {
-                throw (SAXException)ex;
-            }
-            if (ex instanceof IOException) {
-                throw (IOException)ex;
-            }
-            throw new SAXException(ex);
-        }
-
-    } // parse(InputSource) 
-
-    /**
-     * Sets the resolver used to resolve external entities. The EntityResolver
-     * interface supports resolution of public and system identifiers.
-     *
-     * @param resolver The new entity resolver. Passing a null value will
-     *                 uninstall the currently installed resolver.
-     */
-    public void setEntityResolver(EntityResolver resolver) {
-
-        try {
-            fConfiguration.setProperty(ENTITY_RESOLVER, 
-                                       new EntityResolverWrapper(resolver));
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-
-    } // setEntityResolver(EntityResolver)
-
-    /**
-     * Return the current entity resolver.
-     *
-     * @return The current entity resolver, or null if none
-     *         has been registered.
-     * @see #setEntityResolver
-     */
-    public EntityResolver getEntityResolver() {
-
-        EntityResolver entityResolver = null;
-        try {
-            XMLEntityResolver xmlEntityResolver = 
-                (XMLEntityResolver)fConfiguration.getProperty(ENTITY_RESOLVER);
-            if (xmlEntityResolver != null &&
-                xmlEntityResolver instanceof EntityResolverWrapper) {
-                entityResolver = ((EntityResolverWrapper)xmlEntityResolver).getEntityResolver();
-            }
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-        return entityResolver;
-
-    } // getEntityResolver():EntityResolver
-
-    /**
-     * Allow an application to register an error event handler.
-     *
-     * <p>If the application does not register an error handler, all
-     * error events reported by the SAX parser will be silently
-     * ignored; however, normal processing may not continue.  It is
-     * highly recommended that all SAX applications implement an
-     * error handler to avoid unexpected bugs.</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param errorHandler The error handler.
-     * @exception java.lang.NullPointerException If the handler 
-     *            argument is null.
-     * @see #getErrorHandler
-     */
-    public void setErrorHandler(ErrorHandler errorHandler) {
-
-        try {
-            fConfiguration.setProperty(ERROR_HANDLER, 
-                                       new ErrorHandlerWrapper(errorHandler));
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-
-    } // setErrorHandler(ErrorHandler)
-
-    /**
-     * Return the current error handler.
-     *
-     * @return The current error handler, or null if none
-     *         has been registered.
-     * @see #setErrorHandler
-     */
-    public ErrorHandler getErrorHandler() {
-
-        ErrorHandler errorHandler = null;
-        try {
-            XMLErrorHandler xmlErrorHandler = 
-                (XMLErrorHandler)fConfiguration.getProperty(ERROR_HANDLER);
-            if (xmlErrorHandler != null && 
-                xmlErrorHandler instanceof ErrorHandlerWrapper) {
-                errorHandler = ((ErrorHandlerWrapper)xmlErrorHandler).getErrorHandler();
-            }
-        }
-        catch (XMLConfigurationException e) {
-            // do nothing
-        }
-        return errorHandler;
-
-    } // getErrorHandler():ErrorHandler
-
-    /**
-     * Set the state of any feature in a SAX2 parser.  The parser
-     * might not recognize the feature, and if it does recognize
-     * it, it might not be able to fulfill the request.
-     *
-     * @param featureId The unique identifier (URI) of the feature.
-     * @param state The requested state of the feature (true or false).
-     *
-     * @exception SAXNotRecognizedException If the
-     *            requested feature is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested feature is known, but the requested
-     *            state is not supported.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            fConfiguration.setFeature(featureId, state);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // setFeature(String,boolean)
-
-    /**
-     * Query the state of a feature.
-     *
-     * Query the current state of any feature in a SAX2 parser.  The
-     * parser might not recognize the feature.
-     *
-     * @param featureId The unique identifier (URI) of the feature
-     *                  being set.
-     * @return The current state of the feature.
-     * @exception org.xml.sax.SAXNotRecognizedException If the
-     *            requested feature is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested feature is known but not supported.
-     */
-    public boolean getFeature(String featureId)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            return fConfiguration.getFeature(featureId);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // getFeature(String):boolean
-
-    /**
-     * Set the value of any property in a SAX2 parser.  The parser
-     * might not recognize the property, and if it does recognize
-     * it, it might not support the requested value.
-     *
-     * @param propertyId The unique identifier (URI) of the property
-     *                   being set.
-     * @param Object The value to which the property is being set.
-     *
-     * @exception SAXNotRecognizedException If the
-     *            requested property is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested property is known, but the requested
-     *            value is not supported.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            fConfiguration.setProperty(propertyId, value);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // setProperty(String,Object)
-
-    /**
-     * Query the value of a property.
-     *
-     * Return the current value of a property in a SAX2 parser.
-     * The parser might not recognize the property.
-     *
-     * @param propertyId The unique identifier (URI) of the property
-     *                   being set.
-     * @return The current value of the property.
-     * @exception org.xml.sax.SAXNotRecognizedException If the
-     *            requested property is not known.
-     * @exception SAXNotSupportedException If the
-     *            requested property is known but not supported.
-     */
-    public Object getProperty(String propertyId)
-        throws SAXNotRecognizedException, SAXNotSupportedException {
-
-        try {
-            return fConfiguration.getProperty(propertyId);
-        }
-        catch (XMLConfigurationException e) {
-            String message = e.getMessage();
-            if (e.getType() == XMLConfigurationException.NOT_RECOGNIZED) {
-                throw new SAXNotRecognizedException(message);
-            }
-            else {
-                throw new SAXNotSupportedException(message);
-            }
-        }
-
-    } // getProperty(String):Object
-
-} // class DOMParser
diff --git a/src/org/apache/xerces/parsers/DTDParser.java b/src/org/apache/xerces/parsers/DTDParser.java
deleted file mode 100644
index aa8af06..0000000
--- a/src/org/apache/xerces/parsers/DTDParser.java
+++ /dev/null
@@ -1,501 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import org.apache.xerces.impl.dtd.DTDGrammar;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLDTDScanner;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- */
-public abstract class DTDParser
-    extends XMLGrammarParser
-    implements XMLDTDHandler, XMLDTDContentModelHandler {
-
-    //
-    // Data
-    //
-
-    /** fDTDScanner */
-    protected XMLDTDScanner fDTDScanner;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * 
-     * 
-     * @param symbolTable 
-     */
-    public DTDParser(SymbolTable symbolTable) {
-        super(symbolTable);
-    }
-
-    //
-    // Methods
-    //
-
-    /**
-     * getDTDGrammar
-     * 
-     * @return 
-     */
-    public DTDGrammar getDTDGrammar() {
-        return null;
-    } // getDTDGrammar
-
-    //
-    // XMLDTDHandler methods
-    //
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the 
-     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * <strong>Note:</strong> Since the DTD is an entity, the handler
-     * will be notified of the start of the DTD entity by calling the
-     * startEntity method with the entity name "[dtd]" <em>before</em> calling
-     * the startDTD method.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, String publicId, String systemId, 
-                            String encoding) throws XNIException {
-    }
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method is only called for external
-     * parameter entities referenced in the DTD.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding) throws XNIException {
-    }
-
-    /**
-     * The start of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDTD(XMLLocator locator) throws XNIException {
-    } // startDTD(XMLLocator)
-
-    /**
-     * A comment.
-     * 
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text) throws XNIException {
-    } // comment
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data)
-        throws XNIException {
-    } // processingInstruction
-
-    /**
-     * The start of the external subset.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startExternalSubset() throws XNIException {
-    } // startExternalSubset
-
-    /**
-     * The end of the external subset.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endExternalSubset() throws XNIException {
-    } // endExternalSubset
-
-    /**
-     * An element declaration.
-     * 
-     * @param name         The name of the element.
-     * @param contentModel The element content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void elementDecl(String name, String contentModel)
-        throws XNIException {
-    } // elementDecl
-
-    /**
-     * The start of an attribute list.
-     * 
-     * @param elementName The name of the element that this attribute
-     *                    list is associated with.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startAttlist(String elementName) throws XNIException {
-    } // startAttlist
-
-    /**
-     * An attribute declaration.
-     * 
-     * @param elementName   The name of the element that this attribute
-     *                      is associated with.
-     * @param attributeName The name of the attribute.
-     * @param type          The attribute type. This value will be one of
-     *                      the following: "CDATA", "ENTITY", "ENTITIES",
-     *                      "ENUMERATION", "ID", "IDREF", "IDREFS", 
-     *                      "NMTOKEN", "NMTOKENS", or "NOTATION".
-     * @param enumeration   If the type has the value "ENUMERATION", this
-     *                      array holds the allowed attribute values;
-     *                      otherwise, this array is null.
-     * @param defaultType   The attribute default type. This value will be
-     *                      one of the following: "#FIXED", "#IMPLIED",
-     *                      "#REQUIRED", or null.
-     * @param defaultValue  The attribute default value, or null if no
-     *                      default value is specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void attributeDecl(String elementName, String attributeName, String type, String[] enumeration, String defaultType, XMLString defaultValue)
-        throws XNIException {
-    } // attributeDecl
-
-    /**
-     * The end of an attribute list.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endAttlist() throws XNIException {
-    } // endAttlist
-
-    /**
-     * An internal entity declaration.
-     * 
-     * @param name The name of the entity. Parameter entity names start with
-     *             '%', whereas the name of a general entity is just the 
-     *             entity name.
-     * @param text The value of the entity.
-     * @param nonNormalizedText The non-normalized value of the entity. This
-     *             value contains the same sequence of characters that was in 
-     *             the internal entity declaration, without any entity
-     *             references expanded.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void internalEntityDecl(String name, XMLString text,
-                                   XMLString nonNormalizedText)
-        throws XNIException {
-    } // internalEntityDecl(String,XMLString,XMLString)
-
-    /**
-     * An external entity declaration.
-     * 
-     * @param name     The name of the entity. Parameter entity names start
-     *                 with '%', whereas the name of a general entity is just
-     *                 the entity name.
-     * @param publicId The public identifier of the entity or null if the
-     *                 the entity was specified with SYSTEM.
-     * @param systemId The system identifier of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void externalEntityDecl(String name, String publicId, String systemId)
-        throws XNIException {
-    } // externalEntityDecl
-
-    /**
-     * An unparsed entity declaration.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the entity, or null if not
-     *                 specified.
-     * @param notation The name of the notation.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void unparsedEntityDecl(String name, String publicId, String systemId, String notation)
-        throws XNIException {
-    } // unparsedEntityDecl
-
-    /**
-     * A notation declaration
-     * 
-     * @param name     The name of the notation.
-     * @param publicId The public identifier of the notation, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the notation, or null if not
-     *                 specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws XNIException {
-    } // notationDecl
-
-    /**
-     * The start of a conditional section.
-     * 
-     * @param type The type of the conditional section. This value will
-     *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see XMLDTDHandler#CONDITIONAL_INCLUDE
-     * @see XMLDTDHandler#CONDITIONAL_IGNORE
-     */
-    public void startConditional(short type) throws XNIException {
-    } // startConditional
-
-    /**
-     * The end of a conditional section.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endConditional() throws XNIException {
-    } // endConditional
-
-    /**
-     * The end of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDTD() throws XNIException {
-    } // endDTD
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * <strong>Note:</strong> Since the DTD is an entity, the handler
-     * will be notified of the end of the DTD entity by calling the
-     * endEntity method with the entity name "[dtd]" <em>after</em> calling
-     * the endDTD method.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException {
-    }
-
-    //
-    // XMLDTDContentModelHandler methods
-    //
-
-    /**
-     * The start of a content model. Depending on the type of the content
-     * model, specific methods may be called between the call to the
-     * startContentModel method and the call to the endContentModel method.
-     * 
-     * @param elementName The name of the element.
-     * @param type        The content model type.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_EMPTY
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_ANY
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_MIXED
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_CHILDREN
-     */
-    public void startContentModel(String elementName, short type)
-        throws XNIException {
-    } // startContentModel
-
-    /**
-     * A referenced element in a mixed content model. If the mixed content 
-     * model only allows text content, then this method will not be called
-     * for that model. However, if this method is called for a mixed
-     * content model, then the zero or more occurrence count is implied.
-     * <p>
-     * <strong>Note:</strong> This method is only called after a call to 
-     * the startContentModel method where the type is TYPE_MIXED.
-     * 
-     * @param elementName The name of the referenced element. 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_MIXED
-     */
-    public void mixedElement(String elementName) throws XNIException {
-    } // mixedElement
-
-    /**
-     * The start of a children group.
-     * <p>
-     * <strong>Note:</strong> This method is only called after a call to
-     * the startContentModel method where the type is TYPE_CHILDREN.
-     * <p>
-     * <strong>Note:</strong> Children groups can be nested and have
-     * associated occurrence counts.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_CHILDREN
-     */
-    public void childrenStartGroup() throws XNIException {
-    } // childrenStartGroup
-
-    /**
-     * A referenced element in a children content model.
-     * 
-     * @param elementName The name of the referenced element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_CHILDREN
-     */
-    public void childrenElement(String elementName) throws XNIException {
-    } // childrenElement
-
-    /**
-     * The separator between choices or sequences of a children content
-     * model.
-     * <p>
-     * <strong>Note:</strong> This method is only called after a call to
-     * the startContentModel method where the type is TYPE_CHILDREN.
-     * 
-     * @param separator The type of children separator.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see XMLDTDContentModelHandler#SEPARATOR_CHOICE
-     * @see XMLDTDContentModelHandler#SEPARATOR_SEQUENCE
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_CHILDREN
-     */
-    public void childrenSeparator(short separator) throws XNIException {
-    } // childrenSeparator
-
-    /**
-     * The occurrence count for a child in a children content model.
-     * <p>
-     * <strong>Note:</strong> This method is only called after a call to
-     * the startContentModel method where the type is TYPE_CHILDREN.
-     * 
-     * @param occurrence The occurrence count for the last children element
-     *                   or children group.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see XMLDTDContentModelHandler#OCCURS_ZERO_OR_ONE
-     * @see XMLDTDContentModelHandler#OCCURS_ZERO_OR_MORE
-     * @see XMLDTDContentModelHandler#OCCURS_ONE_OR_MORE
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_CHILDREN
-     */
-    public void childrenOccurrence(short occurrence) throws XNIException {
-    } // childrenOccurrence
-
-    /**
-     * The end of a children group.
-     * <p>
-     * <strong>Note:</strong> This method is only called after a call to
-     * the startContentModel method where the type is TYPE_CHILDREN.
-     *
-     * @see org.apache.xerces.impl.dtd.XMLElementDecl#TYPE_CHILDREN
-     */
-    public void childrenEndGroup() throws XNIException {
-    } // childrenEndGroup
-
-    /**
-     * The end of a content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endContentModel() throws XNIException {
-    } // endContentModel
-
-} // class DTDParser
diff --git a/src/org/apache/xerces/parsers/DTDXSParserConfiguration.java b/src/org/apache/xerces/parsers/DTDXSParserConfiguration.java
deleted file mode 100644
index 12ef758..0000000
--- a/src/org/apache/xerces/parsers/DTDXSParserConfiguration.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.xs.XMLSchemaValidator;
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.parsers.StandardParserConfiguration;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-
-/**
- * This is the DTD/ XML Schema parser configuration. It extends the standard
- * configuration including XML Schema Validator in the pipeline. Note: including
- * XML Schema validator in the pipeline will always trigger an assessment of 
- * instance document against schema.
- * 
- * @author Sandy Gao, IBM
- * @version $Id$
- */
-public class DTDXSParserConfiguration extends StandardParserConfiguration {
-
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a document parser using the default symbol table and grammar
-     * pool or the ones specified by the application (through the properties).
-     */
-    public DTDXSParserConfiguration() {
-        this(null, null);
-    } // <init>()
-
-    /**
-     * Constructs a document parser using the specified symbol table.
-     *
-     * @param symbolTable    The symbol table to use.
-     */
-    public DTDXSParserConfiguration(SymbolTable symbolTable) {
-        this(symbolTable, null);
-    } // <init>(SymbolTable)
-
-    /**
-     * Constructs a document parser using the specified symbol table and
-     * grammar pool.
-     * <p>
-     * <strong>REVISIT:</strong> 
-     * Grammar pool will be updated when the new validation engine is
-     * implemented.
-     *
-     * @param symbolTable    The symbol table to use.
-     * @param grammarPool    The grammar pool to use.
-     */
-    public DTDXSParserConfiguration(SymbolTable symbolTable,
-                                     GrammarPool grammarPool) {
-        this(symbolTable, grammarPool, null);
-    } // <init>(SymbolTable,GrammarPool)
-
-    /**
-     * Constructs a parser configuration using the specified symbol table,
-     * grammar pool, and parent settings.
-     * <p>
-     * <strong>REVISIT:</strong> 
-     * Grammar pool will be updated when the new validation engine is
-     * implemented.
-     *
-     * @param symbolTable    The symbol table to use.
-     * @param grammarPool    The grammar pool to use.
-     * @param parentSettings The parent settings.
-     */
-    public DTDXSParserConfiguration(SymbolTable symbolTable,
-                                    GrammarPool grammarPool,
-                                    XMLComponentManager parentSettings) {
-        super(symbolTable, grammarPool, parentSettings);
-
-        fSchemaValidator = createSchemaValidator();
-        if (fSchemaValidator != null) {
-            fProperties.put(SCHEMA_VALIDATOR, fSchemaValidator);
-            addComponent(fSchemaValidator);
-        }
-
-        // add schema message formatter
-        if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
-            XSMessageFormatter xmft = new XSMessageFormatter();
-            fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, xmft);
-        }
-
-
-    } // <init>(SymbolTable,GrammarPool)
-
-    //
-    // Public methods
-    //
-
-    /** Configures the pipeline. */
-    protected void configurePipeline() {
-
-        super.configurePipeline();
-
-        if (fSchemaValidator != null) {
-            fNamespaceBinder.setDocumentHandler(fSchemaValidator);
-            fSchemaValidator.setDocumentHandler(fDocumentHandler);
-        }
-
-    } // configurePipeline()
-
-    /** Create a Schema validator. */
-    protected XMLSchemaValidator createSchemaValidator() {
-        return new XMLSchemaValidator();
-    } // createSchemaValidator():XMLSchemaValidator
-
-} // class StandardParserConfiguration
diff --git a/src/org/apache/xerces/parsers/SAXParser.java b/src/org/apache/xerces/parsers/SAXParser.java
deleted file mode 100644
index 185446e..0000000
--- a/src/org/apache/xerces/parsers/SAXParser.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-/**
- * This is the main Xerces SAX parser class. It uses the abstract SAX
- * parser with a document scanner, a dtd scanner, and a validator, as 
- * well as a grammar pool.
- *
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$ 
- */
-public class SAXParser
-    extends AbstractSAXParser {
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a SAX parser using the dtd/xml schema parser configuration.
-     */
-    public SAXParser() {
-        super(new StandardParserConfiguration());
-    } // <init>()
-
-    /**
-     * Constructs a SAX parser using the specified parser configuration.
-     */
-    public SAXParser(XMLParserConfiguration config) {
-        super(config);
-    } // <init>(XMLParserConfiguration)
-
-    /**
-     * Constructs a SAX parser using the specified symbol table.
-     */
-    public SAXParser(SymbolTable symbolTable) {
-        super(new StandardParserConfiguration(symbolTable));
-    } // <init>(SymbolTable)
-
-    /**
-     * Constructs a SAX parser using the specified symbol table and
-     * grammar pool.
-     */
-    public SAXParser(SymbolTable symbolTable, GrammarPool grammarPool) {
-        super(new StandardParserConfiguration(symbolTable, grammarPool));
-    } // <init>(SymbolTable,GrammarPool)
-
-} // class SAXParser
diff --git a/src/org/apache/xerces/parsers/StandardParserConfiguration.java b/src/org/apache/xerces/parsers/StandardParserConfiguration.java
deleted file mode 100644
index 05d0157..0000000
--- a/src/org/apache/xerces/parsers/StandardParserConfiguration.java
+++ /dev/null
@@ -1,834 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.IOException;
-import java.util.Locale;
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.impl.XMLDocumentScannerImpl;
-import org.apache.xerces.impl.XMLDTDScannerImpl;
-import org.apache.xerces.impl.XMLErrorReporter;
-import org.apache.xerces.impl.XMLEntityManager;
-import org.apache.xerces.impl.dtd.XMLDTDValidator;
-import org.apache.xerces.impl.XMLNamespaceBinder;
-import org.apache.xerces.impl.msg.XMLMessageFormatter;
-import org.apache.xerces.impl.validation.ValidationManager;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactory;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactoryImpl;
-import org.apache.xerces.impl.validation.GrammarPool;
-
-import org.apache.xerces.impl.xs.XSMessageFormatter;
-import org.apache.xerces.impl.xs.XMLSchemaValidator;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLComponent;
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLDocumentScanner;
-import org.apache.xerces.xni.parser.XMLDTDScanner;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLPullParserConfiguration;
-
-/**
- * This is the "standard" parser configuration. It extends the basic
- * configuration with the standard set of parser components. Since
- * the Xerces2 reference implementation document and DTD scanner
- * implementations are capable of acting as pull parsers, the
- * standard configuration implements the 
- * <code>XMLPullParserConfiguration</code> interface.
- * <p>
- * In addition to the features and properties recognized by the base
- * parser configuration, this class recognizes these additional 
- * features and properties:
- * <ul>
- * <li>Features
- *  <ul>
- *   <li>http://apache.org/xml/features/validation/warn-on-duplicate-attdef</li>
- *   <li>http://apache.org/xml/features/validation/warn-on-undeclared-elemdef</li>
- *   <li>http://apache.org/xml/features/allow-java-encodings</li>
- *   <li>http://apache.org/xml/features/continue-after-fatal-error</li>
- *   <li>http://apache.org/xml/features/load-external-dtd</li>
- *  </ul>
- * <li>Properties
- *  <ul>
- *   <li>http://apache.org/xml/properties/internal/error-reporter</li>
- *   <li>http://apache.org/xml/properties/internal/entity-manager</li>
- *   <li>http://apache.org/xml/properties/internal/document-scanner</li>
- *   <li>http://apache.org/xml/properties/internal/dtd-scanner</li>
- *   <li>http://apache.org/xml/properties/internal/grammar-pool</li>
- *   <li>http://apache.org/xml/properties/internal/validator/dtd</li>
- *   <li>http://apache.org/xml/properties/internal/datatype-validator-factory</li>
- *  </ul>
- * </ul>
- *
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class StandardParserConfiguration
-    extends BasicParserConfiguration 
-    implements XMLPullParserConfiguration {
-
-    //
-    // Constants
-    //
-
-    // feature identifiers
-
-    /** Feature identifier: warn on duplicate attribute definition. */
-    protected static final String WARN_ON_DUPLICATE_ATTDEF =
-        Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ATTDEF_FEATURE;
-    
-    /** Feature identifier: warn on undeclared element definition. */
-    protected static final String WARN_ON_UNDECLARED_ELEMDEF =
-        Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_UNDECLARED_ELEMDEF_FEATURE;
-    
-    /** Feature identifier: allow Java encodings. */
-    protected static final String ALLOW_JAVA_ENCODINGS = 
-        Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
-    
-    /** Feature identifier: continue after fatal error. */
-    protected static final String CONTINUE_AFTER_FATAL_ERROR = 
-        Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
-
-    /** Feature identifier: load external DTD. */
-    protected static final String LOAD_EXTERNAL_DTD =
-        Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE;
-
-    /** Feature identifier: notify built-in refereces. */
-    protected static final String NOTIFY_BUILTIN_REFS =
-        Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_BUILTIN_REFS_FEATURE;
-    
-    /** Feature identifier: notify character refereces. */
-    protected static final String NOTIFY_CHAR_REFS =
-        Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_CHAR_REFS_FEATURE;
-    
-    // property identifiers
-
-    /** Property identifier: error reporter. */
-    protected static final String ERROR_REPORTER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
-    /** Property identifier: entity manager. */
-    protected static final String ENTITY_MANAGER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-    
-    /** Property identifier document scanner: */
-    protected static final String DOCUMENT_SCANNER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.DOCUMENT_SCANNER_PROPERTY;
-
-    /** Property identifier: DTD scanner. */
-    protected static final String DTD_SCANNER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_SCANNER_PROPERTY;
-
-    /** Property identifier: grammar pool. */
-    protected static final String GRAMMAR_POOL = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.GRAMMAR_POOL_PROPERTY;
-    
-    /** Property identifier: DTD validator. */
-    protected static final String DTD_VALIDATOR = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_VALIDATOR_PROPERTY;
-
-    /** Property identifier: namespace binder. */
-    protected static final String NAMESPACE_BINDER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_BINDER_PROPERTY;
-
-    /** Property identifier: datatype validator factory. */
-    protected static final String DATATYPE_VALIDATOR_FACTORY = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
-
-    protected static final String VALIDATION_MANAGER =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-
-    /** Property identifier: XML Schema validator. */
-    protected static final String SCHEMA_VALIDATOR =
-        Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_VALIDATOR_PROPERTY;
-
-
-    // debugging
-
-    /** Set to true and recompile to print exception stack trace. */
-    private static final boolean PRINT_EXCEPTION_STACK_TRACE = false;
-
-    //
-    // Data
-    //
-
-    // components (non-configurable)
-
-    /** Grammar pool. */
-    protected GrammarPool fGrammarPool;
-
-    /** Datatype validator factory. */
-    protected DatatypeValidatorFactory fDatatypeValidatorFactory;
-
-    // components (configurable)
-
-    /** Error reporter. */
-    protected XMLErrorReporter fErrorReporter;
-
-    /** Entity manager. */
-    protected XMLEntityManager fEntityManager;
-
-    /** Document scanner. */
-    protected XMLDocumentScanner fScanner;
-
-    /** Input Source */
-    protected XMLInputSource fInputSource;
-
-    /** DTD scanner. */
-    protected XMLDTDScanner fDTDScanner;
-
-    /** DTD Validator. */
-    protected XMLDTDValidator fDTDValidator;
-
-    /** Namespace binder. */
-    protected XMLNamespaceBinder fNamespaceBinder;
-
-    /** XML Schema Validator. */
-    protected XMLSchemaValidator fSchemaValidator;
-
-    protected ValidationManager fValidationManager;
-    // state
-
-    /** Locator */
-    protected XMLLocator fLocator;
-
-    /** 
-     * True if a parse is in progress. This state is needed because
-     * some features/properties cannot be set while parsing (e.g.
-     * validation and namespaces).
-     */
-    protected boolean fParseInProgress = false;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public StandardParserConfiguration() {
-        this(null, null, null);
-    } // <init>()
-
-    /** 
-     * Constructs a parser configuration using the specified symbol table. 
-     *
-     * @param symbolTable The symbol table to use.
-     */
-    public StandardParserConfiguration(SymbolTable symbolTable) {
-        this(symbolTable, null, null);
-    } // <init>(SymbolTable)
-
-    /**
-     * Constructs a parser configuration using the specified symbol table and
-     * grammar pool.
-     * <p>
-     * <strong>REVISIT:</strong> 
-     * Grammar pool will be updated when the new validation engine is
-     * implemented.
-     *
-     * @param symbolTable The symbol table to use.
-     * @param grammarPool The grammar pool to use.
-     */
-    public StandardParserConfiguration(SymbolTable symbolTable,
-                                       GrammarPool grammarPool) {
-        this(symbolTable, grammarPool, null);
-    } // <init>(SymbolTable,GrammarPool)
-
-    /**
-     * Constructs a parser configuration using the specified symbol table,
-     * grammar pool, and parent settings.
-     * <p>
-     * <strong>REVISIT:</strong> 
-     * Grammar pool will be updated when the new validation engine is
-     * implemented.
-     *
-     * @param symbolTable    The symbol table to use.
-     * @param grammarPool    The grammar pool to use.
-     * @param parentSettings The parent settings.
-     */
-    public StandardParserConfiguration(SymbolTable symbolTable,
-                                       GrammarPool grammarPool,
-                                       XMLComponentManager parentSettings) {
-        super(symbolTable, parentSettings);
-
-        // add default recognized features
-        final String[] recognizedFeatures = {
-            WARN_ON_DUPLICATE_ATTDEF,   WARN_ON_UNDECLARED_ELEMDEF,
-            ALLOW_JAVA_ENCODINGS,       CONTINUE_AFTER_FATAL_ERROR,
-            LOAD_EXTERNAL_DTD,          NOTIFY_BUILTIN_REFS,
-            NOTIFY_CHAR_REFS,
-        };
-        addRecognizedFeatures(recognizedFeatures);
-
-        // set state for default features
-        setFeature(WARN_ON_DUPLICATE_ATTDEF, false);
-        setFeature(WARN_ON_UNDECLARED_ELEMDEF, false);
-        setFeature(ALLOW_JAVA_ENCODINGS, false);
-        setFeature(CONTINUE_AFTER_FATAL_ERROR, false);
-        setFeature(LOAD_EXTERNAL_DTD, true);
-        setFeature(NOTIFY_BUILTIN_REFS, true);
-        setFeature(NOTIFY_CHAR_REFS, false);
-
-        // add default recognized properties
-        final String[] recognizedProperties = {
-            ERROR_REPORTER,             
-            ENTITY_MANAGER, 
-            DOCUMENT_SCANNER,
-            DTD_SCANNER,
-            DTD_VALIDATOR,
-            NAMESPACE_BINDER,
-            GRAMMAR_POOL,   
-            DATATYPE_VALIDATOR_FACTORY,
-            VALIDATION_MANAGER
-        };
-        addRecognizedProperties(recognizedProperties);
-
-        // create and register missing components
-        if (grammarPool == null) {
-            grammarPool = new GrammarPool();
-        }
-        fGrammarPool = grammarPool;
-        setProperty(GRAMMAR_POOL, fGrammarPool);
-
-        fEntityManager = createEntityManager();
-        setProperty(ENTITY_MANAGER, fEntityManager);
-        addComponent(fEntityManager);
-
-        fErrorReporter = createErrorReporter();
-        fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner());
-        setProperty(ERROR_REPORTER, fErrorReporter);
-        addComponent(fErrorReporter);
-
-        fScanner = createDocumentScanner();
-        setProperty(DOCUMENT_SCANNER, fScanner);
-        if (fScanner instanceof XMLComponent) {
-            addComponent((XMLComponent)fScanner);
-        }
-
-        fDTDScanner = createDTDScanner();
-        if (fDTDScanner != null) {
-            setProperty(DTD_SCANNER, fDTDScanner);
-            if (fDTDScanner instanceof XMLComponent) {
-                addComponent((XMLComponent)fDTDScanner);
-            }
-        }
-
-        fDTDValidator = createDTDValidator();
-        if (fDTDValidator != null) {
-            setProperty(DTD_VALIDATOR, fDTDValidator);
-            addComponent(fDTDValidator);
-        }
-
-        fNamespaceBinder = createNamespaceBinder();
-        if (fNamespaceBinder != null) {
-            setProperty(NAMESPACE_BINDER, fNamespaceBinder);
-            addComponent(fNamespaceBinder);
-        }
-        
-        fDatatypeValidatorFactory = createDatatypeValidatorFactory();
-        if (fDatatypeValidatorFactory != null) {
-            setProperty(DATATYPE_VALIDATOR_FACTORY,
-                        fDatatypeValidatorFactory);
-        }
-        fValidationManager = createValidationManager();
-
-        if (fValidationManager != null) {
-            setProperty (VALIDATION_MANAGER, fValidationManager);
-        }
-        // add message formatters
-        if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
-            XMLMessageFormatter xmft = new XMLMessageFormatter();
-            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);
-            fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);
-        }
-
-        // set locale
-        try {
-            setLocale(Locale.getDefault());
-        }
-        catch (XNIException e) {
-            // do nothing
-            // REVISIT: What is the right thing to do? -Ac
-        }
-
-    } // <init>(SymbolTable,GrammarPool)
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Set the locale to use for messages.
-     *
-     * @param locale The locale object to use for localization of messages.
-     *
-     * @exception XNIException Thrown if the parser does not support the
-     *                         specified locale.
-     */
-    public void setLocale(Locale locale) throws XNIException {
-        fErrorReporter.setLocale(locale);
-    } // setLocale(Locale)
-
-    //
-    // XMLPullParserConfiguration methods
-    //
-
-    // parsing
-
-    /**
-     * Sets the input source for the document to parse.
-     *
-     * @param inputSource The document's input source.
-     *
-     * @exception XMLConfigurationException Thrown if there is a 
-     *                        configuration error when initializing the
-     *                        parser.
-     * @exception IOException Thrown on I/O error.
-     *
-     * @see #parse(boolean)
-     */
-    public void setInputSource(XMLInputSource inputSource)
-        throws XMLConfigurationException, IOException {
-        
-        // REVISIT: this method used to reset all the components and
-        //          construct the pipeline. Now reset() is called
-        //          in parse (boolean) just before we parse the document
-        //          Should this method still throw exceptions..?
-
-        fInputSource = inputSource;
-        
-    } // setInputSource(XMLInputSource)
-
-    /**
-     * Parses the document in a pull parsing fashion.
-     *
-     * @param complete True if the pull parser should parse the
-     *                 remaining document completely.
-     *
-     * @returns True if there is more document to parse.
-     *
-     * @exception XNIException Any XNI exception, possibly wrapping 
-     *                         another exception.
-     * @exception IOException  An IO exception from the parser, possibly
-     *                         from a byte stream or character stream
-     *                         supplied by the parser.
-     *
-     * @see #setInputSource
-     */
-    public boolean parse(boolean complete) throws XNIException, IOException {
-        //
-        // reset and configure pipeline and set InputSource.
-        if (fInputSource !=null) {
-            try {
-                // resets and sets the pipeline.
-                reset();
-                fScanner.setInputSource(fInputSource);
-                fInputSource = null;
-            } 
-            catch (XNIException ex) {
-                if (PRINT_EXCEPTION_STACK_TRACE)
-                    ex.printStackTrace();
-                throw ex;
-            } 
-            catch (IOException ex) {
-                if (PRINT_EXCEPTION_STACK_TRACE)
-                    ex.printStackTrace();
-                throw ex;
-            } 
-            catch (RuntimeException ex) {
-                if (PRINT_EXCEPTION_STACK_TRACE)
-                    ex.printStackTrace();
-                throw ex;
-            }
-            catch (Exception ex) {
-                if (PRINT_EXCEPTION_STACK_TRACE)
-                    ex.printStackTrace();
-                throw new XNIException(ex);
-            }
-        }
-
-        try {
-            return fScanner.scanDocument(complete);
-        } 
-        catch (XNIException ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw ex;
-        } 
-        catch (IOException ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw ex;
-        } 
-        catch (RuntimeException ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw ex;
-        }
-        catch (Exception ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw new XNIException(ex);
-        }
-
-    } // parse(boolean):boolean
-
-    //
-    // XMLParserConfiguration methods
-    //
-
-    /**
-     * Parses the specified input source.
-     *
-     * @param source The input source.
-     *
-     * @exception XNIException Throws exception on XNI error.
-     * @exception java.io.IOException Throws exception on i/o error.
-     */
-    public void parse(XMLInputSource source) throws XNIException, IOException {
-
-        if (fParseInProgress) {
-            // REVISIT - need to add new error message
-            throw new XNIException("FWK005 parse may not be called while parsing.");
-        }
-        fParseInProgress = true;
-
-        try {
-            setInputSource(source);
-            parse(true);
-        } 
-        catch (XNIException ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw ex;
-        } 
-        catch (IOException ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw ex;
-        } 
-        catch (Exception ex) {
-            if (PRINT_EXCEPTION_STACK_TRACE)
-                ex.printStackTrace();
-            throw new XNIException(ex);
-        }
-        finally {
-            fParseInProgress = false;
-        }
-
-    } // parse(InputSource)
-
-    //
-    // Protected methods
-    //
-    
-    /** 
-     * Reset all components before parsing. 
-     *
-     * @throws XNIException Thrown if an error occurs during initialization.
-     */
-    protected void reset() throws XNIException {
-
-        // configure the pipeline and initialize the components
-        configurePipeline();
-        super.reset();
-
-    } // reset()
-
-    /** Configures the pipeline. */
-    protected void configurePipeline() {
-
-        // REVISIT: This should be better designed. In other words, we
-        //          need to figure out what is the best way for people to
-        //          re-use *most* of the standard configuration but do 
-        //          things common things such as remove a component (e.g.
-        //          the validator), insert a new component (e.g. XInclude), 
-        //          etc... -Ac
-
-        // setup document pipeline
-        if (fDTDValidator != null) {
-            fScanner.setDocumentHandler(fDTDValidator);
-            fDTDValidator.setDocumentHandler(fNamespaceBinder);
-            fNamespaceBinder.setDocumentHandler(fDocumentHandler);
-        }
-        else {
-            fScanner.setDocumentHandler(fNamespaceBinder);
-            fNamespaceBinder.setDocumentHandler(fDocumentHandler);
-        }
-
-        // setup dtd pipeline
-        if (fDTDScanner != null) {
-            if (fDTDValidator != null) {
-                fDTDScanner.setDTDHandler(fDTDValidator);
-                fDTDValidator.setDTDHandler(fDTDHandler);
-                
-                fDTDScanner.setDTDContentModelHandler(fDTDValidator);
-                fDTDValidator.setDTDContentModelHandler(fDTDContentModelHandler);
-            }
-            else {
-                fDTDScanner.setDTDHandler(fDTDHandler);
-                fDTDScanner.setDTDContentModelHandler(fDTDContentModelHandler);
-            }
-        }
-
-        if ( getFeature(Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE)) {
-            // If schema validator was not in the pipeline insert it.
-            if (fSchemaValidator == null) {
-                fSchemaValidator = new XMLSchemaValidator(); 
-            
-                // add schema component
-                fProperties.put(SCHEMA_VALIDATOR, fSchemaValidator);
-                addComponent(fSchemaValidator);
-                 // add schema message formatter
-                if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
-                    XSMessageFormatter xmft = new XSMessageFormatter();
-                    fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, xmft);
-                }
-
-            }
-            fNamespaceBinder.setDocumentHandler(fSchemaValidator);
-            fSchemaValidator.setDocumentHandler(fDocumentHandler);
-            
-
-            // REVISIT: we probably should not remove schema validator from the pipeline
-            // if schema feature is off, since user might want to have some PSVI 
-            // of the document.
-            // On the other hand, if user constructed a parser with the default config,
-            // turned schema on before first parse(), and then turned it off, is it possible
-            // that user would assume that we will remove XML Schema validator?
-        } 
-
-
-    } // configurePipeline()
-
-    // features and properties
-
-    /**
-     * Check a feature. If feature is know and supported, this method simply
-     * returns. Otherwise, the appropriate exception is thrown.
-     *
-     * @param featureId The unique identifier (URI) of the feature.
-     *
-     * @throws XMLConfigurationException Thrown for configuration error.
-     *                                   In general, components should
-     *                                   only throw this exception if
-     *                                   it is <strong>really</strong>
-     *                                   a critical error.
-     */
-    protected void checkFeature(String featureId)
-        throws XMLConfigurationException {
-
-        //
-        // Xerces Features
-        //
-
-        if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
-            String feature = featureId.substring(Constants.XERCES_FEATURE_PREFIX.length());
-            //
-            // http://apache.org/xml/features/validation/schema
-            //   Lets the user turn Schema validation support on/off.
-            //
-            if (feature.equals(Constants.SCHEMA_VALIDATION_FEATURE)) {
-                return;
-            }
-            //
-            // http://apache.org/xml/features/validation/dynamic
-            //   Allows the parser to validate a document only when it
-            //   contains a grammar. Validation is turned on/off based
-            //   on each document instance, automatically.
-            //
-            if (feature.equals(Constants.DYNAMIC_VALIDATION_FEATURE)) {
-                return;
-            }
-
-            // activate full schema checking
-            if (feature.equals(Constants.SCHEMA_FULL_CHECKING)) {
-                return;
-            }
-            //
-            // http://apache.org/xml/features/validation/default-attribute-values
-            //
-            if (feature.equals(Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE)) {
-                // REVISIT
-                short type = XMLConfigurationException.NOT_SUPPORTED;
-                throw new XMLConfigurationException(type, featureId);
-            }
-            //
-            // http://apache.org/xml/features/validation/default-attribute-values
-            //
-            if (feature.equals(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
-                // REVISIT
-                short type = XMLConfigurationException.NOT_SUPPORTED;
-                throw new XMLConfigurationException(type, featureId);
-            }
-            //
-            // http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
-            //
-            if (feature.equals(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
-                return;
-            }
-            //
-            // http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
-            //
-            if (feature.equals(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
-                return;
-            }
-
-            //
-            // http://apache.org/xml/features/validation/default-attribute-values
-            //
-            if (feature.equals(Constants.VALIDATE_DATATYPES_FEATURE)) {
-                short type = XMLConfigurationException.NOT_SUPPORTED;
-                throw new XMLConfigurationException(type, featureId);
-            }
-        }
-
-        //
-        // Not recognized
-        //
-
-        super.checkFeature(featureId);
-
-    } // checkFeature(String)
-
-    /**
-     * Check a property. If the property is know and supported, this method
-     * simply returns. Otherwise, the appropriate exception is thrown.
-     *
-     * @param propertyId The unique identifier (URI) of the property
-     *                   being set.
-     *
-     * @throws XMLConfigurationException Thrown for configuration error.
-     *                                   In general, components should
-     *                                   only throw this exception if
-     *                                   it is <strong>really</strong>
-     *                                   a critical error.
-     */
-    protected void checkProperty(String propertyId)
-        throws XMLConfigurationException {
-
-        //
-        // Xerces Properties
-        //
-
-        if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
-            String property = propertyId.substring(Constants.XERCES_PROPERTY_PREFIX.length());
-            if (property.equals(Constants.DTD_SCANNER_PROPERTY)) {
-                return;
-            }
-            if (property.equals(Constants.SCHEMA_LOCATION)) {
-                return;
-            }
-            if (property.equals(Constants.SCHEMA_NONS_LOCATION)) {
-                return;
-            }
-        }
-
-        //
-        // Not recognized
-        //
-
-        super.checkProperty(propertyId);
-
-    } // checkProperty(String)
-
-    // factory methods
-
-    /** Creates an entity manager. */
-    protected XMLEntityManager createEntityManager() {
-        return new XMLEntityManager();
-    } // createEntityManager():XMLEntityManager
-
-    /** Creates an error reporter. */
-    protected XMLErrorReporter createErrorReporter() {
-        return new XMLErrorReporter();
-    } // createErrorReporter():XMLErrorReporter
-
-    /** Create a document scanner. */
-    protected XMLDocumentScanner createDocumentScanner() {
-        return new XMLDocumentScannerImpl();
-    } // createDocumentScanner():XMLDocumentScanner
-
-    /** Create a DTD scanner. */
-    protected XMLDTDScanner createDTDScanner() {
-        return new XMLDTDScannerImpl();
-    } // createDTDScanner():XMLDTDScanner
-
-    /** Create a DTD validator. */
-    protected XMLDTDValidator createDTDValidator() {
-        return new XMLDTDValidator();
-    } // createDTDValidator():XMLDTDValidator
-
-    /** Create a namespace binder. */
-    protected XMLNamespaceBinder createNamespaceBinder() {
-        return new XMLNamespaceBinder();
-    } // createNamespaceBinder():XMLNamespaceBinder
-
-    /** Create a datatype validator factory. */
-    protected DatatypeValidatorFactory createDatatypeValidatorFactory() {
-        return new DatatypeValidatorFactoryImpl();
-    } // createDatatypeValidatorFactory():DatatypeValidatorFactory
-    protected ValidationManager createValidationManager(){
-        return new ValidationManager();
-    }
-
-} // class StandardParserConfiguration
diff --git a/src/org/apache/xerces/parsers/XMLDocumentParser.java b/src/org/apache/xerces/parsers/XMLDocumentParser.java
deleted file mode 100644
index b3d082c..0000000
--- a/src/org/apache/xerces/parsers/XMLDocumentParser.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import org.apache.xerces.impl.validation.GrammarPool;
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-/**
- * This is a concrete vanilla XML parser class. It uses the abstract parser
- * with either a BasicConfiguration object or the one specified by the
- * application.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$ */
-public class XMLDocumentParser
-    extends AbstractXMLDocumentParser {
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs a document parser using the default basic parser
-     * configuration.
-     */
-    public XMLDocumentParser() {
-        super(new StandardParserConfiguration());
-    } // <init>
-
-    /**
-     * Constructs a document parser using the specified parser configuration.
-     */
-    public XMLDocumentParser(XMLParserConfiguration config) {
-        super(config);
-    } // <init>(ParserConfiguration)
-
-    /**
-     * Constructs a document parser using the specified symbol table.
-     */
-    public XMLDocumentParser(SymbolTable symbolTable) {
-        super(new StandardParserConfiguration(symbolTable));
-    } // <init>(SymbolTable)
-
-    /**
-     * Constructs a document parser using the specified symbol table and
-     * grammar pool.
-     */
-    public XMLDocumentParser(SymbolTable symbolTable,
-                             GrammarPool grammarPool) {
-        super(new StandardParserConfiguration(symbolTable, grammarPool));
-    }
-
-} // class XMLDocumentParser
diff --git a/src/org/apache/xerces/parsers/XMLGrammarParser.java b/src/org/apache/xerces/parsers/XMLGrammarParser.java
deleted file mode 100644
index 469eb7f..0000000
--- a/src/org/apache/xerces/parsers/XMLGrammarParser.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import org.apache.xerces.util.SymbolTable;
-import org.apache.xerces.impl.dv.dtd.DatatypeValidatorFactory;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-/**
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @version $Id$
- */
-public abstract class XMLGrammarParser
-    extends XMLParser {
-
-    //
-    // Data
-    //
-
-    /** fDatatypeValidatorFactory */
-    protected DatatypeValidatorFactory fDatatypeValidatorFactory;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Construct an XMLGrammarParser with the specified symbol table
-     * 
-     * @param symbolTable 
-     */
-    protected XMLGrammarParser(SymbolTable symbolTable) {
-        super(new StandardParserConfiguration(symbolTable));
-    }
-
-} // class XMLGrammarParser
diff --git a/src/org/apache/xerces/parsers/XMLParser.java b/src/org/apache/xerces/parsers/XMLParser.java
deleted file mode 100644
index 12a05a1..0000000
--- a/src/org/apache/xerces/parsers/XMLParser.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.parsers;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Locale;
-
-import org.apache.xerces.impl.Constants;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.apache.xerces.xni.parser.XMLParserConfiguration;
-
-/**
- * Base class of all XML-related parsers.
- * <p>
- * In addition to the features and properties recognized by the parser
- * configuration, this parser recognizes these additional features and
- * properties:
- * <ul>
- * <li>Properties
- *  <ul>
- *   <li>http://apache.org/xml/properties/internal/error-handler</li>
- *   <li>http://apache.org/xml/properties/internal/entity-resolver</li>
- *  </ul>
- * </ul>
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public abstract class XMLParser {
-
-    //
-    // Constants
-    //
-
-    /** Property identifier: entity resolver. */
-    protected static final String ENTITY_RESOLVER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
-
-    /** Property identifier: error handler. */
-    protected static final String ERROR_HANDLER = 
-        Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
-
-    //
-    // Data
-    //
-
-    /** The parser configuration. */
-    protected XMLParserConfiguration fConfiguration;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Default Constructor.
-     */
-    protected XMLParser(XMLParserConfiguration config) {
-
-        // save configuration
-        fConfiguration = config;
-
-        // add default recognized properties
-        final String[] recognizedProperties = {
-            ENTITY_RESOLVER, ERROR_HANDLER,
-        };
-        fConfiguration.addRecognizedProperties(recognizedProperties);
-
-    } // <init>(XMLParserConfiguration)
-
-    //
-    // Public methods
-    //
-
-    /**
-     * parse
-     *
-     * @param inputSource
-     *
-     * @exception XNIException
-     * @exception java.io.IOException
-     */
-    public void parse(XMLInputSource inputSource) 
-        throws XNIException, IOException {
-
-        reset();
-        fConfiguration.parse(inputSource);
-
-    } // parse(XMLInputSource) 
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * reset all components before parsing
-     */
-    protected void reset() throws XNIException {
-    } // reset()
-
-} // class XMLParser
diff --git a/src/org/apache/xerces/parsers/org.xml.sax.driver b/src/org/apache/xerces/parsers/org.xml.sax.driver
deleted file mode 100644
index 409dd43..0000000
--- a/src/org/apache/xerces/parsers/org.xml.sax.driver
+++ /dev/null
@@ -1,2 +0,0 @@
-org.apache.xerces.parsers.SAXParser
-
diff --git a/src/org/apache/xerces/util/AugmentationsImpl.java b/src/org/apache/xerces/util/AugmentationsImpl.java
deleted file mode 100644
index 07337be..0000000
--- a/src/org/apache/xerces/util/AugmentationsImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.util.Hashtable;
-
-import org.apache.xerces.xni.Augmentations;
-
-/**
- * This class provides an implementation for Augmentations interface. 
- * Augmentations interface defines a hashtable of additional data that could
- * be passed along the document pipeline. The information can contain extra
- * arguments or infoset augmentations, for example PSVI. This additional
- * information is identified by a String key.
- * <p>
- * 
- * @author Elena Litani, IBM
- */
-public class AugmentationsImpl implements Augmentations{
-    
-    private final Hashtable fAugmentations = new Hashtable();
-    
-    /**
-     * Add additional information identified by a key to the Augmentations structure.
-     * 
-     * @param key    Identifier, can't be <code>null</code>
-     * @param item   Additional information
-     *
-     * @return the previous value of the specified key in the Augmentations strucutre,
-     *         or <code>null</code> if it did not have one.
-     */
-    public Object putItem (String key, Object item){
-        return fAugmentations.put(key, item);
-
-    }
-
-
-    /**
-     * Get information identified by a key from the Augmentations structure
-     * 
-     * @param key    Identifier, can't be <code>null</code>
-     *
-     * @return the value to which the key is mapped in the Augmentations structure;
-     *         <code>null</code> if the key is not mapped to any value.
-     */
-    public Object getItem(String key){
-        return fAugmentations.get(key);
-    }
-    
-    
-    /**
-     * Remove additional info from the Augmentations structure
-     * 
-     * @param key    Identifier, can't be <code>null</code>
-     */
-    public Object removeItem (String key){
-        return fAugmentations.remove(key);
-    }
-
-    /**
-     * Remove all objects from the Augmentations structure.
-     */
-    public void clear (){
-        fAugmentations.clear();
-    }
-}
diff --git a/src/org/apache/xerces/util/DOMEntityResolverWrapper.java b/src/org/apache/xerces/util/DOMEntityResolverWrapper.java
deleted file mode 100644
index 404efe1..0000000
--- a/src/org/apache/xerces/util/DOMEntityResolverWrapper.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-import org.apache.xerces.dom3.ls.DOMEntityResolver;
-import org.apache.xerces.dom3.ls.DOMInputSource;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-
-
-/**
- * This class wraps DOM entity resolver to XNI entity resolver.
- *
- * @see DOMEntityResolver
- *
- * @author Gopal Sharma, SUN MicroSystems Inc.
- * @author Elena Litani, IBM 
- * 
- */
-public class DOMEntityResolverWrapper
-    implements XMLEntityResolver {
-
-    //
-    // Data
-    //
-
-    /** The DOM entity resolver. */
-    protected DOMEntityResolver fEntityResolver;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public DOMEntityResolverWrapper() {}
-
-    /** Wraps the specified DOM entity resolver. */
-    public DOMEntityResolverWrapper(DOMEntityResolver entityResolver) {
-        setEntityResolver(entityResolver);
-    } // DOMEntityResolver
-
-    //
-    // Public methods
-    //
-
-    /** Sets the DOM entity resolver. */
-    public void setEntityResolver(DOMEntityResolver entityResolver) {
-        fEntityResolver = entityResolver;
-    } // setEntityResolver(DOMEntityResolver)
-
-    /** Returns the DOM entity resolver. */
-    public DOMEntityResolver getEntityResolver() {
-        return fEntityResolver;
-    } // getEntityResolver():DOMEntityResolver
-
-    //
-    // XMLEntityResolver methods
-    //
-    
-    /**
-     * Resolves an external parsed entity. If the entity cannot be
-     * resolved, this method should return null.
-     *
-     * @param publicId
-     * @param systemId
-     * @param baseSystemId The base system identifier.
-     *
-     * @throws XNIException Thrown on general error.
-     * @throws IOException  Thrown if resolved entity stream cannot be
-     *                      opened or some other i/o error occurs.
-     */
-    public XMLInputSource resolveEntity(String publicId, String systemId, 
-                                        String baseSystemId) 
-        throws XNIException, IOException {
-
-        // resolve entity using DOM entity resolver
-        if (fEntityResolver != null) {
-            try {
-                DOMInputSource inputSource = 
-                    fEntityResolver.resolveEntity(publicId, systemId, baseSystemId);
-                if (inputSource != null) {
-                    publicId = inputSource.getPublicId();
-                    systemId = inputSource.getSystemId();
-                    InputStream byteStream = inputSource.getByteStream();
-                    Reader charStream = inputSource.getCharacterStream();
-                    String encoding = inputSource.getEncoding();
-                    XMLInputSource xmlInputSource =
-                        new XMLInputSource(publicId, systemId, baseSystemId);
-                    xmlInputSource.setByteStream((InputStream)byteStream);
-                    xmlInputSource.setCharacterStream(charStream);
-                    xmlInputSource.setEncoding(encoding);
-                    return xmlInputSource;
-                }
-            }
-
-            // error resolving entity
-            catch (Exception e) {
-                // REVISIT:
-                // can at this point we receive wrapped exception?
-
-                throw new XNIException(e);
-            }
-        }
-
-        // unable to resolve entity
-        return null;
-
-    } // resolveEntity(String,String,String):XMLInputSource
-    
-} // DOMEntityResolverWrapper
diff --git a/src/org/apache/xerces/util/DOMErrorHandlerWrapper.java b/src/org/apache/xerces/util/DOMErrorHandlerWrapper.java
deleted file mode 100644
index 901435c..0000000
--- a/src/org/apache/xerces/util/DOMErrorHandlerWrapper.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLParseException;
-
-import org.apache.xerces.dom3.DOMError;
-import org.apache.xerces.dom3.DOMLocator;
-import org.apache.xerces.dom3.DOMErrorHandler;
-
-import org.apache.xerces.dom.DOMErrorImpl;
-
-import java.io.PrintWriter;
-
-/**
- * This class handles DOM errors .
- *
- * @see DOMErrorHandler
- *
- * @author Gopal Sharma, SUN Microsystems Inc.
- */
-
-// REVISIT: current implementations wraps error several times:
-//          XMLErrorReport.reportError creates XMLParserException (by wrapping all info)
-//          and goes via switch to send errors.
-//          DOMErrorHandlerWrapper catches calls, copies info from XMLParserException and
-//          sends one call back to the application
-//          I think we can avoid this indirection if we modify XMLErrorReporter. --el
-
-public class DOMErrorHandlerWrapper
-    implements XMLErrorHandler, DOMErrorHandler {
-
-
-  // It keeps the reference of DOMErrorHandler of application
-     protected DOMErrorHandler fDomErrorHandler;
-     
-  // Error Status
-     boolean eStatus = true ;
-     
-  // Print writer
-     protected PrintWriter fOut;
-
- 	
-  //
-  // Constructors
-  //
-   
-  // Default constructor /
-  
-   public DOMErrorHandlerWrapper() {
-        fOut = new PrintWriter(System.err);
-   }
-
-   
-   public DOMErrorHandlerWrapper(DOMErrorHandler domErrorHandler) {
-	fDomErrorHandler = domErrorHandler;		
-   } // DOMErrorHandlerWrapper(DOMErrorHandler domErrorHandler)
-
-    
-   //
-   // Public methods
-   //
-
-   /** Sets the DOM error handler. */
-   public void setErrorHandler(DOMErrorHandler errorHandler) {
-       fDomErrorHandler = errorHandler;
-   } // setErrorHandler(ErrorHandler)
-    
-
-   public DOMErrorHandler getErrorHandler(){
-	return fDomErrorHandler;	
-   } //getErrorHandler()
-	
-   //
-   // XMLErrorHandler methods
-   //
-
-   /**
-    * Reports a warning. Warnings are non-fatal and can be safely ignored
-    * by most applications.
-    *
-    * @param domain    The domain of the warning. The domain can be any
-    *                  string but is suggested to be a valid URI. The
-    *                  domain can be used to conveniently specify a web
-    *                  site location of the relevent specification or
-    *                  document pertaining to this warning.
-    * @param key       The warning key. This key can be any string and
-    *                  is implementation dependent.
-    * @param exception Exception.
-    *
-    * @throws XNIException Thrown to signal that the parser should stop
-    *                      parsing the document.
-    */
-
-   public void warning(String domain, String key, 
-			XMLParseException exception) throws XNIException {
-	DOMError error = new DOMErrorImpl(DOMError.SEVERITY_WARNING, exception);
-	fDomErrorHandler.handleError(error); 
-   } // warning(String,String,XMLParseException)
-
-   /**
-    * Reports an error. Errors are non-fatal and usually signify that the
-    * document is invalid with respect to its grammar(s).
-    *
-    * @param domain    The domain of the error. The domain can be any
-    *                  string but is suggested to be a valid URI. The
-    *                  domain can be used to conveniently specify a web
-    *                  site location of the relevent specification or
-    *                  document pertaining to this error.
-    * @param key       The error key. This key can be any string and
-    *                  is implementation dependent.
-    * @param exception Exception.
-    *
-    * @throws XNIException Thrown to signal that the parser should stop
-    *                      parsing the document.
-    */
-   public void error(String domain, String key, 
-			XMLParseException exception) throws XNIException {
-	DOMError error = new DOMErrorImpl(DOMError.SEVERITY_ERROR, exception);
-	fDomErrorHandler.handleError(error);                        
-   } // error(String,String,XMLParseException)
-
-   /**
-    * Report a fatal error. Fatal errors usually occur when the document
-    * is not well-formed and signifies that the parser cannot continue
-    * normal operation.
-    * <p>
-    * <strong>Note:</strong> The error handler should <em>always</em>
-    * throw an <code>XNIException</code> from this method. This exception
-    * can either be the same exception that is passed as a parameter to
-    * the method or a new XNI exception object. If the registered error
-    * handler fails to throw an exception, the continuing operation of
-    * the parser is undetermined.
-    *
-    * @param domain    The domain of the fatal error. The domain can be 
-    *                  any string but is suggested to be a valid URI. The
-    *                  domain can be used to conveniently specify a web
-    *                  site location of the relevent specification or
-    *                  document pertaining to this fatal error.
-    * @param key       The fatal error key. This key can be any string 
-    *                  and is implementation dependent.
-    * @param exception Exception.
-    *
-    * @throws XNIException Thrown to signal that the parser should stop
-    *                      parsing the document.
-    */
-   public void fatalError(String domain, String key, 
-			XMLParseException exception) throws XNIException {
-	DOMError error = new DOMErrorImpl(DOMError.SEVERITY_FATAL_ERROR, exception);
-	fDomErrorHandler.handleError(error);                             
-   } // fatalError(String,String,XMLParseException)
-    
-    
-   public boolean handleError(DOMError error) {
-       printError(error);
-       return eStatus;
-   }
-    
-   /** Prints the error message. */
-    
-   private void printError(DOMError error) {
-	int severity = -1;
-	fOut.print("[");
-	if ( severity == DOMError.SEVERITY_WARNING){
-		fOut.print("Warning");
-	}else if ( severity == DOMError.SEVERITY_ERROR){
-		fOut.print("Error");
-	}else{
-		fOut.print("Fatal Error");
-		eStatus = false ; //REVISIT: Abort processing if fatal error, do we need to??
-	}
-        fOut.print("] ");
-	fOut.print(": ");
-	fOut.print(error.getMessage());
-	fOut.print(':');
-        fOut.print(error.getException());		
-	DOMLocator locator = error.getLocation();
-	if (locator != null){
-		fOut.print(":L ");
-	        fOut.print(locator.getLineNumber());
-	        fOut.print(":C ");
-	        fOut.print(locator.getColumnNumber());
-		fOut.print(": ");
-	        fOut.print(locator.getOffset());
-	        fOut.print(": ");
-	        fOut.print(locator.getErrorNode().getNodeName());
-		String systemId = locator.getUri();
-		if (systemId != null) {
-		    int index = systemId.lastIndexOf('/');
-			if (index != -1)
-				systemId = systemId.substring(index + 1);
-		    fOut.print(": ");
-	            fOut.print(systemId);
-		}
-			
-	}
-	fOut.println();
-	fOut.flush();
-
-    } // printError(DOMError)
-    
-} // class DOMErrorHandlerWrapper
diff --git a/src/org/apache/xerces/util/DOMUtil.java b/src/org/apache/xerces/util/DOMUtil.java
deleted file mode 100644
index 742bd84..0000000
--- a/src/org/apache/xerces/util/DOMUtil.java
+++ /dev/null
@@ -1,760 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import org.apache.xerces.dom.AttrImpl;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.dom.NodeImpl;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * Some useful utility methods.
- * This class was modified in Xerces2 with a view to abstracting as
- * much as possible away from the representation of the underlying
- * parsed structure (i.e., the DOM).  This was done so that, if Xerces
- * ever adopts an in-memory representation more efficient than the DOM
- * (such as a DTM), we should easily be able to convert our schema
- * parsing to utilize it.
- *
- * @version $ID DOMUtil
- */
-public class DOMUtil {
-
-    //
-    // Constructors
-    //
-
-    /** This class cannot be instantiated. */
-    protected DOMUtil() {}
-
-    //
-    // Public static methods
-    //
-
-    /**
-     * Copies the source tree into the specified place in a destination
-     * tree. The source node and its children are appended as children
-     * of the destination node.
-     * <p>
-     * <em>Note:</em> This is an iterative implementation.
-     */
-    public static void copyInto(Node src, Node dest) throws DOMException {
-
-        // get node factory
-        Document factory = dest.getOwnerDocument();
-        boolean domimpl = factory instanceof DocumentImpl;
-
-        // placement variables
-        Node start  = src;
-        Node parent = src;
-        Node place  = src;
-
-        // traverse source tree
-        while (place != null) {
-
-            // copy this node
-            Node node = null;
-            int  type = place.getNodeType();
-            switch (type) {
-                case Node.CDATA_SECTION_NODE: {
-                    node = factory.createCDATASection(place.getNodeValue());
-                    break;
-                }
-                case Node.COMMENT_NODE: {
-                    node = factory.createComment(place.getNodeValue());
-                    break;
-                }
-                case Node.ELEMENT_NODE: {
-                    Element element = factory.createElement(place.getNodeName());
-                    node = element;
-                    NamedNodeMap attrs  = place.getAttributes();
-                    int attrCount = attrs.getLength();
-                    for (int i = 0; i < attrCount; i++) {
-                        Attr attr = (Attr)attrs.item(i);
-                        String attrName = attr.getNodeName();
-                        String attrValue = attr.getNodeValue();
-                        element.setAttribute(attrName, attrValue);
-                        if (domimpl && !attr.getSpecified()) {
-                            ((AttrImpl)element.getAttributeNode(attrName)).setSpecified(false);
-                        }
-                    }
-                    break;
-                }
-                case Node.ENTITY_REFERENCE_NODE: {
-                    node = factory.createEntityReference(place.getNodeName());
-                    break;
-                }
-                case Node.PROCESSING_INSTRUCTION_NODE: {
-                    node = factory.createProcessingInstruction(place.getNodeName(),
-                                                               place.getNodeValue());
-                    break;
-                }
-                case Node.TEXT_NODE: {
-                    node = factory.createTextNode(place.getNodeValue());
-                    break;
-                }
-                default: {
-                    throw new IllegalArgumentException("can't copy node type, "+
-                                                       type+" ("+
-                                                       node.getNodeName()+')');
-                }
-            }
-            dest.appendChild(node);
-
-            // iterate over children
-            if (place.hasChildNodes()) {
-                parent = place;
-                place  = place.getFirstChild();
-                dest   = node;
-            }
-
-            // advance
-            else {
-                place = place.getNextSibling();
-                while (place == null && parent != start) {
-                    place  = parent.getNextSibling();
-                    parent = parent.getParentNode();
-                    dest   = dest.getParentNode();
-                }
-            }
-
-        }
-
-    } // copyInto(Node,Node)
-
-    /** Finds and returns the first child element node. */
-    public static Element getFirstChildElement(Node parent) {
-
-        // search for node
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)child;
-            }
-            child = child.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getFirstChildElement(Node):Element
-
-    /** Finds and returns the first visible child element node. */
-    public static Element getFirstVisibleChildElement(Node parent) {
-
-        // search for node
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE &&
-                !((NodeImpl)child).getReadOnly()) {
-                return (Element)child;
-            }
-            child = child.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getFirstChildElement(Node):Element
-
-    /** Finds and returns the last child element node. */
-    public static Element getLastChildElement(Node parent) {
-
-        // search for node
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)child;
-            }
-            child = child.getPreviousSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getLastChildElement(Node):Element
-
-    /** Finds and returns the last visible child element node. */
-    public static Element getLastVisibleChildElement(Node parent) {
-
-        // search for node
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE &&
-                    ((NodeImpl)child).getReadOnly()) {
-                return (Element)child;
-            }
-            child = child.getPreviousSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getLastChildElement(Node):Element
-
-    /** Finds and returns the next sibling element node. */
-    public static Element getNextSiblingElement(Node node) {
-
-        // search for node
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                return (Element)sibling;
-            }
-            sibling = sibling.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getNextSiblingElement(Node):Element
-
-    // get next visible (un-hidden) node.
-    public static Element getNextVisibleSiblingElement(Node node) {
-
-        // search for node
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE &&
-                !((NodeImpl)sibling).getReadOnly()) {
-                return (Element)sibling;
-            }
-            sibling = sibling.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getNextSiblingdElement(Node):Element
-
-    // set this Node as being hidden
-    public static void setHidden(Node node) {
-        ((NodeImpl)node).setReadOnly(true, false);
-    } // setHidden(node):void
-
-    // set this Node as being visible
-    public static void setVisible(Node node) {
-        ((NodeImpl)node).setReadOnly(false, false);
-    } // setVisible(node):void
-
-    // is this node hidden?
-    public static boolean isHidden(Node node) {
-        return ((NodeImpl)node).getReadOnly();
-    } // isHidden(Node):boolean
-
-    /** Finds and returns the first child node with the given name. */
-    public static Element getFirstChildElement(Node parent, String elemName) {
-
-        // search for node
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                if (child.getNodeName().equals(elemName)) {
-                    return (Element)child;
-                }
-            }
-            child = child.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getFirstChildElement(Node,String):Element
-
-    /** Finds and returns the last child node with the given name. */
-    public static Element getLastChildElement(Node parent, String elemName) {
-
-        // search for node
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                if (child.getNodeName().equals(elemName)) {
-                    return (Element)child;
-                }
-            }
-            child = child.getPreviousSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getLastChildElement(Node,String):Element
-
-    /** Finds and returns the next sibling node with the given name. */
-    public static Element getNextSiblingElement(Node node, String elemName) {
-
-        // search for node
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                if (sibling.getNodeName().equals(elemName)) {
-                    return (Element)sibling;
-                }
-            }
-            sibling = sibling.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getNextSiblingdElement(Node,String):Element
-
-    /** Finds and returns the first child node with the given qualified name. */
-    public static Element getFirstChildElementNS(Node parent,
-                                                 String uri, String localpart) {
-
-        // search for node
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                String childURI = child.getNamespaceURI();
-                if (childURI != null && childURI.equals(uri) &&
-                    child.getLocalName().equals(localpart)) {
-                    return (Element)child;
-                }
-            }
-            child = child.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getFirstChildElementNS(Node,String,String):Element
-
-    /** Finds and returns the last child node with the given qualified name. */
-    public static Element getLastChildElementNS(Node parent,
-                                                String uri, String localpart) {
-
-        // search for node
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                String childURI = child.getNamespaceURI();
-                if (childURI != null && childURI.equals(uri) &&
-                    child.getLocalName().equals(localpart)) {
-                    return (Element)child;
-                }
-            }
-            child = child.getPreviousSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getLastChildElementNS(Node,String,String):Element
-
-    /** Finds and returns the next sibling node with the given qualified name. */
-    public static Element getNextSiblingElementNS(Node node,
-                                                  String uri, String localpart) {
-
-        // search for node
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                String siblingURI = sibling.getNamespaceURI();
-                if (siblingURI != null && siblingURI.equals(uri) &&
-                    sibling.getLocalName().equals(localpart)) {
-                    return (Element)sibling;
-                }
-            }
-            sibling = sibling.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getNextSiblingdElementNS(Node,String,String):Element
-
-    /** Finds and returns the first child node with the given name. */
-    public static Element getFirstChildElement(Node parent, String elemNames[]) {
-
-        // search for node
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                for (int i = 0; i < elemNames.length; i++) {
-                    if (child.getNodeName().equals(elemNames[i])) {
-                        return (Element)child;
-                    }
-                }
-            }
-            child = child.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getFirstChildElement(Node,String[]):Element
-
-    /** Finds and returns the last child node with the given name. */
-    public static Element getLastChildElement(Node parent, String elemNames[]) {
-
-        // search for node
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                for (int i = 0; i < elemNames.length; i++) {
-                    if (child.getNodeName().equals(elemNames[i])) {
-                        return (Element)child;
-                    }
-                }
-            }
-            child = child.getPreviousSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getLastChildElement(Node,String[]):Element
-
-    /** Finds and returns the next sibling node with the given name. */
-    public static Element getNextSiblingElement(Node node, String elemNames[]) {
-
-        // search for node
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                for (int i = 0; i < elemNames.length; i++) {
-                    if (sibling.getNodeName().equals(elemNames[i])) {
-                        return (Element)sibling;
-                    }
-                }
-            }
-            sibling = sibling.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getNextSiblingdElement(Node,String[]):Element
-
-    /** Finds and returns the first child node with the given qualified name. */
-    public static Element getFirstChildElementNS(Node parent,
-                                                 String[][] elemNames) {
-
-        // search for node
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                for (int i = 0; i < elemNames.length; i++) {
-                    String uri = child.getNamespaceURI();
-                    if (uri != null && uri.equals(elemNames[i][0]) &&
-                        child.getLocalName().equals(elemNames[i][1])) {
-                        return (Element)child;
-                    }
-                }
-            }
-            child = child.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getFirstChildElementNS(Node,String[][]):Element
-
-    /** Finds and returns the last child node with the given qualified name. */
-    public static Element getLastChildElementNS(Node parent,
-                                                String[][] elemNames) {
-
-        // search for node
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                for (int i = 0; i < elemNames.length; i++) {
-                    String uri = child.getNamespaceURI();
-                    if (uri != null && uri.equals(elemNames[i][0]) &&
-                        child.getLocalName().equals(elemNames[i][1])) {
-                        return (Element)child;
-                    }
-                }
-            }
-            child = child.getPreviousSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getLastChildElementNS(Node,String[][]):Element
-
-    /** Finds and returns the next sibling node with the given qualified name. */
-    public static Element getNextSiblingElementNS(Node node,
-                                                  String[][] elemNames) {
-
-        // search for node
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                for (int i = 0; i < elemNames.length; i++) {
-                    String uri = sibling.getNamespaceURI();
-                    if (uri != null && uri.equals(elemNames[i][0]) &&
-                        sibling.getLocalName().equals(elemNames[i][1])) {
-                        return (Element)sibling;
-                    }
-                }
-            }
-            sibling = sibling.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getNextSiblingdElementNS(Node,String[][]):Element
-
-    /**
-     * Finds and returns the first child node with the given name and
-     * attribute name, value pair.
-     */
-    public static Element getFirstChildElement(Node   parent,
-                                               String elemName,
-                                               String attrName,
-                                               String attrValue) {
-
-        // search for node
-        Node child = parent.getFirstChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                Element element = (Element)child;
-                if (element.getNodeName().equals(elemName) &&
-                    element.getAttribute(attrName).equals(attrValue)) {
-                    return element;
-                }
-            }
-            child = child.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getFirstChildElement(Node,String,String,String):Element
-
-    /**
-     * Finds and returns the last child node with the given name and
-     * attribute name, value pair.
-     */
-    public static Element getLastChildElement(Node   parent,
-                                               String elemName,
-                                               String attrName,
-                                               String attrValue) {
-
-        // search for node
-        Node child = parent.getLastChild();
-        while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                Element element = (Element)child;
-                if (element.getNodeName().equals(elemName) &&
-                    element.getAttribute(attrName).equals(attrValue)) {
-                    return element;
-                }
-            }
-            child = child.getPreviousSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getLastChildElement(Node,String,String,String):Element
-
-    /**
-     * Finds and returns the next sibling node with the given name and
-     * attribute name, value pair. Since only elements have attributes,
-     * the node returned will be of type Node.ELEMENT_NODE.
-     */
-    public static Element getNextSiblingElement(Node   node,
-                                                String elemName,
-                                                String attrName,
-                                                String attrValue) {
-
-        // search for node
-        Node sibling = node.getNextSibling();
-        while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                Element element = (Element)sibling;
-                if (element.getNodeName().equals(elemName) &&
-                    element.getAttribute(attrName).equals(attrValue)) {
-                    return element;
-                }
-            }
-            sibling = sibling.getNextSibling();
-        }
-
-        // not found
-        return null;
-
-    } // getNextSiblingElement(Node,String,String,String):Element
-
-    /**
-     * Returns the concatenated child text of the specified node.
-     * This method only looks at the immediate children of type
-     * <code>Node.TEXT_NODE</code> or the children of any child
-     * node that is of type <code>Node.CDATA_SECTION_NODE</code>
-     * for the concatenation.
-     *
-     * @param node The node to look at.
-     */
-    public static String getChildText(Node node) {
-
-        // is there anything to do?
-        if (node == null) {
-            return null;
-        }
-
-        // concatenate children text
-        StringBuffer str = new StringBuffer();
-        Node child = node.getFirstChild();
-        while (child != null) {
-            short type = child.getNodeType();
-            if (type == Node.TEXT_NODE) {
-                str.append(child.getNodeValue());
-            }
-            else if (type == Node.CDATA_SECTION_NODE) {
-                str.append(getChildText(child));
-            }
-            child = child.getNextSibling();
-        }
-
-        // return text value
-        return str.toString();
-
-    } // getChildText(Node):String
-
-    // return the name of this element
-    public static String getName(Node node) {
-        return node.getNodeName();
-    } // getLocalName(Element):  String
-
-    /** returns local name of this element if not null, otherwise
-        returns the name of the node
-    */
-    public static String getLocalName(Node node) {
-        String name = node.getLocalName();
-        return (name!=null)? name:node.getNodeName();
-    } // getLocalName(Element):  String
-
-    public static Element getParent(Element elem) {
-        Node parent = elem.getParentNode();
-        if (parent instanceof Element)
-            return (Element)parent;
-        return null;
-    } // getParent(Element):Element
-
-    // get the Document of which this Node is a part
-    public static Document getDocument(Node node) {
-        return node.getOwnerDocument();
-    } // getDocument(Node):Document
-
-    // return this Document's root node
-    public static Element getRoot(Document doc) {
-        return doc.getDocumentElement();
-     } // getRoot(Document(:  Element
-
-   // some methods for handling attributes:
-
-    // return the right attribute node
-    public static Attr getAttr(Element elem, String name) {
-        return elem.getAttributeNode(name);
-    } // getAttr(Element, String):Attr
-
-    // return the right attribute node
-    public static Attr getAttrNS(Element elem, String nsUri,
-            String localName) {
-        return elem.getAttributeNodeNS(nsUri, localName);
-    } // getAttrNS(Element, String):Attr
-
-    // get all the attributes for an Element
-    public static Attr[] getAttrs(Element elem) {
-        NamedNodeMap attrMap = elem.getAttributes();
-        Attr [] attrArray = new Attr[attrMap.getLength()];
-        for (int i=0; i<attrMap.getLength(); i++)
-            attrArray[i] = (Attr)attrMap.item(i);
-        return attrArray;
-    } // getAttrs(Element):  Attr[]
-
-    // get attribute's value
-    public static String getValue(Attr attribute) {
-        return attribute.getValue();
-    } // getValue(Attr):String
-
-    // It is noteworthy that, because of the way the DOM specs
-    // work, the next two methods return the empty string (not
-    // null!) when the attribute with the specified name does not
-    // exist on an element.  Beware!
-
-    // return the value of the attribute of the given element
-    // with the given name
-    public static String getAttrValue(Element elem, String name) {
-        return elem.getAttribute(name);
-    } // getAttr(Element, String):Attr
-
-    // return the value of the attribute of the given element
-    // with the given name
-    public static String getAttrValueNS(Element elem, String nsUri,
-            String localName) {
-        return elem.getAttributeNS(nsUri, localName);
-    } // getAttrValueNS(Element, String):Attr
-
-    // return the namespace URI
-    public static String getNamespaceURI(Node node) {
-        return node.getNamespaceURI();
-    }
-} // class XUtil
diff --git a/src/org/apache/xerces/util/DefaultErrorHandler.java b/src/org/apache/xerces/util/DefaultErrorHandler.java
deleted file mode 100644
index fc6fdf0..0000000
--- a/src/org/apache/xerces/util/DefaultErrorHandler.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.io.PrintWriter;
-
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLParseException;
-
-/**
- * Default error handler.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class DefaultErrorHandler
-    implements XMLErrorHandler {
-
-    //
-    // Data
-    //
-
-    /** Print writer. */
-    protected PrintWriter fOut;
-
-    //
-    // Constructors
-    //
-
-    /** 
-     * Constructs an error handler that prints error messages to 
-     * <code>System.err</code>. 
-     */
-    public DefaultErrorHandler() {
-        this(new PrintWriter(System.err));
-    } // <init>()
-
-    /** 
-     * Constructs an error handler that prints error messages to the
-     * specified <code>PrintWriter</code. 
-     */
-    public DefaultErrorHandler(PrintWriter out) {
-        fOut = out;
-    } // <init>(PrintWriter)
-
-    //
-    // ErrorHandler methods
-    //
-
-    /** Warning. */
-    public void warning(String domain, String key, XMLParseException ex) 
-        throws XNIException {
-        printError("Warning", ex);
-    } // warning(XMLParseException)
-
-    /** Error. */
-    public void error(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Error", ex);
-    } // error(XMLParseException)
-
-    /** Fatal error. */
-    public void fatalError(String domain, String key, XMLParseException ex)
-        throws XNIException {
-        printError("Fatal Error", ex);
-        throw ex;
-    } // fatalError(XMLParseException)
-
-    //
-    // Private methods
-    //
-
-    /** Prints the error message. */
-    private void printError(String type, XMLParseException ex) {
-
-        fOut.print("[");
-        fOut.print(type);
-        fOut.print("] ");
-        String systemId = ex.getSystemId();
-        if (systemId != null) {
-            int index = systemId.lastIndexOf('/');
-            if (index != -1)
-                systemId = systemId.substring(index + 1);
-            fOut.print(systemId);
-        }
-        fOut.print(':');
-        fOut.print(ex.getLineNumber());
-        fOut.print(':');
-        fOut.print(ex.getColumnNumber());
-        fOut.print(": ");
-        fOut.print(ex.getMessage());
-        fOut.println();
-        fOut.flush();
-
-    } // printError(String,SAXParseException)
-
-} // class DefaultErrorHandler
diff --git a/src/org/apache/xerces/util/EncodingMap.java b/src/org/apache/xerces/util/EncodingMap.java
deleted file mode 100644
index 84b68f9..0000000
--- a/src/org/apache/xerces/util/EncodingMap.java
+++ /dev/null
@@ -1,768 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1998,1999,2000 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.util.Hashtable;
-
-/**
- * EncodingMap is a convenience class which handles conversions between 
- * IANA encoding names and Java encoding names, and vice versa. The
- * encoding names used in XML instance documents <strong>must</strong>
- * be the IANA encoding names specified or one of the aliases for those names
- * which IANA defines.
- * <p>
- * <TABLE BORDER="0" WIDTH="100%">
- *  <TR>
- *      <TD WIDTH="33%">
- *          <P ALIGN="CENTER"><B>Common Name</B>
- *      </TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER"><B>Use this name in XML files</B>
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER"><B>Name Type</B>
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER"><B>Xerces converts to this Java Encoder Name</B>
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">8 bit Unicode</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">UTF-8
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">UTF8
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin 1</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-1
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-1
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin 2</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-2
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-2
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin 3</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-3
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-3
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin 4</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-4
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-4
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin Cyrillic</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-5
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-5
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin Arabic</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-6
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-6
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin Greek</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-7
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-7
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin Hebrew</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-8
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-8
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">ISO Latin 5</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ISO-8859-9
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">ISO-8859-9
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: US</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-us
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp037
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Canada</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-ca
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp037
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Netherlands</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-nl
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp037
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Denmark</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-dk
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp277
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Norway</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-no
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp277
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Finland</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-fi
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp278
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Sweden</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-se
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp278
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Italy</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-it
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp280
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Spain, Latin America</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-es
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp284
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Great Britain</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-gb
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp285
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: France</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-fr
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp297
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Arabic</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-ar1
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp420
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Hebrew</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-he
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp424
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Switzerland</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-ch
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp500
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Roece</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-roece
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp870
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Yugoslavia</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-yu
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp870
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Iceland</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-is
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp871
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">EBCDIC: Urdu</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">ebcdic-cp-ar2
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">IANA
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">cp918
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">Chinese for PRC, mixed 1/2 byte</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">gb2312
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">GB2312
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">Extended Unix Code, packed for Japanese</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">euc-jp
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">eucjis
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">Japanese: iso-2022-jp</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">iso-2020-jp
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">JIS
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">Japanese: Shift JIS</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">Shift_JIS
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">SJIS
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">Chinese: Big5</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">Big5
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">Big5
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">Extended Unix Code, packed for Korean</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">euc-kr
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">iso2022kr
- *      </TD>
- *  </TR>
- *  <TR>
- *      <TD WIDTH="33%">Cyrillic</TD>
- *      <TD WIDTH="15%">
- *          <P ALIGN="CENTER">koi8-r
- *      </TD>
- *      <TD WIDTH="12%">
- *          <P ALIGN="CENTER">MIME
- *      </TD>
- *      <TD WIDTH="31%">
- *          <P ALIGN="CENTER">koi8-r
- *      </TD>
- *  </TR>
- * </TABLE>
- * 
- * @author TAMURA Kent, IBM
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class EncodingMap {
-
-    //
-    // Data
-    //
-
-    /** fIANA2JavaMap */
-    protected final static Hashtable fIANA2JavaMap = new Hashtable();
-
-    /** fJava2IANAMap */
-    protected final static Hashtable fJava2IANAMap = new Hashtable();
-
-    //
-    // Static initialization
-    //
-
-    static {
-
-        // add IANA to Java encoding mappings.
-        fIANA2JavaMap.put("BIG5",            "Big5");
-        fIANA2JavaMap.put("EBCDIC-CP-US",    "CP037");
-        fIANA2JavaMap.put("EBCDIC-CP-CA",    "CP037");
-        fIANA2JavaMap.put("EBCDIC-CP-NL",    "CP037");
-        fIANA2JavaMap.put("EBCDIC-CP-WT",    "CP037");
-        fIANA2JavaMap.put("EBCDIC-CP-DK",    "CP277");
-        fIANA2JavaMap.put("EBCDIC-CP-NO",    "CP277");
-        fIANA2JavaMap.put("EBCDIC-CP-FI",    "CP278");
-        fIANA2JavaMap.put("EBCDIC-CP-SE",    "CP278");
-        fIANA2JavaMap.put("EBCDIC-CP-IT",    "CP280");
-        fIANA2JavaMap.put("EBCDIC-CP-ES",    "CP284");
-        fIANA2JavaMap.put("EBCDIC-CP-GB",    "CP285");
-        fIANA2JavaMap.put("EBCDIC-CP-FR",    "CP297");
-        fIANA2JavaMap.put("EBCDIC-CP-AR1",   "CP420");
-        fIANA2JavaMap.put("EBCDIC-CP-HE",    "CP424");
-        fIANA2JavaMap.put("EBCDIC-CP-CH",    "CP500");
-        fIANA2JavaMap.put("EBCDIC-CP-BE",    "CP500"); 
-        fIANA2JavaMap.put("CP-AR",        "CP868");
-        fIANA2JavaMap.put("CP-GR",        "CP869");
-        fIANA2JavaMap.put("EBCDIC-CP-ROECE", "CP870");
-        fIANA2JavaMap.put("EBCDIC-CP-YU",    "CP870");
-        fIANA2JavaMap.put("EBCDIC-CP-IS",    "CP871");
-        fIANA2JavaMap.put("EBCDIC-CP-AR2",   "CP918");
-        fIANA2JavaMap.put("EUC-JP",          "EUCJIS");
-        fIANA2JavaMap.put("EUC-KR",          "KSC5601");
-        fIANA2JavaMap.put("GB2312",          "GB2312");
-        fIANA2JavaMap.put("ISO-2022-JP",     "JIS");
-        fIANA2JavaMap.put("ISO-2022-KR",     "ISO2022KR");
-        fIANA2JavaMap.put("ISO-2022-CN",     "ISO2022CN");
-
-        fIANA2JavaMap.put("X0201",  "JIS0201");
-        fIANA2JavaMap.put("X0208",  "JIS0208");
-        fIANA2JavaMap.put("X0212",  "JIS0212");
-        fIANA2JavaMap.put("ISO-IR-159",  "JIS0212");
-        fIANA2JavaMap.put("SHIFT_JIS",       "SJIS");
-        fIANA2JavaMap.put("MS_Kanji",       "SJIS");
-
-	    // Add support for Cp1252 and its friends
-        fIANA2JavaMap.put("WINDOWS-1250",   "Cp1250");
-        fIANA2JavaMap.put("WINDOWS-1251",   "Cp1251");
-        fIANA2JavaMap.put("WINDOWS-1252",   "Cp1252");
-        fIANA2JavaMap.put("WINDOWS-1253",   "Cp1253");
-        fIANA2JavaMap.put("WINDOWS-1254",   "Cp1254");
-        fIANA2JavaMap.put("WINDOWS-1255",   "Cp1255");
-        fIANA2JavaMap.put("WINDOWS-1256",   "Cp1256");
-        fIANA2JavaMap.put("WINDOWS-1257",   "Cp1257");
-        fIANA2JavaMap.put("WINDOWS-1258",   "Cp1258");
-        fIANA2JavaMap.put("TIS-620",   "TIS620");
-
-        fIANA2JavaMap.put("ISO-8859-1",      "ISO8859_1"); 
-        fIANA2JavaMap.put("ISO-IR-100",      "ISO8859_1");
-        fIANA2JavaMap.put("ISO_8859-1",      "ISO8859_1");
-        fIANA2JavaMap.put("LATIN1",      "ISO8859_1");
-        fIANA2JavaMap.put("L1",      "ISO8859_1");
-        fIANA2JavaMap.put("IBM819",      "ISO8859_1");
-        fIANA2JavaMap.put("CP819",      "ISO8859_1");
-
-        fIANA2JavaMap.put("ISO-8859-2",      "ISO8859_2"); 
-        fIANA2JavaMap.put("ISO-IR-101",      "ISO8859_2");
-        fIANA2JavaMap.put("ISO_8859-2",      "ISO8859_2");
-        fIANA2JavaMap.put("LATIN2",      "ISO8859_2");
-        fIANA2JavaMap.put("L2",      "ISO8859_2");
-
-        fIANA2JavaMap.put("ISO-8859-3",      "ISO8859_3"); 
-        fIANA2JavaMap.put("ISO-IR-109",      "ISO8859_3");
-        fIANA2JavaMap.put("ISO_8859-3",      "ISO8859_3");
-        fIANA2JavaMap.put("LATIN3",      "ISO8859_3");
-        fIANA2JavaMap.put("L3",      "ISO8859_3");
-
-        fIANA2JavaMap.put("ISO-8859-4",      "ISO8859_4"); 
-        fIANA2JavaMap.put("ISO-IR-110",      "ISO8859_4");
-        fIANA2JavaMap.put("ISO_8859-4",      "ISO8859_4");
-        fIANA2JavaMap.put("LATIN4",      "ISO8859_4");
-        fIANA2JavaMap.put("L4",      "ISO8859_4");
-
-        fIANA2JavaMap.put("ISO-8859-5",      "ISO8859_5"); 
-        fIANA2JavaMap.put("ISO-IR-144",      "ISO8859_5");
-        fIANA2JavaMap.put("ISO_8859-5",      "ISO8859_5");
-        fIANA2JavaMap.put("CYRILLIC",      "ISO8859_5");
-
-        fIANA2JavaMap.put("ISO-8859-6",      "ISO8859_6"); 
-        fIANA2JavaMap.put("ISO-IR-127",      "ISO8859_6");
-        fIANA2JavaMap.put("ISO_8859-6",      "ISO8859_6");
-        fIANA2JavaMap.put("ECMA-114",      "ISO8859_6");
-        fIANA2JavaMap.put("ASMO-708",      "ISO8859_6");
-        fIANA2JavaMap.put("ARABIC",      "ISO8859_6");
-
-        fIANA2JavaMap.put("ISO-8859-7",      "ISO8859_7"); 
-        fIANA2JavaMap.put("ISO-IR-126",      "ISO8859_7");
-        fIANA2JavaMap.put("ISO_8859-7",      "ISO8859_7");
-        fIANA2JavaMap.put("ELOT_928",      "ISO8859_7");
-        fIANA2JavaMap.put("ECMA-118",      "ISO8859_7");
-        fIANA2JavaMap.put("GREEK",      "ISO8859_7");
-        fIANA2JavaMap.put("GREEK8",      "ISO8859_7");
-
-        fIANA2JavaMap.put("ISO-8859-8",      "ISO8859_8"); 
-        fIANA2JavaMap.put("ISO-8859-8-I",      "ISO8859_8"); // added since this encoding only differs w.r.t. presentation 
-        fIANA2JavaMap.put("ISO-IR-138",      "ISO8859_8");
-        fIANA2JavaMap.put("ISO_8859-8",      "ISO8859_8");
-        fIANA2JavaMap.put("HEBREW",      "ISO8859_8");
-
-        fIANA2JavaMap.put("ISO-8859-9",      "ISO8859_9"); 
-        fIANA2JavaMap.put("ISO-IR-148",      "ISO8859_9");
-        fIANA2JavaMap.put("ISO_8859-9",      "ISO8859_9");
-        fIANA2JavaMap.put("LATIN5",      "ISO8859_9");
-        fIANA2JavaMap.put("L5",      "ISO8859_9");
-
-        fIANA2JavaMap.put("KOI8-R",          "KOI8_R");
-        fIANA2JavaMap.put("US-ASCII",        "ASCII"); 
-        fIANA2JavaMap.put("ISO-IR-6",        "ASCII");
-        fIANA2JavaMap.put("ANSI_X3.4-1986",        "ASCII");
-        fIANA2JavaMap.put("ISO_646.IRV:1991",        "ASCII");
-        fIANA2JavaMap.put("ASCII",        "ASCII");
-        fIANA2JavaMap.put("ISO646-US",        "ASCII");
-        fIANA2JavaMap.put("US",        "ASCII");
-        fIANA2JavaMap.put("IBM367",        "ASCII");
-        fIANA2JavaMap.put("CP367",        "ASCII");
-        fIANA2JavaMap.put("UTF-8",           "UTF8");
-        fIANA2JavaMap.put("UTF-16",           "Unicode");
-        fIANA2JavaMap.put("UTF-16BE",           "UnicodeBig");
-        fIANA2JavaMap.put("UTF-16LE",           "UnicodeLittle");
-
-        // REVISIT:
-        //   j:CNS11643 -> EUC-TW?
-        //   ISO-2022-CN? ISO-2022-CN-EXT?
-                                                
-        // add Java to IANA encoding mappings
-        //fJava2IANAMap.put("8859_1",    "US-ASCII"); // ?
-        fJava2IANAMap.put("ISO8859_1",    "ISO-8859-1");
-        fJava2IANAMap.put("ISO8859_2",    "ISO-8859-2");
-        fJava2IANAMap.put("ISO8859_3",    "ISO-8859-3");
-        fJava2IANAMap.put("ISO8859_4",    "ISO-8859-4");
-        fJava2IANAMap.put("ISO8859_5",    "ISO-8859-5");
-        fJava2IANAMap.put("ISO8859_6",    "ISO-8859-6");
-        fJava2IANAMap.put("ISO8859_7",    "ISO-8859-7");
-        fJava2IANAMap.put("ISO8859_8",    "ISO-8859-8");
-        fJava2IANAMap.put("ISO8859_9",    "ISO-8859-9");
-        fJava2IANAMap.put("Big5",      "BIG5");
-        fJava2IANAMap.put("CP037",     "EBCDIC-CP-US");
-        fJava2IANAMap.put("CP278",     "EBCDIC-CP-FI");
-        fJava2IANAMap.put("CP280",     "EBCDIC-CP-IT");
-        fJava2IANAMap.put("CP284",     "EBCDIC-CP-ES");
-        fJava2IANAMap.put("CP285",     "EBCDIC-CP-GB");
-        fJava2IANAMap.put("CP297",     "EBCDIC-CP-FR");
-        fJava2IANAMap.put("CP420",     "EBCDIC-CP-AR1");
-        fJava2IANAMap.put("CP424",     "EBCDIC-CP-HE");
-        fJava2IANAMap.put("CP500",     "EBCDIC-CP-CH");
-        fJava2IANAMap.put("CP870",     "EBCDIC-CP-ROECE");
-        fJava2IANAMap.put("CP871",     "EBCDIC-CP-IS");
-        fJava2IANAMap.put("CP918",     "EBCDIC-CP-AR2");
-        fJava2IANAMap.put("EUCJIS",    "EUC-JP");
-        fJava2IANAMap.put("GB2312",    "GB2312");
-        fJava2IANAMap.put("ISO2022KR", "ISO-2022-KR");
-        fJava2IANAMap.put("ISO2022CN", "ISO-2022-CN");
-        fJava2IANAMap.put("JIS",       "ISO-2022-JP");
-        fJava2IANAMap.put("KOI8_R",    "KOI8-R");
-        fJava2IANAMap.put("KSC5601",   "EUC-KR");
-        fJava2IANAMap.put("SJIS",      "SHIFT_JIS");
-        fJava2IANAMap.put("UTF8",      "UTF-8");
-        fJava2IANAMap.put("Unicode",   "UTF-16");
-        fJava2IANAMap.put("UnicodeBig",   "UTF-16BE");
-        fJava2IANAMap.put("UnicodeLittle",   "UTF-16LE");
-        fJava2IANAMap.put("JIS0201",  "X0201");
-        fJava2IANAMap.put("JIS0208",  "X0208");
-        fJava2IANAMap.put("JIS0212",  "ISO-IR-159");
-
-    } // <clinit>()
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public EncodingMap() {}
-
-    //
-    // Public static methods
-    //
-
-    /**
-     * Adds an IANA to Java encoding name mapping.
-     * 
-     * @param ianaEncoding The IANA encoding name.
-     * @param javaEncoding The Java encoding name.
-     */
-    public static void putIANA2JavaMapping(String ianaEncoding, 
-                                           String javaEncoding) {
-        fIANA2JavaMap.put(ianaEncoding, javaEncoding);
-    } // putIANA2JavaMapping(String,String)
-
-    /**
-     * Returns the Java encoding name for the specified IANA encoding name.
-     * 
-     * @param ianaEncoding The IANA encoding name.
-     */
-    public static String getIANA2JavaMapping(String ianaEncoding) {
-        return (String)fIANA2JavaMap.get(ianaEncoding);
-    } // getIANA2JavaMapping(String):String
-
-    /**
-     * Removes an IANA to Java encoding name mapping.
-     * 
-     * @param ianaEncoding The IANA encoding name.
-     */
-    public static String removeIANA2JavaMapping(String ianaEncoding) {
-        return (String)fIANA2JavaMap.remove(ianaEncoding);
-    } // removeIANA2JavaMapping(String):String
-
-    /**
-     * Adds a Java to IANA encoding name mapping.
-     * 
-     * @param javaEncoding The Java encoding name.
-     * @param ianaEncoding The IANA encoding name.
-     */
-    public static void putJava2IANAMapping(String javaEncoding, 
-                                           String ianaEncoding) {
-        fJava2IANAMap.put(javaEncoding, ianaEncoding);
-    } // putJava2IANAMapping(String,String)
-
-    /**
-     * Returns the IANA encoding name for the specified Java encoding name.
-     * 
-     * @param javaEncoding The Java encoding name.
-     */
-    public static String getJava2IANAMapping(String javaEncoding) {
-        return (String)fJava2IANAMap.get(javaEncoding);
-    } // getJava2IANAMapping(String):String
-
-    /**
-     * Removes a Java to IANA encoding name mapping.
-     * 
-     * @param javaEncoding The Java encoding name.
-     */
-    public static String removeJava2IANAMapping(String javaEncoding) {
-        return (String)fJava2IANAMap.remove(javaEncoding);
-    } // removeJava2IANAMapping
-
-} // class EncodingMap
diff --git a/src/org/apache/xerces/util/EntityResolverWrapper.java b/src/org/apache/xerces/util/EntityResolverWrapper.java
deleted file mode 100644
index 19f5bc6..0000000
--- a/src/org/apache/xerces/util/EntityResolverWrapper.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLInputSource;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * This class wraps a SAX entity resolver in an XNI entity resolver.
- *
- * @see EntityResolver
- *
- * @author Andy Clark, IBM
- * 
- * @version $Id$
- */
-public class EntityResolverWrapper
-    implements XMLEntityResolver {
-
-    //
-    // Data
-    //
-
-    /** The SAX entity resolver. */
-    protected EntityResolver fEntityResolver;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public EntityResolverWrapper() {}
-
-    /** Wraps the specified SAX entity resolver. */
-    public EntityResolverWrapper(EntityResolver entityResolver) {
-        setEntityResolver(entityResolver);
-    } // <init>(EntityResolver)
-
-    //
-    // Public methods
-    //
-
-    /** Sets the SAX entity resolver. */
-    public void setEntityResolver(EntityResolver entityResolver) {
-        fEntityResolver = entityResolver;
-    } // setEntityResolver(EntityResolver)
-
-    /** Returns the SAX entity resolver. */
-    public EntityResolver getEntityResolver() {
-        return fEntityResolver;
-    } // getEntityResolver():EntityResolver
-
-    //
-    // XMLEntityResolver methods
-    //
-    
-    /**
-     * Resolves an external parsed entity. If the entity cannot be
-     * resolved, this method should return null.
-     *
-     * @param publicId
-     * @param systemId
-     * @param baseSystemId The base system identifier.
-     *
-     * @throws XNIException Thrown on general error.
-     * @throws IOException  Thrown if resolved entity stream cannot be
-     *                      opened or some other i/o error occurs.
-     */
-    public XMLInputSource resolveEntity(String publicId, String systemId, 
-                                        String baseSystemId) 
-        throws XNIException, IOException {
-
-        // resolve entity using SAX entity resolver
-        if (fEntityResolver != null) {
-            try {
-                InputSource inputSource = 
-                    fEntityResolver.resolveEntity(publicId, systemId);
-                if (inputSource != null) {
-                    publicId = inputSource.getPublicId();
-                    systemId = inputSource.getSystemId();
-                    InputStream byteStream = inputSource.getByteStream();
-                    Reader charStream = inputSource.getCharacterStream();
-                    String encoding = inputSource.getEncoding();
-                    XMLInputSource xmlInputSource =
-                        new XMLInputSource(publicId, systemId, baseSystemId);
-                    xmlInputSource.setByteStream(byteStream);
-                    xmlInputSource.setCharacterStream(charStream);
-                    xmlInputSource.setEncoding(encoding);
-                    return xmlInputSource;
-                }
-            }
-
-            // error resolving entity
-            catch (SAXException e) {
-                Exception ex = e.getException();
-                if (ex == null) {
-                    ex = e;
-                }
-                throw new XNIException(ex);
-            }
-        }
-
-        // unable to resolve entity
-        return null;
-
-    } // resolveEntity(String,String,String):XMLInputSource
-    }
diff --git a/src/org/apache/xerces/util/ErrorHandlerWrapper.java b/src/org/apache/xerces/util/ErrorHandlerWrapper.java
deleted file mode 100644
index e448003..0000000
--- a/src/org/apache/xerces/util/ErrorHandlerWrapper.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLParseException;
-
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * This class wraps a SAX error handler in an XNI error handler.
- *
- * @see ErrorHandler
- *
- * @author Andy Clark, IBM
- * 
- * @version $Id$
- */
-public class ErrorHandlerWrapper
-    implements XMLErrorHandler {
-
-    //
-    // Data
-    //
-
-    /** The SAX error handler. */
-    protected ErrorHandler fErrorHandler;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public ErrorHandlerWrapper() {}
-
-    /** Wraps the specified SAX error handler. */
-    public ErrorHandlerWrapper(ErrorHandler errorHandler) {
-        setErrorHandler(errorHandler);
-    } // <init>(ErrorHandler)
-
-    //
-    // Public methods
-    //
-
-    /** Sets the SAX error handler. */
-    public void setErrorHandler(ErrorHandler errorHandler) {
-        fErrorHandler = errorHandler;
-    } // setErrorHandler(ErrorHandler)
-
-    /** Returns the SAX error handler. */
-    public ErrorHandler getErrorHandler() {
-        return fErrorHandler;
-    } // getErrorHandler():ErrorHandler
-
-    //
-    // XMLErrorHandler methods
-    //
-
-    /**
-     * Reports a warning. Warnings are non-fatal and can be safely ignored
-     * by most applications.
-     *
-     * @param domain    The domain of the warning. The domain can be any
-     *                  string but is suggested to be a valid URI. The
-     *                  domain can be used to conveniently specify a web
-     *                  site location of the relevent specification or
-     *                  document pertaining to this warning.
-     * @param key       The warning key. This key can be any string and
-     *                  is implementation dependent.
-     * @param exception Exception.
-     *
-     * @throws XNIException Thrown to signal that the parser should stop
-     *                      parsing the document.
-     */
-    public void warning(String domain, String key, 
-                        XMLParseException exception) throws XNIException {
-
-        SAXParseException saxException = createSAXParseException(exception);
-        try {
-            fErrorHandler.warning(saxException);
-        }
-        catch (SAXParseException e) {
-            throw createXMLParseException(e);
-        }
-        catch (SAXException e) {
-            throw createXNIException(e);
-        }
-
-    } // warning(String,String,XMLParseException)
-
-    /**
-     * Reports an error. Errors are non-fatal and usually signify that the
-     * document is invalid with respect to its grammar(s).
-     *
-     * @param domain    The domain of the error. The domain can be any
-     *                  string but is suggested to be a valid URI. The
-     *                  domain can be used to conveniently specify a web
-     *                  site location of the relevent specification or
-     *                  document pertaining to this error.
-     * @param key       The error key. This key can be any string and
-     *                  is implementation dependent.
-     * @param exception Exception.
-     *
-     * @throws XNIException Thrown to signal that the parser should stop
-     *                      parsing the document.
-     */
-    public void error(String domain, String key, 
-                      XMLParseException exception) throws XNIException {
-
-        SAXParseException saxException = createSAXParseException(exception);
-        try {
-            fErrorHandler.error(saxException);
-        }
-        catch (SAXParseException e) {
-            throw createXMLParseException(e);
-        }
-        catch (SAXException e) {
-            throw createXNIException(e);
-        }
-
-    } // error(String,String,XMLParseException)
-
-    /**
-     * Report a fatal error. Fatal errors usually occur when the document
-     * is not well-formed and signifies that the parser cannot continue
-     * normal operation.
-     * <p>
-     * <strong>Note:</strong> The error handler should <em>always</em>
-     * throw an <code>XNIException</code> from this method. This exception
-     * can either be the same exception that is passed as a parameter to
-     * the method or a new XNI exception object. If the registered error
-     * handler fails to throw an exception, the continuing operation of
-     * the parser is undetermined.
-     *
-     * @param domain    The domain of the fatal error. The domain can be 
-     *                  any string but is suggested to be a valid URI. The
-     *                  domain can be used to conveniently specify a web
-     *                  site location of the relevent specification or
-     *                  document pertaining to this fatal error.
-     * @param key       The fatal error key. This key can be any string 
-     *                  and is implementation dependent.
-     * @param exception Exception.
-     *
-     * @throws XNIException Thrown to signal that the parser should stop
-     *                      parsing the document.
-     */
-    public void fatalError(String domain, String key, 
-                           XMLParseException exception) throws XNIException {
-
-        SAXParseException saxException = createSAXParseException(exception);
-        try {
-            fErrorHandler.fatalError(saxException);
-        }
-        catch (SAXParseException e) {
-            throw createXMLParseException(e);
-        }
-        catch (SAXException e) {
-            throw createXNIException(e);
-        }
-
-    } // fatalError(String,String,XMLParseException)
-
-    //
-    // Protected methods
-    //
-
-    /** Creates a SAXParseException from an XMLParseException. */
-    protected static SAXParseException createSAXParseException(XMLParseException exception) {
-        return new SAXParseException(exception.getMessage(),
-                                     exception.getPublicId(),
-                                     exception.getSystemId(),
-                                     exception.getLineNumber(),
-                                     exception.getColumnNumber(),
-                                     exception.getException());
-    } // createSAXParseException(XMLParseException):SAXParseException
-
-    /** Creates an XMLParseException from a SAXParseException. */
-    protected static XMLParseException createXMLParseException(SAXParseException exception) {
-        final String fPublicId = exception.getPublicId();
-        final String fSystemId = exception.getSystemId();
-        final int fLineNumber = exception.getLineNumber();
-        final int fColumnNumber = exception.getColumnNumber();
-        XMLLocator location = new XMLLocator() {
-            public String getPublicId() { return fPublicId; }
-            public String getSystemId() { return fSystemId; }
-            public String getBaseSystemId() { return null; }
-            public int getColumnNumber() { return fColumnNumber; }
-            public int getLineNumber() { return fLineNumber; }
-        };
-        return new XMLParseException(location, exception.getMessage(),
-                                     exception.getException());
-    } // createXMLParseException(SAXParseException):XMLParseException
-
-    /** Creates an XNIException from a SAXException. 
-        NOTE:  care should be taken *not* to call this with a SAXParseException; this will
-        lose information!!! */
-    protected static XNIException createXNIException(SAXException exception) {
-        return new XNIException(exception.getMessage(),
-                                     exception.getException());
-    } // createXNIException(SAXException):XMLParseException
-} // class ErrorHandlerWrapper
diff --git a/src/org/apache/xerces/util/IntStack.java b/src/org/apache/xerces/util/IntStack.java
deleted file mode 100644
index a19442a..0000000
--- a/src/org/apache/xerces/util/IntStack.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-/**
- * A simple integer based stack.
- *
- * moved to org.apache.xerces.util by neilg to support the
- * XPathMatcher.
- * @author  Andy Clark, IBM
- *
- * @version $Id$
- */
-public final class IntStack {
-
-    //
-    // Data
-    //
-
-    /** Stack depth. */
-    private int fDepth;
-
-    /** Stack data. */
-    private int[] fData;
-
-    //
-    // Public methods
-    //
-
-    /** Returns the size of the stack. */
-    public int size() {
-        return fDepth;
-    }
-
-    /** Pushes a value onto the stack. */
-    public void push(int value) {
-        ensureCapacity(fDepth + 1);
-        fData[fDepth++] = value;
-    }
-
-    /** Peeks at the top of the stack. */
-    public int peek() {
-        return fData[fDepth - 1];
-    }
-
-    /** Pops a value off of the stack. */
-    public int pop() {
-        return fData[--fDepth];
-    }
-
-    /** Clears the stack. */
-    public void clear() {
-        fDepth = 0;
-    }
-
-    // debugging
-
-    /** Prints the stack. */
-    public void print() {
-        System.out.print('(');
-        System.out.print(fDepth);
-        System.out.print(") {");
-        for (int i = 0; i < fDepth; i++) {
-            if (i == 3) {
-                System.out.print(" ...");
-                break;
-            }
-            System.out.print(' ');
-            System.out.print(fData[i]);
-            if (i < fDepth - 1) {
-                System.out.print(',');
-            }
-        }
-        System.out.print(" }");
-        System.out.println();
-    }
-
-    //
-    // Private methods
-    //
-
-    /** Ensures capacity. */
-    private boolean ensureCapacity(int size) {
-        try {
-            return fData[size] != 0;
-        }
-        catch (NullPointerException e) {
-            fData = new int[32];
-        }
-        catch (ArrayIndexOutOfBoundsException e) {
-            int[] newdata = new int[fData.length * 2];
-            System.arraycopy(fData, 0, newdata, 0, fData.length);
-            fData = newdata;
-        }
-        return true;
-    }
-
-} // class IntStack
diff --git a/src/org/apache/xerces/util/MessageFormatter.java b/src/org/apache/xerces/util/MessageFormatter.java
deleted file mode 100644
index 9b7ff99..0000000
--- a/src/org/apache/xerces/util/MessageFormatter.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-
-/**
- * This interface provides a generic message formatting mechanism and
- * is useful for producing messages that must be localed and/or formatted
- * with replacement text.
- *
- * @see org.apache.xerces.impl.XMLErrorReporter
- *
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @author Andy Clark
- *
- * @version $Id$
- */
-public interface MessageFormatter {
-
-    //
-    // MessageFormatter methods
-    //
-
-    /**
-     * Formats a message with the specified arguments using the given
-     * locale information.
-     * 
-     * @param locale    The locale of the message.
-     * @param key       The message key.
-     * @param arguments The message replacement text arguments. The order
-     *                  of the arguments must match that of the placeholders
-     *                  in the actual message.
-     * 
-     * @return Returns the formatted message.
-     *
-     * @throws MissingResourceException Thrown if the message with the
-     *                                  specified key cannot be found.
-     */
-    public String formatMessage(Locale locale, String key, Object[] arguments)
-        throws MissingResourceException;
-
-} // interface MessageFormatter
diff --git a/src/org/apache/xerces/util/NamespaceSupport.java b/src/org/apache/xerces/util/NamespaceSupport.java
deleted file mode 100644
index f8888b0..0000000
--- a/src/org/apache/xerces/util/NamespaceSupport.java
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import org.apache.xerces.xni.NamespaceContext;
-
-/**
- * Namespace support for XML document handlers. This class doesn't 
- * perform any error checking and assumes that all strings passed
- * as arguments to methods are unique symbols. The SymbolTable class
- * can be used for this purpose.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class NamespaceSupport 
-    implements NamespaceContext {
-
-    //
-    // Data
-    //
-
-    /** 
-     * Namespace binding information. This array is composed of a
-     * series of tuples containing the namespace binding information:
-     * &lt;prefix, uri&gt;. The default size can be set to anything
-     * as long as it is a power of 2 greater than 1.
-     *
-     * @see #fNamespaceSize
-     * @see #fContext
-     */
-    protected String[] fNamespace = new String[16 * 2];
-
-    /** The top of the namespace information array. */
-    protected int fNamespaceSize;
-
-    // NOTE: The constructor depends on the initial context size 
-    //       being at least 1. -Ac
-
-    /** 
-     * Context indexes. This array contains indexes into the namespace
-     * information array. The index at the current context is the start
-     * index of declared namespace bindings and runs to the size of the
-     * namespace information array.
-     *
-     * @see #fNamespaceSize
-     */
-    protected int[] fContext = new int[8];
-
-    /** The current context. */
-    protected int fCurrentContext;
-
-    // symbols
-
-    /** Symbol: "xml". */
-    protected String fXmlSymbol;
-
-    /** Symbol: "xmlns". */
-    protected String fXmlnsSymbol;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public NamespaceSupport() {
-    } // <init>()
-
-    /** 
-     * Constructs a namespace context object and initializes it with
-     * the prefixes declared in the specified context.
-     */
-    public NamespaceSupport(NamespaceContext context) {
-        pushContext();
-        while (context != null) {
-            int count = context.getDeclaredPrefixCount();
-            for (int i = 0; i < count; i++) {
-                String prefix = context.getDeclaredPrefixAt(i);
-                String uri = getURI(prefix);
-                if (uri == null) {
-                    uri = context.getURI(prefix);
-                    declarePrefix(prefix, uri);
-                }
-            }
-            context = context.getParentContext();
-        }
-    } // <init>(NamespaceContext)
-
-    //
-    // Public methods
-    //
-
-    // context management
-    
-    /**
-     * Reset this Namespace support object for reuse.
-     *
-     * <p>It is necessary to invoke this method before reusing the
-     * Namespace support object for a new session.</p>
-     */
-    public void reset(SymbolTable symbolTable) {
-
-        // save symbols
-        fXmlSymbol = symbolTable.addSymbol("xml");
-        fXmlnsSymbol = symbolTable.addSymbol("xmlns");
-
-        // reset namespace and context info
-        fNamespaceSize = 0;
-        fCurrentContext = 0;
-        fContext[fCurrentContext] = fNamespaceSize;
-
-        // bind "xml" prefix to the XMLNS uri
-        fNamespace[fNamespaceSize++] = fXmlSymbol;
-        fNamespace[fNamespaceSize++] = symbolTable.addSymbol(XML_URI);
-        ++fCurrentContext;
-
-    } // reset(SymbolTable)
-
-    /**
-     * Start a new Namespace context.
-     * <p>
-     * Normally, you should push a new context at the beginning
-     * of each XML element: the new context will automatically inherit
-     * the declarations of its parent context, but it will also keep
-     * track of which declarations were made within this context.
-     * <p>
-     * The Namespace support object always starts with a base context
-     * already in force: in this context, only the "xml" prefix is
-     * declared.
-     *
-     * @see #popContext
-     */
-    public void pushContext() {
-
-        // extend the array, if necessary
-        if (fCurrentContext + 1 == fContext.length) {
-            int[] contextarray = new int[fContext.length * 2];
-            System.arraycopy(fContext, 0, contextarray, 0, fContext.length);
-            fContext = contextarray;
-        }
-
-        // push context
-        fContext[++fCurrentContext] = fNamespaceSize;
-
-    } // pushContext()
-
-
-    /**
-     * Revert to the previous Namespace context.
-     * <p>
-     * Normally, you should pop the context at the end of each
-     * XML element.  After popping the context, all Namespace prefix
-     * mappings that were previously in force are restored.
-     * <p>
-     * You must not attempt to declare additional Namespace
-     * prefixes after popping a context, unless you push another
-     * context first.
-     *
-     * @see #pushContext
-     */
-    public void popContext() {
-        fNamespaceSize = fContext[fCurrentContext--];
-    } // popContext()
-
-    // operations within a context.
-
-    /**
-     * Declare a Namespace prefix.
-     * <p>
-     * This method declares a prefix in the current Namespace
-     * context; the prefix will remain in force until this context
-     * is popped, unless it is shadowed in a descendant context.
-     * <p>
-     * To declare a default Namespace, use the empty string.  The
-     * prefix must not be "xml" or "xmlns".
-     * <p>
-     * Note that you must <em>not</em> declare a prefix after
-     * you've pushed and popped another Namespace.
-     *
-     * @param prefix The prefix to declare, or null for the empty
-     *        string.
-     * @param uri The Namespace URI to associate with the prefix.
-     *
-     * @return true if the prefix was legal, false otherwise
-     *
-     * @see #getURI
-     * @see #getDeclaredPrefixAt
-     */
-    public boolean declarePrefix(String prefix, String uri) {
-
-        // ignore "xml" and "xmlns" prefixes
-        if (prefix == fXmlSymbol || prefix == fXmlnsSymbol) {
-            return false;
-        }
-
-        // see if prefix already exists in current context
-        for (int i = fNamespaceSize; i > fContext[fCurrentContext]; i -= 2) {
-            if (fNamespace[i - 2] == prefix) {
-                // REVISIT: [Q] Should the new binding override the
-                //          previously declared binding or should it
-                //          it be ignored? -Ac
-                // NOTE:    The SAX2 "NamespaceSupport" helper allows
-                //          re-bindings with the new binding overwriting
-                //          the previous binding. -Ac
-                fNamespace[i - 1] = uri;
-                return true;
-            }
-        }
-
-        // resize array, if needed
-        if (fNamespaceSize == fNamespace.length) {
-            String[] namespacearray = new String[fNamespaceSize * 2];
-            System.arraycopy(fNamespace, 0, namespacearray, 0, fNamespaceSize);
-            fNamespace = namespacearray;
-        }
-
-        // bind prefix to uri in current context
-        fNamespace[fNamespaceSize++] = prefix;
-        fNamespace[fNamespaceSize++] = uri;
-        return true;
-
-    } // declarePrefix(String,String):boolean
-
-    /**
-     * Look up a prefix and get the currently-mapped Namespace URI.
-     * <p>
-     * This method looks up the prefix in the current context.
-     * Use the empty string ("") for the default Namespace.
-     *
-     * @param prefix The prefix to look up.
-     *
-     * @return The associated Namespace URI, or null if the prefix
-     *         is undeclared in this context.
-     *
-     * @see #getDeclaredPrefixAt
-     */
-    public String getURI(String prefix) {
-
-        // find prefix in current context
-        for (int i = fNamespaceSize; i > 0; i -= 2) {
-            if (fNamespace[i - 2] == prefix) {
-                return fNamespace[i - 1];
-            }
-        }
-
-        // prefix not found
-        return null;
-
-    } // getURI(String):String
-
-    /**
-     * Return a count of all prefixes currently declared, including
-     * the default prefix if bound.
-     */
-    public int getDeclaredPrefixCount() {
-        return (fNamespaceSize - fContext[fCurrentContext]) / 2;
-    } // getDeclaredPrefixCount():int
-
-    /** 
-     * Returns the prefix at the specified index in the current context.
-     */
-    public String getDeclaredPrefixAt(int index) {
-        return fNamespace[fContext[fCurrentContext] + index * 2];
-    } // getDeclaredPrefixAt(int):String
-
-    /**
-     * Returns the parent namespace context or null if there is no
-     * parent context. The total depth of the namespace contexts 
-     * matches the element depth in the document.
-     * <p>
-     * <strong>Note:</strong> This method <em>may</em> return the same 
-     * NamespaceContext object reference. The caller is responsible for
-     * saving the declared prefix mappings before calling this method.
-     */
-    public NamespaceContext getParentContext() {
-        if (fCurrentContext == 1) {
-            return null;
-        }
-        return new Context(fCurrentContext - 1);
-    } // getParentContext():NamespaceContext
-
-    //
-    // Classes
-    //
-
-    /**
-     * Namespace context information. The current context is always
-     * handled directly by the NamespaceSupport class. This class is
-     * used when a user queries the parent context.
-     *
-     * @author Andy Clark, IBM
-     */
-    final class Context 
-        implements NamespaceContext {
-    
-        //
-        // Data
-        //
-
-        /** The current context. */
-        private int fCurrentContext;
-
-        //
-        // Constructors
-        //
-
-        /** 
-         * Constructs a new context. Once constructed, this object will
-         * be re-used when the application calls <code>getParentContext</code.
-         */
-        public Context(int currentContext) {
-            setCurrentContext(currentContext);
-        } // <init>(int)
-
-        //
-        // Public methods
-        //
-
-        /** Sets the current context. */
-        public void setCurrentContext(int currentContext) {
-            fCurrentContext = currentContext;
-        } // setCurrentContext(int)
-
-        //
-        // NamespaceContext methods
-        //
-
-        /**
-         * Look up a prefix and get the currently-mapped Namespace URI.
-         * <p>
-         * This method looks up the prefix in the current context.
-         * Use the empty string ("") for the default Namespace.
-         *
-         * @param prefix The prefix to look up.
-         *
-         * @return The associated Namespace URI, or null if the prefix
-         *         is undeclared in this context.
-         *
-         * @see #getPrefix
-         * @see #getPrefixes
-         */
-        public String getURI(String prefix) {
-
-            // find prefix in current context
-            for (int i = fNamespaceSize; i > 0; i -= 2) {
-                if (fNamespace[i - 2] == prefix) {
-                    return fNamespace[i - 1];
-                }
-            }
-
-            // prefix not found
-            return null;
-
-        } // getURI(String):String
-
-        /**
-         * Return a count of all prefixes currently declared, including
-         * the default prefix if bound.
-         */
-        public int getDeclaredPrefixCount() {
-            return (fNamespaceSize - fContext[fCurrentContext]) / 2;
-        } // getDeclaredPrefixCount():int
-
-        /** 
-         * Returns the prefix at the specified index in the current context.
-         */
-        public String getDeclaredPrefixAt(int index) {
-            return fNamespace[fContext[fCurrentContext] + index * 2];
-        } // getDeclaredPrefixAt(int):String
-
-        /**
-         * Returns the parent namespace context or null if there is no
-         * parent context. The total depth of the namespace contexts 
-         * matches the element depth in the document.
-         * <p>
-         * <strong>Note:</strong> This method <em>may</em> return the same 
-         * NamespaceContext object reference. The caller is responsible for
-         * saving the declared prefix mappings before calling this method.
-         */
-        public NamespaceContext getParentContext() {
-            if (fCurrentContext == 1) {
-                return null;
-            }
-            setCurrentContext(fCurrentContext - 1);
-            return this;
-        } // getParentContext():NamespaceContext
-
-    } // class Context
-
-} // class NamespaceSupport
diff --git a/src/org/apache/xerces/util/ParserConfigurationSettings.java b/src/org/apache/xerces/util/ParserConfigurationSettings.java
deleted file mode 100644
index 3a03b90..0000000
--- a/src/org/apache/xerces/util/ParserConfigurationSettings.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.apache.xerces.xni.parser.XMLComponentManager;
-import org.apache.xerces.xni.parser.XMLConfigurationException;
-
-/**
- * This class implements the basic operations for managing parser
- * configuration features and properties. This utility class can
- * be used as a base class for parser configurations or separately
- * to encapsulate a number of parser settings as a component
- * manager.
- * <p>
- * This class can be constructed with a "parent" settings object
- * (in the form of an <code>XMLComponentManager</code>) that allows
- * parser configuration settings to be "chained" together.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class ParserConfigurationSettings
-    implements XMLComponentManager {
-
-    //
-    // Data
-    //
-
-    // data
-
-    /** Recognized properties. */
-    protected Vector fRecognizedProperties;
-
-    /** Properties. */
-    protected Hashtable fProperties;
-
-    /** Recognized features. */
-    protected Vector fRecognizedFeatures;
-
-    /** Features. */
-    protected Hashtable fFeatures;
-
-    /** Parent parser configuration settings. */
-    protected XMLComponentManager fParentSettings;
-
-    //
-    // Constructors
-    //
-
-    /** Default Constructor. */
-    public ParserConfigurationSettings() {
-        this(null);
-    } // <init>()
-
-    /**
-     * Constructs a parser configuration settings object with a
-     * parent settings object.
-     */
-    public ParserConfigurationSettings(XMLComponentManager parent) {
-
-        // create storage for recognized features and properties
-        fRecognizedFeatures = new Vector();
-        fRecognizedProperties = new Vector();
-
-        // create table for features and properties
-        fFeatures = new Hashtable();
-        fProperties = new Hashtable();
-
-        // save parent
-        fParentSettings = parent;
-
-    } // <init>(XMLComponentManager)
-
-    //
-    // XMLParserConfiguration methods
-    //
-
-    /**
-     * Allows a parser to add parser specific features to be recognized
-     * and managed by the parser configuration.
-     *
-     * @param featureIds An array of the additional feature identifiers 
-     *                   to be recognized.
-     */
-    public void addRecognizedFeatures(String[] featureIds) {
-
-        // add recognized features
-        int featureIdsCount = featureIds != null ? featureIds.length : 0;
-        for (int i = 0; i < featureIdsCount; i++) {
-            String featureId = featureIds[i];
-            if (!fRecognizedFeatures.contains(featureId)) {
-                fRecognizedFeatures.addElement(featureId);
-            }
-        }
-
-    } // addRecognizedFeatures(String[])
-
-    /**
-     * Set the state of a feature.
-     *
-     * Set the state of any feature in a SAX2 parser.  The parser
-     * might not recognize the feature, and if it does recognize
-     * it, it might not be able to fulfill the request.
-     *
-     * @param featureId The unique identifier (URI) of the feature.
-     * @param state The requested state of the feature (true or false).
-     *
-     * @exception org.apache.xerces.xni.parser.XMLConfigurationException If the
-     *            requested feature is not known.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException {
-
-        // check and store
-        checkFeature(featureId);
-        fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE);
-
-    } // setFeature(String,boolean)
-
-    /**
-     * Allows a parser to add parser specific properties to be recognized
-     * and managed by the parser configuration.
-     *
-     * @param propertyIds An array of the additional property identifiers 
-     *                    to be recognized.
-     */
-    public void addRecognizedProperties(String[] propertyIds) {
-
-        // add recognizedProperties
-        int propertyIdsCount = propertyIds != null ? propertyIds.length : 0;
-        for (int i = 0; i < propertyIdsCount; i++) {
-            String propertyId = propertyIds[i];
-            if (!fRecognizedProperties.contains(propertyId)) {
-                fRecognizedProperties.addElement(propertyId);
-            }
-        }
-
-    } // addRecognizedProperties(String[])
-
-    /**
-     * setProperty
-     * 
-     * @param propertyId 
-     * @param value 
-     * @exception org.apache.xerces.xni.parser.XMLConfigurationException If the
-     *            requested feature is not known.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException {
-
-        // check and store
-        checkProperty(propertyId);
-        fProperties.put(propertyId, value);
-
-    } // setProperty(String,Object)
-
-    //
-    // XMLComponentManager methods
-    //
-
-    /**
-     * Returns the state of a feature.
-     * 
-     * @param featureId The feature identifier.
-		 * @return true if the feature is supported
-     * 
-     * @throws XMLConfigurationException Thrown for configuration error.
-     *                                   In general, components should
-     *                                   only throw this exception if
-     *                                   it is <strong>really</strong>
-     *                                   a critical error.
-     */
-    public boolean getFeature(String featureId)
-        throws XMLConfigurationException {
-
-        checkFeature(featureId);
-
-        Boolean state = (Boolean) fFeatures.get(featureId);
-        return state != null ? state.booleanValue() : false;
-
-    } // getFeature(String):boolean
-
-    /**
-     * Returns the value of a property.
-     * 
-     * @param propertyId The property identifier.
-		 * @return the value of the property
-     * 
-     * @throws XMLConfigurationException Thrown for configuration error.
-     *                                   In general, components should
-     *                                   only throw this exception if
-     *                                   it is <strong>really</strong>
-     *                                   a critical error.
-     */
-    public Object getProperty(String propertyId)
-        throws XMLConfigurationException {
-
-        checkProperty(propertyId);
-
-        return fProperties.get(propertyId);
-
-    } // getProperty(String):Object
-
-    //
-    // Protected methods
-    //
-
-    /**
-     * Check a feature. If feature is known and supported, this method simply
-     * returns. Otherwise, the appropriate exception is thrown.
-     *
-     * @param featureId The unique identifier (URI) of the feature.
-     *
-     * @exception org.apache.xerces.xni.parser.XMLConfigurationException If the
-     *            requested feature is not known.
-     */
-    protected void checkFeature(String featureId)
-        throws XMLConfigurationException {
-
-        // check feature
-        if (!fRecognizedFeatures.contains(featureId)) {
-            if (fParentSettings != null) {
-                fParentSettings.getFeature(featureId);
-            }
-            else {
-                short type = XMLConfigurationException.NOT_RECOGNIZED;
-                throw new XMLConfigurationException(type, featureId);
-            }
-        }
-
-    } // checkFeature(String)
-
-    /**
-     * Check a property. If the property is known and supported, this method
-     * simply returns. Otherwise, the appropriate exception is thrown.
-     *
-     * @param propertyId The unique identifier (URI) of the property
-     *                   being set.
-     * @exception org.apache.xerces.xni.parser.XMLConfigurationException If the
-     *            requested feature is not known.
-     */
-    protected void checkProperty(String propertyId)
-        throws XMLConfigurationException {
-
-        // check property
-        if (!fRecognizedProperties.contains(propertyId)) {
-            if (fParentSettings != null) {
-                fParentSettings.getProperty(propertyId);
-            }
-            else {
-                short type = XMLConfigurationException.NOT_RECOGNIZED;
-                throw new XMLConfigurationException(type, propertyId);
-            }
-        }
-
-    } // checkProperty(String)
-
-} // class ParserConfigurationSettings
diff --git a/src/org/apache/xerces/util/SymbolHash.java b/src/org/apache/xerces/util/SymbolHash.java
deleted file mode 100644
index 80aee0b..0000000
--- a/src/org/apache/xerces/util/SymbolHash.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import org.apache.xerces.xni.QName;
-
-/**
- * This class is an unsynchronized hash table primary used for String
- * to Object mapping.
- * <p>
- * The hash code uses the same algorithm as SymbolTable class.
- * 
- * @author Elena Litani
- * @version $Id$
- */
-public class SymbolHash {
-
-    //
-    // Constants
-    //
-
-    /** Default table size. */
-    protected int fTableSize = 101;
-
-    //
-    // Data
-    //
-
-    /** Buckets. */
-    protected Entry[] fBuckets; 
-
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a key table. */
-    public SymbolHash() {
-        fBuckets = new Entry[fTableSize];
-    }
-
-
-    public SymbolHash(int size) {
-        fTableSize = size;
-        fBuckets = new Entry[fTableSize];
-    }
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Adds the specified key to the key table and returns a
-     * reference to the unique key. If the key already exists, 
-     * the previous key reference is returned instead, in order
-     * guarantee that key references remain unique.
-     * 
-     * @param key The new key.
-     */
-    public String put (String key, Object value ) {
-
-        int bucket = hash(key) % fTableSize;
-        Entry entry = search (key, bucket);
-
-        if (entry !=null) {
-            return entry.key;
-        }
-        // create new entry
-        entry = new Entry(key, value, fBuckets[bucket]);
-        fBuckets[bucket] = entry;
-        return key;
-
-    } 
-
-    /**
-     * Adds the specified key to the key table and returns a
-     * reference to the unique key. If the key already exists, 
-     * the previous key reference is returned instead, in order
-     * guarantee that key references remain unique.
-     * 
-     * @param qName The QName which is the key
-     * @param value 
-     */
-    public String put(QName qName, Object value) {
-
-        String key = (qName.uri == null)?qName.localpart:qName.uri.concat(qName.localpart);
-
-        // search for identical key
-        int bucket = hash(key) % fTableSize;
-        Entry entry = search (key, bucket);
-
-        if (entry !=null) {
-            return entry.key;
-        }
-        // add new entry
-        entry = new Entry(key, value,fBuckets[bucket]);
-        fBuckets[bucket] = entry;
-        return entry.key;
-
-    } 
-
-    public Object get (String key){
-
-        int bucket = hash(key) % fTableSize;
-        Entry entry = search (key, bucket);
-        if (entry !=null) {
-            return entry.value;
-        }
-        return null;
-    }
-
-    // this tries to save a bit of GC'ing by at least keeping the fBuckets array around.
-    public void clear() {
-        for (int i=0; i<fTableSize; i++) {
-            fBuckets[i] = new Entry();
-        }
-    } // clear():  void
-
-    public Object get (QName qName){
-
-        String key = qName.uri.concat(qName.localpart);
-        
-        int bucket = hash(key) % fTableSize;
-        Entry entry = search (key, bucket);
-        
-        if (entry !=null) {
-            return entry.value;
-        }
-        return null;
-    }
-
-    protected Entry search (String key, int bucket){
-        // search for identical key
-        int length = key.length();
-        OUTER: for (Entry entry = fBuckets[bucket]; entry != null; entry = entry.next) {
-            if (entry.characters != null && length == entry.characters.length) {
-                for (int i = 0; i < length; i++) {
-                    if (key.charAt(i) != entry.characters[i]) {
-                        continue OUTER;
-                    }
-                }
-                return entry;
-            }
-        }
-        return null;
-    }
-    /**
-     * Returns a hashcode value for the specified key. The value
-     * returned by this method must be identical to the value returned
-     * by the <code>hash(char[],int,int)</code> method when called
-     * with the character array that comprises the key string.
-     * 
-     * @param key The key to hash.
-     */
-    public int hash(String key) {
-
-        int code = 0;
-        int length = key.length();
-        for (int i = 0; i < length; i++) {
-            code = code * 37 + key.charAt(i);
-        }
-        return code & 0x7FFFFFF;
-
-    } // hash(String):int
-
-
-
-
-    //
-    // Classes
-    //
-
-    /**
-     * This class is a key table entry. Each entry acts as a node
-     * in a linked list.
-     */
-    protected static final class Entry {
-	    /**
-         * key is a name or QName 
-         */
-	    public String key;
-
-	    public Object value;
-	
-        /** 
-         * key characters. This information is duplicated here for
-         * comparison performance.
-         */
-        public char[] characters;
-
-        /** The next entry. */
-        public Entry next;
-
-
-        public Entry() {
-            key = null;
-            value = null;
-            characters = null;
-            next = null;
-        }
-	    public Entry(String key, Object value, Entry next) {
-	        this.key = key;
-	        this.value = value;
-	        this.next = next;
-            characters = new char[key.length()];
-            key.getChars(0, characters.length, characters, 0);
-	    }
-    } // entry
-
-} // class SymbolHash
-
diff --git a/src/org/apache/xerces/util/SymbolTable.java b/src/org/apache/xerces/util/SymbolTable.java
deleted file mode 100644
index 2785cff..0000000
--- a/src/org/apache/xerces/util/SymbolTable.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-/**
- * This class is a symbol table implementation that guarantees that
- * strings used as identifiers are unique references. Multiple calls
- * to <code>addSymbol</code> will always return the same string
- * reference.
- * <p>
- * The symbol table performs the same task as <code>String.intern()</code>
- * with the following differences:
- * <ul>
- *  <li>
- *   A new string object does not need to be created in order to
- *   retrieve a unique reference. Symbols can be added by using
- *   a series of characters in a character array.
- *  </li>
- *  <li>
- *   Users of the symbol table can provide their own symbol hashing
- *   implementation. For example, a simple string hashing algorithm
- *   may fail to produce a balanced set of hashcodes for symbols
- *   that are <em>mostly</em> unique. Strings with similar leading
- *   characters are especially prone to this poor hashing behavior.
- *  </li>
- * </ul>
- *
- * @see SymbolHash
- *
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @author Andy Clark
- *
- * @version $Id$
- */
-public class SymbolTable {
-
-    //
-    // Constants
-    //
-
-    /** Default table size. */
-    protected static final int TABLE_SIZE = 101;
-
-    //
-    // Data
-    //
-
-    /** Buckets. */
-    protected Entry[] fBuckets = new Entry[TABLE_SIZE];
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a symbol table. */
-    public SymbolTable() {
-    }
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Adds the specified symbol to the symbol table and returns a
-     * reference to the unique symbol. If the symbol already exists,
-     * the previous symbol reference is returned instead, in order
-     * guarantee that symbol references remain unique.
-     *
-     * @param symbol The new symbol.
-     */
-    public String addSymbol(String symbol) {
-
-        // search for identical symbol
-        int bucket = hash(symbol) % TABLE_SIZE;
-        int length = symbol.length();
-        OUTER: for (Entry entry = fBuckets[bucket]; entry != null; entry = entry.next) {
-            if (length == entry.characters.length) {
-                for (int i = 0; i < length; i++) {
-                    if (symbol.charAt(i) != entry.characters[i]) {
-                        continue OUTER;
-                    }
-                }
-                return entry.symbol;
-            }
-        }
-
-        // create new entry
-        Entry entry = new Entry(symbol, fBuckets[bucket]);
-        fBuckets[bucket] = entry;
-        return entry.symbol;
-
-    } // addSymbol(String):String
-
-    /**
-     * Adds the specified symbol to the symbol table and returns a
-     * reference to the unique symbol. If the symbol already exists,
-     * the previous symbol reference is returned instead, in order
-     * guarantee that symbol references remain unique.
-     *
-     * @param buffer The buffer containing the new symbol.
-     * @param offset The offset into the buffer of the new symbol.
-     * @param length The length of the new symbol in the buffer.
-     */
-    public String addSymbol(char[] buffer, int offset, int length) {
-
-        // search for identical symbol
-        int bucket = hash(buffer, offset, length) % TABLE_SIZE;
-        OUTER: for (Entry entry = fBuckets[bucket]; entry != null; entry = entry.next) {
-            if (length == entry.characters.length) {
-                for (int i = 0; i < length; i++) {
-                    if (buffer[offset + i] != entry.characters[i]) {
-                        continue OUTER;
-                    }
-                }
-                return entry.symbol;
-            }
-        }
-
-        // add new entry
-        Entry entry = new Entry(buffer, offset, length, fBuckets[bucket]);
-        fBuckets[bucket] = entry;
-        return entry.symbol;
-
-    } // addSymbol(char[],int,int):String
-
-    /**
-     * Returns a hashcode value for the specified symbol. The value
-     * returned by this method must be identical to the value returned
-     * by the <code>hash(char[],int,int)</code> method when called
-     * with the character array that comprises the symbol string.
-     *
-     * @param symbol The symbol to hash.
-     */
-    public int hash(String symbol) {
-
-        int code = 0;
-        int length = symbol.length();
-        for (int i = 0; i < length; i++) {
-            code = code * 37 + symbol.charAt(i);
-        }
-        return code & 0x7FFFFFF;
-
-    } // hash(String):int
-
-    /**
-     * Returns a hashcode value for the specified symbol information.
-     * The value returned by this method must be identical to the value
-     * returned by the <code>hash(String)</code> method when called
-     * with the string object created from the symbol information.
-     *
-     * @param buffer The character buffer containing the symbol.
-     * @param offset The offset into the character buffer of the start
-     *               of the symbol.
-     * @param length The length of the symbol.
-     */
-    public int hash(char[] buffer, int offset, int length) {
-
-        int code = 0;
-        for (int i = 0; i < length; i++) {
-            code = code * 37 + buffer[offset + i];
-        }
-        return code & 0x7FFFFFF;
-
-    } // hash(char[],int,int):int
-
-    /**
-     * Returns true if the symbol table already contains the specified
-     * symbol.
-     *
-     * @param symbol The symbol to look for.
-     */
-    public boolean containsSymbol(String symbol) {
-
-        // search for identical symbol
-        int bucket = hash(symbol) % TABLE_SIZE;
-        int length = symbol.length();
-        OUTER: for (Entry entry = fBuckets[bucket]; entry != null; entry = entry.next) {
-            if (length == entry.characters.length) {
-                for (int i = 0; i < length; i++) {
-                    if (symbol.charAt(i) != entry.characters[i]) {
-                        continue OUTER;
-                    }
-                }
-                return true;
-            }
-        }
-
-        return false;
-
-    } // containsSymbol(String):boolean
-
-    /**
-     * Returns true if the symbol table already contains the specified
-     * symbol.
-     *
-     * @param buffer The buffer containing the symbol to look for.
-     * @param offset The offset into the buffer.
-     * @param length The length of the symbol in the buffer.
-     */
-    public boolean containsSymbol(char[] buffer, int offset, int length) {
-
-        // search for identical symbol
-        int bucket = hash(buffer, offset, length) % TABLE_SIZE;
-        OUTER: for (Entry entry = fBuckets[bucket]; entry != null; entry = entry.next) {
-            if (length == entry.characters.length) {
-                for (int i = 0; i < length; i++) {
-                    if (buffer[offset + i] != entry.characters[i]) {
-                        continue OUTER;
-                    }
-                }
-                return true;
-            }
-        }
-
-        return false;
-
-    } // containsSymbol(char[],int,int):boolean
-
-    //
-    // Classes
-    //
-
-    /**
-     * This class is a symbol table entry. Each entry acts as a node
-     * in a linked list.
-     */
-    protected static final class Entry {
-
-        //
-        // Data
-        //
-
-        /** Symbol. */
-        public String symbol;
-
-        /**
-         * Symbol characters. This information is duplicated here for
-         * comparison performance.
-         */
-        public char[] characters;
-
-        /** The next entry. */
-        public Entry next;
-
-        //
-        // Constructors
-        //
-
-        /**
-         * Constructs a new entry from the specified symbol and next entry
-         * reference.
-         */
-        public Entry(String symbol, Entry next) {
-            this.symbol = symbol.intern();
-            characters = new char[symbol.length()];
-            symbol.getChars(0, characters.length, characters, 0);
-            this.next = next;
-        }
-
-        /**
-         * Constructs a new entry from the specified symbol information and
-         * next entry reference.
-         */
-        public Entry(char[] ch, int offset, int length, Entry next) {
-            characters = new char[length];
-            System.arraycopy(ch, offset, characters, 0, length);
-            symbol = new String(characters).intern();
-            this.next = next;
-        }
-
-    } // class Entry
-
-} // class SymbolTable
diff --git a/src/org/apache/xerces/util/URI.java b/src/org/apache/xerces/util/URI.java
deleted file mode 100644
index 122fa47..0000000
--- a/src/org/apache/xerces/util/URI.java
+++ /dev/null
@@ -1,1408 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, iClick Inc.,
- * http://www.apache.org.  For more information on the Apache Software
- * Foundation, please see <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import java.io.IOException;
-import java.io.Serializable;
-
-/**********************************************************************
-* A class to represent a Uniform Resource Identifier (URI). This class
-* is designed to handle the parsing of URIs and provide access to
-* the various components (scheme, host, port, userinfo, path, query
-* string and fragment) that may constitute a URI.
-* <p>
-* Parsing of a URI specification is done according to the URI
-* syntax described in RFC 2396
-* <http://www.ietf.org/rfc/rfc2396.txt?number=2396>. Every URI consists
-* of a scheme, followed by a colon (':'), followed by a scheme-specific
-* part. For URIs that follow the "generic URI" syntax, the scheme-
-* specific part begins with two slashes ("//") and may be followed
-* by an authority segment (comprised of user information, host, and
-* port), path segment, query segment and fragment. Note that RFC 2396
-* no longer specifies the use of the parameters segment and excludes
-* the "user:password" syntax as part of the authority segment. If
-* "user:password" appears in a URI, the entire user/password string
-* is stored as userinfo.
-* <p>
-* For URIs that do not follow the "generic URI" syntax (e.g. mailto),
-* the entire scheme-specific part is treated as the "path" portion
-* of the URI.
-* <p>
-* Note that, unlike the java.net.URL class, this class does not provide
-* any built-in network access functionality nor does it provide any
-* scheme-specific functionality (for example, it does not know a
-* default port for a specific scheme). Rather, it only knows the
-* grammar and basic set of operations that can be applied to a URI.
-*
-* @version  $Id$
-*
-**********************************************************************/
- public class URI implements Serializable {
-
-  /*******************************************************************
-  * MalformedURIExceptions are thrown in the process of building a URI
-  * or setting fields on a URI when an operation would result in an
-  * invalid URI specification.
-  *
-  ********************************************************************/
-  public static class MalformedURIException extends IOException {
-
-   /******************************************************************
-    * Constructs a <code>MalformedURIException</code> with no specified
-    * detail message.
-    ******************************************************************/
-    public MalformedURIException() {
-      super();
-    }
-
-    /*****************************************************************
-    * Constructs a <code>MalformedURIException</code> with the
-    * specified detail message.
-    *
-    * @param p_msg the detail message.
-    ******************************************************************/
-    public MalformedURIException(String p_msg) {
-      super(p_msg);
-    }
-  }
-
-  /** reserved characters */
-  private static final String RESERVED_CHARACTERS = ";/?:@&=+$,";
-
-  /** URI punctuation mark characters - these, combined with
-      alphanumerics, constitute the "unreserved" characters */
-  private static final String MARK_CHARACTERS = "-_.!~*'() ";
-
-  /** scheme can be composed of alphanumerics and these characters */
-  private static final String SCHEME_CHARACTERS = "+-.";
-
-  /** userinfo can be composed of unreserved, escaped and these
-      characters */
-  private static final String USERINFO_CHARACTERS = ";:&=+$,";
-
-  /** Stores the scheme (usually the protocol) for this URI. */
-  private String m_scheme = null;
-
-  /** If specified, stores the userinfo for this URI; otherwise null */
-  private String m_userinfo = null;
-
-  /** If specified, stores the host for this URI; otherwise null */
-  private String m_host = null;
-
-  /** If specified, stores the port for this URI; otherwise -1 */
-  private int m_port = -1;
-
-  /** If specified, stores the path for this URI; otherwise null */
-  private String m_path = null;
-
-  /** If specified, stores the query string for this URI; otherwise
-      null.  */
-  private String m_queryString = null;
-
-  /** If specified, stores the fragment for this URI; otherwise null */
-  private String m_fragment = null;
-
-  private static boolean DEBUG = false;
-
-  /**
-  * Construct a new and uninitialized URI.
-  */
-  public URI() {
-  }
-
- /**
-  * Construct a new URI from another URI. All fields for this URI are
-  * set equal to the fields of the URI passed in.
-  *
-  * @param p_other the URI to copy (cannot be null)
-  */
-  public URI(URI p_other) {
-    initialize(p_other);
-  }
-
- /**
-  * Construct a new URI from a URI specification string. If the
-  * specification follows the "generic URI" syntax, (two slashes
-  * following the first colon), the specification will be parsed
-  * accordingly - setting the scheme, userinfo, host,port, path, query
-  * string and fragment fields as necessary. If the specification does
-  * not follow the "generic URI" syntax, the specification is parsed
-  * into a scheme and scheme-specific part (stored as the path) only.
-  *
-  * @param p_uriSpec the URI specification string (cannot be null or
-  *                  empty)
-  *
-  * @exception MalformedURIException if p_uriSpec violates any syntax
-  *                                   rules
-  */
-  public URI(String p_uriSpec) throws MalformedURIException {
-    this((URI)null, p_uriSpec);
-  }
-
- /**
-  * Construct a new URI from a base URI and a URI specification string.
-  * The URI specification string may be a relative URI.
-  *
-  * @param p_base the base URI (cannot be null if p_uriSpec is null or
-  *               empty)
-  * @param p_uriSpec the URI specification string (cannot be null or
-  *                  empty if p_base is null)
-  *
-  * @exception MalformedURIException if p_uriSpec violates any syntax
-  *                                  rules
-  */
-  public URI(URI p_base, String p_uriSpec) throws MalformedURIException {
-    initialize(p_base, p_uriSpec);
-  }
-
- /**
-  * Construct a new URI that does not follow the generic URI syntax.
-  * Only the scheme and scheme-specific part (stored as the path) are
-  * initialized.
-  *
-  * @param p_scheme the URI scheme (cannot be null or empty)
-  * @param p_schemeSpecificPart the scheme-specific part (cannot be
-  *                             null or empty)
-  *
-  * @exception MalformedURIException if p_scheme violates any
-  *                                  syntax rules
-  */
-  public URI(String p_scheme, String p_schemeSpecificPart)
-             throws MalformedURIException {
-    if (p_scheme == null || p_scheme.trim().length() == 0) {
-      throw new MalformedURIException(
-            "Cannot construct URI with null/empty scheme!");
-    }
-    if (p_schemeSpecificPart == null ||
-        p_schemeSpecificPart.trim().length() == 0) {
-      throw new MalformedURIException(
-          "Cannot construct URI with null/empty scheme-specific part!");
-    }
-    setScheme(p_scheme);
-    setPath(p_schemeSpecificPart);
-  }
-
- /**
-  * Construct a new URI that follows the generic URI syntax from its
-  * component parts. Each component is validated for syntax and some
-  * basic semantic checks are performed as well.  See the individual
-  * setter methods for specifics.
-  *
-  * @param p_scheme the URI scheme (cannot be null or empty)
-  * @param p_host the hostname or IPv4 address for the URI
-  * @param p_path the URI path - if the path contains '?' or '#',
-  *               then the query string and/or fragment will be
-  *               set from the path; however, if the query and
-  *               fragment are specified both in the path and as
-  *               separate parameters, an exception is thrown
-  * @param p_queryString the URI query string (cannot be specified
-  *                      if path is null)
-  * @param p_fragment the URI fragment (cannot be specified if path
-  *                   is null)
-  *
-  * @exception MalformedURIException if any of the parameters violates
-  *                                  syntax rules or semantic rules
-  */
-  public URI(String p_scheme, String p_host, String p_path,
-             String p_queryString, String p_fragment)
-         throws MalformedURIException {
-    this(p_scheme, null, p_host, -1, p_path, p_queryString, p_fragment);
-  }
-
- /**
-  * Construct a new URI that follows the generic URI syntax from its
-  * component parts. Each component is validated for syntax and some
-  * basic semantic checks are performed as well.  See the individual
-  * setter methods for specifics.
-  *
-  * @param p_scheme the URI scheme (cannot be null or empty)
-  * @param p_userinfo the URI userinfo (cannot be specified if host
-  *                   is null)
-  * @param p_host the hostname or IPv4 address for the URI
-  * @param p_port the URI port (may be -1 for "unspecified"; cannot
-  *               be specified if host is null)
-  * @param p_path the URI path - if the path contains '?' or '#',
-  *               then the query string and/or fragment will be
-  *               set from the path; however, if the query and
-  *               fragment are specified both in the path and as
-  *               separate parameters, an exception is thrown
-  * @param p_queryString the URI query string (cannot be specified
-  *                      if path is null)
-  * @param p_fragment the URI fragment (cannot be specified if path
-  *                   is null)
-  *
-  * @exception MalformedURIException if any of the parameters violates
-  *                                  syntax rules or semantic rules
-  */
-  public URI(String p_scheme, String p_userinfo,
-             String p_host, int p_port, String p_path,
-             String p_queryString, String p_fragment)
-         throws MalformedURIException {
-    if (p_scheme == null || p_scheme.trim().length() == 0) {
-      throw new MalformedURIException("Scheme is required!");
-    }
-
-    if (p_host == null) {
-      if (p_userinfo != null) {
-        throw new MalformedURIException(
-             "Userinfo may not be specified if host is not specified!");
-      }
-      if (p_port != -1) {
-        throw new MalformedURIException(
-             "Port may not be specified if host is not specified!");
-      }
-    }
-
-    if (p_path != null) {
-      if (p_path.indexOf('?') != -1 && p_queryString != null) {
-        throw new MalformedURIException(
-          "Query string cannot be specified in path and query string!");
-      }
-
-      if (p_path.indexOf('#') != -1 && p_fragment != null) {
-        throw new MalformedURIException(
-          "Fragment cannot be specified in both the path and fragment!");
-      }
-    }
-
-    setScheme(p_scheme);
-    setHost(p_host);
-    setPort(p_port);
-    setUserinfo(p_userinfo);
-    setPath(p_path);
-    setQueryString(p_queryString);
-    setFragment(p_fragment);
-  }
-
- /**
-  * Initialize all fields of this URI from another URI.
-  *
-  * @param p_other the URI to copy (cannot be null)
-  */
-  private void initialize(URI p_other) {
-    m_scheme = p_other.getScheme();
-    m_userinfo = p_other.getUserinfo();
-    m_host = p_other.getHost();
-    m_port = p_other.getPort();
-    m_path = p_other.getPath();
-    m_queryString = p_other.getQueryString();
-    m_fragment = p_other.getFragment();
-  }
-
- /**
-  * Initializes this URI from a base URI and a URI specification string.
-  * See RFC 2396 Section 4 and Appendix B for specifications on parsing
-  * the URI and Section 5 for specifications on resolving relative URIs
-  * and relative paths.
-  *
-  * @param p_base the base URI (may be null if p_uriSpec is an absolute
-  *               URI)
-  * @param p_uriSpec the URI spec string which may be an absolute or
-  *                  relative URI (can only be null/empty if p_base
-  *                  is not null)
-  *
-  * @exception MalformedURIException if p_base is null and p_uriSpec
-  *                                  is not an absolute URI or if
-  *                                  p_uriSpec violates syntax rules
-  */
-  private void initialize(URI p_base, String p_uriSpec)
-                         throws MalformedURIException {
-    if (p_base == null &&
-        (p_uriSpec == null || p_uriSpec.trim().length() == 0)) {
-      throw new MalformedURIException(
-                  "Cannot initialize URI with empty parameters.");
-      }
-
-    // just make a copy of the base if spec is empty
-    if (p_uriSpec == null || p_uriSpec.trim().length() == 0) {
-      initialize(p_base);
-      return;
-    }
-
-    String uriSpec = p_uriSpec.trim();
-    int uriSpecLen = uriSpec.length();
-    int index = 0;
-
-    // Check for scheme, which must be before '/', '?' or '#'. Also handle
-    // names with DOS drive letters ('D:'), so 1-character schemes are not
-    // allowed.
-    int colonIdx    = uriSpec.indexOf(':');
-    int slashIdx    = uriSpec.indexOf('/');
-    int queryIdx    = uriSpec.indexOf('?');
-    int fragmentIdx = uriSpec.indexOf('#');
-
-    if ((colonIdx < 2) ||
-        (colonIdx > slashIdx && slashIdx != -1) ||
-        (colonIdx > queryIdx && queryIdx != -1) ||
-        (colonIdx > fragmentIdx && fragmentIdx != -1)) {
-      // A standalone base is a valid URI according to spec
-      if (p_base == null && fragmentIdx != 0 ) {
-        throw new MalformedURIException("No scheme found in URI.");
-      }
-    }
-    else {
-      initializeScheme(uriSpec);
-      index = m_scheme.length()+1;
-    }
-
-    // two slashes means generic URI syntax, so we get the authority
-    if (((index+1) < uriSpecLen) &&
-        (uriSpec.substring(index).startsWith("//"))) {
-      index += 2;
-      int startPos = index;
-
-      // get authority - everything up to path, query or fragment
-      char testChar = '\0';
-      while (index < uriSpecLen) {
-        testChar = uriSpec.charAt(index);
-        if (testChar == '/' || testChar == '?' || testChar == '#') {
-          break;
-        }
-        index++;
-      }
-
-      // if we found authority, parse it out, otherwise we set the
-      // host to empty string
-      if (index > startPos) {
-        initializeAuthority(uriSpec.substring(startPos, index));
-      }
-      else {
-        m_host = "";
-      }
-    }
-
-    initializePath(uriSpec.substring(index));
-
-    // Resolve relative URI to base URI - see RFC 2396 Section 5.2
-    // In some cases, it might make more sense to throw an exception
-    // (when scheme is specified is the string spec and the base URI
-    // is also specified, for example), but we're just following the
-    // RFC specifications
-    if (p_base != null) {
-
-      // check to see if this is the current doc - RFC 2396 5.2 #2
-      // note that this is slightly different from the RFC spec in that
-      // we don't include the check for query string being null
-      // - this handles cases where the urispec is just a query
-      // string or a fragment (e.g. "?y" or "#s") -
-      // see <http://www.ics.uci.edu/~fielding/url/test1.html> which
-      // identified this as a bug in the RFC
-      if (m_path.length() == 0 && m_scheme == null &&
-          m_host == null) {
-        m_scheme = p_base.getScheme();
-        m_userinfo = p_base.getUserinfo();
-        m_host = p_base.getHost();
-        m_port = p_base.getPort();
-        m_path = p_base.getPath();
-
-        if (m_queryString == null) {
-          m_queryString = p_base.getQueryString();
-        }
-        return;
-      }
-
-      // check for scheme - RFC 2396 5.2 #3
-      // if we found a scheme, it means absolute URI, so we're done
-      if (m_scheme == null) {
-        m_scheme = p_base.getScheme();
-      }
-      else {
-        return;
-      }
-
-      // check for authority - RFC 2396 5.2 #4
-      // if we found a host, then we've got a network path, so we're done
-      if (m_host == null) {
-        m_userinfo = p_base.getUserinfo();
-        m_host = p_base.getHost();
-        m_port = p_base.getPort();
-      }
-      else {
-        return;
-      }
-
-      // check for absolute path - RFC 2396 5.2 #5
-      if (m_path.length() > 0 &&
-          m_path.startsWith("/")) {
-        return;
-      }
-
-      // if we get to this point, we need to resolve relative path
-      // RFC 2396 5.2 #6
-      String path = new String();
-      String basePath = p_base.getPath();
-
-      // 6a - get all but the last segment of the base URI path
-      if (basePath != null) {
-        int lastSlash = basePath.lastIndexOf('/');
-        if (lastSlash != -1) {
-          path = basePath.substring(0, lastSlash+1);
-        }
-      }
-
-      // 6b - append the relative URI path
-      path = path.concat(m_path);
-
-      // 6c - remove all "./" where "." is a complete path segment
-      index = -1;
-      while ((index = path.indexOf("/./")) != -1) {
-        path = path.substring(0, index+1).concat(path.substring(index+3));
-      }
-
-      // 6d - remove "." if path ends with "." as a complete path segment
-      if (path.endsWith("/.")) {
-        path = path.substring(0, path.length()-1);
-      }
-
-      // 6e - remove all "<segment>/../" where "<segment>" is a complete
-      // path segment not equal to ".."
-      index = 1;
-      int segIndex = -1;
-      String tempString = null;
-
-      while ((index = path.indexOf("/../", index)) > 0) {
-        tempString = path.substring(0, path.indexOf("/../"));
-        segIndex = tempString.lastIndexOf('/');
-        if (segIndex != -1) {
-          if (!tempString.substring(segIndex++).equals("..")) {
-            path = path.substring(0, segIndex).concat(path.substring(index+4));
-          }
-          else
-            index += 4;
-        }
-        else
-          index += 4;
-      }
-
-      // 6f - remove ending "<segment>/.." where "<segment>" is a
-      // complete path segment
-      if (path.endsWith("/..")) {
-        tempString = path.substring(0, path.length()-3);
-        segIndex = tempString.lastIndexOf('/');
-        if (segIndex != -1) {
-          path = path.substring(0, segIndex+1);
-        }
-      }
-      m_path = path;
-    }
-  }
-
- /**
-  * Initialize the scheme for this URI from a URI string spec.
-  *
-  * @param p_uriSpec the URI specification (cannot be null)
-  *
-  * @exception MalformedURIException if URI does not have a conformant
-  *                                  scheme
-  */
-  private void initializeScheme(String p_uriSpec)
-                 throws MalformedURIException {
-    int uriSpecLen = p_uriSpec.length();
-    int index = 0;
-    String scheme = null;
-    char testChar = '\0';
-
-    while (index < uriSpecLen) {
-      testChar = p_uriSpec.charAt(index);
-      if (testChar == ':' || testChar == '/' ||
-          testChar == '?' || testChar == '#') {
-        break;
-      }
-      index++;
-    }
-    scheme = p_uriSpec.substring(0, index);
-
-    if (scheme.length() == 0) {
-      throw new MalformedURIException("No scheme found in URI.");
-    }
-    else {
-      setScheme(scheme);
-    }
-  }
-
- /**
-  * Initialize the authority (userinfo, host and port) for this
-  * URI from a URI string spec.
-  *
-  * @param p_uriSpec the URI specification (cannot be null)
-  *
-  * @exception MalformedURIException if p_uriSpec violates syntax rules
-  */
-  private void initializeAuthority(String p_uriSpec)
-                 throws MalformedURIException {
-    int index = 0;
-    int start = 0;
-    int end = p_uriSpec.length();
-    char testChar = '\0';
-    String userinfo = null;
-
-    // userinfo is everything up @
-    if (p_uriSpec.indexOf('@', start) != -1) {
-      while (index < end) {
-        testChar = p_uriSpec.charAt(index);
-        if (testChar == '@') {
-          break;
-        }
-        index++;
-      }
-      userinfo = p_uriSpec.substring(start, index);
-      index++;
-    }
-
-    // host is everything up to ':'
-    String host = null;
-    start = index;
-    while (index < end) {
-      testChar = p_uriSpec.charAt(index);
-      if (testChar == ':') {
-        break;
-      }
-      index++;
-    }
-    host = p_uriSpec.substring(start, index);
-    int port = -1;
-    if (host.length() > 0) {
-      // port
-      if (testChar == ':') {
-        index++;
-        start = index;
-        while (index < end) {
-          index++;
-        }
-        String portStr = p_uriSpec.substring(start, index);
-        if (portStr.length() > 0) {
-          for (int i = 0; i < portStr.length(); i++) {
-            if (!isDigit(portStr.charAt(i))) {
-              throw new MalformedURIException(
-                   portStr +
-                   " is invalid. Port should only contain digits!");
-            }
-          }
-          try {
-            port = Integer.parseInt(portStr);
-          }
-          catch (NumberFormatException nfe) {
-            // can't happen
-          }
-        }
-      }
-    }
-    setHost(host);
-    setPort(port);
-    setUserinfo(userinfo);
-  }
-
- /**
-  * Initialize the path for this URI from a URI string spec.
-  *
-  * @param p_uriSpec the URI specification (cannot be null)
-  *
-  * @exception MalformedURIException if p_uriSpec violates syntax rules
-  */
-  private void initializePath(String p_uriSpec)
-                 throws MalformedURIException {
-    if (p_uriSpec == null) {
-      throw new MalformedURIException(
-                "Cannot initialize path from null string!");
-    }
-
-    int index = 0;
-    int start = 0;
-    int end = p_uriSpec.length();
-    char testChar = '\0';
-
-    // path - everything up to query string or fragment
-    while (index < end) {
-      testChar = p_uriSpec.charAt(index);
-      if (testChar == '?' || testChar == '#') {
-        break;
-      }
-      // check for valid escape sequence
-      if (testChar == '%') {
-         if (index+2 >= end ||
-            !isHex(p_uriSpec.charAt(index+1)) ||
-            !isHex(p_uriSpec.charAt(index+2))) {
-          throw new MalformedURIException(
-                "Path contains invalid escape sequence!");
-         }
-      }
-      else if (!isReservedCharacter(testChar) &&
-               !isUnreservedCharacter(testChar)) {
-        throw new MalformedURIException(
-                  "Path contains invalid character: " + testChar);
-      }
-      index++;
-    }
-    m_path = p_uriSpec.substring(start, index);
-
-    // query - starts with ? and up to fragment or end
-    if (testChar == '?') {
-      index++;
-      start = index;
-      while (index < end) {
-        testChar = p_uriSpec.charAt(index);
-        if (testChar == '#') {
-          break;
-        }
-        if (testChar == '%') {
-           if (index+2 >= end ||
-              !isHex(p_uriSpec.charAt(index+1)) ||
-              !isHex(p_uriSpec.charAt(index+2))) {
-            throw new MalformedURIException(
-                    "Query string contains invalid escape sequence!");
-           }
-        }
-        else if (!isReservedCharacter(testChar) &&
-                 !isUnreservedCharacter(testChar)) {
-          throw new MalformedURIException(
-                "Query string contains invalid character:" + testChar);
-        }
-        index++;
-      }
-      m_queryString = p_uriSpec.substring(start, index);
-    }
-
-    // fragment - starts with #
-    if (testChar == '#') {
-      index++;
-      start = index;
-      while (index < end) {
-        testChar = p_uriSpec.charAt(index);
-
-        if (testChar == '%') {
-           if (index+2 >= end ||
-              !isHex(p_uriSpec.charAt(index+1)) ||
-              !isHex(p_uriSpec.charAt(index+2))) {
-            throw new MalformedURIException(
-                    "Fragment contains invalid escape sequence!");
-           }
-        }
-        else if (!isReservedCharacter(testChar) &&
-                 !isUnreservedCharacter(testChar)) {
-          throw new MalformedURIException(
-                "Fragment contains invalid character:"+testChar);
-        }
-        index++;
-      }
-      m_fragment = p_uriSpec.substring(start, index);
-    }
-  }
-
- /**
-  * Get the scheme for this URI.
-  *
-  * @return the scheme for this URI
-  */
-  public String getScheme() {
-    return m_scheme;
-  }
-
- /**
-  * Get the scheme-specific part for this URI (everything following the
-  * scheme and the first colon). See RFC 2396 Section 5.2 for spec.
-  *
-  * @return the scheme-specific part for this URI
-  */
-  public String getSchemeSpecificPart() {
-    StringBuffer schemespec = new StringBuffer();
-
-    if (m_userinfo != null || m_host != null || m_port != -1) {
-      schemespec.append("//");
-    }
-
-    if (m_userinfo != null) {
-      schemespec.append(m_userinfo);
-      schemespec.append('@');
-    }
-
-    if (m_host != null) {
-      schemespec.append(m_host);
-    }
-
-    if (m_port != -1) {
-      schemespec.append(':');
-      schemespec.append(m_port);
-    }
-
-    if (m_path != null) {
-      schemespec.append((m_path));
-    }
-
-    if (m_queryString != null) {
-      schemespec.append('?');
-      schemespec.append(m_queryString);
-    }
-
-    if (m_fragment != null) {
-      schemespec.append('#');
-      schemespec.append(m_fragment);
-    }
-
-    return schemespec.toString();
-  }
-
- /**
-  * Get the userinfo for this URI.
-  *
-  * @return the userinfo for this URI (null if not specified).
-  */
-  public String getUserinfo() {
-    return m_userinfo;
-  }
-
-  /**
-  * Get the host for this URI.
-  *
-  * @return the host for this URI (null if not specified).
-  */
-  public String getHost() {
-    return m_host;
-  }
-
- /**
-  * Get the port for this URI.
-  *
-  * @return the port for this URI (-1 if not specified).
-  */
-  public int getPort() {
-    return m_port;
-  }
-
- /**
-  * Get the path for this URI (optionally with the query string and
-  * fragment).
-  *
-  * @param p_includeQueryString if true (and query string is not null),
-  *                             then a "?" followed by the query string
-  *                             will be appended
-  * @param p_includeFragment if true (and fragment is not null),
-  *                             then a "#" followed by the fragment
-  *                             will be appended
-  *
-  * @return the path for this URI possibly including the query string
-  *         and fragment
-  */
-  public String getPath(boolean p_includeQueryString,
-                        boolean p_includeFragment) {
-    StringBuffer pathString = new StringBuffer(m_path);
-
-    if (p_includeQueryString && m_queryString != null) {
-      pathString.append('?');
-      pathString.append(m_queryString);
-    }
-
-    if (p_includeFragment && m_fragment != null) {
-      pathString.append('#');
-      pathString.append(m_fragment);
-    }
-    return pathString.toString();
-  }
-
- /**
-  * Get the path for this URI. Note that the value returned is the path
-  * only and does not include the query string or fragment.
-  *
-  * @return the path for this URI.
-  */
-  public String getPath() {
-    return m_path;
-  }
-
- /**
-  * Get the query string for this URI.
-  *
-  * @return the query string for this URI. Null is returned if there
-  *         was no "?" in the URI spec, empty string if there was a
-  *         "?" but no query string following it.
-  */
-  public String getQueryString() {
-    return m_queryString;
-  }
-
- /**
-  * Get the fragment for this URI.
-  *
-  * @return the fragment for this URI. Null is returned if there
-  *         was no "#" in the URI spec, empty string if there was a
-  *         "#" but no fragment following it.
-  */
-  public String getFragment() {
-    return m_fragment;
-  }
-
- /**
-  * Set the scheme for this URI. The scheme is converted to lowercase
-  * before it is set.
-  *
-  * @param p_scheme the scheme for this URI (cannot be null)
-  *
-  * @exception MalformedURIException if p_scheme is not a conformant
-  *                                  scheme name
-  */
-  public void setScheme(String p_scheme) throws MalformedURIException {
-    if (p_scheme == null) {
-      throw new MalformedURIException(
-                "Cannot set scheme from null string!");
-    }
-    if (!isConformantSchemeName(p_scheme)) {
-      throw new MalformedURIException("The scheme is not conformant.");
-    }
-
-    m_scheme = p_scheme.toLowerCase();
-  }
-
- /**
-  * Set the userinfo for this URI. If a non-null value is passed in and
-  * the host value is null, then an exception is thrown.
-  *
-  * @param p_userinfo the userinfo for this URI
-  *
-  * @exception MalformedURIException if p_userinfo contains invalid
-  *                                  characters
-  */
-  public void setUserinfo(String p_userinfo) throws MalformedURIException {
-    if (p_userinfo == null) {
-      m_userinfo = null;
-    }
-    else {
-      if (m_host == null) {
-        throw new MalformedURIException(
-                     "Userinfo cannot be set when host is null!");
-      }
-
-      // userinfo can contain alphanumerics, mark characters, escaped
-      // and ';',':','&','=','+','$',','
-      int index = 0;
-      int end = p_userinfo.length();
-      char testChar = '\0';
-      while (index < end) {
-        testChar = p_userinfo.charAt(index);
-        if (testChar == '%') {
-          if (index+2 >= end ||
-              !isHex(p_userinfo.charAt(index+1)) ||
-              !isHex(p_userinfo.charAt(index+2))) {
-            throw new MalformedURIException(
-                  "Userinfo contains invalid escape sequence!");
-          }
-        }
-        else if (!isUnreservedCharacter(testChar) &&
-                 USERINFO_CHARACTERS.indexOf(testChar) == -1) {
-          throw new MalformedURIException(
-                  "Userinfo contains invalid character:"+testChar);
-        }
-        index++;
-      }
-    }
-    m_userinfo = p_userinfo;
-  }
-
-  /**
-  * Set the host for this URI. If null is passed in, the userinfo
-  * field is also set to null and the port is set to -1.
-  *
-  * @param p_host the host for this URI
-  *
-  * @exception MalformedURIException if p_host is not a valid IP
-  *                                  address or DNS hostname.
-  */
-  public void setHost(String p_host) throws MalformedURIException {
-    if (p_host == null || p_host.trim().length() == 0) {
-      m_host = p_host;
-      m_userinfo = null;
-      m_port = -1;
-    }
-    else if (!isWellFormedAddress(p_host)) {
-      throw new MalformedURIException("Host is not a well formed address!");
-    }
-    m_host = p_host;
-  }
-
- /**
-  * Set the port for this URI. -1 is used to indicate that the port is
-  * not specified, otherwise valid port numbers are  between 0 and 65535.
-  * If a valid port number is passed in and the host field is null,
-  * an exception is thrown.
-  *
-  * @param p_port the port number for this URI
-  *
-  * @exception MalformedURIException if p_port is not -1 and not a
-  *                                  valid port number
-  */
-  public void setPort(int p_port) throws MalformedURIException {
-    if (p_port >= 0 && p_port <= 65535) {
-      if (m_host == null) {
-        throw new MalformedURIException(
-                      "Port cannot be set when host is null!");
-      }
-    }
-    else if (p_port != -1) {
-      throw new MalformedURIException("Invalid port number!");
-    }
-    m_port = p_port;
-  }
-
- /**
-  * Set the path for this URI. If the supplied path is null, then the
-  * query string and fragment are set to null as well. If the supplied
-  * path includes a query string and/or fragment, these fields will be
-  * parsed and set as well. Note that, for URIs following the "generic
-  * URI" syntax, the path specified should start with a slash.
-  * For URIs that do not follow the generic URI syntax, this method
-  * sets the scheme-specific part.
-  *
-  * @param p_path the path for this URI (may be null)
-  *
-  * @exception MalformedURIException if p_path contains invalid
-  *                                  characters
-  */
-  public void setPath(String p_path) throws MalformedURIException {
-    if (p_path == null) {
-      m_path = null;
-      m_queryString = null;
-      m_fragment = null;
-    }
-    else {
-      initializePath(p_path);
-    }
-  }
-
- /**
-  * Append to the end of the path of this URI. If the current path does
-  * not end in a slash and the path to be appended does not begin with
-  * a slash, a slash will be appended to the current path before the
-  * new segment is added. Also, if the current path ends in a slash
-  * and the new segment begins with a slash, the extra slash will be
-  * removed before the new segment is appended.
-  *
-  * @param p_addToPath the new segment to be added to the current path
-  *
-  * @exception MalformedURIException if p_addToPath contains syntax
-  *                                  errors
-  */
-  public void appendPath(String p_addToPath)
-                         throws MalformedURIException {
-    if (p_addToPath == null || p_addToPath.trim().length() == 0) {
-      return;
-    }
-
-    if (!isURIString(p_addToPath)) {
-      throw new MalformedURIException(
-              "Path contains invalid character!");
-    }
-
-    if (m_path == null || m_path.trim().length() == 0) {
-      if (p_addToPath.startsWith("/")) {
-        m_path = p_addToPath;
-      }
-      else {
-        m_path = "/" + p_addToPath;
-      }
-    }
-    else if (m_path.endsWith("/")) {
-      if (p_addToPath.startsWith("/")) {
-        m_path = m_path.concat(p_addToPath.substring(1));
-      }
-      else {
-        m_path = m_path.concat(p_addToPath);
-      }
-    }
-    else {
-      if (p_addToPath.startsWith("/")) {
-        m_path = m_path.concat(p_addToPath);
-      }
-      else {
-        m_path = m_path.concat("/" + p_addToPath);
-      }
-    }
-  }
-
- /**
-  * Set the query string for this URI. A non-null value is valid only
-  * if this is an URI conforming to the generic URI syntax and
-  * the path value is not null.
-  *
-  * @param p_queryString the query string for this URI
-  *
-  * @exception MalformedURIException if p_queryString is not null and this
-  *                                  URI does not conform to the generic
-  *                                  URI syntax or if the path is null
-  */
-  public void setQueryString(String p_queryString) throws MalformedURIException {
-    if (p_queryString == null) {
-      m_queryString = null;
-    }
-    else if (!isGenericURI()) {
-      throw new MalformedURIException(
-              "Query string can only be set for a generic URI!");
-    }
-    else if (getPath() == null) {
-      throw new MalformedURIException(
-              "Query string cannot be set when path is null!");
-    }
-    else if (!isURIString(p_queryString)) {
-      throw new MalformedURIException(
-              "Query string contains invalid character!");
-    }
-    else {
-      m_queryString = p_queryString;
-    }
-  }
-
- /**
-  * Set the fragment for this URI. A non-null value is valid only
-  * if this is a URI conforming to the generic URI syntax and
-  * the path value is not null.
-  *
-  * @param p_fragment the fragment for this URI
-  *
-  * @exception MalformedURIException if p_fragment is not null and this
-  *                                  URI does not conform to the generic
-  *                                  URI syntax or if the path is null
-  */
-  public void setFragment(String p_fragment) throws MalformedURIException {
-    if (p_fragment == null) {
-      m_fragment = null;
-    }
-    else if (!isGenericURI()) {
-      throw new MalformedURIException(
-         "Fragment can only be set for a generic URI!");
-    }
-    else if (getPath() == null) {
-      throw new MalformedURIException(
-              "Fragment cannot be set when path is null!");
-    }
-    else if (!isURIString(p_fragment)) {
-      throw new MalformedURIException(
-              "Fragment contains invalid character!");
-    }
-    else {
-      m_fragment = p_fragment;
-    }
-  }
-
- /**
-  * Determines if the passed-in Object is equivalent to this URI.
-  *
-  * @param p_test the Object to test for equality.
-  *
-  * @return true if p_test is a URI with all values equal to this
-  *         URI, false otherwise
-  */
-  public boolean equals(Object p_test) {
-    if (p_test instanceof URI) {
-      URI testURI = (URI) p_test;
-      if (((m_scheme == null && testURI.m_scheme == null) ||
-           (m_scheme != null && testURI.m_scheme != null &&
-            m_scheme.equals(testURI.m_scheme))) &&
-          ((m_userinfo == null && testURI.m_userinfo == null) ||
-           (m_userinfo != null && testURI.m_userinfo != null &&
-            m_userinfo.equals(testURI.m_userinfo))) &&
-          ((m_host == null && testURI.m_host == null) ||
-           (m_host != null && testURI.m_host != null &&
-            m_host.equals(testURI.m_host))) &&
-            m_port == testURI.m_port &&
-          ((m_path == null && testURI.m_path == null) ||
-           (m_path != null && testURI.m_path != null &&
-            m_path.equals(testURI.m_path))) &&
-          ((m_queryString == null && testURI.m_queryString == null) ||
-           (m_queryString != null && testURI.m_queryString != null &&
-            m_queryString.equals(testURI.m_queryString))) &&
-          ((m_fragment == null && testURI.m_fragment == null) ||
-           (m_fragment != null && testURI.m_fragment != null &&
-            m_fragment.equals(testURI.m_fragment)))) {
-        return true;
-      }
-    }
-    return false;
-  }
-
- /**
-  * Get the URI as a string specification. See RFC 2396 Section 5.2.
-  *
-  * @return the URI string specification
-  */
-  public String toString() {
-    StringBuffer uriSpecString = new StringBuffer();
-
-    if (m_scheme != null) {
-      uriSpecString.append(m_scheme);
-      uriSpecString.append(':');
-    }
-    uriSpecString.append(getSchemeSpecificPart());
-    return uriSpecString.toString();
-  }
-
- /**
-  * Get the indicator as to whether this URI uses the "generic URI"
-  * syntax.
-  *
-  * @return true if this URI uses the "generic URI" syntax, false
-  *         otherwise
-  */
-  public boolean isGenericURI() {
-    // presence of the host (whether valid or empty) means
-    // double-slashes which means generic uri
-    return (m_host != null);
-  }
-
- /**
-  * Determine whether a scheme conforms to the rules for a scheme name.
-  * A scheme is conformant if it starts with an alphanumeric, and
-  * contains only alphanumerics, '+','-' and '.'.
-  *
-  * @return true if the scheme is conformant, false otherwise
-  */
-  public static boolean isConformantSchemeName(String p_scheme) {
-    if (p_scheme == null || p_scheme.trim().length() == 0) {
-      return false;
-    }
-
-    if (!isAlpha(p_scheme.charAt(0))) {
-      return false;
-    }
-
-    char testChar;
-    for (int i = 1; i < p_scheme.length(); i++) {
-      testChar = p_scheme.charAt(i);
-      if (!isAlphanum(testChar) &&
-          SCHEME_CHARACTERS.indexOf(testChar) == -1) {
-        return false;
-      }
-    }
-
-    return true;
-  }
-
- /**
-  * Determine whether a string is syntactically capable of representing
-  * a valid IPv4 address or the domain name of a network host. A valid
-  * IPv4 address consists of four decimal digit groups separated by a
-  * '.'. A hostname consists of domain labels (each of which must
-  * begin and end with an alphanumeric but may contain '-') separated
-  & by a '.'. See RFC 2396 Section 3.2.2.
-  *
-  * @return true if the string is a syntactically valid IPv4 address
-  *              or hostname
-  */
-  public static boolean isWellFormedAddress(String p_address) {
-    if (p_address == null) {
-      return false;
-    }
-
-    String address = p_address.trim();
-    int addrLength = address.length();
-    if (addrLength == 0 || addrLength > 255) {
-      return false;
-    }
-
-    if (address.startsWith(".") || address.startsWith("-")) {
-      return false;
-    }
-
-    // rightmost domain label starting with digit indicates IP address
-    // since top level domain label can only start with an alpha
-    // see RFC 2396 Section 3.2.2
-    int index = address.lastIndexOf('.');
-    if (address.endsWith(".")) {
-      index = address.substring(0, index).lastIndexOf('.');
-    }
-
-    if (index+1 < addrLength && isDigit(p_address.charAt(index+1))) {
-      char testChar;
-      int numDots = 0;
-
-      // make sure that 1) we see only digits and dot separators, 2) that
-      // any dot separator is preceded and followed by a digit and
-      // 3) that we find 3 dots
-      for (int i = 0; i < addrLength; i++) {
-        testChar = address.charAt(i);
-        if (testChar == '.') {
-          if (!isDigit(address.charAt(i-1)) ||
-              (i+1 < addrLength && !isDigit(address.charAt(i+1)))) {
-            return false;
-          }
-          numDots++;
-        }
-        else if (!isDigit(testChar)) {
-          return false;
-        }
-      }
-      if (numDots != 3) {
-        return false;
-      }
-    }
-    else {
-      // domain labels can contain alphanumerics and '-"
-      // but must start and end with an alphanumeric
-      char testChar;
-
-      for (int i = 0; i < addrLength; i++) {
-        testChar = address.charAt(i);
-        if (testChar == '.') {
-          if (!isAlphanum(address.charAt(i-1))) {
-            return false;
-          }
-          if (i+1 < addrLength && !isAlphanum(address.charAt(i+1))) {
-            return false;
-          }
-        }
-        else if (!isAlphanum(testChar) && testChar != '-') {
-          return false;
-        }
-      }
-    }
-    return true;
-  }
-
-
- /**
-  * Determine whether a char is a digit.
-  *
-  * @return true if the char is betweeen '0' and '9', false otherwise
-  */
-  private static boolean isDigit(char p_char) {
-    return p_char >= '0' && p_char <= '9';
-  }
-
- /**
-  * Determine whether a character is a hexadecimal character.
-  *
-  * @return true if the char is betweeen '0' and '9', 'a' and 'f'
-  *         or 'A' and 'F', false otherwise
-  */
-  private static boolean isHex(char p_char) {
-    return (isDigit(p_char) ||
-            (p_char >= 'a' && p_char <= 'f') ||
-            (p_char >= 'A' && p_char <= 'F'));
-  }
-
- /**
-  * Determine whether a char is an alphabetic character: a-z or A-Z
-  *
-  * @return true if the char is alphabetic, false otherwise
-  */
-  private static boolean isAlpha(char p_char) {
-    return ((p_char >= 'a' && p_char <= 'z') ||
-            (p_char >= 'A' && p_char <= 'Z' ));
-  }
-
- /**
-  * Determine whether a char is an alphanumeric: 0-9, a-z or A-Z
-  *
-  * @return true if the char is alphanumeric, false otherwise
-  */
-  private static boolean isAlphanum(char p_char) {
-    return (isAlpha(p_char) || isDigit(p_char));
-  }
-
- /**
-  * Determine whether a character is a reserved character:
-  * ';', '/', '?', ':', '@', '&', '=', '+', '$' or ','
-  *
-  * @return true if the string contains any reserved characters
-  */
-  private static boolean isReservedCharacter(char p_char) {
-    return RESERVED_CHARACTERS.indexOf(p_char) != -1;
-  }
-
- /**
-  * Determine whether a char is an unreserved character.
-  *
-  * @return true if the char is unreserved, false otherwise
-  */
-  private static boolean isUnreservedCharacter(char p_char) {
-    return (isAlphanum(p_char) ||
-            MARK_CHARACTERS.indexOf(p_char) != -1);
-  }
-
- /**
-  * Determine whether a given string contains only URI characters (also
-  * called "uric" in RFC 2396). uric consist of all reserved
-  * characters, unreserved characters and escaped characters.
-  *
-  * @return true if the string is comprised of uric, false otherwise
-  */
-  private static boolean isURIString(String p_uric) {
-    if (p_uric == null) {
-      return false;
-    }
-    int end = p_uric.length();
-    char testChar = '\0';
-    for (int i = 0; i < end; i++) {
-      testChar = p_uric.charAt(i);
-      if (testChar == '%') {
-        if (i+2 >= end ||
-            !isHex(p_uric.charAt(i+1)) ||
-            !isHex(p_uric.charAt(i+2))) {
-          return false;
-        }
-        else {
-          i += 2;
-          continue;
-        }
-      }
-      if (isReservedCharacter(testChar) ||
-          isUnreservedCharacter(testChar)) {
-          continue;
-      }
-      else {
-        return false;
-      }
-    }
-    return true;
-  }
-}
diff --git a/src/org/apache/xerces/util/XMLAttributesImpl.java b/src/org/apache/xerces/util/XMLAttributesImpl.java
deleted file mode 100644
index 728456e..0000000
--- a/src/org/apache/xerces/util/XMLAttributesImpl.java
+++ /dev/null
@@ -1,682 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import org.apache.xerces.xni.QName;
-import org.apache.xerces.xni.XMLAttributes;
-import org.apache.xerces.xni.XMLString;
-import org.apache.xerces.xni.Augmentations;
-
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-
-/**
- * The XMLAttributesImpl class is an implementation of the XMLAttributes
- * interface which defines a collection of attributes for an element. 
- * In the parser, the document source would scan the entire start element 
- * and collect the attributes. The attributes are communicated to the
- * document handler in the startElement method.
- * <p>
- * The attributes are read-write so that subsequent stages in the document
- * pipeline can modify the values or change the attributes that are
- * propogated to the next stage.
- *
- * @see org.apache.xerces.xni.XMLDocumentHandler#startElement
- *
- * @author Andy Clark, IBM 
- * @author Elena Litani, IBM
- *
- * @version $Id$
- */
-public class XMLAttributesImpl
-    implements XMLAttributes, AttributeList, Attributes {
-
-    //
-    // Data
-    //
-
-    // features
-
-    /** Namespaces. */
-    protected boolean fNamespaces = true;
-
-    // data
-
-    /** Attribute count. */
-    protected int fLength;
-
-    /** Attribute information. */
-    protected Attribute[] fAttributes = new Attribute[4];
-
-    /** Augmentations information for each attribute 
-        number of augmentations is equal to the number of attributes
-    */
-    // XMLAttributes has no knowledge if any augmentations
-    //          we attached to Augmentations.
-    protected Augmentations[] fAugmentations = new AugmentationsImpl[4];
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLAttributesImpl() {
-        for (int i = 0; i < fAttributes.length; i++) {
-            fAttributes[i] = new Attribute();
-            fAugmentations[i] = new AugmentationsImpl();
-        }
-    } // <init>()
-
-    //
-    // Public methods
-    //
-
-    /** 
-     * Sets whether namespace processing is being performed. This state
-     * is needed to return the correct value from the getLocalName method.
-     *
-     * @param namespaces True if namespace processing is turned on.
-     *
-     * @see #getLocalName
-     */
-    public void setNamespaces(boolean namespaces) {
-        fNamespaces = namespaces;
-    } // setNamespaces(boolean)
-
-    //
-    // XMLAttributes methods
-    //
-
-    /**
-     * Adds an attribute. The attribute's non-normalized value of the
-     * attribute will have the same value as the attribute value until
-     * set using the <code>setNonNormalizedValue</code> method. Also,
-     * the added attribute will be marked as specified in the XML instance
-     * document unless set otherwise using the <code>setSpecified</code>
-     * method.
-     * <p>
-     * <strong>Note:</strong> If an attribute of the same name already
-     * exists, the old values for the attribute are replaced by the new
-     * values.
-     * 
-     * @param attrName  The attribute name.
-     * @param attrType  The attribute type. The type name is determined by
-     *                  the type specified for this attribute in the DTD.
-     *                  For example: "CDATA", "ID", "NMTOKEN", etc. However,
-     *                  attributes of type enumeration will have the type
-     *                  value specified as the pipe ('|') separated list of
-     *                  the enumeration values prefixed by an open 
-     *                  parenthesis and suffixed by a close parenthesis.
-     *                  For example: "(true|false)".
-     * @param attrValue The attribute value.
-     * 
-     * @return Returns the attribute index.
-     *
-     * @see #setNonNormalizedValue
-     * @see #setSpecified
-     */
-    public int addAttribute(QName name, String type, String value) {
-
-        // find attribute; create, if necessary
-        int index = name.uri != null && !name.uri.equals("")
-                  ? getIndex(name.uri, name.localpart)
-                  : getIndex(name.rawname);
-        if (index == -1) {
-            index = fLength;
-            if (fLength++ == fAttributes.length) {
-                Attribute[] attributes = new Attribute[fAttributes.length + 4];
-                Augmentations[] augs = new AugmentationsImpl[fAttributes.length +4];
-                System.arraycopy(fAttributes, 0, attributes, 0, fAttributes.length);
-                System.arraycopy(fAugmentations, 0, augs, 0, fAttributes.length);
-                for (int i = fAttributes.length; i < attributes.length; i++) {
-                    attributes[i] = new Attribute();
-                    augs[i] = new AugmentationsImpl();
-                }
-                fAttributes = attributes;
-                fAugmentations = augs;
-            }
-        }
-
-        // clear augmentations
-        fAugmentations[index].clear();
-
-        // set values
-        Attribute attribute = fAttributes[index];
-        attribute.name.setValues(name);
-        attribute.type = type;
-        attribute.value = value;
-        attribute.nonNormalizedValue = value;
-        attribute.specified = false;
-
-        // return
-        return index;
-
-    } // addAttribute(QName,String,XMLString)
-
-    /** 
-     * Removes all of the attributes. This method will also remove all
-     * entities associated to the attributes.
-     */
-    public void removeAllAttributes() {
-        fLength = 0;
-    } // removeAllAttributes()
-
-    /**
-     * Removes the attribute at the specified index.
-     * <p>
-     * <strong>Note:</strong> This operation changes the indexes of all
-     * attributes following the attribute at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     */
-    public void removeAttributeAt(int attrIndex) {
-        if (attrIndex < fLength - 1) {
-            Attribute removedAttr = fAttributes[attrIndex];
-            Augmentations removedAug = fAugmentations[attrIndex];
-            System.arraycopy(fAttributes, attrIndex + 1,
-                             fAttributes, attrIndex, fLength - attrIndex - 1);
-
-            System.arraycopy(fAugmentations, attrIndex + 1,
-                 fAugmentations, attrIndex, fLength - attrIndex - 1);
-
-            // Make the discarded Attribute object available for re-use
-            // by tucking it after the Attributes that are still in use
-            fAttributes[fLength-1] = removedAttr;
-
-            fAugmentations[fLength-1] = removedAug;
-        }
-        fLength--;
-    } // removeAttributeAt(int)
-
-    /**
-     * Sets the name of the attribute at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrName  The new attribute name.
-     */
-    public void setName(int attrIndex, QName attrName) {
-        fAttributes[attrIndex].name.setValues(attrName);
-    } // setName(int,QName)
-
-    /**
-     * Sets the fields in the given QName structure with the values
-     * of the attribute name at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrName  The attribute name structure to fill in.
-     */
-    public void getName(int attrIndex, QName attrName) {
-        attrName.setValues(fAttributes[attrIndex].name);
-    } // getName(int,QName)
-
-    /**
-     * Sets the type of the attribute at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrType  The attribute type. The type name is determined by
-     *                  the type specified for this attribute in the DTD.
-     *                  For example: "CDATA", "ID", "NMTOKEN", etc. However,
-     *                  attributes of type enumeration will have the type
-     *                  value specified as the pipe ('|') separated list of
-     *                  the enumeration values prefixed by an open 
-     *                  parenthesis and suffixed by a close parenthesis.
-     *                  For example: "(true|false)".
-     */
-    public void setType(int attrIndex, String attrType) {
-        fAttributes[attrIndex].type = attrType;
-    } // setType(int,String)
-
-    /**
-     * Sets the value of the attribute at the specified index. This
-     * method will overwrite the non-normalized value of the attribute.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrValue The new attribute value.
-     *
-     * @see #setNonNormalizedValue
-     */
-    public void setValue(int attrIndex, String attrValue) {
-        Attribute attribute = fAttributes[attrIndex];
-        attribute.value = attrValue;
-        attribute.nonNormalizedValue = attrValue;
-    } // setValue(int,String)
-
-    /**
-     * Sets the non-normalized value of the attribute at the specified
-     * index.
-     *
-     * @param attrIndex The attribute index.
-     * @param attrValue The new non-normalized attribute value.
-     */
-    public void setNonNormalizedValue(int attrIndex, String attrValue) {
-        if (attrValue == null) {
-            attrValue = fAttributes[attrIndex].value;
-        }
-        fAttributes[attrIndex].nonNormalizedValue = attrValue;
-    } // setNonNormalizedValue(int,String)
-
-    /**
-     * Returns the non-normalized value of the attribute at the specified
-     * index. If no non-normalized value is set, this method will return
-     * the same value as the <code>getValue(int)</code> method.
-     *
-     * @param attrIndex The attribute index.
-     */
-    public String getNonNormalizedValue(int attrIndex) {
-        String value = fAttributes[attrIndex].nonNormalizedValue;
-        return value;
-    } // getNonNormalizedValue(int):String
-
-    /**
-     * Sets whether an attribute is specified in the instance document
-     * or not.
-     *
-     * @param attrIndex The attribute index.
-     * @param specified True if the attribute is specified in the instance
-     *                  document.
-     */
-    public void setSpecified(int attrIndex, boolean specified) {
-        fAttributes[attrIndex].specified = specified;
-    } // setSpecified(int,boolean)
-
-    /**
-     * Returns true if the attribute is specified in the instance document.
-     *
-     * @param attrIndex The attribute index.
-     */
-    public boolean isSpecified(int attrIndex) {
-        return fAttributes[attrIndex].specified;
-    } // isSpecified(int):boolean
-
-    //
-    // AttributeList and Attributes methods
-    //
-
-    /**
-     * Return the number of attributes in the list.
-     *
-     * <p>Once you know the number of attributes, you can iterate
-     * through the list.</p>
-     *
-     * @return The number of attributes in the list.
-     */
-    public int getLength() {
-        return fLength;
-    } // getLength():int
-
-    /**
-     * Look up an attribute's type by index.
-     *
-     * <p>The attribute type is one of the strings "CDATA", "ID",
-     * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
-     * or "NOTATION" (always in upper case).</p>
-     *
-     * <p>If the parser has not read a declaration for the attribute,
-     * or if the parser does not report attribute types, then it must
-     * return the value "CDATA" as stated in the XML 1.0 Recommentation
-     * (clause 3.3.3, "Attribute-Value Normalization").</p>
-     *
-     * <p>For an enumerated attribute that is not a notation, the
-     * parser will report the type as "NMTOKEN".</p>
-     *
-     * @param index The attribute index (zero-based).
-     * @return The attribute's type as a string, or null if the
-     *         index is out of range.
-     * @see #getLength
-     */
-    public String getType(int index) {
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        String type = fAttributes[index].type;
-        if(type.indexOf('(') == 0 && type.lastIndexOf(')') == type.length()-1) {
-            return "NMTOKEN";
-        }
-        return type;
-    } // getType(int):String
-
-    /**
-     * Look up an attribute's type by XML 1.0 qualified name.
-     *
-     * <p>See {@link #getType(int) getType(int)} for a description
-     * of the possible types.</p>
-     *
-     * @param qname The XML 1.0 qualified name.
-     * @return The attribute type as a string, or null if the
-     *         attribute is not in the list or if qualified names
-     *         are not available.
-     */
-    public String getType(String qname) {
-        int index = getIndex(qname);
-        return index != -1 ? fAttributes[index].type : null;
-    } // getType(String):String
-
-    /**
-     * Look up an attribute's value by index.
-     *
-     * <p>If the attribute value is a list of tokens (IDREFS,
-     * ENTITIES, or NMTOKENS), the tokens will be concatenated
-     * into a single string with each token separated by a
-     * single space.</p>
-     *
-     * @param index The attribute index (zero-based).
-     * @return The attribute's value as a string, or null if the
-     *         index is out of range.
-     * @see #getLength
-     */
-    public String getValue(int index) {
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        return fAttributes[index].value;
-    } // getValue(int):String
-
-    /**
-     * Look up an attribute's value by XML 1.0 qualified name.
-     *
-     * <p>See {@link #getValue(int) getValue(int)} for a description
-     * of the possible values.</p>
-     *
-     * @param qname The XML 1.0 qualified name.
-     * @return The attribute value as a string, or null if the
-     *         attribute is not in the list or if qualified names
-     *         are not available.
-     */
-    public String getValue(String qname) {
-        int index = getIndex(qname);
-        return index != -1 ? fAttributes[index].value : null;
-    } // getValue(String):String
-
-    //
-    // AttributeList methods
-    //
-
-    /**
-     * Return the name of an attribute in this list (by position).
-     *
-     * <p>The names must be unique: the SAX parser shall not include the
-     * same attribute twice.  Attributes without values (those declared
-     * #IMPLIED without a value specified in the start tag) will be
-     * omitted from the list.</p>
-     *
-     * <p>If the attribute name has a namespace prefix, the prefix
-     * will still be attached.</p>
-     *
-     * @param i The index of the attribute in the list (starting at 0).
-     * @return The name of the indexed attribute, or null
-     *         if the index is out of range.
-     * @see #getLength 
-     */
-    public String getName(int index) {
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        return fAttributes[index].name.rawname;
-    } // getName(int):String
-
-    //
-    // Attributes methods
-    //
-
-    /**
-     * Look up the index of an attribute by XML 1.0 qualified name.
-     *
-     * @param qName The qualified (prefixed) name.
-     * @return The index of the attribute, or -1 if it does not
-     *         appear in the list.
-     */
-    public int getIndex(String qName) {
-        for (int i = 0; i < fLength; i++) {
-            Attribute attribute = fAttributes[i];
-            if (attribute.name.rawname != null &&
-                attribute.name.rawname.equals(qName)) {
-                return i;
-            }
-        }
-        return -1;
-    } // getIndex(String):int
-    
-    /**
-     * Look up the index of an attribute by Namespace name.
-     *
-     * @param uri The Namespace URI, or null if
-     *        the name has no Namespace URI.
-     * @param localName The attribute's local name.
-     * @return The index of the attribute, or -1 if it does not
-     *         appear in the list.
-     */
-    public int getIndex(String uri, String localPart) {
-        for (int i = 0; i < fLength; i++) {
-            Attribute attribute = fAttributes[i];
-            if (attribute.name.localpart != null &&
-                attribute.name.localpart.equals(localPart) &&
-                ((uri==attribute.name.uri) ||
-                (uri!=null && attribute.name.uri!=null && attribute.name.uri.equals(uri))))
-            {
-                return i;
-            }
-        }
-        return -1;
-    } // getIndex(String,String):int
-
-    /**
-     * Look up an attribute's local name by index.
-     *
-     * @param index The attribute index (zero-based).
-     * @return The local name, or the empty string if Namespace
-     *         processing is not being performed, or null
-     *         if the index is out of range.
-     * @see #getLength
-     */
-    public String getLocalName(int index) {
-        if (!fNamespaces) {
-            return "";
-        }
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        return fAttributes[index].name.localpart;
-    } // getLocalName(int):String
-
-    /**
-     * Look up an attribute's XML 1.0 qualified name by index.
-     *
-     * @param index The attribute index (zero-based).
-     * @return The XML 1.0 qualified name, or the empty string
-     *         if none is available, or null if the index
-     *         is out of range.
-     * @see #getLength
-     */
-    public String getQName(int index) {
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        String rawname = fAttributes[index].name.rawname;
-        return rawname != null ? rawname : "";
-    } // getQName(int):String
-
-    /**
-     * Look up an attribute's type by Namespace name.
-     *
-     * <p>See {@link #getType(int) getType(int)} for a description
-     * of the possible types.</p>
-     *
-     * @param uri The Namespace URI, or null if the
-     *        name has no Namespace URI.
-     * @param localName The local name of the attribute.
-     * @return The attribute type as a string, or null if the
-     *         attribute is not in the list or if Namespace
-     *         processing is not being performed.
-     */
-    public String getType(String uri, String localName) {
-        if (!fNamespaces) {
-            return null;
-        }
-        int index = getIndex(uri, localName);
-        return index != -1 ? getType(index) : null;
-    } // getType(String,String):String
-
-    /**
-     * Returns the prefix of the attribute at the specified index.
-     *
-     * @param index The index of the attribute.
-     */
-    public String getPrefix(int index) {
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        String prefix = fAttributes[index].name.prefix;
-        // REVISIT: The empty string is not entered in the symbol table!
-        return prefix != null ? prefix : "";
-    } // getPrefix(int):String
-
-    /**
-     * Look up an attribute's Namespace URI by index.
-     *
-     * @param index The attribute index (zero-based).
-     * @return The Namespace URI
-     * @see #getLength
-     */
-    public String getURI(int index) {
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        String uri = fAttributes[index].name.uri;
-        return uri;                        
-    } // getURI(int):String
-
-    /**
-     * Look up an attribute's value by Namespace name.
-     *
-     * <p>See {@link #getValue(int) getValue(int)} for a description
-     * of the possible values.</p>
-     *
-     * @param uri The Namespace URI, or null if the
-     * @param localName The local name of the attribute.
-     * @return The attribute value as a string, or null if the
-     *         attribute is not in the list.
-     */
-    public String getValue(String uri, String localName) {
-        int index = getIndex(uri, localName);
-        return index != -1 ? getValue(index) : null;
-    } // getValue(String,String):String
-
-
-    /**
-     * Look up an augmentations by Namespace name.
-     *
-     * @param uri The Namespace URI, or null if the
-     * @param localName The local name of the attribute.
-     * @return Augmentations     
-     */
-    public Augmentations getAugmentations (String uri, String localName) {
-        int index = getIndex(uri, localName);
-
-        if (index < 0 || index >= fLength) {
-            return null;
-        }
-        return fAugmentations[index];
-    }
-
-    /**
-     * Look up an augmentations by attributes index.
-     * 
-     * @param attributeIndex The attribute index.
-     * @return Augmentations
-     */
-    public Augmentations getAugmentations (int attributeIndex){
-        if (attributeIndex < 0 || attributeIndex >= fLength) {
-            return null;
-        }
-        return fAugmentations[attributeIndex];
-    }
-    //
-    // Classes
-    //
-
-    /**
-     * Attribute information.
-     *
-     * @author Andy Clark, IBM
-     */
-    static class Attribute {
-        
-        //
-        // Data
-        //
-
-        // basic info
-
-        /** Name. */
-        public QName name = new QName();
-
-        /** Type. */
-        public String type;
-
-        /** Value. */
-        public String value;
-
-        /** Non-normalized value. */
-        public String nonNormalizedValue;
-
-        /** Specified. */
-        public boolean specified;
-
-    } // class Attribute
-
-} // class XMLAttributesImpl
diff --git a/src/org/apache/xerces/util/XMLChar.java b/src/org/apache/xerces/util/XMLChar.java
deleted file mode 100644
index 6e35aa6..0000000
--- a/src/org/apache/xerces/util/XMLChar.java
+++ /dev/null
@@ -1,682 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-/**
- * This class defines the basic XML character properties. The data
- * in this class can be used to verify that a character is a valid
- * XML character or if the character is a space, name start, or name
- * character.
- * <p>
- * A series of convenience methods are supplied to ease the burden
- * of the developer. Because inlining the checks can improve per
- * character performance, the tables of character properties are
- * public. Using the character as an index into the <code>CHARS</code>
- * array and applying the appropriate mask flag (e.g.
- * <code>MASK_VALID</code>), yields the same results as calling the
- * convenience methods. There is one exception: check the comments
- * for the <code>isValid</code> method for details.
- *
- * @author Glenn Marcy, IBM
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @author Andy Clark, IBM
- * @author Eric Ye, IBM
- * @author Arnaud  Le Hors, IBM
- * @author Rahul Srivastava, Sun Microsystems Inc.
- *
- * @version $Id$
- */
-public class XMLChar {
-
-    //
-    // Constants
-    //
-
-    /** Character flags. */
-    public static final byte[] CHARS = new byte[1 << 16];
-
-    /** Valid character mask. */
-    public static final int MASK_VALID = 0x01;
-
-    /** Space character mask. */
-    public static final int MASK_SPACE = 0x02;
-
-    /** Name start character mask. */
-    public static final int MASK_NAME_START = 0x04;
-
-    /** Name character mask. */
-    public static final int MASK_NAME = 0x08;
-
-    /** Pubid character mask. */
-    public static final int MASK_PUBID = 0x10;
-    
-    /** 
-     * Content character mask. Special characters are those that can
-     * be considered the start of markup, such as '&lt;' and '&amp;'. 
-     * The various newline characters are considered special as well.
-     * All other valid XML characters can be considered content.
-     * <p>
-     * This is an optimization for the inner loop of character scanning.
-     */
-    public static final int MASK_CONTENT = 0x20;
-
-    /** NCName start character mask. */
-    public static final int MASK_NCNAME_START = 0x40;
-
-    /** NCName character mask. */
-    public static final int MASK_NCNAME = 0x80;
-
-    //
-    // Static initialization
-    //
-
-    static {
-        
-        //
-        // [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] |
-        //              [#xE000-#xFFFD] | [#x10000-#x10FFFF]
-        //
-
-        int charRange[] = { 
-            0x0009, 0x000A, 0x000D, 0x000D, 0x0020, 0xD7FF, 0xE000, 0xFFFD,
-        };
-
-        //
-        // [3] S ::= (#x20 | #x9 | #xD | #xA)+
-        //
-
-        int spaceChar[] = { 
-            0x0020, 0x0009, 0x000D, 0x000A,
-        };
-
-        //
-        // [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
-        //                  CombiningChar | Extender
-        //
-
-        int nameChar[] = { 
-            0x002D, 0x002E, // '-' and '.'
-        };
-
-        //
-        // [5] Name ::= (Letter | '_' | ':') (NameChar)*
-        //
-
-        int nameStartChar[] = { 
-            0x003A, 0x005F, // ':' and '_'
-        };
-
-        //
-        // [13] PubidChar ::= #x20 | 0xD | 0xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
-        //
-
-        int pubidChar[] = {
-            0x000A, 0x000D, 0x0020, 0x0021, 0x0023, 0x0024, 0x0025, 0x003D,
-            0x005F
-        };
-
-        int pubidRange[] = {
-            0x0027, 0x003B, 0x003F, 0x005A, 0x0061, 0x007A
-        };
-
-        //
-        // [84] Letter ::= BaseChar | Ideographic
-        //
-
-        int letterRange[] = {
-            // BaseChar
-            0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6, 0x00D8, 0x00F6,
-            0x00F8, 0x0131, 0x0134, 0x013E, 0x0141, 0x0148, 0x014A, 0x017E,
-            0x0180, 0x01C3, 0x01CD, 0x01F0, 0x01F4, 0x01F5, 0x01FA, 0x0217,
-            0x0250, 0x02A8, 0x02BB, 0x02C1, 0x0388, 0x038A, 0x038E, 0x03A1,
-            0x03A3, 0x03CE, 0x03D0, 0x03D6, 0x03E2, 0x03F3, 0x0401, 0x040C,
-            0x040E, 0x044F, 0x0451, 0x045C, 0x045E, 0x0481, 0x0490, 0x04C4,
-            0x04C7, 0x04C8, 0x04CB, 0x04CC, 0x04D0, 0x04EB, 0x04EE, 0x04F5,
-            0x04F8, 0x04F9, 0x0531, 0x0556, 0x0561, 0x0586, 0x05D0, 0x05EA,
-            0x05F0, 0x05F2, 0x0621, 0x063A, 0x0641, 0x064A, 0x0671, 0x06B7,
-            0x06BA, 0x06BE, 0x06C0, 0x06CE, 0x06D0, 0x06D3, 0x06E5, 0x06E6,
-            0x0905, 0x0939, 0x0958, 0x0961, 0x0985, 0x098C, 0x098F, 0x0990,
-            0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B6, 0x09B9, 0x09DC, 0x09DD,
-            0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10,
-            0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36,
-            0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A72, 0x0A74, 0x0A85, 0x0A8B,
-            0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3,
-            0x0AB5, 0x0AB9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28,
-            0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B36, 0x0B39, 0x0B5C, 0x0B5D,
-            0x0B5F, 0x0B61, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95,
-            0x0B99, 0x0B9A, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA,
-            0x0BAE, 0x0BB5, 0x0BB7, 0x0BB9, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10,
-            0x0C12, 0x0C28, 0x0C2A, 0x0C33, 0x0C35, 0x0C39, 0x0C60, 0x0C61,
-            0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3,
-            0x0CB5, 0x0CB9, 0x0CE0, 0x0CE1, 0x0D05, 0x0D0C, 0x0D0E, 0x0D10,
-            0x0D12, 0x0D28, 0x0D2A, 0x0D39, 0x0D60, 0x0D61, 0x0E01, 0x0E2E,
-            0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E87, 0x0E88,
-            0x0E94, 0x0E97, 0x0E99, 0x0E9F, 0x0EA1, 0x0EA3, 0x0EAA, 0x0EAB,
-            0x0EAD, 0x0EAE, 0x0EB2, 0x0EB3, 0x0EC0, 0x0EC4, 0x0F40, 0x0F47,
-            0x0F49, 0x0F69, 0x10A0, 0x10C5, 0x10D0, 0x10F6, 0x1102, 0x1103,
-            0x1105, 0x1107, 0x110B, 0x110C, 0x110E, 0x1112, 0x1154, 0x1155,
-            0x115F, 0x1161, 0x116D, 0x116E, 0x1172, 0x1173, 0x11AE, 0x11AF,
-            0x11B7, 0x11B8, 0x11BC, 0x11C2, 0x1E00, 0x1E9B, 0x1EA0, 0x1EF9,
-            0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D,
-            0x1F50, 0x1F57, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC,
-            0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB,
-            0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x212A, 0x212B,
-            0x2180, 0x2182, 0x3041, 0x3094, 0x30A1, 0x30FA, 0x3105, 0x312C,
-            0xAC00, 0xD7A3,
-            // Ideographic
-            0x3021, 0x3029, 0x4E00, 0x9FA5,
-        };
-        int letterChar[] = {
-            // BaseChar
-            0x0386, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0559, 0x06D5,
-            0x093D, 0x09B2, 0x0A5E, 0x0A8D, 0x0ABD, 0x0AE0, 0x0B3D, 0x0B9C,
-            0x0CDE, 0x0E30, 0x0E84, 0x0E8A, 0x0E8D, 0x0EA5, 0x0EA7, 0x0EB0,
-            0x0EBD, 0x1100, 0x1109, 0x113C, 0x113E, 0x1140, 0x114C, 0x114E,
-            0x1150, 0x1159, 0x1163, 0x1165, 0x1167, 0x1169, 0x1175, 0x119E,
-            0x11A8, 0x11AB, 0x11BA, 0x11EB, 0x11F0, 0x11F9, 0x1F59, 0x1F5B,
-            0x1F5D, 0x1FBE, 0x2126, 0x212E,
-            // Ideographic
-            0x3007,
-        };
-
-        //
-        // [87] CombiningChar ::= ...
-        //
-
-        int combiningCharRange[] = {
-            0x0300, 0x0345, 0x0360, 0x0361, 0x0483, 0x0486, 0x0591, 0x05A1,
-            0x05A3, 0x05B9, 0x05BB, 0x05BD, 0x05C1, 0x05C2, 0x064B, 0x0652,
-            0x06D6, 0x06DC, 0x06DD, 0x06DF, 0x06E0, 0x06E4, 0x06E7, 0x06E8,
-            0x06EA, 0x06ED, 0x0901, 0x0903, 0x093E, 0x094C, 0x0951, 0x0954,
-            0x0962, 0x0963, 0x0981, 0x0983, 0x09C0, 0x09C4, 0x09C7, 0x09C8,
-            0x09CB, 0x09CD, 0x09E2, 0x09E3, 0x0A40, 0x0A42, 0x0A47, 0x0A48,
-            0x0A4B, 0x0A4D, 0x0A70, 0x0A71, 0x0A81, 0x0A83, 0x0ABE, 0x0AC5,
-            0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0B01, 0x0B03, 0x0B3E, 0x0B43,
-            0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B56, 0x0B57, 0x0B82, 0x0B83,
-            0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0C01, 0x0C03,
-            0x0C3E, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56,
-            0x0C82, 0x0C83, 0x0CBE, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD,
-            0x0CD5, 0x0CD6, 0x0D02, 0x0D03, 0x0D3E, 0x0D43, 0x0D46, 0x0D48,
-            0x0D4A, 0x0D4D, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E, 0x0EB4, 0x0EB9,
-            0x0EBB, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19, 0x0F71, 0x0F84,
-            0x0F86, 0x0F8B, 0x0F90, 0x0F95, 0x0F99, 0x0FAD, 0x0FB1, 0x0FB7,
-            0x20D0, 0x20DC, 0x302A, 0x302F,
-        };
-
-        int combiningCharChar[] = {
-            0x05BF, 0x05C4, 0x0670, 0x093C, 0x094D, 0x09BC, 0x09BE, 0x09BF,
-            0x09D7, 0x0A02, 0x0A3C, 0x0A3E, 0x0A3F, 0x0ABC, 0x0B3C, 0x0BD7,
-            0x0D57, 0x0E31, 0x0EB1, 0x0F35, 0x0F37, 0x0F39, 0x0F3E, 0x0F3F,
-            0x0F97, 0x0FB9, 0x20E1, 0x3099, 0x309A,
-        };
-
-        //
-        // [88] Digit ::= ...
-        //
-
-        int digitRange[] = {
-            0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x0966, 0x096F,
-            0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, 0x0B66, 0x0B6F,
-            0x0BE7, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, 0x0D66, 0x0D6F,
-            0x0E50, 0x0E59, 0x0ED0, 0x0ED9, 0x0F20, 0x0F29,
-        };
-
-        //
-        // [89] Extender ::= ...
-        //
-
-        int extenderRange[] = {
-            0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE,
-        };
-
-        int extenderChar[] = {
-            0x00B7, 0x02D0, 0x02D1, 0x0387, 0x0640, 0x0E46, 0x0EC6, 0x3005,
-        };
-
-        //
-        // SpecialChar ::= '<', '&', '\n', '\r', ']'
-        //
-
-        int specialChar[] = {
-            '<', '&', '\n', '\r', ']',
-        };
-
-        //
-        // Initialize
-        //
-
-        // set valid characters
-        for (int i = 0; i < charRange.length; i += 2) {
-            for (int j = charRange[i]; j <= charRange[i + 1]; j++) {
-                CHARS[j] |= MASK_VALID | MASK_CONTENT;
-            }
-        }
-
-        // remove special characters
-        for (int i = 0; i < specialChar.length; i++) {
-            CHARS[specialChar[i]] = (byte)(CHARS[specialChar[i]] & ~MASK_CONTENT);
-        }
-
-        // set space characters
-        for (int i = 0; i < spaceChar.length; i++) {
-            CHARS[spaceChar[i]] |= MASK_SPACE;
-        }
-
-        // set name start characters
-        for (int i = 0; i < nameStartChar.length; i++) {
-            CHARS[nameStartChar[i]] |= MASK_NAME_START | MASK_NAME | 
-                                       MASK_NCNAME_START | MASK_NCNAME;
-        }
-        for (int i = 0; i < letterRange.length; i += 2) {
-            for (int j = letterRange[i]; j <= letterRange[i + 1]; j++) {
-                CHARS[j] |= MASK_NAME_START | MASK_NAME |
-                            MASK_NCNAME_START | MASK_NCNAME;
-            }
-        }
-        for (int i = 0; i < letterChar.length; i++) {
-            CHARS[letterChar[i]] |= MASK_NAME_START | MASK_NAME |
-                                    MASK_NCNAME_START | MASK_NCNAME;
-        }
-
-        // set name characters
-        for (int i = 0; i < nameChar.length; i++) {
-            CHARS[nameChar[i]] |= MASK_NAME | MASK_NCNAME;
-        }
-        for (int i = 0; i < digitRange.length; i += 2) {
-            for (int j = digitRange[i]; j <= digitRange[i + 1]; j++) {
-                CHARS[j] |= MASK_NAME | MASK_NCNAME;
-            }
-        }
-        for (int i = 0; i < combiningCharRange.length; i += 2) {
-            for (int j = combiningCharRange[i]; j <= combiningCharRange[i + 1]; j++) {
-                CHARS[j] |= MASK_NAME | MASK_NCNAME;
-            }
-        }
-        for (int i = 0; i < combiningCharChar.length; i++) {
-            CHARS[combiningCharChar[i]] |= MASK_NAME | MASK_NCNAME;
-        }
-        for (int i = 0; i < extenderRange.length; i += 2) {
-            for (int j = extenderRange[i]; j <= extenderRange[i + 1]; j++) {
-                CHARS[j] |= MASK_NAME | MASK_NCNAME;
-            }
-        }
-        for (int i = 0; i < extenderChar.length; i++) {
-            CHARS[extenderChar[i]] |= MASK_NAME | MASK_NCNAME;
-        }
-
-        // remove ':' from allowable MASK_NCNAME_START and MASK_NCNAME chars
-        CHARS[':'] &= ~(MASK_NCNAME_START | MASK_NCNAME);
-
-        // set Pubid characters
-        for (int i = 0; i < pubidChar.length; i++) {
-            CHARS[pubidChar[i]] |= MASK_PUBID;
-        }
-        for (int i = 0; i < pubidRange.length; i += 2) {
-            for (int j = pubidRange[i]; j <= pubidRange[i + 1]; j++) {
-                CHARS[j] |= MASK_PUBID;
-            }
-        }
-
-    } // <clinit>()
-
-    //
-    // Public static methods
-    //
-
-    /**
-     * Returns true if the specified character is a supplemental character.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isSupplemental(int c) {
-        return (c >= 0x10000 && c <= 0x10FFFF);
-    }
-
-    /**
-     * Returns true the supplemental character corresponding to the given
-     * surrogates.
-     *
-     * @param h The high surrogate.
-     * @param l The low surrogate.
-     */
-    public static int supplemental(char h, char l) {
-        return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000;
-    }
-
-    /**
-     * Returns the high surrogate of a supplemental character
-     *
-     * @param c The supplemental character to "split".
-     */
-    public static char highSurrogate(int c) {
-        return (char) (((c - 0x00010000) >> 10) + 0xD800);
-    }
-
-    /**
-     * Returns the low surrogate of a supplemental character
-     *
-     * @param c The supplemental character to "split".
-     */
-    public static char lowSurrogate(int c) {
-        return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00);
-    }
-
-    /**
-     * Returns whether the given character is a high surrogate
-     *
-     * @param c The character to check.
-     */
-    public static boolean isHighSurrogate(int c) {
-        return (0xD800 <= c && c <= 0xDBFF);
-    }
-
-    /**
-     * Returns whether the given character is a low surrogate
-     *
-     * @param c The character to check.
-     */
-    public static boolean isLowSurrogate(int c) {
-        return (0xDC00 <= c && c <= 0xDFFF);
-    }
-
-
-    /**
-     * Returns true if the specified character is valid. This method
-     * also checks the surrogate character range from 0x10000 to 0x10FFFF.
-     * <p>
-     * If the program chooses to apply the mask directly to the
-     * <code>CHARS</code> array, then they are responsible for checking
-     * the surrogate character range.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isValid(int c) {
-        return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||
-               (0x10000 <= c && c <= 0x10FFFF);
-    } // isValid(int):boolean
-
-    /**
-     * Returns true if the specified character is invalid.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isInvalid(int c) {
-        return !isValid(c);
-    } // isInvalid(int):boolean
-
-    /**
-     * Returns true if the specified character can be considered content.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isContent(int c) {
-        return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) ||
-               (0x10000 <= c && c <= 0x10FFFF);
-    } // isContent(int):boolean
-
-    /**
-     * Returns true if the specified character can be considered markup.
-     * Markup characters include '&lt;', '&amp;', and '%'.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isMarkup(int c) {
-        return c == '<' || c == '&' || c == '%';
-    } // isMarkup(int):boolean
-
-    /**
-     * Returns true if the specified character is a space character
-     * as defined by production [3] in the XML 1.0 specification.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isSpace(int c) {
-        return c < 0x10000 && (CHARS[c] & MASK_SPACE) != 0;
-    } // isSpace(int):boolean
-
-    /**
-     * Returns true if the specified character is a valid name start
-     * character as defined by production [5] in the XML 1.0
-     * specification.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isNameStart(int c) {
-        return c < 0x10000 && (CHARS[c] & MASK_NAME_START) != 0;
-    } // isNameStart(int):boolean
-
-    /**
-     * Returns true if the specified character is a valid name
-     * character as defined by production [4] in the XML 1.0
-     * specification.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isName(int c) {
-        return c < 0x10000 && (CHARS[c] & MASK_NAME) != 0;
-    } // isName(int):boolean
-
-    /**
-     * Returns true if the specified character is a valid NCName start
-     * character as defined by production [4] in Namespaces in XML
-     * recommendation.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isNCNameStart(int c) {
-        return c < 0x10000 && (CHARS[c] & MASK_NCNAME_START) != 0;
-    } // isNCNameStart(int):boolean
-
-    /**
-     * Returns true if the specified character is a valid NCName
-     * character as defined by production [5] in Namespaces in XML
-     * recommendation.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isNCName(int c) {
-        return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0;
-    } // isNCName(int):boolean
-
-    /**
-     * Returns true if the specified character is a valid Pubid
-     * character as defined by production [13] in the XML 1.0
-     * specification.
-     *
-     * @param c The character to check.
-     */
-    public static boolean isPubid(int c) {
-        return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0;
-    } // isPubid(int):boolean
-
-    /*
-     * [5] Name ::= (Letter | '_' | ':') (NameChar)*
-     */
-    /**
-     * Check to see if a string is a valid Name according to [5]
-     * in the XML 1.0 Recommendation
-     *
-     * @param name string to check
-     * @return true if name is a valid Name
-     */
-    public static boolean isValidName(String name) {
-        if (name.length() == 0)
-            return false;
-        char ch = name.charAt(0);
-        if( isNameStart(ch) == false)
-           return false;
-        for (int i = 1; i < name.length(); i++ ) {
-           ch = name.charAt(i);
-           if( isName( ch ) == false ){
-              return false;
-           }
-        }
-        return true;
-    } // isValidName(String):boolean
-    
-
-    /*
-     * from the namespace rec
-     * [4] NCName ::= (Letter | '_') (NCNameChar)*
-     */
-    /**
-     * Check to see if a string is a valid NCName according to [4]
-     * from the XML Namespaces 1.0 Recommendation
-     *
-     * @param name string to check
-     * @return true if name is a valid NCName
-     */
-    public static boolean isValidNCName(String ncName) {
-        if (ncName.length() == 0)
-            return false;
-        char ch = ncName.charAt(0);
-        if( isNCNameStart(ch) == false)
-           return false;
-        for (int i = 1; i < ncName.length(); i++ ) {
-           ch = ncName.charAt(i);
-           if( isNCName( ch ) == false ){
-              return false;
-           }
-        }
-        return true;
-    } // isValidNCName(String):boolean
-
-    /*
-     * [7] Nmtoken ::= (NameChar)+
-     */
-    /**
-     * Check to see if a string is a valid Nmtoken according to [7]
-     * in the XML 1.0 Recommendation
-     *
-     * @param nmtoken string to check
-     * @return true if nmtoken is a valid Nmtoken 
-     */
-    public static boolean isValidNmtoken(String nmtoken) {
-        if (nmtoken.length() == 0)
-            return false;
-        for (int i = 0; i < nmtoken.length(); i++ ) {
-           char ch = nmtoken.charAt(i);
-           if(  ! isName( ch ) ){
-              return false;
-           }
-        }
-        return true;
-    } // isValidName(String):boolean
-
-
-
-
-
-    // encodings
-
-    /**
-     * Returns true if the encoding name is a valid IANA encoding.
-     * This method does not verify that there is a decoder available
-     * for this encoding, only that the characters are valid for an
-     * IANA encoding name.
-     *
-     * @param ianaEncoding The IANA encoding name.
-     */
-    public static boolean isValidIANAEncoding(String ianaEncoding) {
-        if (ianaEncoding != null) {
-            int length = ianaEncoding.length();
-            if (length > 0) {
-                char c = ianaEncoding.charAt(0);
-                if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
-                    for (int i = 1; i < length; i++) {
-                        c = ianaEncoding.charAt(i);
-                        if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
-                            (c < '0' || c > '9') && c != '.' && c != '_' &&
-                            c != '-') {
-                            return false;
-                        }
-                    }
-                    return true;
-                }
-            }
-        }
-        return false;
-    } // isValidIANAEncoding(String):boolean
-
-    /**
-     * Returns true if the encoding name is a valid Java encoding.
-     * This method does not verify that there is a decoder available
-     * for this encoding, only that the characters are valid for an
-     * Java encoding name.
-     *
-     * @param javaEncoding The Java encoding name.
-     */
-    public static boolean isValidJavaEncoding(String javaEncoding) {
-        if (javaEncoding != null) {
-            int length = javaEncoding.length();
-            if (length > 0) {
-                for (int i = 1; i < length; i++) {
-                    char c = javaEncoding.charAt(i);
-                    if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
-                        (c < '0' || c > '9') && c != '.' && c != '_' &&
-                        c != '-') {
-                        return false;
-                    }
-                }
-                return true;
-            }
-        }
-        return false;
-    } // isValidIANAEncoding(String):boolean
-
-} // class XMLChar
diff --git a/src/org/apache/xerces/util/XMLStringBuffer.java b/src/org/apache/xerces/util/XMLStringBuffer.java
deleted file mode 100644
index 033d985..0000000
--- a/src/org/apache/xerces/util/XMLStringBuffer.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999,2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.util;
-
-import org.apache.xerces.xni.XMLString;
-
-/**
- * XMLString is a structure used to pass character arrays. However,
- * XMLStringBuffer is a buffer in which characters can be appended
- * and extends XMLString so that it can be passed to methods
- * expecting an XMLString object. This is a safe operation because
- * it is assumed that any callee will <strong>not</strong> modify
- * the contents of the XMLString structure.
- * <p> 
- * The contents of the string are managed by the string buffer. As
- * characters are appended, the string buffer will grow as needed.
- * <p>
- * <strong>Note:</strong> Never set the <code>ch</code>, 
- * <code>offset</code>, and <code>length</code> fields directly.
- * These fields are managed by the string buffer. In order to reset
- * the buffer, call <code>clear()</code>.
- * 
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- * @author Eric Ye, IBM
- *
- * @version $Id$
- */
-public class XMLStringBuffer
-    extends XMLString {
-
-    //
-    // Constants
-    //
-
-    /** Default buffer size (32). */
-    public static final int DEFAULT_SIZE = 32;
-
-    //
-    // Data
-    //
-
-    // private
-
-    /** One char buffer. */
-    private char[] fOneCharBuffer = new char[1];
-
-    //
-    // Constructors
-    //
-
-    /**
-     * 
-     */
-    public XMLStringBuffer() {
-        this(DEFAULT_SIZE);
-    } // <init>()
-
-    /**
-     * 
-     * 
-     * @param size 
-     */
-    public XMLStringBuffer(int size) {
-        ch = new char[size];
-    } // <init>(int)
-
-    /** Constructs a string buffer from a char. */
-    public XMLStringBuffer(char c) {
-        this(1);
-        append(c);
-    } // <init>(char)
-
-    /** Constructs a string buffer from a String. */
-    public XMLStringBuffer(String s) {
-        this(s.length());
-        append(s);
-    } // <init>(String)
-
-    /** Constructs a string buffer from the specified character array. */
-    public XMLStringBuffer(char[] ch, int offset, int length) {
-        this(length);
-        append(ch, offset, length);
-    } // <init>(char[],int,int)
-
-    /** Constructs a string buffer from the specified XMLString. */
-    public XMLStringBuffer(XMLString s) {
-        this(s.length);
-        append(s);
-    } // <init>(XMLString)
-
-    //
-    // Public methods
-    //
-
-    /** Clears the string buffer. */
-    public void clear() {
-        offset = 0;
-        length = 0;
-    }
-
-    /**
-     * append
-     * 
-     * @param c 
-     */
-    public void append(char c) {
-        fOneCharBuffer[0] = c;
-        append(fOneCharBuffer, 0, 1);
-    } // append(char)
-
-    /**
-     * append
-     * 
-     * @param s 
-     */
-    public void append(String s) {
-        int length = s.length();
-        if (this.length + length > this.ch.length) {
-            char[] newch = new char[this.ch.length + length + DEFAULT_SIZE];
-            System.arraycopy(this.ch, 0, newch, 0, this.length);
-            this.ch = newch;
-        }
-        s.getChars(0, length, this.ch, this.length);
-        this.length += length;
-    } // append(String)
-
-    /**
-     * append
-     * 
-     * @param ch 
-     * @param offset 
-     * @param length 
-     */
-    public void append(char[] ch, int offset, int length) {
-        if (this.length + length > this.ch.length) {
-            char[] newch = new char[this.ch.length + length + DEFAULT_SIZE];
-            System.arraycopy(this.ch, 0, newch, 0, this.length);
-            this.ch = newch;
-        }
-        System.arraycopy(ch, offset, this.ch, this.length, length);
-        this.length += length;
-    } // append(char[],int,int)
-
-    /**
-     * append
-     * 
-     * @param s 
-     */
-    public void append(XMLString s) {
-        append(s.ch, s.offset, s.length);
-    } // append(XMLString)
-
-} // class XMLStringBuffer
diff --git a/src/org/apache/xerces/xni/Augmentations.java b/src/org/apache/xerces/xni/Augmentations.java
deleted file mode 100644
index 2af4cc6..0000000
--- a/src/org/apache/xerces/xni/Augmentations.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * The Augmentations interface defines a table of additional data that may
- * be passed along the document pipeline. The information can contain extra
- * arguments or infoset augmentations, for example PSVI. This additional
- * information is identified by a String key.
- * <p>
- * <strong>Note:</strong>
- * Methods that receive Augmentations are required to copy the information
- * if it is to be saved for use beyond the scope of the method.
- * The Augmentations content is volatile, and maybe modified by any method in
- * any component in the pipeline. Therefore, methods passed this structure
- * should not save any reference to the structure.
- * 
- * @author Elena Litani, IBM
- */
-public interface Augmentations {
-    
-    
-    /**
-     * Add additional information identified by a key to the Augmentations structure.
-     * 
-     * @param key    Identifier, can't be <code>null</code>
-     * @param item   Additional information
-     *
-     * @return the previous value of the specified key in the Augmentations structure,
-     *         or <code>null</code> if it did not have one.
-     */
-    public Object putItem (String key, Object item);
-
-
-    /**
-     * Get information identified by a key from the Augmentations structure
-     * 
-     * @param key    Identifier, can't be <code>null</code>
-     *
-     * @return the value to which the key is mapped in the Augmentations structure;
-     *         <code>null</code> if the key is not mapped to any value.
-     */
-    public Object getItem(String key);
-    
-    
-    /**
-     * Remove additional info from the Augmentations structure
-     * 
-     * @param key    Identifier, can't be <code>null</code>
-     * @return the previous value of the specified key in the Augmentations structure,
-     *         or <code>null</code> if it did not have one.
-     */
-    public Object removeItem (String key);
-
-    /**
-     * Remove all objects from the Augmentations structure.
-     */
-    public void clear ();
-
-    //
-    // REVISIT:
-    // provide a way to iterate through all of the items in the augmentations.
-    //
-}
diff --git a/src/org/apache/xerces/xni/NamespaceContext.java b/src/org/apache/xerces/xni/NamespaceContext.java
deleted file mode 100644
index 3050f45..0000000
--- a/src/org/apache/xerces/xni/NamespaceContext.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * Represents an interface to query namespace information.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface NamespaceContext {
-
-    //
-    // Constants
-    //
-
-    /**
-     * The XML Namespace ("http://www.w3.org/XML/1998/namespace"). This is
-     * the Namespace URI that is automatically mapped to the "xml" prefix.
-     */
-    public final static String XML_URI = "http://www.w3.org/XML/1998/namespace";
-
-    /**
-     * XML Information Set REC
-     * all namespace attributes (including those named xmlns, 
-     * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
-     */
-    public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
-
-    //
-    // NamespaceContext methods
-    //
-    
-    /**
-     * Look up a prefix and get the currently-mapped Namespace URI.
-     * <p>
-     * This method looks up the prefix in the current context.
-     * Use the empty string ("") for the default Namespace.
-     *
-     * @param prefix The prefix to look up.
-     *
-     * @return The associated Namespace URI, or null if the prefix
-     *         is undeclared in this context.
-     */
-    public String getURI(String prefix);
-
-    /**
-     * Return a count of all prefixes currently declared, including
-     * the default prefix if bound.
-     */
-    public int getDeclaredPrefixCount();
-
-    /** 
-     * Returns the prefix at the specified index in the current context.
-     */
-    public String getDeclaredPrefixAt(int index);
-
-    /**
-     * Returns the parent namespace context or null if there is no
-     * parent context. The total depth of the namespace contexts 
-     * matches the element depth in the document.
-     * <p>
-     * <strong>Note:</strong> This method <em>may</em> return the same 
-     * NamespaceContext object reference. The caller is responsible for
-     * saving the declared prefix mappings before calling this method.
-     */
-    public NamespaceContext getParentContext();
-
-} // interface NamespaceContext
diff --git a/src/org/apache/xerces/xni/QName.java b/src/org/apache/xerces/xni/QName.java
deleted file mode 100644
index 1289141..0000000
--- a/src/org/apache/xerces/xni/QName.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * A structure that holds the components of an XML Namespaces qualified
- * name.
- * <p>
- * To be used correctly, the strings must be identical references for
- * equal strings. Within the parser, these values are considered symbols
- * and should always be retrieved from the <code>SymbolTable</code>.
- *
- * @see org.apache.xerces.util.SymbolTable
- *
- * @author Stubs generated by DesignDoc on Wed Jun 07 11:58:44 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class QName 
-    implements Cloneable {
-
-    //
-    // Data
-    //
-
-    /** 
-     * The qname prefix. For example, the prefix for the qname "a:foo"
-     * is "a".
-     */
-    public String prefix;
-
-    /** 
-     * The qname localpart. For example, the localpart for the qname "a:foo"
-     * is "foo".
-     */
-    public String localpart;
-
-    /** 
-     * The qname rawname. For example, the rawname for the qname "a:foo"
-     * is "a:foo".
-     */
-    public String rawname;
-
-    /** 
-     * The URI to which the qname prefix is bound. This binding must be
-     * performed by a XML Namespaces aware processor.
-     */
-    public String uri;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public QName() {
-        clear();
-    } // <init>()
-
-    /** Constructs a QName with the specified values. */
-    public QName(String prefix, String localpart, String rawname, String uri) {
-        setValues(prefix, localpart, rawname, uri);
-    } // <init>(String,String,String,String)
-
-    /** Constructs a copy of the specified QName. */
-    public QName(QName qname) {
-        setValues(qname);
-    } // <init>(QName)
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Convenience method to set the values of the qname components.
-     * 
-     * @param QName The qualified name to be copied. 
-     */
-    public void setValues(QName qname) {
-        prefix = qname.prefix;
-        localpart = qname.localpart;
-        rawname = qname.rawname;
-        uri = qname.uri;
-    } // setValues(QName)
-
-    /**
-     * Convenience method to set the values of the qname components.
-     * 
-     * @param prefix    The qname prefix. (e.g. "a")
-     * @param localpart The qname localpart. (e.g. "foo")
-     * @param rawname   The qname rawname. (e.g. "a:foo")
-     * @param uri       The URI binding. (e.g. "http://foo.com/mybinding")
-     */
-    public void setValues(String prefix, String localpart, String rawname, 
-                          String uri) {
-        this.prefix = prefix;
-        this.localpart = localpart;
-        this.rawname = rawname;
-        this.uri = uri;
-    } // setValues(String,String,String,String)
-
-    /** Clears the values of the qname components. */
-    public void clear() {
-        prefix = null;
-        localpart = null;
-        rawname = null;
-        uri = null;
-    } // clear()
-
-    //
-    // Cloneable methods
-    //
-
-    /** Returns a clone of this object. */
-    public Object clone() {
-        return new QName(this);
-    } // clone():Object
-
-    //
-    // Object methods
-    //
-
-    /** Returns the hashcode for this object. */
-    public int hashCode() {
-        if (uri != null) {
-            return uri.hashCode() + localpart.hashCode();
-        }
-        return rawname.hashCode();
-    } // hashCode():int
-
-    /** Returns true if the two objects are equal. */
-    public boolean equals(Object object) {
-        if (object instanceof QName) {
-            QName qname = (QName)object;
-            if (qname.uri != null) {
-                return uri == qname.uri && localpart == qname.localpart;
-            }
-            else if (uri == null) {
-                return rawname == qname.rawname;
-            }
-            // fall through and return not equal
-        }
-        return false;
-    } // equals(Object):boolean
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-
-        StringBuffer str = new StringBuffer();
-        boolean comma = false;
-        if (prefix != null) {
-            str.append("prefix=\""+prefix+'"');
-            comma = true;
-        }
-        if (localpart != null) {
-            if (comma) {
-                str.append(',');
-            }
-            str.append("localpart=\""+localpart+'"');
-            comma = true;
-        }
-        if (rawname != null) {
-            if (comma) {
-                str.append(',');
-            }
-            str.append("rawname=\""+rawname+'"');
-            comma = true;
-        }
-        if (uri != null) {
-            if (comma) {
-                str.append(',');
-            }
-            str.append("uri=\""+uri+'"');
-        }
-        return str.toString();
-
-    } // toString():String
-
-} // class QName
diff --git a/src/org/apache/xerces/xni/XMLAttributes.java b/src/org/apache/xerces/xni/XMLAttributes.java
deleted file mode 100644
index b682931..0000000
--- a/src/org/apache/xerces/xni/XMLAttributes.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * The XMLAttributes interface defines a collection of attributes for 
- * an element. In the parser, the document source would scan the entire
- * start element and collect the attributes. The attributes are 
- * communicated to the document handler in the startElement method.
- * <p>
- * The attributes are read-write so that subsequent stages in the document
- * pipeline can modify the values or change the attributes that are
- * propogated to the next stage.
- *
- * @see XMLDocumentHandler#startElement
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLAttributes {
-
-    //
-    // XMLAttributes methods
-    //
-
-    /**
-     * Adds an attribute. The attribute's non-normalized value of the
-     * attribute will have the same value as the attribute value until
-     * set using the <code>setNonNormalizedValue</code> method. Also,
-     * the added attribute will be marked as specified in the XML instance
-     * document unless set otherwise using the <code>setSpecified</code>
-     * method.
-     * <p>
-     * <strong>Note:</strong> If an attribute of the same name already
-     * exists, the old values for the attribute are replaced by the new
-     * values.
-     * 
-     * @param attrName  The attribute name.
-     * @param attrType  The attribute type. The type name is determined by
-     *                  the type specified for this attribute in the DTD.
-     *                  For example: "CDATA", "ID", "NMTOKEN", etc. However,
-     *                  attributes of type enumeration will have the type
-     *                  value specified as the pipe ('|') separated list of
-     *                  the enumeration values prefixed by an open 
-     *                  parenthesis and suffixed by a close parenthesis.
-     *                  For example: "(true|false)".
-     * @param attrValue The attribute value.
-     * 
-     * @return Returns the attribute index.
-     *
-     * @see #setNonNormalizedValue
-     * @see #setSpecified
-     */
-    public int addAttribute(QName attrName, String attrType, String attrValue);
-
-    /** 
-     * Removes all of the attributes. This method will also remove all
-     * entities associated to the attributes.
-     */
-    public void removeAllAttributes();
-
-    /**
-     * Removes the attribute at the specified index.
-     * <p>
-     * <strong>Note:</strong> This operation changes the indexes of all
-     * attributes following the attribute at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     */
-    public void removeAttributeAt(int attrIndex);
-
-    /**
-     * Returns the number of attributes in the list.
-     * <p>
-     * Once you know the number of attributes, you can iterate
-     * through the list.
-     *
-     * @see #getURI(int)
-     * @see #getLocalName(int)
-     * @see #getQName(int)
-     * @see #getType(int)
-     * @see #getValue(int)
-     */
-    public int getLength();
-
-    /**
-     * Look up the index of an attribute by XML 1.0 qualified name.
-     *
-     * @param qName The qualified (prefixed) name.
-     *
-     * @return The index of the attribute, or -1 if it does not
-     *         appear in the list.
-     */
-    public int getIndex(String qName);
-
-    /**
-     * Look up the index of an attribute by Namespace name.
-     *
-     * @param uri       The Namespace URI, or the empty string if
-     *                  the name has no Namespace URI.
-     * @param localName The attribute's local name.
-     *
-     * @return The index of the attribute, or -1 if it does not
-     *         appear in the list.
-     */
-    public int getIndex(String uri, String localPart);
-
-    /**
-     * Sets the name of the attribute at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrName  The new attribute name.
-     */
-    public void setName(int attrIndex, QName attrName);
-
-    /**
-     * Sets the fields in the given QName structure with the values
-     * of the attribute name at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrName  The attribute name structure to fill in.
-     */
-    public void getName(int attrIndex, QName attrName);
-
-    /**
-     * Returns the prefix of the attribute at the specified index.
-     *
-     * @param index The index of the attribute.
-     */
-    public String getPrefix(int index);
-
-    /**
-     * Look up an attribute's Namespace URI by index.
-     *
-     * @param index The attribute index (zero-based).
-     *
-     * @return The Namespace URI, or the empty string if none
-     *         is available, or null if the index is out of
-     *         range.
-     *
-     * @see #getLength
-     */
-    public String getURI(int index);
-    
-    /**
-     * Look up an attribute's local name by index.
-     *
-     * @param index The attribute index (zero-based).
-     *
-     * @return The local name, or the empty string if Namespace
-     *         processing is not being performed, or null
-     *         if the index is out of range.
-     *
-     * @see #getLength
-     */
-    public String getLocalName(int index);
-
-    /**
-     * Look up an attribute's XML 1.0 qualified name by index.
-     *
-     * @param index The attribute index (zero-based).
-     *
-     * @return The XML 1.0 qualified name, or the empty string
-     *         if none is available, or null if the index
-     *         is out of range.
-     *
-     * @see #getLength
-     */
-    public String getQName(int index);
-
-    /**
-     * Sets the type of the attribute at the specified index.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrType  The attribute type. The type name is determined by
-     *                  the type specified for this attribute in the DTD.
-     *                  For example: "CDATA", "ID", "NMTOKEN", etc. However,
-     *                  attributes of type enumeration will have the type
-     *                  value specified as the pipe ('|') separated list of
-     *                  the enumeration values prefixed by an open 
-     *                  parenthesis and suffixed by a close parenthesis.
-     *                  For example: "(true|false)".
-     */
-    public void setType(int attrIndex, String attrType);
-
-    /**
-     * Look up an attribute's type by index.
-     * <p>
-     * The attribute type is one of the strings "CDATA", "ID",
-     * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
-     * or "NOTATION" (always in upper case).
-     * <p>
-     * If the parser has not read a declaration for the attribute,
-     * or if the parser does not report attribute types, then it must
-     * return the value "CDATA" as stated in the XML 1.0 Recommentation
-     * (clause 3.3.3, "Attribute-Value Normalization").
-     * <p>
-     * For an enumerated attribute that is not a notation, the
-     * parser will report the type as "NMTOKEN".
-     *
-     * @param index The attribute index (zero-based).
-     *
-     * @return The attribute's type as a string, or null if the
-     *         index is out of range.
-     *
-     * @see #getLength
-     */
-    public String getType(int index);
-
-    /**
-     * Look up an attribute's type by XML 1.0 qualified name.
-     * <p>
-     * See {@link #getType(int) getType(int)} for a description
-     * of the possible types.
-     *
-     * @param qName The XML 1.0 qualified name.
-     *
-     * @return The attribute type as a string, or null if the
-     *         attribute is not in the list or if qualified names
-     *         are not available.
-     */
-    public String getType(String qName);
-
-    /**
-     * Look up an attribute's type by Namespace name.
-     * <p>
-     * See {@link #getType(int) getType(int)} for a description
-     * of the possible types.
-     *
-     * @param uri       The Namespace URI, or the empty String if the
-     *                  name has no Namespace URI.
-     * @param localName The local name of the attribute.
-     *
-     * @return The attribute type as a string, or null if the
-     *         attribute is not in the list or if Namespace
-     *         processing is not being performed.
-     */
-    public String getType(String uri, String localName);
-
-    /**
-     * Sets the value of the attribute at the specified index. This
-     * method will overwrite the non-normalized value of the attribute.
-     * 
-     * @param attrIndex The attribute index.
-     * @param attrValue The new attribute value.
-     *
-     * @see #setNonNormalizedValue
-     */
-    public void setValue(int attrIndex, String attrValue);
-
-    /**
-     * Look up an attribute's value by index.
-     * <p>
-     * If the attribute value is a list of tokens (IDREFS,
-     * ENTITIES, or NMTOKENS), the tokens will be concatenated
-     * into a single string with each token separated by a
-     * single space.
-     *
-     * @param index The attribute index (zero-based).
-     *
-     * @return The attribute's value as a string, or null if the
-     *         index is out of range.
-     *
-     * @see #getLength
-     */
-    public String getValue(int index);
-
-    /**
-     * Look up an attribute's value by XML 1.0 qualified name.
-     * <p>
-     * See {@link #getValue(int) getValue(int)} for a description
-     * of the possible values.
-     *
-     * @param qName The XML 1.0 qualified name.
-     *
-     * @return The attribute value as a string, or null if the
-     *         attribute is not in the list or if qualified names
-     *         are not available.
-     */
-    public String getValue(String qName);
-
-    /**
-     * Look up an attribute's value by Namespace name.
-     * <p>
-     * See {@link #getValue(int) getValue(int)} for a description
-     * of the possible values.
-     *
-     * @param uri       The Namespace URI, or the empty String if the
-     *                  name has no Namespace URI.
-     * @param localName The local name of the attribute.
-     *
-     * @return The attribute value as a string, or null if the
-     *         attribute is not in the list.
-     */
-    public String getValue(String uri, String localName);
-
-    /**
-     * Sets the non-normalized value of the attribute at the specified
-     * index.
-     *
-     * @param attrIndex The attribute index.
-     * @param attrValue The new non-normalized attribute value.
-     */
-    public void setNonNormalizedValue(int attrIndex, String attrValue);
-
-    /**
-     * Returns the non-normalized value of the attribute at the specified
-     * index. If no non-normalized value is set, this method will return
-     * the same value as the <code>getValue(int)</code> method.
-     *
-     * @param attrIndex The attribute index.
-     */
-    public String getNonNormalizedValue(int attrIndex);
-
-    /**
-     * Sets whether an attribute is specified in the instance document
-     * or not.
-     *
-     * @param attrIndex The attribute index.
-     * @param specified True if the attribute is specified in the instance
-     *                  document.
-     */
-    public void setSpecified(int attrIndex, boolean specified);
-
-    /**
-     * Returns true if the attribute is specified in the instance document.
-     *
-     * @param attrIndex The attribute index.
-     */
-    public boolean isSpecified(int attrIndex);
-
-    /**
-     * Look up an augmentations by attributes namespace name.
-     * 
-     * @param uri       The Namespace URI, or the empty string if
-     *                  the name has no Namespace URI.
-     * @param localPart
-     * @return Augmentations
-     */
-    public Augmentations getAugmentations (String uri, String localPart);
-
-    /**
-     * Look up an augmentations by attributes index.
-     * 
-     * @param attributeIndex The attribute index.
-     * @return Augmentations
-     */
-    public Augmentations getAugmentations (int attributeIndex);
-
-} // interface XMLAttributes
diff --git a/src/org/apache/xerces/xni/XMLDTDContentModelHandler.java b/src/org/apache/xerces/xni/XMLDTDContentModelHandler.java
deleted file mode 100644
index c4a689c..0000000
--- a/src/org/apache/xerces/xni/XMLDTDContentModelHandler.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * The DTD content model handler interface defines callback methods 
- * to report information items in DTD content models of an element
- * declaration. Parser components interested in DTD content model
- * information implement this interface and are registered as the DTD
- * content model handler on the DTD content model source.
- *
- * @see XMLDTDHandler
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDTDContentModelHandler {
-
-    //
-    // Constants
-    //
-
-    // separators
-
-    /** 
-     * A choice separator for children and mixed content models. This
-     * separator is used to specify that the allowed child is one of a
-     * collection.
-     * <p>
-     * For example:
-     * <pre>
-     * &lt;!ELEMENT elem (foo|bar)&gt;
-     * &lt;!ELEMENT elem (foo|bar+)&gt;
-     * &lt;!ELEMENT elem (foo|bar|baz)&gt;
-     * &lt;!ELEMENT elem (#PCDATA|foo|bar)*&gt;
-     * </pre>
-     *
-     * @see #SEPARATOR_SEQUENCE
-     */
-    public static final short SEPARATOR_CHOICE = 0;
-
-    /**
-     * A sequence separator for children content models. This separator 
-     * is used to specify that the allowed children must follow in the
-     * specified sequence.
-     * <p>
-     * <pre>
-     * &lt;!ELEMENT elem (foo,bar)&gt;
-     * &lt;!ELEMENT elem (foo,bar*)&gt;
-     * &lt;!ELEMENT elem (foo,bar,baz)&gt;
-     * </pre>
-     *
-     * @see #SEPARATOR_CHOICE
-     */
-    public static final short SEPARATOR_SEQUENCE = 1;
-
-    // occurrence counts
-
-    /** 
-     * This occurrence count limits the element, choice, or sequence in a
-     * children content model to zero or one. In other words, the child
-     * is optional.
-     * <p>
-     * For example:
-     * <pre>
-     * &lt;!ELEMENT elem (foo?)&gt;
-     * </pre>
-     *
-     * @see #OCCURS_ZERO_OR_MORE
-     * @see #OCCURS_ONE_OR_MORE
-     */
-    public static final short OCCURS_ZERO_OR_ONE = 2;
-
-    /** 
-     * This occurrence count limits the element, choice, or sequence in a
-     * children content model to zero or more. In other words, the child
-     * may appear an arbitrary number of times, or not at all. This
-     * occurrence count is also used for mixed content models.
-     * <p>
-     * For example:
-     * <pre>
-     * &lt;!ELEMENT elem (foo*)&gt;
-     * &lt;!ELEMENT elem (#PCDATA|foo|bar)*&gt;
-     * </pre>
-     *
-     * @see #OCCURS_ZERO_OR_ONE
-     * @see #OCCURS_ONE_OR_MORE
-     */
-    public static final short OCCURS_ZERO_OR_MORE = 3;
-
-    /** 
-     * This occurrence count limits the element, choice, or sequence in a
-     * children content model to one or more. In other words, the child
-     * may appear an arbitrary number of times, but must appear at least
-     * once.
-     * <p>
-     * For example:
-     * <pre>
-     * &lt;!ELEMENT elem (foo+)&gt;
-     * </pre>
-     *
-     * @see #OCCURS_ZERO_OR_ONE
-     * @see #OCCURS_ZERO_OR_MORE
-     */
-    public static final short OCCURS_ONE_OR_MORE = 4;
-
-    //
-    // XMLDTDContentModelHandler methods
-    //
-
-    /**
-     * The start of a content model. Depending on the type of the content
-     * model, specific methods may be called between the call to the
-     * startContentModel method and the call to the endContentModel method.
-     * 
-     * @param elementName The name of the element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startContentModel(String elementName)
-        throws XNIException;
-
-    /** 
-     * A content model of ANY. 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #empty
-     * @see #startGroup
-     */
-    public void any() throws XNIException;
-
-    /**
-     * A content model of EMPTY.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #any
-     * @see #startGroup
-     */
-    public void empty() throws XNIException;
-
-    /**
-     * A start of either a mixed or children content model. A mixed
-     * content model will immediately be followed by a call to the
-     * <code>pcdata()</code> method. A children content model will
-     * contain additional groups and/or elements.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #any
-     * @see #empty
-     */
-    public void startGroup() throws XNIException;
-
-    /**
-     * The appearance of "#PCDATA" within a group signifying a
-     * mixed content model. This method will be the first called
-     * following the content model's <code>startGroup()</code>.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #startGroup
-     */
-    public void pcdata() throws XNIException;
-
-    /**
-     * A referenced element in a mixed or children content model.
-     * 
-     * @param elementName The name of the referenced element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void element(String elementName) throws XNIException;
-
-    /**
-     * The separator between choices or sequences of a mixed or children
-     * content model.
-     * 
-     * @param separator The type of children separator.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #SEPARATOR_CHOICE
-     * @see #SEPARATOR_SEQUENCE
-     */
-    public void separator(short separator) throws XNIException;
-
-    /**
-     * The occurrence count for a child in a children content model or
-     * for the mixed content model group.
-     * 
-     * @param occurrence The occurrence count for the last element
-     *                   or group.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #OCCURS_ZERO_OR_ONE
-     * @see #OCCURS_ZERO_OR_MORE
-     * @see #OCCURS_ONE_OR_MORE
-     */
-    public void occurrence(short occurrence) throws XNIException;
-
-    /**
-     * The end of a group for mixed or children content models.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endGroup() throws XNIException;
-
-    /**
-     * The end of a content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endContentModel() throws XNIException;
-
-} // interface XMLDTDContentModelHandler
diff --git a/src/org/apache/xerces/xni/XMLDTDHandler.java b/src/org/apache/xerces/xni/XMLDTDHandler.java
deleted file mode 100644
index 7df57a4..0000000
--- a/src/org/apache/xerces/xni/XMLDTDHandler.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * The DTD handler interface defines callback methods to report
- * information items in the DTD of an XML document. Parser components
- * interested in DTD information implement this interface and are
- * registered as the DTD handler on the DTD source.
- *
- * @see XMLDTDContentModelHandler
- *
- * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDTDHandler {
-
-    //
-    // Constants
-    //
-
-    /**
-     * Conditional section: INCLUDE. 
-     *
-     * @see #CONDITIONAL_IGNORE
-     */
-    public static final short CONDITIONAL_INCLUDE = 0;
-
-    /** 
-     * Conditional section: IGNORE.
-     *
-     * @see #CONDITIONAL_INCLUDE
-     */
-    public static final short CONDITIONAL_IGNORE = 1;
-
-    //
-    // XMLDTDHandler methods
-    //
-
-    /**
-     * The start of the DTD.
-     *
-     * @param locator  The document locator, or null if the document
-     *                 location cannot be reported during the parsing of 
-     *                 the document DTD. However, it is <em>strongly</em>
-     *                 recommended that a locator be supplied that can 
-     *                 at least report the base system identifier of the
-     *                 DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDTD(XMLLocator locator) throws XNIException;
-
-    /**
-     * This method notifies of the start of an entity. The DTD has the 
-     * pseudo-name of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal parameter entities).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException;
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method is only called for external
-     * parameter entities referenced in the DTD.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding) throws XNIException;
-
-    /**
-     * This method notifies the end of an entity. The DTD has the pseudo-name
-     * of "[dtd]" and parameter entity names start with '%'.
-     * <p>
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException;
-
-    /**
-     * A comment.
-     * 
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text) throws XNIException;
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data)
-        throws XNIException;
-
-    /**
-     * An element declaration.
-     * 
-     * @param name         The name of the element.
-     * @param contentModel The element content model.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void elementDecl(String name, String contentModel)
-        throws XNIException;
-
-    /**
-     * The start of an attribute list.
-     * 
-     * @param elementName The name of the element that this attribute
-     *                    list is associated with.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startAttlist(String elementName) throws XNIException;
-
-    /**
-     * An attribute declaration.
-     * 
-     * @param elementName   The name of the element that this attribute
-     *                      is associated with.
-     * @param attributeName The name of the attribute.
-     * @param type          The attribute type. This value will be one of
-     *                      the following: "CDATA", "ENTITY", "ENTITIES",
-     *                      "ENUMERATION", "ID", "IDREF", "IDREFS", 
-     *                      "NMTOKEN", "NMTOKENS", or "NOTATION".
-     * @param enumeration   If the type has the value "ENUMERATION" or
-     *                      "NOTATION", this array holds the allowed attribute
-     *                      values; otherwise, this array is null.
-     * @param defaultType   The attribute default type. This value will be
-     *                      one of the following: "#FIXED", "#IMPLIED",
-     *                      "#REQUIRED", or null.
-     * @param defaultValue  The attribute default value, or null if no
-     *                      default value is specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void attributeDecl(String elementName, String attributeName, 
-                              String type, String[] enumeration, 
-                              String defaultType, XMLString defaultValue)
-        throws XNIException;
-
-    /**
-     * The end of an attribute list.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endAttlist() throws XNIException;
-
-    /**
-     * An internal entity declaration.
-     * 
-     * @param name The name of the entity. Parameter entity names start with
-     *             '%', whereas the name of a general entity is just the 
-     *             entity name.
-     * @param text The value of the entity.
-     * @param nonNormalizedText The non-normalized value of the entity. This
-     *             value contains the same sequence of characters that was in 
-     *             the internal entity declaration, without any entity
-     *             references expanded.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void internalEntityDecl(String name, XMLString text, 
-                                   XMLString nonNormalizedText) 
-        throws XNIException;
-
-    /**
-     * An external entity declaration.
-     * 
-     * @param name     The name of the entity. Parameter entity names start
-     *                 with '%', whereas the name of a general entity is just
-     *                 the entity name.
-     * @param publicId The public identifier of the entity or null if the
-     *                 the entity was specified with SYSTEM.
-     * @param systemId The system identifier of the entity.
-     * @param baseSystemId The base system identifier where this entity
-     *                     is declared.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void externalEntityDecl(String name, 
-                                   String publicId, String systemId,
-                                   String baseSystemId) throws XNIException;
-
-    /**
-     * An unparsed entity declaration.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the entity, or null if not
-     *                 specified.
-     * @param notation The name of the notation.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void unparsedEntityDecl(String name, 
-                                   String publicId, String systemId, 
-                                   String notation) throws XNIException;
-
-    /**
-     * A notation declaration
-     * 
-     * @param name     The name of the notation.
-     * @param publicId The public identifier of the notation, or null if not
-     *                 specified.
-     * @param systemId The system identifier of the notation, or null if not
-     *                 specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void notationDecl(String name, String publicId, String systemId)
-        throws XNIException;
-
-    /**
-     * The start of a conditional section.
-     * 
-     * @param type The type of the conditional section. This value will
-     *             either be CONDITIONAL_INCLUDE or CONDITIONAL_IGNORE.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     *
-     * @see #CONDITIONAL_INCLUDE
-     * @see #CONDITIONAL_IGNORE
-     */
-    public void startConditional(short type) throws XNIException;
-
-    /**
-     * Characters within an IGNORE conditional section.
-     *
-     * @param text The ignored text.
-     */
-    public void characters(XMLString text) throws XNIException;
-
-    /**
-     * The end of a conditional section.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endConditional() throws XNIException;
-
-    /**
-     * The end of the DTD.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDTD() throws XNIException;
-
-} // interface XMLDTDHandler
diff --git a/src/org/apache/xerces/xni/XMLDocumentFragmentHandler.java b/src/org/apache/xerces/xni/XMLDocumentFragmentHandler.java
deleted file mode 100644
index 635e062..0000000
--- a/src/org/apache/xerces/xni/XMLDocumentFragmentHandler.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * This handler interface contains methods necessary to receive
- * information about document elements and content.
- * <p>
- * <strong>Note:</strong> Some of these methods overlap methods
- * found in the XMLDocumentHandler interface.
- *
- * @see XMLDocumentHandler
- *
- * @author Andy Clark, IBM
- * @version $Id$
- */
-public interface XMLDocumentFragmentHandler {
-
-    //
-    // XMLDocumentFragmentHandler methods
-    //
-
-    /**
-     * The start of the document fragment.
-     *
-     * @param locator          The document locator, or null if the
-     *                         document location cannot be reported
-     *                         during the parsing of this fragment.
-     *                         However, it is <em>strongly</em>
-     *                         recommended that a locator be supplied
-     *                         that can at least report the base
-     *                         system identifier.
-     * @param namespaceContext The namespace context in effect at the
-     *                         start of this document fragment. This
-     *                         object only represents the current context.
-     *                         Implementors of this class are responsible
-     *                         for copying the namespace bindings from the
-     *                         the current context (and its parent contexts)
-     *                         if that information is important.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startDocumentFragment(XMLLocator locator,
-                                      NamespaceContext namespaceContext) 
-        throws XNIException;
-
-    /**
-     * This method notifies the start of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId The base system identifier of the entity if
-     *                     the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding) throws XNIException;
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding) throws XNIException;
-
-    /**
-     * This method notifies the end of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name The name of the entity.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endEntity(String name) throws XNIException;
-
-    /**
-     * A comment.
-     * 
-     * @param text The text in the comment.
-     *
-     * @throws XNIException Thrown by application to signal an error.
-     */
-    public void comment(XMLString text) throws XNIException;
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data)
-        throws XNIException;
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri)
-        throws XNIException;
-
-    /**
-     * The start of an element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes)
-        throws XNIException;
-
-    /**
-     * An empty element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes)
-        throws XNIException;
-
-    /**
-     * Character content.
-     * 
-     * @param text The content.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text) throws XNIException;
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     * 
-     * @param text The ignorable whitespace.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text) throws XNIException;
-
-    /**
-     * The end of an element.
-     * 
-     * @param element The name of the element.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endElement(QName element) throws XNIException;
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix) throws XNIException;
-
-    /** 
-     * The start of a CDATA section. 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void startCDATA() throws XNIException;
-
-    /**
-     * The end of a CDATA section. 
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endCDATA() throws XNIException;
-
-    /**
-     * The end of the document fragment.
-     *
-     * @throws XNIException Thrown by handler to signal an error.
-     */
-    public void endDocumentFragment() throws XNIException;
-
-} // interface XMLDocumentFragmentHandler
diff --git a/src/org/apache/xerces/xni/XMLDocumentHandler.java b/src/org/apache/xerces/xni/XMLDocumentHandler.java
deleted file mode 100644
index 29b01f8..0000000
--- a/src/org/apache/xerces/xni/XMLDocumentHandler.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * The document handler interface defines callback methods to report
- * information items in XML documents. Parser components interested in 
- * document information implement this interface and are registered
- * as the document handler on the document source.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 18 18:23:16 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDocumentHandler {
-
-    //
-    // XMLDocumentHandler methods
-    //
-
-    /**
-     * The start of the document.
-     * 
-     * @param locator  The document locator, or null if the document
-     *                 location cannot be reported during the parsing
-     *                 of this document. However, it is <em>strongly</em>
-     *                 recommended that a locator be supplied that can
-     *                 at least report the system identifier of the
-     *                 document.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs     Additional information that may include infoset augmentations
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void startDocument(XMLLocator locator, String encoding, Augmentations augs) 
-        throws XNIException;
-
-    /**
-     * Notifies of the presence of an XMLDecl line in the document. If
-     * present, this method will be called immediately following the
-     * startDocument call.
-     * 
-     * @param version    The XML version.
-     * @param encoding   The IANA encoding name of the document, or null if
-     *                   not specified.
-     * @param standalone The standalone value, or null if not specified.
-     * @param augs       Additional information that may include infoset augmentations
-     *                   
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs)
-        throws XNIException;
-
-    /**
-     * Notifies of the presence of the DOCTYPE line in the document.
-     * 
-     * @param rootElement
-     *                 The name of the root element.
-     * @param publicId The public identifier if an external DTD or null
-     *                 if the external DTD is specified using SYSTEM.
-     * @param systemId The system identifier if an external DTD, null
-     *                 otherwise.
-     * @param augs     Additional information that may include infoset augmentations
-     *                 
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
-        throws XNIException;
-
-    /**
-     * A comment.
-     * 
-     * @param text   The text in the comment.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by application to signal an error.
-     */
-    public void comment(XMLString text, Augmentations augs) throws XNIException;
-
-    /**
-     * A processing instruction. Processing instructions consist of a
-     * target name and, optionally, text data. The data is only meaningful
-     * to the application.
-     * <p>
-     * Typically, a processing instruction's data will contain a series
-     * of pseudo-attributes. These pseudo-attributes follow the form of
-     * element attributes but are <strong>not</strong> parsed or presented
-     * to the application as anything other than text. The application is
-     * responsible for parsing the data.
-     * 
-     * @param target The target.
-     * @param data   The data or null if none specified.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void processingInstruction(String target, XMLString data, Augmentations augs)
-        throws XNIException;
-
-    /**
-     * The start of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param uri    The URI bound to the prefix.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void startPrefixMapping(String prefix, String uri, Augmentations augs)
-        throws XNIException;
-
-    /**
-     * The start of an element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs       Additional information that may include infoset augmentations
-     *                   
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException;
-
-    /**
-     * An empty element.
-     * 
-     * @param element    The name of the element.
-     * @param attributes The element attributes.
-     * @param augs       Additional information that may include infoset augmentations
-     *                   
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs)
-        throws XNIException;
-
-    /**
-     * This method notifies the start of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name     The name of the entity.
-     * @param publicId The public identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param systemId The system identifier of the entity if the entity
-     *                 is external, null otherwise.
-     * @param baseSystemId
-     *                 The base system identifier of the entity if
-     *                 the entity is external, null otherwise.
-     * @param encoding The auto-detected IANA encoding name of the entity
-     *                 stream. This value will be null in those situations
-     *                 where the entity encoding is not auto-detected (e.g.
-     *                 internal entities or a document entity that is
-     *                 parsed from a java.io.Reader).
-     * @param augs     Additional information that may include infoset augmentations
-     *                 
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void startEntity(String name, 
-                            String publicId, String systemId,
-                            String baseSystemId,
-                            String encoding,
-                            Augmentations augs) throws XNIException;
-
-    /**
-     * Notifies of the presence of a TextDecl line in an entity. If present,
-     * this method will be called immediately following the startEntity call.
-     * <p>
-     * <strong>Note:</strong> This method will never be called for the
-     * document entity; it is only called for external general entities
-     * referenced in document content.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param version  The XML version, or null if not specified.
-     * @param encoding The IANA encoding name of the entity.
-     * @param augs     Additional information that may include infoset augmentations
-     *                 
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException;
-
-    /**
-     * This method notifies the end of an entity.
-     * <p>
-     * <strong>Note:</strong> This method is not called for entity references
-     * appearing as part of attribute values.
-     * 
-     * @param name   The name of the entity.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void endEntity(String name, Augmentations augs) throws XNIException;
-
-    /**
-     * Character content.
-     * 
-     * @param text   The content.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void characters(XMLString text, Augmentations augs) throws XNIException;
-
-    /**
-     * Ignorable whitespace. For this method to be called, the document
-     * source must have some way of determining that the text containing
-     * only whitespace characters should be considered ignorable. For
-     * example, the validator can determine if a length of whitespace
-     * characters in the document are ignorable based on the element
-     * content model.
-     * 
-     * @param text   The ignorable whitespace.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException;
-
-    /**
-     * The end of an element.
-     * 
-     * @param element The name of the element.
-     * @param augs    Additional information that may include infoset augmentations
-     *                
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void endElement(QName element, Augmentations augs) throws XNIException;
-
-    /**
-     * The end of a namespace prefix mapping. This method will only be
-     * called when namespace processing is enabled.
-     * 
-     * @param prefix The namespace prefix.
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException;
-
-    /**
-     * The start of a CDATA section.
-     * 
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void startCDATA(Augmentations augs) throws XNIException;
-
-    /**
-     * The end of a CDATA section.
-     * 
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void endCDATA(Augmentations augs) throws XNIException;
-
-    /**
-     * The end of the document.
-     * 
-     * @param augs   Additional information that may include infoset augmentations
-     *               
-     * @exception XNIException
-     *                   Thrown by handler to signal an error.
-     */
-    public void endDocument(Augmentations augs) throws XNIException;
-
-} // interface XMLDocumentHandler
diff --git a/src/org/apache/xerces/xni/XMLLocator.java b/src/org/apache/xerces/xni/XMLLocator.java
deleted file mode 100644
index d974f4f..0000000
--- a/src/org/apache/xerces/xni/XMLLocator.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * Location information.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLLocator {
-
-    //
-    // XMLLocator methods
-    //
-
-    /** Returns the public identifier. */
-    public String getPublicId();
-
-    /** Returns the system identifier. */
-    public String getSystemId();
-
-    /** Returns the base system identifier. */
-    public String getBaseSystemId();
-
-    /** Returns the line number. */
-    public int getLineNumber();
-
-    /** Returns the column number. */
-    public int getColumnNumber();
-
-} // interface XMLLocator
diff --git a/src/org/apache/xerces/xni/XMLString.java b/src/org/apache/xerces/xni/XMLString.java
deleted file mode 100644
index 3e14d0e..0000000
--- a/src/org/apache/xerces/xni/XMLString.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * This class is used as a structure to pass text contained in the underlying
- * character buffer of the scanner. The offset and length fields allow the
- * buffer to be re-used without creating new character arrays.
- * <p>
- * <strong>Note:</strong> Methods that are passed an XMLString structure
- * should consider the contents read-only and not make any modifications
- * to the contents of the buffer. The method receiving this structure
- * should also not modify the offset and length if this structure (or
- * the values of this structure) are passed to another method.
- * <p>
- * <strong>Note:</strong> Methods that are passed an XMLString structure
- * are required to copy the information out of the buffer if it is to be
- * saved for use beyond the scope of the method. The contents of the 
- * structure are volatile and the contents of the character buffer cannot
- * be assured once the method that is passed this structure returns.
- * Therefore, methods passed this structure should not save any reference
- * to the structure or the character array contained in the structure.
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Eric Ye, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XMLString {
-
-    //
-    // Data
-    //
-
-    /** The character array. */
-    public char[] ch;
-
-    /** The offset into the character array. */
-    public int offset;
-
-    /** The length of characters from the offset. */
-    public int length;
-
-    //
-    // Constructors
-    //
-
-    /** Default constructor. */
-    public XMLString() {
-    } // <init>()
-
-    /**
-     * Constructs an XMLString structure preset with the specified
-     * values.
-     * 
-     * @param ch     The character array.
-     * @param offset The offset into the character array.
-     * @param length The length of characters from the offset.
-     */
-    public XMLString(char[] ch, int offset, int length) {
-        setValues(ch, offset, length);
-    } // <init>(char[],int,int)
-
-    /**
-     * Constructs an XMLString structure with copies of the values in
-     * the given structure.
-     * <p>
-     * <strong>Note:</strong> This does not copy the character array;
-     * only the reference to the array is copied.
-     *
-     * @param string The XMLString to copy.
-     */
-    public XMLString(XMLString string) {
-        setValues(string);
-    } // <init>(XMLString)
-
-    //
-    // Public methods
-    //
-
-    /**
-     * Initializes the contents of the XMLString structure with the
-     * specified values.
-     * 
-     * @param ch     The character array.
-     * @param offset The offset into the character array.
-     * @param length The length of characters from the offset.
-     */
-    public void setValues(char[] ch, int offset, int length) {
-        this.ch = ch;
-        this.offset = offset;
-        this.length = length;
-    } // setValues(char[],int,int)
-
-    /**
-     * Initializes the contents of the XMLString structure with copies
-     * of the given string structure.
-     * <p>
-     * <strong>Note:</strong> This does not copy the character array;
-     * only the reference to the array is copied.
-     * 
-     * @param s
-     */
-    public void setValues(XMLString s) {
-        setValues(s.ch, s.offset, s.length);
-    } // setValues(XMLString)
-
-    /** Resets all of the values to their defaults. */
-    public void clear() {
-        this.ch = null;
-        this.offset = 0;
-        this.length = -1;
-    } // clear()
-
-    /**
-     * Returns true if the contents of this XMLString structure and
-     * the specified array are equal.
-     * 
-     * @param ch     The character array.
-     * @param offset The offset into the character array.
-     * @param length The length of characters from the offset.
-     */
-    public boolean equals(char[] ch, int offset, int length) {
-        if (ch == null) {
-            return false;
-        }
-        if (this.length != length) {
-            return false;
-        }
-
-        for (int i=0; i<length; i++) {
-            if (this.ch[this.offset+i] != ch[offset+i] ) {
-                return false;
-            }
-        }
-        return true;
-    } // equals(char[],int,int):boolean
-
-    /**
-     * Returns true if the contents of this XMLString structure and
-     * the specified string are equal.
-     * 
-     * @param s The string to compare.
-     */
-    public boolean equals(String s) {
-        if (s == null) {
-            return false;
-        }
-        if ( length != s.length() ) {
-            return false;
-        }
-
-        // is this faster than call s.toCharArray first and compare the 
-        // two arrays directly, which will possibly involve creating a
-        // new char array object.
-        for (int i=0; i<length; i++) {
-            if (ch[offset+i] != s.charAt(i)) {
-                return false;
-            }
-        }
-
-        return true;
-    } // equals(String):boolean
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-        return length > 0 ? new String(ch, offset, length) : "";
-    } // toString():String
-
-} // class XMLString
diff --git a/src/org/apache/xerces/xni/XNIException.java b/src/org/apache/xerces/xni/XNIException.java
deleted file mode 100644
index 5f3fea6..0000000
--- a/src/org/apache/xerces/xni/XNIException.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni;
-
-/**
- * This exception is the base exception of all XNI exceptions. It
- * can be constructed with an error message or used to wrap another
- * exception object.
- * <p>
- * <strong>Note:</strong> By extending the Java 
- * <code>RuntimeException</code>, XNI handlers and components are 
- * not required to catch XNI exceptions but may explicitly catch
- * them, if so desired.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XNIException 
-    extends RuntimeException {
-
-    //
-    // Data
-    //
-
-    /** The wrapped exception. */
-    private Exception fException;
-
-    //
-    // Constructors
-    //
-
-    /**
-     * Constructs an XNI exception with a message. 
-     *
-     * @param message The exception message.
-     */
-    public XNIException(String message) {
-        super(message);
-    } // <init>(String)
-
-    /**
-     * Constructs an XNI exception with a wrapped exception. 
-     *
-     * @param exception The wrapped exception.
-     */
-    public XNIException(Exception exception) {
-        super(exception.getMessage());
-        fException = exception;
-    } // <init>(Exception)
-
-    /**
-     * Constructs an XNI exception with a message and wrapped exception. 
-     *
-     * @param message The exception message.
-     * @param exception The wrapped exception.
-     */
-    public XNIException(String message, Exception exception) {
-        super(message);
-        fException = exception;
-    } // <init>(Exception,String)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the wrapped exception. */
-    public Exception getException() {
-        return fException;
-    } // getException():Exception
-
-} // class QName
diff --git a/src/org/apache/xerces/xni/parser/XMLComponent.java b/src/org/apache/xerces/xni/parser/XMLComponent.java
deleted file mode 100644
index 33707ba..0000000
--- a/src/org/apache/xerces/xni/parser/XMLComponent.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-/**
- * The component interface defines methods that must be implemented
- * by components in a parser configuration. The component methods allow
- * the component manager to initialize the component state and notify
- * the component when feature and property values change.
- *
- * @see XMLComponentManager
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLComponent {
-
-    //
-    // XMLComponent methods
-    //
-
-    /**
-     * Resets the component. The component can query the component manager
-     * about any features and properties that affect the operation of the
-     * component.
-     * 
-     * @param componentManager The component manager.
-     *
-     * @throws XNIException Thrown by component on initialization error.
-     */
-    public void reset(XMLComponentManager componentManager) 
-        throws XMLConfigurationException;
-
-    /**
-     * Returns a list of feature identifiers that are recognized by
-     * this component. This method may return null if no features
-     * are recognized by this component.
-     */
-    public String[] getRecognizedFeatures();
-
-    /**
-     * Sets the state of a feature. This method is called by the component
-     * manager any time after reset when a feature changes state. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore features
-     * that do not affect the operation of the component.
-     * 
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws XMLConfigurationException Thrown for configuration error.
-     *                                   In general, components should
-     *                                   only throw this exception if
-     *                                   it is <strong>really</strong>
-     *                                   a critical error.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException;
-
-    /**
-     * Returns a list of property identifiers that are recognized by
-     * this component. This method may return null if no properties
-     * are recognized by this component.
-     */
-    public String[] getRecognizedProperties();
-
-    /**
-     * Sets the value of a property. This method is called by the component
-     * manager any time after reset when a property changes value. 
-     * <p>
-     * <strong>Note:</strong> Components should silently ignore properties
-     * that do not affect the operation of the component.
-     * 
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws XMLConfigurationException Thrown for configuration error.
-     *                                   In general, components should
-     *                                   only throw this exception if
-     *                                   it is <strong>really</strong>
-     *                                   a critical error.
-     */
-    public void setProperty(String propertyId, Object value)
-       throws XMLConfigurationException;
-
-} // interface XMLComponent
diff --git a/src/org/apache/xerces/xni/parser/XMLComponentManager.java b/src/org/apache/xerces/xni/parser/XMLComponentManager.java
deleted file mode 100644
index 43e0c71..0000000
--- a/src/org/apache/xerces/xni/parser/XMLComponentManager.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-/**
- * The component manager manages a parser configuration and the components
- * that make up that configuration. The manager notifies each component
- * before parsing to allow the components to initialize their state; and
- * also any time that a parser feature or property changes.
- * <p>
- * The methods of the component manager allow components to query features
- * and properties that affect the operation of the component.
- *
- * @see XMLComponent
- *
- * @author Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLComponentManager {
-
-    //
-    // XMLComponentManager methods
-    //
-
-    /**
-     * Returns the state of a feature.
-     * 
-     * @param featureId The feature identifier.
-     * 
-     * @throws XMLConfigurationException Thrown on configuration error.
-     */
-    public boolean getFeature(String featureId)
-        throws XMLConfigurationException;
-
-    /**
-     * Returns the value of a property.
-     * 
-     * @param propertyId The property identifier.
-     * 
-    * @throws XMLConfigurationException Thrown on configuration error.
-     */
-    public Object getProperty(String propertyId)
-        throws XMLConfigurationException;
-
-} // interface XMLComponentManager
diff --git a/src/org/apache/xerces/xni/parser/XMLConfigurationException.java b/src/org/apache/xerces/xni/parser/XMLConfigurationException.java
deleted file mode 100644
index b787680..0000000
--- a/src/org/apache/xerces/xni/parser/XMLConfigurationException.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XNIException;
-
-/**
- * An XNI parser configuration exception. This exception class extends
- * <code>XNIException</code> in order to differentiate between general
- * parsing errors and configuration errors.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XMLConfigurationException
-    extends XNIException {
-
-    //
-    // Constants
-    //
-
-    /** Exception type: identifier not recognized. */
-    public static final short NOT_RECOGNIZED = 0;
-
-    /** Exception type: identifier not supported. */
-    public static final short NOT_SUPPORTED = 0;
-
-    //
-    // Data
-    //
-
-    /** Exception type. */
-    protected short fType;
-
-    /** Identifier. */
-    protected String fIdentifier;
-
-    //
-    // Constructors
-    //
-
-    /** 
-     * Constructs a configuration exception with the specified type
-     * and feature/property identifier.
-     *
-     * @param type       The type of the exception.
-     * @param identifier The feature or property identifier.
-     *
-     * @see #NOT_RECOGNIZED
-     * @see #NOT_SUPPORTED
-     */
-    public XMLConfigurationException(short type, String identifier) {
-        super(identifier);
-        fType = type;
-        fIdentifier = identifier;
-    } // <init>(short,String)
-
-    /** 
-     * Constructs a configuration exception with the specified type,
-     * feature/property identifier, and error message
-     *
-     * @param type       The type of the exception.
-     * @param identifier The feature or property identifier.
-     * @param message    The error message.
-     *
-     * @see #NOT_RECOGNIZED
-     * @see #NOT_SUPPORTED
-     */
-    public XMLConfigurationException(short type, String identifier,
-                                     String message) {
-        super(message);
-        fType = type;
-        fIdentifier = identifier;
-    } // <init>(short,String,String)
-
-    //
-    // Public methods
-    //
-
-    /** 
-     * Returns the exception type. 
-     *
-     * @see #NOT_RECOGNIZED
-     * @see #NOT_SUPPORTED
-     */
-    public short getType() {
-        return fType;
-    } // getType():short
-
-    /** Returns the feature or property identifier. */
-    public String getIdentifier() {
-        return fIdentifier;
-    } // getIdentifier():String
-
-} // class XMLConfigurationException
diff --git a/src/org/apache/xerces/xni/parser/XMLDTDContentModelFilter.java b/src/org/apache/xerces/xni/parser/XMLDTDContentModelFilter.java
deleted file mode 100644
index fc45c2b..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDTDContentModelFilter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-
-/**
- * Defines a DTD content model filter that acts as both a receiver and 
- * an emitter of DTD content model events.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDTDContentModelFilter 
-    extends XMLDTDContentModelHandler, XMLDTDContentModelSource {
-
-} // interface XMLDTDContentModelFilter
diff --git a/src/org/apache/xerces/xni/parser/XMLDTDContentModelSource.java b/src/org/apache/xerces/xni/parser/XMLDTDContentModelSource.java
deleted file mode 100644
index 87bc723..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDTDContentModelSource.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-
-/**
- * Defines a DTD content model source. In other words, any object that
- * implements this interface is able to emit DTD content model "events" 
- * to the registered DTD content model handler. These events could be
- * produced by parsing an XML document's internal or external subset, 
- * could be generated from some other source, or could be created 
- * programmatically. This interface does not say <em>how</em> the events
- * are created, only that the implementor is able to emit them.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDTDContentModelSource {
-
-    //
-    // XMLDTDContentModelSource methods
-    //
-
-    /** Sets the DTD content model handler. */
-    public void setDTDContentModelHandler(XMLDTDContentModelHandler handler);
-
-} // interface XMLDTDContentModelSource
diff --git a/src/org/apache/xerces/xni/parser/XMLDTDFilter.java b/src/org/apache/xerces/xni/parser/XMLDTDFilter.java
deleted file mode 100644
index 131f973..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDTDFilter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XMLDTDHandler;
-
-/**
- * Defines a DTD filter that acts as both a receiver and an emitter
- * of DTD events.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDTDFilter 
-    extends XMLDTDHandler, XMLDTDSource {
-
-} // interface XMLDTDFilter
diff --git a/src/org/apache/xerces/xni/parser/XMLDTDScanner.java b/src/org/apache/xerces/xni/parser/XMLDTDScanner.java
deleted file mode 100644
index d233da8..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDTDScanner.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import java.io.IOException;
-import org.apache.xerces.xni.XNIException;
-
-/**
- * This interface defines a generic DTD scanner. This interface
- * allows a scanner to be used interchangably in existing parser
- * configurations.
- * <p>
- * If the parser configuration uses a DTD scanner that implements
- * this interface, components should be able to query the scanner
- * instance from the component manager using the following property 
- * identifier:
- * <blockquote>
- *  "http://apache.org/xml/properties/internal/dtd-scanner"
- * </blockquote>
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDTDScanner 
-    extends XMLDTDSource, XMLDTDContentModelSource {
-
-    //
-    // XMLDTDScanner methods
-    //
-
-    /** 
-     * Sets the input source. 
-     *
-     * @param inputSource The input source.
-     *
-     * @throws IOException Thrown on i/o error.
-     */
-    public void setInputSource(XMLInputSource inputSource) throws IOException;
-
-    /** 
-     * Scans the internal subset of the document.
-     *
-     * @param complete True if the scanner should scan the document
-     *                 completely, pushing all events to the registered
-     *                 document handler. A value of false indicates that
-     *                 that the scanner should only scan the next portion
-     *                 of the document and return. A scanner instance is
-     *                 permitted to completely scan a document if it does
-     *                 not support this "pull" scanning model.
-     * @param standalone True if the document was specified as standalone.
-     *                   This value is important for verifying certain
-     *                   well-formedness constraints.
-     * @param hasExternalDTD True if the document has an external DTD.
-     *                       This allows the scanner to properly notify
-     *                       the handler of the end of the DTD in the
-     *                       absence of an external subset.
-     *
-     * @returns True if there is more to scan, false otherwise.
-     */
-    public boolean scanDTDInternalSubset(boolean complete, boolean standalone,
-                                         boolean hasExternalSubset)
-        throws IOException, XNIException;
-
-    /**
-     * Scans the external subset of the document.
-     *
-     * @param complete True if the scanner should scan the document
-     *                 completely, pushing all events to the registered
-     *                 document handler. A value of false indicates that
-     *                 that the scanner should only scan the next portion
-     *                 of the document and return. A scanner instance is
-     *                 permitted to completely scan a document if it does
-     *                 not support this "pull" scanning model.
-     *
-     * @returns True if there is more to scan, false otherwise.
-     */
-    public boolean scanDTDExternalSubset(boolean complete) 
-        throws IOException, XNIException;
-
-} // interface XMLDTDScanner
diff --git a/src/org/apache/xerces/xni/parser/XMLDTDSource.java b/src/org/apache/xerces/xni/parser/XMLDTDSource.java
deleted file mode 100644
index f05a788..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDTDSource.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XMLDTDHandler;
-
-/**
- * Defines a DTD source. In other words, any object that implements
- * this interface is able to emit DTD "events" to the registered
- * DTD handler. These events could be produced by parsing an XML
- * document's internal or external subset, could be generated from 
- * some other source, or could be created programmatically. This 
- * interface does not say <em>how</em> the events are created, only 
- * that the implementor is able to emit them.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDTDSource {
-
-    //
-    // XMLDTDSource methods
-    //
-
-    /** Sets the DTD handler. */
-    public void setDTDHandler(XMLDTDHandler handler);
-
-} // interface XMLDTDSource
diff --git a/src/org/apache/xerces/xni/parser/XMLDocumentFilter.java b/src/org/apache/xerces/xni/parser/XMLDocumentFilter.java
deleted file mode 100644
index 69f0e66..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDocumentFilter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XMLDocumentHandler;
-
-/**
- * Defines a document filter that acts as both a receiver and an emitter
- * of document events.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDocumentFilter 
-    extends XMLDocumentHandler, XMLDocumentSource {
-
-} // interface XMLDocumentFilter
diff --git a/src/org/apache/xerces/xni/parser/XMLDocumentScanner.java b/src/org/apache/xerces/xni/parser/XMLDocumentScanner.java
deleted file mode 100644
index e2ec9a5..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDocumentScanner.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import java.io.IOException;
-import org.apache.xerces.xni.XNIException;
-
-/**
- * This interface defines a generic document scanner. This interface
- * allows a scanner to be used interchangably in existing parser
- * configurations.
- * <p>
- * If the parser configuration uses a document scanner that implements
- * this interface, components should be able to query the scanner
- * instance from the component manager using the following property 
- * identifier:
- * <blockquote>
- *  "http://apache.org/xml/properties/internal/document-scanner"
- * </blockquote>
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDocumentScanner 
-    extends XMLDocumentSource {
-
-    //
-    // XMLDocumentScanner methods
-    //
-
-    /** 
-     * Sets the input source. 
-     *
-     * @param inputSource The input source.
-     *
-     * @throws IOException Thrown on i/o error.
-     */
-    public void setInputSource(XMLInputSource inputSource) throws IOException;
-
-    /** 
-     * Scans a document.
-     *
-     * @param complete True if the scanner should scan the document
-     *                 completely, pushing all events to the registered
-     *                 document handler. A value of false indicates that
-     *                 that the scanner should only scan the next portion
-     *                 of the document and return. A scanner instance is
-     *                 permitted to completely scan a document if it does
-     *                 not support this "pull" scanning model.
-     *
-     * @returns True if there is more to scan, false otherwise.
-     */
-    public boolean scanDocument(boolean complete)
-        throws IOException, XNIException;
-
-} // interface XMLDocumentScanner
diff --git a/src/org/apache/xerces/xni/parser/XMLDocumentSource.java b/src/org/apache/xerces/xni/parser/XMLDocumentSource.java
deleted file mode 100644
index d57ff86..0000000
--- a/src/org/apache/xerces/xni/parser/XMLDocumentSource.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XMLDocumentHandler;
-
-/**
- * Defines a document source. In other words, any object that implements
- * this interface is able to emit document "events" to the registered
- * document handler. These events could be produced by parsing an XML
- * document, could be generated from some other source, or could be
- * created programmatically. This interface does not say <em>how</em>
- * the events are created, only that the implementor is able to emit
- * them.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLDocumentSource {
-
-    //
-    // XMLDocumentSource methods
-    //
-
-    /** Sets the document handler. */
-    public void setDocumentHandler(XMLDocumentHandler handler);
-
-} // interface XMLDocumentSource
diff --git a/src/org/apache/xerces/xni/parser/XMLEntityResolver.java b/src/org/apache/xerces/xni/parser/XMLEntityResolver.java
deleted file mode 100644
index d6d0511..0000000
--- a/src/org/apache/xerces/xni/parser/XMLEntityResolver.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import java.io.IOException;
-
-import org.apache.xerces.xni.XNIException;
-
-/**
- * This interface is used to resolve external parsed entities. The
- * application can register an object that implements this interface
- * with the parser configuration in order to intercept entities and
- * resolve them explicitly. If the registered entity resolver cannot
- * resolve the entity, it should return <code>null</code> so that the
- * parser will try to resolve the entity using a default mechanism.
- *
- * @see XMLParserConfiguration
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLEntityResolver {
-
-    //
-    // XMLEntityResolver methods
-    //
-
-    /**
-     * Resolves an external parsed entity. If the entity cannot be
-     * resolved, this method should return null.
-     *
-     * @param publicId
-     * @param systemId
-     * @param baseSystemId The base system identifier.
-     *
-     * @throws XNIException Thrown on general error.
-     * @throws IOException  Thrown if resolved entity stream cannot be
-     *                      opened or some other i/o error occurs.
-     */
-    public XMLInputSource resolveEntity(String publicId, String systemId,
-                                        String baseSystemId)
-        throws XNIException, IOException;
-
-} // interface XMLEntityResolver
diff --git a/src/org/apache/xerces/xni/parser/XMLErrorHandler.java b/src/org/apache/xerces/xni/parser/XMLErrorHandler.java
deleted file mode 100644
index b555336..0000000
--- a/src/org/apache/xerces/xni/parser/XMLErrorHandler.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XNIException;
-
-/**
- * An interface for handling errors. If the application is interested
- * in error notifications, then it can register an error handler object
- * that implements this interface with the parser configuration.
- *
- * @see XMLParserConfiguration
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLErrorHandler {
-
-    //
-    // XMLErrorHandler methods
-    //
-
-    /**
-     * Reports a warning. Warnings are non-fatal and can be safely ignored
-     * by most applications.
-     *
-     * @param domain    The domain of the warning. The domain can be any
-     *                  string but is suggested to be a valid URI. The
-     *                  domain can be used to conveniently specify a web
-     *                  site location of the relevent specification or
-     *                  document pertaining to this warning.
-     * @param key       The warning key. This key can be any string and
-     *                  is implementation dependent.
-     * @param exception Exception.
-     *
-     * @throws XNIException Thrown to signal that the parser should stop
-     *                      parsing the document.
-     */
-    public void warning(String domain, String key, 
-                        XMLParseException exception) throws XNIException;
-
-    /**
-     * Reports an error. Errors are non-fatal and usually signify that the
-     * document is invalid with respect to its grammar(s).
-     *
-     * @param domain    The domain of the error. The domain can be any
-     *                  string but is suggested to be a valid URI. The
-     *                  domain can be used to conveniently specify a web
-     *                  site location of the relevent specification or
-     *                  document pertaining to this error.
-     * @param key       The error key. This key can be any string and
-     *                  is implementation dependent.
-     * @param exception Exception.
-     *
-     * @throws XNIException Thrown to signal that the parser should stop
-     *                      parsing the document.
-     */
-    public void error(String domain, String key, 
-                      XMLParseException exception) throws XNIException;
-
-    /**
-     * Report a fatal error. Fatal errors usually occur when the document
-     * is not well-formed and signifies that the parser cannot continue
-     * normal operation.
-     * <p>
-     * <strong>Note:</strong> The error handler should <em>always</em>
-     * throw an <code>XNIException</code> from this method. This exception
-     * can either be the same exception that is passed as a parameter to
-     * the method or a new XNI exception object. If the registered error
-     * handler fails to throw an exception, the continuing operation of
-     * the parser is undetermined.
-     *
-     * @param domain    The domain of the fatal error. The domain can be 
-     *                  any string but is suggested to be a valid URI. The
-     *                  domain can be used to conveniently specify a web
-     *                  site location of the relevent specification or
-     *                  document pertaining to this fatal error.
-     * @param key       The fatal error key. This key can be any string 
-     *                  and is implementation dependent.
-     * @param exception Exception.
-     *
-     * @throws XNIException Thrown to signal that the parser should stop
-     *                      parsing the document.
-     */
-    public void fatalError(String domain, String key, 
-                           XMLParseException exception) throws XNIException;
-
-} // interface XMLErrorHandler
diff --git a/src/org/apache/xerces/xni/parser/XMLInputSource.java b/src/org/apache/xerces/xni/parser/XMLInputSource.java
deleted file mode 100644
index bb7a385..0000000
--- a/src/org/apache/xerces/xni/parser/XMLInputSource.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import java.io.InputStream;
-import java.io.Reader;
-
-/**
- * This class represents an input source for an XML document. The
- * basic properties of an input source are the following:
- * <ul>
- *  <li>public identifier</li>
- *  <li>system identifier</li>
- *  <li>byte stream or character stream</li>
- *  <li>
- * </ul>
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XMLInputSource {
-
-    //
-    // Data
-    //
-
-    /** Public identifier. */
-    protected String fPublicId;
-
-    /** System identifier. */
-    protected String fSystemId;
-
-    /** Base system identifier. */
-    protected String fBaseSystemId;
-
-    /** Byte stream. */
-    protected InputStream fByteStream;
-
-    /** Character stream. */
-    protected Reader fCharStream;
-
-    /** Encoding. */
-    protected String fEncoding;
-
-    //
-    // Constructors
-    //
-
-    /** 
-     * Constructs an input source from just the public and system
-     * identifiers, leaving resolution of the entity and opening of
-     * the input stream up to the caller.
-     *
-     * @param publicId     The public identifier, if known.
-     * @param systemId     The system identifier. This value should
-     *                     always be set, if possible, and can be
-     *                     relative or absolute. If the system identifier
-     *                     is relative, then the base system identifier
-     *                     should be set.
-     * @param baseSystemId The base system identifier. This value should
-     *                     always be set to the fully expanded URI of the
-     *                     base system identifier, if possible.
-     */
-    public XMLInputSource(String publicId, String systemId,  
-                          String baseSystemId) {
-        fPublicId = publicId;
-        fSystemId = systemId;
-        fBaseSystemId = baseSystemId;
-    } // <init>(String,String,String)
-
-    /**
-     * Constructs an input source from a byte stream.
-     *
-     * @param publicId     The public identifier, if known.
-     * @param systemId     The system identifier. This value should
-     *                     always be set, if possible, and can be
-     *                     relative or absolute. If the system identifier
-     *                     is relative, then the base system identifier
-     *                     should be set.
-     * @param baseSystemId The base system identifier. This value should
-     *                     always be set to the fully expanded URI of the
-     *                     base system identifier, if possible.
-     * @param byteStream   The byte stream.
-     * @param encoding     The encoding of the byte stream, if known.
-     */
-    public XMLInputSource(String publicId, String systemId,  
-                          String baseSystemId, InputStream byteStream,
-                          String encoding) {
-        fPublicId = publicId;
-        fSystemId = systemId;
-        fBaseSystemId = baseSystemId;
-        fByteStream = byteStream;
-        fEncoding = encoding;
-    } // <init>(String,String,String,InputStream,String)
-
-    /**
-     * Constructs an input source from a character stream.
-     *
-     * @param publicId     The public identifier, if known.
-     * @param systemId     The system identifier. This value should
-     *                     always be set, if possible, and can be
-     *                     relative or absolute. If the system identifier
-     *                     is relative, then the base system identifier
-     *                     should be set.
-     * @param baseSystemId The base system identifier. This value should
-     *                     always be set to the fully expanded URI of the
-     *                     base system identifier, if possible.
-     * @param charStream   The character stream.
-     * @param encoding     The original encoding of the byte stream
-     *                     used by the reader, if known.
-     */
-    public XMLInputSource(String publicId, String systemId,  
-                          String baseSystemId, Reader charStream,
-                          String encoding) {
-        fPublicId = publicId;
-        fSystemId = systemId;
-        fBaseSystemId = baseSystemId;
-        fCharStream = charStream;
-        fEncoding = encoding;
-    } // <init>(String,String,String,Reader,String)
-
-    //
-    // Public methods
-    //
-
-    /** 
-     * Sets the public identifier. 
-     *
-     * @param publicId The new public identifier.
-     */
-    public void setPublicId(String publicId) {
-        fPublicId = publicId;
-    } // setPublicId(String)
-
-    /** Returns the public identifier. */
-    public String getPublicId() {
-        return fPublicId;
-    } // getPublicId():String
-
-    /** 
-     * Sets the system identifier. 
-     *
-     * @param systemId The new system identifier.
-     */
-    public void setSystemId(String systemId) {
-        fSystemId = systemId;
-    } // setSystemId(String)
-
-    /** Returns the system identifier. */
-    public String getSystemId() {
-        return fSystemId;
-    } // getSystemId():String
-
-    /** 
-     * Sets the base system identifier. 
-     *
-     * @param baseSystemId The new base system identifier.
-     */
-    public void setBaseSystemId(String baseSystemId) {
-        fBaseSystemId = baseSystemId;
-    } // setBaseSystemId(String)
-
-    /** Returns the base system identifier. */
-    public String getBaseSystemId() {
-        return fBaseSystemId;
-    } // getBaseSystemId():String
-
-    /**
-     * Sets the byte stream. If the byte stream is not already opened
-     * when this object is instantiated, then the code that opens the
-     * stream should also set the byte stream on this object. Also, if
-     * the encoding is auto-detected, then the encoding should also be
-     * set on this object.
-     *
-     * @param byteStream The new byte stream.
-     */
-    public void setByteStream(InputStream byteStream) {
-        fByteStream = byteStream;
-    } // setByteStream(InputSource)
-
-    /** Returns the byte stream. */
-    public InputStream getByteStream() {
-        return fByteStream;
-    } // getByteStream():InputStream
-
-    /**
-     * Sets the character stream. If the character stream is not already
-     * opened when this object is instantiated, then the code that opens 
-     * the stream should also set the character stream on this object. 
-     * Also, the encoding of the byte stream used by the reader should 
-     * also be set on this object, if known.
-     *
-     * @param charStream The new character stream.
-     *
-     * @see #setEncoding
-     */
-    public void setCharacterStream(Reader charStream) {
-        fCharStream = charStream;
-    } // setCharacterStream(Reader)
-
-    /** Returns the character stream. */
-    public Reader getCharacterStream() {
-        return fCharStream;
-    } // getCharacterStream():Reader
-
-    /**
-     * Sets the encoding of the stream.
-     *
-     * @param encoding The new encoding.
-     */
-    public void setEncoding(String encoding) {
-        fEncoding = encoding;
-    } // setEncoding(String)
-
-    /** Returns the encoding of the stream, or null if not known. */
-    public String getEncoding() {
-        return fEncoding;
-    } // getEncoding():String
-
-} // class XMLInputSource
diff --git a/src/org/apache/xerces/xni/parser/XMLParseException.java b/src/org/apache/xerces/xni/parser/XMLParseException.java
deleted file mode 100644
index 25f381a..0000000
--- a/src/org/apache/xerces/xni/parser/XMLParseException.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import org.apache.xerces.xni.XMLLocator;
-import org.apache.xerces.xni.XNIException;
-
-/**
- * A parsing exception. This exception is different from the standard
- * XNI exception in that it stores the location in the document (or
- * its entities) where the exception occurred.
- * 
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class XMLParseException
-    extends XNIException {
-
-    //
-    // Data
-    //
-
-    /** Public identifier. */
-    protected String fPublicId;
-
-    /** System identifier. */
-    protected String fSystemId;
-
-    /** Base system identifier. */
-    protected String fBaseSystemId;
-
-    /** Line number. */
-    protected int fLineNumber = -1;
-    
-    /** Column number. */
-    protected int fColumnNumber = -1;
-
-    //
-    // Constructors
-    //
-
-    /** Constructs a parse exception. */
-    public XMLParseException(XMLLocator locator, String message) {
-        super(message);
-        if (locator != null) {
-            fPublicId = locator.getPublicId();
-            fSystemId = locator.getSystemId();
-            fBaseSystemId = locator.getBaseSystemId();
-            fLineNumber = locator.getLineNumber();
-            fColumnNumber = locator.getColumnNumber();
-        }
-    } // <init>(XMLLocator,String)
-
-    /** Constructs a parse exception. */
-    public XMLParseException(XMLLocator locator,
-                             String message, Exception exception) {
-        super(message, exception);
-        fPublicId = locator.getPublicId();
-        fSystemId = locator.getSystemId();
-        fBaseSystemId = locator.getBaseSystemId();
-        fLineNumber = locator.getLineNumber();
-        fColumnNumber = locator.getColumnNumber();
-    } // <init>(XMLLocator,String,Exception)
-
-    //
-    // Public methods
-    //
-
-    /** Returns the public identifier. */
-    public String getPublicId() {
-        return fPublicId;
-    } // getPublicId():String
-
-    /** Returns the system identifier. */
-    public String getSystemId() {
-        return fSystemId;
-    } // getSystemId():String
-
-    /** Returns the base system identifier. */
-    public String getBaseSystemId() {
-        return fBaseSystemId;
-    } // getBaseSystemId():String
-
-    /** Returns the line number. */
-    public int getLineNumber() {
-        return fLineNumber;
-    } // getLineNumber():int
-
-    /** Returns the row number. */
-    public int getColumnNumber() {
-        return fColumnNumber;
-    } // getRowNumber():int
-
-    //
-    // Object methods
-    //
-
-    /** Returns a string representation of this object. */
-    public String toString() {
-
-        StringBuffer str = new StringBuffer();
-        if (fPublicId != null) {
-            str.append(fPublicId);
-        }
-        str.append(':');
-        if (fPublicId != null) {
-            str.append(fPublicId);
-        }
-        str.append(':');
-        if (fSystemId != null) {
-            str.append(fSystemId);
-        }
-        str.append(':');
-        if (fBaseSystemId != null) {
-            str.append(fBaseSystemId);
-        }
-        str.append(':');
-        str.append(fLineNumber);
-        str.append(':');
-        str.append(fColumnNumber);
-        str.append(':');
-        String message = getMessage();
-        if (message == null) {
-            Exception exception = getException();
-            if (exception != null) {
-                message = exception.getMessage();
-            }
-        }
-        if (message != null) {
-            str.append(message);
-        }
-        return str.toString();
-
-    } // toString():String
-
-} // XMLParseException
diff --git a/src/org/apache/xerces/xni/parser/XMLParserConfiguration.java b/src/org/apache/xerces/xni/parser/XMLParserConfiguration.java
deleted file mode 100644
index 2623870..0000000
--- a/src/org/apache/xerces/xni/parser/XMLParserConfiguration.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import java.io.IOException;
-import java.util.Locale;
-
-import org.apache.xerces.xni.XMLDocumentHandler;
-import org.apache.xerces.xni.XMLDTDHandler;
-import org.apache.xerces.xni.XMLDTDContentModelHandler;
-import org.apache.xerces.xni.XNIException;
-
-/**
- * Represents a parser configuration. The parser configuration maintains
- * a table of recognized features and properties, assembles components
- * for the parsing pipeline, and is responsible for initiating parsing
- * of an XML document.
- * <p>
- * By separating the configuration of a parser from the specific parser
- * instance, applications can create new configurations and re-use the
- * existing parser components and external API generators (e.g. the
- * DOMParser and SAXParser).
- * <p>
- * The internals of any specific parser configuration instance are hidden.
- * Therefore, each configuration may implement the parsing mechanism any
- * way necessary. However, the parser configuration should follow these
- * guidelines:
- * <ul>
- *  <li>
- *   Call the <code>reset</code> method on each component before parsing.
- *   This is only required if the configuration is re-using existing
- *   components that conform to the <code>XMLComponent</code> interface.
- *   If the configuration uses all custom parts, then it is free to 
- *   implement everything as it sees fit as long as it follows the
- *   other guidelines.
- *  </li>
- *  <li>
- *   Call the <code>setFeature</code> and <code>setProperty</code> method
- *   on each component during parsing to propagate features and properties
- *   that have changed. This is only required if the configuration is
- *   re-using existing components that conform to the <code>XMLComponent</code>
- *   interface. If the configuration uses all custom parts, then it is free
- *   to implement everything as it sees fit as long as it follows the other
- *   guidelines.
- *  </li>
- *  <li>
- *   Pass the same unique String references for all symbols that are
- *   propagated to the registered handlers. Symbols include, but may not
- *   be limited to, the names of elements and attributes (including their
- *   uri, prefix, and localpart). This is suggested but not an absolute 
- *   must. However, the standard parser components may require access to 
- *   the same symbol table for creation of unique symbol references to be
- *   propagated in the XNI pipeline.
- *  </li>
- * </ul>
- *
- * @author Arnaud  Le Hors, IBM
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLParserConfiguration
-    extends XMLComponentManager {
-
-    //
-    // XMLParserConfiguration methods
-    //
-
-    // parsing
-
-    /**
-     * Parse an XML document.
-     * <p>
-     * The parser can use this method to instruct this configuration
-     * to begin parsing an XML document from any valid input source
-     * (a character stream, a byte stream, or a URI).
-     * <p>
-     * Parsers may not invoke this method while a parse is in progress.
-     * Once a parse is complete, the parser may then parse another XML
-     * document.
-     * <p>
-     * This method is synchronous: it will not return until parsing
-     * has ended.  If a client application wants to terminate 
-     * parsing early, it should throw an exception.
-     *
-     * @param source The input source for the top-level of the
-     *               XML document.
-     *
-     * @exception XNIException Any XNI exception, possibly wrapping 
-     *                         another exception.
-     * @exception IOException  An IO exception from the parser, possibly
-     *                         from a byte stream or character stream
-     *                         supplied by the parser.
-     */
-    public void parse(XMLInputSource inputSource) 
-        throws XNIException, IOException;
-
-    // generic configuration
-
-    /**
-     * Allows a parser to add parser specific features to be recognized
-     * and managed by the parser configuration.
-     *
-     * @param featureIds An array of the additional feature identifiers 
-     *                   to be recognized.
-     */
-    public void addRecognizedFeatures(String[] featureIds);
-
-    /**
-     * Sets the state of a feature. This method is called by the parser
-     * and gets propagated to components in this parser configuration.
-     * 
-     * @param featureId The feature identifier.
-     * @param state     The state of the feature.
-     *
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public void setFeature(String featureId, boolean state)
-        throws XMLConfigurationException;
-
-    /**
-     * Returns the state of a feature.
-     * 
-     * @param featureId The feature identifier.
-     * 
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public boolean getFeature(String featureId)
-        throws XMLConfigurationException;
-
-    /**
-     * Allows a parser to add parser specific properties to be recognized
-     * and managed by the parser configuration.
-     *
-     * @param propertyIds An array of the additional property identifiers 
-     *                    to be recognized.
-     */
-    public void addRecognizedProperties(String[] propertyIds);
-
-    /**
-     * Sets the value of a property. This method is called by the parser
-     * and gets propagated to components in this parser configuration.
-     * 
-     * @param propertyId The property identifier.
-     * @param value      The value of the property.
-     *
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public void setProperty(String propertyId, Object value)
-        throws XMLConfigurationException;
-
-    /**
-     * Returns the value of a property.
-     * 
-     * @param propertyId The property identifier.
-     * 
-     * @throws XMLConfigurationException Thrown if there is a configuration
-     *                                   error.
-     */
-    public Object getProperty(String propertyId)
-        throws XMLConfigurationException;
-
-    // handlers
-
-    /**
-     * Sets the error handler.
-     *
-     * @param errorHandler The error resolver.
-     */
-    public void setErrorHandler(XMLErrorHandler errorHandler);
-
-    /** Returns the registered error handler. */
-    public XMLErrorHandler getErrorHandler();
-
-    /**
-     * Sets the document handler to receive information about the document.
-     * 
-     * @param documentHandler The document handler.
-     */
-    public void setDocumentHandler(XMLDocumentHandler documentHandler);
-
-    /** Returns the registered document handler. */
-    public XMLDocumentHandler getDocumentHandler();
-
-    /**
-     * Sets the DTD handler.
-     * 
-     * @param dtdHandler The DTD handler.
-     */
-    public void setDTDHandler(XMLDTDHandler dtdHandler);
-
-    /** Returns the registered DTD handler. */
-    public XMLDTDHandler getDTDHandler();
-
-    /**
-     * Sets the DTD content model handler.
-     * 
-     * @param dtdContentModelHandler The DTD content model handler.
-     */
-    public void setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler);
-
-    /** Returns the registered DTD content model handler. */
-    public XMLDTDContentModelHandler getDTDContentModelHandler();
-
-    // other settings
-
-    /**
-     * Sets the entity resolver.
-     *
-     * @param entityResolver The new entity resolver.
-     */
-    public void setEntityResolver(XMLEntityResolver entityResolver);
-
-    /** Returns the registered entity resolver. */
-    public XMLEntityResolver getEntityResolver();
-
-    /**
-     * Set the locale to use for messages.
-     *
-     * @param locale The locale object to use for localization of messages.
-     *
-     * @exception XNIException Thrown if the parser does not support the
-     *                         specified locale.
-     */
-    public void setLocale(Locale locale) throws XNIException;
-
-    /** Returns the locale. */
-    public Locale getLocale();
-
-} // interface XMLParserConfiguration
diff --git a/src/org/apache/xerces/xni/parser/XMLPullParserConfiguration.java b/src/org/apache/xerces/xni/parser/XMLPullParserConfiguration.java
deleted file mode 100644
index bedfc0d..0000000
--- a/src/org/apache/xerces/xni/parser/XMLPullParserConfiguration.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.parser;
-
-import java.io.IOException;
-
-import org.apache.xerces.xni.XNIException;
-
-/**
- * Represents a parser configuration that can be used as the 
- * configuration for a "pull" parser. A pull parser allows the
- * application to drive the parser instead of having document
- * information events "pushed" to the registered handlers.
- * <p>
- * A pull parser using this type of configuration first calls
- * the <code>setInputSource</code> method. After the input
- * source is set, the pull parser repeatedly calls the
- * <code>parse(boolean):boolean</code> method. This method 
- * returns a value of true if there is more to parse in the
- * document.
- * <p>
- * Calling the <code>parse(XMLInputSource)</code> is equivalent
- * to setting the input source and calling the 
- * <code>parse(boolean):boolean</code> method with a "complete" 
- * value of <code>true</code>.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public interface XMLPullParserConfiguration
-    extends XMLParserConfiguration {
-
-    //
-    // XMLPullParserConfiguration methods
-    //
-
-    // parsing
-
-    /**
-     * Sets the input source for the document to parse.
-     *
-     * @param inputSource The document's input source.
-     *
-     * @exception XMLConfigurationException Thrown if there is a 
-     *                        configuration error when initializing the
-     *                        parser.
-     * @exception IOException Thrown on I/O error.
-     *
-     * @see #parse(boolean)
-     */
-    public void setInputSource(XMLInputSource inputSource)
-        throws XMLConfigurationException, IOException;
-
-    /**
-     * Parses the document in a pull parsing fashion.
-     *
-     * @param complete True if the pull parser should parse the
-     *                 remaining document completely.
-     *
-     * @returns True if there is more document to parse.
-     *
-     * @exception XNIException Any XNI exception, possibly wrapping 
-     *                         another exception.
-     * @exception IOException  An IO exception from the parser, possibly
-     *                         from a byte stream or character stream
-     *                         supplied by the parser.
-     *
-     * @see #setInputSource
-     */
-    public boolean parse(boolean complete) throws XNIException, IOException;
-
-} // interface XMLPullParserConfiguration
diff --git a/src/org/apache/xerces/xni/psvi/AttributePSVI.java b/src/org/apache/xerces/xni/psvi/AttributePSVI.java
deleted file mode 100644
index 4cf18a7..0000000
--- a/src/org/apache/xerces/xni/psvi/AttributePSVI.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.psvi;
-
-public interface AttributePSVI extends ItemPSVI{
-}
diff --git a/src/org/apache/xerces/xni/psvi/ElementPSVI.java b/src/org/apache/xerces/xni/psvi/ElementPSVI.java
deleted file mode 100644
index 32f832c..0000000
--- a/src/org/apache/xerces/xni/psvi/ElementPSVI.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.psvi;
-
-public interface ElementPSVI extends ItemPSVI {
-
-    /**
-     * [nil] 
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-nil>XML Schema Part 1: Structures [nil]</a>
-     * @return true if clause 3.2 of Element Locally Valid (Element) (3.3.4) above is satisfied, otherwise false 
-     */
-    public boolean isNil();
-
-
-    /**
-     * [notation public] 
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-notation_public>XML Schema Part 1: Structures [notation public]</a>
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-notation>XML Schema Part 1: Structures [notation]</a>
-     * @return The value of the {public identifier} of that notation declaration. 
-     */
-    public String getNotationPublicId();
-
-
-    /**
-     * [notation system] 
-     * 
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-notation_system>XML Schema Part 1: Structures [notation system]</a>
-     * @return The value of the {system identifier} of that notation declaration. 
-     */
-    public String getNotationSystemId();
-
-    /**
-     *  
-     * [schema namespace]
-     * 
-     * @return A namespace name or absent.
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#nsi-schema_namespace>XML Schema Part 1: Structures [schema namespace]</a>
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_information>XML Schema Part 1: Structures [schema information]</a>
-     */
-    public String getSchemaNamespace();
-
-}
diff --git a/src/org/apache/xerces/xni/psvi/ItemPSVI.java b/src/org/apache/xerces/xni/psvi/ItemPSVI.java
deleted file mode 100644
index 81343d4..0000000
--- a/src/org/apache/xerces/xni/psvi/ItemPSVI.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000,2001 The Apache Software Foundation.  
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 2001, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package org.apache.xerces.xni.psvi;
-
-import org.apache.xerces.xni.QName;
-/**
- *
- *
- * @author Elena Litani, IBM
- *
- */
-
-public interface ItemPSVI {
-
-    /** Validity value indicating that validation has either not 
-    been performed or that a strict assessment of validity could 
-    not be performed  
-    */
-    public static final short UNKNOWN_VALIDITY               = 0;
-
-    /** Validity value indicating that validation has been strictly
-     assessed and the element in question is invalid according to the 
-     rules of schema validation.
-    */
-    public static final short INVALID_VALIDITY               = 1;
-
-    /** Validity value indicating that validation has been strictly 
-     assessed and the element in question is valid according to the rules 
-     of schema validation.
-     */
-    public static final short VALID_VALIDITY                 = 2;
-
-    /** Validation status indicating that schema validation has been 
-     performed and the element in question has specifically been skipped.   
-     */
-    public static final short NO_VALIDATION                  = 1;
-
-    /** Validation status indicating that schema validation has been 
-    performed on the element in question under the rules of lax validation.
-    */
-    public static final short PARTIAL_VALIDATION             = 2;
-
-    /**  Validation status indicating that full schema validation has been 
-    performed on the element.  */
-    public static final short FULL_VALIDATION                = 3;
-
-    /**
-     * [member type definition anonymous]
-     * @ see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_anonymous">XML Schema Part 1: Structures [member type definition anonymous]</a>
-     * @return true if the {name} of the actual member type definition is absent, 
-     *         otherwise false.
-     */
-    public boolean isMemberTypeAnonymous();
-
-    /**
-     * [member type definition name]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_name">XML Schema Part 1: Structures [member type definition name]</a>
-     * @return The {name} of the actual member type definition, if it is not absent.
-     *         If it is absent, schema processors may, but need not, provide a
-     *         value unique to the definition.
-     */
-    public String getMemberTypeName();
-
-    /**
-     * [member type definition namespace]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_namespace">XML Schema Part 1: Structures [member type definition namespace]</a>
-     * @return The {target namespace} of the actual member type definition.
-     */
-    public String getMemberTypeNamespace();
-
-    /**
-     * [schema default]
-     * 
-     * @return The canonical lexical representation of the declaration's {value constraint} value.
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default">XML Schema Part 1: Structures [schema default]</a>
-     */
-    public String schemaDefault();
-
-    /**
-     * [schema normalized value] 
-     * 
-     * 
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value">XML Schema Part 1: Structures [schema normalized value]</a>
-     * @return the normalized value of this item after validation
-     */
-    public String schemaNormalizedValue();
-
-    /**
-     * [schema specified] 
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_specified">XML Schema Part 1: Structures [schema specified]</a>
-     * @return true if return is schema, false if infoset
-     */
-    public boolean schemaSpecified();
-
-
-    /**
-     * [type definition anonymous]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_anonymous">XML Schema Part 1: Structures [type definition anonymous]</a>
-     * @return true if the {name} of the type definition is absent, otherwise false.
-     */
-    public boolean isTypeAnonymous();
-
-    /**
-     * [type definition name]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_name">XML Schema Part 1: Structures [type definition name]</a>
-     * @return The {name} of the type definition, if it is not absent.
-     *         If it is absent, schema processors may, but need not,
-     *         provide a value unique to the definition.
-     */
-    public String getTypeName();
-
-    /**
-     * [type definition namespace]
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-member_type_definition_namespace">XML Schema Part 1: Structures [type definition namespace]</a>
-     * @return The {target namespace} of the type definition.
-     */
-    public String getTypeNamespace();
-
-    /**
-     * [type definition type] 
-     * 
-     *  @see <a href="http://www.w3.org/TR/xmlschema-1/#a-type_definition_type">XML Schema Part 1: Structures [type definition type]</a>
-     *  @see <a href="http://www.w3.org/TR/xmlschema-1/#e-type_definition_type">XML Schema Part 1: Structures [type definition type]</a>
-     * @return simple or complex, depending on the type definition. 
-     */
-    public short getTypeDefinitionType();
-
-    /**
-     * Determines the extent to which the document has been validated
-     * 
-     * @return return the [validation attempted] property. The possible values are 
-     *         NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION
-     */
-    public short getValidationAttempted();
-
-    /**
-     * Determine the validity of the node with respect 
-     * to the validation being attempted
-     * 
-     * @return return the [validity] property. Possible values are: 
-     *         UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY
-     */
-    public short getValidity();
-
-    /**
-     * A list of error codes generated from validation attempts. 
-     * Need to find all the possible subclause reports that need reporting
-     * 
-     * @return Array of error codes
-     */
-    public String[] getErrorCodes();
-
-
-    /**
-     * [validation context]
-     * // REVISIT: what the return type should be?
-     *             Should we return QName/XPath/ or element info item..?
-     * 
-     * @return The nearest ancestor element information item with a [schema information] property
-     *         (or this element item itself if it has such a property)
-     * @see <a href="http://www.w3.org/TR/xmlschema-1/#e-validation_context">XML Schema Part 1: Structures [validation context]</a>
-     */
-    public String getValidationContext();
-
-}
diff --git a/src/org/apache/xml/serialize/BaseMarkupSerializer.java b/src/org/apache/xml/serialize/BaseMarkupSerializer.java
deleted file mode 100644
index 4ab5dcd..0000000
--- a/src/org/apache/xml/serialize/BaseMarkupSerializer.java
+++ /dev/null
@@ -1,1622 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-// Sep 14, 2000:
-//  Fixed comments to preserve whitespaces and add a line break
-//  when indenting. Reported by Gervase Markham <GRM@dataconnection.com>
-// Sep 14, 2000:
-//  Fixed serializer to report IO exception directly, instead at
-//  the end of document processing.
-//  Reported by Patrick Higgins <phiggins@transzap.com>
-// Sep 13, 2000:
-//   CR in character data will print as &#0D;
-// Aug 25, 2000:
-//   Fixed processing instruction printing inside element content
-//   to not escape content. Reported by Mikael Staldal
-//   <d96-mst@d.kth.se>
-// Aug 25, 2000:
-//   Added ability to omit comments.
-//   Contributed by Anupam Bagchi <abagchi@jtcsv.com>
-// Aug 26, 2000:
-//   Fixed bug in newline handling when preserving spaces.
-//   Contributed by Mike Dusseault <mdusseault@home.com>
-// Aug 29, 2000:
-//   Fixed state.unescaped not being set to false when
-//   entering element state.
-//   Reported by Lowell Vaughn <lvaughn@agillion.com>
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.Writer;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.Vector;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-
-import org.w3c.dom.*;
-
-import org.apache.xerces.dom3.DOMErrorHandler;
-import org.apache.xerces.dom3.DOMError;
-import org.apache.xerces.dom3.DOMLocator;
-import org.apache.xerces.dom.DOMErrorImpl;
-import org.apache.xerces.dom.DOMLocatorImpl;
-
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.Attributes;
-import org.xml.sax.ext.LexicalHandler;
-import org.xml.sax.ext.DeclHandler;
-
-/**
- * Base class for a serializer supporting both DOM and SAX pretty
- * serializing of XML/HTML/XHTML documents. Derives classes perform
- * the method-specific serializing, this class provides the common
- * serializing mechanisms.
- * <p>
- * The serializer must be initialized with the proper writer and
- * output format before it can be used by calling {@link #init}.
- * The serializer can be reused any number of times, but cannot
- * be used concurrently by two threads.
- * <p>
- * If an output stream is used, the encoding is taken from the
- * output format (defaults to <tt>UTF-8</tt>). If a writer is
- * used, make sure the writer uses the same encoding (if applies)
- * as specified in the output format.
- * <p>
- * The serializer supports both DOM and SAX. DOM serializing is done
- * by calling {@link #serialize(Document)} and SAX serializing is done by firing
- * SAX events and using the serializer as a document handler.
- * This also applies to derived class.
- * <p>
- * If an I/O exception occurs while serializing, the serializer
- * will not throw an exception directly, but only throw it
- * at the end of serializing (either DOM or SAX's {@link
- * org.xml.sax.DocumentHandler#endDocument}.
- * <p>
- * For elements that are not specified as whitespace preserving,
- * the serializer will potentially break long text lines at space
- * boundaries, indent lines, and serialize elements on separate
- * lines. Line terminators will be regarded as spaces, and
- * spaces at beginning of line will be stripped.
- * <p>
- * When indenting, the serializer is capable of detecting seemingly
- * element content, and serializing these elements indented on separate
- * lines. An element is serialized indented when it is the first or
- * last child of an element, or immediate following or preceding
- * another element.
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @author <a href="mailto:rahul.srivastava@sun.com">Rahul Srivastava</a>
- * @author Elena Litani, IBM 
- * @see Serializer
- * @see DOMSerializer
- */
-public abstract class BaseMarkupSerializer
-    implements ContentHandler, DocumentHandler, LexicalHandler,
-               DTDHandler, DeclHandler, DOMSerializer, Serializer
-{
-
-    // DOM L3 implementation
-    protected Hashtable fFeatures;
-    protected DOMErrorHandler fDOMErrorHandler;
-    protected final DOMErrorImpl fDOMError = new DOMErrorImpl();
-
-    private EncodingInfo _encodingInfo;
-
-
-    /**
-     * Holds array of all element states that have been entered.
-     * The array is automatically resized. When leaving an element,
-     * it's state is not removed but reused when later returning
-     * to the same nesting level.
-     */
-    private ElementState[]  _elementStates;
-
-
-    /**
-     * The index of the next state to place in the array,
-     * or one plus the index of the current state. When zero,
-     * we are in no state.
-     */
-    private int             _elementStateCount;
-
-
-    /**
-     * Vector holding comments and PIs that come before the root
-     * element (even after it), see {@link #serializePreRoot}.
-     */
-    private Vector          _preRoot;
-
-
-    /**
-     * If the document has been started (header serialized), this
-     * flag is set to true so it's not started twice.
-     */
-    protected boolean       _started;
-
-
-    /**
-     * True if the serializer has been prepared. This flag is set
-     * to false when the serializer is reset prior to using it,
-     * and to true after it has been prepared for usage.
-     */
-    private boolean         _prepared;
-
-
-    /**
-     * Association between namespace URIs (keys) and prefixes (values).
-     * Accumulated here prior to starting an element and placing this
-     * list in the element state.
-     */
-    protected Hashtable     _prefixes;
-
-
-    /**
-     * The system identifier of the document type, if known.
-     */
-    protected String        _docTypePublicId;
-
-
-    /**
-     * The system identifier of the document type, if known.
-     */
-    protected String        _docTypeSystemId;
-
-
-    /**
-     * The output format associated with this serializer. This will never
-     * be a null reference. If no format was passed to the constructor,
-     * the default one for this document type will be used. The format
-     * object is never changed by the serializer.
-     */
-    protected OutputFormat   _format;
-
-
-    /**
-     * The printer used for printing text parts.
-     */
-    protected Printer       _printer;
-
-
-    /**
-     * True if indenting printer.
-     */
-    protected boolean       _indenting;
-
-    /** Temporary buffer to store character data */
-    protected final StringBuffer fStrBuffer = new StringBuffer(40);
-
-    /**
-     * The underlying writer.
-     */
-    private Writer          _writer;
-
-
-    /**
-     * The output stream.
-     */
-    private OutputStream    _output;
-
-    /** Current node that is being processed  */
-    private Node fCurrentNode = null;
-
-    
-
-    //--------------------------------//
-    // Constructor and initialization //
-    //--------------------------------//
-
-
-    /**
-     * Protected constructor can only be used by derived class.
-     * Must initialize the serializer before serializing any document,
-     * see {@link #init}.
-     */
-    protected BaseMarkupSerializer( OutputFormat format )
-    {
-        int i;
-
-        _elementStates = new ElementState[ 10 ];
-        for ( i = 0 ; i < _elementStates.length ; ++i )
-            _elementStates[ i ] = new ElementState();
-        _format = format;
-    }
-
-
-    public DocumentHandler asDocumentHandler()
-        throws IOException
-    {
-        prepare();
-        return this;
-    }
-
-
-    public ContentHandler asContentHandler()
-        throws IOException
-    {
-        prepare();
-        return this;
-    }
-
-
-    public DOMSerializer asDOMSerializer()
-        throws IOException
-    {
-        prepare();
-        return this;
-    }
-
-
-    public void setOutputByteStream( OutputStream output )
-    {
-        if ( output == null )
-            throw new NullPointerException( "SER001 Argument 'output' is null." );
-        _output = output;
-        _writer = null;
-        reset();
-    }
-
-
-    public void setOutputCharStream( Writer writer )
-    {
-        if ( writer == null )
-            throw new NullPointerException( "SER001 Argument 'writer' is null." );
-        _writer = writer;
-        _output = null;
-        reset();
-    }
-
-
-    public void setOutputFormat( OutputFormat format )
-    {
-        if ( format == null )
-            throw new NullPointerException( "SER001 Argument 'format' is null." );
-        _format = format;
-        reset();
-    }
-
-
-    public boolean reset()
-    {
-        if ( _elementStateCount > 1 )
-            throw new IllegalStateException( "Serializer reset in the middle of serialization" );
-        _prepared = false;
-        fCurrentNode = null;
-        fStrBuffer.setLength(0);
-        return true;
-    }
-
-
-    protected void prepare()
-        throws IOException
-    {
-        if ( _prepared )
-            return;
-
-        if ( _writer == null && _output == null )
-            throw new IOException( "SER002 No writer supplied for serializer" );
-        // If the output stream has been set, use it to construct
-        // the writer. It is possible that the serializer has been
-        // reused with the same output stream and different encoding.
-
-        _encodingInfo = _format.getEncodingInfo();
-
-        if ( _output != null ) {
-            _writer = _encodingInfo.getWriter(_output);
-        }
-
-        if ( _format.getIndenting() ) {
-            _indenting = true;
-            _printer = new IndentPrinter( _writer, _format );
-        } else {
-            _indenting = false;
-            _printer = new Printer( _writer, _format );
-        }
-
-        ElementState state;
-
-        _elementStateCount = 0;
-        state = _elementStates[ 0 ];
-        state.namespaceURI = null;
-        state.localName = null;
-        state.rawName = null;
-        state.preserveSpace = _format.getPreserveSpace();
-        state.empty = true;
-        state.afterElement = false;
-        state.afterComment = false;
-        state.doCData = state.inCData = false;
-        state.prefixes = null;
-
-        _docTypePublicId = _format.getDoctypePublic();
-        _docTypeSystemId = _format.getDoctypeSystem();
-        _started = false;
-        _prepared = true;
-    }
-
-
-
-    //----------------------------------//
-    // DOM document serializing methods //
-    //----------------------------------//
-
-
-    /**
-     * Serializes the DOM element using the previously specified
-     * writer and output format. Throws an exception only if
-     * an I/O exception occured while serializing.
-     *
-     * @param elem The element to serialize
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    public void serialize( Element elem )
-        throws IOException
-    {
-        prepare();
-        serializeNode( elem );
-        _printer.flush();
-        if ( _printer.getException() != null )
-            throw _printer.getException();
-    }
-
-
-    /**
-     * Serializes the DOM document fragmnt using the previously specified
-     * writer and output format. Throws an exception only if
-     * an I/O exception occured while serializing.
-     *
-     * @param elem The element to serialize
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    public void serialize( DocumentFragment frag )
-        throws IOException
-    {
-        prepare();
-        serializeNode( frag );
-        _printer.flush();
-        if ( _printer.getException() != null )
-            throw _printer.getException();
-    }
-
-
-    /**
-     * Serializes the DOM document using the previously specified
-     * writer and output format. Throws an exception only if
-     * an I/O exception occured while serializing.
-     *
-     * @param doc The document to serialize
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    public void serialize( Document doc )
-        throws IOException
-    {
-        prepare();
-        serializeNode( doc );
-        serializePreRoot();
-        _printer.flush();
-        if ( _printer.getException() != null )
-            throw _printer.getException();
-    }
-
-
-    //------------------------------------------//
-    // SAX document handler serializing methods //
-    //------------------------------------------//
-
-
-    public void startDocument()
-        throws SAXException
-    {
-        try {
-            prepare();
-        } catch ( IOException except ) {
-            throw new SAXException( except.toString() );
-        }
-        // Nothing to do here. All the magic happens in startDocument(String)
-    }
-    
-    
-    public void characters( char[] chars, int start, int length )
-        throws SAXException
-    {
-        ElementState state;
-
-        try {
-        state = content();
-
-        // Check if text should be print as CDATA section or unescaped
-        // based on elements listed in the output format (the element
-        // state) or whether we are inside a CDATA section or entity.
-
-        if ( state.inCData || state.doCData ) {
-            int          saveIndent;
-
-            // Print a CDATA section. The text is not escaped, but ']]>'
-            // appearing in the code must be identified and dealt with.
-            // The contents of a text node is considered space preserving.
-            if ( ! state.inCData ) {
-                _printer.printText( "<![CDATA[" );
-                state.inCData = true;
-            }
-            saveIndent = _printer.getNextIndent();
-            _printer.setNextIndent( 0 );
-            for ( int index = 0 ; index < length ; ++index ) {
-                if ( index + 2 < length && chars[ index ] == ']' &&
-                     chars[ index + 1 ] == ']' && chars[ index + 2 ] == '>' ) {
-
-                    printText( chars, start, index + 2, true, true );
-                    _printer.printText( "]]><![CDATA[" );
-                    start += index + 2;
-                    length -= index + 2;
-                    index = 0;
-                }
-            }
-            if ( length > 0 )
-                printText( chars, start, length, true, true );
-            _printer.setNextIndent( saveIndent );
-
-        } else {
-
-            int saveIndent;
-
-            if ( state.preserveSpace ) {
-                // If preserving space then hold of indentation so no
-                // excessive spaces are printed at line breaks, escape
-                // the text content without replacing spaces and print
-                // the text breaking only at line breaks.
-                saveIndent = _printer.getNextIndent();
-                _printer.setNextIndent( 0 );
-                printText( chars, start, length, true, state.unescaped );
-                _printer.setNextIndent( saveIndent );
-            } else {
-                printText( chars, start, length, false, state.unescaped );
-            }
-        }
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void ignorableWhitespace( char[] chars, int start, int length )
-        throws SAXException
-    {
-        int i;
-
-        try {
-        content();
-
-        // Print ignorable whitespaces only when indenting, after
-        // all they are indentation. Cancel the indentation to
-        // not indent twice.
-        if ( _indenting ) {
-            _printer.setThisIndent( 0 );
-            for ( i = start ; length-- > 0 ; ++i )
-                _printer.printText( chars[ i ] );
-        }
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public final void processingInstruction( String target, String code )
-        throws SAXException
-    {
-        try {
-            processingInstructionIO( target, code );
-        } catch ( IOException except ) {
-        throw new SAXException( except );
-        }
-    }
-
-    public void processingInstructionIO( String target, String code )
-        throws IOException
-    {
-        int          index;
-        ElementState state;
-
-        state = content();
-
-        // Create the processing instruction textual representation.
-        // Make sure we don't have '?>' inside either target or code.
-        index = target.indexOf( "?>" );
-        if ( index >= 0 )
-            fStrBuffer.append( "<?" ).append( target.substring( 0, index ) );
-        else
-            fStrBuffer.append( "<?" ).append( target );
-        if ( code != null ) {
-            fStrBuffer.append( ' ' );
-            index = code.indexOf( "?>" );
-            if ( index >= 0 )
-                fStrBuffer.append( code.substring( 0, index ) );
-            else
-                fStrBuffer.append( code );
-        }
-        fStrBuffer.append( "?>" );
-
-        // If before the root element (or after it), do not print
-        // the PI directly but place it in the pre-root vector.
-        if ( isDocumentState() ) {
-            if ( _preRoot == null )
-                _preRoot = new Vector();
-            _preRoot.addElement( fStrBuffer.toString() );
-        } else {
-            _printer.indent();
-            printText( fStrBuffer.toString(), true, true );
-            _printer.unindent();
-            if ( _indenting )
-            state.afterElement = true;
-        }
-
-        fStrBuffer.setLength(0);
-    }
-
-
-    public void comment( char[] chars, int start, int length )
-        throws SAXException
-    {
-        try {
-        comment( new String( chars, start, length ) );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-    }
-    }
-
-
-    public void comment( String text )
-        throws IOException
-    {
-        int          index;
-        ElementState state;
-        
-        if ( _format.getOmitComments() )
-            return;
-
-        state  = content();
-        // Create the processing comment textual representation.
-        // Make sure we don't have '-->' inside the comment.
-        index = text.indexOf( "-->" );
-        if ( index >= 0 )
-            fStrBuffer.append( "<!--" ).append( text.substring( 0, index ) ).append( "-->" );
-        else
-            fStrBuffer.append( "<!--" ).append( text ).append( "-->" );
-
-        // If before the root element (or after it), do not print
-        // the comment directly but place it in the pre-root vector.
-        if ( isDocumentState() ) {
-            if ( _preRoot == null )
-                _preRoot = new Vector();
-            _preRoot.addElement( fStrBuffer.toString() );
-        } else {
-            // Indent this element on a new line if the first
-            // content of the parent element or immediately
-            // following an element.
-            if ( _indenting && ! state.preserveSpace)
-                _printer.breakLine();
-						_printer.indent();
-            printText( fStrBuffer.toString(), true, true );
-						_printer.unindent();
-            if ( _indenting )
-                state.afterElement = true;
-        }
-
-        fStrBuffer.setLength(0);
-	state.afterComment = true;
-	state.afterElement = false;
-    }
-
-
-    public void startCDATA()
-    {
-        ElementState state;
-
-        state = getElementState();
-        state.doCData = true;
-    }
-
-
-    public void endCDATA()
-    {
-        ElementState state;
-
-        state = getElementState();
-        state.doCData = false;
-    }
-
-
-    public void startNonEscaping()
-    {
-        ElementState state;
-
-        state = getElementState();
-        state.unescaped = true;
-    }
-
-
-    public void endNonEscaping()
-    {
-        ElementState state;
-
-        state = getElementState();
-        state.unescaped = false;
-    }
-
-
-    public void startPreserving()
-    {
-        ElementState state;
-
-        state = getElementState();
-        state.preserveSpace = true;
-    }
-
-
-    public void endPreserving()
-    {
-        ElementState state;
-
-        state = getElementState();
-        state.preserveSpace = false;
-    }
-
-
-    /**
-     * Called at the end of the document to wrap it up.
-     * Will flush the output stream and throw an exception
-     * if any I/O error occured while serializing.
-     *
-     * @throws SAXException An I/O exception occured during
-     *  serializing
-     */
-    public void endDocument()
-        throws SAXException
-    {
-        try {
-        // Print all the elements accumulated outside of
-        // the root element.
-        serializePreRoot();
-        // Flush the output, this is necessary for fStrBuffered output.
-        _printer.flush();
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-    }
-    }
-
-
-    public void startEntity( String name )
-    {
-        // ???
-    }
-
-
-    public void endEntity( String name )
-    {
-        // ???
-    }
-
-
-    public void setDocumentLocator( Locator locator )
-    {
-        // Nothing to do
-    }
-
-
-    //-----------------------------------------//
-    // SAX content handler serializing methods //
-    //-----------------------------------------//
-
-
-    public void skippedEntity ( String name )
-        throws SAXException
-    {
-        try {
-        endCDATA();
-        content();
-        _printer.printText( '&' );
-        _printer.printText( name );
-        _printer.printText( ';' );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-    }
-    }
-
-
-    public void startPrefixMapping( String prefix, String uri )
-        throws SAXException
-    {
-        if ( _prefixes == null )
-            _prefixes = new Hashtable();
-        _prefixes.put( uri, prefix == null ? "" : prefix );
-    }
-
-
-    public void endPrefixMapping( String prefix )
-        throws SAXException
-    {
-    }
-
-
-    //------------------------------------------//
-    // SAX DTD/Decl handler serializing methods //
-    //------------------------------------------//
-
-
-    public final void startDTD( String name, String publicId, String systemId )
-        throws SAXException
-    {
-        try {
-        _printer.enterDTD();
-        _docTypePublicId = publicId;
-        _docTypeSystemId = systemId;
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endDTD()
-    {
-        // Nothing to do here, all the magic occurs in startDocument(String).
-    }
-
-
-    public void elementDecl( String name, String model )
-        throws SAXException
-    {
-        try {
-        _printer.enterDTD();
-        _printer.printText( "<!ELEMENT " );
-        _printer.printText( name );
-        _printer.printText( ' ' );
-        _printer.printText( model );
-        _printer.printText( '>' );
-        if ( _indenting )
-            _printer.breakLine();
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void attributeDecl( String eName, String aName, String type,
-                               String valueDefault, String value )
-        throws SAXException
-    {
-        try {
-        _printer.enterDTD();
-        _printer.printText( "<!ATTLIST " );
-        _printer.printText( eName );
-        _printer.printText( ' ' );
-        _printer.printText( aName );
-        _printer.printText( ' ' );
-        _printer.printText( type );
-        if ( valueDefault != null ) {
-            _printer.printText( ' ' );
-            _printer.printText( valueDefault );
-        }
-        if ( value != null ) {
-            _printer.printText( " \"" );
-            printEscaped( value );
-            _printer.printText( '"' );
-        }
-        _printer.printText( '>' );
-        if ( _indenting )
-            _printer.breakLine();
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-    }
-    }
-
-
-    public void internalEntityDecl( String name, String value )
-        throws SAXException
-    {
-        try {
-        _printer.enterDTD();
-        _printer.printText( "<!ENTITY " );
-        _printer.printText( name );
-        _printer.printText( " \"" );
-        printEscaped( value );
-        _printer.printText( "\">" );
-        if ( _indenting )
-            _printer.breakLine();
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void externalEntityDecl( String name, String publicId, String systemId )
-        throws SAXException
-    {
-        try {
-        _printer.enterDTD();
-        unparsedEntityDecl( name, publicId, systemId, null );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void unparsedEntityDecl( String name, String publicId,
-                                    String systemId, String notationName )
-        throws SAXException
-    {
-        try {
-        _printer.enterDTD();
-        if ( publicId == null ) {
-            _printer.printText( "<!ENTITY " );
-            _printer.printText( name );
-            _printer.printText( " SYSTEM " );
-            printDoctypeURL( systemId );
-        } else {
-            _printer.printText( "<!ENTITY " );
-            _printer.printText( name );
-            _printer.printText( " PUBLIC " );
-            printDoctypeURL( publicId );
-            _printer.printText( ' ' );
-            printDoctypeURL( systemId );
-        }
-        if ( notationName != null ) {
-            _printer.printText( " NDATA " );
-            _printer.printText( notationName );
-        }
-        _printer.printText( '>' );
-        if ( _indenting )
-            _printer.breakLine();
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-    }
-    }
-
-
-    public void notationDecl( String name, String publicId, String systemId )
-        throws SAXException
-    {
-        try {
-        _printer.enterDTD();
-        if ( publicId != null ) {
-            _printer.printText( "<!NOTATION " );
-            _printer.printText( name );
-            _printer.printText( " PUBLIC " );
-            printDoctypeURL( publicId );
-            if ( systemId != null ) {
-                _printer.printText( ' ' );
-                printDoctypeURL( systemId );
-            }
-        } else {
-            _printer.printText( "<!NOTATION " );
-            _printer.printText( name );
-            _printer.printText( " SYSTEM " );
-            printDoctypeURL( systemId );
-        }
-        _printer.printText( '>' );
-        if ( _indenting )
-            _printer.breakLine();
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    //------------------------------------------//
-    // Generic node serializing methods methods //
-    //------------------------------------------//
-
-
-    /**
-     * Serialize the DOM node. This method is shared across XML, HTML and XHTML
-     * serializers and the differences are masked out in a separate {@link
-     * #serializeElement}.
-     *
-     * @param node The node to serialize
-     * @see #serializeElement
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    protected void serializeNode( Node node )
-        throws IOException
-    {
-
-        fCurrentNode = node;
-
-        // Based on the node type call the suitable SAX handler.
-        // Only comments entities and documents which are not
-        // handled by SAX are serialized directly.
-        switch ( node.getNodeType() ) {
-        case Node.TEXT_NODE : {
-            String text;
-
-            text = node.getNodeValue();
-            if ( text != null )
-                if ( !_indenting || getElementState().preserveSpace
-                     || (text.replace('\n',' ').trim().length() != 0))
-                    characters( text );
-            break;
-        }
-
-        case Node.CDATA_SECTION_NODE : {
-            String text;
-
-            text = node.getNodeValue();
-            if ( text != null ) {
-                startCDATA();
-                characters( text );
-                endCDATA();
-            }
-            break;
-        }
-
-        case Node.COMMENT_NODE : {
-            String text;
-
-            if ( ! _format.getOmitComments() ) {
-                text = node.getNodeValue();
-                if ( text != null )
-                    comment( text );
-            }
-            break;
-        }
-
-        case Node.ENTITY_REFERENCE_NODE : {
-            Node         child;
-
-            endCDATA();
-            content();
-            child = node.getFirstChild();
-            if ( child == null || 
-                 !((Boolean)fFeatures.get("expand-entity-references")).booleanValue() ) {
-                _printer.printText("&");
-                _printer.printText(node.getNodeName());
-                _printer.printText(";");
-            }
-            else {
-            while ( child != null ) {
-                serializeNode( child );
-                child = child.getNextSibling();
-                }
-            }
-            break;
-        }
-
-        case Node.PROCESSING_INSTRUCTION_NODE :
-            processingInstructionIO( node.getNodeName(), node.getNodeValue() );
-            break;
-
-        case Node.ELEMENT_NODE :
-            serializeElement( (Element) node );
-            break;
-
-        case Node.DOCUMENT_NODE : {
-            DocumentType      docType;
-            DOMImplementation domImpl;
-            NamedNodeMap      map;
-            Entity            entity;
-            Notation          notation;
-            int               i;
-
-            // If there is a document type, use the SAX events to
-            // serialize it.
-            docType = ( (Document) node ).getDoctype();
-            if (docType != null) {
-                // DOM Level 2 (or higher)
-                domImpl = ( (Document) node ).getImplementation();
-                try {
-                    String internal;
-
-                    _printer.enterDTD();
-                    _docTypePublicId = docType.getPublicId();
-                    _docTypeSystemId = docType.getSystemId();
-                    internal = docType.getInternalSubset();
-                    if ( internal != null && internal.length() > 0 )
-                        _printer.printText( internal );
-                    endDTD();
-                }
-                // DOM Level 1 -- does implementation have methods?
-                catch (NoSuchMethodError nsme) {
-                    Class docTypeClass = docType.getClass();
-
-                    String docTypePublicId = null;
-                    String docTypeSystemId = null;
-                    try {
-                        java.lang.reflect.Method getPublicId = docTypeClass.getMethod("getPublicId", null);
-                        if (getPublicId.getReturnType().equals(String.class)) {
-                            docTypePublicId = (String)getPublicId.invoke(docType, null);
-                        }
-                    }
-                    catch (Exception e) {
-                        // ignore
-                    }
-                    try {
-                        java.lang.reflect.Method getSystemId = docTypeClass.getMethod("getSystemId", null);
-                        if (getSystemId.getReturnType().equals(String.class)) {
-                            docTypeSystemId = (String)getSystemId.invoke(docType, null);
-                        }
-                    }
-                    catch (Exception e) {
-                        // ignore
-                    }
-                    _printer.enterDTD();
-                    _docTypePublicId = docTypePublicId;
-                    _docTypeSystemId = docTypeSystemId;
-                    endDTD();
-                }
-            }
-            // !! Fall through
-        }
-        case Node.DOCUMENT_FRAGMENT_NODE : {
-            Node         child;
-
-            // By definition this will happen if the node is a document,
-            // document fragment, etc. Just serialize its contents. It will
-            // work well for other nodes that we do not know how to serialize.
-            child = node.getFirstChild();
-            while ( child != null ) {
-                serializeNode( child );
-                child = child.getNextSibling();
-            }
-            break;
-        }
-
-        default:
-            break;
-        }
-    }
-
-
-    /**
-     * Must be called by a method about to print any type of content.
-     * If the element was just opened, the opening tag is closed and
-     * will be matched to a closing tag. Returns the current element
-     * state with <tt>empty</tt> and <tt>afterElement</tt> set to false.
-     *
-     * @return The current element state
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    protected ElementState content()
-        throws IOException
-    {
-        ElementState state;
-
-        state = getElementState();
-        if ( ! isDocumentState() ) {
-            // Need to close CData section first
-            if ( state.inCData && ! state.doCData ) {
-                _printer.printText( "]]>" );
-                state.inCData = false;
-            }
-            // If this is the first content in the element,
-            // change the state to not-empty and close the
-            // opening element tag.
-            if ( state.empty ) {
-                _printer.printText( '>' );
-                state.empty = false;
-            }
-            // Except for one content type, all of them
-            // are not last element. That one content
-            // type will take care of itself.
-            state.afterElement = false;
-            // Except for one content type, all of them
-            // are not last comment. That one content
-            // type will take care of itself.
-            state.afterComment = false;
-        }
-        return state;
-    }
-
-
-    /**
-     * Called to print the text contents in the prevailing element format.
-     * Since this method is capable of printing text as CDATA, it is used
-     * for that purpose as well. White space handling is determined by the
-     * current element state. In addition, the output format can dictate
-     * whether the text is printed as CDATA or unescaped.
-     *
-     * @param text The text to print
-     * @param unescaped True is should print unescaped
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    protected void characters( String text )
-        throws IOException
-    {
-        ElementState state;
-
-        state = content();
-        // Check if text should be print as CDATA section or unescaped
-        // based on elements listed in the output format (the element
-        // state) or whether we are inside a CDATA section or entity.
-
-        if ( state.inCData || state.doCData ) {
-            int          index;
-            int          saveIndent;
-
-            // Print a CDATA section. The text is not escaped, but ']]>'
-            // appearing in the code must be identified and dealt with.
-            // The contents of a text node is considered space preserving.
-            if ( ! state.inCData ) {
-                fStrBuffer.append( "<![CDATA[" );
-                state.inCData = true;
-            }
-            index = text.indexOf( "]]>" );
-            if (index >=0 && !((Boolean)fFeatures.get("split-cdata-sections")).booleanValue()) {
-               // issue fatal error
-                if (fDOMErrorHandler != null) {
-                    fDOMError.reset();
-                    fDOMError.setMessage("The character sequence \"]]>\" must not appear in content"+
-                                         " unless used to mark the end of a CDATA section.");
-                    fDOMError.setSeverity(DOMError.SEVERITY_FATAL_ERROR);
-                    fDOMError.setLocator(new DOMLocatorImpl(-1, -1, -1, fCurrentNode, null));
-                    boolean continueProcess = fDOMErrorHandler.handleError(fDOMError);
-                    // Should we always terminate the serialization?
-                    // otherwise should we split CDATA section..?
-                    if (!continueProcess) {
-                        throw new IOException();
-                    }
-                }
-            }
-            else if (index >=0 && ((Boolean)fFeatures.get("split-cdata-sections")).booleanValue()) {
-               // issue warning
-               if (fDOMErrorHandler != null) {
-                    fDOMError.reset();
-                    fDOMError.setMessage("Spliting a CDATA section containing the CDATA section termination marker ']]>' ");
-                    fDOMError.setSeverity(DOMError.SEVERITY_WARNING);
-                    fDOMError.setLocator(new DOMLocatorImpl(-1, -1, -1, fCurrentNode, null));
-                    fDOMErrorHandler.handleError(fDOMError);
-                }
-            }
-
-            while ( index >= 0 ) {
-                fStrBuffer.append( text.substring( 0, index + 2 ) ).append( "]]><![CDATA[" );
-                text = text.substring( index + 2 );
-                index = text.indexOf( "]]>" );
-            }
-            fStrBuffer.append( text );
-            saveIndent = _printer.getNextIndent();
-            _printer.setNextIndent( 0 );
-            printText( fStrBuffer.toString(), true, true );
-            fStrBuffer.setLength(0);
-            _printer.setNextIndent( saveIndent );
-
-        } else {
-
-            int saveIndent;
-
-            if ( state.preserveSpace ) {
-                // If preserving space then hold of indentation so no
-                // excessive spaces are printed at line breaks, escape
-                // the text content without replacing spaces and print
-                // the text breaking only at line breaks.
-                saveIndent = _printer.getNextIndent();
-                _printer.setNextIndent( 0 );
-                printText( text, true, state.unescaped );
-                _printer.setNextIndent( saveIndent );
-            } else {
-                printText( text, false, state.unescaped );
-            }
-        }
-    }
-
-
-    /**
-     * Returns the suitable entity reference for this character value,
-     * or null if no such entity exists. Calling this method with <tt>'&amp;'</tt>
-     * will return <tt>"&amp;amp;"</tt>.
-     *
-     * @param ch Character value
-     * @return Character entity name, or null
-     */
-    protected abstract String getEntityRef( int ch );
-
-
-    /**
-     * Called to serializee the DOM element. The element is serialized based on
-     * the serializer's method (XML, HTML, XHTML).
-     *
-     * @param elem The element to serialize
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    protected abstract void serializeElement( Element elem )
-        throws IOException;
-
-
-    /**
-     * Comments and PIs cannot be serialized before the root element,
-     * because the root element serializes the document type, which
-     * generally comes first. Instead such PIs and comments are
-     * accumulated inside a vector and serialized by calling this
-     * method. Will be called when the root element is serialized
-     * and when the document finished serializing.
-     *
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    protected void serializePreRoot()
-        throws IOException
-    {
-        int i;
-
-        if ( _preRoot != null ) {
-            for ( i = 0 ; i < _preRoot.size() ; ++i ) {
-                printText( (String) _preRoot.elementAt( i ), true, true );
-                if ( _indenting )
-                _printer.breakLine();
-            }
-            _preRoot.removeAllElements();
-        }
-    }
-
-
-    //---------------------------------------------//
-    // Text pretty printing and formatting methods //
-    //---------------------------------------------//
-
-
-    /**
-     * Called to print additional text with whitespace handling.
-     * If spaces are preserved, the text is printed as if by calling
-     * {@link #printText(String)} with a call to {@link #breakLine}
-     * for each new line. If spaces are not preserved, the text is
-     * broken at space boundaries if longer than the line width;
-     * Multiple spaces are printed as such, but spaces at beginning
-     * of line are removed.
-     *
-     * @param text The text to print
-     * @param preserveSpace Space preserving flag
-     * @param unescaped Print unescaped
-     */
-    protected final void printText( char[] chars, int start, int length,
-                                    boolean preserveSpace, boolean unescaped )
-        throws IOException
-    {
-        int index;
-        char ch;
-
-        if ( preserveSpace ) {
-            // Preserving spaces: the text must print exactly as it is,
-            // without breaking when spaces appear in the text and without
-            // consolidating spaces. If a line terminator is used, a line
-            // break will occur.
-            while ( length-- > 0 ) {
-                ch = chars[ start ];
-                ++start;
-                if ( ch == '\n' || ch == '\r' || unescaped )
-                    _printer.printText( ch );
-                else
-                    printEscaped( ch );
-            }
-        } else {
-            // Not preserving spaces: print one part at a time, and
-            // use spaces between parts to break them into different
-            // lines. Spaces at beginning of line will be stripped
-            // by printing mechanism. Line terminator is treated
-            // no different than other text part.
-            while ( length-- > 0 ) {
-                ch = chars[ start ];
-                ++start;
-                if ( ch == ' ' || ch == '\f' || ch == '\t' || ch == '\n' || ch == '\r' )
-                    _printer.printSpace();
-                else if ( unescaped )
-                    _printer.printText( ch );
-                else
-                    printEscaped( ch );
-            }
-        }
-    }
-
-
-    protected final void printText( String text, boolean preserveSpace, boolean unescaped )
-        throws IOException
-    {
-        int index;
-        char ch;
-
-        if ( preserveSpace ) {
-            // Preserving spaces: the text must print exactly as it is,
-            // without breaking when spaces appear in the text and without
-            // consolidating spaces. If a line terminator is used, a line
-            // break will occur.
-            for ( index = 0 ; index < text.length() ; ++index ) {
-                ch = text.charAt( index );
-                if ( ch == '\n' || ch == '\r' || unescaped )
-                    _printer.printText( ch );
-                else
-                    printEscaped( ch );
-            }
-        } else {
-            // Not preserving spaces: print one part at a time, and
-            // use spaces between parts to break them into different
-            // lines. Spaces at beginning of line will be stripped
-            // by printing mechanism. Line terminator is treated
-            // no different than other text part.
-            for ( index = 0 ; index < text.length() ; ++index ) {
-                ch = text.charAt( index );
-                if ( ch == ' ' || ch == '\f' || ch == '\t' || ch == '\n' || ch == '\r' )
-                    _printer.printSpace();
-                else if ( unescaped )
-                    _printer.printText( ch );
-                else
-                    printEscaped( ch );
-            }
-        }
-    }
-
-
-    /**
-     * Print a document type public or system identifier URL.
-     * Encapsulates the URL in double quotes, escapes non-printing
-     * characters and print it equivalent to {@link #printText}.
-     *
-     * @param url The document type url to print
-     */
-    protected void printDoctypeURL( String url )
-        throws IOException
-    {
-        int                i;
-
-        _printer.printText( '"' );
-        for( i = 0 ; i < url.length() ; ++i ) {
-            if ( url.charAt( i ) == '"' ||  url.charAt( i ) < 0x20 || url.charAt( i ) > 0x7F ) {
-                _printer.printText( '%' );
-                _printer.printText( Integer.toHexString( url.charAt( i ) ) );
-            } else
-                _printer.printText( url.charAt( i ) );
-        }
-        _printer.printText( '"' );
-    }
-
-
-    protected void printEscaped( int ch )
-        throws IOException
-    {
-        String charRef;
-
-        // If there is a suitable entity reference for this
-        // character, print it. The list of available entity
-        // references is almost but not identical between
-        // XML and HTML.
-        charRef = getEntityRef( ch );
-        if ( charRef != null ) {
-            _printer.printText( '&' );
-            _printer.printText( charRef );
-            _printer.printText( ';' );
-        } else if ( ( ch >= ' ' && _encodingInfo.isPrintable(ch) && ch != 0xF7 ) ||
-                    ch == '\n' || ch == '\r' || ch == '\t' ) {
-            // If the character is not printable, print as character reference.
-            // Non printables are below ASCII space but not tab or line
-            // terminator, ASCII delete, or above a certain Unicode threshold.
-            if (ch < 0x10000) {
-                _printer.printText((char)ch );
-            } else {
-                _printer.printText((char)(((ch-0x10000)>>10)+0xd800));
-                _printer.printText((char)(((ch-0x10000)&0x3ff)+0xdc00));
-            }
-
-        } else {
-            _printer.printText( "&#x" );
-            _printer.printText(Integer.toHexString(ch));
-            _printer.printText( ';' );
-        }
-    }
-
-
-    /**
-     * Escapes a string so it may be printed as text content or attribute
-     * value. Non printable characters are escaped using character references.
-     * Where the format specifies a deault entity reference, that reference
-     * is used (e.g. <tt>&amp;lt;</tt>).
-     *
-     * @param source The string to escape
-     */
-    protected void printEscaped( String source )
-        throws IOException
-    {
-        for ( int i = 0 ; i < source.length() ; ++i ) {
-            int ch = source.charAt(i);
-            if ((ch & 0xfc00) == 0xd800 && i+1 < source.length()) {
-                int lowch = source.charAt(i+1);
-                if ((lowch & 0xfc00) == 0xdc00) {
-                    ch = 0x10000 + ((ch-0xd800)<<10) + lowch-0xdc00;
-                    i++;
-                }
-            }
-            printEscaped(ch);
-        }
-    }
-
-
-    //--------------------------------//
-    // Element state handling methods //
-    //--------------------------------//
-
-
-    /**
-     * Return the state of the current element.
-     *
-     * @return Current element state
-     */
-    protected ElementState getElementState()
-    {
-        return _elementStates[ _elementStateCount ];
-    }
-
-
-    /**
-     * Enter a new element state for the specified element.
-     * Tag name and space preserving is specified, element
-     * state is initially empty.
-     *
-     * @return Current element state, or null
-     */
-    protected ElementState enterElementState( String namespaceURI, String localName,
-                                              String rawName, boolean preserveSpace )
-    {
-        ElementState state;
-
-        if ( _elementStateCount + 1 == _elementStates.length ) {
-            ElementState[] newStates;
-
-            // Need to create a larger array of states. This does not happen
-            // often, unless the document is really deep.
-            newStates = new ElementState[ _elementStates.length + 10 ];
-            for ( int i = 0 ; i < _elementStates.length ; ++i )
-                newStates[ i ] = _elementStates[ i ];
-            for ( int i = _elementStates.length ; i < newStates.length ; ++i )
-                newStates[ i ] = new ElementState();
-            _elementStates = newStates;
-        }
-
-        ++_elementStateCount;
-        state = _elementStates[ _elementStateCount ];
-        state.namespaceURI = namespaceURI;
-        state.localName = localName;
-        state.rawName = rawName;
-        state.preserveSpace = preserveSpace;
-        state.empty = true;
-        state.afterElement = false;
-        state.afterComment = false;
-        state.doCData = state.inCData = false;
-        state.unescaped = false;
-        state.prefixes = _prefixes;
-
-        _prefixes = null;
-        return state;
-    }
-
-
-    /**
-     * Leave the current element state and return to the
-     * state of the parent element. If this was the root
-     * element, return to the state of the document.
-     *
-     * @return Previous element state
-     */
-    protected ElementState leaveElementState()
-    {
-        if ( _elementStateCount > 0 ) {
-            /*Corrected by David Blondeau (blondeau@intalio.com)*/
-		_prefixes = null;
-		//_prefixes = _elementStates[ _elementStateCount ].prefixes;
-            -- _elementStateCount;
-            return _elementStates[ _elementStateCount ];
-        } else
-            throw new IllegalStateException( "Internal error: element state is zero" );
-    }
-
-
-    /**
-     * Returns true if in the state of the document.
-     * Returns true before entering any element and after
-     * leaving the root element.
-     *
-     * @return True if in the state of the document
-     */
-    protected boolean isDocumentState()
-    {
-        return _elementStateCount == 0;
-    }
-
-
-    /**
-     * Returns the namespace prefix for the specified URI.
-     * If the URI has been mapped to a prefix, returns the
-     * prefix, otherwise returns null.
-     *
-     * @param namespaceURI The namespace URI
-     * @return The namespace prefix if known, or null
-     */
-    protected String getPrefix( String namespaceURI )
-    {
-        String    prefix;
-
-        if ( _prefixes != null ) {
-            prefix = (String) _prefixes.get( namespaceURI );
-            if ( prefix != null )
-                return prefix;
-        }
-        if ( _elementStateCount == 0 )
-            return null;
-        else {
-            for ( int i = _elementStateCount ; i > 0 ; --i ) {
-                if ( _elementStates[ i ].prefixes != null ) {
-                    prefix = (String) _elementStates[ i ].prefixes.get( namespaceURI );
-                    if ( prefix != null )
-                        return prefix;
-                }
-            }
-        }
-        return null;
-    }
-
-
-}
diff --git a/src/org/apache/xml/serialize/DOMSerializer.java b/src/org/apache/xml/serialize/DOMSerializer.java
deleted file mode 100644
index c5e13ec..0000000
--- a/src/org/apache/xml/serialize/DOMSerializer.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.IOException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-
-
-
-/**
- * Interface for a DOM serializer implementation.
- * 
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- */
-public interface DOMSerializer
-{
-
-
-    /**
-     * Serialized the DOM element. Throws an exception only if
-     * an I/O exception occured while serializing.
-     *
-     * @param elem The element to serialize
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    public void serialize( Element elem )
-        throws IOException;
-
-
-    /**
-     * Serializes the DOM document. Throws an exception only if
-     * an I/O exception occured while serializing.
-     *
-     * @param doc The document to serialize
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    public void serialize( Document doc )
-        throws IOException;
-
-
-    /**
-     * Serializes the DOM document fragment. Throws an exception
-     * only if an I/O exception occured while serializing.
-     *
-     * @param frag The document fragment to serialize
-     * @throws IOException An I/O exception occured while
-     *   serializing
-     */
-    public void serialize( DocumentFragment frag )
-        throws IOException;
-
-
-}
-
-
-
diff --git a/src/org/apache/xml/serialize/ElementState.java b/src/org/apache/xml/serialize/ElementState.java
deleted file mode 100644
index 718039a..0000000
--- a/src/org/apache/xml/serialize/ElementState.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.util.Hashtable;
-
-
-/**
- * Holds the state of the currently serialized element.
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @see BaseMarkupSerializer
- */
-public class ElementState
-{
-
-
-    /**
-     * The element's raw tag name (local or prefix:local).
-     */
-    public String rawName;
-
-
-    /**
-     * The element's local tag name.
-     */
-    public String localName;
-
-
-    /**
-     * The element's namespace URI.
-     */
-    public String namespaceURI;
-
-
-    /**
-     * True if element is space preserving.
-     */
-    public boolean preserveSpace;
-
-
-    /**
-     * True if element is empty. Turns false immediately
-     * after serializing the first contents of the element.
-     */
-    public boolean empty;
-
-
-    /**
-     * True if the last serialized node was an element node.
-     */
-    public boolean afterElement;
-
-
-    /**
-     * True if the last serialized node was a comment node.
-     */
-    public boolean afterComment;
-
-
-    /**
-     * True if textual content of current element should be
-     * serialized as CDATA section.
-     */
-    public boolean doCData;
-
-
-    /**
-     * True if textual content of current element should be
-     * serialized as raw characters (unescaped).
-     */
-    public boolean unescaped;
-
-
-    /**
-     * True while inside CData and printing text as CData.
-     */
-    public boolean inCData;
-
-
-    /**
-     * Association between namespace URIs (keys) and prefixes (values).
-     */
-    public Hashtable prefixes;
-
-
-}
diff --git a/src/org/apache/xml/serialize/EncodingInfo.java b/src/org/apache/xml/serialize/EncodingInfo.java
deleted file mode 100644
index 3466913..0000000
--- a/src/org/apache/xml/serialize/EncodingInfo.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-/**
- * This class represents an encoding.
- *
- * @version $Id$
- */
-public class EncodingInfo {
-
-    String name;
-    String javaName;
-    int lastPrintable;
-
-    /**
-     * Creates new <code>EncodingInfo</code> instance.
-     */
-    public EncodingInfo(String mimeName, String javaName, int lastPrintable) {
-        this.name = mimeName;
-        this.javaName = javaName == null ? mimeName : javaName;
-        this.lastPrintable = lastPrintable;
-    }
-
-    /**
-     * Creates new <code>EncodingInfo</code> instance.
-     */
-    public EncodingInfo(String mimeName, int lastPrintable) {
-        this(mimeName, mimeName, lastPrintable);
-    }
-
-    /**
-     * Returns a MIME charset name of this encoding.
-     */
-    public String getName() {
-        return this.name;
-    }
-
-    /**
-     * Returns a writer for this encoding based on
-     * an output stream.
-     *
-     * @return A suitable writer
-     * @exception UnsupportedEncodingException There is no convertor
-     *  to support this encoding
-     */
-    public Writer getWriter(OutputStream output)
-        throws UnsupportedEncodingException {
-        if (this.javaName == null)
-            return new OutputStreamWriter(output);
-        return new OutputStreamWriter(output, this.javaName);
-    }
-    /**
-     * Checks whether the specified character is printable or not.
-     *
-     * @param ch a code point (0-0x10ffff)
-     */
-    public boolean isPrintable(int ch) {
-        return ch <= this.lastPrintable;
-    }
-}
diff --git a/src/org/apache/xml/serialize/Encodings.java b/src/org/apache/xml/serialize/Encodings.java
deleted file mode 100644
index 68620c8..0000000
--- a/src/org/apache/xml/serialize/Encodings.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.Writer;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-
-
-/**
- * Provides information about encodings. Depends on the Java runtime
- * to provides writers for the different encodings, but can be used
- * to override encoding names and provide the last printable character
- * for each encoding.
- *
- * @version $Id$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- */
-public class Encodings
-{
-
-
-    /**
-     * The last printable character for unknown encodings.
-     */
-    static final int DefaultLastPrintable = 0x7F;
-
-    /**
-     * @param encoding a MIME charset name, or null.
-     */
-    static EncodingInfo getEncodingInfo(String encoding) {
-        if (encoding == null)
-            return new EncodingInfo(null, DefaultLastPrintable);
-        for (int i = 0;  i < _encodings.length;  i++) {
-            if (_encodings[i].name.equalsIgnoreCase(encoding))
-                return _encodings[i];
-        }
-        return new SieveEncodingInfo(encoding, DefaultLastPrintable);
-    }
-
-    static final String JIS_DANGER_CHARS
-    = "\\\u007e\u007f\u00a2\u00a3\u00a5\u00ac"
-    +"\u2014\u2015\u2016\u2026\u203e\u203e\u2225\u222f\u301c"
-    +"\uff3c\uff5e\uffe0\uffe1\uffe2\uffe3";
-
-    /**
-     * Constructs a list of all the supported encodings.
-     */
-    private static final EncodingInfo[] _encodings = new EncodingInfo[] {
-        new EncodingInfo("ASCII", 0x7F),
-        new EncodingInfo("US-ASCII", 0x7F),
-        new EncodingInfo("ISO-8859-1", 0xFF),
-        new EncodingInfo("ISO-8859-2", 0xFF),
-        new EncodingInfo("ISO-8859-3", 0xFF),
-        new EncodingInfo("ISO-8859-4", 0xFF),
-        new EncodingInfo("ISO-8859-5", 0xFF),
-        new EncodingInfo("ISO-8859-6", 0xFF),
-        new EncodingInfo("ISO-8859-7", 0xFF),
-        new EncodingInfo("ISO-8859-8", 0xFF),
-        new EncodingInfo("ISO-8859-9", 0xFF),
-        /**
-         * Does JDK's converter supprt surrogates?
-         * A Java encoding name "UTF-8" is suppoted by JDK 1.2 or later.
-         */
-        new EncodingInfo("UTF-8", "UTF8", 0x10FFFF),
-        /**
-         * JDK 1.1 supports "Shift_JIS" as an alias of "SJIS".
-         * But JDK 1.2 treats "Shift_JIS" as an alias of "MS932".
-         * The JDK 1.2's behavior is invalid against IANA registrations.
-         */
-        new SieveEncodingInfo("Shift_JIS", "SJIS", 0x7F, JIS_DANGER_CHARS),
-        /**
-         * "MS932" is supported by JDK 1.2 or later.
-         */
-        new SieveEncodingInfo("Windows-31J", "MS932", 0x7F, JIS_DANGER_CHARS),
-        new SieveEncodingInfo("EUC-JP", null, 0x7F, JIS_DANGER_CHARS),
-        new SieveEncodingInfo("ISO-2022-JP", null, 0x7F, JIS_DANGER_CHARS),
-    };
-}
diff --git a/src/org/apache/xml/serialize/HTMLEntities.res b/src/org/apache/xml/serialize/HTMLEntities.res
deleted file mode 100755
index c3af002..0000000
--- a/src/org/apache/xml/serialize/HTMLEntities.res
+++ /dev/null
@@ -1,291 +0,0 @@
-# $Id$
-#
-# @version $Revision$ $Date$
-# @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
-#
-# Character entity references for markup-significant
-#
-quot 34
-amp 38
-lt 60
-gt 62
-nbsp 160
-#
-# Character entity references for ISO 8859-1 characters
-#
-iexcl 161
-cent 162
-pound 163
-curren 164
-yen 165
-brvbar 166
-sect 167
-uml 168
-copy 169
-ordf 170
-laquo 171
-not 172
-shy 173
-reg 174
-macr 175
-deg 176
-plusmn 177
-sup2 178
-sup3 179
-acute 180
-micro 181
-para 182
-middot 183
-cedil 184
-sup1 185
-ordm 186
-raquo 187
-frac14 188
-frac12 189
-frac34 190
-iquest 191
-Agrave 192
-Aacute 193
-Acirc 194
-Atilde 195
-Auml 196
-Aring 197
-AElig 198
-Ccedil 199
-Egrave 200
-Eacute 201
-Ecirc 202
-Euml 203
-Igrave 204
-Iacute 205
-Icirc 206
-Iuml 207
-ETH 208
-Ntilde 209
-Ograve 210
-Oacute 211
-Ocirc 212
-Otilde 213
-Ouml 214
-times 215
-Oslash 216
-Ugrave 217
-Uacute 218
-Ucirc 219
-Uuml 220
-Yacute 221
-THORN 222
-szlig 223
-agrave 224
-aacute 225
-acirc 226
-atilde 227
-auml 228
-aring 229
-aelig 230
-ccedil 231
-egrave 232
-eacute 233
-ecirc 234
-euml 235
-igrave 236
-iacute 237
-icirc 238
-iuml 239
-eth 240
-ntilde 241
-ograve 242
-oacute 243
-ocirc 244
-otilde 245
-ouml 246
-divide 247
-oslash 248
-ugrave 249
-uacute 250
-ucirc 251
-uuml 252
-yacute 253
-thorn 254
-yuml 255
-#
-# Character entity references for symbols, mathematical symbols, and Greek letters
-#
-# Latin Extended
-fnof 402
-#
-# Greek
-Alpha 913
-Beta 914
-Gamma 915
-Delta 916
-Epsilon 917
-Zeta 918
-Eta 919
-Theta 920
-Iota 921
-Kappa 922
-Lambda 923
-Mu 924
-Nu 925
-Xi 926
-Omicron 927
-Pi 928
-Rho 929
-Sigma 931
-Tau 932
-Upsilon 933
-Phi 934
-Chi 935
-Psi 936
-Omega 937
-alpha 945
-beta 946
-gamma 947
-delta 948
-epsilon 949
-zeta 950
-eta 951
-theta 952
-iota 953
-kappa 954
-lambda 955
-mu 956
-nu 957
-xi 958
-omicron 959
-pi 960
-rho 961
-sigmaf 962
-sigma 963
-tau 964
-upsilon 965
-phi 966
-chi 967
-psi 968
-omega 969
-thetasym 977
-upsih 978
-piv 982
-#
-# General Punctuation
-bull 8226
-hellip 8230
-prime 8242
-Prime 8243
-oline 8254
-frasl 8260
-#
-# Letterlike Symbols
-weierp 8472
-image 8465
-real 8476
-trade 8482
-alefsym 8501
-#
-# Arrows
-larr 8592
-uarr 8593
-rarr 8594
-darr 8595
-harr 8596
-crarr 8629
-lArr 8656
-uArr 8657
-rArr 8658
-dArr 8659
-hArr 8660
-#
-# Mathematical Operators
-forall 8704
-part 8706
-exist 8707
-empty 8709
-nabla 8711
-isin 8712
-notin 8713
-ni 8715
-prod 8719
-sum 8721
-minus 8722
-lowast 8727
-radic 8730
-prop 8733
-infin 8734
-ang 8736
-and 8743
-or 8744
-cap 8745
-cup 8746
-int 8747
-there4 8756
-sim 8764
-cong 8773
-asymp 8776
-ne 8800
-equiv 8801
-le 8804
-ge 8805
-sub 8834
-sup 8835
-nsub 8836
-sube 8838
-supe 8839
-oplus 8853
-otimes 8855
-perp 8869
-sdot 8901
-#
-# Miscellaneous Technical
-lceil 8968
-rceil 8969
-lfloor 8970
-rfloor 8971
-lang 9001
-rang 9002
-#
-# Geometric Shapes
-loz 9674
-#
-# Miscellaneous Symbols
-spades 9824
-clubs 9827
-hearts 9829
-diams 9830
-#
-# Character entity references for internationalization characters
-#
-# Latin Extended-A
-OElig 338
-oelig 339
-#-- Commented out. NN 4.7 does not seem to support these --
-#Scaron 352
-#scaron 353
-Yuml 376
-#
-# Spacing Modifier Letters
-circ 710
-tilde 732
-#
-# General Punctuation
-ensp 8194
-emsp 8195
-thinsp 8201
-zwnj 8204
-zwj 8205
-lrm 8206
-rlm 8207
-ndash 8211
-mdash 8212
-lsquo 8216
-rsquo 8217
-sbquo 8218
-ldquo 8220
-rdquo 8221
-bdquo 8222
-dagger 8224
-Dagger 8225
-permil 8240
-lsaquo 8249
-rsaquo 8250
-euro 8364
diff --git a/src/org/apache/xml/serialize/HTMLSerializer.java b/src/org/apache/xml/serialize/HTMLSerializer.java
deleted file mode 100755
index 113984c..0000000
--- a/src/org/apache/xml/serialize/HTMLSerializer.java
+++ /dev/null
@@ -1,887 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-// Sep 14, 2000:
-//  Fixed serializer to report IO exception directly, instead at
-//  the end of document processing.
-//  Reported by Patrick Higgins <phiggins@transzap.com>
-// Aug 21, 2000:
-//  Fixed bug in startDocument not calling prepare.
-//  Reported by Mikael Staldal <d96-mst-ingen-reklam@d.kth.se>
-// Aug 21, 2000:
-//  Added ability to omit DOCTYPE declaration.
-// Sep 1, 2000:
-//   If no output format is provided the serializer now defaults
-//   to ISO-8859-1 encoding. Reported by Mikael Staldal
-//   <d96-mst@d.kth.se>
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.util.Enumeration;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-
-/**
- * Implements an HTML/XHTML serializer supporting both DOM and SAX
- * pretty serializing. HTML/XHTML mode is determined in the
- * constructor.  For usage instructions see {@link Serializer}.
- * <p>
- * If an output stream is used, the encoding is taken from the
- * output format (defaults to <tt>UTF-8</tt>). If a writer is
- * used, make sure the writer uses the same encoding (if applies)
- * as specified in the output format.
- * <p>
- * The serializer supports both DOM and SAX. DOM serializing is done
- * by calling {@link #serialize} and SAX serializing is done by firing
- * SAX events and using the serializer as a document handler.
- * <p>
- * If an I/O exception occurs while serializing, the serializer
- * will not throw an exception directly, but only throw it
- * at the end of serializing (either DOM or SAX's {@link
- * org.xml.sax.DocumentHandler#endDocument}.
- * <p>
- * For elements that are not specified as whitespace preserving,
- * the serializer will potentially break long text lines at space
- * boundaries, indent lines, and serialize elements on separate
- * lines. Line terminators will be regarded as spaces, and
- * spaces at beginning of line will be stripped.
- * <p>
- * XHTML is slightly different than HTML:
- * <ul>
- * <li>Element/attribute names are lower case and case matters
- * <li>Attributes must specify value, even if empty string
- * <li>Empty elements must have '/' in empty tag
- * <li>Contents of SCRIPT and STYLE elements serialized as CDATA
- * </ul>
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @see Serializer
- */
-public class HTMLSerializer
-    extends BaseMarkupSerializer
-{
-
-
-    /**
-     * True if serializing in XHTML format.
-     */
-    private static boolean _xhtml;
-
-
-    public static String XHTMLNamespace = "";
-
-
-
-
-    /**
-     * Constructs a new HTML/XHTML serializer depending on the value of
-     * <tt>xhtml</tt>. The serializer cannot be used without calling
-     * {@link #init} first.
-     *
-     * @param xhtml True if XHTML serializing
-     */
-    protected HTMLSerializer( boolean xhtml, OutputFormat format )
-    {
-        super( format );
-        _xhtml = xhtml;
-    }
-
-
-    /**
-     * Constructs a new serializer. The serializer cannot be used without
-     * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
-     * first.
-     */
-    public HTMLSerializer()
-    {
-        this( false, new OutputFormat( Method.HTML, "ISO-8859-1", false ) );
-    }
-
-
-    /**
-     * Constructs a new serializer. The serializer cannot be used without
-     * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
-     * first.
-     */
-    public HTMLSerializer( OutputFormat format )
-    {
-        this( false, format != null ? format : new OutputFormat( Method.HTML, "ISO-8859-1", false ) );
-    }
-
-
-
-    /**
-     * Constructs a new serializer that writes to the specified writer
-     * using the specified output format. If <tt>format</tt> is null,
-     * will use a default output format.
-     *
-     * @param writer The writer to use
-     * @param format The output format to use, null for the default
-     */
-    public HTMLSerializer( Writer writer, OutputFormat format )
-    {
-        this( false, format != null ? format : new OutputFormat( Method.HTML, "ISO-8859-1", false ) );
-        setOutputCharStream( writer );
-    }
-
-
-    /**
-     * Constructs a new serializer that writes to the specified output
-     * stream using the specified output format. If <tt>format</tt>
-     * is null, will use a default output format.
-     *
-     * @param output The output stream to use
-     * @param format The output format to use, null for the default
-     */
-    public HTMLSerializer( OutputStream output, OutputFormat format )
-    {
-        this( false, format != null ? format : new OutputFormat( Method.HTML, "ISO-8859-1", false ) );
-        setOutputByteStream( output );
-    }
-
-
-    public void setOutputFormat( OutputFormat format )
-    {
-        super.setOutputFormat( format != null ? format : new OutputFormat( Method.HTML, "ISO-8859-1", false ) );
-    }
-
-
-    //-----------------------------------------//
-    // SAX content handler serializing methods //
-    //-----------------------------------------//
-
-
-    public void startElement( String namespaceURI, String localName,
-                              String rawName, Attributes attrs )
-        throws SAXException
-    {
-        int          i;
-        boolean      preserveSpace;
-        ElementState state;
-        String       name;
-        String       value;
-        String       htmlName;
-        boolean      addNSAttr = false;
-
-        try {
-            if ( _printer == null )
-                throw new IllegalStateException( "SER002 No writer supplied for serializer" );
-
-            state = getElementState();
-            if ( isDocumentState() ) {
-                // If this is the root element handle it differently.
-                // If the first root element in the document, serialize
-                // the document's DOCTYPE. Space preserving defaults
-                // to that of the output format.
-                if ( ! _started )
-                    startDocument( localName == null ? rawName : localName );
-            } else {
-                // For any other element, if first in parent, then
-                // close parent's opening tag and use the parnet's
-                // space preserving.
-                if ( state.empty )
-                    _printer.printText( '>' );
-                // Indent this element on a new line if the first
-                // content of the parent element or immediately
-                // following an element.
-                if ( _indenting && ! state.preserveSpace &&
-                     ( state.empty || state.afterElement ) )
-                    _printer.breakLine();
-            }
-            preserveSpace = state.preserveSpace;
-
-            // Do not change the current element state yet.
-            // This only happens in endElement().
-
-            if ( rawName == null ) {
-                rawName = localName;
-                if ( namespaceURI != null ) {
-                    String prefix;
-                    prefix = getPrefix( namespaceURI );
-                    if ( prefix.length() > 0 )
-                        rawName = prefix + ":" + localName;
-                }
-                addNSAttr = true;
-            }
-            if ( namespaceURI == null )
-                htmlName = rawName;
-            else {
-                if ( namespaceURI.equals( XHTMLNamespace ) )
-                    htmlName = localName;
-                else
-                    htmlName = null;
-            }
-
-            // XHTML: element names are lower case, DOM will be different
-            _printer.printText( '<' );
-            if ( _xhtml )
-                _printer.printText( rawName.toLowerCase() );
-            else
-                _printer.printText( rawName );
-            _printer.indent();
-
-            // For each attribute serialize it's name and value as one part,
-            // separated with a space so the element can be broken on
-            // multiple lines.
-            if ( attrs != null ) {
-                for ( i = 0 ; i < attrs.getLength() ; ++i ) {
-                    _printer.printSpace();
-                    name = attrs.getQName( i ).toLowerCase();;
-                    value = attrs.getValue( i );
-                    if ( _xhtml || namespaceURI != null ) {
-                        // XHTML: print empty string for null values.
-                        if ( value == null ) {
-                            _printer.printText( name );
-                            _printer.printText( "=\"\"" );
-                        } else {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            printEscaped( value );
-                            _printer.printText( '"' );
-                        }
-                    } else {
-                        // HTML: Empty values print as attribute name, no value.
-                        // HTML: URI attributes will print unescaped
-                        if ( value == null ) {
-                            value = "";
-                        }
-                        if ( !_format.getPreserveEmptyAttributes() && value.length() == 0 )
-                            _printer.printText( name );
-                        else if ( HTMLdtd.isURI( rawName, name ) ) {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            _printer.printText( escapeURI( value ) );
-                            _printer.printText( '"' );
-                        } else if ( HTMLdtd.isBoolean( rawName, name ) )
-                            _printer.printText( name );
-                        else {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            printEscaped( value );
-                            _printer.printText( '"' );
-                        }
-                    }
-                }
-            }
-            if ( htmlName != null && HTMLdtd.isPreserveSpace( htmlName ) )
-                preserveSpace = true;
-
-            if ( addNSAttr ) {
-                Enumeration enum;
-
-                enum = _prefixes.keys();
-                while ( enum.hasMoreElements() ) {
-                    _printer.printSpace();
-                    value = (String) enum.nextElement();
-                    name = (String) _prefixes.get( value );
-                    if ( name.length() == 0 ) {
-                        _printer.printText( "xmlns=\"" );
-                        printEscaped( value );
-                        _printer.printText( '"' );
-                    } else {
-                        _printer.printText( "xmlns:" );
-                        _printer.printText( name );
-                        _printer.printText( "=\"" );
-                        printEscaped( value );
-                        _printer.printText( '"' );
-                    }
-                }
-            }
-
-            // Now it's time to enter a new element state
-            // with the tag name and space preserving.
-            // We still do not change the curent element state.
-            state = enterElementState( namespaceURI, localName, rawName, preserveSpace );
-
-            // Prevents line breaks inside A/TD
-
-            if ( htmlName != null && ( htmlName.equalsIgnoreCase( "A" ) ||
-                                       htmlName.equalsIgnoreCase( "TD" ) ) ) {
-                state.empty = false;
-                _printer.printText( '>' );
-            }
-
-            // Handle SCRIPT and STYLE specifically by changing the
-            // state of the current element to CDATA (XHTML) or
-            // unescaped (HTML).
-            if ( htmlName != null && ( rawName.equalsIgnoreCase( "SCRIPT" ) ||
-                                       rawName.equalsIgnoreCase( "STYLE" ) ) ) {
-                if ( _xhtml ) {
-                    // XHTML: Print contents as CDATA section
-                    state.doCData = true;
-                } else {
-                    // HTML: Print contents unescaped
-                    state.unescaped = true;
-                }
-            }
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endElement( String namespaceURI, String localName,
-                            String rawName )
-        throws SAXException
-    {
-        try {
-            endElementIO( namespaceURI, localName, rawName );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endElementIO( String namespaceURI, String localName,
-                              String rawName )
-        throws IOException
-    {
-        ElementState state;
-        String       htmlName;
-
-        // Works much like content() with additions for closing
-        // an element. Note the different checks for the closed
-        // element's state and the parent element's state.
-        _printer.unindent();
-        state = getElementState();
-
-        if ( state.namespaceURI == null )
-            htmlName = state.rawName;
-        else {
-            if ( state.namespaceURI.equals( XHTMLNamespace ) )
-                htmlName = state.localName;
-            else
-                htmlName = null;
-        }
-
-        if ( _xhtml) {
-            if ( state.empty ) {
-                _printer.printText( " />" );
-            } else {
-                // Must leave CData section first
-                if ( state.inCData )
-                    _printer.printText( "]]>" );
-                // XHTML: element names are lower case, DOM will be different
-                _printer.printText( "</" );
-                _printer.printText( state.rawName.toLowerCase() );
-                _printer.printText( '>' );
-            }
-        } else {
-            if ( state.empty )
-                _printer.printText( '>' );
-            // This element is not empty and that last content was
-            // another element, so print a line break before that
-            // last element and this element's closing tag.
-            // [keith] Provided this is not an anchor.
-            // HTML: some elements do not print closing tag (e.g. LI)
-            if ( htmlName == null || ! HTMLdtd.isOnlyOpening( htmlName ) ) {
-                if ( _indenting && ! state.preserveSpace && state.afterElement )
-                    _printer.breakLine();
-                // Must leave CData section first (Illegal in HTML, but still)
-                if ( state.inCData )
-                    _printer.printText( "]]>" );
-                _printer.printText( "</" );
-                _printer.printText( state.rawName );
-                _printer.printText( '>' );
-            }
-        }
-        // Leave the element state and update that of the parent
-        // (if we're not root) to not empty and after element.
-        state = leaveElementState();
-        // Temporary hack to prevent line breaks inside A/TD
-        if ( htmlName == null || ( ! htmlName.equalsIgnoreCase( "A" ) &&
-                                   ! htmlName.equalsIgnoreCase( "TD" ) ) )
-
-            state.afterElement = true;
-        state.empty = false;
-        if ( isDocumentState() )
-            _printer.flush();
-    }
-
-
-    //------------------------------------------//
-    // SAX document handler serializing methods //
-    //------------------------------------------//
-
-
-    public void characters( char[] chars, int start, int length )
-        throws SAXException
-    {
-        ElementState state;
-
-        try {
-            // HTML: no CDATA section
-            state = content();
-            state.doCData = false;
-            super.characters( chars, start, length );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void startElement( String tagName, AttributeList attrs )
-        throws SAXException
-    {
-        int          i;
-        boolean      preserveSpace;
-        ElementState state;
-        String       name;
-        String       value;
-
-        try {
-            if ( _printer == null )
-                throw new IllegalStateException( "SER002 No writer supplied for serializer" );
-
-            state = getElementState();
-            if ( isDocumentState() ) {
-                // If this is the root element handle it differently.
-                // If the first root element in the document, serialize
-                // the document's DOCTYPE. Space preserving defaults
-                // to that of the output format.
-                if ( ! _started )
-                    startDocument( tagName );
-            } else {
-                // For any other element, if first in parent, then
-                // close parent's opening tag and use the parnet's
-                // space preserving.
-                if ( state.empty )
-                    _printer.printText( '>' );
-                // Indent this element on a new line if the first
-                // content of the parent element or immediately
-                // following an element.
-                if ( _indenting && ! state.preserveSpace &&
-                     ( state.empty || state.afterElement ) )
-                    _printer.breakLine();
-            }
-            preserveSpace = state.preserveSpace;
-
-            // Do not change the current element state yet.
-            // This only happens in endElement().
-
-            // XHTML: element names are lower case, DOM will be different
-            _printer.printText( '<' );
-            if ( _xhtml )
-                _printer.printText( tagName.toLowerCase() );
-            else
-                _printer.printText( tagName );
-            _printer.indent();
-
-            // For each attribute serialize it's name and value as one part,
-            // separated with a space so the element can be broken on
-            // multiple lines.
-            if ( attrs != null ) {
-                for ( i = 0 ; i < attrs.getLength() ; ++i ) {
-                    _printer.printSpace();
-                    name = attrs.getName( i ).toLowerCase();;
-                    value = attrs.getValue( i );
-                    if ( _xhtml ) {
-                        // XHTML: print empty string for null values.
-                        if ( value == null ) {
-                            _printer.printText( name );
-                            _printer.printText( "=\"\"" );
-                        } else {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            printEscaped( value );
-                            _printer.printText( '"' );
-                        }
-                    } else {
-                        // HTML: Empty values print as attribute name, no value.
-                        // HTML: URI attributes will print unescaped
-                        if ( value == null ) {
-                            value = "";
-                        }
-                        if ( !_format.getPreserveEmptyAttributes() && value.length() == 0 )
-                            _printer.printText( name );
-                        else if ( HTMLdtd.isURI( tagName, name ) ) {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            _printer.printText( escapeURI( value ) );
-                            _printer.printText( '"' );
-                        } else if ( HTMLdtd.isBoolean( tagName, name ) )
-                            _printer.printText( name );
-                        else {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            printEscaped( value );
-                            _printer.printText( '"' );
-                        }
-                    }
-                }
-            }
-            if ( HTMLdtd.isPreserveSpace( tagName ) )
-                preserveSpace = true;
-
-            // Now it's time to enter a new element state
-            // with the tag name and space preserving.
-            // We still do not change the curent element state.
-            state = enterElementState( null, null, tagName, preserveSpace );
-
-            // Prevents line breaks inside A/TD
-            if ( tagName.equalsIgnoreCase( "A" ) || tagName.equalsIgnoreCase( "TD" ) ) {
-                state.empty = false;
-                _printer.printText( '>' );
-            }
-
-            // Handle SCRIPT and STYLE specifically by changing the
-            // state of the current element to CDATA (XHTML) or
-            // unescaped (HTML).
-            if ( tagName.equalsIgnoreCase( "SCRIPT" ) ||
-                 tagName.equalsIgnoreCase( "STYLE" ) ) {
-                if ( _xhtml ) {
-                    // XHTML: Print contents as CDATA section
-                    state.doCData = true;
-                } else {
-                    // HTML: Print contents unescaped
-                    state.unescaped = true;
-                }
-            }
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endElement( String tagName )
-        throws SAXException
-    {
-        endElement( null, null, tagName );
-    }
-
-
-    //------------------------------------------//
-    // Generic node serializing methods methods //
-    //------------------------------------------//
-
-
-    /**
-     * Called to serialize the document's DOCTYPE by the root element.
-     * The document type declaration must name the root element,
-     * but the root element is only known when that element is serialized,
-     * and not at the start of the document.
-     * <p>
-     * This method will check if it has not been called before ({@link #_started}),
-     * will serialize the document type declaration, and will serialize all
-     * pre-root comments and PIs that were accumulated in the document
-     * (see {@link #serializePreRoot}). Pre-root will be serialized even if
-     * this is not the first root element of the document.
-     */
-    protected void startDocument( String rootTagName )
-        throws IOException
-    {
-        StringBuffer buffer;
-
-        // Not supported in HTML/XHTML, but we still have to switch
-        // out of DTD mode.
-        _printer.leaveDTD();
-        if ( ! _started ) {
-            // If the public and system identifiers were not specified
-            // in the output format, use the appropriate ones for HTML
-            // or XHTML.
-            if ( _docTypePublicId == null && _docTypeSystemId == null ) {
-                if ( _xhtml ) {
-                    _docTypePublicId = HTMLdtd.XHTMLPublicId;
-                    _docTypeSystemId = HTMLdtd.XHTMLSystemId;
-                } else {
-                    _docTypePublicId = HTMLdtd.HTMLPublicId;
-                    _docTypeSystemId = HTMLdtd.HTMLSystemId;
-                }
-            }
-
-            if ( ! _format.getOmitDocumentType() ) {
-                // XHTML: If public idnentifier and system identifier
-                //  specified, print them, else print just system identifier
-                // HTML: If public identifier specified, print it with
-                //  system identifier, if specified.
-                if ( _docTypePublicId != null && ( ! _xhtml || _docTypeSystemId != null )  ) {
-                    _printer.printText( "<!DOCTYPE HTML PUBLIC " );
-                    printDoctypeURL( _docTypePublicId );
-                    if ( _docTypeSystemId != null ) {
-                        if ( _indenting ) {
-                            _printer.breakLine();
-                            _printer.printText( "                      " );
-                        } else
-                        _printer.printText( ' ' );
-                        printDoctypeURL( _docTypeSystemId );
-                    }
-                    _printer.printText( '>' );
-                    _printer.breakLine();
-                } else if ( _docTypeSystemId != null ) {
-                    _printer.printText( "<!DOCTYPE HTML SYSTEM " );
-                    printDoctypeURL( _docTypeSystemId );
-                    _printer.printText( '>' );
-                    _printer.breakLine();
-                }
-            }
-        }
-
-        _started = true;
-        // Always serialize these, even if not te first root element.
-        serializePreRoot();
-    }
-
-
-    /**
-     * Called to serialize a DOM element. Equivalent to calling {@link
-     * #startElement}, {@link #endElement} and serializing everything
-     * inbetween, but better optimized.
-     */
-    protected void serializeElement( Element elem )
-        throws IOException
-    {
-        Attr         attr;
-        NamedNodeMap attrMap;
-        int          i;
-        Node         child;
-        ElementState state;
-        boolean      preserveSpace;
-        String       name;
-        String       value;
-        String       tagName;
-
-        tagName = elem.getTagName();
-        state = getElementState();
-        if ( isDocumentState() ) {
-            // If this is the root element handle it differently.
-            // If the first root element in the document, serialize
-            // the document's DOCTYPE. Space preserving defaults
-            // to that of the output format.
-            if ( ! _started )
-                startDocument( tagName );
-        } else {
-            // For any other element, if first in parent, then
-            // close parent's opening tag and use the parnet's
-            // space preserving.
-            if ( state.empty )
-                _printer.printText( '>' );
-            // Indent this element on a new line if the first
-            // content of the parent element or immediately
-            // following an element.
-            if ( _indenting && ! state.preserveSpace &&
-                 ( state.empty || state.afterElement ) )
-                _printer.breakLine();
-        }
-        preserveSpace = state.preserveSpace;
-
-        // Do not change the current element state yet.
-        // This only happens in endElement().
-
-        // XHTML: element names are lower case, DOM will be different
-        _printer.printText( '<' );
-        if ( _xhtml )
-            _printer.printText( tagName.toLowerCase() );
-        else
-            _printer.printText( tagName );
-        _printer.indent();
-
-        // Lookup the element's attribute, but only print specified
-        // attributes. (Unspecified attributes are derived from the DTD.
-        // For each attribute print it's name and value as one part,
-        // separated with a space so the element can be broken on
-        // multiple lines.
-        attrMap = elem.getAttributes();
-        if ( attrMap != null ) {
-            for ( i = 0 ; i < attrMap.getLength() ; ++i ) {
-                attr = (Attr) attrMap.item( i );
-                name = attr.getName().toLowerCase();
-                value = attr.getValue();
-                if ( attr.getSpecified() ) {
-                    _printer.printSpace();
-                    if ( _xhtml ) {
-                        // XHTML: print empty string for null values.
-                        if ( value == null ) {
-                            _printer.printText( name );
-                            _printer.printText( "=\"\"" );
-                        } else {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            printEscaped( value );
-                            _printer.printText( '"' );
-                        }
-                    } else {
-                        // HTML: Empty values print as attribute name, no value.
-                        // HTML: URI attributes will print unescaped
-                        if ( value == null ) {
-                            value = "";
-                        }
-                        if ( !_format.getPreserveEmptyAttributes() && value.length() == 0 )
-                            _printer.printText( name );
-                        else if ( HTMLdtd.isURI( tagName, name ) ) {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            _printer.printText( escapeURI( value ) );
-                            _printer.printText( '"' );
-                        } else if ( HTMLdtd.isBoolean( tagName, name ) )
-                            _printer.printText( name );
-                        else {
-                            _printer.printText( name );
-                            _printer.printText( "=\"" );
-                            printEscaped( value );
-                            _printer.printText( '"' );
-                        }
-                    }
-                }
-            }
-        }
-        if ( HTMLdtd.isPreserveSpace( tagName ) )
-            preserveSpace = true;
-
-        // If element has children, or if element is not an empty tag,
-        // serialize an opening tag.
-        if ( elem.hasChildNodes() || ! HTMLdtd.isEmptyTag( tagName ) ) {
-            // Enter an element state, and serialize the children
-            // one by one. Finally, end the element.
-            state = enterElementState( null, null, tagName, preserveSpace );
-
-            // Prevents line breaks inside A/TD
-            if ( tagName.equalsIgnoreCase( "A" ) || tagName.equalsIgnoreCase( "TD" ) ) {
-                state.empty = false;
-                _printer.printText( '>' );
-            }
-
-            // Handle SCRIPT and STYLE specifically by changing the
-            // state of the current element to CDATA (XHTML) or
-            // unescaped (HTML).
-            if ( tagName.equalsIgnoreCase( "SCRIPT" ) ||
-                 tagName.equalsIgnoreCase( "STYLE" ) ) {
-                if ( _xhtml ) {
-                    // XHTML: Print contents as CDATA section
-                    state.doCData = true;
-                } else {
-                    // HTML: Print contents unescaped
-                    state.unescaped = true;
-                }
-            }
-            child = elem.getFirstChild();
-            while ( child != null ) {
-                serializeNode( child );
-                child = child.getNextSibling();
-            }
-            endElementIO( null, null, tagName );
-        } else {
-            _printer.unindent();
-            // XHTML: Close empty tag with ' />' so it's XML and HTML compatible.
-            // HTML: Empty tags are defined as such in DTD no in document.
-            if ( _xhtml )
-                _printer.printText( " />" );
-            else
-                _printer.printText( '>' );
-            // After element but parent element is no longer empty.
-            state.afterElement = true;
-            state.empty = false;
-            if ( isDocumentState() )
-                _printer.flush();
-        }
-    }
-
-
-
-    protected void characters( String text )
-        throws IOException
-    {
-        ElementState state;
-
-        // HTML: no CDATA section
-        state = content();
-        super.characters( text );
-    }
-
-
-    protected String getEntityRef( int ch )
-    {
-        return HTMLdtd.fromChar( ch );
-    }
-
-
-    protected String escapeURI( String uri )
-    {
-        int index;
-
-        // XXX  Apparently Netscape doesn't like if we escape the URI
-        //      using %nn, so we leave it as is, just remove any quotes.
-        index = uri.indexOf( "\"" );
-        if ( index >= 0 )
-            return uri.substring( 0, index );
-        else
-            return uri;
-    }
-
-
-}
-
-
-
-
diff --git a/src/org/apache/xml/serialize/HTMLdtd.java b/src/org/apache/xml/serialize/HTMLdtd.java
deleted file mode 100755
index da5db91..0000000
--- a/src/org/apache/xml/serialize/HTMLdtd.java
+++ /dev/null
@@ -1,587 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-// Aug 21, 2000:
-//   Fixed bug in isElement and made HTMLdtd public.
-//   Contributed by Eric SCHAEFFER" <eschaeffer@posterconseil.com>
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
-import java.util.Hashtable;
-
-
-/**
- * Utility class for accessing information specific to HTML documents.
- * The HTML DTD is expressed as three utility function groups. Two methods
- * allow for checking whether an element requires an open tag on printing
- * ({@link #isEmptyTag}) or on parsing ({@link #isOptionalClosing}).
- * <P>
- * Two other methods translate character references from name to value and
- * from value to name. A small entities resource is loaded into memory the
- * first time any of these methods is called for fast and efficient access.
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- */
-public final class HTMLdtd
-{
-
-    /**
-     * Public identifier for HTML document type.
-     */
-    public static final String HTMLPublicId = "-//W3C//DTD HTML 4.0//EN";
-
-    /**
-     * System identifier for HTML document type.
-     */
-    public static final String HTMLSystemId =
-        "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd";
-
-    /**
-     * Public identifier for XHTML document type.
-     */
-    public static final String XHTMLPublicId =
-        "-//W3C//DTD XHTML 1.0 Strict//EN";
-
-    /**
-     * System identifier for XHTML document type.
-     */
-    public static final String XHTMLSystemId =
-        "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd";
-    /**
-     * Table of reverse character reference mapping. Character codes are held
-     * as single-character strings, mapped to their reference name.
-     */
-    private static Hashtable        _byChar;
-
-
-    /**
-     * Table of entity name to value mapping. Entities are held as strings,
-     * character references as <TT>Character</TT> objects.
-     */
-    private static Hashtable        _byName;
-
-
-    private static Hashtable        _boolAttrs;
-
-
-    /**
-     * Holds element definitions.
-     */
-    private static Hashtable        _elemDefs;
-
-
-    /**
-     * Locates the HTML entities file that is loaded upon initialization.
-     * This file is a resource loaded with the default class loader.
-     */
-    private static final String     ENTITIES_RESOURCE = "HTMLEntities.res";
-
-
-    /**
-     * Only opening tag should be printed.
-     */
-    private static final int ONLY_OPENING = 0x0001;
-
-    /**
-     * Element contains element content only.
-     */
-    private static final int ELEM_CONTENT = 0x0002;
-
-
-    /**
-     * Element preserve spaces.
-     */
-    private static final int PRESERVE     = 0x0004;
-
-
-    /**
-     * Optional closing tag.
-     */
-    private static final int OPT_CLOSING  = 0x0008;
-
-
-    /**
-     * Element is empty (also means only opening tag)
-     */
-    private static final int EMPTY        = 0x0010 | ONLY_OPENING;
-
-
-    /**
-     * Allowed to appear in head.
-     */
-    private static final int ALLOWED_HEAD = 0x0020;
-
-
-    /**
-     * When opened, closes P.
-     */
-    private static final int CLOSE_P      = 0x0040;
-
-
-    /**
-     * When opened, closes DD or DT.
-     */
-    private static final int CLOSE_DD_DT  = 0x0080;
-
-
-    /**
-     * When opened, closes itself.
-     */
-    private static final int CLOSE_SELF   = 0x0100;
-
-
-    /**
-     * When opened, closes another table section.
-     */
-    private static final int CLOSE_TABLE  = 0x0200;
-
-
-    /**
-     * When opened, closes TH or TD.
-     */
-    private static final int CLOSE_TH_TD  = 0x04000;
-
-
-    /**
-     * Returns true if element is declared to be empty. HTML elements are
-     * defines as empty in the DTD, not by the document syntax.
-     *
-     * @param tagName The element tag name (upper case)
-     * @return True if element is empty
-     */
-    public static boolean isEmptyTag( String tagName )
-    {
-        return isElement( tagName, EMPTY );
-    }
-
-
-    /**
-     * Returns true if element is declared to have element content.
-     * Whitespaces appearing inside element content will be ignored,
-     * other text will simply report an error.
-     *
-     * @param tagName The element tag name (upper case)
-     * @return True if element content
-     */
-    public static boolean isElementContent( String tagName )
-    {
-        return isElement( tagName, ELEM_CONTENT );
-    }
-
-
-    /**
-     * Returns true if element's textual contents preserves spaces.
-     * This only applies to PRE and TEXTAREA, all other HTML elements
-     * do not preserve space.
-     *
-     * @param tagName The element tag name (upper case)
-     * @return True if element's text content preserves spaces
-     */
-    public static boolean isPreserveSpace( String tagName )
-    {
-        return isElement( tagName, PRESERVE );
-    }
-
-
-    /**
-     * Returns true if element's closing tag is optional and need not
-     * exist. An error will not be reported for such elements if they
-     * are not closed. For example, <tt>LI</tt> is most often not closed.
-     *
-     * @param tagName The element tag name (upper case)
-     * @return True if closing tag implied
-     */
-    public static boolean isOptionalClosing( String tagName )
-    {
-        return isElement( tagName, OPT_CLOSING );
-    }
-
-
-    /**
-     * Returns true if element's closing tag is generally not printed.
-     * For example, <tt>LI</tt> should not print the closing tag.
-     *
-     * @param tagName The element tag name (upper case)
-     * @return True if only opening tag should be printed
-     */
-    public static boolean isOnlyOpening( String tagName )
-    {
-        return isElement( tagName, ONLY_OPENING );
-    }
-
-
-    /**
-     * Returns true if the opening of one element (<tt>tagName</tt>) implies
-     * the closing of another open element (<tt>openTag</tt>). For example,
-     * every opening <tt>LI</tt> will close the previously open <tt>LI</tt>,
-     * and every opening <tt>BODY</tt> will close the previously open <tt>HEAD</tt>.
-     *
-     * @param tagName The newly opened element
-     * @param openTag The already opened element
-     * @return True if closing tag closes opening tag
-     */
-    public static boolean isClosing( String tagName, String openTag )
-    {
-        // Several elements are defined as closing the HEAD
-        if ( openTag.equalsIgnoreCase( "HEAD" ) )
-            return ! isElement( tagName, ALLOWED_HEAD );
-        // P closes iteself
-        if ( openTag.equalsIgnoreCase( "P" ) )
-            return isElement( tagName, CLOSE_P );
-        // DT closes DD, DD closes DT
-        if ( openTag.equalsIgnoreCase( "DT" ) || openTag.equalsIgnoreCase( "DD" ) )
-            return isElement( tagName, CLOSE_DD_DT );
-        // LI and OPTION close themselves
-        if ( openTag.equalsIgnoreCase( "LI" ) || openTag.equalsIgnoreCase( "OPTION" ) )
-            return isElement( tagName, CLOSE_SELF );
-        // Each of these table sections closes all the others
-        if ( openTag.equalsIgnoreCase( "THEAD" ) || openTag.equalsIgnoreCase( "TFOOT" ) ||
-             openTag.equalsIgnoreCase( "TBODY" ) || openTag.equalsIgnoreCase( "TR" ) ||
-             openTag.equalsIgnoreCase( "COLGROUP" ) )
-            return isElement( tagName, CLOSE_TABLE );
-        // TD closes TH and TH closes TD
-        if ( openTag.equalsIgnoreCase( "TH" ) || openTag.equalsIgnoreCase( "TD" ) )
-            return isElement( tagName, CLOSE_TH_TD );
-        return false;
-    }
-
-
-    /**
-     * Returns true if the specified attribute it a URI and should be
-     * escaped appropriately. In HTML URIs are escaped differently
-     * than normal attributes.
-     *
-     * @param tagName The element's tag name
-     * @param attrName The attribute's name
-     */
-    public static boolean isURI( String tagName, String attrName )
-    {
-        // Stupid checks.
-        return ( attrName.equalsIgnoreCase( "href" ) || attrName.equalsIgnoreCase( "src" ) );
-    }
-
-
-    /**
-     * Returns true if the specified attribute is a boolean and should be
-     * printed without the value. This applies to attributes that are true
-     * if they exist, such as selected (OPTION/INPUT).
-     *
-     * @param tagName The element's tag name
-     * @param attrName The attribute's name
-     */
-    public static boolean isBoolean( String tagName, String attrName )
-    {
-        String[] attrNames;
-
-        attrNames = (String[]) _boolAttrs.get( tagName.toUpperCase() );
-        if ( attrNames == null )
-            return false;
-        for ( int i = 0 ; i < attrNames.length ; ++i )
-            if ( attrNames[ i ].equalsIgnoreCase( attrName ) )
-                return true;
-        return false;
-    }
-
-
-    /**
-     * Returns the value of an HTML character reference by its name. If the
-     * reference is not found or was not defined as a character reference,
-     * returns EOF (-1).
-     *
-     * @param name Name of character reference
-     * @return Character code or EOF (-1)
-     */
-    public static int charFromName( String name )
-    {
-        Object    value;
-
-        initialize();
-        value = _byName.get( name );
-        if ( value != null && value instanceof Integer )
-            return ( (Integer) value ).intValue();
-        else
-            return -1;
-    }
-
-
-    /**
-     * Returns the name of an HTML character reference based on its character
-     * value. Only valid for entities defined from character references. If no
-     * such character value was defined, return null.
-     *
-     * @param value Character value of entity
-     * @return Entity's name or null
-     */
-    public static String fromChar(int value )
-    {
-       if (value > 0xffff)
-            return null;
-
-        String name;
-
-        initialize();
-        name = (String) _byChar.get( new Integer( value ) );
-        return name;
-    }
-
-
-    /**
-     * Initialize upon first access. Will load all the HTML character references
-     * into a list that is accessible by name or character value and is optimized
-     * for character substitution. This method may be called any number of times
-     * but will execute only once.
-     */
-    private static void initialize()
-    {
-        InputStream     is = null;
-        BufferedReader  reader = null;
-        int             index;
-        String          name;
-        String          value;
-        int             code;
-        String          line;
-
-        // Make sure not to initialize twice.
-        if ( _byName != null )
-            return;
-        try {
-            _byName = new Hashtable();
-            _byChar = new Hashtable();
-            is = HTMLdtd.class.getResourceAsStream( ENTITIES_RESOURCE );
-            if ( is == null )
-                throw new RuntimeException( "SER003 The resource [" + ENTITIES_RESOURCE + "] could not be found.\n" + ENTITIES_RESOURCE);
-            reader = new BufferedReader( new InputStreamReader( is ) );
-            line = reader.readLine();
-            while ( line != null ) {
-                if ( line.length() == 0 || line.charAt( 0 ) == '#' ) {
-                    line = reader.readLine();
-                    continue;
-                }
-                index = line.indexOf( ' ' );
-                if ( index > 1 ) {
-                    name = line.substring( 0, index );
-                    ++index;
-                    if ( index < line.length() ) {
-                        value = line.substring( index );
-                        index = value.indexOf( ' ' );
-                        if ( index > 0 )
-                            value = value.substring( 0, index );
-                        code = Integer.parseInt( value );
-                                        defineEntity( name, (char) code );
-                    }
-                }
-                line = reader.readLine();
-            }
-            is.close();
-        }  catch ( Exception except ) {
-            throw new RuntimeException( "SER003 The resource [" + ENTITIES_RESOURCE + "] could not load: " +
-                                        except.toString() + "\n" + ENTITIES_RESOURCE + "\t" + except.toString());
-        } finally {
-            if ( is != null ) {
-                try {
-                    is.close();
-                } catch ( Exception except ) { }
-            }
-        }
-    }
-
-
-    /**
-     * Defines a new character reference. The reference's name and value are
-     * supplied. Nothing happens if the character reference is already defined.
-     * <P>
-     * Unlike internal entities, character references are a string to single
-     * character mapping. They are used to map non-ASCII characters both on
-     * parsing and printing, primarily for HTML documents. '&lt;amp;' is an
-     * example of a character reference.
-     *
-     * @param name The entity's name
-     * @param value The entity's value
-     */
-    private static void defineEntity( String name, char value )
-    {
-        if ( _byName.get( name ) == null ) {
-            _byName.put( name, new Integer( value ) );
-            _byChar.put( new Integer( value ), name );
-        }
-    }
-
-
-    private static void defineElement( String name, int flags )
-    {
-        _elemDefs.put( name, new Integer( flags ) );
-    }
-
-
-    private static void defineBoolean( String tagName, String attrName )
-    {
-        defineBoolean( tagName, new String[] { attrName } );
-    }
-
-
-    private static void defineBoolean( String tagName, String[] attrNames )
-    {
-        _boolAttrs.put( tagName, attrNames );
-    }
-
-
-    private static boolean isElement( String name, int flag )
-    {
-        Integer flags;
-
-        flags = (Integer) _elemDefs.get( name.toUpperCase() );
-        if ( flags == null )
-            return false;
-        else
-            return ( ( flags.intValue() & flag ) == flag );
-    }
-
-
-    static
-    {
-        _elemDefs = new Hashtable();
-        defineElement( "ADDRESS", CLOSE_P );
-        defineElement( "AREA", EMPTY );
-        defineElement( "BASE",  EMPTY | ALLOWED_HEAD );
-        defineElement( "BASEFONT", EMPTY );
-        defineElement( "BLOCKQUOTE", CLOSE_P );
-        defineElement( "BODY", OPT_CLOSING );
-        defineElement( "BR", EMPTY );
-        defineElement( "COL", EMPTY );
-        defineElement( "COLGROUP", ELEM_CONTENT | OPT_CLOSING | CLOSE_TABLE );
-        defineElement( "DD", OPT_CLOSING | ONLY_OPENING | CLOSE_DD_DT );
-        defineElement( "DIV", CLOSE_P );
-        defineElement( "DL", ELEM_CONTENT | CLOSE_P );
-        defineElement( "DT", OPT_CLOSING | ONLY_OPENING | CLOSE_DD_DT );
-        defineElement( "FIELDSET", CLOSE_P );
-        defineElement( "FORM", CLOSE_P );
-        defineElement( "FRAME", EMPTY | OPT_CLOSING );
-        defineElement( "H1", CLOSE_P );
-        defineElement( "H2", CLOSE_P );
-        defineElement( "H3", CLOSE_P );
-        defineElement( "H4", CLOSE_P );
-        defineElement( "H5", CLOSE_P );
-        defineElement( "H6", CLOSE_P );
-        defineElement( "HEAD", ELEM_CONTENT | OPT_CLOSING );
-        defineElement( "HR", EMPTY | CLOSE_P );
-        defineElement( "HTML", ELEM_CONTENT | OPT_CLOSING );
-        defineElement( "IMG", EMPTY );
-        defineElement( "INPUT", EMPTY );
-        defineElement( "ISINDEX", EMPTY | ALLOWED_HEAD );
-        defineElement( "LI", OPT_CLOSING | ONLY_OPENING | CLOSE_SELF );
-        defineElement( "LINK", EMPTY | ALLOWED_HEAD );
-        defineElement( "MAP", ALLOWED_HEAD );
-        defineElement( "META", EMPTY | ALLOWED_HEAD );
-        defineElement( "OL", ELEM_CONTENT | CLOSE_P );
-        defineElement( "OPTGROUP", ELEM_CONTENT );
-        defineElement( "OPTION", OPT_CLOSING | ONLY_OPENING | CLOSE_SELF );
-        defineElement( "P", OPT_CLOSING | CLOSE_P | CLOSE_SELF );
-        defineElement( "PARAM", EMPTY );
-        defineElement( "PRE", PRESERVE | CLOSE_P );
-        defineElement( "SCRIPT", ALLOWED_HEAD | PRESERVE );
-        defineElement( "NOSCRIPT", ALLOWED_HEAD | PRESERVE );
-        defineElement( "SELECT", ELEM_CONTENT );
-        defineElement( "STYLE", ALLOWED_HEAD | PRESERVE );
-        defineElement( "TABLE", ELEM_CONTENT | CLOSE_P );
-        defineElement( "TBODY", ELEM_CONTENT | OPT_CLOSING | CLOSE_TABLE );
-        defineElement( "TD", OPT_CLOSING | CLOSE_TH_TD );
-        defineElement( "TEXTAREA", PRESERVE );
-        defineElement( "TFOOT", ELEM_CONTENT | OPT_CLOSING | CLOSE_TABLE );
-        defineElement( "TH", OPT_CLOSING | CLOSE_TH_TD );
-        defineElement( "THEAD", ELEM_CONTENT | OPT_CLOSING | CLOSE_TABLE );
-        defineElement( "TITLE", ALLOWED_HEAD );
-        defineElement( "TR", ELEM_CONTENT | OPT_CLOSING | CLOSE_TABLE );
-        defineElement( "UL", ELEM_CONTENT | CLOSE_P );
-
-        _boolAttrs = new Hashtable();
-        defineBoolean( "AREA", "href" );
-        defineBoolean( "BUTTON", "disabled" );
-        defineBoolean( "DIR", "compact" );
-        defineBoolean( "DL", "compact" );
-        defineBoolean( "FRAME", "noresize" );
-        defineBoolean( "HR", "noshade" );
-        defineBoolean( "IMAGE", "ismap" );
-        defineBoolean( "INPUT", new String[] { "defaultchecked", "checked", "readonly", "disabled" } );
-        defineBoolean( "LINK", "link" );
-        defineBoolean( "MENU", "compact" );
-        defineBoolean( "OBJECT", "declare" );
-        defineBoolean( "OL", "compact" );
-        defineBoolean( "OPTGROUP", "disabled" );
-        defineBoolean( "OPTION", new String[] { "default-selected", "selected", "disabled" } );
-        defineBoolean( "SCRIPT", "defer" );
-        defineBoolean( "SELECT", new String[] { "multiple", "disabled" } );
-        defineBoolean( "STYLE", "disabled" );
-        defineBoolean( "TD", "nowrap" );
-        defineBoolean( "TH", "nowrap" );
-        defineBoolean( "TEXTAREA", new String[] { "disabled", "readonly" } );
-        defineBoolean( "UL", "compact" );
-
-        initialize();
-    }
-
-
-
-}
-
diff --git a/src/org/apache/xml/serialize/IndentPrinter.java b/src/org/apache/xml/serialize/IndentPrinter.java
deleted file mode 100644
index bbbd040..0000000
--- a/src/org/apache/xml/serialize/IndentPrinter.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.Writer;
-import java.io.StringWriter;
-import java.io.IOException;
-
-
-/**
- * Extends {@link Printer} and adds support for indentation and line
- * wrapping.
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- */
-public class IndentPrinter
-    extends Printer
-{
-
-
-    /**
-     * Holds the currently accumulating text line. This buffer will constantly
-     * be reused by deleting its contents instead of reallocating it.
-     */
-    private StringBuffer    _line;
-
-
-    /**
-     * Holds the currently accumulating text that follows {@link #_line}.
-     * When the end of the part is identified by a call to {@link #printSpace}
-     * or {@link #breakLine}, this part is added to the accumulated line.
-     */
-    private StringBuffer    _text;
-
-
-    /**
-     * Counts how many white spaces come between the accumulated line and the
-     * current accumulated text. Multiple spaces at the end of the a line
-     * will not be printed.
-     */
-    private int             _spaces;
-
-
-    /**
-     * Holds the indentation for the current line that is now accumulating in
-     * memory and will be sent for printing shortly.
-     */
-    private int             _thisIndent;
-    
-    
-    /**
-     * Holds the indentation for the next line to be printed. After this line is
-     * printed, {@link #_nextIndent} is assigned to {@link #_thisIndent}.
-     */
-    private int             _nextIndent;
-
-
-    public IndentPrinter( Writer writer, OutputFormat format)
-    {
-        super( writer, format );
-        // Initialize everything for a first/second run.
-        _line = new StringBuffer( 80 );
-        _text = new StringBuffer( 20 );
-        _spaces = 0;
-        _thisIndent = _nextIndent = 0;
-    }
-
-
-    /**
-     * Called by any of the DTD handlers to enter DTD mode.
-     * Once entered, all output will be accumulated in a string
-     * that can be printed as part of the document's DTD.
-     * This method may be called any number of time but will only
-     * have affect the first time it's called. To exist DTD state
-     * and get the accumulated DTD, call {@link #leaveDTD}.
-     */
-    public void enterDTD()
-    {
-        // Can only enter DTD state once. Once we're out of DTD
-        // state, can no longer re-enter it.
-        if ( _dtdWriter == null ) {
-            _line.append( _text );
-            _text = new StringBuffer( 20 );
-            flushLine( false );
-            _dtdWriter = new StringWriter();
-            _docWriter = _writer;
-            _writer = _dtdWriter;
-        }
-    }
-    
-    
-    /**
-     * Called by the root element to leave DTD mode and if any
-     * DTD parts were printer, will return a string with their
-     * textual content.
-     */
-    public String leaveDTD()
-    {
-        // Only works if we're going out of DTD mode.
-        if ( _writer == _dtdWriter ) {
-            _line.append( _text );
-            _text = new StringBuffer( 20 );
-            flushLine( false );
-            _writer = _docWriter;
-            return _dtdWriter.toString();
-        } else
-            return null;
-    }
-    
-    
-    /**
-     * Called to print additional text. Each time this method is called
-     * it accumulates more text. When a space is printed ({@link
-     * #printSpace}) all the accumulated text becomes one part and is
-     * added to the accumulate line. When a line is long enough, it can
-     * be broken at its text boundary.
-     *
-     * @param text The text to print
-     */
-    public void printText( String text )
-    {
-        _text.append( text );
-    }
-    
-    
-    public void printText( StringBuffer text )
-    {
-        _text.append( text );
-    }
-
-
-    public void printText( char ch )
-    {
-        _text.append( ch );
-    }
-
-
-    public void printText( char[] chars, int start, int length )
-    {
-        _text.append( chars, start, length );
-    }
-    
-
-    /**
-     * Called to print a single space between text parts that may be
-     * broken into separate lines. Must not be called to print a space
-     * when preserving spaces. The text accumulated so far with {@link
-     * #printText} will be added to the accumulated line, and a space
-     * separator will be counted. If the line accumulated so far is
-     * long enough, it will be printed.
-     */
-    public void printSpace()
-    {
-        // The line consists of the text accumulated in _line,
-        // followed by one or more spaces as counted by _spaces,
-        // followed by more space accumulated in _text:
-        // -  Text is printed and accumulated into _text.
-        // -  A space is printed, so _text is added to _line and
-        //    a space is counted.
-        // -  More text is printed and accumulated into _text.
-        // -  A space is printed, the previous spaces are added
-        //    to _line, the _text is added to _line, and a new
-        //    space is counted.
-        
-        // If text was accumulated with printText(), then the space
-        // means we have to move that text into the line and
-        // start accumulating new text with printText().
-        if ( _text.length() > 0 ) {
-            // If the text breaks a line bounary, wrap to the next line.
-            // The printed line size consists of the indentation we're going
-            // to use next, the accumulated line so far, some spaces and the
-            // accumulated text so far.
-            if ( _format.getLineWidth() > 0 &&
-                 _thisIndent + _line.length() + _spaces + _text.length() > _format.getLineWidth() ) {
-                flushLine( false );
-                try {
-                    // Print line and new line, then zero the line contents.
-                    _writer.write( _format.getLineSeparator() );
-                } catch ( IOException except ) {
-                    // We don't throw an exception, but hold it
-                    // until the end of the document.
-                    if ( _exception == null )
-                        _exception = except;
-                }
-            }
-            
-            // Add as many spaces as we accumulaed before.
-            // At the end of this loop, _spaces is zero.
-            while ( _spaces > 0 ) {
-                _line.append( ' ' );
-                --_spaces;
-            }
-            _line.append( _text );
-            _text = new StringBuffer( 20 );
-        }
-        // Starting a new word: accumulate the text between the line
-        // and this new word; not a new word: just add another space.
-        ++_spaces;
-    }
-
-
-    /**
-     * Called to print a line consisting of the text accumulated so
-     * far. This is equivalent to calling {@link #printSpace} but
-     * forcing the line to print and starting a new line ({@link
-     * #printSpace} will only start a new line if the current line
-     * is long enough).
-     */
-    public void breakLine()
-    {
-        breakLine( false );
-    }
-
-
-    public void breakLine( boolean preserveSpace )
-    {
-        // Equivalent to calling printSpace and forcing a flushLine.
-        if ( _text.length() > 0 ) {
-            while ( _spaces > 0 ) {
-                _line.append( ' ' );
-                --_spaces;
-            }
-            _line.append( _text );
-            _text = new StringBuffer( 20 );
-        }
-        flushLine( preserveSpace );
-        try {
-            // Print line and new line, then zero the line contents.
-            _writer.write( _format.getLineSeparator() );
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-        }
-    }
-    
-
-    /**
-     * Flushes the line accumulated so far to the writer and get ready
-     * to accumulate the next line. This method is called by {@link
-     * #printText} and {@link #printSpace} when the accumulated line plus
-     * accumulated text are two long to fit on a given line. At the end of
-     * this method {@link #_line} is empty and {@link #_spaces} is zero.
-     */
-    public void flushLine( boolean preserveSpace )
-    {
-        int     indent;
-        
-        if ( _line.length() > 0 ) {
-            try {
-                
-                if ( _format.getIndenting() && ! preserveSpace ) {
-                    // Make sure the indentation does not blow us away.
-                    indent = _thisIndent;
-                    if ( ( 2 * indent ) > _format.getLineWidth() && _format.getLineWidth() > 0 )
-                        indent = _format.getLineWidth() / 2;
-                    // Print the indentation as spaces and set the current
-                    // indentation to the next expected indentation.
-                    while ( indent > 0 ) {
-                        _writer.write( ' ' );
-                        --indent;
-                    }
-                }
-                _thisIndent = _nextIndent;
-                
-                // There is no need to print the spaces at the end of the line,
-                // they are simply stripped and replaced with a single line
-                // separator.
-                _spaces = 0;
-                _writer.write( _line.toString() );
-                
-                _line = new StringBuffer( 40 );
-            } catch ( IOException except ) {
-                // We don't throw an exception, but hold it
-                // until the end of the document.
-                if ( _exception == null )
-                    _exception = except;
-            }
-        }
-    }
-    
-    
-    /**
-     * Flush the output stream. Must be called when done printing
-     * the document, otherwise some text might be buffered.
-     */
-    public void flush()
-    {
-        if ( _line.length() > 0 || _text.length() > 0 )
-            breakLine();
-        try {
-            _writer.flush();
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-        }
-    }
-
-
-    /**
-     * Increment the indentation for the next line.
-     */
-    public void indent()
-    {
-        _nextIndent += _format.getIndent();
-    }
-
-
-    /**
-     * Decrement the indentation for the next line.
-     */
-    public void unindent()
-    {
-        _nextIndent -= _format.getIndent();
-        if ( _nextIndent < 0 )
-            _nextIndent = 0;
-        // If there is no current line and we're de-identing then
-        // this indentation level is actually the next level.
-        if ( ( _line.length() + _spaces + _text.length() ) == 0 )
-            _thisIndent = _nextIndent;
-    }
-
-
-    public int getNextIndent()
-    {
-        return _nextIndent;
-    }
-
-
-    public void setNextIndent( int indent )
-    {
-        _nextIndent = indent;
-    }
-
-
-    public void setThisIndent( int indent )
-    {
-        _thisIndent = indent;
-    }
-
-
-}
diff --git a/src/org/apache/xml/serialize/LineSeparator.java b/src/org/apache/xml/serialize/LineSeparator.java
deleted file mode 100644
index 88e2063..0000000
--- a/src/org/apache/xml/serialize/LineSeparator.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio..com">Assaf Arkin</a>
- * @see OutputFormat
- */
-public final class LineSeparator
-{
-    
-    
-    /**
-     * Line separator for Unix systems (<tt>\n</tt>).
-     */
-    public static final String Unix = "\n";
-    
-    
-    /**
-     * Line separator for Windows systems (<tt>\r\n</tt>).
-     */
-    public static final String Windows = "\r\n";
-    
-    
-    /**
-     * Line separator for Macintosh systems (<tt>\r</tt>).
-     */
-    public static final String Macintosh = "\r";
-    
-    
-    /**
-     * Line separator for the Web (<tt>\n</tt>).
-     */
-    public static final String Web = "\n";
-    
-    
-}
-
-
diff --git a/src/org/apache/xml/serialize/Method.java b/src/org/apache/xml/serialize/Method.java
deleted file mode 100644
index 2b27a57..0000000
--- a/src/org/apache/xml/serialize/Method.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-/**
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @see OutputFormat
- */
-public final class Method
-{
-    
-    
-    /**
-     * The output method for XML documents.
-     */
-    public static final String XML = "xml";
-    
-    
-    /**
-     * The output method for HTML documents.
-     */
-    public static final String HTML = "html";
-    
-    
-    /**
-     * The output method for HTML documents as XHTML.
-     */
-    public static final String XHTML = "xhtml";
-    
-    
-    /**
-     * The output method for text documents.
-     */
-    public static final String TEXT = "text";
-    
-    
-    /**
-     * The output method for FO documents as PDF.
-     */
-    public static final String FOP = "fop";
-    
-    
-}
-
-
diff --git a/src/org/apache/xml/serialize/OutputFormat.java b/src/org/apache/xml/serialize/OutputFormat.java
deleted file mode 100644
index 470ba86..0000000
--- a/src/org/apache/xml/serialize/OutputFormat.java
+++ /dev/null
@@ -1,990 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-// Aug 21, 2000:
-//  Added ability to omit DOCTYPE declaration.
-//  Reported by Lars Martin <lars@smb-tec.com>
-// Aug 25, 2000:
-//  Added ability to omit comments.
-//  Contributed by Anupam Bagchi <abagchi@jtcsv.com>
-
-
-package org.apache.xml.serialize;
-
-
-import java.util.Hashtable;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Node;
-import org.w3c.dom.html.HTMLDocument;
-
-
-/**
- * Specifies an output format to control the serializer. Based on the
- * XSLT specification for output format, plus additional parameters.
- * Used to select the suitable serializer and determine how the
- * document should be formatted on output.
- * <p>
- * The two interesting constructors are:
- * <ul>
- * <li>{@link #OutputFormat(String,String,boolean)} creates a format
- *  for the specified method (XML, HTML, Text, etc), encoding and indentation
- * <li>{@link #OutputFormat(Document,String,boolean)} creates a format
- *  compatible with the document type (XML, HTML, Text, etc), encoding and
- *  indentation
- * </ul>
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- *         <a href="mailto:visco@intalio.com">Keith Visco</a>
- * @see Serializer
- * @see Method
- * @see LineSeparator
- */
-public class OutputFormat
-{
-
-
-    public static class DTD
-    {
-
-        /**
-         * Public identifier for HTML document type.
-         */
-        public static final String HTMLPublicId = "-//W3C//DTD HTML 4.0//EN";
-
-        /**
-         * System identifier for HTML document type.
-         */
-        public static final String HTMLSystemId =
-            "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd";
-
-        /**
-         * Public identifier for XHTML document type.
-         */
-        public static final String XHTMLPublicId =
-            "-//W3C//DTD XHTML 1.0 Strict//EN";
-
-        /**
-         * System identifier for XHTML document type.
-         */
-        public static final String XHTMLSystemId =
-            "http://www.w3.org/TR/WD-html-in-xml/DTD/xhtml1-strict.dtd";
-
-    }
-
-
-    public static class Defaults
-    {
-
-        /**
-         * If indentation is turned on, the default identation
-         * level is 4.
-         *
-         * @see #setIndenting(boolean)
-         */
-        public static final int Indent = 4;
-
-        /**
-         * The default encoding for Web documents it UTF-8.
-         *
-         * @see #getEncoding()
-         */
-        public static final String Encoding = "UTF-8";
-
-        /**
-         * The default line width at which to break long lines
-         * when identing. This is set to 72.
-         */
-        public static final int LineWidth = 72;
-
-    }
-
-
-    /**
-     * Holds the output method specified for this document,
-     * or null if no method was specified.
-     */
-    private String _method;
-
-
-    /**
-     * Specifies the version of the output method.
-     */
-    private String _version;
-
-
-    /**
-     * The indentation level, or zero if no indentation
-     * was requested.
-     */
-    private int _indent = 0;
-
-
-    /**
-     * The encoding to use, if an input stream is used.
-     * The default is always UTF-8.
-     */
-    private String _encoding = Defaults.Encoding;
-
-    /**
-     * The EncodingInfo instance for _encoding.
-     */
-    private EncodingInfo _encodingInfo = null;
-
-    /**
-     * The specified media type or null.
-     */
-    private String _mediaType;
-
-
-    /**
-     * The specified document type system identifier, or null.
-     */
-    private String _doctypeSystem;
-
-
-    /**
-     * The specified document type public identifier, or null.
-     */
-    private String _doctypePublic;
-
-
-    /**
-     * Ture if the XML declaration should be ommited;
-     */
-    private boolean _omitXmlDeclaration = false;
-
-
-    /**
-     * Ture if the DOCTYPE declaration should be ommited;
-     */
-    private boolean _omitDoctype = false;
-
-
-    /**
-     * Ture if comments should be ommited;
-     */
-    private boolean _omitComments = false;
-
-
-    /**
-     * Ture if the comments should be ommited;
-     */
-    private boolean _stripComments = false;
-
-
-    /**
-     * True if the document type should be marked as standalone.
-     */
-    private boolean _standalone = false;
-
-
-    /**
-     * List of element tag names whose text node children must
-     * be output as CDATA.
-     */
-    private String[] _cdataElements;
-
-
-    /**
-     * List of element tag names whose text node children must
-     * be output unescaped.
-     */
-    private String[] _nonEscapingElements;
-
-
-    /**
-     * The selected line separator.
-     */
-    private String _lineSeparator = LineSeparator.Web;
-
-
-    /**
-     * The line width at which to wrap long lines when indenting.
-     */
-    private int _lineWidth = Defaults.LineWidth;
-
-
-    /**
-     * True if spaces should be preserved in elements that do not
-     * specify otherwise, or specify the default behavior.
-     */
-    private boolean _preserve = false;
-	/** If true, an empty string valued attribute is output as "". If false and
-	 * and we are using the HTMLSerializer, then only the attribute name is 
-	 * serialized. Defaults to false for backwards compatibility.
-	 */
-	private boolean _preserveEmptyAttributes = false;
-
-    /**
-     * Constructs a new output format with the default values.
-     */
-    public OutputFormat()
-    {
-    }
-
-
-    /**
-     * Constructs a new output format with the default values for
-     * the specified method and encoding. If <tt>indent</tt>
-     * is true, the document will be pretty printed with the default
-     * indentation level and default line wrapping.
-     *
-     * @param method The specified output method
-     * @param encoding The specified encoding
-     * @param indenting True for pretty printing
-     * @see #setEncoding
-     * @see #setIndenting
-     * @see #setMethod
-     */
-    public OutputFormat( String method, String encoding, boolean indenting )
-    {
-        setMethod( method );
-        setEncoding( encoding );
-        setIndenting( indenting );
-    }
-
-
-    /**
-     * Constructs a new output format with the proper method,
-     * document type identifiers and media type for the specified
-     * document.
-     *
-     * @param doc The document to output
-     * @see #whichMethod
-     */
-    public OutputFormat( Document doc )
-    {
-        setMethod( whichMethod( doc ) );
-        setDoctype( whichDoctypePublic( doc ), whichDoctypeSystem( doc ) );
-        setMediaType( whichMediaType( getMethod() ) );
-    }
-
-
-    /**
-     * Constructs a new output format with the proper method,
-     * document type identifiers and media type for the specified
-     * document, and with the specified encoding. If <tt>indent</tt>
-     * is true, the document will be pretty printed with the default
-     * indentation level and default line wrapping.
-     *
-     * @param doc The document to output
-     * @param encoding The specified encoding
-     * @param indenting True for pretty printing
-     * @see #setEncoding
-     * @see #setIndenting
-     * @see #whichMethod
-     */
-    public OutputFormat( Document doc, String encoding, boolean indenting )
-    {
-        this( doc );
-        setEncoding( encoding );
-        setIndenting( indenting );
-    }
-
-
-    /**
-     * Returns the method specified for this output format.
-     * Typically the method will be <tt>xml</tt>, <tt>html</tt>
-     * or <tt>text</tt>, but it might be other values.
-     * If no method was specified, null will be returned
-     * and the most suitable method will be determined for
-     * the document by calling {@link #whichMethod}.
-     *
-     * @return The specified output method, or null
-     */
-    public String getMethod()
-    {
-        return _method;
-    }
-
-
-    /**
-     * Sets the method for this output format.
-     *
-     * @see #getMethod
-     * @param method The output method, or null
-     */
-    public void setMethod( String method )
-    {
-        _method = method;
-    }
-
-
-    /**
-     * Returns the version for this output method.
-     * If no version was specified, will return null
-     * and the default version number will be used.
-     * If the serializerr does not support that particular
-     * version, it should default to a supported version.
-     *
-     * @return The specified method version, or null
-     */
-    public String getVersion()
-    {
-        return _version;
-    }
-
-
-    /**
-     * Sets the version for this output method.
-     * For XML the value would be "1.0", for HTML
-     * it would be "4.0".
-     *
-     * @see #getVersion
-     * @param version The output method version, or null
-     */
-    public void setVersion( String version )
-    {
-        _version = version;
-    }
-
-
-    /**
-     * Returns the indentation specified. If no indentation
-     * was specified, zero is returned and the document
-     * should not be indented.
-     *
-     * @return The indentation or zero
-     * @see #setIndenting
-     */
-    public int getIndent()
-    {
-        return _indent;
-    }
-
-
-    /**
-     * Returns true if indentation was specified.
-     */
-    public boolean getIndenting()
-    {
-        return ( _indent > 0 );
-    }
-
-
-    /**
-     * Sets the indentation. The document will not be
-     * indented if the indentation is set to zero.
-     * Calling {@link #setIndenting} will reset this
-     * value to zero (off) or the default (on).
-     *
-     * @param indent The indentation, or zero
-     */
-    public void setIndent( int indent )
-    {
-        if ( indent < 0 )
-            _indent = 0;
-        else
-            _indent = indent;
-    }
-
-
-    /**
-     * Sets the indentation on and off. When set on, the default
-     * indentation level and default line wrapping is used
-     * (see {@link #DEFAULT_INDENT} and {@link #DEFAULT_LINE_WIDTH}).
-     * To specify a different indentation level or line wrapping,
-     * use {@link #setIndent} and {@link #setLineWidth}.
-     *
-     * @param on True if indentation should be on
-     */
-    public void setIndenting( boolean on )
-    {
-        if ( on ) {
-            _indent = Defaults.Indent;
-            _lineWidth = Defaults.LineWidth;
-        } else {
-            _indent = 0;
-            _lineWidth = 0;
-        }
-    }
-
-
-    /**
-     * Returns the specified encoding. If no encoding was
-     * specified, the default is always "UTF-8".
-     *
-     * @return The encoding
-     */
-    public String getEncoding()
-    {
-        return _encoding;
-    }
-
-
-    /**
-     * Sets the encoding for this output method. If no
-     * encoding was specified, the default is always "UTF-8".
-     * Make sure the encoding is compatible with the one
-     * used by the {@link java.io.Writer}.
-     *
-     * @see #getEncoding
-     * @param encoding The encoding, or null
-     */
-    public void setEncoding( String encoding )
-    {
-        _encoding = encoding;
-        _encodingInfo = null;
-    }
-
-    /**
-     * Sets the encoding for this output method with an <code>EncodingInfo</code>
-     * instance.
-     */
-    public void setEncoding(EncodingInfo encInfo) {
-        _encoding = encInfo.getName();
-        _encodingInfo = encInfo;
-    }
-
-    /**
-     * Returns an <code>EncodingInfo<code> instance for the encoding.
-     *
-     * @see setEncoding
-     */
-    public EncodingInfo getEncodingInfo() {
-        if (_encodingInfo == null)
-            _encodingInfo = Encodings.getEncodingInfo(_encoding);
-        return _encodingInfo;
-    }
-
-    /**
-     * Returns the specified media type, or null.
-     * To determine the media type based on the
-     * document type, use {@link #whichMediaType}.
-     *
-     * @return The specified media type, or null
-     */
-    public String getMediaType()
-    {
-        return _mediaType;
-    }
-
-
-    /**
-     * Sets the media type.
-     *
-     * @see #getMediaType
-     * @param mediaType The specified media type
-     */
-    public void setMediaType( String mediaType )
-    {
-        _mediaType = mediaType;
-    }
-
-
-    /**
-     * Sets the document type public and system identifiers.
-     * Required only if the DOM Document or SAX events do not
-     * specify the document type, and one must be present in
-     * the serialized document. Any document type specified
-     * by the DOM Document or SAX events will override these
-     * values.
-     *
-     * @param publicId The public identifier, or null
-     * @param systemId The system identifier, or null
-     */
-    public void setDoctype( String publicId, String systemId )
-    {
-        _doctypePublic = publicId;
-        _doctypeSystem = systemId;
-    }
-
-
-    /**
-     * Returns the specified document type public identifier,
-     * or null.
-     */
-    public String getDoctypePublic()
-    {
-        return _doctypePublic;
-    }
-
-
-    /**
-     * Returns the specified document type system identifier,
-     * or null.
-     */
-    public String getDoctypeSystem()
-    {
-        return _doctypeSystem;
-    }
-
-
-    /**
-     * Returns true if comments should be ommited.
-     * The default is false.
-     */
-    public boolean getOmitComments()
-    {
-        return _omitComments;
-    }
-
-
-    /**
-     * Sets comment omitting on and off.
-     *
-     * @param omit True if comments should be ommited
-     */
-    public void setOmitComments( boolean omit )
-    {
-        _omitComments = omit;
-    }
-
-
-    /**
-     * Returns true if the DOCTYPE declaration should
-     * be ommited. The default is false.
-     */
-    public boolean getOmitDocumentType()
-    {
-        return _omitDoctype;
-    }
-
-
-    /**
-     * Sets DOCTYPE declaration omitting on and off.
-     *
-     * @param omit True if DOCTYPE declaration should be ommited
-     */
-    public void setOmitDocumentType( boolean omit )
-    {
-        _omitDoctype = omit;
-    }
-
-
-    /**
-     * Returns true if the XML document declaration should
-     * be ommited. The default is false.
-     */
-    public boolean getOmitXMLDeclaration()
-    {
-        return _omitXmlDeclaration;
-    }
-
-
-    /**
-     * Sets XML declaration omitting on and off.
-     *
-     * @param omit True if XML declaration should be ommited
-     */
-    public void setOmitXMLDeclaration( boolean omit )
-    {
-        _omitXmlDeclaration = omit;
-    }
-
-
-    /**
-     * Returns true if the document type is standalone.
-     * The default is false.
-     */
-    public boolean getStandalone()
-    {
-        return _standalone;
-    }
-
-
-    /**
-     * Sets document DTD standalone. The public and system
-     * identifiers must be null for the document to be
-     * serialized as standalone.
-     *
-     * @param standalone True if document DTD is standalone
-     */
-    public void setStandalone( boolean standalone )
-    {
-        _standalone = standalone;
-    }
-
-
-    /**
-     * Returns a list of all the elements whose text node children
-     * should be output as CDATA, or null if no such elements were
-     * specified.
-     */
-    public String[] getCDataElements()
-    {
-        return _cdataElements;
-    }
-
-
-    /**
-     * Returns true if the text node children of the given elements
-     * should be output as CDATA.
-     *
-     * @param tagName The element's tag name
-     * @return True if should serialize as CDATA
-     */
-    public boolean isCDataElement( String tagName )
-    {
-        int i;
-
-        if ( _cdataElements == null )
-            return false;
-        for ( i = 0 ; i < _cdataElements.length ; ++i )
-            if ( _cdataElements[ i ].equals( tagName ) )
-                return true;
-        return false;
-    }
-
-
-    /**
-     * Sets the list of elements for which text node children
-     * should be output as CDATA.
-     *
-     * @param cdataElements List of CDATA element tag names
-     */
-    public void setCDataElements( String[] cdataElements )
-    {
-        _cdataElements = cdataElements;
-    }
-
-
-    /**
-     * Returns a list of all the elements whose text node children
-     * should be output unescaped (no character references), or null
-     * if no such elements were specified.
-     */
-    public String[] getNonEscapingElements()
-    {
-        return _nonEscapingElements;
-    }
-
-
-    /**
-     * Returns true if the text node children of the given elements
-     * should be output unescaped.
-     *
-     * @param tagName The element's tag name
-     * @return True if should serialize unescaped
-     */
-    public boolean isNonEscapingElement( String tagName )
-    {
-        int i;
-
-        if ( _nonEscapingElements == null )
-            return false;
-        for ( i = 0 ; i < _nonEscapingElements.length ; ++i )
-            if ( _nonEscapingElements[ i ].equals( tagName ) )
-                return true;
-        return false;
-    }
-
-
-    /**
-     * Sets the list of elements for which text node children
-     * should be output unescaped (no character references).
-     *
-     * @param nonEscapingElements List of unescaped element tag names
-     */
-    public void setNonEscapingElements( String[] nonEscapingElements )
-    {
-        _nonEscapingElements = nonEscapingElements;
-    }
-
-
-
-    /**
-     * Returns a specific line separator to use. The default is the
-     * Web line separator (<tt>\n</tt>). A string is returned to
-     * support double codes (CR + LF).
-     *
-     * @return The specified line separator
-     */
-    public String getLineSeparator()
-    {
-        return _lineSeparator;
-    }
-
-
-    /**
-     * Sets the line separator. The default is the Web line separator
-     * (<tt>\n</tt>). The machine's line separator can be obtained
-     * from the system property <tt>line.separator</tt>, but is only
-     * useful if the document is edited on machines of the same type.
-     * For general documents, use the Web line separator.
-     *
-     * @param lineSeparator The specified line separator
-     */
-    public void setLineSeparator( String lineSeparator )
-    {
-        if ( lineSeparator == null )
-            _lineSeparator =  LineSeparator.Web;
-        else
-            _lineSeparator = lineSeparator;
-    }
-
-
-    /**
-     * Returns true if the default behavior for this format is to
-     * preserve spaces. All elements that do not specify otherwise
-     * or specify the default behavior will be formatted based on
-     * this rule. All elements that specify space preserving will
-     * always preserve space.
-     */
-    public boolean getPreserveSpace()
-    {
-        return _preserve;
-    }
-
-
-    /**
-     * Sets space preserving as the default behavior. The default is
-     * space stripping and all elements that do not specify otherwise
-     * or use the default value will not preserve spaces.
-     *
-     * @param preserve True if spaces should be preserved
-     */
-    public void setPreserveSpace( boolean preserve )
-    {
-        _preserve = preserve;
-    }
-
-
-    /**
-     * Return the selected line width for breaking up long lines.
-     * When indenting, and only when indenting, long lines will be
-     * broken at space boundaries based on this line width.
-     * No line wrapping occurs if this value is zero.
-     */
-    public int getLineWidth()
-    {
-        return _lineWidth;
-    }
-
-
-    /**
-     * Sets the line width. If zero then no line wrapping will
-     * occur. Calling {@link #setIndenting} will reset this
-     * value to zero (off) or the default (on).
-     *
-     * @param lineWidth The line width to use, zero for default
-     * @see #getLineWidth
-     * @see #setIndenting
-     */
-    public void setLineWidth( int lineWidth )
-    {
-        if ( lineWidth <= 0 )
-            _lineWidth = 0;
-        else
-            _lineWidth = lineWidth;
-    }
-
-	/**
-	 * Returns the preserveEmptyAttribute flag. If flag is false, then'
-	 * attributes with empty string values are output as the attribute 
-	 * name only (in HTML mode).
-	 * @return preserve the preserve flag
-	 */
-	public boolean getPreserveEmptyAttributes () {
-		return _preserveEmptyAttributes;
-	}
-	/**
-	 * Sets the preserveEmptyAttribute flag. If flag is false, then'
-	 * attributes with empty string values are output as the attribute 
-	 * name only (in HTML mode).
-	 * @param preserve the preserve flag
-	 */
-	public void setPreserveEmptyAttributes (boolean preserve) {
-		_preserveEmptyAttributes = preserve;
-	}
-
-    /**
-     * Returns the last printable character based on the selected
-     * encoding. Control characters and non-printable characters
-     * are always printed as character references.
-     */
-    public char getLastPrintable()
-    {
-        if ( getEncoding() != null &&
-             ( getEncoding().equalsIgnoreCase( "ASCII" ) ) )
-            return 0xFF;
-        else
-            return 0xFFFF;
-    }
-
-
-    /**
-     * Determine the output method for the specified document.
-     * If the document is an instance of {@link org.w3c.dom.html.HTMLDocument}
-     * then the method is said to be <tt>html</tt>. If the root
-     * element is 'html' and all text nodes preceding the root
-     * element are all whitespace, then the method is said to be
-     * <tt>html</tt>. Otherwise the method is <tt>xml</tt>.
-     *
-     * @param doc The document to check
-     * @return The suitable method
-     */
-    public static String whichMethod( Document doc )
-    {
-        Node    node;
-        String  value;
-        int     i;
-
-        // If document is derived from HTMLDocument then the default
-        // method is html.
-        if ( doc instanceof HTMLDocument )
-            return Method.HTML;
-
-        // Lookup the root element and the text nodes preceding it.
-        // If root element is html and all text nodes contain whitespace
-        // only, the method is html.
-
-        // FIXME (SM) should we care about namespaces here?
-
-        node = doc.getFirstChild();
-        while (node != null) {
-            // If the root element is html, the method is html.
-            if ( node.getNodeType() == Node.ELEMENT_NODE ) {
-                if ( node.getNodeName().equalsIgnoreCase( "html" ) ) {
-                    return Method.HTML;
-                } else if ( node.getNodeName().equalsIgnoreCase( "root" ) ) {
-                    return Method.FOP;
-                } else {
-                    return Method.XML;
-                }
-            } else if ( node.getNodeType() == Node.TEXT_NODE ) {
-                // If a text node preceding the root element contains
-                // only whitespace, this might be html, otherwise it's
-                // definitely xml.
-                value = node.getNodeValue();
-                for ( i = 0 ; i < value.length() ; ++i )
-                    if ( value.charAt( i ) != 0x20 && value.charAt( i ) != 0x0A &&
-                         value.charAt( i ) != 0x09 && value.charAt( i ) != 0x0D )
-                        return Method.XML;
-            }
-            node = node.getNextSibling();
-        }
-        // Anything else, the method is xml.
-        return Method.XML;
-    }
-
-
-    /**
-     * Returns the document type public identifier
-     * specified for this document, or null.
-     */
-    public static String whichDoctypePublic( Document doc )
-    {
-        DocumentType doctype;
-
-           /*  DOM Level 2 was introduced into the code base*/
-           doctype = doc.getDoctype();
-           if ( doctype != null ) {
-           // Note on catch: DOM Level 1 does not specify this method
-           // and the code will throw a NoSuchMethodError
-           try {
-           return doctype.getPublicId();
-           } catch ( Error except ) {  }
-           }
-        
-        if ( doc instanceof HTMLDocument )
-            return DTD.XHTMLPublicId;
-        return null;
-    }
-
-
-    /**
-     * Returns the document type system identifier
-     * specified for this document, or null.
-     */
-    public static String whichDoctypeSystem( Document doc )
-    {
-        DocumentType doctype;
-
-        /* DOM Level 2 was introduced into the code base*/
-           doctype = doc.getDoctype();
-           if ( doctype != null ) {
-           // Note on catch: DOM Level 1 does not specify this method
-           // and the code will throw a NoSuchMethodError
-           try {
-           return doctype.getSystemId();
-           } catch ( Error except ) { }
-           }
-        
-        if ( doc instanceof HTMLDocument )
-            return DTD.XHTMLSystemId;
-        return null;
-    }
-
-
-    /**
-     * Returns the suitable media format for a document
-     * output with the specified method.
-     */
-    public static String whichMediaType( String method )
-    {
-        if ( method.equalsIgnoreCase( Method.XML ) )
-            return "text/xml";
-        if ( method.equalsIgnoreCase( Method.HTML ) )
-            return "text/html";
-        if ( method.equalsIgnoreCase( Method.XHTML ) )
-            return "text/html";
-        if ( method.equalsIgnoreCase( Method.TEXT ) )
-            return "text/plain";
-        if ( method.equalsIgnoreCase( Method.FOP ) )
-            return "application/pdf";
-        return null;
-    }
-
-
-}
-
diff --git a/src/org/apache/xml/serialize/Printer.java b/src/org/apache/xml/serialize/Printer.java
deleted file mode 100644
index 8457820..0000000
--- a/src/org/apache/xml/serialize/Printer.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-// Sep 14, 2000:
-//  Fixed serializer to report IO exception directly, instead at
-//  the end of document processing.
-//  Reported by Patrick Higgins <phiggins@transzap.com>
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.Writer;
-import java.io.StringWriter;
-import java.io.IOException;
-
-
-/**
- * The printer is responsible for sending text to the output stream
- * or writer. This class performs direct writing for efficiency.
- * {@link IndentPrinter} supports indentation and line wrapping by
- * extending this class.
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- */
-public class Printer
-{
-
-
-    /**
-     * The output format associated with this serializer. This will never
-     * be a null reference. If no format was passed to the constructor,
-     * the default one for this document type will be used. The format
-     * object is never changed by the serializer.
-     */
-    protected final OutputFormat _format;
-
-
-    /**
-     * The writer to which the document is written.
-     */
-    protected Writer             _writer;
-
-
-    /**
-     * The DTD writer. When we switch to DTD mode, all output is
-     * accumulated in this DTD writer. When we switch out of it,
-     * the output is obtained as a string. Must not be reset to
-     * null until we're done with the document.
-     */
-    protected StringWriter       _dtdWriter;
-
-
-    /**
-     * Holds a reference to the document writer while we are
-     * in DTD mode.
-     */
-    protected Writer          _docWriter;
-
-
-    /**
-     * Holds the exception thrown by the serializer.  Exceptions do not cause
-     * the serializer to quit, but are held and one is thrown at the end.
-     */
-    protected IOException     _exception;
-
-
-    /**
-     * The size of the output buffer.
-     */
-    private static final int BufferSize = 4096;
-
-
-    /**
-     * Output buffer.
-     */
-    private final char[]  _buffer = new char[ BufferSize ];
-
-
-    /**
-     * Position within the output buffer.
-     */
-    private int           _pos = 0;
-
-
-    public Printer( Writer writer, OutputFormat format)
-    {
-        _writer = writer;
-        _format = format;
-        _exception = null;
-        _dtdWriter = null;
-        _docWriter = null;
-        _pos = 0;
-    }
-
-
-    public IOException getException()
-    {
-        return _exception;
-    }
-
-
-    /**
-     * Called by any of the DTD handlers to enter DTD mode.
-     * Once entered, all output will be accumulated in a string
-     * that can be printed as part of the document's DTD.
-     * This method may be called any number of time but will only
-     * have affect the first time it's called. To exist DTD state
-     * and get the accumulated DTD, call {@link #leaveDTD}.
-     */
-    public void enterDTD()
-        throws IOException
-    {
-        // Can only enter DTD state once. Once we're out of DTD
-        // state, can no longer re-enter it.
-        if ( _dtdWriter == null ) {
-	    flushLine( false );
-
-			_dtdWriter = new StringWriter();
-            _docWriter = _writer;
-            _writer = _dtdWriter;
-        }
-    }
-
-
-    /**
-     * Called by the root element to leave DTD mode and if any
-     * DTD parts were printer, will return a string with their
-     * textual content.
-     */
-    public String leaveDTD()
-        throws IOException
-    {
-        // Only works if we're going out of DTD mode.
-        if ( _writer == _dtdWriter ) {
-	    flushLine( false );
-
-			_writer = _docWriter;
-            return _dtdWriter.toString();
-        } else
-            return null;
-    }
-
-
-    public void printText( String text )
-        throws IOException
-    {
-        try {
-            int length = text.length();
-            for ( int i = 0 ; i < length ; ++i ) {
-                if ( _pos == BufferSize ) {
-                    _writer.write( _buffer );
-                    _pos = 0;
-                }
-                _buffer[ _pos ] = text.charAt( i );
-                ++_pos;
-            }
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-            throw except;
-        }
-    }
-
-
-    public void printText( StringBuffer text )
-        throws IOException
-    {
-        try {
-            int length = text.length();
-            for ( int i = 0 ; i < length ; ++i ) {
-                if ( _pos == BufferSize ) {
-                    _writer.write( _buffer );
-                    _pos = 0;
-                }
-                _buffer[ _pos ] = text.charAt( i );
-                ++_pos;
-            }
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-            throw except;
-        }
-    }
-
-
-    public void printText( char[] chars, int start, int length )
-        throws IOException
-    {
-        try {
-            while ( length-- > 0 ) {
-                if ( _pos == BufferSize ) {
-                    _writer.write( _buffer );
-                    _pos = 0;
-                }
-                _buffer[ _pos ] = chars[ start ];
-                ++start;
-                ++_pos;
-            }
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-            throw except;
-        }
-    }
-
-
-    public void printText( char ch )
-        throws IOException
-    {
-        try {
-            if ( _pos == BufferSize ) {
-                _writer.write( _buffer );
-                _pos = 0;
-            }
-            _buffer[ _pos ] = ch;
-            ++_pos;
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-            throw except;
-        }
-    }
-
-
-    public void printSpace()
-        throws IOException
-    {
-        try {
-            if ( _pos == BufferSize ) {
-                _writer.write( _buffer );
-                _pos = 0;
-            }
-            _buffer[ _pos ] = ' ';
-            ++_pos;
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-            throw except;
-        }
-    }
-
-
-    public void breakLine()
-        throws IOException
-    {
-        try {
-            if ( _pos == BufferSize ) {
-                _writer.write( _buffer );
-                _pos = 0;
-            }
-            _buffer[ _pos ] = '\n';
-            ++_pos;
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-            throw except;
-        }
-    }
-
-
-    public void breakLine( boolean preserveSpace )
-        throws IOException
-    {
-        breakLine();
-    }
-
-
-    public void flushLine( boolean preserveSpace )
-        throws IOException
-    {
-        // Write anything left in the buffer into the writer.
-        try {
-            _writer.write( _buffer, 0, _pos );
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-        }
-        _pos = 0;
-    }
-
-
-    /**
-     * Flush the output stream. Must be called when done printing
-     * the document, otherwise some text might be buffered.
-     */
-    public void flush()
-        throws IOException
-    {
-        try {
-            _writer.write( _buffer, 0, _pos );
-            _writer.flush();
-        } catch ( IOException except ) {
-            // We don't throw an exception, but hold it
-            // until the end of the document.
-            if ( _exception == null )
-                _exception = except;
-            throw except;
-        }
-        _pos = 0;
-    }
-
-
-    public void indent()
-    {
-        // NOOP
-    }
-
-
-    public void unindent()
-    {
-        // NOOP
-    }
-
-
-    public int getNextIndent()
-    {
-        return 0;
-    }
-
-
-    public void setNextIndent( int indent )
-    {
-    }
-
-
-    public void setThisIndent( int indent )
-    {
-    }
-
-
-}
diff --git a/src/org/apache/xml/serialize/Serializer.java b/src/org/apache/xml/serialize/Serializer.java
deleted file mode 100644
index c91f3dd..0000000
--- a/src/org/apache/xml/serialize/Serializer.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.Writer;
-import java.io.OutputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Document;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.ContentHandler;
-
-
-/**
- * Interface for a DOM serializer implementation, factory for DOM and SAX
- * serializers, and static methods for serializing DOM documents.
- * <p>
- * To serialize a document using SAX events, create a compatible serializer
- * using {@link #makeSAXSerializer} and pass it around as a {@link
- * DocumentHandler}. If an I/O error occurs while serializing, it will
- * be thrown by {@link DocumentHandler#endDocument}. The SAX serializer
- * may also be used as {@link DTDHandler}, {@link DeclHandler} and
- * {@link LexicalHandler}.
- * <p>
- * To serialize a DOM document or DOM element, create a compatible
- * serializer using {@link #makeSerializer} and call it's {@link
- * #serialize(Document)} or {@link #serialize(Element)} methods.
- * Both methods would produce a full XML document, to serizlie only
- * the portion of the document use {@link OutputFormat#setOmitXMLDeclaration}
- * and specify no document type.
- * <p>
- * The convenience method {@link #serialize(Document,Writer,OutputFormat)}
- * creates a serializer and calls {@link #serizlie(Document)} on that
- * serialized.
- * <p>
- * The {@link OutputFormat} dictates what underlying serialized is used
- * to serialize the document based on the specified method. If the output
- * format or method are missing, the default is an XML serializer with
- * UTF-8 encoding and now indentation.
- * 
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
- * @see DocumentHandler
- * @see ContentHandler
- * @see OutputFormat
- * @see DOMSerializer
- */
-public interface Serializer
-{
-
-
-    /**
-     * Specifies an output stream to which the document should be
-     * serialized. This method should not be called while the
-     * serializer is in the process of serializing a document.
-     */
-    public void setOutputByteStream(OutputStream output);
-    
-
-    /**
-     * Specifies a writer to which the document should be serialized.
-     * This method should not be called while the serializer is in
-     * the process of serializing a document.
-     */
-    public void setOutputCharStream( Writer output );
-
-
-    /**
-     * Specifies an output format for this serializer. It the
-     * serializer has already been associated with an output format,
-     * it will switch to the new format. This method should not be
-     * called while the serializer is in the process of serializing
-     * a document.
-     *
-     * @param format The output format to use
-     */
-    public void setOutputFormat( OutputFormat format );
-
-
-    /**
-     * Return a {@link DocumentHandler} interface into this serializer.
-     * If the serializer does not support the {@link DocumentHandler}
-     * interface, it should return null.
-     */
-    public DocumentHandler asDocumentHandler()
-        throws IOException;
-
-
-    /**
-     * Return a {@link ContentHandler} interface into this serializer.
-     * If the serializer does not support the {@link ContentHandler}
-     * interface, it should return null.
-     */
-    public ContentHandler asContentHandler()
-        throws IOException;
-
-
-    /**
-     * Return a {@link DOMSerializer} interface into this serializer.
-     * If the serializer does not support the {@link DOMSerializer}
-     * interface, it should return null.
-     */
-    public DOMSerializer asDOMSerializer()
-        throws IOException;
-
-
-}
-
-
-
-
-
diff --git a/src/org/apache/xml/serialize/SerializerFactory.java b/src/org/apache/xml/serialize/SerializerFactory.java
deleted file mode 100644
index 23818f2..0000000
--- a/src/org/apache/xml/serialize/SerializerFactory.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
-import java.util.StringTokenizer;
-
-
-/**
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- */
-public abstract class SerializerFactory
-{
-
-
-    public static final String FactoriesProperty = "org.apache.xml.serialize.factories";
-
-
-    private static Hashtable  _factories = new Hashtable();
-
-
-    static
-    {
-        SerializerFactory factory;
-        String            list;
-        StringTokenizer   token;
-        String            className;
-        
-        // The default factories are always registered first,
-        // any factory specified in the properties file and supporting
-        // the same method will override the default factory.
-        factory =  new SerializerFactoryImpl( Method.XML );
-        registerSerializerFactory( factory );
-        factory =  new SerializerFactoryImpl( Method.HTML );
-        registerSerializerFactory( factory );
-        factory =  new SerializerFactoryImpl( Method.XHTML );
-        registerSerializerFactory( factory );
-        factory =  new SerializerFactoryImpl( Method.TEXT );
-        registerSerializerFactory( factory );
-        
-        list = System.getProperty( FactoriesProperty );
-        if ( list != null ) {
-            token = new StringTokenizer( list, " ;,:" );
-            while ( token.hasMoreTokens() ) {
-                className = token.nextToken();
-                try {
-                    factory = (SerializerFactory) Class.forName( className ).newInstance();
-                    if ( _factories.containsKey( factory.getSupportedMethod() ) )
-                        _factories.put( factory.getSupportedMethod(), factory );
-                } catch ( Exception except ) { }
-            }
-        }
-    }
-
-
-    /**
-     * Register a serializer factory, keyed by the given
-     * method string.
-     */
-    public static void registerSerializerFactory( SerializerFactory factory )
-    {
-        String method;
-        
-        synchronized ( _factories ) {
-            method = factory.getSupportedMethod();
-            _factories.put( method, factory );
-        }
-    }
-
-
-    /**
-     * Register a serializer factory, keyed by the given
-     * method string.
-     */
-    public static SerializerFactory getSerializerFactory( String method )
-    {
-        return (SerializerFactory) _factories.get( method );
-    }
-
-
-    /**
-     * Returns the method supported by this factory and used to register
-     * the factory. This call is required so factories can be added from
-     * a properties file by knowing only the class name. This method is
-     * protected, it is only required by this class but must be implemented
-     * in derived classes.
-     */
-    protected abstract String getSupportedMethod();
-    
-
-    /**
-     * Create a new serializer based on the {@link OutputFormat}.
-     * If this method is used to create the serializer, the {@link
-     * Serializer#setOutputByteStream} or {@link Serializer#setOutputCharStream}
-     * methods must be called before serializing a document.
-     */
-    public abstract Serializer makeSerializer(OutputFormat format);
-
-
-    /**
-     * Create a new serializer, based on the {@link OutputFormat} and
-     * using the writer as the output character stream.  If this
-     * method is used, the encoding property will be ignored.
-     */
-    public abstract Serializer makeSerializer( Writer writer,
-                                               OutputFormat format );
-    
-    
-    /**
-     * Create a new serializer, based on the {@link OutputFormat} and
-     * using the output byte stream and the encoding specified in the
-     * output format.
-     *
-     * @throws UnsupportedEncodingException The specified encoding is
-     *   not supported
-     */
-    public abstract Serializer makeSerializer( OutputStream output,
-                                               OutputFormat format )
-        throws UnsupportedEncodingException;
-    
-
-}
-
-
diff --git a/src/org/apache/xml/serialize/SerializerFactoryImpl.java b/src/org/apache/xml/serialize/SerializerFactoryImpl.java
deleted file mode 100644
index 5a94388..0000000
--- a/src/org/apache/xml/serialize/SerializerFactoryImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.UnsupportedEncodingException;
-
-
-/**
- * Default serializer factory can construct serializers for the three
- * markup serializers (XML, HTML, XHTML ).
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- */
-final class SerializerFactoryImpl
-    extends SerializerFactory
-{
-
-
-    private String _method;
-    
-    
-    SerializerFactoryImpl( String method )
-    {
-        _method = method;
-        if ( ! _method.equals( Method.XML ) &&
-             ! _method.equals( Method.HTML ) &&
-             ! _method.equals( Method.XHTML ) &&
-             ! _method.equals( Method.TEXT ) )
-            throw new IllegalArgumentException( "SER004 The method '" + method + "' is not supported by this factory\n" + method);
-    }
-
-
-    public Serializer makeSerializer( OutputFormat format )
-    {
-        Serializer serializer;
-        
-        serializer = getSerializer( format );
-        serializer.setOutputFormat( format );
-        return serializer;
-    }
-    
-    
-    
-    public Serializer makeSerializer( Writer writer,
-                                      OutputFormat format )
-    {
-        Serializer serializer;
-        
-        serializer = getSerializer( format );
-        serializer.setOutputCharStream( writer );
-        return serializer;
-    }
-    
-    
-    public Serializer makeSerializer( OutputStream output,
-                                      OutputFormat format )
-        throws UnsupportedEncodingException
-    {
-        Serializer serializer;
-        
-        serializer = getSerializer( format );
-        serializer.setOutputByteStream( output );
-        return serializer;
-    }
-    
-    
-    private Serializer getSerializer( OutputFormat format )
-    {
-        if ( _method.equals( Method.XML ) ) {
-            return new XMLSerializer( format );
-        } else if ( _method.equals( Method.HTML ) ) {
-            return new HTMLSerializer( format );
-        }  else if ( _method.equals( Method.XHTML ) ) {
-            return new XHTMLSerializer( format );
-        }  else if ( _method.equals( Method.TEXT ) ) {
-            return new TextSerializer();
-        } else {
-            throw new IllegalStateException( "SER005 The method '" + _method + "' is not supported by this factory\n" + _method);
-        }
-    }
-    
-    
-    protected String getSupportedMethod()
-    {
-        return _method;
-    }
-
-
-}
-
diff --git a/src/org/apache/xml/serialize/SieveEncodingInfo.java b/src/org/apache/xml/serialize/SieveEncodingInfo.java
deleted file mode 100644
index 0ad8e2e..0000000
--- a/src/org/apache/xml/serialize/SieveEncodingInfo.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-
-/**
- * This class represents an encoding.
- *
- * @version $Id$
- */
-public class SieveEncodingInfo extends EncodingInfo {
-
-    BAOutputStream checkerStream = null;
-    Writer checkerWriter = null;
-    String dangerChars = null;
-
-    /**
-     * Creates new <code>SeiveEncodingInfo</code> instance.
-     *
-     * @param dangers A sorted characters that are always printed as character references.
-     */
-    public SieveEncodingInfo(String mimeName, String javaName,
-                             int lastPrintable, String dangers) {
-        super(mimeName, javaName, lastPrintable);
-        this.dangerChars = dangers;
-    }
-
-    /**
-     * Creates new <code>SeiveEncodingInfo</code> instance.
-     */
-    public SieveEncodingInfo(String mimeName, int lastPrintable) {
-        this(mimeName, mimeName, lastPrintable, null);
-    }
-
-    /**
-     * Checks whether the specified character is printable or not.
-     *
-     * @param ch a code point (0-0x10ffff)
-     */
-    public boolean isPrintable(int ch) {
-        if (this.dangerChars != null && ch <= 0xffff) {
-            /**
-             * Searches this.dangerChars for ch.
-             * TODO: Use binary search.
-             */
-            if (this.dangerChars.indexOf(ch) >= 0)
-                return false;
-        }
-
-        if (ch <= this.lastPrintable)
-            return true;
-
-        boolean printable = true;
-        synchronized (this) {
-            try {
-                if (this.checkerWriter == null) {
-                    this.checkerStream = new BAOutputStream(10);
-                    this.checkerWriter = new OutputStreamWriter(this.checkerStream, this.javaName);
-                }
-
-                if (ch > 0xffff) {
-                    this.checkerWriter.write(((ch-0x10000)>>10)+0xd800);
-                    this.checkerWriter.write(((ch-0x10000)&0x3ff)+0xdc00);
-                    byte[] result = this.checkerStream.getBuffer();
-                    if (this.checkerStream.size() == 2 && result[0] == '?' && result[1] == '?')
-                        printable = false;
-                } else {
-                    this.checkerWriter.write(ch);
-                    this.checkerWriter.flush();
-                    byte[] result = this.checkerStream.getBuffer();
-                    if (this.checkerStream.size() == 1 && result[0] == '?')
-                        printable = false;
-                }
-                this.checkerStream.reset();
-            } catch (IOException ioe) {
-                printable = false;
-            }
-        }
-
-        return printable;
-    }
-
-    /**
-     * Why don't we use the original ByteArrayOutputStream?
-     * - Because the toByteArray() method of the ByteArrayOutputStream
-     * creates new byte[] instances for each call.
-     */
-    static class BAOutputStream extends ByteArrayOutputStream {
-        BAOutputStream() {
-            super();
-        }
-
-        BAOutputStream(int size) {
-            super(size);
-        }
-
-        byte[] getBuffer() {
-            return this.buf;
-        }
-    }
-
-}
diff --git a/src/org/apache/xml/serialize/TextSerializer.java b/src/org/apache/xml/serialize/TextSerializer.java
deleted file mode 100755
index ffba93c..0000000
--- a/src/org/apache/xml/serialize/TextSerializer.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-// Sep 14, 2000:
-//  Fixed serializer to report IO exception directly, instead at
-//  the end of document processing.
-//  Reported by Patrick Higgins <phiggins@transzap.com>
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.io.OutputStream;
-import java.io.Writer;
-
-import org.w3c.dom.*;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-
-/**
- * Implements a text serializer supporting both DOM and SAX
- * serializing. For usage instructions see {@link Serializer}.
- * <p>
- * If an output stream is used, the encoding is taken from the
- * output format (defaults to <tt>UTF-8</tt>). If a writer is
- * used, make sure the writer uses the same encoding (if applies)
- * as specified in the output format.
- * <p>
- * The serializer supports both DOM and SAX. DOM serializing is done
- * by calling {@link #serialize} and SAX serializing is done by firing
- * SAX events and using the serializer as a document handler.
- * <p>
- * If an I/O exception occurs while serializing, the serializer
- * will not throw an exception directly, but only throw it
- * at the end of serializing (either DOM or SAX's {@link
- * org.xml.sax.DocumentHandler#endDocument}.
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @see Serializer
- */
-public class TextSerializer
-    extends BaseMarkupSerializer
-{
-
-
-    /**
-     * Constructs a new serializer. The serializer cannot be used without
-     * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
-     * first.
-     */
-    public TextSerializer()
-    {
-        super( new OutputFormat( Method.TEXT, null, false ) );
-    }
-
-
-    public void setOutputFormat( OutputFormat format )
-    {
-        super.setOutputFormat( format != null ? format : new OutputFormat( Method.TEXT, null, false ) );
-    }
-
-
-    //-----------------------------------------//
-    // SAX content handler serializing methods //
-    //-----------------------------------------//
-
-
-    public void startElement( String namespaceURI, String localName,
-                              String rawName, Attributes attrs )
-        throws SAXException
-    {
-        startElement( rawName == null ? localName : rawName, null );
-    }
-
-
-    public void endElement( String namespaceURI, String localName,
-                            String rawName )
-        throws SAXException
-    {
-        endElement( rawName == null ? localName : rawName );
-    }
-
-
-    //------------------------------------------//
-    // SAX document handler serializing methods //
-    //------------------------------000---------//
-
-
-    public void startElement( String tagName, AttributeList attrs )
-        throws SAXException
-    {
-        boolean      preserveSpace;
-        ElementState state;
-
-        try {
-            state = getElementState();
-            if ( isDocumentState() ) {
-                // If this is the root element handle it differently.
-                // If the first root element in the document, serialize
-                // the document's DOCTYPE. Space preserving defaults
-                // to that of the output format.
-                if ( ! _started )
-                    startDocument( tagName );
-            }
-            // For any other element, if first in parent, then
-            // use the parnet's space preserving.
-            preserveSpace = state.preserveSpace;
-
-            // Do not change the current element state yet.
-            // This only happens in endElement().
-
-            // Ignore all other attributes of the element, only printing
-            // its contents.
-
-            // Now it's time to enter a new element state
-            // with the tag name and space preserving.
-            // We still do not change the curent element state.
-            state = enterElementState( null, null, tagName, preserveSpace );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endElement( String tagName )
-        throws SAXException
-    {
-        try {
-            endElementIO( tagName );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endElementIO( String tagName )
-        throws IOException
-    {
-        ElementState state;
-
-        // Works much like content() with additions for closing
-        // an element. Note the different checks for the closed
-        // element's state and the parent element's state.
-        state = getElementState();
-        // Leave the element state and update that of the parent
-        // (if we're not root) to not empty and after element.
-        state = leaveElementState();
-        state.afterElement = true;
-        state.empty = false;
-        if ( isDocumentState() )
-            _printer.flush();
-    }
-
-
-    public void processingInstructionIO( String target, String code ) throws IOException
-    {
-    }
-
-
-    public void comment( String text )
-    {
-    }
-
-
-    public void comment( char[] chars, int start, int length )
-    {
-    }
-
-
-    public void characters( char[] chars, int start, int length )
-        throws SAXException
-    {
-        ElementState state;
-
-        try {
-            state = content();
-            state.doCData = state.inCData = false;
-            printText( chars, start, length, true, true );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    protected void characters( String text, boolean unescaped )
-        throws IOException
-    {
-        ElementState state;
-
-        state = content();
-        state.doCData = state.inCData = false;
-        printText( text, true, true );
-    }
-
-
-    //------------------------------------------//
-    // Generic node serializing methods methods //
-    //------------------------------------------//
-
-
-    /**
-     * Called to serialize the document's DOCTYPE by the root element.
-     * <p>
-     * This method will check if it has not been called before ({@link #_started}),
-     * will serialize the document type declaration, and will serialize all
-     * pre-root comments and PIs that were accumulated in the document
-     * (see {@link #serializePreRoot}). Pre-root will be serialized even if
-     * this is not the first root element of the document.
-     */
-    protected void startDocument( String rootTagName )
-        throws IOException
-    {
-        // Required to stop processing the DTD, even though the DTD
-        // is not printed.
-        _printer.leaveDTD();
-
-        _started = true;
-        // Always serialize these, even if not te first root element.
-        serializePreRoot();
-    }
-
-
-    /**
-     * Called to serialize a DOM element. Equivalent to calling {@link
-     * #startElement}, {@link #endElement} and serializing everything
-     * inbetween, but better optimized.
-     */
-    protected void serializeElement( Element elem )
-        throws IOException
-    {
-        Node         child;
-        ElementState state;
-        boolean      preserveSpace;
-        String       tagName;
-
-        tagName = elem.getTagName();
-        state = getElementState();
-        if ( isDocumentState() ) {
-            // If this is the root element handle it differently.
-            // If the first root element in the document, serialize
-            // the document's DOCTYPE. Space preserving defaults
-            // to that of the output format.
-            if ( ! _started )
-                startDocument( tagName );
-        }
-        // For any other element, if first in parent, then
-        // use the parnet's space preserving.
-        preserveSpace = state.preserveSpace;
-
-        // Do not change the current element state yet.
-        // This only happens in endElement().
-
-        // Ignore all other attributes of the element, only printing
-        // its contents.
-
-        // If element has children, then serialize them, otherwise
-        // serialize en empty tag.
-        if ( elem.hasChildNodes() ) {
-            // Enter an element state, and serialize the children
-            // one by one. Finally, end the element.
-            state = enterElementState( null, null, tagName, preserveSpace );
-            child = elem.getFirstChild();
-            while ( child != null ) {
-                serializeNode( child );
-                child = child.getNextSibling();
-            }
-            endElementIO( tagName );
-        } else {
-            if ( ! isDocumentState() ) {
-                // After element but parent element is no longer empty.
-                state.afterElement = true;
-                state.empty = false;
-            }
-        }
-    }
-
-
-    /**
-     * Serialize the DOM node. This method is unique to the Text serializer.
-     *
-     * @param node The node to serialize
-     */
-    protected void serializeNode( Node node )
-        throws IOException
-    {
-        // Based on the node type call the suitable SAX handler.
-        // Only comments entities and documents which are not
-        // handled by SAX are serialized directly.
-        switch ( node.getNodeType() ) {
-        case Node.TEXT_NODE : {
-            String text;
-
-            text = node.getNodeValue();
-            if ( text != null )
-                characters( node.getNodeValue(), true );
-            break;
-        }
-
-        case Node.CDATA_SECTION_NODE : {
-            String text;
-
-            text = node.getNodeValue();
-            if ( text != null )
-                characters( node.getNodeValue(), true );
-            break;
-        }
-
-        case Node.COMMENT_NODE :
-            break;
-
-        case Node.ENTITY_REFERENCE_NODE :
-            // Ignore.
-            break;
-
-        case Node.PROCESSING_INSTRUCTION_NODE :
-            break;
-
-        case Node.ELEMENT_NODE :
-            serializeElement( (Element) node );
-            break;
-
-        case Node.DOCUMENT_NODE :
-            // !!! Fall through
-        case Node.DOCUMENT_FRAGMENT_NODE : {
-            Node         child;
-
-            // By definition this will happen if the node is a document,
-            // document fragment, etc. Just serialize its contents. It will
-            // work well for other nodes that we do not know how to serialize.
-            child = node.getFirstChild();
-            while ( child != null ) {
-                serializeNode( child );
-                child = child.getNextSibling();
-            }
-            break;
-        }
-
-        default:
-            break;
-        }
-    }
-
-
-    protected ElementState content()
-    {
-        ElementState state;
-
-        state = getElementState();
-        if ( ! isDocumentState() ) {
-            // If this is the first content in the element,
-            // change the state to not-empty.
-            if ( state.empty )
-                state.empty = false;
-            // Except for one content type, all of them
-            // are not last element. That one content
-            // type will take care of itself.
-            state.afterElement = false;
-        }
-        return state;
-    }
-
-
-    protected String getEntityRef( int ch )
-    {
-        return null;
-    }
-
-
-}
-
-
diff --git a/src/org/apache/xml/serialize/XHTMLSerializer.java b/src/org/apache/xml/serialize/XHTMLSerializer.java
deleted file mode 100644
index 492ff93..0000000
--- a/src/org/apache/xml/serialize/XHTMLSerializer.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.UnsupportedEncodingException;
-
-
-/**
- * Implements an XHTML serializer supporting both DOM and SAX
- * pretty serializing. For usage instructions see either {@link
- * Serializer} or {@link BaseMarkupSerializer}.
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @see Serializer
- */
-public class XHTMLSerializer
-    extends HTMLSerializer
-{
-
-
-    /**
-     * Constructs a new serializer. The serializer cannot be used without
-     * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
-     * first.
-     */
-    public XHTMLSerializer()
-    {
-        super( true, new OutputFormat( Method.XHTML, null, false ) );
-    }
-
-
-    /**
-     * Constructs a new serializer. The serializer cannot be used without
-     * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
-     * first.
-     */
-    public XHTMLSerializer( OutputFormat format )
-    {
-        super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
-    }
-
-
-    /**
-     * Constructs a new serializer that writes to the specified writer
-     * using the specified output format. If <tt>format</tt> is null,
-     * will use a default output format.
-     *
-     * @param writer The writer to use
-     * @param format The output format to use, null for the default
-     */
-    public XHTMLSerializer( Writer writer, OutputFormat format )
-    {
-        super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
-        setOutputCharStream( writer );
-    }
-
-
-    /**
-     * Constructs a new serializer that writes to the specified output
-     * stream using the specified output format. If <tt>format</tt>
-     * is null, will use a default output format.
-     *
-     * @param output The output stream to use
-     * @param format The output format to use, null for the default
-     */
-    public XHTMLSerializer( OutputStream output, OutputFormat format )
-    {
-        super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
-        setOutputByteStream( output );
-    }
-
-
-    public void setOutputFormat( OutputFormat format )
-    {
-        super.setOutputFormat( format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
-    }
-
-
-}
diff --git a/src/org/apache/xml/serialize/XMLSerializer.java b/src/org/apache/xml/serialize/XMLSerializer.java
deleted file mode 100755
index bd65ca3..0000000
--- a/src/org/apache/xml/serialize/XMLSerializer.java
+++ /dev/null
@@ -1,1065 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-
-
-// Sep 14, 2000:
-//  Fixed problem with namespace handling. Contributed by
-//  David Blondeau <blondeau@intalio.com>
-// Sep 14, 2000:
-//  Fixed serializer to report IO exception directly, instead at
-//  the end of document processing.
-//  Reported by Patrick Higgins <phiggins@transzap.com>
-// Aug 21, 2000:
-//  Fixed bug in startDocument not calling prepare.
-//  Reported by Mikael Staldal <d96-mst-ingen-reklam@d.kth.se>
-// Aug 21, 2000:
-//  Added ability to omit DOCTYPE declaration.
-
-
-package org.apache.xml.serialize;
-
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.io.StringWriter;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-import org.w3c.dom.*;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.AttributesImpl;
-
-import org.apache.xerces.dom3.ls.DOMWriter;
-import org.apache.xerces.dom3.DOMErrorHandler;
-
-/**
- * Implements an XML serializer supporting both DOM and SAX pretty
- * serializing. For usage instructions see {@link Serializer}.
- * <p>
- * If an output stream is used, the encoding is taken from the
- * output format (defaults to <tt>UTF-8</tt>). If a writer is
- * used, make sure the writer uses the same encoding (if applies)
- * as specified in the output format.
- * <p>
- * The serializer supports both DOM and SAX. DOM serializing is done
- * by calling {@link #serialize} and SAX serializing is done by firing
- * SAX events and using the serializer as a document handler.
- * <p>
- * If an I/O exception occurs while serializing, the serializer
- * will not throw an exception directly, but only throw it
- * at the end of serializing (either DOM or SAX's {@link
- * org.xml.sax.DocumentHandler#endDocument}.
- * <p>
- * For elements that are not specified as whitespace preserving,
- * the serializer will potentially break long text lines at space
- * boundaries, indent lines, and serialize elements on separate
- * lines. Line terminators will be regarded as spaces, and
- * spaces at beginning of line will be stripped.
- *
- *
- * @version $Revision$ $Date$
- * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
- * @author <a href="mailto:rahul.srivastava@sun.com">Rahul Srivastava</a>
- * @see Serializer
- */
-public class XMLSerializer
-    extends BaseMarkupSerializer
-    implements DOMWriter 
-{
-
-    private String fEncoding;
-    private String fLastEncoding;
-
-
-    /**
-     * Constructs a new serializer. The serializer cannot be used without
-     * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
-     * first.
-     */
-    public XMLSerializer()
-    {
-        super( new OutputFormat( Method.XML, null, false ) );
-        fFeatures = new Hashtable();
-        initFeatures();
-    }
-
-
-    /**
-     * Constructs a new serializer. The serializer cannot be used without
-     * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
-     * first.
-     */
-    public XMLSerializer( OutputFormat format )
-    {
-        super( format != null ? format : new OutputFormat( Method.XML, null, false ) );
-        _format.setMethod( Method.XML );
-        fFeatures = new Hashtable();
-        initFeatures();
-    }
-
-
-    /**
-     * Constructs a new serializer that writes to the specified writer
-     * using the specified output format. If <tt>format</tt> is null,
-     * will use a default output format.
-     *
-     * @param writer The writer to use
-     * @param format The output format to use, null for the default
-     */
-    public XMLSerializer( Writer writer, OutputFormat format )
-    {
-        super( format != null ? format : new OutputFormat( Method.XML, null, false ) );
-        _format.setMethod( Method.XML );
-        setOutputCharStream( writer );
-        fFeatures = new Hashtable();
-        initFeatures();
-    }
-
-
-    /**
-     * Constructs a new serializer that writes to the specified output
-     * stream using the specified output format. If <tt>format</tt>
-     * is null, will use a default output format.
-     *
-     * @param output The output stream to use
-     * @param format The output format to use, null for the default
-     */
-    public XMLSerializer( OutputStream output, OutputFormat format )
-    {
-        super( format != null ? format : new OutputFormat( Method.XML, null, false ) );
-        _format.setMethod( Method.XML );
-        setOutputByteStream( output );
-        fFeatures = new Hashtable();
-        initFeatures();
-    }
-
-
-    public void setOutputFormat( OutputFormat format )
-    {
-        super.setOutputFormat( format != null ? format : new OutputFormat( Method.XML, null, false ) );
-    }
-
-
-    //-----------------------------------------//
-    // SAX content handler serializing methods //
-    //-----------------------------------------//
-
-
-    public void startElement( String namespaceURI, String localName,
-                              String rawName, Attributes attrs )
-        throws SAXException
-    {
-        int          i;
-        boolean      preserveSpace;
-        ElementState state;
-        String       name;
-        String       value;
-        boolean      addNSAttr = false;
-
-        try {
-        if ( _printer == null )
-            throw new IllegalStateException( "SER002 No writer supplied for serializer" );
-
-        state = getElementState();
-        if ( isDocumentState() ) {
-            // If this is the root element handle it differently.
-            // If the first root element in the document, serialize
-            // the document's DOCTYPE. Space preserving defaults
-            // to that of the output format.
-            if ( ! _started )
-                    startDocument( ( localName == null || localName.length() == 0 ) ? rawName : localName );
-        } else {
-            // For any other element, if first in parent, then
-            // close parent's opening tag and use the parnet's
-            // space preserving.
-            if ( state.empty )
-                _printer.printText( '>' );
-            // Must leave CData section first
-            if ( state.inCData )
-            {
-                _printer.printText( "]]>" );
-                state.inCData = false;
-            }
-            // Indent this element on a new line if the first
-            // content of the parent element or immediately
-            // following an element or a comment
-            if ( _indenting && ! state.preserveSpace &&
-                 ( state.empty || state.afterElement || state.afterComment) )
-                _printer.breakLine();
-        }
-        preserveSpace = state.preserveSpace;
-
-            //We remove the namespaces from the attributes list so that they will
-            //be in _prefixes
-            attrs = extractNamespaces(attrs);
-
-        // Do not change the current element state yet.
-        // This only happens in endElement().
-            if ( rawName == null || rawName.length() == 0 ) {
-                if ( localName == null )
-                    throw new SAXException( "No rawName and localName is null" );
-                if ( namespaceURI != null && ! namespaceURI.equals( "" ) ) {
-                String prefix;
-                prefix = getPrefix( namespaceURI );
-                    if ( prefix != null && prefix.length() > 0 )
-                    rawName = prefix + ":" + localName;
-                    else
-                        rawName = localName;
-                } else
-                    rawName = localName;
-            addNSAttr = true;
-        }
-
-        _printer.printText( '<' );
-        _printer.printText( rawName );
-        _printer.indent();
-
-        // For each attribute print it's name and value as one part,
-        // separated with a space so the element can be broken on
-        // multiple lines.
-        if ( attrs != null ) {
-            for ( i = 0 ; i < attrs.getLength() ; ++i ) {
-                _printer.printSpace();
-
-                name = attrs.getQName( i );
-                    if ( name != null && name.length() == 0 ) {
-                    String prefix;
-                    String attrURI;
-
-                    name = attrs.getLocalName( i );
-                    attrURI = attrs.getURI( i );
-                        if ( ( attrURI != null && attrURI.length() != 0 ) &&
-                             ( namespaceURI == null || namespaceURI.length() == 0 ||
-                                              ! attrURI.equals( namespaceURI ) ) ) {
-                        prefix = getPrefix( attrURI );
-                        if ( prefix != null && prefix.length() > 0 )
-                            name = prefix + ":" + name;
-                    }
-                }
-
-                value = attrs.getValue( i );
-                if ( value == null )
-                    value = "";
-                _printer.printText( name );
-                _printer.printText( "=\"" );
-                printEscaped( value );
-                _printer.printText( '"' );
-
-                // If the attribute xml:space exists, determine whether
-                // to preserve spaces in this and child nodes based on
-                // its value.
-                if ( name.equals( "xml:space" ) ) {
-                    if ( value.equals( "preserve" ) )
-                        preserveSpace = true;
-                    else
-                        preserveSpace = _format.getPreserveSpace();
-                }
-            }
-        }
-
-            if ( _prefixes != null ) {
-            Enumeration enum;
-
-            enum = _prefixes.keys();
-            while ( enum.hasMoreElements() ) {
-                _printer.printSpace();
-                value = (String) enum.nextElement();
-                name = (String) _prefixes.get( value );
-                if ( name.length() == 0 ) {
-                    _printer.printText( "xmlns=\"" );
-                    printEscaped( value );
-                    _printer.printText( '"' );
-                } else {
-                    _printer.printText( "xmlns:" );
-                    _printer.printText( name );
-                    _printer.printText( "=\"" );
-                    printEscaped( value );
-                    _printer.printText( '"' );
-                }
-            }
-        }
-
-        // Now it's time to enter a new element state
-        // with the tag name and space preserving.
-        // We still do not change the curent element state.
-        state = enterElementState( namespaceURI, localName, rawName, preserveSpace );
-            name = ( localName == null || localName.length() == 0 ) ? rawName : namespaceURI + "^" + localName;
-            state.doCData = _format.isCDataElement( name );
-            state.unescaped = _format.isNonEscapingElement( name );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endElement( String namespaceURI, String localName,
-                            String rawName )
-        throws SAXException
-    {
-        try {
-            endElementIO( namespaceURI, localName, rawName );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-        }
-    }
-
-
-    public void endElementIO( String namespaceURI, String localName,
-                            String rawName )
-        throws IOException
-    {
-        ElementState state;
-
-        // Works much like content() with additions for closing
-        // an element. Note the different checks for the closed
-        // element's state and the parent element's state.
-        _printer.unindent();
-        state = getElementState();
-        if ( state.empty ) {
-            _printer.printText( "/>" );
-        } else {
-            // Must leave CData section first
-            if ( state.inCData )
-                _printer.printText( "]]>" );
-            // This element is not empty and that last content was
-            // another element, so print a line break before that
-            // last element and this element's closing tag.
-            if ( _indenting && ! state.preserveSpace && (state.afterElement || state.afterComment) )
-                _printer.breakLine();
-            _printer.printText( "</" );
-            _printer.printText( state.rawName );
-            _printer.printText( '>' );
-        }
-        // Leave the element state and update that of the parent
-        // (if we're not root) to not empty and after element.
-        state = leaveElementState();
-        state.afterElement = true;
-        state.afterComment = false;
-        state.empty = false;
-        if ( isDocumentState() )
-            _printer.flush();
-    }
-
-
-    //------------------------------------------//
-    // SAX document handler serializing methods //
-    //------------------------------------------//
-
-
-    public void startElement( String tagName, AttributeList attrs )
-        throws SAXException
-    {
-        int          i;
-        boolean      preserveSpace;
-        ElementState state;
-        String       name;
-        String       value;
-
-        try {
-        if ( _printer == null )
-            throw new IllegalStateException( "SER002 No writer supplied for serializer" );
-
-        state = getElementState();
-        if ( isDocumentState() ) {
-            // If this is the root element handle it differently.
-            // If the first root element in the document, serialize
-            // the document's DOCTYPE. Space preserving defaults
-            // to that of the output format.
-            if ( ! _started )
-                startDocument( tagName );
-        } else {
-            // For any other element, if first in parent, then
-            // close parent's opening tag and use the parnet's
-            // space preserving.
-            if ( state.empty )
-                _printer.printText( '>' );
-            // Must leave CData section first
-            if ( state.inCData )
-            {
-                _printer.printText( "]]>" );
-                state.inCData = false;
-            }
-            // Indent this element on a new line if the first
-            // content of the parent element or immediately
-            // following an element.
-            if ( _indenting && ! state.preserveSpace &&
-                 ( state.empty || state.afterElement || state.afterComment) )
-                _printer.breakLine();
-        }
-        preserveSpace = state.preserveSpace;
-
-        // Do not change the current element state yet.
-        // This only happens in endElement().
-
-        _printer.printText( '<' );
-        _printer.printText( tagName );
-        _printer.indent();
-
-        // For each attribute print it's name and value as one part,
-        // separated with a space so the element can be broken on
-        // multiple lines.
-        if ( attrs != null ) {
-            for ( i = 0 ; i < attrs.getLength() ; ++i ) {
-                _printer.printSpace();
-                name = attrs.getName( i );
-                value = attrs.getValue( i );
-                if ( value != null ) {
-                    _printer.printText( name );
-                    _printer.printText( "=\"" );
-                    printEscaped( value );
-                    _printer.printText( '"' );
-                }
-
-                // If the attribute xml:space exists, determine whether
-                // to preserve spaces in this and child nodes based on
-                // its value.
-                if ( name.equals( "xml:space" ) ) {
-                    if ( value.equals( "preserve" ) )
-                        preserveSpace = true;
-                    else
-                        preserveSpace = _format.getPreserveSpace();
-                }
-            }
-        }
-        // Now it's time to enter a new element state
-        // with the tag name and space preserving.
-        // We still do not change the curent element state.
-        state = enterElementState( null, null, tagName, preserveSpace );
-        state.doCData = _format.isCDataElement( tagName );
-        state.unescaped = _format.isNonEscapingElement( tagName );
-        } catch ( IOException except ) {
-            throw new SAXException( except );
-    }
-
-    }
-
-
-    public void endElement( String tagName )
-        throws SAXException
-    {
-        endElement( null, null, tagName );
-    }
-
-
-
-    //------------------------------------------//
-    // Generic node serializing methods methods //
-    //------------------------------------------//
-
-
-    /**
-     * Called to serialize the document's DOCTYPE by the root element.
-     * The document type declaration must name the root element,
-     * but the root element is only known when that element is serialized,
-     * and not at the start of the document.
-     * <p>
-     * This method will check if it has not been called before ({@link #_started}),
-     * will serialize the document type declaration, and will serialize all
-     * pre-root comments and PIs that were accumulated in the document
-     * (see {@link #serializePreRoot}). Pre-root will be serialized even if
-     * this is not the first root element of the document.
-     */
-    protected void startDocument( String rootTagName )
-        throws IOException
-    {
-        int    i;
-        String dtd;
-
-        dtd = _printer.leaveDTD();
-        if ( ! _started ) {
-
-            if ( ! _format.getOmitXMLDeclaration() ) {
-                StringBuffer    buffer;
-
-                // Serialize the document declaration appreaing at the head
-                // of very XML document (unless asked not to).
-                buffer = new StringBuffer( "<?xml version=\"" );
-                if ( _format.getVersion() != null )
-                    buffer.append( _format.getVersion() );
-                else
-                    buffer.append( "1.0" );
-                buffer.append( '"' );
-                if ( _format.getEncoding() != null ) {
-                    buffer.append( " encoding=\"" );
-                    buffer.append( _format.getEncoding() );
-                    buffer.append( '"' );
-                }
-                if ( _format.getStandalone() && _docTypeSystemId == null &&
-                     _docTypePublicId == null )
-                    buffer.append( " standalone=\"yes\"" );
-                buffer.append( "?>" );
-                _printer.printText( buffer );
-                _printer.breakLine();
-            }
-
-            if ( ! _format.getOmitDocumentType() ) {
-                if ( _docTypeSystemId != null ) {
-                    // System identifier must be specified to print DOCTYPE.
-                    // If public identifier is specified print 'PUBLIC
-                    // <public> <system>', if not, print 'SYSTEM <system>'.
-                    _printer.printText( "<!DOCTYPE " );
-                    _printer.printText( rootTagName );
-                    if ( _docTypePublicId != null ) {
-                        _printer.printText( " PUBLIC " );
-                        printDoctypeURL( _docTypePublicId );
-                        if ( _indenting ) {
-                            _printer.breakLine();
-                            for ( i = 0 ; i < 18 + rootTagName.length() ; ++i )
-                                _printer.printText( " " );
-                        } else
-                            _printer.printText( " " );
-                    printDoctypeURL( _docTypeSystemId );
-                    }
-                    else {
-                        _printer.printText( " SYSTEM " );
-                        printDoctypeURL( _docTypeSystemId );
-                    }
-
-                    // If we accumulated any DTD contents while printing.
-                    // this would be the place to print it.
-                    if ( dtd != null && dtd.length() > 0 ) {
-                        _printer.printText( " [" );
-                        printText( dtd, true, true );
-                        _printer.printText( ']' );
-                    }
-
-                    _printer.printText( ">" );
-                    _printer.breakLine();
-                } else if ( dtd != null && dtd.length() > 0 ) {
-                    _printer.printText( "<!DOCTYPE " );
-                    _printer.printText( rootTagName );
-                    _printer.printText( " [" );
-                    printText( dtd, true, true );
-                    _printer.printText( "]>" );
-                    _printer.breakLine();
-                }
-            }
-        }
-        _started = true;
-        // Always serialize these, even if not te first root element.
-        serializePreRoot();
-    }
-
-
-    /**
-     * Called to serialize a DOM element. Equivalent to calling {@link
-     * #startElement}, {@link #endElement} and serializing everything
-     * inbetween, but better optimized.
-     */
-    protected void serializeElement( Element elem )
-        throws IOException
-    {
-        Attr         attr;
-        NamedNodeMap attrMap;
-        int          i;
-        Node         child;
-        ElementState state;
-        boolean      preserveSpace;
-        String       name;
-        String       value;
-        String       tagName;
-
-        tagName = elem.getTagName();
-        state = getElementState();
-        if ( isDocumentState() ) {
-            // If this is the root element handle it differently.
-            // If the first root element in the document, serialize
-            // the document's DOCTYPE. Space preserving defaults
-            // to that of the output format.
-            if ( ! _started )
-                startDocument( tagName );
-        } else {
-            // For any other element, if first in parent, then
-            // close parent's opening tag and use the parnet's
-            // space preserving.
-            if ( state.empty )
-                _printer.printText( '>' );
-            // Must leave CData section first
-            if ( state.inCData )
-            {
-                _printer.printText( "]]>" );
-                state.inCData = false;
-            }
-            // Indent this element on a new line if the first
-            // content of the parent element or immediately
-            // following an element.
-            if ( _indenting && ! state.preserveSpace &&
-                 ( state.empty || state.afterElement || state.afterComment) )
-                _printer.breakLine();
-        }
-        preserveSpace = state.preserveSpace;
-
-        // Do not change the current element state yet.
-        // This only happens in endElement().
-
-        _printer.printText( '<' );
-        _printer.printText( tagName );
-        _printer.indent();
-
-        // Lookup the element's attribute, but only print specified
-        // attributes. (Unspecified attributes are derived from the DTD.
-        // For each attribute print it's name and value as one part,
-        // separated with a space so the element can be broken on
-        // multiple lines.
-        attrMap = elem.getAttributes();
-        if ( attrMap != null ) {
-            for ( i = 0 ; i < attrMap.getLength() ; ++i ) {
-                attr = (Attr) attrMap.item( i );
-                name = attr.getName();
-                value = attr.getValue();
-                if ( value == null )
-                    value = "";
-                if ( attr.getSpecified() || !getFeature("discard-default-content") ) {
-                    _printer.printSpace();
-                    _printer.printText( name );
-                    _printer.printText( "=\"" );
-                    printEscaped( value );
-                    _printer.printText( '"' );
-                }
-                // If the attribute xml:space exists, determine whether
-                // to preserve spaces in this and child nodes based on
-                // its value.
-                if ( name.equals( "xml:space" ) ) {
-                    if ( value.equals( "preserve" ) )
-                        preserveSpace = true;
-                    else
-                        preserveSpace = _format.getPreserveSpace();
-                }
-            }
-        }
-
-        // If element has children, then serialize them, otherwise
-        // serialize en empty tag.
-        if ( elem.hasChildNodes() ) {
-            // Enter an element state, and serialize the children
-            // one by one. Finally, end the element.
-            state = enterElementState( null, null, tagName, preserveSpace );
-            state.doCData = _format.isCDataElement( tagName );
-            state.unescaped = _format.isNonEscapingElement( tagName );
-            child = elem.getFirstChild();
-            while ( child != null ) {
-                serializeNode( child );
-                child = child.getNextSibling();
-            }
-            endElementIO( null, null, tagName );
-        } else {
-            _printer.unindent();
-            _printer.printText( "/>" );
-            // After element but parent element is no longer empty.
-            state.afterElement = true;
-            state.afterComment = false;
-            state.empty = false;
-            if ( isDocumentState() )
-                _printer.flush();
-        }
-    }
-
-
-    protected String getEntityRef( int ch )
-    {
-        // Encode special XML characters into the equivalent character references.
-        // These five are defined by default for all XML documents.
-        switch ( ch ) {
-        case '<':
-            return "lt";
-        case '>':
-            return "gt";
-        case '"':
-            return "quot";
-        case '\'':
-            return "apos";
-        case '&':
-            return "amp";
-        }
-        return null;
-    }
-
-
-    /** Retrieve and remove the namespaces declarations from the list of attributes.
-     *
-     */
-    private Attributes extractNamespaces( Attributes attrs )
-        throws SAXException
-    {
-        AttributesImpl attrsOnly;
-        String         rawName;
-        int            i;
-        int            indexColon;
-        String         prefix;
-        int            length;
-
-        length = attrs.getLength();
-        attrsOnly = new AttributesImpl( attrs );
-
-        for ( i = length - 1 ; i >= 0 ; --i ) {
-            rawName = attrsOnly.getQName( i );
-
-            //We have to exclude the namespaces declarations from the attributes
-            //Append only when the feature http://xml.org/sax/features/namespace-prefixes"
-            //is TRUE
-            if ( rawName.startsWith( "xmlns" ) ) {
-                if (rawName.length() == 5) {
-                    startPrefixMapping( "", attrs.getValue( i ) );
-                    attrsOnly.removeAttribute( i );
-                } else if (rawName.charAt(5) == ':') {
-                    startPrefixMapping(rawName.substring(6), attrs.getValue(i));
-                    attrsOnly.removeAttribute( i );
-                }
-            }
-        }
-        return attrsOnly;
-    }
-    
-    // *****************************
-    
-    private void initFeatures() {
-        fFeatures.put("normalize-characters",new Boolean(false));
-        fFeatures.put("split-cdata-sections",new Boolean(true));
-        fFeatures.put("validation",new Boolean(false));
-        fFeatures.put("expand-entity-references",new Boolean(false));
-        fFeatures.put("whitespace-in-element-content",new Boolean(true));
-        fFeatures.put("discard-default-content",new Boolean(true));
-        fFeatures.put("format-canonical",new Boolean(false));
-        fFeatures.put("format-pretty-print",new Boolean(false));
-    }
-    
-    private void checkAllFeatures() {
-        if (getFeature("whitespace-in-element-content"))
-            _format.setPreserveSpace(true);
-        else
-            _format.setPreserveSpace(false);
-    }
-
-    /**
-     * Set the state of a feature.
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * <br>It is possible for a <code>DOMWriter</code> to recognize a feature 
-     * name but to be unable to set its value.
-     * @param name The feature name.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_SUPPORTED_ERR exception when the <code>DOMWriter</code> 
-     *   recognizes the feature name but cannot set the requested value. 
-     *   <br>Raise a NOT_FOUND_ERR When the <code>DOMWriter</code> does not 
-     *   recognize the feature name.
-     */
-    public void setFeature(String name, 
-                           boolean state)
-                           throws DOMException {
-        if (name != null && fFeatures.containsKey(name))
-            if (canSetFeature(name,state))
-                fFeatures.put(name,new Boolean(state));
-            else
-                throw new DOMException(DOMException.NOT_SUPPORTED_ERR,"Feature "+name+" cannot be set as "+state);
-        else
-            throw new DOMException(DOMException.NOT_FOUND_ERR,"Feature "+name+" not found");
-    }
-
-    /**
-     * Query whether setting a feature to a specific value is supported.
-     * <br>The feature name has the same form as a DOM hasFeature string.
-     * @param name The feature name, which is a DOM has-feature style string.
-     * @param state The requested state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @return <code>true</code> if the feature could be successfully set to 
-     *   the specified value, or <code>false</code> if the feature is not 
-     *   recognized or the requested value is not supported. The value of 
-     *   the feature itself is not changed.
-     */
-    public boolean canSetFeature(String name, boolean state) {
-        if (name.equals("normalize-characters") && state)
-                return false;
-        else if (name.equals("validation") && state)
-                return false;
-        else if (name.equals("whitespace-in-element-content") && !state)
-                return false;
-        else if (name.equals("format-canonical") && state)
-                return false;
-        else if (name.equals("format-pretty-print") && state)
-                return false;
-        else
-                return true;
-    }   
-    
-    /**
-     * Look up the value of a feature.
-     * <br>The feature name has the same form as a DOM hasFeature string
-     * @param name The feature name, which is a string with DOM has-feature 
-     *   syntax.
-     * @return The current state of the feature (<code>true</code> or 
-     *   <code>false</code>).
-     * @exception DOMException
-     *   Raise a NOT_FOUND_ERR When the <code>DOMWriter</code> does not 
-     *   recognize the feature name.
-     */
-    public boolean getFeature(String name)
-                              throws DOMException {
-        Boolean state = (Boolean)fFeatures.get(name);
-        if (state == null)
-            throw new DOMException(DOMException.NOT_FOUND_ERR,"Feature "+name+" not found");
-        return state.booleanValue();
-    }
-
-    /**
-     *  The character encoding in which the output will be written. 
-     * <br> The encoding to use when writing is determined as follows: If the 
-     * encoding attribute has been set, that value will be used.If the 
-     * encoding attribute is <code>null</code> or empty, but the item to be 
-     * written includes an encoding declaration, that value will be used.If 
-     * neither of the above provides an encoding name, a default encoding of 
-     * "UTF-8" will be used.
-     * <br>The default value is <code>null</code>.
-     */
-    public String getEncoding() {
-        return fEncoding;
-    }
-    
-    /**
-     *  The character encoding in which the output will be written. 
-     * <br> The encoding to use when writing is determined as follows: If the 
-     * encoding attribute has been set, that value will be used.If the 
-     * encoding attribute is <code>null</code> or empty, but the item to be 
-     * written includes an encoding declaration, that value will be used.If 
-     * neither of the above provides an encoding name, a default encoding of 
-     * "UTF-8" will be used.
-     * <br>The default value is <code>null</code>.
-     */
-    public void setEncoding(String encoding) {
-        _format.setEncoding(encoding);
-        fEncoding = _format.getEncoding();
-    }
-
-    /**
-     *  The actual character encoding that was last used by this formatter. 
-     * This convenience method allows the encoding that was used when 
-     * serializing a document to be directly obtained. 
-     */
-    public String getLastEncoding() {
-        return fLastEncoding;
-    }
-
-    /**
-     *  The end-of-line sequence of characters to be used in the XML being 
-     * written out. The only permitted values are these: 
-     * <dl>
-     * <dt><code>null</code></dt>
-     * <dd> 
-     * Use a 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  2.11 "End-of-Line 
-     * Handling". </dd>
-     * <dt>CR</dt>
-     * <dd>The carriage-return character (#xD).</dd>
-     * <dt>CR-LF</dt>
-     * <dd> The 
-     * carriage-return and line-feed characters (#xD #xA). </dd>
-     * <dt>LF</dt>
-     * <dd> The line-feed 
-     * character (#xA). </dd>
-     * </dl>
-     * <br>The default value for this attribute is <code>null</code>.
-     */
-    public String getNewLine() {
-        return _format.getLineSeparator();
-    }
-    
-    /**
-     *  The end-of-line sequence of characters to be used in the XML being 
-     * written out. The only permitted values are these: 
-     * <dl>
-     * <dt><code>null</code></dt>
-     * <dd> 
-     * Use a 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  2.11 "End-of-Line 
-     * Handling". </dd>
-     * <dt>CR</dt>
-     * <dd>The carriage-return character (#xD).</dd>
-     * <dt>CR-LF</dt>
-     * <dd> The 
-     * carriage-return and line-feed characters (#xD #xA). </dd>
-     * <dt>LF</dt>
-     * <dd> The line-feed 
-     * character (#xA). </dd>
-     * </dl>
-     * <br>The default value for this attribute is <code>null</code>.
-     */
-    public void setNewLine(String newLine) {
-        _format.setLineSeparator(newLine);
-    }
-
-    /**
-     *  The error handler that will receive error notifications during 
-     * serialization. The node where the error occured is passed to this 
-     * error handler, any modification to nodes from within an error 
-     * callback should be avoided since this will result in undefined, 
-     * implementation dependent behavior. 
-     */
-    public DOMErrorHandler getErrorHandler() {
-        return fDOMErrorHandler;
-    }
-    
-    /**
-     *  The error handler that will receive error notifications during 
-     * serialization. The node where the error occured is passed to this 
-     * error handler, any modification to nodes from within an error 
-     * callback should be avoided since this will result in undefined, 
-     * implementation dependent behavior. 
-     */
-    public void setErrorHandler(DOMErrorHandler errorHandler) {
-        fDOMErrorHandler = errorHandler;
-    }
-
-    /**
-     * Write out the specified node as described above in the description of 
-     * <code>DOMWriter</code>. Writing a Document or Entity node produces a 
-     * serialized form that is well formed XML. Writing other node types 
-     * produces a fragment of text in a form that is not fully defined by 
-     * this document, but that should be useful to a human for debugging or 
-     * diagnostic purposes. 
-     * @param destination The destination for the data to be written.
-     * @param wnode The <code>Document</code> or <code>Entity</code> node to 
-     *   be written. For other node types, something sensible should be 
-     *   written, but the exact serialized form is not specified.
-     * @return  Returns <code>true</code> if <code>node</code> was 
-     *   successfully serialized and <code>false</code> in case a failure 
-     *   occured and the failure wasn't canceled by the error handler. 
-     * @exception DOMSystemException
-     *   This exception will be raised in response to any sort of IO or system 
-     *   error that occurs while writing to the destination. It may wrap an 
-     *   underlying system exception.
-     */
-    public boolean writeNode(java.io.OutputStream destination, 
-                             Node wnode)
-                             throws Exception {
-        checkAllFeatures();
-        try {
-            setOutputByteStream(destination);
-            if (wnode == null)
-                return false;
-            else if (wnode.getNodeType() == Node.DOCUMENT_NODE)
-                serialize((Document)wnode);
-            else if (wnode.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE)
-                serialize((DocumentFragment)wnode);
-            else if (wnode.getNodeType() == Node.ELEMENT_NODE)
-                serialize((Element)wnode);
-            else
-                return false;
-        }
-        catch(NullPointerException npe) {
-            throw npe;
-        }
-        catch(IOException ioe) {
-            throw ioe;
-        }
-        fLastEncoding = getEncoding();
-        return true;
-    }
-
-    /**
-     *  Serialize the specified node as described above in the description of 
-     * <code>DOMWriter</code>. The result of serializing the node is 
-     * returned as a string. Writing a Document or Entity node produces a 
-     * serialized form that is well formed XML. Writing other node types 
-     * produces a fragment of text in a form that is not fully defined by 
-     * this document, but that should be useful to a human for debugging or 
-     * diagnostic purposes. 
-     * @param wnode  The node to be written. 
-     * @return  Returns the serialized data, or <code>null</code> in case a 
-     *   failure occured and the failure wasn't canceled by the error 
-     *   handler. 
-     * @exception DOMException
-     *    DOMSTRING_SIZE_ERR: The resulting string is too long to fit in a 
-     *   <code>DOMString</code>. 
-     */
-    public String writeToString(Node wnode)
-                                throws DOMException {
-        checkAllFeatures();
-        StringWriter destination = new StringWriter();
-        try {
-            setOutputCharStream(destination);
-            if (wnode == null)
-                return null;
-            else if (wnode.getNodeType() == Node.DOCUMENT_NODE)
-                serialize((Document)wnode);
-            else if (wnode.getNodeType() == Node.DOCUMENT_FRAGMENT_NODE)
-                serialize((DocumentFragment)wnode);
-            else if (wnode.getNodeType() == Node.ELEMENT_NODE)
-                serialize((Element)wnode);
-            else
-                return null;
-        }
-        catch(IOException ioe) {
-            throw new DOMException(DOMException.DOMSTRING_SIZE_ERR,"The resulting string is too long to fit in a DOMString: "+ioe.getMessage());
-        }
-        fLastEncoding = getEncoding();
-        return destination.toString();
-    }
-
-}
-
-
diff --git a/src/org/w3c/dom/Attr.java b/src/org/w3c/dom/Attr.java
deleted file mode 100644
index 05b0c12..0000000
--- a/src/org/w3c/dom/Attr.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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;
-
-/**
- *  The <code>Attr</code> interface represents an attribute in an 
- * <code>Element</code> object. Typically the allowable values for the 
- * attribute are defined in a document type definition.
- * <p><code>Attr</code> objects inherit the <code>Node</code> interface, but 
- * since they are not actually child nodes of the element they describe, the 
- * DOM does not consider them part of the document tree. Thus, the 
- * <code>Node</code> attributes <code>parentNode</code>, 
- * <code>previousSibling</code>, and <code>nextSibling</code> have a 
- * <code>null</code> value for <code>Attr</code> objects. The DOM takes the 
- * view that attributes are properties of elements rather than having a 
- * separate identity from the elements they are associated with; this should 
- * make it more efficient to implement such features as default attributes 
- * associated with all elements of a given type. Furthermore, 
- * <code>Attr</code> nodes may not be immediate children of a 
- * <code>DocumentFragment</code>. However, they can be associated with 
- * <code>Element</code> nodes contained within a 
- * <code>DocumentFragment</code>. In short, users and implementors of the 
- * DOM need to be aware that <code>Attr</code> nodes have some things in 
- * common with other objects inheriting the <code>Node</code> interface, but 
- * they also are quite distinct.
- * <p> The attribute's effective value is determined as follows: if this 
- * attribute has been explicitly assigned any value, that value is the 
- * attribute's effective value; otherwise, if there is a declaration for 
- * this attribute, and that declaration includes a default value, then that 
- * default value is the attribute's effective value; otherwise, the 
- * attribute does not exist on this element in the structure model until it 
- * has been explicitly added. Note that the <code>nodeValue</code> attribute 
- * on the <code>Attr</code> instance can also be used to retrieve the string 
- * version of the attribute's value(s). 
- * <p>In XML, where the value of an attribute can contain entity references, 
- * the child nodes of the <code>Attr</code> node may be either 
- * <code>Text</code> or <code>EntityReference</code> nodes (when these are 
- * in use; see the description of <code>EntityReference</code> for 
- * discussion). Because the DOM Core is not aware of attribute types, it 
- * treats all attribute values as simple strings, even if the DTD or schema 
- * declares them as having tokenized types. 
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface Attr extends Node {
-    /**
-     * Returns the name of this attribute. 
-     */
-    public String getName();
-
-    /**
-     * If this attribute was explicitly given a value in the original 
-     * document, this is <code>true</code>; otherwise, it is 
-     * <code>false</code>. Note that the implementation is in charge of this 
-     * attribute, not the user. If the user changes the value of the 
-     * attribute (even if it ends up having the same value as the default 
-     * value) then the <code>specified</code> flag is automatically flipped 
-     * to <code>true</code>. To re-specify the attribute as the default 
-     * value from the DTD, the user must delete the attribute. The 
-     * implementation will then make a new attribute available with 
-     * <code>specified</code> set to <code>false</code> and the default 
-     * value (if one exists).
-     * <br>In summary:  If the attribute has an assigned value in the document 
-     * then <code>specified</code> is <code>true</code>, and the value is 
-     * the assigned value.  If the attribute has no assigned value in the 
-     * document and has a default value in the DTD, then 
-     * <code>specified</code> is <code>false</code>, and the value is the 
-     * default value in the DTD. If the attribute has no assigned value in 
-     * the document and has a value of #IMPLIED in the DTD, then the 
-     * attribute does not appear in the structure model of the document. If 
-     * the <code>ownerElement</code> attribute is <code>null</code> (i.e. 
-     * because it was just created or was set to <code>null</code> by the 
-     * various removal and cloning operations) <code>specified</code> is 
-     * <code>true</code>. 
-     */
-    public boolean getSpecified();
-
-    /**
-     * On retrieval, the value of the attribute is returned as a string. 
-     * Character and general entity references are replaced with their 
-     * values. See also the method <code>getAttribute</code> on the 
-     * <code>Element</code> interface.
-     * <br>On setting, this creates a <code>Text</code> node with the unparsed 
-     * contents of the string. I.e. any characters that an XML processor 
-     * would recognize as markup are instead treated as literal text. See 
-     * also the method <code>setAttribute</code> on the <code>Element</code> 
-     * interface.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     */
-    public String getValue();
-    public void setValue(String value)
-                            throws DOMException;
-
-    /**
-     * The <code>Element</code> node this attribute is attached to or 
-     * <code>null</code> if this attribute is not in use.
-     * @since DOM Level 2
-     */
-    public Element getOwnerElement();
-
-}
diff --git a/src/org/w3c/dom/CDATASection.java b/src/org/w3c/dom/CDATASection.java
deleted file mode 100644
index 9e74734..0000000
--- a/src/org/w3c/dom/CDATASection.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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;
-
-/**
- * CDATA sections are used to escape blocks of text containing characters that 
- * would otherwise be regarded as markup. The only delimiter that is 
- * recognized in a CDATA section is the "]]&gt;" string that ends the CDATA 
- * section. CDATA sections cannot be nested. Their primary purpose is for 
- * including material such as XML fragments, without needing to escape all 
- * the delimiters.
- * <p>The <code>DOMString</code> attribute of the <code>Text</code> node holds 
- * the text that is contained by the CDATA section. Note that this may 
- * contain characters that need to be escaped outside of CDATA sections and 
- * that, depending on the character encoding ("charset") chosen for 
- * serialization, it may be impossible to write out some characters as part 
- * of a CDATA section. 
- * <p> The <code>CDATASection</code> interface inherits from the 
- * <code>CharacterData</code> interface through the <code>Text</code> 
- * interface. Adjacent <code>CDATASection</code> nodes are not merged by use 
- * of the <code>normalize</code> method of the <code>Node</code> interface.
- * Because no markup is recognized within a <code>CDATASection</code>, 
- * character numeric references cannot be used as an escape mechanism when 
- * serializing. Therefore, action needs to be taken when serializing a 
- * <code>CDATASection</code> with a character encoding where some of the 
- * contained characters cannot be represented. Failure to do so would not 
- * produce well-formed XML.One potential solution in the serialization 
- * process is to end the CDATA section before the character, output the 
- * character using a character reference or entity reference, and open a new 
- * CDATA section for any further characters in the text node. Note, however, 
- * that some code conversion libraries at the time of writing do not return 
- * an error or exception when a character is missing from the encoding, 
- * making the task of ensuring that data is not corrupted on serialization 
- * more difficult.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface CDATASection extends Text {
-}
diff --git a/src/org/w3c/dom/CharacterData.java b/src/org/w3c/dom/CharacterData.java
deleted file mode 100644
index 9a25f7d..0000000
--- a/src/org/w3c/dom/CharacterData.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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;
-
-/**
- * The <code>CharacterData</code> interface extends Node with a set of 
- * attributes and methods for accessing character data in the DOM. For 
- * clarity this set is defined here rather than on each object that uses 
- * these attributes and methods. No DOM objects correspond directly to 
- * <code>CharacterData</code>, though <code>Text</code> and others do 
- * inherit the interface from it. All <code>offsets</code> in this interface 
- * start from <code>0</code>.
- * <p>As explained in the <code>DOMString</code> interface, text strings in 
- * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In 
- * the following, the term 16-bit units is used whenever necessary to 
- * indicate that indexing on CharacterData is done in 16-bit units.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface CharacterData extends Node {
-    /**
-     * The character data of the node that implements this interface. The DOM 
-     * implementation may not put arbitrary limits on the amount of data 
-     * that may be stored in a <code>CharacterData</code> node. However, 
-     * implementation limits may mean that the entirety of a node's data may 
-     * not fit into a single <code>DOMString</code>. In such cases, the user 
-     * may call <code>substringData</code> to retrieve the data in 
-     * appropriately sized pieces.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     * @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 getData()
-                            throws DOMException;
-    public void setData(String data)
-                            throws DOMException;
-
-    /**
-     * The number of 16-bit units that are available through <code>data</code> 
-     * and the <code>substringData</code> method below. This may have the 
-     * value zero, i.e., <code>CharacterData</code> nodes may be empty.
-     */
-    public int getLength();
-
-    /**
-     * Extracts a range of data from the node.
-     * @param offsetStart offset of substring to extract.
-     * @param countThe number of 16-bit units to extract.
-     * @return The specified substring. If the sum of <code>offset</code> and 
-     *   <code>count</code> exceeds the <code>length</code>, then all 16-bit 
-     *   units to the end of the data are returned.
-     * @exception DOMException
-     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
-     *   negative or greater than the number of 16-bit units in 
-     *   <code>data</code>, or if the specified <code>count</code> is 
-     *   negative.
-     *   <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does 
-     *   not fit into a <code>DOMString</code>.
-     */
-    public String substringData(int offset, 
-                                int count)
-                                throws DOMException;
-
-    /**
-     * Append the string to the end of the character data of the node. Upon 
-     * success, <code>data</code> provides access to the concatenation of 
-     * <code>data</code> and the <code>DOMString</code> specified.
-     * @param argThe <code>DOMString</code> to append.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     */
-    public void appendData(String arg)
-                           throws DOMException;
-
-    /**
-     * Insert a string at the specified 16-bit unit offset.
-     * @param offsetThe character offset at which to insert.
-     * @param argThe <code>DOMString</code> to insert.
-     * @exception DOMException
-     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
-     *   negative or greater than the number of 16-bit units in 
-     *   <code>data</code>.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     */
-    public void insertData(int offset, 
-                           String arg)
-                           throws DOMException;
-
-    /**
-     * Remove a range of 16-bit units from the node. Upon success, 
-     * <code>data</code> and <code>length</code> reflect the change.
-     * @param offsetThe offset from which to start removing.
-     * @param countThe number of 16-bit units to delete. If the sum of 
-     *   <code>offset</code> and <code>count</code> exceeds 
-     *   <code>length</code> then all 16-bit units from <code>offset</code> 
-     *   to the end of the data are deleted.
-     * @exception DOMException
-     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
-     *   negative or greater than the number of 16-bit units in 
-     *   <code>data</code>, or if the specified <code>count</code> is 
-     *   negative.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     */
-    public void deleteData(int offset, 
-                           int count)
-                           throws DOMException;
-
-    /**
-     * Replace the characters starting at the specified 16-bit unit offset 
-     * with the specified string.
-     * @param offsetThe offset from which to start replacing.
-     * @param countThe number of 16-bit units to replace. If the sum of 
-     *   <code>offset</code> and <code>count</code> exceeds 
-     *   <code>length</code>, then all 16-bit units to the end of the data 
-     *   are replaced; (i.e., the effect is the same as a <code>remove</code>
-     *    method call with the same range, followed by an <code>append</code>
-     *    method invocation).
-     * @param argThe <code>DOMString</code> with which the range must be 
-     *   replaced.
-     * @exception DOMException
-     *   INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is 
-     *   negative or greater than the number of 16-bit units in 
-     *   <code>data</code>, or if the specified <code>count</code> is 
-     *   negative.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     */
-    public void replaceData(int offset, 
-                            int count, 
-                            String arg)
-                            throws DOMException;
-
-}
diff --git a/src/org/w3c/dom/Comment.java b/src/org/w3c/dom/Comment.java
deleted file mode 100644
index 1097921..0000000
--- a/src/org/w3c/dom/Comment.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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;
-
-/**
- * This interface inherits from <code>CharacterData</code> and represents the 
- * content of a comment, i.e., all the characters between the starting '
- * <code>&lt;!--</code>' and ending '<code>--&gt;</code>'. Note that this is 
- * the definition of a comment in XML, and, in practice, HTML, although some 
- * HTML tools may implement the full SGML comment structure.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface Comment extends CharacterData {
-}
diff --git a/src/org/w3c/dom/DOMException.java b/src/org/w3c/dom/DOMException.java
deleted file mode 100644
index 098c6c5..0000000
--- a/src/org/w3c/dom/DOMException.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * 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;
-
-/**
- * DOM operations only raise exceptions in "exceptional" circumstances, i.e., 
- * when an operation is impossible to perform (either for logical reasons, 
- * because data is lost, or because the implementation has become unstable). 
- * In general, DOM methods return specific error values in ordinary 
- * processing situations, such as out-of-bound errors when using 
- * <code>NodeList</code>. 
- * <p>Implementations should raise other exceptions under other circumstances. 
- * For example, implementations should raise an implementation-dependent 
- * exception if a <code>null</code> argument is passed. 
- * <p>Some languages and object systems do not support the concept of 
- * exceptions. For such systems, error conditions may be indicated using 
- * native error reporting mechanisms. For some bindings, for example, 
- * methods may return error codes similar to those listed in the 
- * corresponding method descriptions.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public class DOMException extends RuntimeException {
-    public DOMException(short code, String message) {
-       super(message);
-       this.code = code;
-    }
-    public short   code;
-    // ExceptionCode
-    /**
-     * If index or size is negative, or greater than the allowed value
-     */
-    public static final short INDEX_SIZE_ERR            = 1;
-    /**
-     * If the specified range of text does not fit into a DOMString
-     */
-    public static final short DOMSTRING_SIZE_ERR        = 2;
-    /**
-     * If any node is inserted somewhere it doesn't belong
-     */
-    public static final short HIERARCHY_REQUEST_ERR     = 3;
-    /**
-     * If a node is used in a different document than the one that created it 
-     * (that doesn't support it)
-     */
-    public static final short WRONG_DOCUMENT_ERR        = 4;
-    /**
-     * If an invalid or illegal character is specified, such as in a name. See 
-     * production 2 in the XML specification for the definition of a legal 
-     * character, and production 5 for the definition of a legal name 
-     * character.
-     */
-    public static final short INVALID_CHARACTER_ERR     = 5;
-    /**
-     * If data is specified for a node which does not support data
-     */
-    public static final short NO_DATA_ALLOWED_ERR       = 6;
-    /**
-     * If an attempt is made to modify an object where modifications are not 
-     * allowed
-     */
-    public static final short NO_MODIFICATION_ALLOWED_ERR = 7;
-    /**
-     * If an attempt is made to reference a node in a context where it does 
-     * not exist
-     */
-    public static final short NOT_FOUND_ERR             = 8;
-    /**
-     * If the implementation does not support the requested type of object or 
-     * operation.
-     */
-    public static final short NOT_SUPPORTED_ERR         = 9;
-    /**
-     * If an attempt is made to add an attribute that is already in use 
-     * elsewhere
-     */
-    public static final short INUSE_ATTRIBUTE_ERR       = 10;
-    /**
-     * If an attempt is made to use an object that is not, or is no longer, 
-     * usable.
-     * @since DOM Level 2
-     */
-    public static final short INVALID_STATE_ERR         = 11;
-    /**
-     * If an invalid or illegal string is specified.
-     * @since DOM Level 2
-     */
-    public static final short SYNTAX_ERR                = 12;
-    /**
-     * If an attempt is made to modify the type of the underlying object.
-     * @since DOM Level 2
-     */
-    public static final short INVALID_MODIFICATION_ERR  = 13;
-    /**
-     * If an attempt is made to create or change an object in a way which is 
-     * incorrect with regard to namespaces.
-     * @since DOM Level 2
-     */
-    public static final short NAMESPACE_ERR             = 14;
-    /**
-     * If a parameter or an operation is not supported by the underlying 
-     * object.
-     * @since DOM Level 2
-     */
-    public static final short INVALID_ACCESS_ERR        = 15;
-
-}
diff --git a/src/org/w3c/dom/DOMImplementation.java b/src/org/w3c/dom/DOMImplementation.java
deleted file mode 100644
index 998af94..0000000
--- a/src/org/w3c/dom/DOMImplementation.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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;
-
-/**
- * The <code>DOMImplementation</code> interface provides a number of methods 
- * for performing operations that are independent of any particular instance 
- * of the document object model.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface DOMImplementation {
-    /**
-     * Test if the DOM implementation implements a specific feature.
-     * @param featureThe name of the feature to test (case-insensitive). The 
-     *   values used by DOM features are defined throughout the DOM Level 2 
-     *   specifications and listed in the  section. The name must be an XML 
-     *   name. To avoid possible conflicts, as a convention, names referring 
-     *   to features defined outside the DOM specification should be made 
-     *   unique by reversing the name of the Internet domain name of the 
-     *   person (or the organization that the person belongs to) who defines 
-     *   the feature, component by component, and using this as a prefix. 
-     *   For instance, the W3C SVG Working Group defines the feature 
-     *   "org.w3c.dom.svg".
-     * @param versionThis is the version number of the feature to test. In 
-     *   Level 2, the string can be either "2.0" or "1.0". If the version is 
-     *   not specified, supporting any version of the feature causes the 
-     *   method to return <code>true</code>.
-     * @return <code>true</code> if the feature is implemented in the 
-     *   specified version, <code>false</code> otherwise.
-     */
-    public boolean hasFeature(String feature, 
-                              String version);
-
-    /**
-     * Creates an empty <code>DocumentType</code> node. Entity declarations 
-     * and notations are not made available. Entity reference expansions and 
-     * default attribute additions do not occur. It is expected that a 
-     * future version of the DOM will provide a way for populating a 
-     * <code>DocumentType</code>.
-     * <br>HTML-only DOM implementations do not need to implement this method.
-     * @param qualifiedNameThe qualified name of the document type to be 
-     *   created. 
-     * @param publicIdThe external subset public identifier.
-     * @param systemIdThe external subset system identifier.
-     * @return A new <code>DocumentType</code> node with 
-     *   <code>Node.ownerDocument</code> set to <code>null</code>.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
-     *   contains an illegal character.
-     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
-     *   malformed.
-     * @since DOM Level 2
-     */
-    public DocumentType createDocumentType(String qualifiedName, 
-                                           String publicId, 
-                                           String systemId)
-                                           throws DOMException;
-
-    /**
-     * Creates an XML <code>Document</code> object of the specified type with 
-     * its document element. HTML-only DOM implementations do not need to 
-     * implement this method.
-     * @param namespaceURIThe namespace URI of the document element to create.
-     * @param qualifiedNameThe qualified name of the document element to be 
-     *   created.
-     * @param doctypeThe type of document to be created or <code>null</code>.
-     *   When <code>doctype</code> is not <code>null</code>, its 
-     *   <code>Node.ownerDocument</code> attribute is set to the document 
-     *   being created.
-     * @return A new <code>Document</code> object.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
-     *   contains an illegal character.
-     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
-     *   malformed, if the <code>qualifiedName</code> has a prefix and the 
-     *   <code>namespaceURI</code> is <code>null</code>, or if the 
-     *   <code>qualifiedName</code> has a prefix that is "xml" and the 
-     *   <code>namespaceURI</code> is different from "
-     *   http://www.w3.org/XML/1998/namespace" .
-     *   <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already 
-     *   been used with a different document or was created from a different 
-     *   implementation.
-     * @since DOM Level 2
-     */
-    public Document createDocument(String namespaceURI, 
-                                   String qualifiedName, 
-                                   DocumentType doctype)
-                                   throws DOMException;
-
-}
diff --git a/src/org/w3c/dom/Document.java b/src/org/w3c/dom/Document.java
deleted file mode 100644
index 5eb2cee..0000000
--- a/src/org/w3c/dom/Document.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * 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;
-
-/**
- * The <code>Document</code> interface represents the entire HTML or XML 
- * document. Conceptually, it is the root of the document tree, and provides 
- * the primary access to the document's data.
- * <p>Since elements, text nodes, comments, processing instructions, etc. 
- * cannot exist outside the context of a <code>Document</code>, the 
- * <code>Document</code> interface also contains the factory methods needed 
- * to create these objects. The <code>Node</code> objects created have a 
- * <code>ownerDocument</code> attribute which associates them with the 
- * <code>Document</code> within whose context they were created.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface Document extends Node {
-    /**
-     * The Document Type Declaration (see <code>DocumentType</code>) 
-     * associated with this document. For HTML documents as well as XML 
-     * documents without a document type declaration this returns 
-     * <code>null</code>. The DOM Level 2 does not support editing the 
-     * Document Type Declaration. <code>docType</code> cannot be altered in 
-     * any way, including through the use of methods inherited from the 
-     * <code>Node</code> interface, such as <code>insertNode</code> or 
-     * <code>removeNode</code>.
-     */
-    public DocumentType getDoctype();
-
-    /**
-     * The <code>DOMImplementation</code> object that handles this document. A 
-     * DOM application may use objects from multiple implementations.
-     */
-    public DOMImplementation getImplementation();
-
-    /**
-     * This is a convenience attribute that allows direct access to the child 
-     * node that is the root element of the document. For HTML documents, 
-     * this is the element with the tagName "HTML".
-     */
-    public Element getDocumentElement();
-
-    /**
-     * Creates an element of the type specified. Note that the instance 
-     * returned implements the <code>Element</code> interface, so attributes 
-     * can be specified directly on the returned object.
-     * <br>In addition, if there are known attributes with default values, 
-     * <code>Attr</code> nodes representing them are automatically created 
-     * and attached to the element.
-     * <br>To create an element with a qualified name and namespace URI, use 
-     * the <code>createElementNS</code> method.
-     * @param tagNameThe name of the element type to instantiate. For XML, 
-     *   this is case-sensitive. For HTML, the <code>tagName</code> 
-     *   parameter may be provided in any case, but it must be mapped to the 
-     *   canonical uppercase form by the DOM implementation. 
-     * @return A new <code>Element</code> object with the 
-     *   <code>nodeName</code> attribute set to <code>tagName</code>, and 
-     *   <code>localName</code>, <code>prefix</code>, and 
-     *   <code>namespaceURI</code> set to <code>null</code>.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public Element createElement(String tagName)
-                                 throws DOMException;
-
-    /**
-     * Creates an empty <code>DocumentFragment</code> object. 
-     * @return A new <code>DocumentFragment</code>.
-     */
-    public DocumentFragment createDocumentFragment();
-
-    /**
-     * Creates a <code>Text</code> node given the specified string.
-     * @param dataThe data for the node.
-     * @return The new <code>Text</code> object.
-     */
-    public Text createTextNode(String data);
-
-    /**
-     * Creates a <code>Comment</code> node given the specified string.
-     * @param dataThe data for the node.
-     * @return The new <code>Comment</code> object.
-     */
-    public Comment createComment(String data);
-
-    /**
-     * Creates a <code>CDATASection</code> node whose value is the specified 
-     * string.
-     * @param dataThe data for the <code>CDATASection</code> contents.
-     * @return The new <code>CDATASection</code> object.
-     * @exception DOMException
-     *   NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
-     */
-    public CDATASection createCDATASection(String data)
-                                           throws DOMException;
-
-    /**
-     * Creates a <code>ProcessingInstruction</code> node given the specified 
-     * name and data strings.
-     * @param targetThe target part of the processing instruction.
-     * @param dataThe data for the node.
-     * @return The new <code>ProcessingInstruction</code> object.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified target contains an 
-     *   illegal character.
-     *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
-     */
-    public ProcessingInstruction createProcessingInstruction(String target, 
-                                                             String data)
-                                                             throws DOMException;
-
-    /**
-     * Creates an <code>Attr</code> of the given name. Note that the 
-     * <code>Attr</code> instance can then be set on an <code>Element</code> 
-     * using the <code>setAttributeNode</code> method. 
-     * <br>To create an attribute with a qualified name and namespace URI, use 
-     * the <code>createAttributeNS</code> method.
-     * @param nameThe name of the attribute.
-     * @return A new <code>Attr</code> object with the <code>nodeName</code> 
-     *   attribute set to <code>name</code>, and <code>localName</code>, 
-     *   <code>prefix</code>, and <code>namespaceURI</code> set to 
-     *   <code>null</code>. The value of the attribute is the empty string.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     */
-    public Attr createAttribute(String name)
-                                throws DOMException;
-
-    /**
-     * Creates an <code>EntityReference</code> object. In addition, if the 
-     * referenced entity is known, the child list of the 
-     * <code>EntityReference</code> node is made the same as that of the 
-     * corresponding <code>Entity</code> node.If any descendant of the 
-     * <code>Entity</code> node has an unbound namespace prefix, the 
-     * corresponding descendant of the created <code>EntityReference</code> 
-     * node is also unbound; (its <code>namespaceURI</code> is 
-     * <code>null</code>). The DOM Level 2 does not support any mechanism to 
-     * resolve namespace prefixes.
-     * @param nameThe name of the entity to reference. 
-     * @return The new <code>EntityReference</code> object.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
-     */
-    public EntityReference createEntityReference(String name)
-                                                 throws DOMException;
-
-    /**
-     * Returns a <code>NodeList</code> of all the <code>Elements</code> with a 
-     * given tag name in the order in which they are encountered in a 
-     * preorder traversal of the <code>Document</code> tree. 
-     * @param tagnameThe name of the tag to match on. The special value "*" 
-     *   matches all tags.
-     * @return A new <code>NodeList</code> object containing all the matched 
-     *   <code>Elements</code>.
-     */
-    public NodeList getElementsByTagName(String tagname);
-
-    /**
-     * Imports a node from another document to this document. The returned 
-     * node has no parent; (<code>parentNode</code> is <code>null</code>). 
-     * The source node is not altered or removed from the original document; 
-     * this method creates a new copy of the source node.
-     * <br>For all nodes, importing a node creates a node object owned by the 
-     * importing document, with attribute values identical to the source 
-     * node's <code>nodeName</code> and <code>nodeType</code>, plus the 
-     * attributes related to namespaces (<code>prefix</code>, 
-     * <code>localName</code>, and <code>namespaceURI</code>). As in the 
-     * <code>cloneNode</code> operation on a <code>Node</code>, the source 
-     * node is not altered.
-     * <br>Additional information is copied as appropriate to the 
-     * <code>nodeType</code>, attempting to mirror the behavior expected if 
-     * a fragment of XML or HTML source was copied from one document to 
-     * another, recognizing that the two documents may have different DTDs 
-     * in the XML case. The following list describes the specifics for each 
-     * type of node. 
-     * <dl>
-     * <dt>ATTRIBUTE_NODE</dt>
-     * <dd>The <code>ownerElement</code> attribute 
-     * is set to <code>null</code> and the <code>specified</code> flag is 
-     * set to <code>true</code> on the generated <code>Attr</code>. The 
-     * descendants of the source <code>Attr</code> are recursively imported 
-     * and the resulting nodes reassembled to form the corresponding subtree.
-     * Note that the <code>deep</code> parameter has no effect on 
-     * <code>Attr</code> nodes; they always carry their children with them 
-     * when imported.</dd>
-     * <dt>DOCUMENT_FRAGMENT_NODE</dt>
-     * <dd>If the <code>deep</code> option 
-     * was set to <code>true</code>, the descendants of the source element 
-     * are recursively imported and the resulting nodes reassembled to form 
-     * the corresponding subtree. Otherwise, this simply generates an empty 
-     * <code>DocumentFragment</code>.</dd>
-     * <dt>DOCUMENT_NODE</dt>
-     * <dd><code>Document</code> 
-     * nodes cannot be imported.</dd>
-     * <dt>DOCUMENT_TYPE_NODE</dt>
-     * <dd><code>DocumentType</code> 
-     * nodes cannot be imported.</dd>
-     * <dt>ELEMENT_NODE</dt>
-     * <dd>Specified attribute nodes of the 
-     * source element are imported, and the generated <code>Attr</code> 
-     * nodes are attached to the generated <code>Element</code>. Default 
-     * attributes are not copied, though if the document being imported into 
-     * defines default attributes for this element name, those are assigned. 
-     * If the <code>importNode</code> <code>deep</code> parameter was set to 
-     * <code>true</code>, the descendants of the source element are 
-     * recursively imported and the resulting nodes reassembled to form the 
-     * corresponding subtree.</dd>
-     * <dt>ENTITY_NODE</dt>
-     * <dd><code>Entity</code> nodes can be 
-     * imported, however in the current release of the DOM the 
-     * <code>DocumentType</code> is readonly. Ability to add these imported 
-     * nodes to a <code>DocumentType</code> will be considered for addition 
-     * to a future release of the DOM.On import, the <code>publicId</code>, 
-     * <code>systemId</code>, and <code>notationName</code> attributes are 
-     * copied. If a <code>deep</code> import is requested, the descendants 
-     * of the the source <code>Entity</code> are recursively imported and 
-     * the resulting nodes reassembled to form the corresponding subtree.</dd>
-     * <dt>
-     * ENTITY_REFERENCE_NODE</dt>
-     * <dd>Only the <code>EntityReference</code> itself is 
-     * copied, even if a <code>deep</code> import is requested, since the 
-     * source and destination documents might have defined the entity 
-     * differently. If the document being imported into provides a 
-     * definition for this entity name, its value is assigned.</dd>
-     * <dt>NOTATION_NODE</dt>
-     * <dd>
-     * <code>Notation</code> nodes can be imported, however in the current 
-     * release of the DOM the <code>DocumentType</code> is readonly. Ability 
-     * to add these imported nodes to a <code>DocumentType</code> will be 
-     * considered for addition to a future release of the DOM.On import, the 
-     * <code>publicId</code> and <code>systemId</code> attributes are copied.
-     * Note that the <code>deep</code> parameter has no effect on 
-     * <code>Notation</code> nodes since they never have any children.</dd>
-     * <dt>
-     * PROCESSING_INSTRUCTION_NODE</dt>
-     * <dd>The imported node copies its 
-     * <code>target</code> and <code>data</code> values from those of the 
-     * source node.</dd>
-     * <dt>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE</dt>
-     * <dd>These three 
-     * types of nodes inheriting from <code>CharacterData</code> copy their 
-     * <code>data</code> and <code>length</code> attributes from those of 
-     * the source node.</dd>
-     *  
-     * @param importedNodeThe node to import.
-     * @param deepIf <code>true</code>, recursively import the subtree under 
-     *   the specified node; if <code>false</code>, import only the node 
-     *   itself, as explained above. This has no effect on <code>Attr</code>
-     *   , <code>EntityReference</code>, and <code>Notation</code> nodes.
-     * @return The imported node that belongs to this <code>Document</code>.
-     * @exception DOMException
-     *   NOT_SUPPORTED_ERR: Raised if the type of node being imported is not 
-     *   supported.
-     * @since DOM Level 2
-     */
-    public Node importNode(Node importedNode, 
-                           boolean deep)
-                           throws DOMException;
-
-    /**
-     * Creates an element of the given qualified name and namespace URI. 
-     * HTML-only DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the element to create.
-     * @param qualifiedNameThe qualified name of the element type to 
-     *   instantiate.
-     * @return A new <code>Element</code> object with the following 
-     *   attributes:AttributeValue<code>Node.nodeName</code>
-     *   <code>qualifiedName</code><code>Node.namespaceURI</code>
-     *   <code>namespaceURI</code><code>Node.prefix</code>prefix, extracted 
-     *   from <code>qualifiedName</code>, or <code>null</code> if there is 
-     *   no prefix<code>Node.localName</code>local name, extracted from 
-     *   <code>qualifiedName</code><code>Element.tagName</code>
-     *   <code>qualifiedName</code>
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
-     *   contains an illegal character.
-     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
-     *   malformed, if the <code>qualifiedName</code> has a prefix and the 
-     *   <code>namespaceURI</code> is <code>null</code>, or if the 
-     *   <code>qualifiedName</code> has a prefix that is "xml" and the 
-     *   <code>namespaceURI</code> is different from "
-     *   http://www.w3.org/XML/1998/namespace" .
-     * @since DOM Level 2
-     */
-    public Element createElementNS(String namespaceURI, 
-                                   String qualifiedName)
-                                   throws DOMException;
-
-    /**
-     * Creates an attribute of the given qualified name and namespace URI. 
-     * HTML-only DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the attribute to create.
-     * @param qualifiedNameThe qualified name of the attribute to instantiate.
-     * @return A new <code>Attr</code> object with the following attributes:
-     *   AttributeValue<code>Node.nodeName</code>qualifiedName
-     *   <code>Node.namespaceURI</code><code>namespaceURI</code>
-     *   <code>Node.prefix</code>prefix, extracted from 
-     *   <code>qualifiedName</code>, or <code>null</code> if there is no 
-     *   prefix<code>Node.localName</code>local name, extracted from 
-     *   <code>qualifiedName</code><code>Attr.name</code>
-     *   <code>qualifiedName</code><code>Node.nodeValue</code>the empty 
-     *   string
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
-     *   contains an illegal character.
-     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
-     *   malformed, if the <code>qualifiedName</code> has a prefix and the 
-     *   <code>namespaceURI</code> is <code>null</code>, if the 
-     *   <code>qualifiedName</code> has a prefix that is "xml" and the 
-     *   <code>namespaceURI</code> is different from "
-     *   http://www.w3.org/XML/1998/namespace", or if the 
-     *   <code>qualifiedName</code> is "xmlns" and the 
-     *   <code>namespaceURI</code> is different from "
-     *   http://www.w3.org/2000/xmlns/".
-     * @since DOM Level 2
-     */
-    public Attr createAttributeNS(String namespaceURI, 
-                                  String qualifiedName)
-                                  throws DOMException;
-
-    /**
-     * Returns a <code>NodeList</code> of all the <code>Elements</code> with a 
-     * given local name and namespace URI in the order in which they are 
-     * encountered in a preorder traversal of the <code>Document</code> tree.
-     * @param namespaceURIThe namespace URI of the elements to match on. The 
-     *   special value "*" matches all namespaces.
-     * @param localNameThe local name of the elements to match on. The 
-     *   special value "*" matches all local names.
-     * @return A new <code>NodeList</code> object containing all the matched 
-     *   <code>Elements</code>.
-     * @since DOM Level 2
-     */
-    public NodeList getElementsByTagNameNS(String namespaceURI, 
-                                           String localName);
-
-    /**
-     * Returns the <code>Element</code> whose <code>ID</code> is given by 
-     * <code>elementId</code>. If no such element exists, returns 
-     * <code>null</code>. Behavior is not defined if more than one element 
-     * has this <code>ID</code>. The DOM implementation must have 
-     * information that says which attributes are of type ID. Attributes 
-     * with the name "ID" are not of type ID unless so defined. 
-     * Implementations that do not know whether attributes are of type ID or 
-     * not are expected to return <code>null</code>.
-     * @param elementIdThe unique <code>id</code> value for an element.
-     * @return The matching element.
-     * @since DOM Level 2
-     */
-    public Element getElementById(String elementId);
-
-}
diff --git a/src/org/w3c/dom/DocumentFragment.java b/src/org/w3c/dom/DocumentFragment.java
deleted file mode 100644
index 6ade30c..0000000
--- a/src/org/w3c/dom/DocumentFragment.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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;
-
-/**
- * <code>DocumentFragment</code> is a "lightweight" or "minimal" 
- * <code>Document</code> object. It is very common to want to be able to 
- * extract a portion of a document's tree or to create a new fragment of a 
- * document. Imagine implementing a user command like cut or rearranging a 
- * document by moving fragments around. It is desirable to have an object 
- * which can hold such fragments and it is quite natural to use a Node for 
- * this purpose. While it is true that a <code>Document</code> object could 
- * fulfill this role, a <code>Document</code> object can potentially be a 
- * heavyweight object, depending on the underlying implementation. What is 
- * really needed for this is a very lightweight object. 
- * <code>DocumentFragment</code> is such an object.
- * <p>Furthermore, various operations -- such as inserting nodes as children 
- * of another <code>Node</code> -- may take <code>DocumentFragment</code> 
- * objects as arguments; this results in all the child nodes of the 
- * <code>DocumentFragment</code> being moved to the child list of this node.
- * <p>The children of a <code>DocumentFragment</code> node are zero or more 
- * nodes representing the tops of any sub-trees defining the structure of 
- * the document. <code>DocumentFragment</code> nodes do not need to be 
- * well-formed XML documents (although they do need to follow the rules 
- * imposed upon well-formed XML parsed entities, which can have multiple top 
- * nodes). For example, a <code>DocumentFragment</code> might have only one 
- * child and that child node could be a <code>Text</code> node. Such a 
- * structure model represents neither an HTML document nor a well-formed XML 
- * document.
- * <p>When a <code>DocumentFragment</code> is inserted into a 
- * <code>Document</code> (or indeed any other <code>Node</code> that may 
- * take children) the children of the <code>DocumentFragment</code> and not 
- * the <code>DocumentFragment</code> itself are inserted into the 
- * <code>Node</code>. This makes the <code>DocumentFragment</code> very 
- * useful when the user wishes to create nodes that are siblings; the 
- * <code>DocumentFragment</code> acts as the parent of these nodes so that 
- * the user can use the standard methods from the <code>Node</code> 
- * interface, such as <code>insertBefore</code> and <code>appendChild</code>.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface DocumentFragment extends Node {
-}
diff --git a/src/org/w3c/dom/DocumentType.java b/src/org/w3c/dom/DocumentType.java
deleted file mode 100644
index 4cdb723..0000000
--- a/src/org/w3c/dom/DocumentType.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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;
-
-/**
- * Each <code>Document</code> has a <code>doctype</code> attribute whose value 
- * is either <code>null</code> or a <code>DocumentType</code> object. The 
- * <code>DocumentType</code> interface in the DOM Core provides an interface 
- * to the list of entities that are defined for the document, and little 
- * else because the effect of namespaces and the various XML schema efforts 
- * on DTD representation are not clearly understood as of this writing.
- * <p>The DOM Level 2 doesn't support editing <code>DocumentType</code> nodes.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface DocumentType extends Node {
-    /**
-     * The name of DTD; i.e., the name immediately following the 
-     * <code>DOCTYPE</code> keyword.
-     */
-    public String getName();
-
-    /**
-     * A <code>NamedNodeMap</code> containing the general entities, both 
-     * external and internal, declared in the DTD. Parameter entities are 
-     * not contained. Duplicates are discarded. For example in: 
-     * <pre>&lt;!DOCTYPE 
-     * ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo "foo"&gt; &lt;!ENTITY bar 
-     * "bar"&gt; &lt;!ENTITY bar "bar2"&gt; &lt;!ENTITY % baz "baz"&gt; 
-     * ]&gt; &lt;ex/&gt;</pre>
-     *  the interface provides access to <code>foo</code> 
-     * and the first declaration of <code>bar</code> but not the second 
-     * declaration of <code>bar</code> or <code>baz</code>. Every node in 
-     * this map also implements the <code>Entity</code> interface.
-     * <br>The DOM Level 2 does not support editing entities, therefore 
-     * <code>entities</code> cannot be altered in any way.
-     */
-    public NamedNodeMap getEntities();
-
-    /**
-     * A <code>NamedNodeMap</code> containing the notations declared in the 
-     * DTD. Duplicates are discarded. Every node in this map also implements 
-     * the <code>Notation</code> interface.
-     * <br>The DOM Level 2 does not support editing notations, therefore 
-     * <code>notations</code> cannot be altered in any way.
-     */
-    public NamedNodeMap getNotations();
-
-    /**
-     * The public identifier of the external subset.
-     * @since DOM Level 2
-     */
-    public String getPublicId();
-
-    /**
-     * The system identifier of the external subset.
-     * @since DOM Level 2
-     */
-    public String getSystemId();
-
-    /**
-     * The internal subset as a string.The actual content returned depends on 
-     * how much information is available to the implementation. This may 
-     * vary depending on various parameters, including the XML processor 
-     * used to build the document.
-     * @since DOM Level 2
-     */
-    public String getInternalSubset();
-
-}
diff --git a/src/org/w3c/dom/Element.java b/src/org/w3c/dom/Element.java
deleted file mode 100644
index d0df6ce..0000000
--- a/src/org/w3c/dom/Element.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * 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;
-
-/**
- * The <code>Element</code> interface represents an element in an HTML or XML 
- * document. Elements may have attributes associated with them; since the 
- * <code>Element</code> interface inherits from <code>Node</code>, the 
- * generic <code>Node</code> interface attribute <code>attributes</code> may 
- * be used to retrieve the set of all attributes for an element. There are 
- * methods on the <code>Element</code> interface to retrieve either an 
- * <code>Attr</code> object by name or an attribute value by name. In XML, 
- * where an attribute value may contain entity references, an 
- * <code>Attr</code> object should be retrieved to examine the possibly 
- * fairly complex sub-tree representing the attribute value. On the other 
- * hand, in HTML, where all attributes have simple string values, methods to 
- * directly access an attribute value can safely be used as a convenience.In 
- * DOM Level 2, the method <code>normalize</code> is inherited from the 
- * <code>Node</code> interface where it was moved.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface Element extends Node {
-    /**
-     * The name of the element. For example, in: 
-     * <pre> &lt;elementExample 
-     * id="demo"&gt; ... &lt;/elementExample&gt; , </pre>
-     *  <code>tagName</code> has 
-     * the value <code>"elementExample"</code>. Note that this is 
-     * case-preserving in XML, as are all of the operations of the DOM. The 
-     * HTML DOM returns the <code>tagName</code> of an HTML element in the 
-     * canonical uppercase form, regardless of the case in the source HTML 
-     * document. 
-     */
-    public String getTagName();
-
-    /**
-     * Retrieves an attribute value by name.
-     * @param nameThe name of the attribute to retrieve.
-     * @return The <code>Attr</code> value as a string, or the empty string 
-     *   if that attribute does not have a specified or default value.
-     */
-    public String getAttribute(String name);
-
-    /**
-     * Adds a new attribute. If an attribute with that name is already present 
-     * in the element, its value is changed to be that of the value 
-     * parameter. This value is a simple string; it is not parsed as it is 
-     * being set. So any markup (such as syntax to be recognized as an 
-     * entity reference) is treated as literal text, and needs to be 
-     * appropriately escaped by the implementation when it is written out. 
-     * In order to assign an attribute value that contains entity 
-     * references, the user must create an <code>Attr</code> node plus any 
-     * <code>Text</code> and <code>EntityReference</code> nodes, build the 
-     * appropriate subtree, and use <code>setAttributeNode</code> to assign 
-     * it as the value of an attribute.
-     * <br>To set an attribute with a qualified name and namespace URI, use 
-     * the <code>setAttributeNS</code> method.
-     * @param nameThe name of the attribute to create or alter.
-     * @param valueValue to set in string form.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an 
-     *   illegal character.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     */
-    public void setAttribute(String name, 
-                             String value)
-                             throws DOMException;
-
-    /**
-     * Removes an attribute by name. If the removed attribute is known to have 
-     * a default value, an attribute immediately appears containing the 
-     * default value as well as the corresponding namespace URI, local name, 
-     * and prefix when applicable.
-     * <br>To remove an attribute by local name and namespace URI, use the 
-     * <code>removeAttributeNS</code> method.
-     * @param nameThe name of the attribute to remove.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     */
-    public void removeAttribute(String name)
-                                throws DOMException;
-
-    /**
-     * Retrieves an attribute node by name.
-     * <br>To retrieve an attribute node by qualified name and namespace URI, 
-     * use the <code>getAttributeNodeNS</code> method.
-     * @param nameThe name (<code>nodeName</code>) of the attribute to 
-     *   retrieve.
-     * @return The <code>Attr</code> node with the specified name (
-     *   <code>nodeName</code>) or <code>null</code> if there is no such 
-     *   attribute.
-     */
-    public Attr getAttributeNode(String name);
-
-    /**
-     * Adds a new attribute node. If an attribute with that name (
-     * <code>nodeName</code>) is already present in the element, it is 
-     * replaced by the new one.
-     * <br>To add a new attribute node with a qualified name and namespace 
-     * URI, use the <code>setAttributeNodeNS</code> method.
-     * @param newAttrThe <code>Attr</code> node to add to the attribute list.
-     * @return If the <code>newAttr</code> attribute replaces an existing 
-     *   attribute, the replaced <code>Attr</code> node is returned, 
-     *   otherwise <code>null</code> is returned.
-     * @exception DOMException
-     *   WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a 
-     *   different document than the one that created the element.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an 
-     *   attribute of another <code>Element</code> object. The DOM user must 
-     *   explicitly clone <code>Attr</code> nodes to re-use them in other 
-     *   elements.
-     */
-    public Attr setAttributeNode(Attr newAttr)
-                                 throws DOMException;
-
-    /**
-     * Removes the specified attribute node. If the removed <code>Attr</code> 
-     * has a default value it is immediately replaced. The replacing 
-     * attribute has the same namespace URI and local name, as well as the 
-     * original prefix, when applicable.
-     * @param oldAttrThe <code>Attr</code> node to remove from the attribute 
-     *   list.
-     * @return The <code>Attr</code> node that was removed.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     *   <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute 
-     *   of the element.
-     */
-    public Attr removeAttributeNode(Attr oldAttr)
-                                    throws DOMException;
-
-    /**
-     * Returns a <code>NodeList</code> of all descendant <code>Elements</code> 
-     * with a given tag name, in the order in which they are encountered in 
-     * a preorder traversal of this <code>Element</code> tree.
-     * @param nameThe name of the tag to match on. The special value "*" 
-     *   matches all tags.
-     * @return A list of matching <code>Element</code> nodes.
-     */
-    public NodeList getElementsByTagName(String name);
-
-    /**
-     * Retrieves an attribute value by local name and namespace URI. HTML-only 
-     * DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the attribute to retrieve.
-     * @param localNameThe local name of the attribute to retrieve.
-     * @return The <code>Attr</code> value as a string, or the empty string 
-     *   if that attribute does not have a specified or default value.
-     * @since DOM Level 2
-     */
-    public String getAttributeNS(String namespaceURI, 
-                                 String localName);
-
-    /**
-     * Adds a new attribute. If an attribute with the same local name and 
-     * namespace URI is already present on the element, its prefix is 
-     * changed to be the prefix part of the <code>qualifiedName</code>, and 
-     * its value is changed to be the <code>value</code> parameter. This 
-     * value is a simple string; it is not parsed as it is being set. So any 
-     * markup (such as syntax to be recognized as an entity reference) is 
-     * treated as literal text, and needs to be appropriately escaped by the 
-     * implementation when it is written out. In order to assign an 
-     * attribute value that contains entity references, the user must create 
-     * an <code>Attr</code> node plus any <code>Text</code> and 
-     * <code>EntityReference</code> nodes, build the appropriate subtree, 
-     * and use <code>setAttributeNodeNS</code> or 
-     * <code>setAttributeNode</code> to assign it as the value of an 
-     * attribute.
-     * <br>HTML-only DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the attribute to create or 
-     *   alter.
-     * @param qualifiedNameThe qualified name of the attribute to create or 
-     *   alter.
-     * @param valueThe value to set in string form.
-     * @exception DOMException
-     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name 
-     *   contains an illegal character.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is 
-     *   malformed, if the <code>qualifiedName</code> has a prefix and the 
-     *   <code>namespaceURI</code> is <code>null</code>, if the 
-     *   <code>qualifiedName</code> has a prefix that is "xml" and the 
-     *   <code>namespaceURI</code> is different from "
-     *   http://www.w3.org/XML/1998/namespace", or if the 
-     *   <code>qualifiedName</code> is "xmlns" and the 
-     *   <code>namespaceURI</code> is different from "
-     *   http://www.w3.org/2000/xmlns/".
-     * @since DOM Level 2
-     */
-    public void setAttributeNS(String namespaceURI, 
-                               String qualifiedName, 
-                               String value)
-                               throws DOMException;
-
-    /**
-     * Removes an attribute by local name and namespace URI. If the removed 
-     * attribute has a default value it is immediately replaced. The 
-     * replacing attribute has the same namespace URI and local name, as 
-     * well as the original prefix.
-     * <br>HTML-only DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the attribute to remove.
-     * @param localNameThe local name of the attribute to remove.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     * @since DOM Level 2
-     */
-    public void removeAttributeNS(String namespaceURI, 
-                                  String localName)
-                                  throws DOMException;
-
-    /**
-     * Retrieves an <code>Attr</code> node by local name and namespace URI. 
-     * HTML-only DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the attribute to retrieve.
-     * @param localNameThe local name of the attribute to retrieve.
-     * @return The <code>Attr</code> node with the specified attribute local 
-     *   name and namespace URI or <code>null</code> if there is no such 
-     *   attribute.
-     * @since DOM Level 2
-     */
-    public Attr getAttributeNodeNS(String namespaceURI, 
-                                   String localName);
-
-    /**
-     * Adds a new attribute. If an attribute with that local name and that 
-     * namespace URI is already present in the element, it is replaced by 
-     * the new one.
-     * <br>HTML-only DOM implementations do not need to implement this method.
-     * @param newAttrThe <code>Attr</code> node to add to the attribute list.
-     * @return If the <code>newAttr</code> attribute replaces an existing 
-     *   attribute with the same local name and namespace URI, the replaced 
-     *   <code>Attr</code> node is returned, otherwise <code>null</code> is 
-     *   returned.
-     * @exception DOMException
-     *   WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a 
-     *   different document than the one that created the element.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     *   <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an 
-     *   attribute of another <code>Element</code> object. The DOM user must 
-     *   explicitly clone <code>Attr</code> nodes to re-use them in other 
-     *   elements.
-     * @since DOM Level 2
-     */
-    public Attr setAttributeNodeNS(Attr newAttr)
-                                   throws DOMException;
-
-    /**
-     * Returns a <code>NodeList</code> of all the descendant 
-     * <code>Elements</code> with a given local name and namespace URI in 
-     * the order in which they are encountered in a preorder traversal of 
-     * this <code>Element</code> tree.
-     * <br>HTML-only DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the elements to match on. The 
-     *   special value "*" matches all namespaces.
-     * @param localNameThe local name of the elements to match on. The 
-     *   special value "*" matches all local names.
-     * @return A new <code>NodeList</code> object containing all the matched 
-     *   <code>Elements</code>.
-     * @since DOM Level 2
-     */
-    public NodeList getElementsByTagNameNS(String namespaceURI, 
-                                           String localName);
-
-    /**
-     * Returns <code>true</code> when an attribute with a given name is 
-     * specified on this element or has a default value, <code>false</code> 
-     * otherwise.
-     * @param nameThe name of the attribute to look for.
-     * @return <code>true</code> if an attribute with the given name is 
-     *   specified on this element or has a default value, <code>false</code>
-     *    otherwise.
-     * @since DOM Level 2
-     */
-    public boolean hasAttribute(String name);
-
-    /**
-     * Returns <code>true</code> when an attribute with a given local name and 
-     * namespace URI is specified on this element or has a default value, 
-     * <code>false</code> otherwise. HTML-only DOM implementations do not 
-     * need to implement this method.
-     * @param namespaceURIThe namespace URI of the attribute to look for.
-     * @param localNameThe local name of the attribute to look for.
-     * @return <code>true</code> if an attribute with the given local name 
-     *   and namespace URI is specified or has a default value on this 
-     *   element, <code>false</code> otherwise.
-     * @since DOM Level 2
-     */
-    public boolean hasAttributeNS(String namespaceURI, 
-                                  String localName);
-
-}
diff --git a/src/org/w3c/dom/Entity.java b/src/org/w3c/dom/Entity.java
deleted file mode 100644
index ecbf6a9..0000000
--- a/src/org/w3c/dom/Entity.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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;
-
-/**
- * This interface represents an entity, either parsed or unparsed, in an XML 
- * document. Note that this models the entity itself not the entity 
- * declaration. <code>Entity</code> declaration modeling has been left for a 
- * later Level of the DOM specification.
- * <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 
- * external parameter entities. This means that parsed entities declared in 
- * the external subset need not be expanded by some classes of applications, 
- * and that the replacement value of the entity may not be available. When 
- * the replacement value is available, the corresponding <code>Entity</code> 
- * node's child list represents the structure of that replacement text. 
- * Otherwise, the child list is empty.
- * <p>The DOM Level 2 does not support editing <code>Entity</code> nodes; if a 
- * user wants to make changes to the contents of an <code>Entity</code>, 
- * every related <code>EntityReference</code> node has to be replaced in the 
- * structure model by a clone of the <code>Entity</code>'s contents, and 
- * then the desired changes must be made to each of those clones instead. 
- * <code>Entity</code> nodes and all their descendants are readonly.
- * <p>An <code>Entity</code> node does not have any parent.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. The DOM Level 2 does not support any mechanism to resolve 
- * namespace prefixes.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface Entity extends Node {
-    /**
-     * The public identifier associated with the entity, if specified. If the 
-     * public identifier was not specified, this is <code>null</code>.
-     */
-    public String getPublicId();
-
-    /**
-     * The system identifier associated with the entity, if specified. If the 
-     * system identifier was not specified, this is <code>null</code>.
-     */
-    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();
-
-}
diff --git a/src/org/w3c/dom/EntityReference.java b/src/org/w3c/dom/EntityReference.java
deleted file mode 100644
index ff3cf9d..0000000
--- a/src/org/w3c/dom/EntityReference.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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;
-
-/**
- * <code>EntityReference</code> objects may be inserted into the structure 
- * model when an entity reference is in the source document, or when the 
- * user wishes to insert an entity reference. Note that character references 
- * and references to predefined entities are considered to be expanded by 
- * the HTML or XML processor so that characters are represented by their 
- * Unicode equivalent rather than by an entity reference. Moreover, the XML 
- * processor may completely expand references to entities while building the 
- * structure model, instead of providing <code>EntityReference</code> 
- * objects. If it does provide such objects, then for a given 
- * <code>EntityReference</code> node, it may be that there is no 
- * <code>Entity</code> node representing the referenced entity. If such an 
- * <code>Entity</code> exists, then the subtree of the 
- * <code>EntityReference</code> node is in general a copy of the 
- * <code>Entity</code> node subtree. However, this may not be true when an 
- * entity contains an unbound 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.
- * <p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes and 
- * all their descendants are readonly.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface EntityReference extends Node {
-}
diff --git a/src/org/w3c/dom/NamedNodeMap.java b/src/org/w3c/dom/NamedNodeMap.java
deleted file mode 100644
index 6ab713c..0000000
--- a/src/org/w3c/dom/NamedNodeMap.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * 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;
-
-/**
- * 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/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
- */
-public interface NamedNodeMap {
-    /**
-     * Retrieves a node specified by name.
-     * @param nameThe <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.
-     * <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 argA 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.
-     */
-    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 nameThe <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 indexIndex 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. HTML-only 
-     * DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the node to retrieve.
-     * @param localNameThe 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.
-     * @since DOM Level 2
-     */
-    public Node getNamedItemNS(String namespaceURI, 
-                               String localName);
-
-    /**
-     * 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.
-     * <br>HTML-only DOM implementations do not need to implement this method.
-     * @param argA 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.
-     * @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>HTML-only DOM implementations do not need to implement this method.
-     * @param namespaceURIThe namespace URI of the node to remove.
-     * @param localNameThe 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.
-     * @since DOM Level 2
-     */
-    public Node removeNamedItemNS(String namespaceURI, 
-                                  String localName)
-                                  throws DOMException;
-
-}
diff --git a/src/org/w3c/dom/Node.java b/src/org/w3c/dom/Node.java
deleted file mode 100644
index 1567efa..0000000
--- a/src/org/w3c/dom/Node.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * 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;
-
-/**
- * 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 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.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     * @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;
-    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.
-     * @param newChildThe node to insert.
-     * @param refChildThe 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.
-     *   <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.
-     */
-    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.
-     * @param newChildThe new node to put in the child list.
-     * @param oldChildThe 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.
-     *   <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.
-     */
-    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 oldChildThe 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.
-     */
-    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 newChildThe 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.
-     *   <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.
-     */
-    public Node appendChild(Node newChild)
-                            throws DOMException;
-
-    /**
-     * Returns whether this node has any children.
-     * @return  <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>.).
-     * <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 text it 
-     * contains unless it is a deep clone, since the text is contained in a 
-     * child <code>Text</code> node. Cloning an <code>Attribute</code> 
-     * directly, as opposed to be cloned as part of an <code>Element</code> 
-     * cloning operation, returns a specified attribute (
-     * <code>specified</code> is <code>true</code>). Cloning any other type 
-     * of node simply returns a copy of this node.
-     * <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 deepIf <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  lookups) that depend on a particular document tree 
-     * structure are to be used.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 2
-     */
-    public void normalize();
-
-    /**
-     * Tests whether the DOM implementation implements a specific feature and 
-     * that feature is supported by this node.
-     * @param featureThe name of the feature to test. This is the same name 
-     *   which can be passed to the method <code>hasFeature</code> on 
-     *   <code>DOMImplementation</code>.
-     * @param versionThis is the version number of the feature to test. In 
-     *   Level 2, version 1, this is the string "2.0". If the version is not 
-     *   specified, supporting any version of the feature will cause the 
-     *   method to return <code>true</code>.
-     * @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.
-     * <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>createElement</code> from the 
-     * <code>Document</code> interface, this is always <code>null</code>.Per 
-     * the Namespaces in XML Specification  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.
-     * <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>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.
-     *   <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
-     *   <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is 
-     *   malformed, if the <code>namespaceURI</code> of this node is 
-     *   <code>null</code>, if the specified prefix is "xml" and the 
-     *   <code>namespaceURI</code> of this node is different from "
-     *   http://www.w3.org/XML/1998/namespace", if this node is an attribute 
-     *   and the specified prefix is "xmlns" and the 
-     *   <code>namespaceURI</code> of this node is different from "
-     *   http://www.w3.org/2000/xmlns/", or if this node is an attribute and 
-     *   the <code>qualifiedName</code> of this node is "xmlns" .
-     * @since DOM Level 2
-     */
-    public String getPrefix();
-    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>createElement</code> from the 
-     * <code>Document</code> interface, 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 <code>true</code> if this node has any attributes, 
-     *   <code>false</code> otherwise.
-     * @since DOM Level 2
-     */
-    public boolean hasAttributes();
-
-}
diff --git a/src/org/w3c/dom/NodeList.java b/src/org/w3c/dom/NodeList.java
deleted file mode 100644
index 4f3ec9a..0000000
--- a/src/org/w3c/dom/NodeList.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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;
-
-/**
- * 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/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 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 indexIndex 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();
-
-}
diff --git a/src/org/w3c/dom/Notation.java b/src/org/w3c/dom/Notation.java
deleted file mode 100644
index 186836d..0000000
--- a/src/org/w3c/dom/Notation.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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;
-
-/**
- * This interface represents a notation declared in the DTD. A notation either 
- * declares, by name, the format of an unparsed entity (see section 4.7 of 
- * the XML 1.0 specification ), or is used for formal declaration of 
- * processing instruction targets (see section 2.6 of the XML 1.0 
- * specification ). The <code>nodeName</code> attribute inherited from 
- * <code>Node</code> is set to the declared name of the notation.
- * <p>The DOM Level 1 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/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 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>.
-     */
-    public String getSystemId();
-
-}
diff --git a/src/org/w3c/dom/ProcessingInstruction.java b/src/org/w3c/dom/ProcessingInstruction.java
deleted file mode 100644
index f84fdf2..0000000
--- a/src/org/w3c/dom/ProcessingInstruction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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;
-
-/**
- * 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>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 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>?&gt;</code>.
-     * @exception DOMException
-     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
-     */
-    public String getData();
-    public void setData(String data)
-                          throws DOMException;
-
-}
diff --git a/src/org/w3c/dom/Text.java b/src/org/w3c/dom/Text.java
deleted file mode 100644
index e415e80..0000000
--- a/src/org/w3c/dom/Text.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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;
-
-/**
- * The <code>Text</code> interface inherits from <code>CharacterData</code> 
- * and represents the textual content (termed character data 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>normalize()</code> method on <code>Node</code> merges any such 
- * adjacent <code>Text</code> objects into a single node for each block of 
- * text.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 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 offsetThe 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;
-
-}
diff --git a/src/org/w3c/dom/events/DocumentEvent.java b/src/org/w3c/dom/events/DocumentEvent.java
deleted file mode 100644
index 43cd1ac..0000000
--- a/src/org/w3c/dom/events/DocumentEvent.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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 eventTypeThe <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;
-
-}
diff --git a/src/org/w3c/dom/events/Event.java b/src/org/w3c/dom/events/Event.java
deleted file mode 100644
index f2baad6..0000000
--- a/src/org/w3c/dom/events/Event.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * 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 eventTypeArgSpecifies 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 canBubbleArgSpecifies whether or not the event can bubble.
-     * @param cancelableArgSpecifies whether or not the event's default 
-     *   action can be prevented.
-     */
-    public void initEvent(String eventTypeArg, 
-                          boolean canBubbleArg, 
-                          boolean cancelableArg);
-
-}
diff --git a/src/org/w3c/dom/events/EventException.java b/src/org/w3c/dom/events/EventException.java
deleted file mode 100644
index 7a6ff26..0000000
--- a/src/org/w3c/dom/events/EventException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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;
-
-}
diff --git a/src/org/w3c/dom/events/EventListener.java b/src/org/w3c/dom/events/EventListener.java
deleted file mode 100644
index 52e60cb..0000000
--- a/src/org/w3c/dom/events/EventListener.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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);
-
-}
diff --git a/src/org/w3c/dom/events/EventTarget.java b/src/org/w3c/dom/events/EventTarget.java
deleted file mode 100644
index 65e6286..0000000
--- a/src/org/w3c/dom/events/EventTarget.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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 typeThe event type for which the user is registering
-     * @param listenerThe <code>listener</code> parameter takes an interface 
-     *   implemented by the user which contains the methods to be called 
-     *   when the event occurs.
-     * @param useCaptureIf 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 typeSpecifies the event type of the <code>EventListener</code> 
-     *   being removed. 
-     * @param listenerThe <code>EventListener</code> parameter indicates the 
-     *   <code>EventListener </code> to be removed. 
-     * @param useCaptureSpecifies 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 evtSpecifies 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;
-
-}
diff --git a/src/org/w3c/dom/events/MutationEvent.java b/src/org/w3c/dom/events/MutationEvent.java
deleted file mode 100644
index 8b80aac..0000000
--- a/src/org/w3c/dom/events/MutationEvent.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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 DOMCharDataModified 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 DOMCharDataModified 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 typeArgSpecifies the event type.
-     * @param canBubbleArgSpecifies whether or not the event can bubble.
-     * @param cancelableArgSpecifies whether or not the event's default 
-     *   action can be prevented.
-     * @param relatedNodeArgSpecifies the <code>Event</code>'s related Node.
-     * @param prevValueArgSpecifies the <code>Event</code>'s 
-     *   <code>prevValue</code> attribute. This value may be null.
-     * @param newValueArgSpecifies the <code>Event</code>'s 
-     *   <code>newValue</code> attribute. This value may be null.
-     * @param attrNameArgSpecifies the <code>Event</code>'s 
-     *   <code>attrName</code> attribute. This value may be null.
-     * @param attrChangeArgSpecifies 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);
-
-}
diff --git a/src/org/w3c/dom/events/package.html b/src/org/w3c/dom/events/package.html
deleted file mode 100644
index c3e4ee0..0000000
--- a/src/org/w3c/dom/events/package.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-                      "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-    <title>W3C IPR SOFTWARE NOTICE</title>
-  </head>
-  <body bgcolor="#FFFFFF" text="#000000">
-    <p>
-      Document Object Model Level 2 Events is a platform and 
-      language-neutral interface that gives to programs and scripts 
-      a generic event system. The Document Object Model Level 2 
-      Events builds on the Document Object Model Level 2 Core
-      and on Document Object Model Level 2 Views.
-    </p>
-    <h1>
-      W3C IPR SOFTWARE NOTICE
-    </h1>
-    <h3>
-      Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
-      Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</loc>, <loc
-      href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
-      Reserved.
-    </h3>
-    <p>
-      The DOM bindings are published under the W3C Software Copyright Notice
-      and License. The software license requires "Notice of any changes or
-      modifications to the W3C files, including the date changes were made."
-      Consequently, modified versions of the DOM bindings must document that
-      they do not conform to the W3C standard; in the case of the IDL binding,
-      the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-      binding, the package names can no longer be in the 'org.w3c' package.
-    </p>
-    <p>
-      <b>Note:</b> The original version of the W3C Software Copyright Notice
-      and License could be found at <a
-      href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
-    </p>
-    <h3>
-      Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
-      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</a>, <a
-      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
-      Reserved. http://www.w3.org/Consortium/Legal/
-    </h3>
-    <p>
-      This W3C work (including software, documents, or other related items) is
-      being provided by the copyright holders under the following license. By
-      obtaining, using and/or copying this work, you (the licensee) agree that
-      you have read, understood, and will comply with the following terms and
-      conditions:
-    </p>
-    <p>
-      Permission to use, copy, and modify this software and its documentation,
-      with or without modification,&nbsp; for any purpose and without fee or
-      royalty is hereby granted, provided that you include the following on ALL
-      copies of the software and documentation or portions thereof, including
-      modifications, that you make:
-    </p>
-    <ol>
-      <li>
-	The full text of this NOTICE in a location viewable to users of the
-	redistributed or derivative work.
-      </li>
-      <li>
-	Any pre-existing intellectual property disclaimers, notices, or terms
-	and conditions. If none exist, a short notice of the following form
-	(hypertext is preferred, text is permitted) should be used within the
-	body of any redistributed or derivative code: "Copyright &copy;
-	[$date-of-software] <a href="http://www.w3.org/">World Wide Web
-	Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-	Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-	National de Recherche en Informatique et en Automatique</a>, <a
-	href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
-	Reserved. http://www.w3.org/Consortium/Legal/"
-      </li>
-      <li>
-	Notice of any changes or modifications to the W3C files, including the
-	date changes were made. (We recommend you provide URIs to the location
-	from which the code is derived.)
-      </li>
-    </ol>
-    <p>
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
-      HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
-      INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
-      FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
-      DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
-      TRADEMARKS OR OTHER RIGHTS.
-    </p>
-    <p>
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-      CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-      DOCUMENTATION.
-    </p>
-    <p>
-      The name and trademarks of copyright holders may NOT be used in
-      advertising or publicity pertaining to the software without specific,
-      written prior permission. Title to copyright in this software and any
-      associated documentation will at all times remain with copyright
-      holders.
-    </p>
-  </body>
-</html>
diff --git a/src/org/w3c/dom/html/HTMLAnchorElement.java b/src/org/w3c/dom/html/HTMLAnchorElement.java
deleted file mode 100644
index 8dcd6ec..0000000
--- a/src/org/w3c/dom/html/HTMLAnchorElement.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  The anchor element. See the  A element definition in HTML 4.0.
- */
-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.0.
-     */
-    public String getAccessKey();
-    public void setAccessKey(String accessKey);
-
-    /**
-     *  The character encoding of the linked resource. See the  charset 
-     * attribute definition in HTML 4.0.
-     */
-    public String getCharset();
-    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.0.
-     */
-    public String getCoords();
-    public void setCoords(String coords);
-
-    /**
-     *  The URI of the linked resource. See the  href attribute definition in 
-     * HTML 4.0.
-     */
-    public String getHref();
-    public void setHref(String href);
-
-    /**
-     *  Language code of the linked resource. See the  hreflang attribute 
-     * definition in HTML 4.0.
-     */
-    public String getHreflang();
-    public void setHreflang(String hreflang);
-
-    /**
-     *  Anchor name. See the  name attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  Forward link type. See the  rel attribute definition in HTML 4.0.
-     */
-    public String getRel();
-    public void setRel(String rel);
-
-    /**
-     *  Reverse link type. See the  rev attribute definition in HTML 4.0.
-     */
-    public String getRev();
-    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.0.
-     */
-    public String getShape();
-    public void setShape(String shape);
-
-    /**
-     *  Index that represents the element's position in the tabbing order. See 
-     * the  tabindex attribute definition in HTML 4.0.
-     */
-    public int getTabIndex();
-    public void setTabIndex(int tabIndex);
-
-    /**
-     *  Frame to render the resource in. See the  target attribute definition 
-     * in HTML 4.0.
-     */
-    public String getTarget();
-    public void setTarget(String target);
-
-    /**
-     *  Advisory content type. See the  type attribute definition in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-    /**
-     *  Removes keyboard focus from this element.
-     */
-    public void blur();
-
-    /**
-     *  Gives keyboard focus to this element.
-     */
-    public void focus();
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLAppletElement.java b/src/org/w3c/dom/html/HTMLAppletElement.java
deleted file mode 100644
index 89312bc..0000000
--- a/src/org/w3c/dom/html/HTMLAppletElement.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  An embedded Java applet. See the  APPLET element definition in HTML 4.0. 
- * This element is deprecated in HTML 4.0.
- */
-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.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    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.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getAlt();
-    public void setAlt(String alt);
-
-    /**
-     *  Comma-separated archive list. See the  archive attribute definition in 
-     * HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getArchive();
-    public void setArchive(String archive);
-
-    /**
-     *  Applet class file.  See the  code attribute definition in HTML 4.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getCode();
-    public void setCode(String code);
-
-    /**
-     *  Optional base URI for applet. See the  codebase attribute definition 
-     * in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getCodeBase();
-    public void setCodeBase(String codeBase);
-
-    /**
-     *  Override height. See the  height attribute definition in HTML 4.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getHeight();
-    public void setHeight(String height);
-
-    /**
-     *  Horizontal space to the left and right of this image, applet, or 
-     * object. See the  hspace attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getHspace();
-    public void setHspace(String hspace);
-
-    /**
-     *  The name of the applet. See the  name attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  Serialized applet file. See the  object attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getObject();
-    public void setObject(String object);
-
-    /**
-     *  Vertical space above and below this image, applet, or object. See the  
-     * vspace attribute definition in HTML 4.0. This attribute is deprecated 
-     * in HTML 4.0.
-     */
-    public String getVspace();
-    public void setVspace(String vspace);
-
-    /**
-     *  Override width. See the  width attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getWidth();
-    public void setWidth(String width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLAreaElement.java b/src/org/w3c/dom/html/HTMLAreaElement.java
deleted file mode 100644
index 4f884a4..0000000
--- a/src/org/w3c/dom/html/HTMLAreaElement.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Client-side image map area definition. See the  AREA element definition in 
- * HTML 4.0.
- */
-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.0.
-     */
-    public String getAccessKey();
-    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.0.
-     */
-    public String getAlt();
-    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.0.
-     */
-    public String getCoords();
-    public void setCoords(String coords);
-
-    /**
-     *  The URI of the linked resource. See the  href attribute definition in 
-     * HTML 4.0.
-     */
-    public String getHref();
-    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.0.
-     */
-    public boolean getNoHref();
-    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.0.
-     */
-    public String getShape();
-    public void setShape(String shape);
-
-    /**
-     *  Index that represents the element's position in the tabbing order. See 
-     * the  tabindex attribute definition in HTML 4.0.
-     */
-    public int getTabIndex();
-    public void setTabIndex(int tabIndex);
-
-    /**
-     *  Frame to render the resource in. See the  target attribute definition 
-     * in HTML 4.0.
-     */
-    public String getTarget();
-    public void setTarget(String target);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLBRElement.java b/src/org/w3c/dom/html/HTMLBRElement.java
deleted file mode 100644
index efa59a9..0000000
--- a/src/org/w3c/dom/html/HTMLBRElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Force a line break. See the  BR element definition in HTML 4.0.
- */
-public interface HTMLBRElement extends HTMLElement {
-    /**
-     *  Control flow of text around floats. See the  clear attribute definition
-     *  in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getClear();
-    public void setClear(String clear);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLBaseElement.java b/src/org/w3c/dom/html/HTMLBaseElement.java
deleted file mode 100644
index 1dee8c4..0000000
--- a/src/org/w3c/dom/html/HTMLBaseElement.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Document base URI. See the  BASE element definition in HTML 4.0.
- */
-public interface HTMLBaseElement extends HTMLElement {
-    /**
-     *  The base URI. See the  href attribute definition in HTML 4.0.
-     */
-    public String getHref();
-    public void setHref(String href);
-
-    /**
-     *  The default target frame. See the  target attribute definition in HTML 
-     * 4.0.
-     */
-    public String getTarget();
-    public void setTarget(String target);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLBaseFontElement.java b/src/org/w3c/dom/html/HTMLBaseFontElement.java
deleted file mode 100644
index 4ec4abc..0000000
--- a/src/org/w3c/dom/html/HTMLBaseFontElement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Base font. See the  BASEFONT element definition in HTML 4.0. This element 
- * is deprecated in HTML 4.0.
- */
-public interface HTMLBaseFontElement extends HTMLElement {
-    /**
-     *  Font color. See the  color attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getColor();
-    public void setColor(String color);
-
-    /**
-     *  Font face identifier. See the  face attribute definition in HTML 4.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getFace();
-    public void setFace(String face);
-
-    /**
-     *  Font size. See the  size attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getSize();
-    public void setSize(String size);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLBodyElement.java b/src/org/w3c/dom/html/HTMLBodyElement.java
deleted file mode 100644
index 47dd56c..0000000
--- a/src/org/w3c/dom/html/HTMLBodyElement.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  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.0.
- */
-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.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getALink();
-    public void setALink(String aLink);
-
-    /**
-     *  URI of the background texture tile image. See the  background 
-     * attribute definition in HTML 4.0. This attribute is deprecated in HTML 
-     * 4.0.
-     */
-    public String getBackground();
-    public void setBackground(String background);
-
-    /**
-     *  Document background color. See the  bgcolor attribute definition in 
-     * HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getBgColor();
-    public void setBgColor(String bgColor);
-
-    /**
-     *  Color of links that are not active and unvisited. See the  link 
-     * attribute definition in HTML 4.0. This attribute is deprecated in HTML 
-     * 4.0.
-     */
-    public String getLink();
-    public void setLink(String link);
-
-    /**
-     *  Document text color. See the  text attribute definition in HTML 4.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getText();
-    public void setText(String text);
-
-    /**
-     *  Color of links that have been visited by the user. See the  vlink 
-     * attribute definition in HTML 4.0. This attribute is deprecated in HTML 
-     * 4.0.
-     */
-    public String getVLink();
-    public void setVLink(String vLink);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLButtonElement.java b/src/org/w3c/dom/html/HTMLButtonElement.java
deleted file mode 100644
index cb9ecb1..0000000
--- a/src/org/w3c/dom/html/HTMLButtonElement.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Push button. See the  BUTTON element definition in HTML 4.0.
- */
-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.0.
-     */
-    public String getAccessKey();
-    public void setAccessKey(String accessKey);
-
-    /**
-     *  The control is unavailable in this context. See the  disabled 
-     * attribute definition in HTML 4.0.
-     */
-    public boolean getDisabled();
-    public void setDisabled(boolean disabled);
-
-    /**
-     *  Form control or object name when submitted with a form. See the  name 
-     * attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  Index that represents the element's position in the tabbing order. See 
-     * the  tabindex attribute definition in HTML 4.0.
-     */
-    public int getTabIndex();
-    public void setTabIndex(int tabIndex);
-
-    /**
-     *  The type of button. See the  type attribute definition in HTML 4.0.
-     */
-    public String getType();
-
-    /**
-     *  The current form control value. See the  value attribute definition in 
-     * HTML 4.0.
-     */
-    public String getValue();
-    public void setValue(String value);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLCollection.java b/src/org/w3c/dom/html/HTMLCollection.java
deleted file mode 100644
index ce6bd69..0000000
--- a/src/org/w3c/dom/html/HTMLCollection.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.html;
-
-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.  Note: Collections in the HTML DOM are assumed 
- * to be  live meaning that they are automatically updated when the 
- * underlying document is changed. 
- */
-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 
-     *   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. 
-     * @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);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLDListElement.java b/src/org/w3c/dom/html/HTMLDListElement.java
deleted file mode 100644
index 9ce4e05..0000000
--- a/src/org/w3c/dom/html/HTMLDListElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Definition list. See the  DL element definition in HTML 4.0.
- */
-public interface HTMLDListElement extends HTMLElement {
-    /**
-     *  Reduce spacing between list items. See the  compact attribute 
-     * definition in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public boolean getCompact();
-    public void setCompact(boolean compact);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLDOMImplementation.java b/src/org/w3c/dom/html/HTMLDOMImplementation.java
deleted file mode 100644
index c6ed97d..0000000
--- a/src/org/w3c/dom/html/HTMLDOMImplementation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.html;
-
-import org.w3c.dom.DOMImplementation;
-
-/**
- *  The <code>HTMLDOMImplementation</code> interface extends the 
- * <code>DOMImplementation</code> interface with a method for creating an 
- * HTML document instance.
- * @since DOM Level 2
- */
-public interface HTMLDOMImplementation extends DOMImplementation {
-    /**
-     *  Creates an <code>HTMLDocument</code> object with the minimal tree made 
-     * of the following elements: <code>HTML</code> , <code>HEAD</code> , 
-     * <code>TITLE</code> , and <code>BODY</code> .
-     * @param title  The title of the document to be set as the content of the 
-     *   <code>TITLE</code> element, through a child <code>Text</code> node.
-     * @return  A new <code>HTMLDocument</code> object.
-     */
-    public HTMLDocument createHTMLDocument(String title);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLDirectoryElement.java b/src/org/w3c/dom/html/HTMLDirectoryElement.java
deleted file mode 100644
index 6171504..0000000
--- a/src/org/w3c/dom/html/HTMLDirectoryElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Directory list. See the  DIR element definition in HTML 4.0. This element 
- * is deprecated in HTML 4.0.
- */
-public interface HTMLDirectoryElement extends HTMLElement {
-    /**
-     *  Reduce spacing between list items. See the  compact attribute 
-     * definition in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public boolean getCompact();
-    public void setCompact(boolean compact);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLDivElement.java b/src/org/w3c/dom/html/HTMLDivElement.java
deleted file mode 100644
index d7e0fde..0000000
--- a/src/org/w3c/dom/html/HTMLDivElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Generic block container. See the  DIV element definition in HTML 4.0.
- */
-public interface HTMLDivElement extends HTMLElement {
-    /**
-     *  Horizontal text alignment. See the  align attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLDocument.java b/src/org/w3c/dom/html/HTMLDocument.java
deleted file mode 100644
index 21238fe..0000000
--- a/src/org/w3c/dom/html/HTMLDocument.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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.html;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
-
-/**
- *  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: alinkColor background
- *  bgColor fgColor linkColor vlinkColor In DOM Level 2, the method 
- * <code>getElementById</code> is inherited from the <code>Document</code> 
- * interface where it was moved.
- */
-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();
-    public void setTitle(String title);
-
-    /**
-     *  Returns the URI 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 complete URI 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();
-    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. 
-     */
-    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. Note. For reasons 
-     * of backwards 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. 
-     */
-    public HTMLCollection getAnchors();
-
-    /**
-     *  The cookies associated with this document. If there are none, the 
-     * value is an empty string. Otherwise, the value is a string: a 
-     * semicolon-delimited list of "name, value" pairs for all the cookies 
-     * associated with the page. For example, 
-     * <code>name=value;expires=date</code> . 
-     */
-    public String getCookie();
-    public void setCookie(String cookie);
-
-    /**
-     *  Note. 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. 
-     * The following methods may be deprecated at some point in the future in 
-     * favor of a more general-purpose mechanism.
-     * <br> Open a document stream for writing. If a document exists in the 
-     * target, this method clears it.
-     */
-    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> . The text is parsed into the document's structure 
-     * model.
-     * @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> . The text is parsed into the 
-     * document's structure model.
-     * @param text  The string to be parsed into some structure in the 
-     *   document structure model.
-     */
-    public void writeln(String text);
-
-    /**
-     *  Returns the (possibly empty) collection of elements whose
-     * <code>name</code> value is given by <code>elementName</code> .
-     * @param elementName  The <code>name</code> attribute value for an 
-     *   element.
-     * @return  The matching elements.
-     */
-    public NodeList getElementsByName(String elementName);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLElement.java b/src/org/w3c/dom/html/HTMLElement.java
deleted file mode 100644
index ac82081..0000000
--- a/src/org/w3c/dom/html/HTMLElement.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.html;
-
-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:  HEAD 
- * special: SUB, SUP, SPAN, BDO font: TT, I, B, U, S, STRIKE, BIG, SMALL 
- * phrase: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ACRONYM, ABBR list: 
- * DD, DT NOFRAMES, NOSCRIPT ADDRESS, CENTER The <code>style</code> attribute 
- * of an HTML element is accessible through the 
- * <code>ElementCSSInlineStyle</code> interface which is defined in the  . 
- */
-public interface HTMLElement extends Element {
-    /**
-     *  The element's identifier. See the  id attribute definition in HTML 4.0.
-     */
-    public String getId();
-    public void setId(String id);
-
-    /**
-     *  The element's advisory title. See the  title attribute definition in 
-     * HTML 4.0.
-     */
-    public String getTitle();
-    public void setTitle(String title);
-
-    /**
-     *  Language code defined in RFC 1766. See the  lang attribute definition 
-     * in HTML 4.0.
-     */
-    public String getLang();
-    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.0.
-     */
-    public String getDir();
-    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.0.
-     */
-    public String getClassName();
-    public void setClassName(String className);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLFieldSetElement.java b/src/org/w3c/dom/html/HTMLFieldSetElement.java
deleted file mode 100644
index 3b325b4..0000000
--- a/src/org/w3c/dom/html/HTMLFieldSetElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Organizes form controls into logical groups. See the   FIELDSET  element 
- * definition in HTML 4.0.
- */
-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();
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLFontElement.java b/src/org/w3c/dom/html/HTMLFontElement.java
deleted file mode 100644
index a653ae9..0000000
--- a/src/org/w3c/dom/html/HTMLFontElement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Local change to font. See the  FONT element definition in HTML 4.0. This 
- * element is deprecated in HTML 4.0.
- */
-public interface HTMLFontElement extends HTMLElement {
-    /**
-     *  Font color. See the  color attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getColor();
-    public void setColor(String color);
-
-    /**
-     *  Font face identifier. See the  face attribute definition in HTML 4.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getFace();
-    public void setFace(String face);
-
-    /**
-     *  Font size. See the  size attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getSize();
-    public void setSize(String size);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLFormElement.java b/src/org/w3c/dom/html/HTMLFormElement.java
deleted file mode 100644
index aed1d90..0000000
--- a/src/org/w3c/dom/html/HTMLFormElement.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  The <code>FORM</code> element encompasses behavior similar to a collection 
- * and an element. It provides direct access to the contained input elements 
- * as well as the attributes of the form element. See the  FORM element 
- * definition in HTML 4.0.
- */
-public interface HTMLFormElement extends HTMLElement {
-    /**
-     *  Returns a collection of all 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();
-    public void setName(String name);
-
-    /**
-     *  List of character sets supported by the server. See the  
-     * accept-charset attribute definition in HTML 4.0.
-     */
-    public String getAcceptCharset();
-    public void setAcceptCharset(String acceptCharset);
-
-    /**
-     *  Server-side form handler. See the  action attribute definition in HTML 
-     * 4.0.
-     */
-    public String getAction();
-    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.0.
-     */
-    public String getEnctype();
-    public void setEnctype(String enctype);
-
-    /**
-     *  HTTP method used to submit form. See the  method attribute definition 
-     * in HTML 4.0.
-     */
-    public String getMethod();
-    public void setMethod(String method);
-
-    /**
-     *  Frame to render the resource in. See the  target attribute definition 
-     * in HTML 4.0.
-     */
-    public String getTarget();
-    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();
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLFrameElement.java b/src/org/w3c/dom/html/HTMLFrameElement.java
deleted file mode 100644
index 739cfda..0000000
--- a/src/org/w3c/dom/html/HTMLFrameElement.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Create a frame. See the  FRAME element definition in HTML 4.0.
- */
-public interface HTMLFrameElement extends HTMLElement {
-    /**
-     *  Request frame borders. See the  frameborder attribute definition in 
-     * HTML 4.0.
-     */
-    public String getFrameBorder();
-    public void setFrameBorder(String frameBorder);
-
-    /**
-     *  URI designating a long description of this image or frame. See the  
-     * longdesc attribute definition in HTML 4.0.
-     */
-    public String getLongDesc();
-    public void setLongDesc(String longDesc);
-
-    /**
-     *  Frame margin height, in pixels. See the  marginheight attribute 
-     * definition in HTML 4.0.
-     */
-    public String getMarginHeight();
-    public void setMarginHeight(String marginHeight);
-
-    /**
-     *  Frame margin width, in pixels. See the  marginwidth attribute 
-     * definition in HTML 4.0.
-     */
-    public String getMarginWidth();
-    public void setMarginWidth(String marginWidth);
-
-    /**
-     *  The frame name (object of the <code>target</code> attribute). See the  
-     * name attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  When true, forbid user from resizing frame. See the  noresize 
-     * attribute definition in HTML 4.0.
-     */
-    public boolean getNoResize();
-    public void setNoResize(boolean noResize);
-
-    /**
-     *  Specify whether or not the frame should have scrollbars. See the  
-     * scrolling attribute definition in HTML 4.0.
-     */
-    public String getScrolling();
-    public void setScrolling(String scrolling);
-
-    /**
-     *  A URI designating the initial frame contents. See the  src attribute 
-     * definition in HTML 4.0.
-     */
-    public String getSrc();
-    public void setSrc(String src);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLFrameSetElement.java b/src/org/w3c/dom/html/HTMLFrameSetElement.java
deleted file mode 100644
index 0679f7f..0000000
--- a/src/org/w3c/dom/html/HTMLFrameSetElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Create a grid of frames. See the  FRAMESET element definition in HTML 4.0.
- */
-public interface HTMLFrameSetElement extends HTMLElement {
-    /**
-     *  The number of columns of frames in the frameset. See the  cols 
-     * attribute definition in HTML 4.0.
-     */
-    public String getCols();
-    public void setCols(String cols);
-
-    /**
-     *  The number of rows of frames in the frameset. See the  rows attribute 
-     * definition in HTML 4.0.
-     */
-    public String getRows();
-    public void setRows(String rows);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLHRElement.java b/src/org/w3c/dom/html/HTMLHRElement.java
deleted file mode 100644
index d38b687..0000000
--- a/src/org/w3c/dom/html/HTMLHRElement.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Create a horizontal rule. See the  HR element definition in HTML 4.0.
- */
-public interface HTMLHRElement extends HTMLElement {
-    /**
-     *  Align the rule on the page. See the  align attribute definition in 
-     * HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    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.0. This attribute is deprecated in HTML 4.0.
-     */
-    public boolean getNoShade();
-    public void setNoShade(boolean noShade);
-
-    /**
-     *  The height of the rule. See the  size attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getSize();
-    public void setSize(String size);
-
-    /**
-     *  The width of the rule. See the  width attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getWidth();
-    public void setWidth(String width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLHeadElement.java b/src/org/w3c/dom/html/HTMLHeadElement.java
deleted file mode 100644
index 6c5a949..0000000
--- a/src/org/w3c/dom/html/HTMLHeadElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Document head information. See the  HEAD element definition in HTML 4.0.
- */
-public interface HTMLHeadElement extends HTMLElement {
-    /**
-     *  URI designating a metadata profile. See the  profile attribute 
-     * definition in HTML 4.0.
-     */
-    public String getProfile();
-    public void setProfile(String profile);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLHeadingElement.java b/src/org/w3c/dom/html/HTMLHeadingElement.java
deleted file mode 100644
index 05f2391..0000000
--- a/src/org/w3c/dom/html/HTMLHeadingElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  For the <code>H1</code> to <code>H6</code> elements. See the  H1 element 
- * definition in HTML 4.0.
- */
-public interface HTMLHeadingElement extends HTMLElement {
-    /**
-     *  Horizontal text alignment. See the  align attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLHtmlElement.java b/src/org/w3c/dom/html/HTMLHtmlElement.java
deleted file mode 100644
index 568d3c3..0000000
--- a/src/org/w3c/dom/html/HTMLHtmlElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Root of an HTML document. See the  HTML element definition in HTML 4.0.
- */
-public interface HTMLHtmlElement extends HTMLElement {
-    /**
-     *  Version information about the document's DTD. See the  version 
-     * attribute definition in HTML 4.0. This attribute is deprecated in HTML 
-     * 4.0.
-     */
-    public String getVersion();
-    public void setVersion(String version);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLIFrameElement.java b/src/org/w3c/dom/html/HTMLIFrameElement.java
deleted file mode 100644
index 6f962e7..0000000
--- a/src/org/w3c/dom/html/HTMLIFrameElement.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Inline subwindows. See the  IFRAME element definition in HTML 4.0.
- */
-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.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-    /**
-     *  Request frame borders. See the  frameborder attribute definition in 
-     * HTML 4.0.
-     */
-    public String getFrameBorder();
-    public void setFrameBorder(String frameBorder);
-
-    /**
-     *  Frame height. See the  height attribute definition in HTML 4.0.
-     */
-    public String getHeight();
-    public void setHeight(String height);
-
-    /**
-     *  URI designating a long description of this image or frame. See the  
-     * longdesc attribute definition in HTML 4.0.
-     */
-    public String getLongDesc();
-    public void setLongDesc(String longDesc);
-
-    /**
-     *  Frame margin height, in pixels. See the  marginheight attribute 
-     * definition in HTML 4.0.
-     */
-    public String getMarginHeight();
-    public void setMarginHeight(String marginHeight);
-
-    /**
-     *  Frame margin width, in pixels. See the  marginwidth attribute 
-     * definition in HTML 4.0.
-     */
-    public String getMarginWidth();
-    public void setMarginWidth(String marginWidth);
-
-    /**
-     *  The frame name (object of the <code>target</code> attribute). See the  
-     * name attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  Specify whether or not the frame should have scrollbars. See the  
-     * scrolling attribute definition in HTML 4.0.
-     */
-    public String getScrolling();
-    public void setScrolling(String scrolling);
-
-    /**
-     *  A URI designating the initial frame contents. See the  src attribute 
-     * definition in HTML 4.0.
-     */
-    public String getSrc();
-    public void setSrc(String src);
-
-    /**
-     *  Frame width. See the  width attribute definition in HTML 4.0.
-     */
-    public String getWidth();
-    public void setWidth(String width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLImageElement.java b/src/org/w3c/dom/html/HTMLImageElement.java
deleted file mode 100644
index e22fd57..0000000
--- a/src/org/w3c/dom/html/HTMLImageElement.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Embedded image. See the  IMG element definition in HTML 4.0.
- */
-public interface HTMLImageElement extends HTMLElement {
-    /**
-     *  URI designating the source of this image, for low-resolution output. 
-     */
-    public String getLowSrc();
-    public void setLowSrc(String lowSrc);
-
-    /**
-     *  The name of the element (for backwards compatibility). 
-     */
-    public String getName();
-    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.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    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.0.
-     */
-    public String getAlt();
-    public void setAlt(String alt);
-
-    /**
-     *  Width of border around image. See the  border attribute definition in 
-     * HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getBorder();
-    public void setBorder(String border);
-
-    /**
-     *  Override height. See the  height attribute definition in HTML 4.0.
-     */
-    public String getHeight();
-    public void setHeight(String height);
-
-    /**
-     *  Horizontal space to the left and right of this image. See the  hspace 
-     * attribute definition in HTML 4.0. This attribute is deprecated in HTML 
-     * 4.0.
-     */
-    public String getHspace();
-    public void setHspace(String hspace);
-
-    /**
-     *  Use server-side image map. See the  ismap attribute definition in HTML 
-     * 4.0.
-     */
-    public boolean getIsMap();
-    public void setIsMap(boolean isMap);
-
-    /**
-     *  URI designating a long description of this image or frame. See the  
-     * longdesc attribute definition in HTML 4.0.
-     */
-    public String getLongDesc();
-    public void setLongDesc(String longDesc);
-
-    /**
-     *  URI designating the source of this image. See the  src attribute 
-     * definition in HTML 4.0.
-     */
-    public String getSrc();
-    public void setSrc(String src);
-
-    /**
-     *  Use client-side image map. See the  usemap attribute definition in 
-     * HTML 4.0.
-     */
-    public String getUseMap();
-    public void setUseMap(String useMap);
-
-    /**
-     *  Vertical space above and below this image. See the  vspace attribute 
-     * definition in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getVspace();
-    public void setVspace(String vspace);
-
-    /**
-     *  Override width. See the  width attribute definition in HTML 4.0.
-     */
-    public String getWidth();
-    public void setWidth(String width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLInputElement.java b/src/org/w3c/dom/html/HTMLInputElement.java
deleted file mode 100644
index 3fa20bd..0000000
--- a/src/org/w3c/dom/html/HTMLInputElement.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Form control.  Note. 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 HTML 4.0.
- */
-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. Changing this attribute, however, resets the contents 
-     * of the form control. See the  value attribute definition in HTML 4.0.
-     */
-    public String getDefaultValue();
-    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. Changes to this 
-     * attribute, however, resets the state of the form control. See the  
-     * checked attribute definition in HTML 4.0.
-     */
-    public boolean getDefaultChecked();
-    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.0.
-     */
-    public String getAccept();
-    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.0.
-     */
-    public String getAccessKey();
-    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.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    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.0.
-     */
-    public String getAlt();
-    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 value attribute of the element.
-     */
-    public boolean getChecked();
-    public void setChecked(boolean checked);
-
-    /**
-     *  The control is unavailable in this context. See the  disabled 
-     * attribute definition in HTML 4.0.
-     */
-    public boolean getDisabled();
-    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.0.
-     */
-    public int getMaxLength();
-    public void setMaxLength(int maxLength);
-
-    /**
-     *  Form control or object name when submitted with a form. See the  name 
-     * attribute definition in HTML 4.0.
-     */
-    public String getName();
-    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.0.
-     */
-    public boolean getReadOnly();
-    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.0.
-     */
-    public String getSize();
-    public void setSize(String 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.0.
-     */
-    public String getSrc();
-    public void setSrc(String src);
-
-    /**
-     *  Index that represents the element's position in the tabbing order. See 
-     * the  tabindex attribute definition in HTML 4.0.
-     */
-    public int getTabIndex();
-    public void setTabIndex(int tabIndex);
-
-    /**
-     *  The type of control created. See the  type attribute definition in 
-     * HTML 4.0.
-     */
-    public String getType();
-
-    /**
-     *  Use client-side image map. See the  usemap attribute definition in 
-     * HTML 4.0.
-     */
-    public String getUseMap();
-    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.0.
-     */
-    public String getValue();
-    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();
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLIsIndexElement.java b/src/org/w3c/dom/html/HTMLIsIndexElement.java
deleted file mode 100644
index f22bd97..0000000
--- a/src/org/w3c/dom/html/HTMLIsIndexElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  This element is used for single-line text input. See the  ISINDEX element 
- * definition in HTML 4.0. This element is deprecated in HTML 4.0.
- */
-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.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getPrompt();
-    public void setPrompt(String prompt);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLLIElement.java b/src/org/w3c/dom/html/HTMLLIElement.java
deleted file mode 100644
index b942649..0000000
--- a/src/org/w3c/dom/html/HTMLLIElement.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  List item. See the  LI element definition in HTML 4.0.
- */
-public interface HTMLLIElement extends HTMLElement {
-    /**
-     *  List item bullet style. See the  type attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-    /**
-     *  Reset sequence number when used in <code>OL</code> . See the  value 
-     * attribute definition in HTML 4.0. This attribute is deprecated in HTML 
-     * 4.0.
-     */
-    public int getValue();
-    public void setValue(int value);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLLabelElement.java b/src/org/w3c/dom/html/HTMLLabelElement.java
deleted file mode 100644
index d526dc4..0000000
--- a/src/org/w3c/dom/html/HTMLLabelElement.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Form field label text. See the  LABEL element definition in HTML 4.0.
- */
-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.0.
-     */
-    public String getAccessKey();
-    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.0.
-     */
-    public String getHtmlFor();
-    public void setHtmlFor(String htmlFor);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLLegendElement.java b/src/org/w3c/dom/html/HTMLLegendElement.java
deleted file mode 100644
index 637a910..0000000
--- a/src/org/w3c/dom/html/HTMLLegendElement.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Provides a caption for a <code>FIELDSET</code> grouping.  See the  LEGEND 
- * element definition in HTML 4.0.
- */
-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.0.
-     */
-    public String getAccessKey();
-    public void setAccessKey(String accessKey);
-
-    /**
-     *  Text alignment relative to <code>FIELDSET</code> . See the  align 
-     * attribute definition in HTML 4.0. This attribute is deprecated in HTML 
-     * 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLLinkElement.java b/src/org/w3c/dom/html/HTMLLinkElement.java
deleted file mode 100644
index f8bc1fe..0000000
--- a/src/org/w3c/dom/html/HTMLLinkElement.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  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.0  (see also the 
- * <code>LinkStyle</code> interface in the  module).
- */
-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();
-    public void setDisabled(boolean disabled);
-
-    /**
-     *  The character encoding of the resource being linked to. See the  
-     * charset attribute definition in HTML 4.0.
-     */
-    public String getCharset();
-    public void setCharset(String charset);
-
-    /**
-     *  The URI of the linked resource. See the  href attribute definition in 
-     * HTML 4.0.
-     */
-    public String getHref();
-    public void setHref(String href);
-
-    /**
-     *  Language code of the linked resource. See the  hreflang attribute 
-     * definition in HTML 4.0.
-     */
-    public String getHreflang();
-    public void setHreflang(String hreflang);
-
-    /**
-     *  Designed for use with one or more target media. See the  media 
-     * attribute definition in HTML 4.0.
-     */
-    public String getMedia();
-    public void setMedia(String media);
-
-    /**
-     *  Forward link type. See the  rel attribute definition in HTML 4.0.
-     */
-    public String getRel();
-    public void setRel(String rel);
-
-    /**
-     *  Reverse link type. See the  rev attribute definition in HTML 4.0.
-     */
-    public String getRev();
-    public void setRev(String rev);
-
-    /**
-     *  Frame to render the resource in. See the  target attribute definition 
-     * in HTML 4.0.
-     */
-    public String getTarget();
-    public void setTarget(String target);
-
-    /**
-     *  Advisory content type. See the  type attribute definition in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLMapElement.java b/src/org/w3c/dom/html/HTMLMapElement.java
deleted file mode 100644
index 52b1348..0000000
--- a/src/org/w3c/dom/html/HTMLMapElement.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Client-side image map. See the  MAP element definition in HTML 4.0.
- */
-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.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLMenuElement.java b/src/org/w3c/dom/html/HTMLMenuElement.java
deleted file mode 100644
index 93549d6..0000000
--- a/src/org/w3c/dom/html/HTMLMenuElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Menu list. See the  MENU element definition in HTML 4.0. This element is 
- * deprecated in HTML 4.0.
- */
-public interface HTMLMenuElement extends HTMLElement {
-    /**
-     *  Reduce spacing between list items. See the  compact attribute 
-     * definition in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public boolean getCompact();
-    public void setCompact(boolean compact);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLMetaElement.java b/src/org/w3c/dom/html/HTMLMetaElement.java
deleted file mode 100644
index 10aca55..0000000
--- a/src/org/w3c/dom/html/HTMLMetaElement.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  This contains generic meta-information about the document. See the  META 
- * element definition in HTML 4.0.
- */
-public interface HTMLMetaElement extends HTMLElement {
-    /**
-     *  Associated information. See the  content attribute definition in HTML 
-     * 4.0.
-     */
-    public String getContent();
-    public void setContent(String content);
-
-    /**
-     *  HTTP response header name. See the  http-equiv attribute definition in 
-     * HTML 4.0.
-     */
-    public String getHttpEquiv();
-    public void setHttpEquiv(String httpEquiv);
-
-    /**
-     *  Meta information name. See the  name attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  Select form of content. See the  scheme attribute definition in HTML 
-     * 4.0.
-     */
-    public String getScheme();
-    public void setScheme(String scheme);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLModElement.java b/src/org/w3c/dom/html/HTMLModElement.java
deleted file mode 100644
index fdcf87c..0000000
--- a/src/org/w3c/dom/html/HTMLModElement.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Notice of modification to part of a document. See the   INS  and  DEL  
- * element definitions in HTML 4.0. 
- */
-public interface HTMLModElement extends HTMLElement {
-    /**
-     *  A URI designating a document that describes the reason for the change. 
-     * See the  cite attribute definition in HTML 4.0.
-     */
-    public String getCite();
-    public void setCite(String cite);
-
-    /**
-     *  The date and time of the change. See the  datetime attribute definition
-     *  in HTML 4.0.
-     */
-    public String getDateTime();
-    public void setDateTime(String dateTime);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLOListElement.java b/src/org/w3c/dom/html/HTMLOListElement.java
deleted file mode 100644
index 66a39d6..0000000
--- a/src/org/w3c/dom/html/HTMLOListElement.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Ordered list. See the  OL element definition in HTML 4.0.
- */
-public interface HTMLOListElement extends HTMLElement {
-    /**
-     *  Reduce spacing between list items. See the  compact attribute 
-     * definition in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public boolean getCompact();
-    public void setCompact(boolean compact);
-
-    /**
-     *  Starting sequence number. See the  start attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public int getStart();
-    public void setStart(int start);
-
-    /**
-     *  Numbering style. See the  type attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLObjectElement.java b/src/org/w3c/dom/html/HTMLObjectElement.java
deleted file mode 100644
index bf60247..0000000
--- a/src/org/w3c/dom/html/HTMLObjectElement.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Generic embedded object.  Note. 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 HTML 4.0.
- */
-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();
-    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.0. 
-     * This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-    /**
-     *  Space-separated list of archives. See the  archive attribute definition
-     *  in HTML 4.0.
-     */
-    public String getArchive();
-    public void setArchive(String archive);
-
-    /**
-     *  Width of border around the object. See the  border attribute definition
-     *  in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getBorder();
-    public void setBorder(String border);
-
-    /**
-     *  Base URI for <code>classid</code> , <code>data</code> , and
-     * <code>archive</code> attributes. See the  codebase attribute definition
-     *  in HTML 4.0.
-     */
-    public String getCodeBase();
-    public void setCodeBase(String codeBase);
-
-    /**
-     *  Content type for data downloaded via <code>classid</code> attribute. 
-     * See the  codetype attribute definition in HTML 4.0.
-     */
-    public String getCodeType();
-    public void setCodeType(String codeType);
-
-    /**
-     *  A URI specifying the location of the object's data.  See the  data 
-     * attribute definition in HTML 4.0.
-     */
-    public String getData();
-    public void setData(String data);
-
-    /**
-     *  Declare (for future reference), but do not instantiate, this object. 
-     * See the  declare attribute definition in HTML 4.0.
-     */
-    public boolean getDeclare();
-    public void setDeclare(boolean declare);
-
-    /**
-     *  Override height. See the  height attribute definition in HTML 4.0.
-     */
-    public String getHeight();
-    public void setHeight(String height);
-
-    /**
-     *  Horizontal space to the left and right of this image, applet, or 
-     * object. See the  hspace attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getHspace();
-    public void setHspace(String hspace);
-
-    /**
-     *  Form control or object name when submitted with a form. See the  name 
-     * attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  Message to render while loading the object. See the  standby attribute 
-     * definition in HTML 4.0.
-     */
-    public String getStandby();
-    public void setStandby(String standby);
-
-    /**
-     *  Index that represents the element's position in the tabbing order. See 
-     * the  tabindex attribute definition in HTML 4.0.
-     */
-    public int getTabIndex();
-    public void setTabIndex(int tabIndex);
-
-    /**
-     *  Content type for data downloaded via <code>data</code> attribute. See 
-     * the  type attribute definition in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-    /**
-     *  Use client-side image map. See the  usemap attribute definition in 
-     * HTML 4.0.
-     */
-    public String getUseMap();
-    public void setUseMap(String useMap);
-
-    /**
-     *  Vertical space above and below this image, applet, or object. See the  
-     * vspace attribute definition in HTML 4.0. This attribute is deprecated 
-     * in HTML 4.0.
-     */
-    public String getVspace();
-    public void setVspace(String vspace);
-
-    /**
-     *  Override width. See the  width attribute definition in HTML 4.0.
-     */
-    public String getWidth();
-    public void setWidth(String width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLOptGroupElement.java b/src/org/w3c/dom/html/HTMLOptGroupElement.java
deleted file mode 100644
index ef5a42c..0000000
--- a/src/org/w3c/dom/html/HTMLOptGroupElement.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Group options together in logical subdivisions. See the  OPTGROUP element 
- * definition in HTML 4.0.
- */
-public interface HTMLOptGroupElement extends HTMLElement {
-    /**
-     *  The control is unavailable in this context. See the  disabled 
-     * attribute definition in HTML 4.0.
-     */
-    public boolean getDisabled();
-    public void setDisabled(boolean disabled);
-
-    /**
-     *  Assigns a label to this option group. See the  label attribute 
-     * definition in HTML 4.0.
-     */
-    public String getLabel();
-    public void setLabel(String label);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLOptionElement.java b/src/org/w3c/dom/html/HTMLOptionElement.java
deleted file mode 100644
index 0047fde..0000000
--- a/src/org/w3c/dom/html/HTMLOptionElement.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  A selectable choice. See the  OPTION element definition in HTML 4.0.
- */
-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. Changing 
-     * <code>defaultSelected</code> , however, resets the state of the form 
-     * control. See the  selected attribute definition in HTML 4.0.
-     */
-    public boolean getDefaultSelected();
-    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.
-     */
-    public int getIndex();
-
-    /**
-     *  The control is unavailable in this context. See the  disabled 
-     * attribute definition in HTML 4.0.
-     */
-    public boolean getDisabled();
-    public void setDisabled(boolean disabled);
-
-    /**
-     *  Option label for use in hierarchical menus. See the  label attribute 
-     * definition in HTML 4.0.
-     */
-    public String getLabel();
-    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();
-    public void setSelected(boolean selected);
-
-    /**
-     *  The current form control value. See the  value attribute definition in 
-     * HTML 4.0.
-     */
-    public String getValue();
-    public void setValue(String value);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLParagraphElement.java b/src/org/w3c/dom/html/HTMLParagraphElement.java
deleted file mode 100644
index fe536aa..0000000
--- a/src/org/w3c/dom/html/HTMLParagraphElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Paragraphs. See the  P element definition in HTML 4.0.
- */
-public interface HTMLParagraphElement extends HTMLElement {
-    /**
-     *  Horizontal text alignment. See the  align attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLParamElement.java b/src/org/w3c/dom/html/HTMLParamElement.java
deleted file mode 100644
index e9a3c3a..0000000
--- a/src/org/w3c/dom/html/HTMLParamElement.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Parameters fed to the <code>OBJECT</code> element. See the  PARAM element 
- * definition in HTML 4.0.
- */
-public interface HTMLParamElement extends HTMLElement {
-    /**
-     *  The name of a run-time parameter. See the  name attribute definition 
-     * in HTML 4.0.
-     */
-    public String getName();
-    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.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-    /**
-     *  The value of a run-time parameter. See the  value attribute definition 
-     * in HTML 4.0.
-     */
-    public String getValue();
-    public void setValue(String value);
-
-    /**
-     *  Information about the meaning of the <code>value</code> attribute 
-     * value. See the  valuetype attribute definition in HTML 4.0.
-     */
-    public String getValueType();
-    public void setValueType(String valueType);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLPreElement.java b/src/org/w3c/dom/html/HTMLPreElement.java
deleted file mode 100644
index c41e693..0000000
--- a/src/org/w3c/dom/html/HTMLPreElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Preformatted text. See the  PRE element definition in HTML 4.0.
- */
-public interface HTMLPreElement extends HTMLElement {
-    /**
-     *  Fixed width for content. See the  width attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public int getWidth();
-    public void setWidth(int width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLQuoteElement.java b/src/org/w3c/dom/html/HTMLQuoteElement.java
deleted file mode 100644
index be1480d..0000000
--- a/src/org/w3c/dom/html/HTMLQuoteElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  For the <code>Q</code> and <code>BLOCKQUOTE</code> elements. See the  Q 
- * element definition in HTML 4.0.
- */
-public interface HTMLQuoteElement extends HTMLElement {
-    /**
-     *  A URI designating a source document or message. See the  cite 
-     * attribute definition in HTML 4.0.
-     */
-    public String getCite();
-    public void setCite(String cite);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLScriptElement.java b/src/org/w3c/dom/html/HTMLScriptElement.java
deleted file mode 100644
index 8222a80..0000000
--- a/src/org/w3c/dom/html/HTMLScriptElement.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Script statements. See the  SCRIPT element definition in HTML 4.0.
- */
-public interface HTMLScriptElement extends HTMLElement {
-    /**
-     *  The script content of the element. 
-     */
-    public String getText();
-    public void setText(String text);
-
-    /**
-     *  Reserved for future use. 
-     */
-    public String getHtmlFor();
-    public void setHtmlFor(String htmlFor);
-
-    /**
-     *  Reserved for future use. 
-     */
-    public String getEvent();
-    public void setEvent(String event);
-
-    /**
-     *  The character encoding of the linked resource. See the  charset 
-     * attribute definition in HTML 4.0.
-     */
-    public String getCharset();
-    public void setCharset(String charset);
-
-    /**
-     *  Indicates that the user agent can defer processing of the script.  See 
-     * the  defer attribute definition in HTML 4.0.
-     */
-    public boolean getDefer();
-    public void setDefer(boolean defer);
-
-    /**
-     *  URI designating an external script. See the  src attribute definition 
-     * in HTML 4.0.
-     */
-    public String getSrc();
-    public void setSrc(String src);
-
-    /**
-     *  The content type of the script language. See the  type attribute 
-     * definition in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLSelectElement.java b/src/org/w3c/dom/html/HTMLSelectElement.java
deleted file mode 100644
index 485681d..0000000
--- a/src/org/w3c/dom/html/HTMLSelectElement.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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.html;
-
-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.0.
- */
-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();
-    public void setSelectedIndex(int selectedIndex);
-
-    /**
-     *  The current form control value. 
-     */
-    public String getValue();
-    public void setValue(String value);
-
-    /**
-     *  The number of options in this <code>SELECT</code> . 
-     */
-    public int getLength();
-
-    /**
-     *  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. 
-     */
-    public HTMLCollection getOptions();
-
-    /**
-     *  The control is unavailable in this context. See the  disabled 
-     * attribute definition in HTML 4.0.
-     */
-    public boolean getDisabled();
-    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.0.
-     */
-    public boolean getMultiple();
-    public void setMultiple(boolean multiple);
-
-    /**
-     *  Form control or object name when submitted with a form. See the  name 
-     * attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  Number of visible rows. See the  size attribute definition in HTML 4.0.
-     */
-    public int getSize();
-    public void setSize(int size);
-
-    /**
-     *  Index that represents the element's position in the tabbing order. See 
-     * the  tabindex attribute definition in HTML 4.0.
-     */
-    public int getTabIndex();
-    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.
-     * @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();
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLStyleElement.java b/src/org/w3c/dom/html/HTMLStyleElement.java
deleted file mode 100644
index 018d32e..0000000
--- a/src/org/w3c/dom/html/HTMLStyleElement.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Style information. See the  STYLE element definition in HTML 4.0, the  
- * module and the <code>LinkStyle</code> interface in the  module. 
- */
-public interface HTMLStyleElement extends HTMLElement {
-    /**
-     *  Enables/disables the style sheet. 
-     */
-    public boolean getDisabled();
-    public void setDisabled(boolean disabled);
-
-    /**
-     *  Designed for use with one or more target media. See the  media 
-     * attribute definition in HTML 4.0.
-     */
-    public String getMedia();
-    public void setMedia(String media);
-
-    /**
-     *  The content type pf the style sheet language. See the  type attribute 
-     * definition in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTableCaptionElement.java b/src/org/w3c/dom/html/HTMLTableCaptionElement.java
deleted file mode 100644
index b34de22..0000000
--- a/src/org/w3c/dom/html/HTMLTableCaptionElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Table caption See the  CAPTION element definition in HTML 4.0.
- */
-public interface HTMLTableCaptionElement extends HTMLElement {
-    /**
-     *  Caption alignment with respect to the table. See the  align attribute 
-     * definition in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTableCellElement.java b/src/org/w3c/dom/html/HTMLTableCellElement.java
deleted file mode 100644
index bdf8187..0000000
--- a/src/org/w3c/dom/html/HTMLTableCellElement.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  The object used to represent the <code>TH</code> and <code>TD</code> 
- * elements. See the  TD element definition in HTML 4.0.
- */
-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.0.
-     */
-    public String getAbbr();
-    public void setAbbr(String abbr);
-
-    /**
-     *  Horizontal alignment of data in cell. See the  align attribute 
-     * definition in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-    /**
-     *  Names group of related headers. See the  axis attribute definition in 
-     * HTML 4.0.
-     */
-    public String getAxis();
-    public void setAxis(String axis);
-
-    /**
-     *  Cell background color. See the  bgcolor attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getBgColor();
-    public void setBgColor(String bgColor);
-
-    /**
-     *  Alignment character for cells in a column. See the  char attribute 
-     * definition in HTML 4.0.
-     */
-    public String getCh();
-    public void setCh(String ch);
-
-    /**
-     *  Offset of alignment character. See the  charoff attribute definition 
-     * in HTML 4.0.
-     */
-    public String getChOff();
-    public void setChOff(String chOff);
-
-    /**
-     *  Number of columns spanned by cell. See the  colspan attribute 
-     * definition in HTML 4.0.
-     */
-    public int getColSpan();
-    public void setColSpan(int colSpan);
-
-    /**
-     *  List of <code>id</code> attribute values for header cells. See the  
-     * headers attribute definition in HTML 4.0.
-     */
-    public String getHeaders();
-    public void setHeaders(String headers);
-
-    /**
-     *  Cell height. See the  height attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getHeight();
-    public void setHeight(String height);
-
-    /**
-     *  Suppress word wrapping. See the  nowrap attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public boolean getNoWrap();
-    public void setNoWrap(boolean noWrap);
-
-    /**
-     *  Number of rows spanned by cell. See the  rowspan attribute definition 
-     * in HTML 4.0.
-     */
-    public int getRowSpan();
-    public void setRowSpan(int rowSpan);
-
-    /**
-     *  Scope covered by header cells. See the  scope attribute definition in 
-     * HTML 4.0.
-     */
-    public String getScope();
-    public void setScope(String scope);
-
-    /**
-     *  Vertical alignment of data in cell. See the  valign attribute 
-     * definition in HTML 4.0.
-     */
-    public String getVAlign();
-    public void setVAlign(String vAlign);
-
-    /**
-     *  Cell width. See the  width attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getWidth();
-    public void setWidth(String width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTableColElement.java b/src/org/w3c/dom/html/HTMLTableColElement.java
deleted file mode 100644
index dca9bfb..0000000
--- a/src/org/w3c/dom/html/HTMLTableColElement.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Regroups the <code>COL</code> and <code>COLGROUP</code> elements. See the  
- * COL element definition in HTML 4.0.
- */
-public interface HTMLTableColElement extends HTMLElement {
-    /**
-     *  Horizontal alignment of cell data in column. See the  align attribute 
-     * definition in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-    /**
-     *  Alignment character for cells in a column. See the  char attribute 
-     * definition in HTML 4.0.
-     */
-    public String getCh();
-    public void setCh(String ch);
-
-    /**
-     *  Offset of alignment character. See the  charoff attribute definition 
-     * in HTML 4.0.
-     */
-    public String getChOff();
-    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.0.
-     */
-    public int getSpan();
-    public void setSpan(int span);
-
-    /**
-     *  Vertical alignment of cell data in column. See the  valign attribute 
-     * definition in HTML 4.0.
-     */
-    public String getVAlign();
-    public void setVAlign(String vAlign);
-
-    /**
-     *  Default column width. See the  width attribute definition in HTML 4.0.
-     */
-    public String getWidth();
-    public void setWidth(String width);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTableElement.java b/src/org/w3c/dom/html/HTMLTableElement.java
deleted file mode 100644
index c2b815a..0000000
--- a/src/org/w3c/dom/html/HTMLTableElement.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * 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.html;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  The create* and delete* methods on the table allow authors to construct 
- * and modify tables. HTML 4.0 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.0.
- */
-public interface HTMLTableElement extends HTMLElement {
-    /**
-     *  Returns the table's <code>CAPTION</code> , or void if none exists. 
-     */
-    public HTMLTableCaptionElement getCaption();
-    public void setCaption(HTMLTableCaptionElement caption);
-
-    /**
-     *  Returns the table's <code>THEAD</code> , or <code>null</code> if none 
-     * exists. 
-     */
-    public HTMLTableSectionElement getTHead();
-    public void setTHead(HTMLTableSectionElement tHead);
-
-    /**
-     *  Returns the table's <code>TFOOT</code> , or <code>null</code> if none 
-     * exists. 
-     */
-    public HTMLTableSectionElement getTFoot();
-    public void setTFoot(HTMLTableSectionElement tFoot);
-
-    /**
-     *  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 defined table bodies. 
-     */
-    public HTMLCollection getTBodies();
-
-    /**
-     *  Specifies the table's position with respect to the rest of the 
-     * document. See the  align attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-    /**
-     *  Cell background color. See the  bgcolor attribute definition in HTML 
-     * 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getBgColor();
-    public void setBgColor(String bgColor);
-
-    /**
-     *  The width of the border around the table. See the  border attribute 
-     * definition in HTML 4.0.
-     */
-    public String getBorder();
-    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.0.
-     */
-    public String getCellPadding();
-    public void setCellPadding(String cellPadding);
-
-    /**
-     *  Specifies the horizontal and vertical separation between cells. See 
-     * the  cellspacing attribute definition in HTML 4.0.
-     */
-    public String getCellSpacing();
-    public void setCellSpacing(String cellSpacing);
-
-    /**
-     *  Specifies which external table borders to render. See the  frame 
-     * attribute definition in HTML 4.0.
-     */
-    public String getFrame();
-    public void setFrame(String frame);
-
-    /**
-     *  Specifies which internal table borders to render. See the  rules 
-     * attribute definition in HTML 4.0.
-     */
-    public String getRules();
-    public void setRules(String rules);
-
-    /**
-     *  Description about the purpose or structure of a table. See the  
-     * summary attribute definition in HTML 4.0.
-     */
-    public String getSummary();
-    public void setSummary(String summary);
-
-    /**
-     *  Specifies the desired table width. See the  width attribute definition 
-     * in HTML 4.0.
-     */
-    public String getWidth();
-    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 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. Note. A table row cannot be empty 
-     * according to HTML 4.0 Recommendation.
-     * @param index  The row number where to insert a new row. This index 
-     *   starts from 0 and is relative to all the rows contained inside the 
-     *   table, regardless of section parentage.
-     * @return  The newly created row.
-     * @exception DOMException
-     *    INDEX_SIZE_ERR: Raised if the specified index is greater than the 
-     *   number of rows.
-     */
-    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 all the rows contained inside the table, 
-     *   regardless of section parentage.
-     * @exception DOMException
-     *    INDEX_SIZE_ERR: Raised if the specified index is greater than or 
-     *   equal to the number of rows.
-     */
-    public void deleteRow(int index)
-                          throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTableRowElement.java b/src/org/w3c/dom/html/HTMLTableRowElement.java
deleted file mode 100644
index fd40abd..0000000
--- a/src/org/w3c/dom/html/HTMLTableRowElement.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.html;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  A row in a table. See the  TR element definition in HTML 4.0.
- */
-public interface HTMLTableRowElement extends HTMLElement {
-    /**
-     *  The index of this row, relative to the entire table, starting from 0. 
-     * This is in document tree order and not display order. The 
-     * <code>rowIndex</code> does not take into account sections (
-     * <code>THEAD</code> , <code>TFOOT</code> , or <code>TBODY</code> ) 
-     * within the table.
-     */
-    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.
-     */
-    public int getSectionRowIndex();
-
-    /**
-     *  The collection of cells in this row. 
-     */
-    public HTMLCollection getCells();
-
-    /**
-     *  Horizontal alignment of data within cells of this row. See the  align 
-     * attribute definition in HTML 4.0.
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-    /**
-     *  Background color for rows. See the  bgcolor attribute definition in 
-     * HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public String getBgColor();
-    public void setBgColor(String bgColor);
-
-    /**
-     *  Alignment character for cells in a column. See the  char attribute 
-     * definition in HTML 4.0.
-     */
-    public String getCh();
-    public void setCh(String ch);
-
-    /**
-     *  Offset of alignment character. See the  charoff attribute definition 
-     * in HTML 4.0.
-     */
-    public String getChOff();
-    public void setChOff(String chOff);
-
-    /**
-     *  Vertical alignment of data within cells of this row. See the  valign 
-     * attribute definition in HTML 4.0.
-     */
-    public String getVAlign();
-    public void setVAlign(String vAlign);
-
-    /**
-     *  Insert an empty <code>TD</code> cell into this row. If 
-     * <code>index</code> is 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.
-     */
-    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.
-     * @exception DOMException
-     *    INDEX_SIZE_ERR: Raised if the specified <code>index</code> is 
-     *   greater than or equal to the number of cells.
-     */
-    public void deleteCell(int index)
-                           throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTableSectionElement.java b/src/org/w3c/dom/html/HTMLTableSectionElement.java
deleted file mode 100644
index 90672b7..0000000
--- a/src/org/w3c/dom/html/HTMLTableSectionElement.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.html;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  The <code>THEAD</code> , <code>TFOOT</code> , and <code>TBODY</code> 
- * elements. 
- */
-public interface HTMLTableSectionElement extends HTMLElement {
-    /**
-     *  Horizontal alignment of data in cells. See the <code>align</code> 
-     * attribute for HTMLTheadElement for details. 
-     */
-    public String getAlign();
-    public void setAlign(String align);
-
-    /**
-     *  Alignment character for cells in a column. See the  char attribute 
-     * definition in HTML 4.0.
-     */
-    public String getCh();
-    public void setCh(String ch);
-
-    /**
-     *  Offset of alignment character. See the  charoff attribute definition 
-     * in HTML 4.0.
-     */
-    public String getChOff();
-    public void setChOff(String chOff);
-
-    /**
-     *  Vertical alignment of data in cells. See the <code>valign</code> 
-     * attribute for HTMLTheadElement for details. 
-     */
-    public String getVAlign();
-    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 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.
-     */
-    public HTMLElement insertRow(int index)
-                                 throws DOMException;
-
-    /**
-     *  Delete a row from this section.
-     * @param index  The index of the row to be deleted. 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.
-     */
-    public void deleteRow(int index)
-                          throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTextAreaElement.java b/src/org/w3c/dom/html/HTMLTextAreaElement.java
deleted file mode 100644
index 935a727..0000000
--- a/src/org/w3c/dom/html/HTMLTextAreaElement.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Multi-line text field. See the  TEXTAREA element definition in HTML 4.0.
- */
-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. Changing this attribute, however, 
-     * resets the contents of the form control.
-     */
-    public String getDefaultValue();
-    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.0.
-     */
-    public String getAccessKey();
-    public void setAccessKey(String accessKey);
-
-    /**
-     *  Width of control (in characters). See the  cols attribute definition 
-     * in HTML 4.0.
-     */
-    public int getCols();
-    public void setCols(int cols);
-
-    /**
-     *  The control is unavailable in this context. See the  disabled 
-     * attribute definition in HTML 4.0.
-     */
-    public boolean getDisabled();
-    public void setDisabled(boolean disabled);
-
-    /**
-     *  Form control or object name when submitted with a form. See the  name 
-     * attribute definition in HTML 4.0.
-     */
-    public String getName();
-    public void setName(String name);
-
-    /**
-     *  This control is read-only. See the  readonly attribute definition in 
-     * HTML 4.0.
-     */
-    public boolean getReadOnly();
-    public void setReadOnly(boolean readOnly);
-
-    /**
-     *  Number of text rows. See the  rows attribute definition in HTML 4.0.
-     */
-    public int getRows();
-    public void setRows(int rows);
-
-    /**
-     *  Index that represents the element's position in the tabbing order. See 
-     * the  tabindex attribute definition in HTML 4.0.
-     */
-    public int getTabIndex();
-    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();
-    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();
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLTitleElement.java b/src/org/w3c/dom/html/HTMLTitleElement.java
deleted file mode 100644
index c99a91f..0000000
--- a/src/org/w3c/dom/html/HTMLTitleElement.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  The document title. See the  TITLE element definition in HTML 4.0.
- */
-public interface HTMLTitleElement extends HTMLElement {
-    /**
-     *  The specified title as a string. 
-     */
-    public String getText();
-    public void setText(String text);
-
-}
-
diff --git a/src/org/w3c/dom/html/HTMLUListElement.java b/src/org/w3c/dom/html/HTMLUListElement.java
deleted file mode 100644
index 27bbb1d..0000000
--- a/src/org/w3c/dom/html/HTMLUListElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.html;
-
-/**
- *  Unordered list. See the  UL element definition in HTML 4.0.
- */
-public interface HTMLUListElement extends HTMLElement {
-    /**
-     *  Reduce spacing between list items. See the  compact attribute 
-     * definition in HTML 4.0. This attribute is deprecated in HTML 4.0.
-     */
-    public boolean getCompact();
-    public void setCompact(boolean compact);
-
-    /**
-     *  Bullet style. See the  type attribute definition in HTML 4.0. This 
-     * attribute is deprecated in HTML 4.0.
-     */
-    public String getType();
-    public void setType(String type);
-
-}
-
diff --git a/src/org/w3c/dom/html/package.html b/src/org/w3c/dom/html/package.html
deleted file mode 100644
index 0845ac5..0000000
--- a/src/org/w3c/dom/html/package.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-                      "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-    <title>W3C IPR SOFTWARE NOTICE</title>
-  </head>
-  <body bgcolor="#FFFFFF" text="#000000">
-    <p>
-      The goals of the HTML-specific DOM API are to specialize and 
-      add functionality that relates specifically to HTML documents 
-      and elements; to address issues of backwards compatibility 
-      with the DOM Level 0; and to provide convenience mechanisms, 
-      where appropriate, for common and frequent operations on HTML 
-      documents. 
-    </p>
-    <h1>
-      W3C IPR SOFTWARE NOTICE
-    </h1>
-    <h3>
-      Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
-      Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</loc>, <loc
-      href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
-      Reserved.
-    </h3>
-    <p>
-      The DOM bindings are published under the W3C Software Copyright Notice
-      and License. The software license requires "Notice of any changes or
-      modifications to the W3C files, including the date changes were made."
-      Consequently, modified versions of the DOM bindings must document that
-      they do not conform to the W3C standard; in the case of the IDL binding,
-      the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-      binding, the package names can no longer be in the 'org.w3c' package.
-    </p>
-    <p>
-      <b>Note:</b> The original version of the W3C Software Copyright Notice
-      and License could be found at <a
-      href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
-    </p>
-    <h3>
-      Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
-      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</a>, <a
-      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
-      Reserved. http://www.w3.org/Consortium/Legal/
-    </h3>
-    <p>
-      This W3C work (including software, documents, or other related items) is
-      being provided by the copyright holders under the following license. By
-      obtaining, using and/or copying this work, you (the licensee) agree that
-      you have read, understood, and will comply with the following terms and
-      conditions:
-    </p>
-    <p>
-      Permission to use, copy, and modify this software and its documentation,
-      with or without modification,&nbsp; for any purpose and without fee or
-      royalty is hereby granted, provided that you include the following on ALL
-      copies of the software and documentation or portions thereof, including
-      modifications, that you make:
-    </p>
-    <ol>
-      <li>
-	The full text of this NOTICE in a location viewable to users of the
-	redistributed or derivative work.
-      </li>
-      <li>
-	Any pre-existing intellectual property disclaimers, notices, or terms
-	and conditions. If none exist, a short notice of the following form
-	(hypertext is preferred, text is permitted) should be used within the
-	body of any redistributed or derivative code: "Copyright &copy;
-	[$date-of-software] <a href="http://www.w3.org/">World Wide Web
-	Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-	Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-	National de Recherche en Informatique et en Automatique</a>, <a
-	href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
-	Reserved. http://www.w3.org/Consortium/Legal/"
-      </li>
-      <li>
-	Notice of any changes or modifications to the W3C files, including the
-	date changes were made. (We recommend you provide URIs to the location
-	from which the code is derived.)
-      </li>
-    </ol>
-    <p>
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
-      HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
-      INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
-      FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
-      DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
-      TRADEMARKS OR OTHER RIGHTS.
-    </p>
-    <p>
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-      CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-      DOCUMENTATION.
-    </p>
-    <p>
-      The name and trademarks of copyright holders may NOT be used in
-      advertising or publicity pertaining to the software without specific,
-      written prior permission. Title to copyright in this software and any
-      associated documentation will at all times remain with copyright
-      holders.
-    </p>
-  </body>
-</html>
diff --git a/src/org/w3c/dom/package.html b/src/org/w3c/dom/package.html
deleted file mode 100644
index 06c5c42..0000000
--- a/src/org/w3c/dom/package.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-                      "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-    <title>W3C IPR SOFTWARE NOTICE</title>
-  </head>
-  <body bgcolor="#FFFFFF" text="#000000">
-    <p>
-      Document Object Model Level 2 Core is a platform and 
-      language-neutral interface that allows programs and scripts to
-      dynamically access and update the content and structure of 
-      documents. The Document Object Model Level 2 Core builds on 
-      the Document Object Model Level 1 Core.
-    </p>
-    <p>
-      The DOM Level 2 Core is made of a set of core interfaces to 
-      create and manipulate the structure and contents of a document. 
-      The Core also contains specialized interfaces dedicated to XML.
-    </p>
-    <h1>
-      W3C IPR SOFTWARE NOTICE
-    </h1>
-    <h3>
-      Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
-      Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</loc>, <loc
-      href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
-      Reserved.
-    </h3>
-    <p>
-      The DOM bindings are published under the W3C Software Copyright Notice
-      and License. The software license requires "Notice of any changes or
-      modifications to the W3C files, including the date changes were made."
-      Consequently, modified versions of the DOM bindings must document that
-      they do not conform to the W3C standard; in the case of the IDL binding,
-      the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-      binding, the package names can no longer be in the 'org.w3c' package.
-    </p>
-    <p>
-      <b>Note:</b> The original version of the W3C Software Copyright Notice
-      and License could be found at <a
-      href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
-    </p>
-    <h3>
-      Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
-      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</a>, <a
-      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
-      Reserved. http://www.w3.org/Consortium/Legal/
-    </h3>
-    <p>
-      This W3C work (including software, documents, or other related items) is
-      being provided by the copyright holders under the following license. By
-      obtaining, using and/or copying this work, you (the licensee) agree that
-      you have read, understood, and will comply with the following terms and
-      conditions:
-    </p>
-    <p>
-      Permission to use, copy, and modify this software and its documentation,
-      with or without modification,&nbsp; for any purpose and without fee or
-      royalty is hereby granted, provided that you include the following on ALL
-      copies of the software and documentation or portions thereof, including
-      modifications, that you make:
-    </p>
-    <ol>
-      <li>
-	The full text of this NOTICE in a location viewable to users of the
-	redistributed or derivative work.
-      </li>
-      <li>
-	Any pre-existing intellectual property disclaimers, notices, or terms
-	and conditions. If none exist, a short notice of the following form
-	(hypertext is preferred, text is permitted) should be used within the
-	body of any redistributed or derivative code: "Copyright &copy;
-	[$date-of-software] <a href="http://www.w3.org/">World Wide Web
-	Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-	Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-	National de Recherche en Informatique et en Automatique</a>, <a
-	href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
-	Reserved. http://www.w3.org/Consortium/Legal/"
-      </li>
-      <li>
-	Notice of any changes or modifications to the W3C files, including the
-	date changes were made. (We recommend you provide URIs to the location
-	from which the code is derived.)
-      </li>
-    </ol>
-    <p>
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
-      HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
-      INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
-      FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
-      DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
-      TRADEMARKS OR OTHER RIGHTS.
-    </p>
-    <p>
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-      CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-      DOCUMENTATION.
-    </p>
-    <p>
-      The name and trademarks of copyright holders may NOT be used in
-      advertising or publicity pertaining to the software without specific,
-      written prior permission. Title to copyright in this software and any
-      associated documentation will at all times remain with copyright
-      holders.
-    </p>
-  </body>
-</html>
diff --git a/src/org/w3c/dom/ranges/DocumentRange.java b/src/org/w3c/dom/ranges/DocumentRange.java
deleted file mode 100644
index 6b52267..0000000
--- a/src/org/w3c/dom/ranges/DocumentRange.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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();
-
-}
diff --git a/src/org/w3c/dom/ranges/Range.java b/src/org/w3c/dom/ranges/Range.java
deleted file mode 100644
index 7743abe..0000000
--- a/src/org/w3c/dom/ranges/Range.java
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- * 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.DocumentFragment;
-import org.w3c.dom.DOMException;
-
-/**
- * <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 refNodeThe <code>refNode</code> value. This parameter must be 
-     *   different from <code>null</code>.
-     * @param offsetThe <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.
-     */
-    public void setStart(Node refNode, 
-                         int offset)
-                         throws RangeException, DOMException;
-
-    /**
-     * Sets the attributes describing the end of a Range.
-     * @param refNodeThe <code>refNode</code> value. This parameter must be 
-     *   different from <code>null</code>.
-     * @param offsetThe <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.
-     */
-    public void setEnd(Node refNode, 
-                       int offset)
-                       throws RangeException, DOMException;
-
-    /**
-     * Sets the start position to be before a node
-     * @param refNodeRange 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.
-     */
-    public void setStartBefore(Node refNode)
-                               throws RangeException, DOMException;
-
-    /**
-     * Sets the start position to be after a node
-     * @param refNodeRange 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.
-     */
-    public void setStartAfter(Node refNode)
-                              throws RangeException, DOMException;
-
-    /**
-     * Sets the end position to be before a node. 
-     * @param refNodeRange 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.
-     */
-    public void setEndBefore(Node refNode)
-                             throws RangeException, DOMException;
-
-    /**
-     * Sets the end of a Range to be after a node 
-     * @param refNodeRange 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.
-     */
-    public void setEndAfter(Node refNode)
-                            throws RangeException, DOMException;
-
-    /**
-     * Collapse a Range onto one of its boundary-points 
-     * @param toStartIf 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 refNodeThe 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.
-     */
-    public void selectNode(Node refNode)
-                           throws RangeException, DOMException;
-
-    /**
-     * Select the contents within a node 
-     * @param refNodeNode 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.
-     */
-    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 howA code representing the type of comparison, as defined above.
-     * @param sourceRangeThe <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 newNodeThe 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 newParentThe 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;
-
-}
diff --git a/src/org/w3c/dom/ranges/RangeException.java b/src/org/w3c/dom/ranges/RangeException.java
deleted file mode 100644
index 551008e..0000000
--- a/src/org/w3c/dom/ranges/RangeException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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;
-
-}
diff --git a/src/org/w3c/dom/ranges/package.html b/src/org/w3c/dom/ranges/package.html
deleted file mode 100644
index e0b5cac..0000000
--- a/src/org/w3c/dom/ranges/package.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-                      "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-    <title>W3C IPR SOFTWARE NOTICE</title>
-  </head>
-  <body bgcolor="#FFFFFF" text="#000000">
-    <p>
-      Document Object Model Level 2 Traversal and Range is a 
-      platform and language-neutral interfaces that allow programs 
-      and scripts to dynamically traverse and identify a range of
-      content in a document. The Document Object Model Level 2 
-      Traversal and Range build on the Document Object Model Level 2
-      Core.
-    </p>
-    <p>
-      The DOM Level 2 Traversal and Range specification is composed
-      of two modules. The two modules contain specialized interfaces 
-      dedicated to traversing the document structure and identifying 
-      and manipulating a range in a document.
-    </p>
-    <h1>
-      W3C IPR SOFTWARE NOTICE
-    </h1>
-    <h3>
-      Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
-      Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</loc>, <loc
-      href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
-      Reserved.
-    </h3>
-    <p>
-      The DOM bindings are published under the W3C Software Copyright Notice
-      and License. The software license requires "Notice of any changes or
-      modifications to the W3C files, including the date changes were made."
-      Consequently, modified versions of the DOM bindings must document that
-      they do not conform to the W3C standard; in the case of the IDL binding,
-      the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-      binding, the package names can no longer be in the 'org.w3c' package.
-    </p>
-    <p>
-      <b>Note:</b> The original version of the W3C Software Copyright Notice
-      and License could be found at <a
-      href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
-    </p>
-    <h3>
-      Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
-      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</a>, <a
-      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
-      Reserved. http://www.w3.org/Consortium/Legal/
-    </h3>
-    <p>
-      This W3C work (including software, documents, or other related items) is
-      being provided by the copyright holders under the following license. By
-      obtaining, using and/or copying this work, you (the licensee) agree that
-      you have read, understood, and will comply with the following terms and
-      conditions:
-    </p>
-    <p>
-      Permission to use, copy, and modify this software and its documentation,
-      with or without modification,&nbsp; for any purpose and without fee or
-      royalty is hereby granted, provided that you include the following on ALL
-      copies of the software and documentation or portions thereof, including
-      modifications, that you make:
-    </p>
-    <ol>
-      <li>
-	The full text of this NOTICE in a location viewable to users of the
-	redistributed or derivative work.
-      </li>
-      <li>
-	Any pre-existing intellectual property disclaimers, notices, or terms
-	and conditions. If none exist, a short notice of the following form
-	(hypertext is preferred, text is permitted) should be used within the
-	body of any redistributed or derivative code: "Copyright &copy;
-	[$date-of-software] <a href="http://www.w3.org/">World Wide Web
-	Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-	Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-	National de Recherche en Informatique et en Automatique</a>, <a
-	href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
-	Reserved. http://www.w3.org/Consortium/Legal/"
-      </li>
-      <li>
-	Notice of any changes or modifications to the W3C files, including the
-	date changes were made. (We recommend you provide URIs to the location
-	from which the code is derived.)
-      </li>
-    </ol>
-    <p>
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
-      HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
-      INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
-      FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
-      DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
-      TRADEMARKS OR OTHER RIGHTS.
-    </p>
-    <p>
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-      CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-      DOCUMENTATION.
-    </p>
-    <p>
-      The name and trademarks of copyright holders may NOT be used in
-      advertising or publicity pertaining to the software without specific,
-      written prior permission. Title to copyright in this software and any
-      associated documentation will at all times remain with copyright
-      holders.
-    </p>
-  </body>
-</html>
diff --git a/src/org/w3c/dom/traversal/DocumentTraversal.java b/src/org/w3c/dom/traversal/DocumentTraversal.java
deleted file mode 100644
index 0acd5f4..0000000
--- a/src/org/w3c/dom/traversal/DocumentTraversal.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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 iterators and 
- * tree-walkers 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 rootThe node which will be iterated together with its children. 
-     *   The iterator 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 whatToShowThis flag specifies which node types may appear in 
-     *   the logical view of the tree presented by the iterator. 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 filterThe <code>NodeFilter</code> to be used with this 
-     *   <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
-     * @param entityReferenceExpansionThe 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 rootThe 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 whatToShowThis flag specifies which node types may appear in 
-     *   the logical view of the tree presented by the tree-walker. See the 
-     *   description of <code>NodeFilter</code> for the set of possible 
-     *   SHOW_ values.These flags can be combined using <code>OR</code>.
-     * @param filterThe <code>NodeFilter</code> to be used with this 
-     *   <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
-     * @param entityReferenceExpansionIf 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;
-
-}
diff --git a/src/org/w3c/dom/traversal/NodeFilter.java b/src/org/w3c/dom/traversal/NodeFilter.java
deleted file mode 100644
index d8eaae6..0000000
--- a/src/org/w3c/dom/traversal/NodeFilter.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * 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 
-     * iterator or tree-walker 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 iterator or tree-walker 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 iterator or tree-walker 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 nThe 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);
-
-}
diff --git a/src/org/w3c/dom/traversal/NodeIterator.java b/src/org/w3c/dom/traversal/NodeIterator.java
deleted file mode 100644
index 1035faf..0000000
--- a/src/org/w3c/dom/traversal/NodeIterator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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>Iterators</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 iterators 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 
-     * iterator. 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 iterator. If false, they  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 
-     * iterator. 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 
-     * iterator 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 iterator 
-     * 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();
-
-}
diff --git a/src/org/w3c/dom/traversal/TreeWalker.java b/src/org/w3c/dom/traversal/TreeWalker.java
deleted file mode 100644
index b109e8d..0000000
--- a/src/org/w3c/dom/traversal/TreeWalker.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * 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, 
-     * they  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. 
-     * @exception DOMException
-     *   NOT_SUPPORTED_ERR: Raised if an attempt is made to set 
-     *   <code>currentNode</code> to <code>null</code>.
-     */
-    public Node getCurrentNode();
-    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();
-
-}
diff --git a/src/org/w3c/dom/traversal/package.html b/src/org/w3c/dom/traversal/package.html
deleted file mode 100644
index e0b5cac..0000000
--- a/src/org/w3c/dom/traversal/package.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-                      "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-    <title>W3C IPR SOFTWARE NOTICE</title>
-  </head>
-  <body bgcolor="#FFFFFF" text="#000000">
-    <p>
-      Document Object Model Level 2 Traversal and Range is a 
-      platform and language-neutral interfaces that allow programs 
-      and scripts to dynamically traverse and identify a range of
-      content in a document. The Document Object Model Level 2 
-      Traversal and Range build on the Document Object Model Level 2
-      Core.
-    </p>
-    <p>
-      The DOM Level 2 Traversal and Range specification is composed
-      of two modules. The two modules contain specialized interfaces 
-      dedicated to traversing the document structure and identifying 
-      and manipulating a range in a document.
-    </p>
-    <h1>
-      W3C IPR SOFTWARE NOTICE
-    </h1>
-    <h3>
-      Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
-      Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</loc>, <loc
-      href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
-      Reserved.
-    </h3>
-    <p>
-      The DOM bindings are published under the W3C Software Copyright Notice
-      and License. The software license requires "Notice of any changes or
-      modifications to the W3C files, including the date changes were made."
-      Consequently, modified versions of the DOM bindings must document that
-      they do not conform to the W3C standard; in the case of the IDL binding,
-      the pragma prefix can no longer be 'w3c.org'; in the case of the Java
-      binding, the package names can no longer be in the 'org.w3c' package.
-    </p>
-    <p>
-      <b>Note:</b> The original version of the W3C Software Copyright Notice
-      and License could be found at <a
-      href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
-    </p>
-    <h3>
-      Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
-      Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-      Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-      National de Recherche en Informatique et en Automatique</a>, <a
-      href="http://www.keio.ac.jp/">Keio University</a>). All Rights
-      Reserved. http://www.w3.org/Consortium/Legal/
-    </h3>
-    <p>
-      This W3C work (including software, documents, or other related items) is
-      being provided by the copyright holders under the following license. By
-      obtaining, using and/or copying this work, you (the licensee) agree that
-      you have read, understood, and will comply with the following terms and
-      conditions:
-    </p>
-    <p>
-      Permission to use, copy, and modify this software and its documentation,
-      with or without modification,&nbsp; for any purpose and without fee or
-      royalty is hereby granted, provided that you include the following on ALL
-      copies of the software and documentation or portions thereof, including
-      modifications, that you make:
-    </p>
-    <ol>
-      <li>
-	The full text of this NOTICE in a location viewable to users of the
-	redistributed or derivative work.
-      </li>
-      <li>
-	Any pre-existing intellectual property disclaimers, notices, or terms
-	and conditions. If none exist, a short notice of the following form
-	(hypertext is preferred, text is permitted) should be used within the
-	body of any redistributed or derivative code: "Copyright &copy;
-	[$date-of-software] <a href="http://www.w3.org/">World Wide Web
-	Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
-	Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
-	National de Recherche en Informatique et en Automatique</a>, <a
-	href="http://www.keio.ac.jp/">Keio University</a>).  All Rights
-	Reserved. http://www.w3.org/Consortium/Legal/"
-      </li>
-      <li>
-	Notice of any changes or modifications to the W3C files, including the
-	date changes were made. (We recommend you provide URIs to the location
-	from which the code is derived.)
-      </li>
-    </ol>
-    <p>
-      THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
-      HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
-      INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
-      FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
-      DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
-      TRADEMARKS OR OTHER RIGHTS.
-    </p>
-    <p>
-      COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-      CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-      DOCUMENTATION.
-    </p>
-    <p>
-      The name and trademarks of copyright holders may NOT be used in
-      advertising or publicity pertaining to the software without specific,
-      written prior permission. Title to copyright in this software and any
-      associated documentation will at all times remain with copyright
-      holders.
-    </p>
-  </body>
-</html>
diff --git a/src/org/xml/sax/AttributeList.java b/src/org/xml/sax/AttributeList.java
deleted file mode 100644
index 9336cef..0000000
--- a/src/org/xml/sax/AttributeList.java
+++ /dev/null
@@ -1,191 +0,0 @@
-// SAX Attribute List Interface.
-// No warranty; no copyright -- use this as you will.
-// $Id: AttributeList.java,v 1.4 2000/05/05 17:44:56 david Exp $
-
-package org.xml.sax;
-
-/**
- * Interface for an element's attribute specifications.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This is the original SAX1 interface for reporting an element's
- * attributes.  Unlike the new {@link org.xml.sax.Attributes Attributes}
- * interface, it does not support Namespace-related information.</p>
- *
- * <p>When an attribute list is supplied as part of a
- * {@link org.xml.sax.DocumentHandler#startElement startElement}
- * event, the list will return valid results only during the
- * scope of the event; once the event handler returns control
- * to the parser, the attribute list is invalid.  To save a
- * persistent copy of the attribute list, use the SAX1
- * {@link org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
- * helper class.</p>
- *
- * <p>An attribute list includes only attributes that have been
- * specified or defaulted: #IMPLIED attributes will not be included.</p>
- *
- * <p>There are two ways for the SAX application to obtain information
- * from the AttributeList.  First, it can iterate through the entire
- * list:</p>
- *
- * <pre>
- * public void startElement (String name, AttributeList atts) {
- *   for (int i = 0; i < atts.getLength(); i++) {
- *     String name = atts.getName(i);
- *     String type = atts.getType(i);
- *     String value = atts.getValue(i);
- *     [...]
- *   }
- * }
- * </pre>
- *
- * <p>(Note that the result of getLength() will be zero if there
- * are no attributes.)
- *
- * <p>As an alternative, the application can request the value or
- * type of specific attributes:</p>
- *
- * <pre>
- * public void startElement (String name, AttributeList atts) {
- *   String identifier = atts.getValue("id");
- *   String label = atts.getValue("label");
- *   [...]
- * }
- * </pre>
- *
- * @deprecated This interface has been replaced by the SAX2
- *             {@link org.xml.sax.Attributes Attributes}
- *             interface, which includes Namespace support.
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.DocumentHandler#startElement startElement
- * @see org.xml.sax.helpers.AttributeListImpl AttributeListImpl
- */
-public interface AttributeList {
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Iteration methods.
-    ////////////////////////////////////////////////////////////////////
-    
-
-    /**
-     * Return the number of attributes in this list.
-     *
-     * <p>The SAX parser may provide attributes in any
-     * arbitrary order, regardless of the order in which they were
-     * declared or specified.  The number of attributes may be
-     * zero.</p>
-     *
-     * @return The number of attributes in the list.  
-     */
-    public abstract int getLength ();
-    
-    
-    /**
-     * Return the name of an attribute in this list (by position).
-     *
-     * <p>The names must be unique: the SAX parser shall not include the
-     * same attribute twice.  Attributes without values (those declared
-     * #IMPLIED without a value specified in the start tag) will be
-     * omitted from the list.</p>
-     *
-     * <p>If the attribute name has a namespace prefix, the prefix
-     * will still be attached.</p>
-     *
-     * @param i The index of the attribute in the list (starting at 0).
-     * @return The name of the indexed attribute, or null
-     *         if the index is out of range.
-     * @see #getLength 
-     */
-    public abstract String getName (int i);
-    
-    
-    /**
-     * Return the type of an attribute in the list (by position).
-     *
-     * <p>The attribute type is one of the strings "CDATA", "ID",
-     * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
-     * or "NOTATION" (always in upper case).</p>
-     *
-     * <p>If the parser has not read a declaration for the attribute,
-     * or if the parser does not report attribute types, then it must
-     * return the value "CDATA" as stated in the XML 1.0 Recommentation
-     * (clause 3.3.3, "Attribute-Value Normalization").</p>
-     *
-     * <p>For an enumerated attribute that is not a notation, the
-     * parser will report the type as "NMTOKEN".</p>
-     *
-     * @param i The index of the attribute in the list (starting at 0).
-     * @return The attribute type as a string, or
-     *         null if the index is out of range.
-     * @see #getLength 
-     * @see #getType(java.lang.String)
-     */
-    public abstract String getType (int i);
-    
-    
-    /**
-     * Return the value of an attribute in the list (by position).
-     *
-     * <p>If the attribute value is a list of tokens (IDREFS,
-     * ENTITIES, or NMTOKENS), the tokens will be concatenated
-     * into a single string separated by whitespace.</p>
-     *
-     * @param i The index of the attribute in the list (starting at 0).
-     * @return The attribute value as a string, or
-     *         null if the index is out of range.
-     * @see #getLength
-     * @see #getValue(java.lang.String)
-     */
-    public abstract String getValue (int i);
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Lookup methods.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Return the type of an attribute in the list (by name).
-     *
-     * <p>The return value is the same as the return value for
-     * getType(int).</p>
-     *
-     * <p>If the attribute name has a namespace prefix in the document,
-     * the application must include the prefix here.</p>
-     *
-     * @param name The name of the attribute.
-     * @return The attribute type as a string, or null if no
-     *         such attribute exists.
-     * @see #getType(int)
-     */
-    public abstract String getType (String name);
-    
-    
-    /**
-     * Return the value of an attribute in the list (by name).
-     *
-     * <p>The return value is the same as the return value for
-     * getValue(int).</p>
-     *
-     * <p>If the attribute name has a namespace prefix in the document,
-     * the application must include the prefix here.</p>
-     *
-     * @param i The index of the attribute in the list.
-     * @return The attribute value as a string, or null if
-     *         no such attribute exists.
-     * @see #getValue(int)
-     */
-    public abstract String getValue (String name);
-    
-}
-
-// end of AttributeList.java
diff --git a/src/org/xml/sax/Attributes.java b/src/org/xml/sax/Attributes.java
deleted file mode 100644
index a7dab85..0000000
--- a/src/org/xml/sax/Attributes.java
+++ /dev/null
@@ -1,243 +0,0 @@
-// Attributes.java - attribute list with Namespace support
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the public domain.
-
-// $Id: Attributes.java,v 1.5 2000/05/05 17:45:09 david Exp $
-
-
-package org.xml.sax;
-
-
-/**
- * Interface for a list of XML attributes.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This interface allows access to a list of attributes in
- * three different ways:</p>
- *
- * <ol>
- * <li>by attribute index;</li>
- * <li>by Namespace-qualified name; or</li>
- * <li>by qualified (prefixed) name.</li>
- * </ol>
- *
- * <p>The list will not contain attributes that were declared
- * #IMPLIED but not specified in the start tag.  It will also not
- * contain attributes used as Namespace declarations (xmlns*) unless
- * the <code>http://xml.org/sax/features/namespace-prefixes</code> 
- * feature is set to <var>true</var> (it is <var>false</var> by 
- * default).</p>
- *
- * <p>If the namespace-prefixes feature (see above) is <var>false</var>, 
- * access by qualified name may not be available; if the 
- * <code>http://xml.org/sax/features/namespaces</code>
- * feature is <var>false</var>, access by Namespace-qualified names 
- * may not be available.</p>
- *
- * <p>This interface replaces the now-deprecated SAX1 {@link
- * org.xml.sax.AttributeList AttributeList} interface, which does not 
- * contain Namespace support.  In addition to Namespace support, it 
- * adds the <var>getIndex</var> methods (below).</p>
- *
- * <p>The order of attributes in the list is unspecified, and will
- * vary from implementation to implementation.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.helpers.AttributeListImpl
- */
-public interface Attributes
-{
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Indexed access.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Return the number of attributes in the list.
-     *
-     * <p>Once you know the number of attributes, you can iterate
-     * through the list.</p>
-     *
-     * @return The number of attributes in the list.
-     * @see #getURI(int)
-     * @see #getLocalName(int)
-     * @see #getQName(int)
-     * @see #getType(int)
-     * @see #getValue(int)
-     */
-    public abstract int getLength ();
-
-
-    /**
-     * Look up an attribute's Namespace URI by index.
-     *
-     * @param index The attribute index (zero-based).
-     * @return The Namespace URI, or the empty string if none
-     *         is available, or null if the index is out of
-     *         range.
-     * @see #getLength
-     */
-    public abstract String getURI (int index);
-
-
-    /**
-     * Look up an attribute's local name by index.
-     *
-     * @param index The attribute index (zero-based).
-     * @return The local name, or the empty string if Namespace
-     *         processing is not being performed, or null
-     *         if the index is out of range.
-     * @see #getLength
-     */
-    public abstract String getLocalName (int index);
-
-
-    /**
-     * Look up an attribute's XML 1.0 qualified name by index.
-     *
-     * @param index The attribute index (zero-based).
-     * @return The XML 1.0 qualified name, or the empty string
-     *         if none is available, or null if the index
-     *         is out of range.
-     * @see #getLength
-     */
-    public abstract String getQName (int index);
-
-
-    /**
-     * Look up an attribute's type by index.
-     *
-     * <p>The attribute type is one of the strings "CDATA", "ID",
-     * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
-     * or "NOTATION" (always in upper case).</p>
-     *
-     * <p>If the parser has not read a declaration for the attribute,
-     * or if the parser does not report attribute types, then it must
-     * return the value "CDATA" as stated in the XML 1.0 Recommentation
-     * (clause 3.3.3, "Attribute-Value Normalization").</p>
-     *
-     * <p>For an enumerated attribute that is not a notation, the
-     * parser will report the type as "NMTOKEN".</p>
-     *
-     * @param index The attribute index (zero-based).
-     * @return The attribute's type as a string, or null if the
-     *         index is out of range.
-     * @see #getLength
-     */
-    public abstract String getType (int index);
-
-
-    /**
-     * Look up an attribute's value by index.
-     *
-     * <p>If the attribute value is a list of tokens (IDREFS,
-     * ENTITIES, or NMTOKENS), the tokens will be concatenated
-     * into a single string with each token separated by a
-     * single space.</p>
-     *
-     * @param index The attribute index (zero-based).
-     * @return The attribute's value as a string, or null if the
-     *         index is out of range.
-     * @see #getLength
-     */
-    public abstract String getValue (int index);
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Name-based query.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Look up the index of an attribute by Namespace name.
-     *
-     * @param uri The Namespace URI, or the empty string if
-     *        the name has no Namespace URI.
-     * @param localName The attribute's local name.
-     * @return The index of the attribute, or -1 if it does not
-     *         appear in the list.
-     */
-    public int getIndex (String uri, String localPart);
-
-
-    /**
-     * Look up the index of an attribute by XML 1.0 qualified name.
-     *
-     * @param qName The qualified (prefixed) name.
-     * @return The index of the attribute, or -1 if it does not
-     *         appear in the list.
-     */
-    public int getIndex (String qName);
-
-
-    /**
-     * Look up an attribute's type by Namespace name.
-     *
-     * <p>See {@link #getType(int) getType(int)} for a description
-     * of the possible types.</p>
-     *
-     * @param uri The Namespace URI, or the empty String if the
-     *        name has no Namespace URI.
-     * @param localName The local name of the attribute.
-     * @return The attribute type as a string, or null if the
-     *         attribute is not in the list or if Namespace
-     *         processing is not being performed.
-     */
-    public abstract String getType (String uri, String localName);
-
-
-    /**
-     * Look up an attribute's type by XML 1.0 qualified name.
-     *
-     * <p>See {@link #getType(int) getType(int)} for a description
-     * of the possible types.</p>
-     *
-     * @param qName The XML 1.0 qualified name.
-     * @return The attribute type as a string, or null if the
-     *         attribute is not in the list or if qualified names
-     *         are not available.
-     */
-    public abstract String getType (String qName);
-
-
-    /**
-     * Look up an attribute's value by Namespace name.
-     *
-     * <p>See {@link #getValue(int) getValue(int)} for a description
-     * of the possible values.</p>
-     *
-     * @param uri The Namespace URI, or the empty String if the
-     *        name has no Namespace URI.
-     * @param localName The local name of the attribute.
-     * @return The attribute value as a string, or null if the
-     *         attribute is not in the list.
-     */
-    public abstract String getValue (String uri, String localName);
-
-
-    /**
-     * Look up an attribute's value by XML 1.0 qualified name.
-     *
-     * <p>See {@link #getValue(int) getValue(int)} for a description
-     * of the possible values.</p>
-     *
-     * @param qName The XML 1.0 qualified name.
-     * @return The attribute value as a string, or null if the
-     *         attribute is not in the list or if qualified names
-     *         are not available.
-     */
-    public abstract String getValue (String qName);
-
-}
-
-// end of Attributes.java
diff --git a/src/org/xml/sax/ContentHandler.java b/src/org/xml/sax/ContentHandler.java
deleted file mode 100644
index 11a5281..0000000
--- a/src/org/xml/sax/ContentHandler.java
+++ /dev/null
@@ -1,374 +0,0 @@
-// ContentHandler.java - handle main document content.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the public domain.
-
-// $Id: ContentHandler.java,v 1.5 2000/05/05 17:45:39 david Exp $
-
-package org.xml.sax;
-
-
-/**
- * Receive notification of the logical content of a document.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This is the main interface that most SAX applications
- * implement: if the application needs to be informed of basic parsing 
- * events, it implements this interface and registers an instance with 
- * the SAX parser using the {@link org.xml.sax.XMLReader#setContentHandler 
- * setContentHandler} method.  The parser uses the instance to report 
- * basic document-related events like the start and end of elements 
- * and character data.</p>
- *
- * <p>The order of events in this interface is very important, and
- * mirrors the order of information in the document itself.  For
- * example, all of an element's content (character data, processing
- * instructions, and/or subelements) will appear, in order, between
- * the startElement event and the corresponding endElement event.</p>
- *
- * <p>This interface is similar to the now-deprecated SAX 1.0
- * DocumentHandler interface, but it adds support for Namespaces
- * and for reporting skipped entities (in non-validating XML
- * processors).</p>
- *
- * <p>Implementors should note that there is also a Java class
- * {@link java.net.ContentHandler ContentHandler} in the java.net
- * package; that means that it's probably a bad idea to do</p>
- *
- * <blockquote>
- * import java.net.*;
- * import org.xml.sax.*;
- * </blockquote>
- *
- * <p>In fact, "import ...*" is usually a sign of sloppy programming
- * anyway, so the user should consider this a feature rather than a
- * bug.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.XMLReader
- * @see org.xml.sax.DTDHandler
- * @see org.xml.sax.ErrorHandler
- */
-public interface ContentHandler
-{
-
-    /**
-     * Receive an object for locating the origin of SAX document events.
-     *
-     * <p>SAX parsers are strongly encouraged (though not absolutely
-     * required) to supply a locator: if it does so, it must supply
-     * the locator to the application by invoking this method before
-     * invoking any of the other methods in the ContentHandler
-     * interface.</p>
-     *
-     * <p>The locator allows the application to determine the end
-     * position of any document-related event, even if the parser is
-     * not reporting an error.  Typically, the application will
-     * use this information for reporting its own errors (such as
-     * character content that does not match an application's
-     * business rules).  The information returned by the locator
-     * is probably not sufficient for use with a search engine.</p>
-     *
-     * <p>Note that the locator will return correct information only
-     * during the invocation of the events in this interface.  The
-     * application should not attempt to use it at any other time.</p>
-     *
-     * @param locator An object that can return the location of
-     *                any SAX document event.
-     * @see org.xml.sax.Locator
-     */
-    public void setDocumentLocator (Locator locator);
-
-
-    /**
-     * Receive notification of the beginning of a document.
-     *
-     * <p>The SAX parser will invoke this method only once, before any
-     * other methods in this interface or in {@link org.xml.sax.DTDHandler
-     * DTDHandler} (except for {@link #setDocumentLocator 
-     * setDocumentLocator}).</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #endDocument
-     */
-    public void startDocument ()
-	throws SAXException;
-
-
-    /**
-     * Receive notification of the end of a document.
-     *
-     * <p>The SAX parser will invoke this method only once, and it will
-     * be the last method invoked during the parse.  The parser shall
-     * not invoke this method until it has either abandoned parsing
-     * (because of an unrecoverable error) or reached the end of
-     * input.</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #startDocument
-     */
-    public void endDocument()
-	throws SAXException;
-
-
-    /**
-     * Begin the scope of a prefix-URI Namespace mapping.
-     *
-     * <p>The information from this event is not necessary for
-     * normal Namespace processing: the SAX XML reader will 
-     * automatically replace prefixes for element and attribute
-     * names when the <code>http://xml.org/sax/features/namespaces</code>
-     * feature is <var>true</var> (the default).</p>
-     *
-     * <p>There are cases, however, when applications need to
-     * use prefixes in character data or in attribute values,
-     * where they cannot safely be expanded automatically; the
-     * start/endPrefixMapping event supplies the information
-     * to the application to expand prefixes in those contexts
-     * itself, if necessary.</p>
-     *
-     * <p>Note that start/endPrefixMapping events are not
-     * guaranteed to be properly nested relative to each-other:
-     * all startPrefixMapping events will occur before the
-     * corresponding {@link #startElement startElement} event, 
-     * and all {@link #endPrefixMapping endPrefixMapping}
-     * events will occur after the corresponding {@link #endElement
-     * endElement} event, but their order is not otherwise 
-     * guaranteed.</p>
-     *
-     * <p>There should never be start/endPrefixMapping events for the
-     * "xml" prefix, since it is predeclared and immutable.</p>
-     *
-     * @param prefix The Namespace prefix being declared.
-     * @param uri The Namespace URI the prefix is mapped to.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see #endPrefixMapping
-     * @see #startElement
-     */
-    public void startPrefixMapping (String prefix, String uri)
-	throws SAXException;
-
-
-    /**
-     * End the scope of a prefix-URI mapping.
-     *
-     * <p>See {@link #startPrefixMapping startPrefixMapping} for 
-     * details.  This event will always occur after the corresponding 
-     * {@link #endElement endElement} event, but the order of 
-     * {@link #endPrefixMapping endPrefixMapping} events is not otherwise
-     * guaranteed.</p>
-     *
-     * @param prefix The prefix that was being mapping.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see #startPrefixMapping
-     * @see #endElement
-     */
-    public void endPrefixMapping (String prefix)
-	throws SAXException;
-
-
-    /**
-     * Receive notification of the beginning of an element.
-     *
-     * <p>The Parser will invoke this method at the beginning of every
-     * element in the XML document; there will be a corresponding
-     * {@link #endElement endElement} event for every startElement event
-     * (even when the element is empty). All of the element's content will be
-     * reported, in order, before the corresponding endElement
-     * event.</p>
-     *
-     * <p>This event allows up to three name components for each
-     * element:</p>
-     *
-     * <ol>
-     * <li>the Namespace URI;</li>
-     * <li>the local name; and</li>
-     * <li>the qualified (prefixed) name.</li>
-     * </ol>
-     *
-     * <p>Any or all of these may be provided, depending on the
-     * values of the <var>http://xml.org/sax/features/namespaces</var>
-     * and the <var>http://xml.org/sax/features/namespace-prefixes</var>
-     * properties:</p>
-     *
-     * <ul>
-     * <li>the Namespace URI and local name are required when 
-     * the namespaces property is <var>true</var> (the default), and are
-     * optional when the namespaces property is <var>false</var> (if one is
-     * specified, both must be);</li>
-     * <li>the qualified name is required when the namespace-prefixes property
-     * is <var>true</var>, and is optional when the namespace-prefixes property
-     * is <var>false</var> (the default).</li>
-     * </ul>
-     *
-     * <p>Note that the attribute list provided will contain only
-     * attributes with explicit values (specified or defaulted):
-     * #IMPLIED attributes will be omitted.  The attribute list
-     * will contain attributes used for Namespace declarations
-     * (xmlns* attributes) only if the
-     * <code>http://xml.org/sax/features/namespace-prefixes</code>
-     * property is true (it is false by default, and support for a 
-     * true value is optional).</p>
-     *
-     * @param uri The Namespace URI, or the empty string if the
-     *        element has no Namespace URI or if Namespace
-     *        processing is not being performed.
-     * @param localName The local name (without prefix), or the
-     *        empty string if Namespace processing is not being
-     *        performed.
-     * @param qName The qualified name (with prefix), or the
-     *        empty string if qualified names are not available.
-     * @param atts The attributes attached to the element.  If
-     *        there are no attributes, it shall be an empty
-     *        Attributes object.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #endElement
-     * @see org.xml.sax.Attributes
-     */
-    public void startElement (String namespaceURI, String localName,
-			      String qName, Attributes atts)
-	throws SAXException;
-
-
-    /**
-     * Receive notification of the end of an element.
-     *
-     * <p>The SAX parser will invoke this method at the end of every
-     * element in the XML document; there will be a corresponding
-     * {@link #startElement startElement} event for every endElement 
-     * event (even when the element is empty).</p>
-     *
-     * <p>For information on the names, see startElement.</p>
-     *
-     * @param uri The Namespace URI, or the empty string if the
-     *        element has no Namespace URI or if Namespace
-     *        processing is not being performed.
-     * @param localName The local name (without prefix), or the
-     *        empty string if Namespace processing is not being
-     *        performed.
-     * @param qName The qualified XML 1.0 name (with prefix), or the
-     *        empty string if qualified names are not available.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     */
-    public void endElement (String namespaceURI, String localName,
-			    String qName)
-	throws SAXException;
-
-
-    /**
-     * Receive notification of character data.
-     *
-     * <p>The Parser will call this method to report each chunk of
-     * character data.  SAX parsers may return all contiguous character
-     * data in a single chunk, or they may split it into several
-     * chunks; however, all of the characters in any single event
-     * must come from the same external entity so that the Locator
-     * provides useful information.</p>
-     *
-     * <p>The application must not attempt to read from the array
-     * outside of the specified range.</p>
-     *
-     * <p>Note that some parsers will report whitespace in element
-     * content using the {@link #ignorableWhitespace ignorableWhitespace}
-     * method rather than this one (validating parsers <em>must</em> 
-     * do so).</p>
-     *
-     * @param ch The characters from the XML document.
-     * @param start The start position in the array.
-     * @param length The number of characters to read from the array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #ignorableWhitespace 
-     * @see org.xml.sax.Locator
-     */
-    public void characters (char ch[], int start, int length)
-	throws SAXException;
-
-
-    /**
-     * Receive notification of ignorable whitespace in element content.
-     *
-     * <p>Validating Parsers must use this method to report each chunk
-     * of whitespace in element content (see the W3C XML 1.0 recommendation,
-     * section 2.10): non-validating parsers may also use this method
-     * if they are capable of parsing and using content models.</p>
-     *
-     * <p>SAX parsers may return all contiguous whitespace in a single
-     * chunk, or they may split it into several chunks; however, all of
-     * the characters in any single event must come from the same
-     * external entity, so that the Locator provides useful
-     * information.</p>
-     *
-     * <p>The application must not attempt to read from the array
-     * outside of the specified range.</p>
-     *
-     * @param ch The characters from the XML document.
-     * @param start The start position in the array.
-     * @param length The number of characters to read from the array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #characters
-     */
-    public void ignorableWhitespace (char ch[], int start, int length)
-	throws SAXException;
-
-
-    /**
-     * Receive notification of a processing instruction.
-     *
-     * <p>The Parser will invoke this method once for each processing
-     * instruction found: note that processing instructions may occur
-     * before or after the main document element.</p>
-     *
-     * <p>A SAX parser must never report an XML declaration (XML 1.0,
-     * section 2.8) or a text declaration (XML 1.0, section 4.3.1)
-     * using this method.</p>
-     *
-     * @param target The processing instruction target.
-     * @param data The processing instruction data, or null if
-     *        none was supplied.  The data does not include any
-     *        whitespace separating it from the target.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     */
-    public void processingInstruction (String target, String data)
-	throws SAXException;
-
-
-    /**
-     * Receive notification of a skipped entity.
-     *
-     * <p>The Parser will invoke this method once for each entity
-     * skipped.  Non-validating processors may skip entities if they
-     * have not seen the declarations (because, for example, the
-     * entity was declared in an external DTD subset).  All processors
-     * may skip external entities, depending on the values of the
-     * <code>http://xml.org/sax/features/external-general-entities</code>
-     * and the
-     * <code>http://xml.org/sax/features/external-parameter-entities</code>
-     * properties.</p>
-     *
-     * @param name The name of the skipped entity.  If it is a 
-     *        parameter entity, the name will begin with '%', and if
-     *        it is the external DTD subset, it will be the string
-     *        "[dtd]".
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     */
-    public void skippedEntity (String name)
-	throws SAXException;
-}
-
-// end of ContentHandler.java
diff --git a/src/org/xml/sax/DTDHandler.java b/src/org/xml/sax/DTDHandler.java
deleted file mode 100644
index 8ea9481..0000000
--- a/src/org/xml/sax/DTDHandler.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// SAX DTD handler.
-// No warranty; no copyright -- use this as you will.
-// $Id: DTDHandler.java,v 1.4 2000/05/05 17:46:02 david Exp $
-
-package org.xml.sax;
-
-/**
- * Receive notification of basic DTD-related events.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>If a SAX application needs information about notations and
- * unparsed entities, then the application implements this 
- * interface and registers an instance with the SAX parser using 
- * the parser's setDTDHandler method.  The parser uses the 
- * instance to report notation and unparsed entity declarations to 
- * the application.</p>
- *
- * <p>Note that this interface includes only those DTD events that
- * the XML recommendation <em>requires</em> processors to report:
- * notation and unparsed entity declarations.</p>
- *
- * <p>The SAX parser may report these events in any order, regardless
- * of the order in which the notations and unparsed entities were
- * declared; however, all DTD events must be reported after the
- * document handler's startDocument event, and before the first
- * startElement event.</p>
- *
- * <p>It is up to the application to store the information for 
- * future use (perhaps in a hash table or object tree).
- * If the application encounters attributes of type "NOTATION",
- * "ENTITY", or "ENTITIES", it can use the information that it
- * obtained through this interface to find the entity and/or
- * notation corresponding with the attribute value.</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.Parser#setDTDHandler
- * @see org.xml.sax.HandlerBase 
- */
-public interface DTDHandler {
-    
-    
-    /**
-     * Receive notification of a notation declaration event.
-     *
-     * <p>It is up to the application to record the notation for later
-     * reference, if necessary.</p>
-     *
-     * <p>At least one of publicId and systemId must be non-null.
-     * If a system identifier is present, and it is a URL, the SAX
-     * parser must resolve it fully before passing it to the
-     * application through this event.</p>
-     *
-     * <p>There is no guarantee that the notation declaration will be
-     * reported before any unparsed entities that use it.</p>
-     *
-     * @param name The notation name.
-     * @param publicId The notation's public identifier, or null if
-     *        none was given.
-     * @param systemId The notation's system identifier, or null if
-     *        none was given.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #unparsedEntityDecl
-     * @see org.xml.sax.AttributeList
-     */
-    public abstract void notationDecl (String name,
-				       String publicId,
-				       String systemId)
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of an unparsed entity declaration event.
-     *
-     * <p>Note that the notation name corresponds to a notation
-     * reported by the {@link #notationDecl notationDecl} event.  
-     * It is up to the application to record the entity for later 
-     * reference, if necessary.</p>
-     *
-     * <p>If the system identifier is a URL, the parser must resolve it
-     * fully before passing it to the application.</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @param name The unparsed entity's name.
-     * @param publicId The entity's public identifier, or null if none
-     *        was given.
-     * @param systemId The entity's system identifier.
-     * @param notation name The name of the associated notation.
-     * @see #notationDecl
-     * @see org.xml.sax.AttributeList
-     */
-    public abstract void unparsedEntityDecl (String name,
-					     String publicId,
-					     String systemId,
-					     String notationName)
-	throws SAXException;
-    
-}
-
-// end of DTDHandler.java
diff --git a/src/org/xml/sax/DocumentHandler.java b/src/org/xml/sax/DocumentHandler.java
deleted file mode 100644
index d937c0e..0000000
--- a/src/org/xml/sax/DocumentHandler.java
+++ /dev/null
@@ -1,230 +0,0 @@
-// SAX document handler.
-// No warranty; no copyright -- use this as you will.
-// $Id: DocumentHandler.java,v 1.4 2000/05/05 17:46:11 david Exp $
-
-package org.xml.sax;
-
-/**
- * Receive notification of general document events.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This was the main event-handling interface for SAX1; in
- * SAX2, it has been replaced by {@link org.xml.sax.ContentHandler
- * ContentHandler}, which provides Namespace support and reporting
- * of skipped entities.  This interface is included in SAX2 only
- * to support legacy SAX1 applications.</p>
- *
- * <p>The order of events in this interface is very important, and
- * mirrors the order of information in the document itself.  For
- * example, all of an element's content (character data, processing
- * instructions, and/or subelements) will appear, in order, between
- * the startElement event and the corresponding endElement event.</p>
- *
- * <p>Application writers who do not want to implement the entire
- * interface can derive a class from HandlerBase, which implements
- * the default functionality; parser writers can instantiate
- * HandlerBase to obtain a default handler.  The application can find
- * the location of any document event using the Locator interface
- * supplied by the Parser through the setDocumentLocator method.</p>
- *
- * @deprecated This interface has been replaced by the SAX2
- *             {@link org.xml.sax.ContentHandler ContentHandler}
- *             interface, which includes Namespace support.
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.Parser#setDocumentHandler
- * @see org.xml.sax.Locator
- * @see org.xml.sax.HandlerBase
- */
-public interface DocumentHandler {
-    
-    
-    /**
-     * Receive an object for locating the origin of SAX document events.
-     *
-     * <p>SAX parsers are strongly encouraged (though not absolutely
-     * required) to supply a locator: if it does so, it must supply
-     * the locator to the application by invoking this method before
-     * invoking any of the other methods in the DocumentHandler
-     * interface.</p>
-     *
-     * <p>The locator allows the application to determine the end
-     * position of any document-related event, even if the parser is
-     * not reporting an error.  Typically, the application will
-     * use this information for reporting its own errors (such as
-     * character content that does not match an application's
-     * business rules).  The information returned by the locator
-     * is probably not sufficient for use with a search engine.</p>
-     *
-     * <p>Note that the locator will return correct information only
-     * during the invocation of the events in this interface.  The
-     * application should not attempt to use it at any other time.</p>
-     *
-     * @param locator An object that can return the location of
-     *                any SAX document event.
-     * @see org.xml.sax.Locator
-     */
-    public abstract void setDocumentLocator (Locator locator);
-    
-    
-    /**
-     * Receive notification of the beginning of a document.
-     *
-     * <p>The SAX parser will invoke this method only once, before any
-     * other methods in this interface or in DTDHandler (except for
-     * setDocumentLocator).</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     */
-    public abstract void startDocument ()
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of the end of a document.
-     *
-     * <p>The SAX parser will invoke this method only once, and it will
-     * be the last method invoked during the parse.  The parser shall
-     * not invoke this method until it has either abandoned parsing
-     * (because of an unrecoverable error) or reached the end of
-     * input.</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     */
-    public abstract void endDocument ()
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of the beginning of an element.
-     *
-     * <p>The Parser will invoke this method at the beginning of every
-     * element in the XML document; there will be a corresponding
-     * endElement() event for every startElement() event (even when the
-     * element is empty). All of the element's content will be
-     * reported, in order, before the corresponding endElement()
-     * event.</p>
-     *
-     * <p>If the element name has a namespace prefix, the prefix will
-     * still be attached.  Note that the attribute list provided will
-     * contain only attributes with explicit values (specified or
-     * defaulted): #IMPLIED attributes will be omitted.</p>
-     *
-     * @param name The element type name.
-     * @param atts The attributes attached to the element, if any.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #endElement
-     * @see org.xml.sax.AttributeList 
-     */
-    public abstract void startElement (String name, AttributeList atts)
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of the end of an element.
-     *
-     * <p>The SAX parser will invoke this method at the end of every
-     * element in the XML document; there will be a corresponding
-     * startElement() event for every endElement() event (even when the
-     * element is empty).</p>
-     *
-     * <p>If the element name has a namespace prefix, the prefix will
-     * still be attached to the name.</p>
-     *
-     * @param name The element type name
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     */
-    public abstract void endElement (String name)
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of character data.
-     *
-     * <p>The Parser will call this method to report each chunk of
-     * character data.  SAX parsers may return all contiguous character
-     * data in a single chunk, or they may split it into several
-     * chunks; however, all of the characters in any single event
-     * must come from the same external entity, so that the Locator
-     * provides useful information.</p>
-     *
-     * <p>The application must not attempt to read from the array
-     * outside of the specified range.</p>
-     *
-     * <p>Note that some parsers will report whitespace using the
-     * ignorableWhitespace() method rather than this one (validating
-     * parsers must do so).</p>
-     *
-     * @param ch The characters from the XML document.
-     * @param start The start position in the array.
-     * @param length The number of characters to read from the array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #ignorableWhitespace 
-     * @see org.xml.sax.Locator
-     */
-    public abstract void characters (char ch[], int start, int length)
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of ignorable whitespace in element content.
-     *
-     * <p>Validating Parsers must use this method to report each chunk
-     * of ignorable whitespace (see the W3C XML 1.0 recommendation,
-     * section 2.10): non-validating parsers may also use this method
-     * if they are capable of parsing and using content models.</p>
-     *
-     * <p>SAX parsers may return all contiguous whitespace in a single
-     * chunk, or they may split it into several chunks; however, all of
-     * the characters in any single event must come from the same
-     * external entity, so that the Locator provides useful
-     * information.</p>
-     *
-     * <p>The application must not attempt to read from the array
-     * outside of the specified range.</p>
-     *
-     * @param ch The characters from the XML document.
-     * @param start The start position in the array.
-     * @param length The number of characters to read from the array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see #characters
-     */
-    public abstract void ignorableWhitespace (char ch[], int start, int length)
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of a processing instruction.
-     *
-     * <p>The Parser will invoke this method once for each processing
-     * instruction found: note that processing instructions may occur
-     * before or after the main document element.</p>
-     *
-     * <p>A SAX parser should never report an XML declaration (XML 1.0,
-     * section 2.8) or a text declaration (XML 1.0, section 4.3.1)
-     * using this method.</p>
-     *
-     * @param target The processing instruction target.
-     * @param data The processing instruction data, or null if
-     *        none was supplied.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     */
-    public abstract void processingInstruction (String target, String data)
-	throws SAXException;
-    
-}
-
-// end of DocumentHandler.java
diff --git a/src/org/xml/sax/EntityResolver.java b/src/org/xml/sax/EntityResolver.java
deleted file mode 100644
index 724770f..0000000
--- a/src/org/xml/sax/EntityResolver.java
+++ /dev/null
@@ -1,110 +0,0 @@
-// SAX entity resolver.
-// No warranty; no copyright -- use this as you will.
-// $Id: EntityResolver.java,v 1.4 2000/05/05 17:46:19 david Exp $
-
-package org.xml.sax;
-
-import java.io.IOException;
-
-
-/**
- * Basic interface for resolving entities.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>If a SAX application needs to implement customized handling
- * for external entities, it must implement this interface and
- * register an instance with the SAX driver using the
- * {@link org.xml.sax.XMLReader#setEntityResolver setEntityResolver}
- * method.</p>
- *
- * <p>The XML reader will then allow the application to intercept any
- * external entities (including the external DTD subset and external
- * parameter entities, if any) before including them.</p>
- *
- * <p>Many SAX applications will not need to implement this interface,
- * but it will be especially useful for applications that build
- * XML documents from databases or other specialised input sources,
- * or for applications that use URI types other than URLs.</p>
- *
- * <p>The following resolver would provide the application
- * with a special character stream for the entity with the system
- * identifier "http://www.myhost.com/today":</p>
- *
- * <pre>
- * import org.xml.sax.EntityResolver;
- * import org.xml.sax.InputSource;
- *
- * public class MyResolver implements EntityResolver {
- *   public InputSource resolveEntity (String publicId, String systemId)
- *   {
- *     if (systemId.equals("http://www.myhost.com/today")) {
- *              // return a special input source
- *       MyReader reader = new MyReader();
- *       return new InputSource(reader);
- *     } else {
- *              // use the default behaviour
- *       return null;
- *     }
- *   }
- * }
- * </pre>
- *
- * <p>The application can also use this interface to redirect system
- * identifiers to local URIs or to look up replacements in a catalog
- * (possibly by using the public identifier).</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.Parser#setEntityResolver
- * @see org.xml.sax.InputSource
- */
-public interface EntityResolver {
-    
-    
-    /**
-     * Allow the application to resolve external entities.
-     *
-     * <p>The Parser will call this method before opening any external
-     * entity except the top-level document entity (including the
-     * external DTD subset, external entities referenced within the
-     * DTD, and external entities referenced within the document
-     * element): the application may request that the parser resolve
-     * the entity itself, that it use an alternative URI, or that it
-     * use an entirely different input source.</p>
-     *
-     * <p>Application writers can use this method to redirect external
-     * system identifiers to secure and/or local URIs, 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).</p>
-     *
-     * <p>If the system identifier is a URL, the SAX parser must
-     * resolve it fully before reporting it to the application.</p>
-     *
-     * @param publicId The public identifier of the external entity
-     *        being referenced, or null if none was supplied.
-     * @param systemId The system identifier of the external entity
-     *        being referenced.
-     * @return An InputSource object describing the new input source,
-     *         or null to request that the parser open a regular
-     *         URI connection to the system identifier.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @exception java.io.IOException A Java-specific IO exception,
-     *            possibly the result of creating a new InputStream
-     *            or Reader for the InputSource.
-     * @see org.xml.sax.InputSource
-     */
-    public abstract InputSource resolveEntity (String publicId,
-					       String systemId)
-	throws SAXException, IOException;
-    
-}
-
-// end of EntityResolver.java
diff --git a/src/org/xml/sax/ErrorHandler.java b/src/org/xml/sax/ErrorHandler.java
deleted file mode 100644
index c4e4714..0000000
--- a/src/org/xml/sax/ErrorHandler.java
+++ /dev/null
@@ -1,123 +0,0 @@
-// SAX error handler.
-// No warranty; no copyright -- use this as you will.
-// $Id: ErrorHandler.java,v 1.4 2000/05/05 17:46:27 david Exp $
-
-package org.xml.sax;
-
-
-/**
- * Basic interface for SAX error handlers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>If a SAX application needs to implement customized error
- * handling, it must implement this interface and then register an
- * instance with the XML reader using the
- * {@link org.xml.sax.XMLReader#setErrorHandler setErrorHandler}
- * method.  The parser will then report all errors and warnings
- * through this interface.</p>
- *
- * <p><strong>WARNING:</strong> If an application does <em>not</em>
- * register an ErrorHandler, XML parsing errors will go unreported
- * and bizarre behaviour may result.</p>
- *
- * <p>For XML processing errors, a SAX driver must use this interface 
- * instead of throwing an exception: it is up to the application 
- * to decide whether to throw an exception for different types of 
- * errors and warnings.  Note, however, that there is no requirement that 
- * the parser continue to provide useful information after a call to 
- * {@link #fatalError fatalError} (in other words, a SAX driver class 
- * could catch an exception and report a fatalError).</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.Parser#setErrorHandler
- * @see org.xml.sax.SAXParseException 
- */
-public interface ErrorHandler {
-    
-    
-    /**
-     * Receive notification of a warning.
-     *
-     * <p>SAX parsers will use this method to report conditions that
-     * are not errors or fatal errors as defined by the XML 1.0
-     * recommendation.  The default behaviour is to take no action.</p>
-     *
-     * <p>The SAX parser must continue to provide normal parsing events
-     * after invoking this method: it should still be possible for the
-     * application to process the document through to the end.</p>
-     *
-     * <p>Filters may use this method to report other, non-XML warnings
-     * as well.</p>
-     *
-     * @param exception The warning information encapsulated in a
-     *                  SAX parse exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.SAXParseException 
-     */
-    public abstract void warning (SAXParseException exception)
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of a recoverable error.
-     *
-     * <p>This corresponds to the definition of "error" in section 1.2
-     * of the W3C XML 1.0 Recommendation.  For example, a validating
-     * parser would use this callback to report the violation of a
-     * validity constraint.  The default behaviour is to take no
-     * action.</p>
-     *
-     * <p>The SAX parser must continue to provide normal parsing events
-     * after invoking this method: it should still be possible for the
-     * application to process the document through to the end.  If the
-     * application cannot do so, then the parser should report a fatal
-     * error even if the XML 1.0 recommendation does not require it to
-     * do so.</p>
-     *
-     * <p>Filters may use this method to report other, non-XML errors
-     * as well.</p>
-     *
-     * @param exception The error information encapsulated in a
-     *                  SAX parse exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.SAXParseException 
-     */
-    public abstract void error (SAXParseException exception)
-	throws SAXException;
-    
-    
-    /**
-     * Receive notification of a non-recoverable error.
-     *
-     * <p>This corresponds to the definition of "fatal error" in
-     * section 1.2 of the W3C XML 1.0 Recommendation.  For example, a
-     * parser would use this callback to report the violation of a
-     * well-formedness constraint.</p>
-     *
-     * <p>The application must assume that the document is unusable
-     * after the parser has invoked this method, and should continue
-     * (if at all) only for the sake of collecting addition error
-     * messages: in fact, SAX parsers are free to stop reporting any
-     * other events once this method has been invoked.</p>
-     *
-     * @param exception The error information encapsulated in a
-     *                  SAX parse exception.  
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.SAXParseException
-     */
-    public abstract void fatalError (SAXParseException exception)
-	throws SAXException;
-    
-}
-
-// end of ErrorHandler.java
diff --git a/src/org/xml/sax/HandlerBase.java b/src/org/xml/sax/HandlerBase.java
deleted file mode 100644
index 575a0fa..0000000
--- a/src/org/xml/sax/HandlerBase.java
+++ /dev/null
@@ -1,368 +0,0 @@
-// SAX default handler base class.
-// No warranty; no copyright -- use this as you will.
-// $Id: HandlerBase.java,v 1.5 2000/05/05 17:46:37 david Exp $
-
-package org.xml.sax;
-
-/**
- * Default base class for handlers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class implements the default behaviour for four SAX1
- * interfaces: EntityResolver, DTDHandler, DocumentHandler,
- * and ErrorHandler.  It is now obsolete, but is included in SAX2 to
- * support legacy SAX1 applications.  SAX2 applications should use
- * the {@link org.xml.sax.helpers.DefaultHandler DefaultHandler}
- * class instead.</p>
- *
- * <p>Application writers can extend this class when they need to
- * implement only part of an interface; parser writers can
- * instantiate this class to provide default handlers when the
- * application has not supplied its own.</p>
- *
- * <p>Note that the use of this class is optional.</p>
- *
- * @deprecated This class works with the deprecated
- *             {@link org.xml.sax.DocumentHandler DocumentHandler}
- *             interface.  It has been replaced by the SAX2
- *             {@link org.xml.sax.helpers.DefaultHandler DefaultHandler}
- *             class.
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.EntityResolver
- * @see org.xml.sax.DTDHandler
- * @see org.xml.sax.DocumentHandler
- * @see org.xml.sax.ErrorHandler
- */
-public class HandlerBase
-    implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
-{
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of the EntityResolver interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    /**
-     * Resolve an external entity.
-     *
-     * <p>Always return null, so that the parser will use the system
-     * identifier provided in the XML document.  This method implements
-     * the SAX default behaviour: application writers can override it
-     * in a subclass to do special translations such as catalog lookups
-     * or URI redirection.</p>
-     *
-     * @param publicId The public identifer, or null if none is
-     *                 available.
-     * @param systemId The system identifier provided in the XML 
-     *                 document.
-     * @return The new input source, or null to require the
-     *         default behaviour.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.EntityResolver#resolveEntity
-     */
-    public InputSource resolveEntity (String publicId, String systemId)
-	throws SAXException
-    {
-	return null;
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of DTDHandler interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Receive notification of a notation declaration.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass if they wish to keep track of the notations
-     * declared in a document.</p>
-     *
-     * @param name The notation name.
-     * @param publicId The notation public identifier, or null if not
-     *                 available.
-     * @param systemId The notation system identifier.
-     * @see org.xml.sax.DTDHandler#notationDecl
-     */
-    public void notationDecl (String name, String publicId, String systemId)
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of an unparsed entity declaration.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to keep track of the unparsed entities
-     * declared in a document.</p>
-     *
-     * @param name The entity name.
-     * @param publicId The entity public identifier, or null if not
-     *                 available.
-     * @param systemId The entity system identifier.
-     * @param notationName The name of the associated notation.
-     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
-     */
-    public void unparsedEntityDecl (String name, String publicId,
-				    String systemId, String notationName)
-    {
-	// no op
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of DocumentHandler interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Receive a Locator object for document events.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass if they wish to store the locator for use
-     * with other document events.</p>
-     *
-     * @param locator A locator for all SAX document events.
-     * @see org.xml.sax.DocumentHandler#setDocumentLocator
-     * @see org.xml.sax.Locator
-     */
-    public void setDocumentLocator (Locator locator)
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the beginning of the document.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the beginning
-     * of a document (such as allocating the root node of a tree or
-     * creating an output file).</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DocumentHandler#startDocument
-     */
-    public void startDocument ()
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the end of the document.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the beginning
-     * of a document (such as finalising a tree or closing an output
-     * file).</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DocumentHandler#endDocument
-     */
-    public void endDocument ()
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the start of an element.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the start of
-     * each element (such as allocating a new tree node or writing
-     * output to a file).</p>
-     *
-     * @param name The element type name.
-     * @param attributes The specified or defaulted attributes.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DocumentHandler#startElement
-     */
-    public void startElement (String name, AttributeList attributes)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the end of an element.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the end of
-     * each element (such as finalising a tree node or writing
-     * output to a file).</p>
-     *
-     * @param name The element type name.
-     * @param attributes The specified or defaulted attributes.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DocumentHandler#endElement
-     */
-    public void endElement (String name)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of character data inside an element.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method to take specific actions for each chunk of character data
-     * (such as adding the data to a node or buffer, or printing it to
-     * a file).</p>
-     *
-     * @param ch The characters.
-     * @param start The start position in the character array.
-     * @param length The number of characters to use from the
-     *               character array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DocumentHandler#characters
-     */
-    public void characters (char ch[], int start, int length)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of ignorable whitespace in element content.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method to take specific actions for each chunk of ignorable
-     * whitespace (such as adding data to a node or buffer, or printing
-     * it to a file).</p>
-     *
-     * @param ch The whitespace characters.
-     * @param start The start position in the character array.
-     * @param length The number of characters to use from the
-     *               character array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DocumentHandler#ignorableWhitespace
-     */
-    public void ignorableWhitespace (char ch[], int start, int length)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of a processing instruction.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions for each
-     * processing instruction, such as setting status variables or
-     * invoking other methods.</p>
-     *
-     * @param target The processing instruction target.
-     * @param data The processing instruction data, or null if
-     *             none is supplied.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DocumentHandler#processingInstruction
-     */
-    public void processingInstruction (String target, String data)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of the ErrorHandler interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Receive notification of a parser warning.
-     *
-     * <p>The default implementation does nothing.  Application writers
-     * may override this method in a subclass to take specific actions
-     * for each warning, such as inserting the message in a log file or
-     * printing it to the console.</p>
-     *
-     * @param e The warning information encoded as an exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ErrorHandler#warning
-     * @see org.xml.sax.SAXParseException
-     */
-    public void warning (SAXParseException e)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of a recoverable parser error.
-     *
-     * <p>The default implementation does nothing.  Application writers
-     * may override this method in a subclass to take specific actions
-     * for each error, such as inserting the message in a log file or
-     * printing it to the console.</p>
-     *
-     * @param e The warning information encoded as an exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ErrorHandler#warning
-     * @see org.xml.sax.SAXParseException
-     */
-    public void error (SAXParseException e)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Report a fatal XML parsing error.
-     *
-     * <p>The default implementation throws a SAXParseException.
-     * Application writers may override this method in a subclass if
-     * they need to take specific actions for each fatal error (such as
-     * collecting all of the errors into a single report): in any case,
-     * the application must stop all regular processing when this
-     * method is invoked, since the document is no longer reliable, and
-     * the parser may no longer report parsing events.</p>
-     *
-     * @param e The error information encoded as an exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ErrorHandler#fatalError
-     * @see org.xml.sax.SAXParseException
-     */
-    public void fatalError (SAXParseException e)
-	throws SAXException
-    {
-	throw e;
-    }
-    
-}
-
-// end of HandlerBase.java
diff --git a/src/org/xml/sax/InputSource.java b/src/org/xml/sax/InputSource.java
deleted file mode 100644
index 574e483..0000000
--- a/src/org/xml/sax/InputSource.java
+++ /dev/null
@@ -1,321 +0,0 @@
-// SAX input source.
-// No warranty; no copyright -- use this as you will.
-// $Id: InputSource.java,v 1.5 2000/05/05 17:46:48 david Exp $
-
-package org.xml.sax;
-
-import java.io.Reader;
-import java.io.InputStream;
-
-/**
- * A single input source for an XML entity.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class allows a SAX 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), and/or a character stream.</p>
- *
- * <p>There are two places that the application will deliver this
- * input source to the parser: as the argument to the Parser.parse
- * method, or as the return value of the EntityResolver.resolveEntity
- * method.</p>
- *
- * <p>The SAX parser will use the InputSource object to determine how
- * to read XML input.  If there is a character stream available, the
- * parser will read that stream directly; if not, the parser will use
- * a byte stream, if available; if neither a character stream nor a
- * byte stream is available, the parser will attempt to open a URI
- * connection to the resource identified by the system
- * identifier.</p>
- *
- * <p>An InputSource object belongs to the application: the SAX parser
- * shall never modify it in any way (it may modify a copy if 
- * necessary).</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.Parser#parse
- * @see org.xml.sax.EntityResolver#resolveEntity
- * @see java.io.InputStream
- * @see java.io.Reader
- */
-public class InputSource {
-    
-    /**
-     * Zero-argument default constructor.
-     *
-     * @see #setPublicId
-     * @see #setSystemId
-     * @see #setByteStream
-     * @see #setCharacterStream
-     * @see #setEncoding
-     */
-    public InputSource ()
-    {
-    }
-    
-    
-    /**
-     * Create a new input source with a system identifier.
-     *
-     * <p>Applications may use setPublicId to include a 
-     * public identifier as well, or setEncoding to specify
-     * the character encoding, if known.</p>
-     *
-     * <p>If the system identifier is a URL, it must be full resolved.</p>
-     *
-     * @param systemId The system identifier (URI).
-     * @see #setPublicId
-     * @see #setSystemId
-     * @see #setByteStream
-     * @see #setEncoding
-     * @see #setCharacterStream
-     */
-    public InputSource (String systemId)
-    {
-	setSystemId(systemId);
-    }
-    
-    
-    /**
-     * Create a new input source with a byte stream.
-     *
-     * <p>Application writers may use setSystemId to provide a base 
-     * for resolving relative URIs, setPublicId to include a 
-     * public identifier, and/or setEncoding to specify the object's
-     * character encoding.</p>
-     *
-     * @param byteStream The raw byte stream containing the document.
-     * @see #setPublicId
-     * @see #setSystemId
-     * @see #setEncoding
-     * @see #setByteStream
-     * @see #setCharacterStream
-     */
-    public InputSource (InputStream byteStream)
-    {
-	setByteStream(byteStream);
-    }
-    
-    
-    /**
-     * Create a new input source with a character stream.
-     *
-     * <p>Application writers may use setSystemId() to provide a base 
-     * for resolving relative URIs, and setPublicId to include a 
-     * public identifier.</p>
-     *
-     * <p>The character stream shall not include a byte order mark.</p>
-     *
-     * @see #setPublicId
-     * @see #setSystemId
-     * @see #setByteStream
-     * @see #setCharacterStream
-     */
-    public InputSource (Reader characterStream)
-    {
-	setCharacterStream(characterStream);
-    }
-    
-    
-    /**
-     * Set the public identifier for this input source.
-     *
-     * <p>The public identifier is always optional: if the application
-     * writer includes one, it will be provided as part of the
-     * location information.</p>
-     *
-     * @param publicId The public identifier as a string.
-     * @see #getPublicId
-     * @see org.xml.sax.Locator#getPublicId
-     * @see org.xml.sax.SAXParseException#getPublicId
-     */
-    public void setPublicId (String publicId)
-    {
-	this.publicId = publicId;
-    }
-    
-    
-    /**
-     * Get the public identifier for this input source.
-     *
-     * @return The public identifier, or null if none was supplied.
-     * @see #setPublicId
-     */
-    public String getPublicId ()
-    {
-	return publicId;
-    }
-    
-    
-    /**
-     * Set the system identifier for this input source.
-     *
-     * <p>The system identifier is optional if there is a byte stream
-     * or a character stream, but it is still useful to provide one,
-     * since the application can use it to resolve relative URIs
-     * and can include it in error messages and warnings (the parser
-     * will attempt to open a connection to the URI only if
-     * there is no byte stream or character stream specified).</p>
-     *
-     * <p>If the application knows the character encoding of the
-     * object pointed to by the system identifier, it can register
-     * the encoding using the setEncoding method.</p>
-     *
-     * <p>If the system ID is a URL, it must be fully resolved.</p>
-     *
-     * @param systemId The system identifier as a string.
-     * @see #setEncoding
-     * @see #getSystemId
-     * @see org.xml.sax.Locator#getSystemId
-     * @see org.xml.sax.SAXParseException#getSystemId
-     */
-    public void setSystemId (String systemId)
-    {
-	this.systemId = systemId;
-    }
-    
-    
-    /**
-     * Get the system identifier for this input source.
-     *
-     * <p>The getEncoding method will return the character encoding
-     * of the object pointed to, or null if unknown.</p>
-     *
-     * <p>If the system ID is a URL, it will be fully resolved.</p>
-     *
-     * @return The system identifier.
-     * @see #setSystemId
-     * @see #getEncoding
-     */
-    public String getSystemId ()
-    {
-	return systemId;
-    }
-    
-    
-    /**
-     * Set the byte stream for this input source.
-     *
-     * <p>The SAX parser will ignore this if there is also a character
-     * stream specified, but it will use a byte stream in preference
-     * to opening a URI connection itself.</p>
-     *
-     * <p>If the application knows the character encoding of the
-     * byte stream, it should set it with the setEncoding method.</p>
-     *
-     * @param byteStream A byte stream containing an XML document or
-     *        other entity.
-     * @see #setEncoding
-     * @see #getByteStream
-     * @see #getEncoding
-     * @see java.io.InputStream
-     */
-    public void setByteStream (InputStream byteStream)
-    {
-	this.byteStream = byteStream;
-    }
-    
-    
-    /**
-     * Get the byte stream for this input source.
-     *
-     * <p>The getEncoding method will return the character
-     * encoding for this byte stream, or null if unknown.</p>
-     *
-     * @return The byte stream, or null if none was supplied.
-     * @see #getEncoding
-     * @see #setByteStream
-     */
-    public InputStream getByteStream ()
-    {
-	return byteStream;
-    }
-    
-    
-    /** 
-     * Set the character encoding, if known.
-     *
-     * <p>The encoding must be a string acceptable for an
-     * XML encoding declaration (see section 4.3.3 of the XML 1.0
-     * recommendation).</p>
-     *
-     * <p>This method has no effect when the application provides a
-     * character stream.</p>
-     *
-     * @param encoding A string describing the character encoding.
-     * @see #setSystemId
-     * @see #setByteStream
-     * @see #getEncoding
-     */
-    public void setEncoding (String encoding)
-    {
-	this.encoding = encoding;
-    }
-    
-    
-    /**
-     * Get the character encoding for a byte stream or URI.
-     *
-     * @return The encoding, or null if none was supplied.
-     * @see #setByteStream
-     * @see #getSystemId
-     * @see #getByteStream
-     */
-    public String getEncoding ()
-    {
-	return encoding;
-    }
-    
-    
-    /**
-     * Set the character stream for this input source.
-     *
-     * <p>If there is a character stream specified, the SAX parser
-     * will ignore any byte stream and will not attempt to open
-     * a URI connection to the system identifier.</p>
-     *
-     * @param characterStream The character stream containing the
-     *        XML document or other entity.
-     * @see #getCharacterStream
-     * @see java.io.Reader
-     */
-    public void setCharacterStream (Reader characterStream)
-    {
-	this.characterStream = characterStream;
-    }
-    
-    
-    /**
-     * Get the character stream for this input source.
-     *
-     * @return The character stream, or null if none was supplied.
-     * @see #setCharacterStream
-     */
-    public Reader getCharacterStream ()
-    {
-	return characterStream;
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-    
-    private String publicId;
-    private String systemId;
-    private InputStream byteStream;
-    private String encoding;
-    private Reader characterStream;
-    
-}
-
-// end of InputSource.java
diff --git a/src/org/xml/sax/Locator.java b/src/org/xml/sax/Locator.java
deleted file mode 100644
index c69449a..0000000
--- a/src/org/xml/sax/Locator.java
+++ /dev/null
@@ -1,126 +0,0 @@
-// SAX locator interface for document events.
-// No warranty; no copyright -- use this as you will.
-// $Id: Locator.java,v 1.4 2000/05/05 17:46:57 david Exp $
-
-package org.xml.sax;
-
-
-/**
- * Interface for associating a SAX event with a document location.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>If a SAX parser provides location information to the SAX
- * application, it does so by implementing this interface and then
- * passing an instance to the application using the content
- * handler's {@link org.xml.sax.ContentHandler#setDocumentLocator
- * setDocumentLocator} method.  The application can use the
- * object to obtain the location of any other content handler event
- * in the XML source document.</p>
- *
- * <p>Note that the results returned by the object will be valid only
- * during the scope of each content handler method: the application
- * will receive unpredictable results if it attempts to use the
- * locator at any other time.</p>
- *
- * <p>SAX parsers are not required to supply a locator, but they are
- * very strongly encouraged to do so.  If the parser supplies a
- * locator, it must do so before reporting any other document events.
- * If no locator has been set by the time the application receives
- * the {@link org.xml.sax.ContentHandler#startDocument startDocument}
- * event, the application should assume that a locator is not 
- * available.</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.ContentHandler#setDocumentLocator 
- */
-public interface Locator {
-    
-    
-    /**
-     * Return the public identifier for the current document event.
-     *
-     * <p>The return value is the public identifier of the document
-     * entity or of the external parsed entity in which the markup
-     * triggering the event appears.</p>
-     *
-     * @return A string containing the public identifier, or
-     *         null if none is available.
-     * @see #getSystemId
-     */
-    public abstract String getPublicId ();
-    
-    
-    /**
-     * Return the system identifier for the current document event.
-     *
-     * <p>The return value is the system identifier of the document
-     * entity or of the external parsed entity in which the markup
-     * triggering the event appears.</p>
-     *
-     * <p>If the system identifier is a URL, the parser must resolve it
-     * fully before passing it to the application.</p>
-     *
-     * @return A string containing the system identifier, or null
-     *         if none is available.
-     * @see #getPublicId
-     */
-    public abstract String getSystemId ();
-    
-    
-    /**
-     * Return the line number where the current document event ends.
-     *
-     * <p><strong>Warning:</strong> The return value from the method
-     * is intended only as an approximation for the sake of error
-     * reporting; it is not intended to provide sufficient information
-     * to edit the character content of the original XML document.</p>
-     *
-     * <p>The return value is an approximation of the line number
-     * in the document entity or external parsed entity where the
-     * markup triggering the event appears.</p>
-     *
-     * <p>If possible, the SAX driver should provide the line position 
-     * of the first character after the text associated with the document 
-     * event.  The first line in the document is line 1.</p>
-     *
-     * @return The line number, or -1 if none is available.
-     * @see #getColumnNumber
-     */
-    public abstract int getLineNumber ();
-    
-    
-    /**
-     * Return the column number where the current document event ends.
-     *
-     * <p><strong>Warning:</strong> The return value from the method
-     * is intended only as an approximation for the sake of error
-     * reporting; it is not intended to provide sufficient information
-     * to edit the character content of the original XML document.</p>
-     *
-     * <p>The return value is an approximation of the column number
-     * in the document entity or external parsed entity where the
-     * markup triggering the event appears.</p>
-     *
-     * <p>If possible, the SAX driver should provide the line position 
-     * of the first character after the text associated with the document 
-     * event.</p>
-     *
-     * <p>If possible, the SAX driver should provide the line position 
-     * of the first character after the text associated with the document 
-     * event.  The first column in each line is column 1.</p>
-     *
-     * @return The column number, or -1 if none is available.
-     * @see #getLineNumber
-     */
-    public abstract int getColumnNumber ();
-    
-}
-
-// end of Locator.java
diff --git a/src/org/xml/sax/Parser.java b/src/org/xml/sax/Parser.java
deleted file mode 100644
index b9194af..0000000
--- a/src/org/xml/sax/Parser.java
+++ /dev/null
@@ -1,207 +0,0 @@
-// SAX parser interface.
-// No warranty; no copyright -- use this as you will.
-// $Id: Parser.java,v 1.5 2000/05/05 17:47:07 david Exp $
-
-package org.xml.sax;
-
-import java.io.IOException;
-import java.util.Locale;
-
-
-/**
- * Basic interface for SAX (Simple API for XML) parsers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This was the main event supplier interface for SAX1; it has
- * been replaced in SAX2 by {@link org.xml.sax.XMLReader XMLReader},
- * which includes Namespace support and sophisticated configurability
- * and extensibility.</p>
- *
- * <p>All SAX1 parsers must implement this basic interface: it allows
- * applications to register handlers for different types of events
- * and to initiate a parse from a URI, or a character stream.</p>
- *
- * <p>All SAX1 parsers must also implement a zero-argument constructor
- * (though other constructors are also allowed).</p>
- *
- * <p>SAX1 parsers are reusable but not re-entrant: the application
- * may reuse a parser object (possibly with a different input source)
- * once the first parse has completed successfully, but it may not
- * invoke the parse() methods recursively within a parse.</p>
- *
- * @deprecated This interface has been replaced by the SAX2
- *             {@link org.xml.sax.XMLReader XMLReader}
- *             interface, which includes Namespace support.
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.EntityResolver
- * @see org.xml.sax.DTDHandler
- * @see org.xml.sax.DocumentHandler
- * @see org.xml.sax.ErrorHandler
- * @see org.xml.sax.HandlerBase
- * @see org.xml.sax.InputSource
- */
-public interface Parser 
-{
-    
-    /**
-     * Allow an application to request a locale for errors and warnings.
-     *
-     * <p>SAX parsers are not required to provide localisation for errors
-     * and warnings; if they cannot support the requested locale,
-     * however, they must throw a SAX exception.  Applications may
-     * not request a locale change in the middle of a parse.</p>
-     *
-     * @param locale A Java Locale object.
-     * @exception org.xml.sax.SAXException Throws an exception
-     *            (using the previous or default locale) if the 
-     *            requested locale is not supported.
-     * @see org.xml.sax.SAXException
-     * @see org.xml.sax.SAXParseException
-     */
-    public abstract void setLocale (Locale locale)
-	throws SAXException;
-    
-    
-    /**
-     * Allow an application to register a custom entity resolver.
-     *
-     * <p>If the application does not register an entity resolver, the
-     * SAX parser will resolve system identifiers and open connections
-     * to entities itself (this is the default behaviour implemented in
-     * HandlerBase).</p>
-     *
-     * <p>Applications may register a new or different entity resolver
-     * in the middle of a parse, and the SAX parser must begin using
-     * the new resolver immediately.</p>
-     *
-     * @param resolver The object for resolving entities.
-     * @see EntityResolver
-     * @see HandlerBase
-     */
-    public abstract void setEntityResolver (EntityResolver resolver);
-    
-    
-    /**
-     * Allow an application to register a DTD event handler.
-     *
-     * <p>If the application does not register a DTD handler, all DTD
-     * events reported by the SAX parser will be silently
-     * ignored (this is the default behaviour implemented by
-     * HandlerBase).</p>
-     *
-     * <p>Applications may register a new or different
-     * handler in the middle of a parse, and the SAX parser must
-     * begin using the new handler immediately.</p>
-     *
-     * @param handler The DTD handler.
-     * @see DTDHandler
-     * @see HandlerBase
-     */
-    public abstract void setDTDHandler (DTDHandler handler);
-    
-    
-    /**
-     * Allow an application to register a document event handler.
-     *
-     * <p>If the application does not register a document handler, all
-     * document events reported by the SAX parser will be silently
-     * ignored (this is the default behaviour implemented by
-     * HandlerBase).</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param handler The document handler.
-     * @see DocumentHandler
-     * @see HandlerBase
-     */
-    public abstract void setDocumentHandler (DocumentHandler handler);
-    
-    
-    /**
-     * Allow an application to register an error event handler.
-     *
-     * <p>If the application does not register an error event handler,
-     * all error events reported by the SAX parser will be silently
-     * ignored, except for fatalError, which will throw a SAXException
-     * (this is the default behaviour implemented by HandlerBase).</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param handler The error handler.
-     * @see ErrorHandler
-     * @see SAXException
-     * @see HandlerBase
-     */
-    public abstract void setErrorHandler (ErrorHandler handler);
-    
-    
-    /**
-     * Parse an XML document.
-     *
-     * <p>The application can use this method to instruct the SAX parser
-     * to begin parsing an XML document from any valid input
-     * source (a character stream, a byte stream, or a URI).</p>
-     *
-     * <p>Applications may not invoke this method while a parse is in
-     * progress (they should create a new Parser instead for each
-     * additional XML document).  Once a parse is complete, an
-     * application may reuse the same Parser object, possibly with a
-     * different input source.</p>
-     *
-     * @param source The input source for the top-level of the
-     *        XML document.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @exception java.io.IOException An IO exception from the parser,
-     *            possibly from a byte stream or character stream
-     *            supplied by the application.
-     * @see org.xml.sax.InputSource
-     * @see #parse(java.lang.String)
-     * @see #setEntityResolver
-     * @see #setDTDHandler
-     * @see #setDocumentHandler
-     * @see #setErrorHandler
-     */
-    public abstract void parse (InputSource source)
-	throws SAXException, IOException;
-    
-    
-    /**
-     * Parse an XML document from a system identifier (URI).
-     *
-     * <p>This method is a shortcut for the common case of reading a
-     * document from a system identifier.  It is the exact
-     * equivalent of the following:</p>
-     *
-     * <pre>
-     * parse(new InputSource(systemId));
-     * </pre>
-     *
-     * <p>If the system identifier is a URL, it must be fully resolved
-     * by the application before it is passed to the parser.</p>
-     *
-     * @param systemId The system identifier (URI).
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @exception java.io.IOException An IO exception from the parser,
-     *            possibly from a byte stream or character stream
-     *            supplied by the application.
-     * @see #parse(org.xml.sax.InputSource)
-     */
-    public abstract void parse (String systemId)
-	throws SAXException, IOException;
-    
-}
-
-// end of Parser.java
diff --git a/src/org/xml/sax/SAXException.java b/src/org/xml/sax/SAXException.java
deleted file mode 100644
index c952c40..0000000
--- a/src/org/xml/sax/SAXException.java
+++ /dev/null
@@ -1,144 +0,0 @@
-// SAX exception class.
-// No warranty; no copyright -- use this as you will.
-// $Id: SAXException.java,v 1.4 2000/05/05 17:47:20 david Exp $
-
-package org.xml.sax;
-
-/**
- * Encapsulate a general SAX error or warning.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class can contain basic error or warning information from
- * either the XML parser or the application: a parser writer or
- * application writer can subclass it to provide additional
- * functionality.  SAX handlers may throw this exception or
- * any exception subclassed from it.</p>
- *
- * <p>If the application needs to pass through other types of
- * exceptions, it must wrap those exceptions in a SAXException
- * or an exception derived from a SAXException.</p>
- *
- * <p>If the parser or application needs to include information about a
- * specific location in an XML document, it should use the
- * {@link org.xml.sax.SAXParseException SAXParseException} subclass.</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.SAXParseException
- */
-public class SAXException extends Exception {
-    
-    
-    /**
-     * Create a new SAXException.
-     *
-     * @param message The error or warning message.
-     * @see org.xml.sax.Parser#setLocale
-     */
-    public SAXException (String message) {
-	super(message);
-	this.exception = null;
-    }
-    
-    
-    /**
-     * Create a new SAXException wrapping an existing exception.
-     *
-     * <p>The existing exception will be embedded in the new
-     * one, and its message will become the default message for
-     * the SAXException.</p>
-     *
-     * @param e The exception to be wrapped in a SAXException.
-     */
-    public SAXException (Exception e)
-    {
-	super();
-	this.exception = e;
-    }
-    
-    
-    /**
-     * Create a new SAXException from an existing exception.
-     *
-     * <p>The existing exception will be embedded in the new
-     * one, but the new exception will have its own message.</p>
-     *
-     * @param message The detail message.
-     * @param e The exception to be wrapped in a SAXException.
-     * @see org.xml.sax.Parser#setLocale
-     */
-    public SAXException (String message, Exception e)
-    {
-	super(message);
-	this.exception = e;
-    }
-    
-    
-    /**
-     * Return a detail message for this exception.
-     *
-     * <p>If there is an embedded exception, and if the SAXException
-     * has no detail message of its own, this method will return
-     * the detail message from the embedded exception.</p>
-     *
-     * @return The error or warning message.
-     * @see org.xml.sax.Parser#setLocale
-     */
-    public String getMessage ()
-    {
-	String message = super.getMessage();
-	
-	if (message == null && exception != null) {
-	    return exception.getMessage();
-	} else {
-	    return message;
-	}
-    }
-    
-    
-    /**
-     * Return the embedded exception, if any.
-     *
-     * @return The embedded exception, or null if there is none.
-     */
-    public Exception getException ()
-    {
-	return exception;
-    }
-
-
-    /**
-     * Override toString to pick up any embedded exception.
-     *
-     * @return A string representation of this exception.
-     */
-    public String toString ()
-    {
-	if (exception != null) {
-	    return exception.toString();
-	} else {
-	    return super.toString();
-	}
-    }
-    
-    
-    
-    //////////////////////////////////////////////////////////////////////
-    // Internal state.
-    //////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * @serial The embedded exception if tunnelling, or null.
-     */    
-    private Exception exception;
-    
-}
-
-// end of SAXException.java
diff --git a/src/org/xml/sax/SAXNotRecognizedException.java b/src/org/xml/sax/SAXNotRecognizedException.java
deleted file mode 100644
index ee0895f..0000000
--- a/src/org/xml/sax/SAXNotRecognizedException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// SAXNotRecognizedException.java - unrecognized feature or value.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the Public Domain.
-
-// $Id: SAXNotRecognizedException.java,v 1.4 2000/05/05 17:47:28 david Exp $
-
-
-package org.xml.sax;
-
-
-/**
- * Exception class for an unrecognized identifier.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>An XMLReader will throw this exception when it finds an
- * unrecognized feature or property identifier; SAX applications and
- * extensions may use this class for other, similar purposes.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.SAXNotSupportedException
- */
-public class SAXNotRecognizedException extends SAXException
-{
-
-    /**
-     * Construct a new exception with the given message.
-     *
-     * @param message The text message of the exception.
-     */
-    public SAXNotRecognizedException (String message)
-    {
-	super(message);
-    }
-
-}
-
-// end of SAXNotRecognizedException.java
diff --git a/src/org/xml/sax/SAXNotSupportedException.java b/src/org/xml/sax/SAXNotSupportedException.java
deleted file mode 100644
index 013b063..0000000
--- a/src/org/xml/sax/SAXNotSupportedException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// SAXNotSupportedException.java - unsupported feature or value.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the Public Domain.
-
-// $Id: SAXNotSupportedException.java,v 1.5 2000/05/05 17:47:39 david Exp $
-
-
-package org.xml.sax;
-
-/**
- * Exception class for an unsupported operation.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>An XMLReader will throw this exception when it recognizes a
- * feature or property identifier, but cannot perform the requested
- * operation (setting a state or value).  Other SAX2 applications and
- * extensions may use this class for similar purposes.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.SAXNotRecognizedException 
- */
-public class SAXNotSupportedException extends SAXException
-{
-
-    /**
-     * Construct a new exception with the given message.
-     *
-     * @param message The text message of the exception.
-     */
-    public SAXNotSupportedException (String message)
-    {
-	super(message);
-    }
-
-}
-
-// end of SAXNotSupportedException.java
diff --git a/src/org/xml/sax/SAXParseException.java b/src/org/xml/sax/SAXParseException.java
deleted file mode 100644
index 8890442..0000000
--- a/src/org/xml/sax/SAXParseException.java
+++ /dev/null
@@ -1,264 +0,0 @@
-// SAX exception class.
-// No warranty; no copyright -- use this as you will.
-// $Id: SAXParseException.java,v 1.4 2000/05/05 17:48:16 david Exp $
-
-package org.xml.sax;
-
-/**
- * Encapsulate an XML parse error or warning.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This exception will include information for locating the error
- * in the original XML document.  Note that although the application
- * will receive a SAXParseException as the argument to the handlers
- * in the {@link org.xml.sax.ErrorHandler ErrorHandler} interface, 
- * the application is not actually required to throw the exception; 
- * instead, it can simply read the information in it and take a 
- * different action.</p>
- *
- * <p>Since this exception is a subclass of {@link org.xml.sax.SAXException 
- * SAXException}, it inherits the ability to wrap another exception.</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.SAXException
- * @see org.xml.sax.Locator
- * @see org.xml.sax.ErrorHandler
- */
-public class SAXParseException extends SAXException {
-    
-    
-    //////////////////////////////////////////////////////////////////////
-    // Constructors.
-    //////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Create a new SAXParseException from a message and a Locator.
-     *
-     * <p>This constructor is especially useful when an application is
-     * creating its own exception from within a {@link org.xml.sax.ContentHandler
-     * ContentHandler} callback.</p>
-     *
-     * @param message The error or warning message.
-     * @param locator The locator object for the error or warning (may be
-     *        null).
-     * @see org.xml.sax.Locator
-     * @see org.xml.sax.Parser#setLocale 
-     */
-    public SAXParseException (String message, Locator locator) {
-	super(message);
-	if (locator != null) {
-	    init(locator.getPublicId(), locator.getSystemId(),
-		 locator.getLineNumber(), locator.getColumnNumber());
-	} else {
-	    init(null, null, -1, -1);
-	}
-    }
-    
-    
-    /**
-     * Wrap an existing exception in a SAXParseException.
-     *
-     * <p>This constructor is especially useful when an application is
-     * creating its own exception from within a {@link org.xml.sax.ContentHandler
-     * ContentHandler} callback, and needs to wrap an existing exception that is not a
-     * subclass of {@link org.xml.sax.SAXException SAXException}.</p>
-     *
-     * @param message The error or warning message, or null to
-     *                use the message from the embedded exception.
-     * @param locator The locator object for the error or warning (may be
-     *        null).
-     * @param e Any exception.
-     * @see org.xml.sax.Locator
-     * @see org.xml.sax.Parser#setLocale
-     */
-    public SAXParseException (String message, Locator locator,
-			      Exception e) {
-	super(message, e);
-	if (locator != null) {
-	    init(locator.getPublicId(), locator.getSystemId(),
-		 locator.getLineNumber(), locator.getColumnNumber());
-	} else {
-	    init(null, null, -1, -1);
-	}
-    }
-    
-    
-    /**
-     * Create a new SAXParseException.
-     *
-     * <p>This constructor is most useful for parser writers.</p>
-     *
-     * <p>If the system identifier is a URL, the parser must resolve it
-     * fully before creating the exception.</p>
-     *
-     * @param message The error or warning message.
-     * @param publicId The public identifer of the entity that generated
-     *                 the error or warning.
-     * @param systemId The system identifer of the entity that generated
-     *                 the error or warning.
-     * @param lineNumber The line number of the end of the text that
-     *                   caused the error or warning.
-     * @param columnNumber The column number of the end of the text that
-     *                     cause the error or warning.
-     * @see org.xml.sax.Parser#setLocale
-     */
-    public SAXParseException (String message, String publicId, String systemId,
-			      int lineNumber, int columnNumber)
-    {
-	super(message);
-	init(publicId, systemId, lineNumber, columnNumber);
-    }
-    
-    
-    /**
-     * Create a new SAXParseException with an embedded exception.
-     *
-     * <p>This constructor is most useful for parser writers who
-     * need to wrap an exception that is not a subclass of
-     * {@link org.xml.sax.SAXException SAXException}.</p>
-     *
-     * <p>If the system identifier is a URL, the parser must resolve it
-     * fully before creating the exception.</p>
-     *
-     * @param message The error or warning message, or null to use
-     *                the message from the embedded exception.
-     * @param publicId The public identifer of the entity that generated
-     *                 the error or warning.
-     * @param systemId The system identifer of the entity that generated
-     *                 the error or warning.
-     * @param lineNumber The line number of the end of the text that
-     *                   caused the error or warning.
-     * @param columnNumber The column number of the end of the text that
-     *                     cause the error or warning.
-     * @param e Another exception to embed in this one.
-     * @see org.xml.sax.Parser#setLocale
-     */
-    public SAXParseException (String message, String publicId, String systemId,
-			      int lineNumber, int columnNumber, Exception e)
-    {
-	super(message, e);
-	init(publicId, systemId, lineNumber, columnNumber);
-    }
-
-
-    /**
-     * Internal initialization method.
-     *
-     * @param publicId The public identifier of the entity which generated the exception,
-     *        or null.
-     * @param systemId The system identifier of the entity which generated the exception,
-     *        or null.
-     * @param lineNumber The line number of the error, or -1.
-     * @param columnNumber The column number of the error, or -1.
-     */
-    private void init (String publicId, String systemId,
-		       int lineNumber, int columnNumber)
-    {
-	this.publicId = publicId;
-	this.systemId = systemId;
-	this.lineNumber = lineNumber;
-	this.columnNumber = columnNumber;
-    }
-    
-    
-    /**
-     * Get the public identifier of the entity where the exception occurred.
-     *
-     * @return A string containing the public identifier, or null
-     *         if none is available.
-     * @see org.xml.sax.Locator#getPublicId
-     */
-    public String getPublicId ()
-    {
-	return this.publicId;
-    }
-    
-    
-    /**
-     * Get the system identifier of the entity where the exception occurred.
-     *
-     * <p>If the system identifier is a URL, it will be resolved
-     * fully.</p>
-     *
-     * @return A string containing the system identifier, or null
-     *         if none is available.
-     * @see org.xml.sax.Locator#getSystemId
-     */
-    public String getSystemId ()
-    {
-	return this.systemId;
-    }
-    
-    
-    /**
-     * The line number of the end of the text where the exception occurred.
-     *
-     * @return An integer representing the line number, or -1
-     *         if none is available.
-     * @see org.xml.sax.Locator#getLineNumber
-     */
-    public int getLineNumber ()
-    {
-	return this.lineNumber;
-    }
-    
-    
-    /**
-     * The column number of the end of the text where the exception occurred.
-     *
-     * <p>The first column in a line is position 1.</p>
-     *
-     * @return An integer representing the column number, or -1
-     *         if none is available.
-     * @see org.xml.sax.Locator#getColumnNumber
-     */
-    public int getColumnNumber ()
-    {
-	return this.columnNumber;
-    }
-    
-    
-    
-    //////////////////////////////////////////////////////////////////////
-    // Internal state.
-    //////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * @serial The public identifier, or null.
-     * @see #getPublicId
-     */    
-    private String publicId;
-
-
-    /**
-     * @serial The system identifier, or null.
-     * @see #getSystemId
-     */
-    private String systemId;
-
-
-    /**
-     * @serial The line number, or -1.
-     * @see #getLineNumber
-     */
-    private int lineNumber;
-
-
-    /**
-     * @serial The column number, or -1.
-     * @see #getColumnNumber
-     */
-    private int columnNumber;
-    
-}
-
-// end of SAXParseException.java
diff --git a/src/org/xml/sax/XMLFilter.java b/src/org/xml/sax/XMLFilter.java
deleted file mode 100644
index 86ff045..0000000
--- a/src/org/xml/sax/XMLFilter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// XMLFilter.java - filter SAX2 events.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the Public Domain.
-
-// $Id: XMLFilter.java,v 1.4 2000/05/05 17:48:25 david Exp $
-
-
-package org.xml.sax;
-
-
-/**
- * Interface for an XML filter.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>An XML filter is like an XML reader, except that it obtains its
- * events from another XML reader rather than a primary source like
- * an XML document or database.  Filters can modify a stream of
- * events as they pass on to the final application.</p>
- *
- * <p>The XMLFilterImpl helper class provides a convenient base
- * for creating SAX2 filters, by passing on all {@link org.xml.sax.EntityResolver
- * EntityResolver}, {@link org.xml.sax.DTDHandler DTDHandler},
- * {@link org.xml.sax.ContentHandler ContentHandler} and {@link org.xml.sax.ErrorHandler
- * ErrorHandler} events automatically.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.helpers.XMLFilterImpl
- */
-public interface XMLFilter extends XMLReader
-{
-
-    /**
-     * Set the parent reader.
-     *
-     * <p>This method allows the application to link the filter to
-     * a parent reader (which may be another filter).  The argument
-     * may not be null.</p>
-     *
-     * @param parent The parent reader.
-     */
-    public abstract void setParent (XMLReader parent);
-
-
-    /**
-     * Get the parent reader.
-     *
-     * <p>This method allows the application to query the parent
-     * reader (which may be another filter).  It is generally a
-     * bad idea to perform any operations on the parent reader
-     * directly: they should all pass through this filter.</p>
-     *
-     * @return The parent filter, or null if none has been set.
-     */
-    public abstract XMLReader getParent ();
-
-}
-
-// end of XMLFilter.java
diff --git a/src/org/xml/sax/XMLReader.java b/src/org/xml/sax/XMLReader.java
deleted file mode 100644
index 80b82ba..0000000
--- a/src/org/xml/sax/XMLReader.java
+++ /dev/null
@@ -1,415 +0,0 @@
-// XMLReader.java - read an XML document.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the Public Domain.
-
-// $Id: XMLReader.java,v 1.6 2000/05/05 17:48:56 david Exp $
-
-package org.xml.sax;
-
-import java.io.IOException;
-
-
-/**
- * Interface for reading an XML document using callbacks.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p><strong>Note:</strong> despite its name, this interface does 
- * <em>not</em> extend the standard Java {@link java.io.Reader Reader} 
- * interface, because reading XML is a fundamentally different activity 
- * than reading character data.</p>
- *
- * <p>XMLReader is the interface that an XML parser's SAX2 driver must
- * implement.  This interface allows an application to set and
- * query features and properties in the parser, to register
- * event handlers for document processing, and to initiate
- * a document parse.</p>
- *
- * <p>All SAX interfaces are assumed to be synchronous: the
- * {@link #parse parse} methods must not return until parsing
- * is complete, and readers must wait for an event-handler callback
- * to return before reporting the next event.</p>
- *
- * <p>This interface replaces the (now deprecated) SAX 1.0 {@link
- * org.xml.sax.Parser Parser} interface.  The XMLReader interface
- * contains two important enhancements over the old Parser
- * interface:</p>
- *
- * <ol>
- * <li>it adds a standard way to query and set features and 
- *  properties; and</li>
- * <li>it adds Namespace support, which is required for many
- *  higher-level XML standards.</li>
- * </ol>
- *
- * <p>There are adapters available to convert a SAX1 Parser to
- * a SAX2 XMLReader and vice-versa.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.XMLFilter
- * @see org.xml.sax.helpers.ParserAdapter
- * @see org.xml.sax.helpers.XMLReaderAdapter 
- */
-public interface XMLReader
-{
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Configuration.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Look up the value of a feature.
-     *
-     * <p>The feature name is any fully-qualified URI.  It is
-     * possible for an XMLReader to recognize a feature name but
-     * to be unable to return its value; this is especially true
-     * in the case of an adapter for a SAX1 Parser, which has
-     * no way of knowing whether the underlying parser is
-     * performing validation or expanding external entities.</p>
-     *
-     * <p>All XMLReaders are required to recognize the
-     * http://xml.org/sax/features/namespaces and the
-     * http://xml.org/sax/features/namespace-prefixes feature names.</p>
-     *
-     * <p>Some feature values may be available only in specific
-     * contexts, such as before, during, or after a parse.</p>
-     *
-     * <p>Typical usage is something like this:</p>
-     *
-     * <pre>
-     * XMLReader r = new MySAXDriver();
-     *
-     *                         // try to activate validation
-     * try {
-     *   r.setFeature("http://xml.org/sax/features/validation", true);
-     * } catch (SAXException e) {
-     *   System.err.println("Cannot activate validation."); 
-     * }
-     *
-     *                         // register event handlers
-     * r.setContentHandler(new MyContentHandler());
-     * r.setErrorHandler(new MyErrorHandler());
-     *
-     *                         // parse the first document
-     * try {
-     *   r.parse("http://www.foo.com/mydoc.xml");
-     * } catch (IOException e) {
-     *   System.err.println("I/O exception reading XML document");
-     * } catch (SAXException e) {
-     *   System.err.println("XML exception reading document.");
-     * }
-     * </pre>
-     *
-     * <p>Implementors are free (and encouraged) to invent their own features,
-     * using names built on their own URIs.</p>
-     *
-     * @param name The feature name, which is a fully-qualified URI.
-     * @return The current state of the feature (true or false).
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the feature name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the feature name but 
-     *            cannot determine its value at this time.
-     * @see #setFeature
-     */
-    public boolean getFeature (String name)
-        throws SAXNotRecognizedException, SAXNotSupportedException;
-
-
-    /**
-     * Set the state of a feature.
-     *
-     * <p>The feature name is any fully-qualified URI.  It is
-     * possible for an XMLReader to recognize a feature name but
-     * to be unable to set its value; this is especially true
-     * in the case of an adapter for a SAX1 {@link org.xml.sax.Parser Parser},
-     * which has no way of affecting whether the underlying parser is
-     * validating, for example.</p>
-     *
-     * <p>All XMLReaders are required to support setting
-     * http://xml.org/sax/features/namespaces to true and
-     * http://xml.org/sax/features/namespace-prefixes to false.</p>
-     *
-     * <p>Some feature values may be immutable or mutable only 
-     * in specific contexts, such as before, during, or after 
-     * a parse.</p>
-     *
-     * @param name The feature name, which is a fully-qualified URI.
-     * @param state The requested state of the feature (true or false).
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the feature name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the feature name but 
-     *            cannot set the requested value.
-     * @see #getFeature
-     */
-    public void setFeature (String name, boolean value)
-	throws SAXNotRecognizedException, SAXNotSupportedException;
-
-
-    /**
-     * Look up the value of a property.
-     *
-     * <p>The property name is any fully-qualified URI.  It is
-     * possible for an XMLReader to recognize a property name but
-     * to be unable to return its state; this is especially true
-     * in the case of an adapter for a SAX1 {@link org.xml.sax.Parser
-     * Parser}.</p>
-     *
-     * <p>XMLReaders are not required to recognize any specific
-     * property names, though an initial core set is documented for
-     * SAX2.</p>
-     *
-     * <p>Some property values may be available only in specific
-     * contexts, such as before, during, or after a parse.</p>
-     *
-     * <p>Implementors are free (and encouraged) to invent their own properties,
-     * using names built on their own URIs.</p>
-     *
-     * @param name The property name, which is a fully-qualified URI.
-     * @return The current value of the property.
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the property name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the property name but 
-     *            cannot determine its value at this time.
-     * @see #setProperty
-     */
-    public Object getProperty (String name)
-	throws SAXNotRecognizedException, SAXNotSupportedException;
-
-
-    /**
-     * Set the value of a property.
-     *
-     * <p>The property name is any fully-qualified URI.  It is
-     * possible for an XMLReader to recognize a property name but
-     * to be unable to set its value; this is especially true
-     * in the case of an adapter for a SAX1 {@link org.xml.sax.Parser
-     * Parser}.</p>
-     *
-     * <p>XMLReaders are not required to recognize setting
-     * any specific property names, though a core set is provided with 
-     * SAX2.</p>
-     *
-     * <p>Some property values may be immutable or mutable only 
-     * in specific contexts, such as before, during, or after 
-     * a parse.</p>
-     *
-     * <p>This method is also the standard mechanism for setting
-     * extended handlers.</p>
-     *
-     * @param name The property name, which is a fully-qualified URI.
-     * @param state The requested value for the property.
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the property name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the property name but 
-     *            cannot set the requested value.
-     */
-    public void setProperty (String name, Object value)
-	throws SAXNotRecognizedException, SAXNotSupportedException;
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Event handlers.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Allow an application to register an entity resolver.
-     *
-     * <p>If the application does not register an entity resolver,
-     * the XMLReader will perform its own default resolution.</p>
-     *
-     * <p>Applications may register a new or different resolver in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * resolver immediately.</p>
-     *
-     * @param resolver The entity resolver.
-     * @exception java.lang.NullPointerException If the resolver 
-     *            argument is null.
-     * @see #getEntityResolver
-     */
-    public void setEntityResolver (EntityResolver resolver);
-
-
-    /**
-     * Return the current entity resolver.
-     *
-     * @return The current entity resolver, or null if none
-     *         has been registered.
-     * @see #setEntityResolver
-     */
-    public EntityResolver getEntityResolver ();
-
-
-    /**
-     * Allow an application to register a DTD event handler.
-     *
-     * <p>If the application does not register a DTD handler, all DTD
-     * events reported by the SAX parser will be silently ignored.</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param handler The DTD handler.
-     * @exception java.lang.NullPointerException If the handler 
-     *            argument is null.
-     * @see #getDTDHandler
-     */
-    public void setDTDHandler (DTDHandler handler);
-
-
-    /**
-     * Return the current DTD handler.
-     *
-     * @return The current DTD handler, or null if none
-     *         has been registered.
-     * @see #setDTDHandler
-     */
-    public DTDHandler getDTDHandler ();
-
-
-    /**
-     * Allow an application to register a content event handler.
-     *
-     * <p>If the application does not register a content handler, all
-     * content events reported by the SAX parser will be silently
-     * ignored.</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param handler The content handler.
-     * @exception java.lang.NullPointerException If the handler 
-     *            argument is null.
-     * @see #getContentHandler
-     */
-    public void setContentHandler (ContentHandler handler);
-
-
-    /**
-     * Return the current content handler.
-     *
-     * @return The current content handler, or null if none
-     *         has been registered.
-     * @see #setContentHandler
-     */
-    public ContentHandler getContentHandler ();
-
-
-    /**
-     * Allow an application to register an error event handler.
-     *
-     * <p>If the application does not register an error handler, all
-     * error events reported by the SAX parser will be silently
-     * ignored; however, normal processing may not continue.  It is
-     * highly recommended that all SAX applications implement an
-     * error handler to avoid unexpected bugs.</p>
-     *
-     * <p>Applications may register a new or different handler in the
-     * middle of a parse, and the SAX parser must begin using the new
-     * handler immediately.</p>
-     *
-     * @param handler The error handler.
-     * @exception java.lang.NullPointerException If the handler 
-     *            argument is null.
-     * @see #getErrorHandler
-     */
-    public void setErrorHandler (ErrorHandler handler);
-
-
-    /**
-     * Return the current error handler.
-     *
-     * @return The current error handler, or null if none
-     *         has been registered.
-     * @see #setErrorHandler
-     */
-    public ErrorHandler getErrorHandler ();
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Parsing.
-    ////////////////////////////////////////////////////////////////////
-
-    /**
-     * Parse an XML document.
-     *
-     * <p>The application can use this method to instruct the XML
-     * reader to begin parsing an XML document from any valid input
-     * source (a character stream, a byte stream, or a URI).</p>
-     *
-     * <p>Applications may not invoke this method while a parse is in
-     * progress (they should create a new XMLReader instead for each
-     * nested XML document).  Once a parse is complete, an
-     * application may reuse the same XMLReader object, possibly with a
-     * different input source.</p>
-     *
-     * <p>During the parse, the XMLReader will provide information
-     * about the XML document through the registered event
-     * handlers.</p>
-     *
-     * <p>This method is synchronous: it will not return until parsing
-     * has ended.  If a client application wants to terminate 
-     * parsing early, it should throw an exception.</p>
-     *
-     * @param source The input source for the top-level of the
-     *        XML document.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @exception java.io.IOException An IO exception from the parser,
-     *            possibly from a byte stream or character stream
-     *            supplied by the application.
-     * @see org.xml.sax.InputSource
-     * @see #parse(java.lang.String)
-     * @see #setEntityResolver
-     * @see #setDTDHandler
-     * @see #setContentHandler
-     * @see #setErrorHandler 
-     */
-    public void parse (InputSource input)
-	throws IOException, SAXException;
-
-
-    /**
-     * Parse an XML document from a system identifier (URI).
-     *
-     * <p>This method is a shortcut for the common case of reading a
-     * document from a system identifier.  It is the exact
-     * equivalent of the following:</p>
-     *
-     * <pre>
-     * parse(new InputSource(systemId));
-     * </pre>
-     *
-     * <p>If the system identifier is a URL, it must be fully resolved
-     * by the application before it is passed to the parser.</p>
-     *
-     * @param systemId The system identifier (URI).
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @exception java.io.IOException An IO exception from the parser,
-     *            possibly from a byte stream or character stream
-     *            supplied by the application.
-     * @see #parse(org.xml.sax.InputSource)
-     */
-    public void parse (String systemId)
-	throws IOException, SAXException;
-
-}
-
-// end of XMLReader.java
diff --git a/src/org/xml/sax/ext/DeclHandler.java b/src/org/xml/sax/ext/DeclHandler.java
deleted file mode 100644
index 3b6661b..0000000
--- a/src/org/xml/sax/ext/DeclHandler.java
+++ /dev/null
@@ -1,141 +0,0 @@
-// DeclHandler.java - Optional handler for DTD declaration events.
-// Public Domain: no warranty.
-// $Id: DeclHandler.java,v 1.3 2000/10/04 14:40:03 david Exp $
-
-package org.xml.sax.ext;
-
-import org.xml.sax.SAXException;
-
-
-/**
- * SAX2 extension handler for DTD declaration events.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This is an optional extension handler for SAX2 to provide
- * information about DTD declarations in an XML document.  XML
- * readers are not required to support this handler, and this
- * handler is not included in the core SAX2 distribution.</p>
- *
- * <p>Note that data-related DTD declarations (unparsed entities and
- * notations) are already reported through the {@link
- * org.xml.sax.DTDHandler DTDHandler} interface.</p>
- *
- * <p>If you are using the declaration handler together with a lexical
- * handler, all of the events will occur between the
- * {@link org.xml.sax.ext.LexicalHandler#startDTD startDTD} and the
- * {@link org.xml.sax.ext.LexicalHandler#endDTD endDTD} events.</p>
- *
- * <p>To set the DeclHandler for an XML reader, use the
- * {@link org.xml.sax.XMLReader#setProperty setProperty} method
- * with the propertyId "http://xml.org/sax/properties/declaration-handler".
- * If the reader does not support declaration events, it will throw a
- * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
- * or a
- * {@link org.xml.sax.SAXNotSupportedException SAXNotSupportedException}
- * when you attempt to register the handler.</p>
- *
- * @since 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 1.0
- * @see org.xml.sax.XMLReader
- */
-public interface DeclHandler
-{
-
-    /**
-     * Report an element type declaration.
-     *
-     * <p>The content model will consist of the string "EMPTY", the
-     * string "ANY", or a parenthesised group, optionally followed
-     * by an occurrence indicator.  The model will be normalized so
-     * that all parameter entities are fully resolved and all whitespace 
-     * is removed,and will include the enclosing parentheses.  Other
-     * normalization (such as removing redundant parentheses or 
-     * simplifying occurrence indicators) is at the discretion of the
-     * parser.</p>
-     *
-     * @param name The element type name.
-     * @param model The content model as a normalized string.
-     * @exception SAXException The application may raise an exception.
-     */
-    public abstract void elementDecl (String name, String model)
-	throws SAXException;
-
-
-    /**
-     * Report an attribute type declaration.
-     *
-     * <p>Only the effective (first) declaration for an attribute will
-     * be reported.  The type will be one of the strings "CDATA",
-     * "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY",
-     * "ENTITIES", a parenthesized token group with 
-     * the separator "|" and all whitespace removed, or the word
-     * "NOTATION" followed by a space followed by a parenthesized
-     * token group with all whitespace removed.</p>
-     *
-     * <p>Any parameter entities in the attribute value will be
-     * expanded, but general entities will not.</p>
-     *
-     * @param eName The name of the associated element.
-     * @param aName The name of the attribute.
-     * @param type A string representing the attribute type.
-     * @param valueDefault A string representing the attribute default
-     *        ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if
-     *        none of these applies.
-     * @param value A string representing the attribute's default value,
-     *        or null if there is none.
-     * @exception SAXException The application may raise an exception.
-     */
-    public abstract void attributeDecl (String eName,
-					String aName,
-					String type,
-					String valueDefault,
-					String value)
-	throws SAXException;
-
-
-    /**
-     * Report an internal entity declaration.
-     *
-     * <p>Only the effective (first) declaration for each entity
-     * will be reported.  All parameter entities in the value
-     * will be expanded, but general entities will not.</p>
-     *
-     * @param name The name of the entity.  If it is a parameter
-     *        entity, the name will begin with '%'.
-     * @param value The replacement text of the entity.
-     * @exception SAXException The application may raise an exception.
-     * @see #externalEntityDecl
-     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
-     */
-    public abstract void internalEntityDecl (String name, String value)
-	throws SAXException;
-
-
-    /**
-     * Report a parsed external entity declaration.
-     *
-     * <p>Only the effective (first) declaration for each entity
-     * will be reported.</p>
-     *
-     * @param name The name of the entity.  If it is a parameter
-     *        entity, the name will begin with '%'.
-     * @param publicId The declared public identifier of the entity, or
-     *        null if none was declared.
-     * @param systemId The declared system identifier of the entity.
-     * @exception SAXException The application may raise an exception.
-     * @see #internalEntityDecl
-     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
-     */
-    public abstract void externalEntityDecl (String name, String publicId,
-					     String systemId)
-	throws SAXException;
-
-}
-
-// end of DeclHandler.java
diff --git a/src/org/xml/sax/ext/LexicalHandler.java b/src/org/xml/sax/ext/LexicalHandler.java
deleted file mode 100644
index 560f9d7..0000000
--- a/src/org/xml/sax/ext/LexicalHandler.java
+++ /dev/null
@@ -1,211 +0,0 @@
-// LexicalHandler.java - optional handler for lexical parse events.
-// Public Domain: no warranty.
-// $Id: LexicalHandler.java,v 1.3 2000/10/04 14:39:44 david Exp $
-
-package org.xml.sax.ext;
-
-import org.xml.sax.SAXException;
-
-/**
- * SAX2 extension handler for lexical events.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This is an optional extension handler for SAX2 to provide
- * lexical information about an XML document, such as comments
- * and CDATA section boundaries; XML readers are not required to 
- * support this handler, and it is not part of the core SAX2
- * distribution.</p>
- *
- * <p>The events in the lexical handler apply to the entire document,
- * not just to the document element, and all lexical handler events
- * must appear between the content handler's startDocument and
- * endDocument events.</p>
- *
- * <p>To set the LexicalHandler for an XML reader, use the
- * {@link org.xml.sax.XMLReader#setProperty setProperty} method
- * with the propertyId "http://xml.org/sax/properties/lexical-handler".
- * If the reader does not support lexical events, it will throw a
- * {@link org.xml.sax.SAXNotRecognizedException SAXNotRecognizedException}
- * or a
- * {@link org.xml.sax.SAXNotSupportedException SAXNotSupportedException}
- * when you attempt to register the handler.</p>
- *
- * @since 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 1.0
- * @see org.xml.sax.XMLReader#setProperty
- * @see org.xml.sax.SAXNotRecognizedException
- * @see org.xml.sax.SAXNotSupportedException
- */
-public interface LexicalHandler
-{
-
-    /**
-     * Report the start of DTD declarations, if any.
-     *
-     * <p>This method is intended to report the beginning of the
-     * DOCTYPE declaration; if the document has no DOCTYPE declaration,
-     * this method will not be invoked.</p>
-     *
-     * <p>All declarations reported through 
-     * {@link org.xml.sax.DTDHandler DTDHandler} or
-     * {@link org.xml.sax.ext.DeclHandler DeclHandler} events must appear
-     * between the startDTD and {@link #endDTD endDTD} events.
-     * Declarations are assumed to belong to the internal DTD subset
-     * unless they appear between {@link #startEntity startEntity}
-     * and {@link #endEntity endEntity} events.  Comments and
-     * processing instructions from the DTD should also be reported
-     * between the startDTD and endDTD events, in their original 
-     * order of (logical) occurrence; they are not required to
-     * appear in their correct locations relative to DTDHandler
-     * or DeclHandler events, however.</p>
-     *
-     * <p>Note that the start/endDTD events will appear within
-     * the start/endDocument events from ContentHandler and
-     * before the first 
-     * {@link org.xml.sax.ContentHandler#startElement startElement}
-     * event.</p>
-     *
-     * @param name The document type name.
-     * @param publicId The declared public identifier for the
-     *        external DTD subset, or null if none was declared.
-     * @param systemId The declared system identifier for the
-     *        external DTD subset, or null if none was declared.
-     * @exception SAXException The application may raise an
-     *            exception.
-     * @see #endDTD
-     * @see #startEntity
-     */
-    public abstract void startDTD (String name, String publicId,
-				   String systemId)
-	throws SAXException;
-
-
-    /**
-     * Report the end of DTD declarations.
-     *
-     * <p>This method is intended to report the end of the
-     * DOCTYPE declaration; if the document has no DOCTYPE declaration,
-     * this method will not be invoked.</p>
-     *
-     * @exception SAXException The application may raise an exception.
-     * @see #startDTD
-     */
-    public abstract void endDTD ()
-	throws SAXException;
-
-
-    /**
-     * Report the beginning of some internal and external XML entities.
-     *
-     * <p>The reporting of parameter entities (including
-     * the external DTD subset) is optional, and SAX2 drivers that
-     * support LexicalHandler may not support it; you can use the
-     * <code
-     * >http://xml.org/sax/features/lexical-handler/parameter-entities</code>
-     * feature to query or control the reporting of parameter entities.</p>
-     *
-     * <p>General entities are reported with their regular names,
-     * parameter entities have '%' prepended to their names, and 
-     * the external DTD subset has the pseudo-entity name "[dtd]".</p>
-     *
-     * <p>When a SAX2 driver is providing these events, all other 
-     * events must be properly nested within start/end entity 
-     * events.  There is no additional requirement that events from 
-     * {@link org.xml.sax.ext.DeclHandler DeclHandler} or
-     * {@link org.xml.sax.DTDHandler DTDHandler} be properly ordered.</p>
-     *
-     * <p>Note that skipped entities will be reported through the
-     * {@link org.xml.sax.ContentHandler#skippedEntity skippedEntity}
-     * event, which is part of the ContentHandler interface.</p>
-     *
-     * <p>Because of the streaming event model that SAX uses, some
-     * entity boundaries cannot be reported under any 
-     * circumstances:</p>
-     *
-     * <ul>
-     * <li>general entities within attribute values</li>
-     * <li>parameter entities within declarations</li>
-     * </ul>
-     *
-     * <p>These will be silently expanded, with no indication of where
-     * the original entity boundaries were.</p>
-     *
-     * <p>Note also that the boundaries of character references (which
-     * are not really entities anyway) are not reported.</p>
-     *
-     * <p>All start/endEntity events must be properly nested.
-     *
-     * @param name The name of the entity.  If it is a parameter
-     *        entity, the name will begin with '%', and if it is the
-     *        external DTD subset, it will be "[dtd]".
-     * @exception SAXException The application may raise an exception.
-     * @see #endEntity
-     * @see org.xml.sax.ext.DeclHandler#internalEntityDecl
-     * @see org.xml.sax.ext.DeclHandler#externalEntityDecl 
-     */
-    public abstract void startEntity (String name)
-	throws SAXException;
-
-
-    /**
-     * Report the end of an entity.
-     *
-     * @param name The name of the entity that is ending.
-     * @exception SAXException The application may raise an exception.
-     * @see #startEntity
-     */
-    public abstract void endEntity (String name)
-	throws SAXException;
-
-
-    /**
-     * Report the start of a CDATA section.
-     *
-     * <p>The contents of the CDATA section will be reported through
-     * the regular {@link org.xml.sax.ContentHandler#characters
-     * characters} event; this event is intended only to report
-     * the boundary.</p>
-     *
-     * @exception SAXException The application may raise an exception.
-     * @see #endCDATA
-     */
-    public abstract void startCDATA ()
-	throws SAXException;
-
-
-    /**
-     * Report the end of a CDATA section.
-     *
-     * @exception SAXException The application may raise an exception.
-     * @see #startCDATA
-     */
-    public abstract void endCDATA ()
-	throws SAXException;
-
-
-    /**
-     * Report an XML comment anywhere in the document.
-     *
-     * <p>This callback will be used for comments inside or outside the
-     * document element, including comments in the external DTD
-     * subset (if read).  Comments in the DTD must be properly
-     * nested inside start/endDTD and start/endEntity events (if
-     * used).</p>
-     *
-     * @param ch An array holding the characters in the comment.
-     * @param start The starting position in the array.
-     * @param length The number of characters to use from the array.
-     * @exception SAXException The application may raise an exception.
-     */
-    public abstract void comment (char ch[], int start, int length)
-	throws SAXException;
-
-}
-
-// end of LexicalHandler.java
diff --git a/src/org/xml/sax/ext/package.html b/src/org/xml/sax/ext/package.html
deleted file mode 100644
index 2001ae5..0000000
--- a/src/org/xml/sax/ext/package.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>SAX2 is Free!</title>
-</head>
-
-<body>
-<p>This package, SAX2-ext, is an extension package for SAX2.  It is
-designed both to allow SAX drivers to pass certain types of none-core
-information to applications and to serve as a simple model for other
-SAX2 extension packages.</p>
-
-<p><strong>NOTE:</strong> this package alone does add any
-functionality; it simply provides optional interfaces for SAX2 drivers
-to use.  You must find a SAX2 driver that supports these interfaces if
-you actually want to have access to lexical and declaration
-information.</p>
-
-<p>The SAX2-ext package currently contains two extension handlers for
-SAX2:</p>
-
-<ol>
-
-<li><a href="javadoc/org/xml/sax/ext/LexicalHandler.html"
->LexicalHandler</a>, which reports comments, the DOCTYPE declaration,
-CDATA sections, and (some) entity boundaries; and</li>
-
-<li><a href="javadoc/org/xml/sax/ext/DeclHandler.html"
->DeclHandler</a>, which reports element, attribute, and entity
-declarations.</li>
-
-</ol>
-
-<p>This package is independent of the SAX2 core, and that independence
-has several consequences:</p>
-
-<ul>
-
-<li>SAX2 drivers are <em>not</em> required to support these handlers,
-and you cannot assume that the classes will be present in every SAX2
-installation.</li>
-
-<li>This package may be updated independently of SAX2 (i.e. new
-handlers may be added without updating SAX2 itself).</li>
-
-<li>The handlers are not supported explicitly by the SAX2
-<var>XMLFilter</var> interface (i.e. events are not passed on by
-default); you can subclass XMLFilter if you need such behaviour.</li>
-
-<li>The handlers need to be registered differently than regular SAX2
-handlers.</li>
-
-</ul>
-
-<p>To set a LexicalHandler, for example, you need to do something like 
-this:</p>
-
-<blockquote><pre xml:space="preserve">
-LexicalHandler lh = new MyLexicalHandler();
-try {
-  xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler",
-                        lh);
-} catch (SAXException e) {
-  System.out.println("LexicalHandler not supported by this SAX2 driver.");
-}
-</pre></blockquote>
-
-
-<div>
-<h2>SAX2-ext Properties</h2>
-
-<p>Here is a full definition of the two new SAX2 properties introduced
-in this version of SAX2-ext:</p>
-
-<dl>
-
-<dt><code>http://xml.org/sax/properties/lexical-handler</code></dt>
-<dd><strong>data type:</strong>
-<code>org.xml.sax.ext.LexicalHandler</code></dd>
-<dd><strong>description:</strong> An optional extension handler for
-lexical events like comments.</dd>
-<dd><strong>access:</strong> read/write</dd>
-
-<dt><code>http://xml.org/sax/properties/declaration-handler</code></dt>
-<dd><strong>data type:</strong>
-<code>org.xml.sax.ext.DeclHandler</code></dd>
-<dd><strong>description:</strong> An optional extension handler for
-DTD-related events other than notations and unparsed entities.</dd>
-<dd><strong>access:</strong> read/write</dd>
-
-</dl>
-
-<h1>SAX2 is Free!</h1>
-
-<p>I hereby abandon any property rights to SAX 2.0 (the Simple API for
-XML), and release all of the SAX 2.0 source code, compiled code, and
-documentation contained in this distribution into the Public Domain.
-SAX comes with NO WARRANTY or guarantee of fitness for any
-purpose.</p>
-
-<p>David Megginson, david@megginson.com</p>
-<p>2000-05-05</p>
-
-</body>
-</html>
diff --git a/src/org/xml/sax/helpers/AttributeListImpl.java b/src/org/xml/sax/helpers/AttributeListImpl.java
deleted file mode 100644
index 7a9d9c3..0000000
--- a/src/org/xml/sax/helpers/AttributeListImpl.java
+++ /dev/null
@@ -1,310 +0,0 @@
-// SAX default implementation for AttributeList.
-// No warranty; no copyright -- use this as you will.
-// $Id: AttributeListImpl.java,v 1.4 2000/05/05 17:49:14 david Exp $
-
-package org.xml.sax.helpers;
-
-import org.xml.sax.AttributeList;
-
-import java.util.Vector;
-
-
-/**
- * Default implementation for AttributeList.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>AttributeList implements the deprecated SAX1 {@link
- * org.xml.sax.AttributeList AttributeList} interface, and has been
- * replaced by the new SAX2 {@link org.xml.sax.helpers.AttributesImpl
- * AttributesImpl} interface.</p>
- *
- * <p>This class provides a convenience implementation of the SAX
- * {@link org.xml.sax.AttributeList AttributeList} interface.  This 
- * implementation is useful both for SAX parser writers, who can use 
- * it to provide attributes to the application, and for SAX application 
- * writers, who can use it to create a persistent copy of an element's 
- * attribute specifications:</p>
- *
- * <pre>
- * private AttributeList myatts;
- *
- * public void startElement (String name, AttributeList atts)
- * {
- *              // create a persistent copy of the attribute list
- *              // for use outside this method
- *   myatts = new AttributeListImpl(atts);
- *   [...]
- * }
- * </pre>
- *
- * <p>Please note that SAX parsers are not required to use this
- * class to provide an implementation of AttributeList; it is
- * supplied only as an optional convenience.  In particular, 
- * parser writers are encouraged to invent more efficient
- * implementations.</p>
- *
- * @deprecated This class implements a deprecated interface,
- *             {@link org.xml.sax.AttributeList AttributeList};
- *             that interface has been replaced by
- *             {@link org.xml.sax.Attributes Attributes},
- *             which is implemented in the
- *             {@link org.xml.sax.helpers.AttributesImpl 
- *            AttributesImpl} helper class.
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.AttributeList
- * @see org.xml.sax.DocumentHandler#startElement 
- */
-public class AttributeListImpl implements AttributeList
-{
-    
-    /**
-     * Create an empty attribute list.
-     *
-     * <p>This constructor is most useful for parser writers, who
-     * will use it to create a single, reusable attribute list that
-     * can be reset with the clear method between elements.</p>
-     *
-     * @see #addAttribute
-     * @see #clear
-     */
-    public AttributeListImpl ()
-    {
-    }
-    
-    
-    /**
-     * Construct a persistent copy of an existing attribute list.
-     *
-     * <p>This constructor is most useful for application writers,
-     * who will use it to create a persistent copy of an existing
-     * attribute list.</p>
-     *
-     * @param atts The attribute list to copy
-     * @see org.xml.sax.DocumentHandler#startElement
-     */
-    public AttributeListImpl (AttributeList atts)
-    {
-	setAttributeList(atts);
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Methods specific to this class.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Set the attribute list, discarding previous contents.
-     *
-     * <p>This method allows an application writer to reuse an
-     * attribute list easily.</p>
-     *
-     * @param atts The attribute list to copy.
-     */
-    public void setAttributeList (AttributeList atts)
-    {
-	int count = atts.getLength();
-	
-	clear();
-	
-	for (int i = 0; i < count; i++) {
-	    addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i));
-	}
-    }
-    
-    
-    /**
-     * Add an attribute to an attribute list.
-     *
-     * <p>This method is provided for SAX parser writers, to allow them
-     * to build up an attribute list incrementally before delivering
-     * it to the application.</p>
-     *
-     * @param name The attribute name.
-     * @param type The attribute type ("NMTOKEN" for an enumeration).
-     * @param value The attribute value (must not be null).
-     * @see #removeAttribute
-     * @see org.xml.sax.DocumentHandler#startElement
-     */
-    public void addAttribute (String name, String type, String value)
-    {
-	names.addElement(name);
-	types.addElement(type);
-	values.addElement(value);
-    }
-    
-    
-    /**
-     * Remove an attribute from the list.
-     *
-     * <p>SAX application writers can use this method to filter an
-     * attribute out of an AttributeList.  Note that invoking this
-     * method will change the length of the attribute list and
-     * some of the attribute's indices.</p>
-     *
-     * <p>If the requested attribute is not in the list, this is
-     * a no-op.</p>
-     *
-     * @param name The attribute name.
-     * @see #addAttribute
-     */
-    public void removeAttribute (String name)
-    {
-	int i = names.indexOf(name);
-	
-	if (i >= 0) {
-	    names.removeElementAt(i);
-	    types.removeElementAt(i);
-	    values.removeElementAt(i);
-	}
-    }
-    
-    
-    /**
-     * Clear the attribute list.
-     *
-     * <p>SAX parser writers can use this method to reset the attribute
-     * list between DocumentHandler.startElement events.  Normally,
-     * it will make sense to reuse the same AttributeListImpl object
-     * rather than allocating a new one each time.</p>
-     *
-     * @see org.xml.sax.DocumentHandler#startElement
-     */
-    public void clear ()
-    {
-	names.removeAllElements();
-	types.removeAllElements();
-	values.removeAllElements();
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.AttributeList
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Return the number of attributes in the list.
-     *
-     * @return The number of attributes in the list.
-     * @see org.xml.sax.AttributeList#getLength
-     */
-    public int getLength ()
-    {
-	return names.size();
-    }
-    
-    
-    /**
-     * Get the name of an attribute (by position).
-     *
-     * @param i The position of the attribute in the list.
-     * @return The attribute name as a string, or null if there
-     *         is no attribute at that position.
-     * @see org.xml.sax.AttributeList#getName(int)
-     */
-    public String getName (int i)
-    {
-	if (i < 0) {
-	    return null;
-	}
-	try {
-	    return (String)names.elementAt(i);
-	} catch (ArrayIndexOutOfBoundsException e) {
-	    return null;
-	}
-    }
-    
-    
-    /**
-     * Get the type of an attribute (by position).
-     *
-     * @param i The position of the attribute in the list.
-     * @return The attribute type as a string ("NMTOKEN" for an
-     *         enumeration, and "CDATA" if no declaration was
-     *         read), or null if there is no attribute at
-     *         that position.
-     * @see org.xml.sax.AttributeList#getType(int)
-     */
-    public String getType (int i)
-    {
-	if (i < 0) {
-	    return null;
-	}
-	try {
-	    return (String)types.elementAt(i);
-	} catch (ArrayIndexOutOfBoundsException e) {
-	    return null;
-	}
-    }
-    
-    
-    /**
-     * Get the value of an attribute (by position).
-     *
-     * @param i The position of the attribute in the list.
-     * @return The attribute value as a string, or null if
-     *         there is no attribute at that position.
-     * @see org.xml.sax.AttributeList#getValue(int)
-     */
-    public String getValue (int i)
-    {
-	if (i < 0) {
-	    return null;
-	}
-	try {
-	    return (String)values.elementAt(i);
-	} catch (ArrayIndexOutOfBoundsException e) {
-	    return null;
-	}
-    }
-    
-    
-    /**
-     * Get the type of an attribute (by name).
-     *
-     * @param name The attribute name.
-     * @return The attribute type as a string ("NMTOKEN" for an
-     *         enumeration, and "CDATA" if no declaration was
-     *         read).
-     * @see org.xml.sax.AttributeList#getType(java.lang.String)
-     */
-    public String getType (String name)
-    {
-	return getType(names.indexOf(name));
-    }
-    
-    
-    /**
-     * Get the value of an attribute (by name).
-     *
-     * @param name The attribute name.
-     * @see org.xml.sax.AttributeList#getValue(java.lang.String)
-     */
-    public String getValue (String name)
-    {
-	return getValue(names.indexOf(name));
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-
-    Vector names = new Vector();
-    Vector types = new Vector();
-    Vector values = new Vector();
-
-}
-
-// end of AttributeListImpl.java
diff --git a/src/org/xml/sax/helpers/AttributesImpl.java b/src/org/xml/sax/helpers/AttributesImpl.java
deleted file mode 100644
index 3b599b0..0000000
--- a/src/org/xml/sax/helpers/AttributesImpl.java
+++ /dev/null
@@ -1,606 +0,0 @@
-// AttributesImpl.java - default implementation of Attributes.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the public domain.
-
-// $Id: AttributesImpl.java,v 1.4 2000/05/05 17:49:22 david Exp $
-
-
-package org.xml.sax.helpers;
-
-import org.xml.sax.Attributes;
-
-
-/**
- * Default implementation of the Attributes interface.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class provides a default implementation of the SAX2
- * {@link org.xml.sax.Attributes Attributes} interface, with the 
- * addition of manipulators so that the list can be modified or 
- * reused.</p>
- *
- * <p>There are two typical uses of this class:</p>
- *
- * <ol>
- * <li>to take a persistent snapshot of an Attributes object
- *  in a {@link org.xml.sax.ContentHandler#startElement startElement} event; or</li>
- * <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
- * </ol>
- *
- * <p>This class replaces the now-deprecated SAX1 {@link 
- * org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
- * class; in addition to supporting the updated Attributes
- * interface rather than the deprecated {@link org.xml.sax.AttributeList
- * AttributeList} interface, it also includes a much more efficient 
- * implementation using a single array rather than a set of Vectors.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- */
-public class AttributesImpl implements Attributes
-{
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Constructors.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Construct a new, empty AttributesImpl object.
-     */
-    public AttributesImpl ()
-    {
-	length = 0;
-	data = null;
-    }
-
-
-    /**
-     * Copy an existing Attributes object.
-     *
-     * <p>This constructor is especially useful inside a
-     * {@link org.xml.sax.ContentHandler#startElement startElement} event.</p>
-     *
-     * @param atts The existing Attributes object.
-     */
-    public AttributesImpl (Attributes atts)
-    {
-	setAttributes(atts);
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.Attributes.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Return the number of attributes in the list.
-     *
-     * @return The number of attributes in the list.
-     * @see org.xml.sax.Attributes#getLength
-     */
-    public int getLength ()
-    {
-	return length;
-    }
-
-
-    /**
-     * Return an attribute's Namespace URI.
-     *
-     * @param index The attribute's index (zero-based).
-     * @return The Namespace URI, the empty string if none is
-     *         available, or null if the index is out of range.
-     * @see org.xml.sax.Attributes#getURI
-     */
-    public String getURI (int index)
-    {
-	if (index >= 0 && index < length) {
-	    return data[index*5];
-	} else {
-	    return null;
-	}
-    }
-
-
-    /**
-     * Return an attribute's local name.
-     *
-     * @param index The attribute's index (zero-based).
-     * @return The attribute's local name, the empty string if 
-     *         none is available, or null if the index if out of range.
-     * @see org.xml.sax.Attributes#getLocalName
-     */
-    public String getLocalName (int index)
-    {
-	if (index >= 0 && index < length) {
-	    return data[index*5+1];
-	} else {
-	    return null;
-	}
-    }
-
-
-    /**
-     * Return an attribute's qualified (prefixed) name.
-     *
-     * @param index The attribute's index (zero-based).
-     * @return The attribute's qualified name, the empty string if 
-     *         none is available, or null if the index is out of bounds.
-     * @see org.xml.sax.Attributes#getQName
-     */
-    public String getQName (int index)
-    {
-	if (index >= 0 && index < length) {
-	    return data[index*5+2];
-	} else {
-	    return null;
-	}
-    }
-
-
-    /**
-     * Return an attribute's type by index.
-     *
-     * @param index The attribute's index (zero-based).
-     * @return The attribute's type, "CDATA" if the type is unknown, or null
-     *         if the index is out of bounds.
-     * @see org.xml.sax.Attributes#getType(int)
-     */
-    public String getType (int index)
-    {
-	if (index >= 0 && index < length) {
-	    return data[index*5+3];
-	} else {
-	    return null;
-	}
-    }
-
-
-    /**
-     * Return an attribute's value by index.
-     *
-     * @param index The attribute's index (zero-based).
-     * @return The attribute's value or null if the index is out of bounds.
-     * @see org.xml.sax.Attributes#getValue(int)
-     */
-    public String getValue (int index)
-    {
-	if (index >= 0 && index < length) {
-	    return data[index*5+4];
-	} else {
-	    return null;
-	}
-    }
-
-
-    /**
-     * Look up an attribute's index by Namespace name.
-     *
-     * <p>In many cases, it will be more efficient to look up the name once and
-     * use the index query methods rather than using the name query methods
-     * repeatedly.</p>
-     *
-     * @param uri The attribute's Namespace URI, or the empty
-     *        string if none is available.
-     * @param localName The attribute's local name.
-     * @return The attribute's index, or -1 if none matches.
-     * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
-     */
-    public int getIndex (String uri, String localName)
-    {
-	int max = length * 5;
-	for (int i = 0; i < max; i += 5) {
-	    if (data[i].equals(uri) && data[i+1].equals(localName)) {
-		return i / 5;
-	    }
-	} 
-	return -1;
-    }
-
-
-    /**
-     * Look up an attribute's index by qualified (prefixed) name.
-     *
-     * @param qName The qualified name.
-     * @return The attribute's index, or -1 if none matches.
-     * @see org.xml.sax.Attributes#getIndex(java.lang.String)
-     */
-    public int getIndex (String qName)
-    {
-	int max = length * 5;
-	for (int i = 0; i < max; i += 5) {
-	    if (data[i+2].equals(qName)) {
-		return i / 5;
-	    }
-	} 
-	return -1;
-    }
-
-
-    /**
-     * Look up an attribute's type by Namespace-qualified name.
-     *
-     * @param uri The Namespace URI, or the empty string for a name
-     *        with no explicit Namespace URI.
-     * @param localName The local name.
-     * @return The attribute's type, or null if there is no
-     *         matching attribute.
-     * @see org.xml.sax.Attributes#getType(java.lang.String,java.lang.String)
-     */
-    public String getType (String uri, String localName)
-    {
-	int max = length * 5;
-	for (int i = 0; i < max; i += 5) {
-	    if (data[i].equals(uri) && data[i+1].equals(localName)) {
-		return data[i+3];
-	    }
-	} 
-	return null;
-    }
-
-
-    /**
-     * Look up an attribute's type by qualified (prefixed) name.
-     *
-     * @param qName The qualified name.
-     * @return The attribute's type, or null if there is no
-     *         matching attribute.
-     * @see org.xml.sax.Attributes#getType(java.lang.String)
-     */
-    public String getType (String qName)
-    {
-	int max = length * 5;
-	for (int i = 0; i < max; i += 5) {
-	    if (data[i+2].equals(qName)) {
-		return data[i+3];
-	    }
-	}
-	return null;
-    }
-
-
-    /**
-     * Look up an attribute's value by Namespace-qualified name.
-     *
-     * @param uri The Namespace URI, or the empty string for a name
-     *        with no explicit Namespace URI.
-     * @param localName The local name.
-     * @return The attribute's value, or null if there is no
-     *         matching attribute.
-     * @see org.xml.sax.Attributes#getValue(java.lang.String,java.lang.String)
-     */
-    public String getValue (String uri, String localName)
-    {
-	int max = length * 5;
-	for (int i = 0; i < max; i += 5) {
-	    if (data[i].equals(uri) && data[i+1].equals(localName)) {
-		return data[i+4];
-	    }
-	}
-	return null;
-    }
-
-
-    /**
-     * Look up an attribute's value by qualified (prefixed) name.
-     *
-     * @param qName The qualified name.
-     * @return The attribute's value, or null if there is no
-     *         matching attribute.
-     * @see org.xml.sax.Attributes#getValue(java.lang.String)
-     */
-    public String getValue (String qName)
-    {
-	int max = length * 5;
-	for (int i = 0; i < max; i += 5) {
-	    if (data[i+2].equals(qName)) {
-		return data[i+4];
-	    }
-	}
-	return null;
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Manipulators.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Clear the attribute list for reuse.
-     *
-     * <p>Note that no memory is actually freed by this call:
-     * the current arrays are kept so that they can be 
-     * reused.</p>
-     */
-    public void clear ()
-    {
-	length = 0;
-    }
-
-
-    /**
-     * Copy an entire Attributes object.
-     *
-     * <p>It may be more efficient to reuse an existing object
-     * rather than constantly allocating new ones.</p>
-     * 
-     * @param atts The attributes to copy.
-     */
-    public void setAttributes (Attributes atts)
-    {
-	clear();
-	length = atts.getLength();
-	data = new String[length*5]; 
-	for (int i = 0; i < length; i++) {
-	    data[i*5] = atts.getURI(i);
-	    data[i*5+1] = atts.getLocalName(i);
-	    data[i*5+2] = atts.getQName(i);
-	    data[i*5+3] = atts.getType(i);
-	    data[i*5+4] = atts.getValue(i);
-	}
-    }
-
-
-    /**
-     * Add an attribute to the end of the list.
-     *
-     * <p>For the sake of speed, this method does no checking
-     * to see if the attribute is already in the list: that is
-     * the responsibility of the application.</p>
-     *
-     * @param uri The Namespace URI, or the empty string if
-     *        none is available or Namespace processing is not
-     *        being performed.
-     * @param localName The local name, or the empty string if
-     *        Namespace processing is not being performed.
-     * @param qName The qualified (prefixed) name, or the empty string
-     *        if qualified names are not available.
-     * @param type The attribute type as a string.
-     * @param value The attribute value.
-     */
-    public void addAttribute (String uri, String localName, String qName,
-			      String type, String value)
-    {
-	ensureCapacity(length+1);
-	data[length*5] = uri;
-	data[length*5+1] = localName;
-	data[length*5+2] = qName;
-	data[length*5+3] = type;
-	data[length*5+4] = value;
-	length++;
-    }
-
-
-    /**
-     * Set an attribute in the list.
-     *
-     * <p>For the sake of speed, this method does no checking
-     * for name conflicts or well-formedness: such checks are the
-     * responsibility of the application.</p>
-     *
-     * @param index The index of the attribute (zero-based).
-     * @param uri The Namespace URI, or the empty string if
-     *        none is available or Namespace processing is not
-     *        being performed.
-     * @param localName The local name, or the empty string if
-     *        Namespace processing is not being performed.
-     * @param qName The qualified name, or the empty string
-     *        if qualified names are not available.
-     * @param type The attribute type as a string.
-     * @param value The attribute value.
-     * @exception java.lang.ArrayIndexOutOfBoundsException When the
-     *            supplied index does not point to an attribute
-     *            in the list.
-     */
-    public void setAttribute (int index, String uri, String localName,
-			      String qName, String type, String value)
-    {
-	if (index >= 0 && index < length) {
-	    data[index*5] = uri;
-	    data[index*5+1] = localName;
-	    data[index*5+2] = qName;
-	    data[index*5+3] = type;
-	    data[index*5+4] = value;
-	} else {
-	    badIndex(index);
-	}
-    }
-
-
-    /**
-     * Remove an attribute from the list.
-     *
-     * @param index The index of the attribute (zero-based).
-     * @exception java.lang.ArrayIndexOutOfBoundsException When the
-     *            supplied index does not point to an attribute
-     *            in the list.
-     */
-    public void removeAttribute (int index)
-    {
-	if (index >= 0 && index < length) {
-	    data[index*5] = null;
-	    data[index*5+1] = null;
-	    data[index*5+2] = null;
-	    data[index*5+3] = null;
-	    data[index*5+4] = null;
-	    if (index < length - 1) {
-		System.arraycopy(data, (index+1)*5, data, index*5,
-				 (length-index-1)*5);
-	    }
-	    length--;
-	} else {
-	    badIndex(index);
-	}
-    }
-
-
-    /**
-     * Set the Namespace URI of a specific attribute.
-     *
-     * @param index The index of the attribute (zero-based).
-     * @param uri The attribute's Namespace URI, or the empty
-     *        string for none.
-     * @exception java.lang.ArrayIndexOutOfBoundsException When the
-     *            supplied index does not point to an attribute
-     *            in the list.
-     */
-    public void setURI (int index, String uri)
-    {
-	if (index >= 0 && index < length) {
-	    data[index*5] = uri;
-	} else {
-	    badIndex(index);
-	}
-    }
-
-
-    /**
-     * Set the local name of a specific attribute.
-     *
-     * @param index The index of the attribute (zero-based).
-     * @param localName The attribute's local name, or the empty
-     *        string for none.
-     * @exception java.lang.ArrayIndexOutOfBoundsException When the
-     *            supplied index does not point to an attribute
-     *            in the list.
-     */
-    public void setLocalName (int index, String localName)
-    {
-	if (index >= 0 && index < length) {
-	    data[index*5+1] = localName;
-	} else {
-	    badIndex(index);
-	}
-    }
-
-
-    /**
-     * Set the qualified name of a specific attribute.
-     *
-     * @param index The index of the attribute (zero-based).
-     * @param qName The attribute's qualified name, or the empty
-     *        string for none.
-     * @exception java.lang.ArrayIndexOutOfBoundsException When the
-     *            supplied index does not point to an attribute
-     *            in the list.
-     */
-    public void setQName (int index, String qName)
-    {
-	if (index >= 0 && index < length) {
-	    data[index*5+2] = qName;
-	} else {
-	    badIndex(index);
-	}
-    }
-
-
-    /**
-     * Set the type of a specific attribute.
-     *
-     * @param index The index of the attribute (zero-based).
-     * @param type The attribute's type.
-     * @exception java.lang.ArrayIndexOutOfBoundsException When the
-     *            supplied index does not point to an attribute
-     *            in the list.
-     */
-    public void setType (int index, String type)
-    {
-	if (index >= 0 && index < length) {
-	    data[index*5+3] = type;
-	} else {
-	    badIndex(index);
-	}
-    }
-
-
-    /**
-     * Set the value of a specific attribute.
-     *
-     * @param index The index of the attribute (zero-based).
-     * @param value The attribute's value.
-     * @exception java.lang.ArrayIndexOutOfBoundsException When the
-     *            supplied index does not point to an attribute
-     *            in the list.
-     */
-    public void setValue (int index, String value)
-    {
-	if (index >= 0 && index < length) {
-	    data[index*5+4] = value;
-	} else {
-	    badIndex(index);
-	}
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal methods.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Ensure the internal array's capacity.
-     *
-     * @param n The minimum number of attributes that the array must
-     *        be able to hold.
-     */
-    private void ensureCapacity (int n)
-    {
-	if (n > 0 && data == null) {
-	    data = new String[25];
-	}
-
-	int max = data.length;
-	if (max >= n * 5) {
-	    return;
-	}
-
-
-	while (max < n * 5) {
-	    max *= 2;
-	}
-	String newData[] = new String[max];
-	System.arraycopy(data, 0, newData, 0, length*5);
-	data = newData;
-    }
-
-
-    /**
-     * Report a bad array index in a manipulator.
-     *
-     * @param index The index to report.
-     * @exception java.lang.ArrayIndexOutOfBoundsException Always.
-     */
-    private void badIndex (int index)
-	throws ArrayIndexOutOfBoundsException
-    {
-	String msg =
-	    "Attempt to modify attribute at illegal index: " + index;
-	throw new ArrayIndexOutOfBoundsException(msg);
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-
-    int length;
-    String data [];
-
-}
-
-// end of AttributesImpl.java
-
diff --git a/src/org/xml/sax/helpers/DefaultHandler.java b/src/org/xml/sax/helpers/DefaultHandler.java
deleted file mode 100644
index b3b24f0..0000000
--- a/src/org/xml/sax/helpers/DefaultHandler.java
+++ /dev/null
@@ -1,447 +0,0 @@
-// DefaultHandler.java - default implementation of the core handlers.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the public domain.
-
-// $Id: DefaultHandler.java,v 1.3 2000/05/05 17:49:33 david Exp $
-
-package org.xml.sax.helpers;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-
-/**
- * Default base class for SAX2 event handlers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class is available as a convenience base class for SAX2
- * applications: it provides default implementations for all of the
- * callbacks in the four core SAX2 handler classes:</p>
- *
- * <ul>
- * <li>{@link org.xml.sax.EntityResolver EntityResolver}</li>
- * <li>{@link org.xml.sax.DTDHandler DTDHandler}</li>
- * <li>{@link org.xml.sax.ContentHandler ContentHandler}</li>
- * <li>{@link org.xml.sax.ErrorHandler ErrorHandler}</li>
- * </ul>
- *
- * <p>Application writers can extend this class when they need to
- * implement only part of an interface; parser writers can
- * instantiate this class to provide default handlers when the
- * application has not supplied its own.</p>
- *
- * <p>This class replaces the deprecated SAX1
- * {@link org.xml.sax.HandlerBase HandlerBase} class.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.EntityResolver
- * @see org.xml.sax.DTDHandler
- * @see org.xml.sax.ContentHandler
- * @see org.xml.sax.ErrorHandler
- */
-public class DefaultHandler
-    implements EntityResolver, DTDHandler, ContentHandler, ErrorHandler
-{
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of the EntityResolver interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    /**
-     * Resolve an external entity.
-     *
-     * <p>Always return null, so that the parser will use the system
-     * identifier provided in the XML document.  This method implements
-     * the SAX default behaviour: application writers can override it
-     * in a subclass to do special translations such as catalog lookups
-     * or URI redirection.</p>
-     *
-     * @param publicId The public identifer, or null if none is
-     *                 available.
-     * @param systemId The system identifier provided in the XML 
-     *                 document.
-     * @return The new input source, or null to require the
-     *         default behaviour.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.EntityResolver#resolveEntity
-     */
-    public InputSource resolveEntity (String publicId, String systemId)
-	throws SAXException
-    {
-	return null;
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of DTDHandler interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Receive notification of a notation declaration.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass if they wish to keep track of the notations
-     * declared in a document.</p>
-     *
-     * @param name The notation name.
-     * @param publicId The notation public identifier, or null if not
-     *                 available.
-     * @param systemId The notation system identifier.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DTDHandler#notationDecl
-     */
-    public void notationDecl (String name, String publicId, String systemId)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of an unparsed entity declaration.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to keep track of the unparsed entities
-     * declared in a document.</p>
-     *
-     * @param name The entity name.
-     * @param publicId The entity public identifier, or null if not
-     *                 available.
-     * @param systemId The entity system identifier.
-     * @param notationName The name of the associated notation.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
-     */
-    public void unparsedEntityDecl (String name, String publicId,
-				    String systemId, String notationName)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of ContentHandler interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Receive a Locator object for document events.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass if they wish to store the locator for use
-     * with other document events.</p>
-     *
-     * @param locator A locator for all SAX document events.
-     * @see org.xml.sax.ContentHandler#setDocumentLocator
-     * @see org.xml.sax.Locator
-     */
-    public void setDocumentLocator (Locator locator)
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the beginning of the document.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the beginning
-     * of a document (such as allocating the root node of a tree or
-     * creating an output file).</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#startDocument
-     */
-    public void startDocument ()
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the end of the document.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the end
-     * of a document (such as finalising a tree or closing an output
-     * file).</p>
-     *
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#endDocument
-     */
-    public void endDocument ()
-	throws SAXException
-    {
-	// no op
-    }
-
-
-    /**
-     * Receive notification of the start of a Namespace mapping.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the start of
-     * each Namespace prefix scope (such as storing the prefix mapping).</p>
-     *
-     * @param prefix The Namespace prefix being declared.
-     * @param uri The Namespace URI mapped to the prefix.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#startPrefixMapping
-     */
-    public void startPrefixMapping (String prefix, String uri)
-	throws SAXException
-    {
-	// no op
-    }
-
-
-    /**
-     * Receive notification of the end of a Namespace mapping.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the end of
-     * each prefix mapping.</p>
-     *
-     * @param prefix The Namespace prefix being declared.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#endPrefixMapping
-     */
-    public void endPrefixMapping (String prefix)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the start of an element.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the start of
-     * each element (such as allocating a new tree node or writing
-     * output to a file).</p>
-     *
-     * @param name The element type name.
-     * @param attributes The specified or defaulted attributes.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#startElement
-     */
-    public void startElement (String uri, String localName,
-			      String qName, Attributes attributes)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of the end of an element.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions at the end of
-     * each element (such as finalising a tree node or writing
-     * output to a file).</p>
-     *
-     * @param name The element type name.
-     * @param attributes The specified or defaulted attributes.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#endElement
-     */
-    public void endElement (String uri, String localName, String qName)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of character data inside an element.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method to take specific actions for each chunk of character data
-     * (such as adding the data to a node or buffer, or printing it to
-     * a file).</p>
-     *
-     * @param ch The characters.
-     * @param start The start position in the character array.
-     * @param length The number of characters to use from the
-     *               character array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#characters
-     */
-    public void characters (char ch[], int start, int length)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of ignorable whitespace in element content.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method to take specific actions for each chunk of ignorable
-     * whitespace (such as adding data to a node or buffer, or printing
-     * it to a file).</p>
-     *
-     * @param ch The whitespace characters.
-     * @param start The start position in the character array.
-     * @param length The number of characters to use from the
-     *               character array.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#ignorableWhitespace
-     */
-    public void ignorableWhitespace (char ch[], int start, int length)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of a processing instruction.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions for each
-     * processing instruction, such as setting status variables or
-     * invoking other methods.</p>
-     *
-     * @param target The processing instruction target.
-     * @param data The processing instruction data, or null if
-     *             none is supplied.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#processingInstruction
-     */
-    public void processingInstruction (String target, String data)
-	throws SAXException
-    {
-	// no op
-    }
-
-
-    /**
-     * Receive notification of a skipped entity.
-     *
-     * <p>By default, do nothing.  Application writers may override this
-     * method in a subclass to take specific actions for each
-     * processing instruction, such as setting status variables or
-     * invoking other methods.</p>
-     *
-     * @param name The name of the skipped entity.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ContentHandler#processingInstruction
-     */
-    public void skippedEntity (String name)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Default implementation of the ErrorHandler interface.
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Receive notification of a parser warning.
-     *
-     * <p>The default implementation does nothing.  Application writers
-     * may override this method in a subclass to take specific actions
-     * for each warning, such as inserting the message in a log file or
-     * printing it to the console.</p>
-     *
-     * @param e The warning information encoded as an exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ErrorHandler#warning
-     * @see org.xml.sax.SAXParseException
-     */
-    public void warning (SAXParseException e)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Receive notification of a recoverable parser error.
-     *
-     * <p>The default implementation does nothing.  Application writers
-     * may override this method in a subclass to take specific actions
-     * for each error, such as inserting the message in a log file or
-     * printing it to the console.</p>
-     *
-     * @param e The warning information encoded as an exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ErrorHandler#warning
-     * @see org.xml.sax.SAXParseException
-     */
-    public void error (SAXParseException e)
-	throws SAXException
-    {
-	// no op
-    }
-    
-    
-    /**
-     * Report a fatal XML parsing error.
-     *
-     * <p>The default implementation throws a SAXParseException.
-     * Application writers may override this method in a subclass if
-     * they need to take specific actions for each fatal error (such as
-     * collecting all of the errors into a single report): in any case,
-     * the application must stop all regular processing when this
-     * method is invoked, since the document is no longer reliable, and
-     * the parser may no longer report parsing events.</p>
-     *
-     * @param e The error information encoded as an exception.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @see org.xml.sax.ErrorHandler#fatalError
-     * @see org.xml.sax.SAXParseException
-     */
-    public void fatalError (SAXParseException e)
-	throws SAXException
-    {
-	throw e;
-    }
-    
-}
-
-// end of DefaultHandler.java
diff --git a/src/org/xml/sax/helpers/LocatorImpl.java b/src/org/xml/sax/helpers/LocatorImpl.java
deleted file mode 100644
index cf4d7ef..0000000
--- a/src/org/xml/sax/helpers/LocatorImpl.java
+++ /dev/null
@@ -1,212 +0,0 @@
-// SAX default implementation for Locator.
-// No warranty; no copyright -- use this as you will.
-// $Id: LocatorImpl.java,v 1.4 2000/05/05 17:49:44 david Exp $
-
-package org.xml.sax.helpers;
-
-import org.xml.sax.Locator;
-
-
-/**
- * Provide an optional convenience implementation of Locator.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class is available mainly for application writers, who
- * can use it to make a persistent snapshot of a locator at any
- * point during a document parse:</p>
- *
- * <pre>
- * Locator locator;
- * Locator startloc;
- *
- * public void setLocator (Locator locator)
- * {
- *         // note the locator
- *   this.locator = locator;
- * }
- *
- * public void startDocument ()
- * {
- *         // save the location of the start of the document
- *         // for future use.
- *   Locator startloc = new LocatorImpl(locator);
- * }
- *</pre>
- *
- * <p>Normally, parser writers will not use this class, since it
- * is more efficient to provide location information only when
- * requested, rather than constantly updating a Locator object.</p>
- *
- * @since SAX 1.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.Locator Locator
- */
-public class LocatorImpl implements Locator
-{
-    
-    
-    /**
-     * Zero-argument constructor.
-     *
-     * <p>This will not normally be useful, since the main purpose
-     * of this class is to make a snapshot of an existing Locator.</p>
-     */
-    public LocatorImpl ()
-    {
-    }
-    
-    
-    /**
-     * Copy constructor.
-     *
-     * <p>Create a persistent copy of the current state of a locator.
-     * When the original locator changes, this copy will still keep
-     * the original values (and it can be used outside the scope of
-     * DocumentHandler methods).</p>
-     *
-     * @param locator The locator to copy.
-     */
-    public LocatorImpl (Locator locator)
-    {
-	setPublicId(locator.getPublicId());
-	setSystemId(locator.getSystemId());
-	setLineNumber(locator.getLineNumber());
-	setColumnNumber(locator.getColumnNumber());
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.Locator
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Return the saved public identifier.
-     *
-     * @return The public identifier as a string, or null if none
-     *         is available.
-     * @see org.xml.sax.Locator#getPublicId
-     * @see #setPublicId
-     */
-    public String getPublicId ()
-    {
-	return publicId;
-    }
-    
-    
-    /**
-     * Return the saved system identifier.
-     *
-     * @return The system identifier as a string, or null if none
-     *         is available.
-     * @see org.xml.sax.Locator#getSystemId
-     * @see #setSystemId
-     */
-    public String getSystemId ()
-    {
-	return systemId;
-    }
-    
-    
-    /**
-     * Return the saved line number (1-based).
-     *
-     * @return The line number as an integer, or -1 if none is available.
-     * @see org.xml.sax.Locator#getLineNumber
-     * @see #setLineNumber
-     */
-    public int getLineNumber ()
-    {
-	return lineNumber;
-    }
-    
-    
-    /**
-     * Return the saved column number (1-based).
-     *
-     * @return The column number as an integer, or -1 if none is available.
-     * @see org.xml.sax.Locator#getColumnNumber
-     * @see #setColumnNumber
-     */
-    public int getColumnNumber ()
-    {
-	return columnNumber;
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Setters for the properties (not in org.xml.sax.Locator)
-    ////////////////////////////////////////////////////////////////////
-    
-    
-    /**
-     * Set the public identifier for this locator.
-     *
-     * @param publicId The new public identifier, or null 
-     *        if none is available.
-     * @see #getPublicId
-     */
-    public void setPublicId (String publicId)
-    {
-	this.publicId = publicId;
-    }
-    
-    
-    /**
-     * Set the system identifier for this locator.
-     *
-     * @param systemId The new system identifier, or null 
-     *        if none is available.
-     * @see #getSystemId
-     */
-    public void setSystemId (String systemId)
-    {
-	this.systemId = systemId;
-    }
-    
-    
-    /**
-     * Set the line number for this locator (1-based).
-     *
-     * @param lineNumber The line number, or -1 if none is available.
-     * @see #getLineNumber
-     */
-    public void setLineNumber (int lineNumber)
-    {
-	this.lineNumber = lineNumber;
-    }
-    
-    
-    /**
-     * Set the column number for this locator (1-based).
-     *
-     * @param columnNumber The column number, or -1 if none is available.
-     * @see #getColumnNumber
-     */
-    public void setColumnNumber (int columnNumber)
-    {
-	this.columnNumber = columnNumber;
-    }
-    
-    
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-    
-    private String publicId;
-    private String systemId;
-    private int lineNumber;
-    private int columnNumber;
-    
-}
-
-// end of LocatorImpl.java
diff --git a/src/org/xml/sax/helpers/NamespaceSupport.java b/src/org/xml/sax/helpers/NamespaceSupport.java
deleted file mode 100644
index 9937479..0000000
--- a/src/org/xml/sax/helpers/NamespaceSupport.java
+++ /dev/null
@@ -1,689 +0,0 @@
-// NamespaceSupport.java - generic Namespace support for SAX.
-// Written by David Megginson, sax@megginson.com
-// This class is in the Public Domain.  NO WARRANTY!
-
-// $Id: NamespaceSupport.java,v 1.8 2000/05/05 17:49:53 david Exp $
-
-package org.xml.sax.helpers;
-
-import java.util.EmptyStackException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-
-/**
- * Encapsulate Namespace logic for use by SAX drivers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class encapsulates the logic of Namespace processing:
- * it tracks the declarations currently in force for each context
- * and automatically processes qualified XML 1.0 names into their
- * Namespace parts; it can also be used in reverse for generating
- * XML 1.0 from Namespaces.</p>
- *
- * <p>Namespace support objects are reusable, but the reset method
- * must be invoked between each session.</p>
- *
- * <p>Here is a simple session:</p>
- *
- * <pre>
- * String parts[] = new String[3];
- * NamespaceSupport support = new NamespaceSupport();
- *
- * support.pushContext();
- * support.declarePrefix("", "http://www.w3.org/1999/xhtml");
- * support.declarePrefix("dc", "http://www.purl.org/dc#");
- *
- * String parts[] = support.processName("p", parts, false);
- * System.out.println("Namespace URI: " + parts[0]);
- * System.out.println("Local name: " + parts[1]);
- * System.out.println("Raw name: " + parts[2]);
-
- * String parts[] = support.processName("dc:title", parts, false);
- * System.out.println("Namespace URI: " + parts[0]);
- * System.out.println("Local name: " + parts[1]);
- * System.out.println("Raw name: " + parts[2]);
-
- * support.popContext();
- * </pre>
- *
- * <p>Note that this class is optimized for the use case where most
- * elements do not contain Namespace declarations: if the same
- * prefix/URI mapping is repeated for each context (for example), this
- * class will be somewhat less efficient.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- */
-public class NamespaceSupport
-{
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Constants.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * The XML Namespace as a constant.
-     *
-     * <p>This is the Namespace URI that is automatically mapped
-     * to the "xml" prefix.</p>
-     */
-    public final static String XMLNS =
-	"http://www.w3.org/XML/1998/namespace";
-
-
-    /**
-     * An empty enumeration.
-     */
-    private final static Enumeration EMPTY_ENUMERATION =
-	new Vector().elements();
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Constructor.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Create a new Namespace support object.
-     */
-    public NamespaceSupport ()
-    {
-	reset();
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Context management.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Reset this Namespace support object for reuse.
-     *
-     * <p>It is necessary to invoke this method before reusing the
-     * Namespace support object for a new session.</p>
-     */
-    public void reset ()
-    {
-	contexts = new Context[32];
-	contextPos = 0;
-	contexts[contextPos] = currentContext = new Context();
-	currentContext.declarePrefix("xml", XMLNS);
-    }
-
-
-    /**
-     * Start a new Namespace context.
-     *
-     * <p>Normally, you should push a new context at the beginning
-     * of each XML element: the new context will automatically inherit
-     * the declarations of its parent context, but it will also keep
-     * track of which declarations were made within this context.</p>
-     *
-     * <p>The Namespace support object always starts with a base context
-     * already in force: in this context, only the "xml" prefix is
-     * declared.</p>
-     *
-     * @see #popContext
-     */
-    public void pushContext ()
-    {
-	int max = contexts.length;
-	contextPos++;
-
-				// Extend the array if necessary
-	if (contextPos >= max) {
-	    Context newContexts[] = new Context[max*2];
-	    System.arraycopy(contexts, 0, newContexts, 0, max);
-	    max *= 2;
-	    contexts = newContexts;
-	}
-
-				// Allocate the context if necessary.
-	currentContext = contexts[contextPos];
-	if (currentContext == null) {
-	    contexts[contextPos] = currentContext = new Context();
-	}
-
-				// Set the parent, if any.
-	if (contextPos > 0) {
-	    currentContext.setParent(contexts[contextPos - 1]);
-	}
-    }
-
-
-    /**
-     * Revert to the previous Namespace context.
-     *
-     * <p>Normally, you should pop the context at the end of each
-     * XML element.  After popping the context, all Namespace prefix
-     * mappings that were previously in force are restored.</p>
-     *
-     * <p>You must not attempt to declare additional Namespace
-     * prefixes after popping a context, unless you push another
-     * context first.</p>
-     *
-     * @see #pushContext
-     */
-    public void popContext ()
-    {
-	contextPos--;
-	if (contextPos < 0) {
-	    throw new EmptyStackException();
-	}
-	currentContext = contexts[contextPos];
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Operations within a context.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Declare a Namespace prefix.
-     *
-     * <p>This method declares a prefix in the current Namespace
-     * context; the prefix will remain in force until this context
-     * is popped, unless it is shadowed in a descendant context.</p>
-     *
-     * <p>To declare a default Namespace, use the empty string.  The
-     * prefix must not be "xml" or "xmlns".</p>
-     *
-     * <p>Note that you must <em>not</em> declare a prefix after
-     * you've pushed and popped another Namespace.</p>
-     *
-     * <p>Note that there is an asymmetry in this library: while {@link
-     * #getPrefix getPrefix} will not return the default "" prefix,
-     * even if you have declared one; to check for a default prefix,
-     * you have to look it up explicitly using {@link #getURI getURI}.
-     * This asymmetry exists to make it easier to look up prefixes
-     * for attribute names, where the default prefix is not allowed.</p>
-     *
-     * @param prefix The prefix to declare, or null for the empty
-     *        string.
-     * @param uri The Namespace URI to associate with the prefix.
-     * @return true if the prefix was legal, false otherwise
-     * @see #processName
-     * @see #getURI
-     * @see #getPrefix
-     */
-    public boolean declarePrefix (String prefix, String uri)
-    {
-	if (prefix.equals("xml") || prefix.equals("xmlns")) {
-	    return false;
-	} else {
-	    currentContext.declarePrefix(prefix, uri);
-	    return true;
-	}
-    }
-
-
-    /**
-     * Process a raw XML 1.0 name.
-     *
-     * <p>This method processes a raw XML 1.0 name in the current
-     * context by removing the prefix and looking it up among the
-     * prefixes currently declared.  The return value will be the
-     * array supplied by the caller, filled in as follows:</p>
-     *
-     * <dl>
-     * <dt>parts[0]</dt>
-     * <dd>The Namespace URI, or an empty string if none is
-     *  in use.</dd>
-     * <dt>parts[1]</dt>
-     * <dd>The local name (without prefix).</dd>
-     * <dt>parts[2]</dt>
-     * <dd>The original raw name.</dd>
-     * </dl>
-     *
-     * <p>All of the strings in the array will be internalized.  If
-     * the raw name has a prefix that has not been declared, then
-     * the return value will be null.</p>
-     *
-     * <p>Note that attribute names are processed differently than
-     * element names: an unprefixed element name will received the
-     * default Namespace (if any), while an unprefixed element name
-     * will not.</p>
-     *
-     * @param qName The raw XML 1.0 name to be processed.
-     * @param parts An array supplied by the caller, capable of
-     *        holding at least three members.
-     * @param isAttribute A flag indicating whether this is an
-     *        attribute name (true) or an element name (false).
-     * @return The supplied array holding three internalized strings 
-     *        representing the Namespace URI (or empty string), the
-     *        local name, and the raw XML 1.0 name; or null if there
-     *        is an undeclared prefix.
-     * @see #declarePrefix
-     * @see java.lang.String#intern */
-    public String [] processName (String qName, String parts[],
-				  boolean isAttribute)
-    {
-	String myParts[] = currentContext.processName(qName, isAttribute);
-	if (myParts == null) {
-	    return null;
-	} else {
-	    parts[0] = myParts[0];
-	    parts[1] = myParts[1];
-	    parts[2] = myParts[2];
-	    return parts;
-	}
-    }
-
-
-    /**
-     * Look up a prefix and get the currently-mapped Namespace URI.
-     *
-     * <p>This method looks up the prefix in the current context.
-     * Use the empty string ("") for the default Namespace.</p>
-     *
-     * @param prefix The prefix to look up.
-     * @return The associated Namespace URI, or null if the prefix
-     *         is undeclared in this context.
-     * @see #getPrefix
-     * @see #getPrefixes
-     */
-    public String getURI (String prefix)
-    {
-	return currentContext.getURI(prefix);
-    }
-
-
-    /**
-     * Return an enumeration of all prefixes currently declared.
-     *
-     * <p><strong>Note:</strong> if there is a default prefix, it will not be
-     * returned in this enumeration; check for the default prefix
-     * using the {@link #getURI getURI} with an argument of "".</p>
-     *
-     * @return An enumeration of all prefixes declared in the
-     *         current context except for the empty (default)
-     *         prefix.
-     * @see #getDeclaredPrefixes
-     * @see #getURI
-     */
-    public Enumeration getPrefixes ()
-    {
-	return currentContext.getPrefixes();
-    }
-
-
-    /**
-     * Return one of the prefixes mapped to a Namespace URI.
-     *
-     * <p>If more than one prefix is currently mapped to the same
-     * URI, this method will make an arbitrary selection; if you
-     * want all of the prefixes, use the {@link #getPrefixes}
-     * method instead.</p>
-     *
-     * <p><strong>Note:</strong> this will never return the empty (default) prefix;
-     * to check for a default prefix, use the {@link #getURI getURI}
-     * method with an argument of "".</p>
-     *
-     * @param uri The Namespace URI.
-     * @param isAttribute true if this prefix is for an attribute
-     *        (and the default Namespace is not allowed).
-     * @return One of the prefixes currently mapped to the URI supplied,
-     *         or null if none is mapped or if the URI is assigned to
-     *         the default Namespace.
-     * @see #getPrefixes(java.lang.String)
-     * @see #getURI
-     */
-    public String getPrefix (String uri)
-    {
-	return currentContext.getPrefix(uri);
-    }
-
-
-    /**
-     * Return an enumeration of all prefixes currently declared for a URI.
-     *
-     * <p>This method returns prefixes mapped to a specific Namespace
-     * URI.  The xml: prefix will be included.  If you want only one
-     * prefix that's mapped to the Namespace URI, and you don't care 
-     * which one you get, use the {@link #getPrefix getPrefix}
-     *  method instead.</p>
-     *
-     * <p><strong>Note:</strong> the empty (default) prefix is <em>never</em> included
-     * in this enumeration; to check for the presence of a default
-     * Namespace, use the {@link #getURI getURI} method with an
-     * argument of "".</p>
-     *
-     * @param uri The Namespace URI.
-     * @return An enumeration of all prefixes declared in the
-     *         current context.
-     * @see #getPrefix
-     * @see #getDeclaredPrefixes
-     * @see #getURI
-     */
-    public Enumeration getPrefixes (String uri)
-    {
-	Vector prefixes = new Vector();
-	Enumeration allPrefixes = getPrefixes();
-	while (allPrefixes.hasMoreElements()) {
-	    String prefix = (String)allPrefixes.nextElement();
-	    if (uri.equals(getURI(prefix))) {
-		prefixes.addElement(prefix);
-	    }
-	}
-	return prefixes.elements();
-    }
-
-
-    /**
-     * Return an enumeration of all prefixes declared in this context.
-     *
-     * <p>The empty (default) prefix will be included in this 
-     * enumeration; note that this behaviour differs from that of
-     * {@link #getPrefix} and {@link #getPrefixes}.</p>
-     *
-     * @return An enumeration of all prefixes declared in this
-     *         context.
-     * @see #getPrefixes
-     * @see #getURI
-     */
-    public Enumeration getDeclaredPrefixes ()
-    {
-	return currentContext.getDeclaredPrefixes();
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-
-    private Context contexts[];
-    private Context currentContext;
-    private int contextPos;
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal classes.
-    ////////////////////////////////////////////////////////////////////
-
-    /**
-     * Internal class for a single Namespace context.
-     *
-     * <p>This module caches and reuses Namespace contexts, so the number allocated
-     * will be equal to the element depth of the document, not to the total
-     * number of elements (i.e. 5-10 rather than tens of thousands).</p>
-     */
-    final class Context {
-
-	/**
-	 * Create the root-level Namespace context.
-	 */
-	Context ()
-	{
-	    copyTables();
-	}
-	
-	
-	/**
-	 * (Re)set the parent of this Namespace context.
-	 *
-	 * @param context The parent Namespace context object.
-	 */
-	void setParent (Context parent)
-	{
-	    this.parent = parent;
-	    declarations = null;
-	    prefixTable = parent.prefixTable;
-	    uriTable = parent.uriTable;
-	    elementNameTable = parent.elementNameTable;
-	    attributeNameTable = parent.attributeNameTable;
-	    defaultNS = parent.defaultNS;
-	    tablesDirty = false;
-	}
-	
-	
-	/**
-	 * Declare a Namespace prefix for this context.
-	 *
-	 * @param prefix The prefix to declare.
-	 * @param uri The associated Namespace URI.
-	 * @see org.xml.sax.helpers.NamespaceSupport#declarePrefix
-	 */
-	void declarePrefix (String prefix, String uri)
-	{
-				// Lazy processing...
-	    if (!tablesDirty) {
-		copyTables();
-	    }
-	    if (declarations == null) {
-		declarations = new Vector();
-	    }
-	    
-	    prefix = prefix.intern();
-	    uri = uri.intern();
-	    if ("".equals(prefix)) {
-		if ("".equals(uri)) {
-		    defaultNS = null;
-		} else {
-		    defaultNS = uri;
-		}
-	    } else {
-		prefixTable.put(prefix, uri);
-		uriTable.put(uri, prefix); // may wipe out another prefix
-	    }
-	    declarations.addElement(prefix);
-	}
-
-
-	/**
-	 * Process a raw XML 1.0 name in this context.
-	 *
-	 * @param qName The raw XML 1.0 name.
-	 * @param isAttribute true if this is an attribute name.
-	 * @return An array of three strings containing the
-	 *         URI part (or empty string), the local part,
-	 *         and the raw name, all internalized, or null
-	 *         if there is an undeclared prefix.
-	 * @see org.xml.sax.helpers.NamespaceSupport#processName
-	 */
-	String [] processName (String qName, boolean isAttribute)
-	{
-	    String name[];
-	    Hashtable table;
-	    
-				// Select the appropriate table.
-	    if (isAttribute) {
-		table = elementNameTable;
-	    } else {
-		table = attributeNameTable;
-	    }
-	    
-				// Start by looking in the cache, and
-				// return immediately if the name
-				// is already known in this content
-	    name = (String[])table.get(qName);
-	    if (name != null) {
-		return name;
-	    }
-	    
-				// We haven't seen this name in this
-				// context before.
-	    name = new String[3];
-	    int index = qName.indexOf(':');
-	    
-	    
-				// No prefix.
-	    if (index == -1) {
-		if (isAttribute || defaultNS == null) {
-		    name[0] = "";
-		} else {
-		    name[0] = defaultNS;
-		}
-		name[1] = qName.intern();
-		name[2] = name[1];
-	    }
-	    
-				// Prefix
-	    else {
-		String prefix = qName.substring(0, index);
-		String local = qName.substring(index+1);
-		String uri;
-		if ("".equals(prefix)) {
-		    uri = defaultNS;
-		} else {
-		    uri = (String)prefixTable.get(prefix);
-		}
-		if (uri == null) {
-		    return null;
-		}
-		name[0] = uri;
-		name[1] = local.intern();
-		name[2] = qName.intern();
-	    }
-	    
-				// Save in the cache for future use.
-	    table.put(name[2], name);
-	    tablesDirty = true;
-	    return name;
-	}
-	
-
-	/**
-	 * Look up the URI associated with a prefix in this context.
-	 *
-	 * @param prefix The prefix to look up.
-	 * @return The associated Namespace URI, or null if none is
-	 *         declared.	
-	 * @see org.xml.sax.helpers.NamespaceSupport#getURI
-	 */
-	String getURI (String prefix)
-	{
-	    if ("".equals(prefix)) {
-		return defaultNS;
-	    } else if (prefixTable == null) {
-		return null;
-	    } else {
-		return (String)prefixTable.get(prefix);
-	    }
-	}
-
-
-	/**
-	 * Look up one of the prefixes associated with a URI in this context.
-	 *
-	 * <p>Since many prefixes may be mapped to the same URI,
-	 * the return value may be unreliable.</p>
-	 *
-	 * @param uri The URI to look up.
-	 * @return The associated prefix, or null if none is declared.
-	 * @see org.xml.sax.helpers.NamespaceSupport#getPrefix
-	 */
-	String getPrefix (String uri)
-	{
-	    if (uriTable == null) {
-		return null;
-	    } else {
-		return (String)uriTable.get(uri);
-	    }
-	}
-	
-	
-	/**
-	 * Return an enumeration of prefixes declared in this context.
-	 *
-	 * @return An enumeration of prefixes (possibly empty).
-	 * @see org.xml.sax.helpers.NamespaceSupport#getDeclaredPrefixes
-	 */
-	Enumeration getDeclaredPrefixes ()
-	{
-	    if (declarations == null) {
-		return EMPTY_ENUMERATION;
-	    } else {
-		return declarations.elements();
-	    }
-	}
-	
-	
-	/**
-	 * Return an enumeration of all prefixes currently in force.
-	 *
-	 * <p>The default prefix, if in force, is <em>not</em>
-	 * returned, and will have to be checked for separately.</p>
-	 *
-	 * @return An enumeration of prefixes (never empty).
-	 * @see org.xml.sax.helpers.NamespaceSupport#getPrefixes
-	 */
-	Enumeration getPrefixes ()
-	{
-	    if (prefixTable == null) {
-		return EMPTY_ENUMERATION;
-	    } else {
-		return prefixTable.keys();
-	    }
-	}
-	
-	
-
-	////////////////////////////////////////////////////////////////
-	// Internal methods.
-	////////////////////////////////////////////////////////////////
-
-
-	/**
-	 * Copy on write for the internal tables in this context.
-	 *
-	 * <p>This class is optimized for the normal case where most
-	 * elements do not contain Namespace declarations.</p>
-	 */	
-	private void copyTables ()
-	{
-	    if (prefixTable != null) {
-		prefixTable = (Hashtable)prefixTable.clone();
-	    } else {
-		prefixTable = new Hashtable();
-	    }
-	    if (uriTable != null) {
-		uriTable = (Hashtable)uriTable.clone();
-	    } else {
-		uriTable = new Hashtable();
-	    }
-	    elementNameTable = new Hashtable();
-	    attributeNameTable = new Hashtable();
-	    tablesDirty = true;
-	}
-
-
-
-	////////////////////////////////////////////////////////////////
-	// Protected state.
-	////////////////////////////////////////////////////////////////
-	
-	Hashtable prefixTable;
-	Hashtable uriTable;
-	Hashtable elementNameTable;
-	Hashtable attributeNameTable;
-	String defaultNS = null;
-	
-
-
-	////////////////////////////////////////////////////////////////
-	// Internal state.
-	////////////////////////////////////////////////////////////////
-	
-	private Vector declarations = null;
-	private boolean tablesDirty = false;
-	private Context parent = null;
-    }
-}
-
-// end of NamespaceSupport.java
diff --git a/src/org/xml/sax/helpers/NewInstance.java b/src/org/xml/sax/helpers/NewInstance.java
deleted file mode 100644
index a5fe19c..0000000
--- a/src/org/xml/sax/helpers/NewInstance.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// NewInstance.java - create a new instance of a class by name.
-// http://www.saxproject.org
-// Written by Edwin Goei, edwingo@apache.org
-// and by David Brownell, dbrownell@users.sourceforge.net
-// NO WARRANTY!  This class is in the Public Domain.
-// $Id$
-
-package org.xml.sax.helpers;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-
-/**
- * Create a new instance of a class by name.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
- * for further information.
- * </blockquote>
- *
- * <p>This class contains a static method for creating an instance of a
- * class from an explicit class name.  It tries to use the thread's context
- * ClassLoader if possible and falls back to using
- * Class.forName(String).</p>
- *
- * <p>This code is designed to compile and run on JDK version 1.1 and later
- * including versions of Java 2.</p>
- *
- * @author Edwin Goei, David Brownell
- * @version 2.0r2pre3
- */
-class NewInstance {
-
-    /**
-     * Creates a new instance of the specified class name
-     *
-     * Package private so this code is not exposed at the API level.
-     */
-    static Object newInstance (ClassLoader classLoader, String className)
-        throws ClassNotFoundException, IllegalAccessException,
-            InstantiationException
-    {
-        Class driverClass;
-        if (classLoader == null) {
-            driverClass = Class.forName(className);
-        } else {
-            driverClass = classLoader.loadClass(className);
-        }
-        return driverClass.newInstance();
-    }
-
-    /**
-     * Figure out which ClassLoader to use.  For JDK 1.2 and later use
-     * the context ClassLoader.
-     */           
-    static ClassLoader getClassLoader ()
-    {
-        Method m = null;
-
-        try {
-            m = Thread.class.getMethod("getContextClassLoader", null);
-        } catch (NoSuchMethodException e) {
-            // Assume that we are running JDK 1.1, use the current ClassLoader
-            return NewInstance.class.getClassLoader();
-        }
-
-        try {
-            return (ClassLoader) m.invoke(Thread.currentThread(), null);
-        } catch (IllegalAccessException e) {
-            // assert(false)
-            throw new UnknownError(e.getMessage());
-        } catch (InvocationTargetException e) {
-            // assert(e.getTargetException() instanceof SecurityException)
-            throw new UnknownError(e.getMessage());
-        }
-    }
-}
diff --git a/src/org/xml/sax/helpers/ParserAdapter.java b/src/org/xml/sax/helpers/ParserAdapter.java
deleted file mode 100644
index 432c1c8..0000000
--- a/src/org/xml/sax/helpers/ParserAdapter.java
+++ /dev/null
@@ -1,1008 +0,0 @@
-// ParserAdapter.java - adapt a SAX1 Parser to a SAX2 XMLReader.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the public domain.
-
-// $Id: ParserAdapter.java,v 1.6 2000/05/05 17:50:04 david Exp $
-
-package org.xml.sax.helpers;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-import org.xml.sax.Parser;	// deprecated
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.AttributeList; // deprecated
-import org.xml.sax.EntityResolver;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.DocumentHandler; // deprecated
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-
-
-/**
- * Adapt a SAX1 Parser as a SAX2 XMLReader.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class wraps a SAX1 {@link org.xml.sax.Parser Parser}
- * and makes it act as a SAX2 {@link org.xml.sax.XMLReader XMLReader},
- * with feature, property, and Namespace support.  Note
- * that it is not possible to report {@link org.xml.sax.ContentHandler#skippedEntity
- * skippedEntity} events, since SAX1 does not make that information available.</p>
- *
- * <p>This adapter does not test for duplicate Namespace-qualified
- * attribute names.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.helpers.XMLReaderAdapter
- * @see org.xml.sax.XMLReader
- * @see org.xml.sax.Parser
- */
-public class ParserAdapter implements XMLReader, DocumentHandler
-{
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Constructors.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Construct a new parser adapter.
-     *
-     * <p>Use the "org.xml.sax.parser" property to locate the
-     * embedded SAX1 driver.</p>
-     *
-     * @exception org.xml.sax.SAXException If the embedded driver
-     *            cannot be instantiated or if the
-     *            org.xml.sax.parser property is not specified.
-     */
-    public ParserAdapter ()
-      throws SAXException
-    {
-	super();
-
-	String driver = System.getProperty("org.xml.sax.parser");
-
-	try {
-	    setup(ParserFactory.makeParser());
-	} catch (ClassNotFoundException e1) {
-	    throw new
-		SAXException("Cannot find SAX1 driver class " +
-			     driver, e1);
-	} catch (IllegalAccessException e2) {
-	    throw new
-		SAXException("SAX1 driver class " +
-			     driver +
-			     " found but cannot be loaded", e2);
-	} catch (InstantiationException e3) {
-	    throw new
-		SAXException("SAX1 driver class " +
-			     driver +
-			     " loaded but cannot be instantiated", e3);
-	} catch (ClassCastException e4) {
-	    throw new
-		SAXException("SAX1 driver class " +
-			     driver +
-			     " does not implement org.xml.sax.Parser");
-	} catch (NullPointerException e5) {
-	    throw new 
-		SAXException("System property org.xml.sax.parser not specified");
-	}
-    }
-
-
-    /**
-     * Construct a new parser adapter.
-     *
-     * <p>Note that the embedded parser cannot be changed once the
-     * adapter is created; to embed a different parser, allocate
-     * a new ParserAdapter.</p>
-     *
-     * @param parser The SAX1 parser to embed.
-     * @exception java.lang.NullPointerException If the parser parameter
-     *            is null.
-     */
-    public ParserAdapter (Parser parser)
-    {
-	super();
-	setup(parser);
-    }
-
-
-    /**
-     * Internal setup method.
-     *
-     * @param parser The embedded parser.
-     * @exception java.lang.NullPointerException If the parser parameter
-     *            is null.
-     */
-    private void setup (Parser parser)
-    {
-	if (parser == null) {
-	    throw new
-		NullPointerException("Parser argument must not be null");
-	}
-	this.parser = parser;
-	atts = new AttributesImpl();
-	nsSupport = new NamespaceSupport();
-	attAdapter = new AttributeListAdapter();
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.XMLReader.
-    ////////////////////////////////////////////////////////////////////
-
-
-    //
-    // Internal constants for the sake of convenience.
-    //
-    private final static String FEATURES = "http://xml.org/sax/features/";
-    private final static String NAMESPACES = FEATURES + "namespaces";
-    private final static String NAMESPACE_PREFIXES = FEATURES + "namespace-prefixes";
-    private final static String VALIDATION = FEATURES + "validation";
-    private final static String EXTERNAL_GENERAL =
-	FEATURES + "external-general-entities";
-    private final static String EXTERNAL_PARAMETER =
-	FEATURES + "external-parameter-entities";
-
-
-    /**
-     * Set a feature for the parser.
-     *
-     * <p>The only features supported are namespaces and 
-     * namespace-prefixes.</p>
-     *
-     * @param name The feature name, as a complete URI.
-     * @param state The requested feature state.
-     * @exception org.xml.sax.SAXNotRecognizedException If the feature
-     *            name is not known.
-     * @exception org.xml.sax.SAXNotSupportedException If the feature
-     *            state is not supported.
-     * @see org.xml.sax.XMLReader#setFeature
-     */
-    public void setFeature (String name, boolean state)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	if (name.equals(NAMESPACES)) {
-	    checkNotParsing("feature", name);
-	    namespaces = state;
-	    if (!namespaces && !prefixes) {
-		prefixes = true;
-	    }
-	} else if (name.equals(NAMESPACE_PREFIXES)) {
-	    checkNotParsing("feature", name);
-	    prefixes = state;
-	    if (!prefixes && !namespaces) {
-		namespaces = true;
-	    }
-	} else if (name.equals(VALIDATION) ||
-		   name.equals(EXTERNAL_GENERAL) ||
-		   name.equals(EXTERNAL_PARAMETER)) {
-	    throw new SAXNotSupportedException("Feature: " + name);
-	} else {
-	    throw new SAXNotRecognizedException("Feature: " + name);
-	}
-    }
-
-
-    /**
-     * Check a parser feature.
-     *
-     * <p>The only features supported are namespaces and 
-     * namespace-prefixes.</p>
-     *
-     * @param name The feature name, as a complete URI.
-     * @return The current feature state.
-     * @exception org.xml.sax.SAXNotRecognizedException If the feature
-     *            name is not known.
-     * @exception org.xml.sax.SAXNotSupportedException If querying the
-     *            feature state is not supported.
-     * @see org.xml.sax.XMLReader#setFeature
-     */
-    public boolean getFeature (String name)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	if (name.equals(NAMESPACES)) {
-	    return namespaces;
-	} else if (name.equals(NAMESPACE_PREFIXES)) {
-	    return prefixes;
-	} else if (name.equals(VALIDATION) ||
-		   name.equals(EXTERNAL_GENERAL) ||
-		   name.equals(EXTERNAL_PARAMETER)) {
-	    throw new SAXNotSupportedException("Feature: " + name);
-	} else {
-	    throw new SAXNotRecognizedException("Feature: " + name);
-	}
-    }
-
-
-    /**
-     * Set a parser property.
-     *
-     * <p>No special properties are currently supported.</p>
-     *
-     * @param name The property name.
-     * @param value The property value.
-     * @exception org.xml.sax.SAXNotRecognizedException If the feature
-     *            name is not known.
-     * @exception org.xml.sax.SAXNotSupportedException If the feature
-     *            state is not supported.
-     * @see org.xml.sax.XMLReader#setProperty
-     */
-    public void setProperty (String name, Object value)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	throw new SAXNotRecognizedException("Property: " + name);
-    }
-
-
-    /**
-     * Get a parser property.
-     *
-     * <p>No special properties are currently supported.</p>
-     *
-     * @param name The property name.
-     * @return The property value.
-     * @exception org.xml.sax.SAXNotRecognizedException If the feature
-     *            name is not known.
-     * @exception org.xml.sax.SAXNotSupportedException If the feature
-     *            state is not supported.
-     * @see org.xml.sax.XMLReader#getProperty
-     */
-    public Object getProperty (String name)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	throw new SAXNotRecognizedException("Property: " + name);
-    }
-
-
-    /**
-     * Set the entity resolver.
-     *
-     * @param resolver The new entity resolver.
-     * @exception java.lang.NullPointerException If the entity resolver
-     *            parameter is null.
-     * @see org.xml.sax.XMLReader#setEntityResolver
-     */
-    public void setEntityResolver (EntityResolver resolver)
-    {
-	if (resolver == null) {
-	    throw new NullPointerException("Null entity resolver");
-	}
-	entityResolver = resolver;
-    }
-
-
-    /**
-     * Return the current entity resolver.
-     *
-     * @return The current entity resolver, or null if none was supplied.
-     * @see org.xml.sax.XMLReader#getEntityResolver
-     */
-    public EntityResolver getEntityResolver ()
-    {
-	return entityResolver;
-    }
-
-
-    /**
-     * Set the DTD handler.
-     *
-     * @param resolver The new DTD handler.
-     * @exception java.lang.NullPointerException If the DTD handler
-     *            parameter is null.
-     * @see org.xml.sax.XMLReader#setEntityResolver
-     */
-    public void setDTDHandler (DTDHandler handler)
-    {
-	if (handler == null) {
-	    throw new NullPointerException("Null DTD handler");
-	}
-	dtdHandler = handler;
-    }
-
-
-    /**
-     * Return the current DTD handler.
-     *
-     * @return The current DTD handler, or null if none was supplied.
-     * @see org.xml.sax.XMLReader#getEntityResolver
-     */
-    public DTDHandler getDTDHandler ()
-    {
-	return dtdHandler;
-    }
-
-
-    /**
-     * Set the content handler.
-     *
-     * @param resolver The new content handler.
-     * @exception java.lang.NullPointerException If the content handler
-     *            parameter is null.
-     * @see org.xml.sax.XMLReader#setEntityResolver
-     */
-    public void setContentHandler (ContentHandler handler)
-    {
-	if (handler == null) {
-	    throw new NullPointerException("Null content handler");
-	}
-	contentHandler = handler;
-    }
-
-
-    /**
-     * Return the current content handler.
-     *
-     * @return The current content handler, or null if none was supplied.
-     * @see org.xml.sax.XMLReader#getEntityResolver
-     */
-    public ContentHandler getContentHandler ()
-    {
-	return contentHandler;
-    }
-
-
-    /**
-     * Set the error handler.
-     *
-     * @param resolver The new error handler.
-     * @exception java.lang.NullPointerException If the error handler
-     *            parameter is null.
-     * @see org.xml.sax.XMLReader#setEntityResolver
-     */
-    public void setErrorHandler (ErrorHandler handler)
-    {
-	if (handler == null) {
-	    throw new NullPointerException("Null error handler");
-	}
-	errorHandler = handler;
-    }
-
-
-    /**
-     * Return the current error handler.
-     *
-     * @return The current error handler, or null if none was supplied.
-     * @see org.xml.sax.XMLReader#getEntityResolver
-     */
-    public ErrorHandler getErrorHandler ()
-    {
-	return errorHandler;
-    }
-
-
-    /**
-     * Parse an XML document.
-     *
-     * @param systemId The absolute URL of the document.
-     * @exception java.io.IOException If there is a problem reading
-     *            the raw content of the document.
-     * @exception org.xml.sax.SAXException If there is a problem
-     *            processing the document.
-     * @see #parse(org.xml.sax.InputSource)
-     * @see org.xml.sax.Parser#parse(java.lang.String)
-     */
-    public void parse (String systemId)
-	throws IOException, SAXException
-    {
-	parse(new InputSource(systemId));
-    }
-
-
-    /**
-     * Parse an XML document.
-     *
-     * @param input An input source for the document.
-     * @exception java.io.IOException If there is a problem reading
-     *            the raw content of the document.
-     * @exception org.xml.sax.SAXException If there is a problem
-     *            processing the document.
-     * @see #parse(java.lang.String)
-     * @see org.xml.sax.Parser#parse(org.xml.sax.InputSource)
-     */
-    public void parse (InputSource input)
-	throws IOException, SAXException
-    {
-	if (parsing) {
-	    throw new SAXException("Parser is already in use");
-	}
-	setupParser();
-	parsing = true;
-	try {
-	    parser.parse(input);
-	} finally {
-	    parsing = false;
-	}
-	parsing = false;
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.DocumentHandler.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Adapt a SAX1 document locator event.
-     *
-     * @param locator A document locator.
-     * @see org.xml.sax.ContentHandler#setDocumentLocator
-     */
-    public void setDocumentLocator (Locator locator)
-    {
-	this.locator = locator;
-	if (contentHandler != null) {
-	    contentHandler.setDocumentLocator(locator);
-	}
-    }
-
-
-    /**
-     * Adapt a SAX1 start document event.
-     *
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.DocumentHandler#startDocument
-     */
-    public void startDocument ()
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.startDocument();
-	}
-    }
-
-
-    /**
-     * Adapt a SAX1 end document event.
-     *
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.DocumentHandler#endDocument
-     */
-    public void endDocument ()
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.endDocument();
-	}
-    }
-
-
-    /**
-     * Adapt a SAX1 startElement event.
-     *
-     * <p>If necessary, perform Namespace processing.</p>
-     *
-     * @param qName The qualified (prefixed) name.
-     * @param qAtts The XML 1.0 attribute list (with qnames).
-     */
-    public void startElement (String qName, AttributeList qAtts)
-	throws SAXException
-    {
-				// If we're not doing Namespace
-				// processing, dispatch this quickly.
-	if (!namespaces) {
-	    if (contentHandler != null) {
-		attAdapter.setAttributeList(qAtts);
-		contentHandler.startElement("", "", qName.intern(),
-					    attAdapter);
-	    }
-	    return;
-	}
-
-
-				// OK, we're doing Namespace processing.
-	nsSupport.pushContext();
-	boolean seenDecl = false;
-	atts.clear();
-	
-				// Take a first pass and copy all
-				// attributes into the SAX2 attribute
-				// list, noting any Namespace 
-				// declarations.
-	int length = qAtts.getLength();
-	for (int i = 0; i < length; i++) {
-	    String attQName = qAtts.getName(i);
-	    String type = qAtts.getType(i);
-	    String value = qAtts.getValue(i);
-
-				// Found a declaration...
-	    if (attQName.startsWith("xmlns")) {
-		String prefix;
-		int n = attQName.indexOf(':');
-		if (n == -1) {
-		    prefix = "";
-		} else {
-		    prefix = attQName.substring(n+1);
-		}
-		if (!nsSupport.declarePrefix(prefix, value)) {
-		    reportError("Illegal Namespace prefix: " + prefix);
-		}
-		if (contentHandler != null) {
-		    contentHandler.startPrefixMapping(prefix, value);
-		}
-				// We may still have to add this to
-				// the list.
-		if (prefixes) {
-		    atts.addAttribute("", "", attQName.intern(),
-				      type, value);
-		}
-		seenDecl = true;
-
-				// This isn't a declaration.
-	    } else {
-		String attName[] = processName(attQName, true);
-		atts.addAttribute(attName[0], attName[1], attName[2],
-				  type, value);
-	    }
-	}
-	
-				// If there was a Namespace declaration,
-				// we have to make a second pass just
-				// to be safe -- this will happen very
-				// rarely, possibly only once for each
-				// document.
-	if (seenDecl) {
-	    length = atts.getLength();
-	    for (int i = 0; i < length; i++) {
-		String attQName = atts.getQName(i);
-		if (!attQName.startsWith("xmlns")) {
-		    String attName[] = processName(attQName, true);
-		    atts.setURI(i, attName[0]);
-		    atts.setLocalName(i, attName[1]);
-		}
-	    }
-	}
-
-				// OK, finally report the event.
-	if (contentHandler != null) {
-	    String name[] = processName(qName, false);
-	    contentHandler.startElement(name[0], name[1], name[2], atts);
-	}
-    }
-
-
-    /**
-     * Adapt a SAX1 end element event.
-     *
-     * @param qName The qualified (prefixed) name.
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.DocumentHandler#endElement
-     */
-    public void endElement (String qName)
-	throws SAXException
-    {
-				// If we're not doing Namespace
-				// processing, dispatch this quickly.
-	if (!namespaces) {
-	    if (contentHandler != null) {
-		contentHandler.endElement("", "", qName.intern());
-	    }
-	    return;
-	}
-
-				// Split the name.
-	String names[] = processName(qName, false);
-	if (contentHandler != null) {
-	    contentHandler.endElement(names[0], names[1], names[2]);
-	    Enumeration prefixes = nsSupport.getDeclaredPrefixes();
-	    while (prefixes.hasMoreElements()) {
-		String prefix = (String)prefixes.nextElement();
-		contentHandler.endPrefixMapping(prefix);
-	    }
-	}
-	nsSupport.popContext();
-    }
-
-
-    /**
-     * Adapt a SAX1 characters event.
-     *
-     * @param ch An array of characters.
-     * @param start The starting position in the array.
-     * @param length The number of characters to use.
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.DocumentHandler#characters
-     */
-    public void characters (char ch[], int start, int length)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.characters(ch, start, length);
-	}
-    }
-
-
-    /**
-     * Adapt a SAX1 ignorable whitespace event.
-     *
-     * @param ch An array of characters.
-     * @param start The starting position in the array.
-     * @param length The number of characters to use.
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.DocumentHandler#ignorableWhitespace
-     */
-    public void ignorableWhitespace (char ch[], int start, int length)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.ignorableWhitespace(ch, start, length);
-	}
-    }
-
-
-    /**
-     * Adapt a SAX1 processing instruction event.
-     *
-     * @param target The processing instruction target.
-     * @param data The remainder of the processing instruction
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.DocumentHandler#processingInstruction
-     */
-    public void processingInstruction (String target, String data)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.processingInstruction(target, data);
-	}
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal utility methods.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Initialize the parser before each run.
-     */
-    private void setupParser ()
-    {
-	nsSupport.reset();
-
-	if (entityResolver != null) {
-	    parser.setEntityResolver(entityResolver);
-	}
-	if (dtdHandler != null) {
-	    parser.setDTDHandler(dtdHandler);
-	}
-	if (errorHandler != null) {
-	    parser.setErrorHandler(errorHandler);
-	}
-	parser.setDocumentHandler(this);
-	locator = null;
-    }
-
-
-    /**
-     * Process a qualified (prefixed) name.
-     *
-     * <p>If the name has an undeclared prefix, use only the qname
-     * and make an ErrorHandler.error callback in case the app is
-     * interested.</p>
-     *
-     * @param qName The qualified (prefixed) name.
-     * @param isAttribute true if this is an attribute name.
-     * @return The name split into three parts.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception if there is an error callback.
-     */
-    private String [] processName (String qName, boolean isAttribute)
-	throws SAXException
-    {
-	String parts[] = nsSupport.processName(qName, nameParts,
-					       isAttribute);
-	if (parts == null) {
-	    parts = new String[3];
-	    parts[2] = qName.intern();
-	    reportError("Undeclared prefix: " + qName);
-	}
-	return parts;
-    }
-
-
-    /**
-     * Report a non-fatal error.
-     *
-     * @param message The error message.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception.
-     */
-    void reportError (String message)
-	throws SAXException
-    {
-	if (errorHandler == null) {
-	    return;
-	}
-
-	SAXParseException e;
-	if (locator != null) {
-	    e = new SAXParseException(message, locator);
-	} else {
-	    e = new SAXParseException(message, null, null, -1, -1);
-	}
-	errorHandler.error(e);
-    }
-
-
-    /**
-     * Throw an exception if we are parsing.
-     *
-     * <p>Use this method to detect illegal feature or
-     * property changes.</p>
-     *
-     * @param type The type of thing (feature or property).
-     * @param name The feature or property name.
-     * @exception org.xml.sax.SAXNotSupportedException If a
-     *            document is currently being parsed.
-     */
-    private void checkNotParsing (String type, String name)
-	throws SAXNotSupportedException
-    {
-	if (parsing) {
-	    throw new SAXNotSupportedException("Cannot change " +
-					       type + ' ' +
-					       name + " while parsing");
-					       
-	}
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-
-    private NamespaceSupport nsSupport;
-    private AttributeListAdapter attAdapter;
-
-    private boolean parsing = false;
-    private String nameParts[] = new String[3];
-
-    private Parser parser = null;
-
-    private AttributesImpl atts = null;
-
-				// Features
-    private boolean namespaces = true;
-    private boolean prefixes = false;
-
-				// Properties
-
-				// Handlers
-    Locator locator;
-
-    EntityResolver entityResolver = null;
-    DTDHandler dtdHandler = null;
-    ContentHandler contentHandler = null;
-    ErrorHandler errorHandler = null;
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Inner class to wrap an AttributeList when not doing NS proc.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Adapt a SAX1 AttributeList as a SAX2 Attributes object.
-     *
-     * <p>This class is in the Public Domain, and comes with NO
-     * WARRANTY of any kind.</p>
-     *
-     * <p>This wrapper class is used only when Namespace support
-     * is disabled -- it provides pretty much a direct mapping
-     * from SAX1 to SAX2, except that names and types are 
-     * interned whenever requested.</p>
-     */
-    final class AttributeListAdapter implements Attributes
-    {
-
-	/**
-	 * Construct a new adapter.
-	 */
-	AttributeListAdapter ()
-	{
-	}
-
-
-	/**
-	 * Set the embedded AttributeList.
-	 *
-	 * <p>This method must be invoked before any of the others
-	 * can be used.</p>
-	 *
-	 * @param The SAX1 attribute list (with qnames).
-	 */
-	void setAttributeList (AttributeList qAtts)
-	{
-	    this.qAtts = qAtts;
-	}
-
-
-	/**
-	 * Return the length of the attribute list.
-	 *
-	 * @return The number of attributes in the list.
-	 * @see org.xml.sax.Attributes#getLength
-	 */
-	public int getLength ()
-	{
-	    return qAtts.getLength();
-	}
-
-
-	/**
-	 * Return the Namespace URI of the specified attribute.
-	 *
-	 * @param The attribute's index.
-	 * @return Always the empty string.
-	 * @see org.xml.sax.Attributes#getURI
-	 */
-	public String getURI (int i)
-	{
-	    return "";
-	}
-
-
-	/**
-	 * Return the local name of the specified attribute.
-	 *
-	 * @param The attribute's index.
-	 * @return Always the empty string.
-	 * @see org.xml.sax.Attributes#getLocalName
-	 */
-	public String getLocalName (int i)
-	{
-	    return "";
-	}
-
-
-	/**
-	 * Return the qualified (prefixed) name of the specified attribute.
-	 *
-	 * @param The attribute's index.
-	 * @return The attribute's qualified name, internalized.
-	 */
-	public String getQName (int i)
-	{
-	    return qAtts.getName(i).intern();
-	}
-
-
-	/**
-	 * Return the type of the specified attribute.
-	 *
-	 * @param The attribute's index.
-	 * @return The attribute's type as an internalized string.
-	 */
-	public String getType (int i)
-	{
-	    return qAtts.getType(i).intern();
-	}
-
-
-	/**
-	 * Return the value of the specified attribute.
-	 *
-	 * @param The attribute's index.
-	 * @return The attribute's value.
-	 */
-	public String getValue (int i)
-	{
-	    return qAtts.getValue(i);
-	}
-
-
-	/**
-	 * Look up an attribute index by Namespace name.
-	 *
-	 * @param uri The Namespace URI or the empty string.
-	 * @param localName The local name.
-	 * @return The attributes index, or -1 if none was found.
-	 * @see org.xml.sax.Attributes#getIndex(java.lang.String,java.lang.String)
-	 */
-	public int getIndex (String uri, String localName)
-	{
-	    return -1;
-	}
-
-
-	/**
-	 * Look up an attribute index by qualified (prefixed) name.
-	 *
-	 * @param qName The qualified name.
-	 * @return The attributes index, or -1 if none was found.
-	 * @see org.xml.sax.Attributes#getIndex(java.lang.String)
-	 */
-	public int getIndex (String qName)
-	{
-	    int max = atts.getLength();
-	    for (int i = 0; i < max; i++) {
-		if (qAtts.getName(i).equals(qName)) {
-		    return i;
-		}
-	    }
-	    return -1;
-	}
-
-
-	/**
-	 * Look up the type of an attribute by Namespace name.
-	 *
-	 * @param uri The Namespace URI
-	 * @param localName The local name.
-	 * @return The attribute's type as an internalized string.
-	 */
-	public String getType (String uri, String localName)
-	{
-	    return null;
-	}
-
-
-	/**
-	 * Look up the type of an attribute by qualified (prefixed) name.
-	 *
-	 * @param qName The qualified name.
-	 * @return The attribute's type as an internalized string.
-	 */
-	public String getType (String qName)
-	{
-	    return qAtts.getType(qName).intern();
-	}
-
-
-	/**
-	 * Look up the value of an attribute by Namespace name.
-	 *
-	 * @param uri The Namespace URI
-	 * @param localName The local name.
-	 * @return The attribute's value.
-	 */
-	public String getValue (String uri, String localName)
-	{
-	    return null;
-	}
-
-
-	/**
-	 * Look up the value of an attribute by qualified (prefixed) name.
-	 *
-	 * @param qName The qualified name.
-	 * @return The attribute's value.
-	 */
-	public String getValue (String qName)
-	{
-	    return qAtts.getValue(qName);
-	}
-
-	private AttributeList qAtts;
-    }
-}
-
-// end of ParserAdapter.java
diff --git a/src/org/xml/sax/helpers/ParserFactory.java b/src/org/xml/sax/helpers/ParserFactory.java
deleted file mode 100644
index a8debcd..0000000
--- a/src/org/xml/sax/helpers/ParserFactory.java
+++ /dev/null
@@ -1,129 +0,0 @@
-// SAX parser factory.
-// http://www.saxproject.org
-// No warranty; no copyright -- use this as you will.
-// $Id: ParserFactory.java,v 1.6 2001/11/21 01:02:50 dbrownell Exp $
-
-package org.xml.sax.helpers;
-
-import java.lang.ClassNotFoundException;
-import java.lang.IllegalAccessException;
-import java.lang.InstantiationException;
-import java.lang.SecurityException;
-import java.lang.ClassCastException;
-
-import org.xml.sax.Parser;
-
-
-/**
- * Java-specific class for dynamically loading SAX parsers.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
- * for further information.
- * </blockquote>
- *
- * <p><strong>Note:</strong> This class is designed to work with the now-deprecated
- * SAX1 {@link org.xml.sax.Parser Parser} class.  SAX2 applications should use
- * {@link org.xml.sax.helpers.XMLReaderFactory XMLReaderFactory} instead.</p>
- *
- * <p>ParserFactory is not part of the platform-independent definition
- * of SAX; it is an additional convenience class designed
- * specifically for Java XML application writers.  SAX applications
- * can use the static methods in this class to allocate a SAX parser
- * dynamically at run-time based either on the value of the
- * `org.xml.sax.parser' system property or on a string containing the class
- * name.</p>
- *
- * <p>Note that the application still requires an XML parser that
- * implements SAX1.</p>
- *
- * @deprecated This class works with the deprecated
- *             {@link org.xml.sax.Parser Parser}
- *             interface.
- * @since SAX 1.0
- * @author David Megginson
- * @version 2.0r2pre3
- */
-public class ParserFactory {
-    
-    
-    /**
-     * Private null constructor.
-     */
-    private ParserFactory ()
-    {
-    }
-    
-    
-    /**
-     * Create a new SAX parser using the `org.xml.sax.parser' system property.
-     *
-     * <p>The named class must exist and must implement the
-     * {@link org.xml.sax.Parser Parser} interface.</p>
-     *
-     * @exception java.lang.NullPointerException There is no value
-     *            for the `org.xml.sax.parser' system property.
-     * @exception java.lang.ClassNotFoundException The SAX parser
-     *            class was not found (check your CLASSPATH).
-     * @exception IllegalAccessException The SAX parser class was
-     *            found, but you do not have permission to load
-     *            it.
-     * @exception InstantiationException The SAX parser class was
-     *            found but could not be instantiated.
-     * @exception java.lang.ClassCastException The SAX parser class
-     *            was found and instantiated, but does not implement
-     *            org.xml.sax.Parser.
-     * @see #makeParser(java.lang.String)
-     * @see org.xml.sax.Parser
-     */
-    public static Parser makeParser ()
-	throws ClassNotFoundException,
-	IllegalAccessException, 
-	InstantiationException,
-	NullPointerException,
-	ClassCastException
-    {
-	String className = System.getProperty("org.xml.sax.parser");
-	if (className == null) {
-	    throw new NullPointerException("No value for sax.parser property");
-	} else {
-	    return makeParser(className);
-	}
-    }
-    
-    
-    /**
-     * Create a new SAX parser object using the class name provided.
-     *
-     * <p>The named class must exist and must implement the
-     * {@link org.xml.sax.Parser Parser} interface.</p>
-     *
-     * @param className A string containing the name of the
-     *                  SAX parser class.
-     * @exception java.lang.ClassNotFoundException The SAX parser
-     *            class was not found (check your CLASSPATH).
-     * @exception IllegalAccessException The SAX parser class was
-     *            found, but you do not have permission to load
-     *            it.
-     * @exception InstantiationException The SAX parser class was
-     *            found but could not be instantiated.
-     * @exception java.lang.ClassCastException The SAX parser class
-     *            was found and instantiated, but does not implement
-     *            org.xml.sax.Parser.
-     * @see #makeParser()
-     * @see org.xml.sax.Parser
-     */
-    public static Parser makeParser (String className)
-	throws ClassNotFoundException,
-	IllegalAccessException, 
-	InstantiationException,
-	ClassCastException
-    {
-	return (Parser) NewInstance.newInstance (
-		NewInstance.getClassLoader (), className);
-    }
-    
-}
-
diff --git a/src/org/xml/sax/helpers/XMLFilterImpl.java b/src/org/xml/sax/helpers/XMLFilterImpl.java
deleted file mode 100644
index 93c2372..0000000
--- a/src/org/xml/sax/helpers/XMLFilterImpl.java
+++ /dev/null
@@ -1,769 +0,0 @@
-// XMLFilterImpl.java - base SAX2 filter implementation.
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the Public Domain.
-
-// $Id: XMLFilterImpl.java,v 1.4 2000/05/05 17:50:37 david Exp $
-
-package org.xml.sax.helpers;
-
-import java.io.IOException;
-
-import org.xml.sax.XMLReader;
-import org.xml.sax.XMLFilter;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.Attributes;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXNotRecognizedException;
-
-
-/**
- * Base class for deriving an XML filter.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class is designed to sit between an {@link org.xml.sax.XMLReader
- * XMLReader} and the client application's event handlers.  By default, it
- * does nothing but pass requests up to the reader and events
- * on to the handlers unmodified, but subclasses can override
- * specific methods to modify the event stream or the configuration
- * requests as they pass through.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.XMLFilter
- * @see org.xml.sax.XMLReader
- * @see org.xml.sax.EntityResolver
- * @see org.xml.sax.DTDHandler
- * @see org.xml.sax.ContentHandler
- * @see org.xml.sax.ErrorHandler
- */
-public class XMLFilterImpl
-    implements XMLFilter, EntityResolver, DTDHandler, ContentHandler, ErrorHandler
-{
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Constructors.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Construct an empty XML filter, with no parent.
-     *
-     * <p>This filter will have no parent: you must assign a parent
-     * before you start a parse or do any configuration with
-     * setFeature or setProperty.</p>
-     *
-     * @see org.xml.sax.XMLReader#setFeature
-     * @see org.xml.sax.XMLReader#setProperty
-     */
-    public XMLFilterImpl ()
-    {
-	super();
-    }
-
-
-    /**
-     * Construct an XML filter with the specified parent.
-     *
-     * @see #setParent
-     * @see #getParent
-     */
-    public XMLFilterImpl (XMLReader parent)
-    {
-        super();
-	setParent(parent);
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.XMLFilter.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Set the parent reader.
-     *
-     * <p>This is the {@link org.xml.sax.XMLReader XMLReader} from which 
-     * this filter will obtain its events and to which it will pass its 
-     * configuration requests.  The parent may itself be another filter.</p>
-     *
-     * <p>If there is no parent reader set, any attempt to parse
-     * or to set or get a feature or property will fail.</p>
-     *
-     * @param parent The parent XML reader.
-     * @exception java.lang.NullPointerException If the parent is null.
-     * @see #getParent
-     */
-    public void setParent (XMLReader parent)
-    {
-	if (parent == null) {
-	    throw new NullPointerException("Null parent");
-	}
-	this.parent = parent;
-    }
-
-
-    /**
-     * Get the parent reader.
-     *
-     * @return The parent XML reader, or null if none is set.
-     * @see #setParent
-     */
-    public XMLReader getParent ()
-    {
-	return parent;
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.XMLReader.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Set the state of a feature.
-     *
-     * <p>This will always fail if the parent is null.</p>
-     *
-     * @param name The feature name.
-     * @param state The requested feature state.
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the feature name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the feature name but 
-     *            cannot set the requested value.
-     * @see org.xml.sax.XMLReader#setFeature
-     */
-    public void setFeature (String name, boolean state)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	if (parent != null) {
-	    parent.setFeature(name, state);
-	} else {
-	    throw new SAXNotRecognizedException("Feature: " + name);
-	}
-    }
-
-
-    /**
-     * Look up the state of a feature.
-     *
-     * <p>This will always fail if the parent is null.</p>
-     *
-     * @param name The feature name.
-     * @return The current state of the feature.
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the feature name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the feature name but 
-     *            cannot determine its state at this time.
-     * @see org.xml.sax.XMLReader#getFeature
-     */
-    public boolean getFeature (String name)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	if (parent != null) {
-	    return parent.getFeature(name);
-	} else {
-	    throw new SAXNotRecognizedException("Feature: " + name);
-	}
-    }
-
-
-    /**
-     * Set the value of a property.
-     *
-     * <p>This will always fail if the parent is null.</p>
-     *
-     * @param name The property name.
-     * @param state The requested property value.
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the property name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the property name but 
-     *            cannot set the requested value.
-     * @see org.xml.sax.XMLReader#setProperty
-     */
-    public void setProperty (String name, Object value)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	if (parent != null) {
-	    parent.setProperty(name, value);
-	} else {
-	    throw new SAXNotRecognizedException("Property: " + name);
-	}
-    }
-
-
-    /**
-     * Look up the value of a property.
-     *
-     * @param name The property name.
-     * @return The current value of the property.
-     * @exception org.xml.sax.SAXNotRecognizedException When the
-     *            XMLReader does not recognize the feature name.
-     * @exception org.xml.sax.SAXNotSupportedException When the
-     *            XMLReader recognizes the property name but 
-     *            cannot determine its value at this time.
-     * @see org.xml.sax.XMLReader#setFeature
-     */
-    public Object getProperty (String name)
-	throws SAXNotRecognizedException, SAXNotSupportedException
-    {
-	if (parent != null) {
-	    return parent.getProperty(name);
-	} else {
-	    throw new SAXNotRecognizedException("Property: " + name);
-	}
-    }
-
-
-    /**
-     * Set the entity resolver.
-     *
-     * @param resolver The new entity resolver.
-     * @exception java.lang.NullPointerException If the resolver
-     *            is null.
-     * @see org.xml.sax.XMLReader#setEntityResolver
-     */
-    public void setEntityResolver (EntityResolver resolver)
-    {
-	if (resolver == null) {
-	    throw new NullPointerException("Null entity resolver");
-	} else {
-	    entityResolver = resolver;
-	}
-    }
-
-
-    /**
-     * Get the current entity resolver.
-     *
-     * @return The current entity resolver, or null if none was set.
-     * @see org.xml.sax.XMLReader#getEntityResolver
-     */
-    public EntityResolver getEntityResolver ()
-    {
-	return entityResolver;
-    }
-
-
-    /**
-     * Set the DTD event handler.
-     *
-     * @param resolver The new DTD handler.
-     * @exception java.lang.NullPointerException If the handler
-     *            is null.
-     * @see org.xml.sax.XMLReader#setDTDHandler
-     */
-    public void setDTDHandler (DTDHandler handler)
-    {
-	if (handler == null) {
-	    throw new NullPointerException("Null DTD handler");
-	} else {
-	    dtdHandler = handler;
-	}
-    }
-
-
-    /**
-     * Get the current DTD event handler.
-     *
-     * @return The current DTD handler, or null if none was set.
-     * @see org.xml.sax.XMLReader#getDTDHandler
-     */
-    public DTDHandler getDTDHandler ()
-    {
-	return dtdHandler;
-    }
-
-
-    /**
-     * Set the content event handler.
-     *
-     * @param resolver The new content handler.
-     * @exception java.lang.NullPointerException If the handler
-     *            is null.
-     * @see org.xml.sax.XMLReader#setContentHandler
-     */
-    public void setContentHandler (ContentHandler handler)
-    {
-	if (handler == null) {
-	    throw new NullPointerException("Null content handler");
-	} else {
-	    contentHandler = handler;
-	}
-    }
-
-
-    /**
-     * Get the content event handler.
-     *
-     * @return The current content handler, or null if none was set.
-     * @see org.xml.sax.XMLReader#getContentHandler
-     */
-    public ContentHandler getContentHandler ()
-    {
-	return contentHandler;
-    }
-
-
-    /**
-     * Set the error event handler.
-     *
-     * @param handle The new error handler.
-     * @exception java.lang.NullPointerException If the handler
-     *            is null.
-     * @see org.xml.sax.XMLReader#setErrorHandler
-     */
-    public void setErrorHandler (ErrorHandler handler)
-    {
-	if (handler == null) {
-	    throw new NullPointerException("Null error handler");
-	} else {
-	    errorHandler = handler;
-	}
-    }
-
-
-    /**
-     * Get the current error event handler.
-     *
-     * @return The current error handler, or null if none was set.
-     * @see org.xml.sax.XMLReader#getErrorHandler
-     */
-    public ErrorHandler getErrorHandler ()
-    {
-	return errorHandler;
-    }
-
-
-    /**
-     * Parse a document.
-     *
-     * @param input The input source for the document entity.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @exception java.io.IOException An IO exception from the parser,
-     *            possibly from a byte stream or character stream
-     *            supplied by the application.
-     * @see org.xml.sax.XMLReader#parse(org.xml.sax.InputSource)
-     */
-    public void parse (InputSource input)
-	throws SAXException, IOException
-    {
-	setupParse();
-	parent.parse(input);
-    }
-
-
-    /**
-     * Parse a document.
-     *
-     * @param systemId The system identifier as a fully-qualified URI.
-     * @exception org.xml.sax.SAXException Any SAX exception, possibly
-     *            wrapping another exception.
-     * @exception java.io.IOException An IO exception from the parser,
-     *            possibly from a byte stream or character stream
-     *            supplied by the application.
-     * @see org.xml.sax.XMLReader#parse(java.lang.String)
-     */
-    public void parse (String systemId)
-	throws SAXException, IOException
-    {
-	parse(new InputSource(systemId));
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.EntityResolver.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Filter an external entity resolution.
-     *
-     * @param publicId The entity's public identifier, or null.
-     * @param systemId The entity's system identifier.
-     * @return A new InputSource or null for the default.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @exception java.io.IOException The client may throw an
-     *            I/O-related exception while obtaining the
-     *            new InputSource.
-     * @see org.xml.sax.EntityResolver#resolveEntity
-     */
-    public InputSource resolveEntity (String publicId, String systemId)
-	throws SAXException, IOException
-    {
-	if (entityResolver != null) {
-	    return entityResolver.resolveEntity(publicId, systemId);
-	} else {
-	    return null;
-	}
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.DTDHandler.
-    ////////////////////////////////////////////////////////////////////
-
-    
-    /**
-     * Filter a notation declaration event.
-     *
-     * @param name The notation name.
-     * @param publicId The notation's public identifier, or null.
-     * @param systemId The notation's system identifier, or null.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.DTDHandler#notationDecl
-     */
-    public void notationDecl (String name, String publicId, String systemId)
-	throws SAXException
-    {
-	if (dtdHandler != null) {
-	    dtdHandler.notationDecl(name, publicId, systemId);
-	}
-    }
-
-    
-    /**
-     * Filter an unparsed entity declaration event.
-     *
-     * @param name The entity name.
-     * @param publicId The entity's public identifier, or null.
-     * @param systemId The entity's system identifier, or null.
-     * @param notationName The name of the associated notation.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.DTDHandler#unparsedEntityDecl
-     */
-    public void unparsedEntityDecl (String name, String publicId,
-				    String systemId, String notationName)
-	throws SAXException
-    {
-	if (dtdHandler != null) {
-	    dtdHandler.unparsedEntityDecl(name, publicId, systemId,
-					  notationName);
-	}
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.ContentHandler.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Filter a new document locator event.
-     *
-     * @param locator The document locator.
-     * @see org.xml.sax.ContentHandler#setDocumentLocator
-     */
-    public void setDocumentLocator (Locator locator)
-    {
-	this.locator = locator;
-	if (contentHandler != null) {
-	    contentHandler.setDocumentLocator(locator);
-	}
-    }
-
-
-    /**
-     * Filter a start document event.
-     *
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#startDocument
-     */
-    public void startDocument ()
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.startDocument();
-	}
-    }
-
-
-    /**
-     * Filter an end document event.
-     *
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#endDocument
-     */
-    public void endDocument ()
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.endDocument();
-	}
-    }
-
-
-    /**
-     * Filter a start Namespace prefix mapping event.
-     *
-     * @param prefix The Namespace prefix.
-     * @param uri The Namespace URI.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#startPrefixMapping
-     */
-    public void startPrefixMapping (String prefix, String uri)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.startPrefixMapping(prefix, uri);
-	}
-    }
-
-
-    /**
-     * Filter an end Namespace prefix mapping event.
-     *
-     * @param prefix The Namespace prefix.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#endPrefixMapping
-     */
-    public void endPrefixMapping (String prefix)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.endPrefixMapping(prefix);
-	}
-    }
-
-
-    /**
-     * Filter a start element event.
-     *
-     * @param uri The element's Namespace URI, or the empty string.
-     * @param localName The element's local name, or the empty string.
-     * @param qName The element's qualified (prefixed) name, or the empty
-     *        string.
-     * @param atts The element's attributes.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#startElement
-     */
-    public void startElement (String uri, String localName, String qName,
-			      Attributes atts)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.startElement(uri, localName, qName, atts);
-	}
-    }
-
-
-    /**
-     * Filter an end element event.
-     *
-     * @param uri The element's Namespace URI, or the empty string.
-     * @param localName The element's local name, or the empty string.
-     * @param qName The element's qualified (prefixed) name, or the empty
-     *        string.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#endElement
-     */
-    public void endElement (String uri, String localName, String qName)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.endElement(uri, localName, qName);
-	}
-    }
-
-
-    /**
-     * Filter a character data event.
-     *
-     * @param ch An array of characters.
-     * @param start The starting position in the array.
-     * @param length The number of characters to use from the array.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#characters
-     */
-    public void characters (char ch[], int start, int length)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.characters(ch, start, length);
-	}
-    }
-
-
-    /**
-     * Filter an ignorable whitespace event.
-     *
-     * @param ch An array of characters.
-     * @param start The starting position in the array.
-     * @param length The number of characters to use from the array.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#ignorableWhitespace
-     */
-    public void ignorableWhitespace (char ch[], int start, int length)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.ignorableWhitespace(ch, start, length);
-	}
-    }
-
-
-    /**
-     * Filter a processing instruction event.
-     *
-     * @param target The processing instruction target.
-     * @param data The text following the target.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#processingInstruction
-     */
-    public void processingInstruction (String target, String data)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.processingInstruction(target, data);
-	}
-    }
-
-
-    /**
-     * Filter a skipped entity event.
-     *
-     * @param name The name of the skipped entity.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ContentHandler#skippedEntity
-     */
-    public void skippedEntity (String name)
-	throws SAXException
-    {
-	if (contentHandler != null) {
-	    contentHandler.skippedEntity(name);
-	}
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.ErrorHandler.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Filter a warning event.
-     *
-     * @param e The nwarning as an exception.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ErrorHandler#warning
-     */
-    public void warning (SAXParseException e)
-	throws SAXException
-    {
-	if (errorHandler != null) {
-	    errorHandler.warning(e);
-	}
-    }
-
-
-    /**
-     * Filter an error event.
-     *
-     * @param e The error as an exception.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ErrorHandler#error
-     */
-    public void error (SAXParseException e)
-	throws SAXException
-    {
-	if (errorHandler != null) {
-	    errorHandler.error(e);
-	}
-    }
-
-
-    /**
-     * Filter a fatal error event.
-     *
-     * @param e The error as an exception.
-     * @exception org.xml.sax.SAXException The client may throw
-     *            an exception during processing.
-     * @see org.xml.sax.ErrorHandler#fatalError
-     */
-    public void fatalError (SAXParseException e)
-	throws SAXException
-    {
-	if (errorHandler != null) {
-	    errorHandler.fatalError(e);
-	}
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal methods.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Set up before a parse.
-     *
-     * <p>Before every parse, check whether the parent is
-     * non-null, and re-register the filter for all of the 
-     * events.</p>
-     */
-    private void setupParse ()
-    {
-	if (parent == null) {
-	    throw new NullPointerException("No parent for filter");
-	}
-	parent.setEntityResolver(this);
-	parent.setDTDHandler(this);
-	parent.setContentHandler(this);
-	parent.setErrorHandler(this);
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-
-    private XMLReader parent = null;
-    private Locator locator = null;
-    private EntityResolver entityResolver = null;
-    private DTDHandler dtdHandler = null;
-    private ContentHandler contentHandler = null;
-    private ErrorHandler errorHandler = null;
-
-}
-
-// end of XMLFilterImpl.java
diff --git a/src/org/xml/sax/helpers/XMLReaderAdapter.java b/src/org/xml/sax/helpers/XMLReaderAdapter.java
deleted file mode 100644
index d9fd150..0000000
--- a/src/org/xml/sax/helpers/XMLReaderAdapter.java
+++ /dev/null
@@ -1,526 +0,0 @@
-// XMLReaderAdapter.java - adapt an SAX2 XMLReader to a SAX1 Parser
-// Written by David Megginson, sax@megginson.com
-// NO WARRANTY!  This class is in the public domain.
-
-// $Id: XMLReaderAdapter.java,v 1.5 2000/05/05 17:50:46 david Exp $
-
-package org.xml.sax.helpers;
-
-import java.io.IOException;
-import java.util.Locale;
-
-import org.xml.sax.Parser;	// deprecated
-import org.xml.sax.Locator;
-import org.xml.sax.InputSource;
-import org.xml.sax.AttributeList; // deprecated
-import org.xml.sax.EntityResolver;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.DocumentHandler; // deprecated
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXNotSupportedException;
-
-
-/**
- * Adapt a SAX2 XMLReader as a SAX1 Parser.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * </blockquote>
- *
- * <p>This class wraps a SAX2 {@link org.xml.sax.XMLReader XMLReader}
- * and makes it act as a SAX1 {@link org.xml.sax.Parser Parser}.  The XMLReader 
- * must support a true value for the 
- * http://xml.org/sax/features/namespace-prefixes property or parsing will fail
- * with a {@link org.xml.sax.SAXException SAXException}; if the XMLReader 
- * supports a false value for the http://xml.org/sax/features/namespaces 
- * property, that will also be used to improve efficiency.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, 
- *         <a href="mailto:sax@megginson.com">sax@megginson.com</a>
- * @version 2.0
- * @see org.xml.sax.Parser
- * @see org.xml.sax.XMLReader
- */
-public class XMLReaderAdapter implements Parser, ContentHandler
-{
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Constructor.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Create a new adapter.
-     *
-     * <p>Use the "org.xml.sax.driver" property to locate the SAX2
-     * driver to embed.</p>
-     *
-     * @exception org.xml.sax.SAXException If the embedded driver
-     *            cannot be instantiated or if the
-     *            org.xml.sax.driver property is not specified.
-     */
-    public XMLReaderAdapter ()
-      throws SAXException
-    {
-	setup(XMLReaderFactory.createXMLReader());
-    }
-
-
-    /**
-     * Create a new adapter.
-     *
-     * <p>Create a new adapter, wrapped around a SAX2 XMLReader.
-     * The adapter will make the XMLReader act like a SAX1
-     * Parser.</p>
-     *
-     * @param xmlReader The SAX2 XMLReader to wrap.
-     * @exception java.lang.NullPointerException If the argument is null.
-     */
-    public XMLReaderAdapter (XMLReader xmlReader)
-    {
-	setup(xmlReader);
-    }
-
-
-
-    /**
-     * Internal setup.
-     *
-     * @param xmlReader The embedded XMLReader.
-     */
-    private void setup (XMLReader xmlReader)
-    {
-	if (xmlReader == null) {
-	    throw new NullPointerException("XMLReader must not be null");
-	}
-	this.xmlReader = xmlReader;
-	qAtts = new AttributesAdapter();
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.Parser.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Set the locale for error reporting.
-     *
-     * <p>This is not supported in SAX2, and will always throw
-     * an exception.</p>
-     *
-     * @param The locale for error reporting.
-     * @see org.xml.sax.Parser#setLocale
-     */
-    public void setLocale (Locale locale)
-	throws SAXException
-    {
-	throw new SAXNotSupportedException("setLocale not supported");
-    }
-
-
-    /**
-     * Register the entity resolver.
-     *
-     * @param resolver The new resolver.
-     * @see org.xml.sax.Parser#setEntityResolver
-     */
-    public void setEntityResolver (EntityResolver resolver)
-    {
-	xmlReader.setEntityResolver(resolver);
-    }
-
-
-    /**
-     * Register the DTD event handler.
-     *
-     * @param handler The new DTD event handler.
-     * @see org.xml.sax.Parser#setDTDHandler
-     */
-    public void setDTDHandler (DTDHandler handler)
-    {
-	xmlReader.setDTDHandler(handler);
-    }
-
-
-    /**
-     * Register the SAX1 document event handler.
-     *
-     * <p>Note that the SAX1 document handler has no Namespace
-     * support.</p>
-     *
-     * @param handler The new SAX1 document event handler.
-     * @see org.xml.sax.Parser#setDocumentHandler
-     */
-    public void setDocumentHandler (DocumentHandler handler)
-    {
-	documentHandler = handler;
-    }
-
-
-    /**
-     * Register the error event handler.
-     *
-     * @param handler The new error event handler.
-     * @see org.xml.sax.Parser#setErrorHandler
-     */
-    public void setErrorHandler (ErrorHandler handler)
-    {
-	xmlReader.setErrorHandler(handler);
-    }
-
-
-    /**
-     * Parse the document.
-     *
-     * <p>This method will throw an exception if the embedded
-     * XMLReader does not support the 
-     * http://xml.org/sax/features/namespace-prefixes property.</p>
-     *
-     * @param systemId The absolute URL of the document.
-     * @exception java.io.IOException If there is a problem reading
-     *            the raw content of the document.
-     * @exception org.xml.sax.SAXException If there is a problem
-     *            processing the document.
-     * @see #parse(org.xml.sax.InputSource)
-     * @see org.xml.sax.Parser#parse(java.lang.String)
-     */
-    public void parse (String systemId)
-	throws IOException, SAXException
-    {
-	parse(new InputSource(systemId));
-    }
-
-
-    /**
-     * Parse the document.
-     *
-     * <p>This method will throw an exception if the embedded
-     * XMLReader does not support the 
-     * http://xml.org/sax/features/namespace-prefixes property.</p>
-     *
-     * @param input An input source for the document.
-     * @exception java.io.IOException If there is a problem reading
-     *            the raw content of the document.
-     * @exception org.xml.sax.SAXException If there is a problem
-     *            processing the document.
-     * @see #parse(java.lang.String)
-     * @see org.xml.sax.Parser#parse(org.xml.sax.InputSource)
-     */
-    public void parse (InputSource input)
-	throws IOException, SAXException
-    {
-	setupXMLReader();
-	xmlReader.parse(input);
-    }
-
-
-    /**
-     * Set up the XML reader.
-     */
-    private void setupXMLReader ()
-	throws SAXException
-    {
-	xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
-	try {
-	    xmlReader.setFeature("http://xml.org/sax/features/namespaces",
-	                         false);
-	} catch (SAXException e) {
-	    // NO OP: it's just extra information, and we can ignore it
-	}
-	xmlReader.setContentHandler(this);
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Implementation of org.xml.sax.ContentHandler.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Set a document locator.
-     *
-     * @param locator The document locator.
-     * @see org.xml.sax.ContentHandler#setDocumentLocator
-     */
-    public void setDocumentLocator (Locator locator)
-    {
-	documentHandler.setDocumentLocator(locator);
-    }
-
-
-    /**
-     * Start document event.
-     *
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.ContentHandler#startDocument
-     */
-    public void startDocument ()
-	throws SAXException
-    {
-	documentHandler.startDocument();
-    }
-
-
-    /**
-     * End document event.
-     *
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.ContentHandler#endDocument
-     */
-    public void endDocument ()
-	throws SAXException
-    {
-	documentHandler.endDocument();
-    }
-
-
-    /**
-     * Adapt a SAX2 start prefix mapping event.
-     *
-     * @param prefix The prefix being mapped.
-     * @param uri The Namespace URI being mapped to.
-     * @see org.xml.sax.ContentHandler#startPrefixMapping
-     */
-    public void startPrefixMapping (String prefix, String uri)
-    {
-    }
-
-
-    /**
-     * Adapt a SAX2 end prefix mapping event.
-     *
-     * @param prefix The prefix being mapped.
-     * @see org.xml.sax.ContentHandler#endPrefixMapping
-     */
-    public void endPrefixMapping (String prefix)
-    {
-    }
-
-
-    /**
-     * Adapt a SAX2 start element event.
-     *
-     * @param uri The Namespace URI.
-     * @param localName The Namespace local name.
-     * @param qName The qualified (prefixed) name.
-     * @param atts The SAX2 attributes.
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.ContentHandler#endDocument
-     */
-    public void startElement (String uri, String localName,
-			      String qName, Attributes atts)
-	throws SAXException
-    {
-	qAtts.setAttributes(atts);
-	documentHandler.startElement(qName, qAtts);
-    }
-
-
-    /**
-     * Adapt a SAX2 end element event.
-     *
-     * @param uri The Namespace URI.
-     * @param localName The Namespace local name.
-     * @param qName The qualified (prefixed) name.
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.ContentHandler#endElement
-     */
-    public void endElement (String uri, String localName,
-			    String qName)
-	throws SAXException
-    {
-	documentHandler.endElement(qName);
-    }
-
-
-    /**
-     * Adapt a SAX2 characters event.
-     *
-     * @param ch An array of characters.
-     * @param start The starting position in the array.
-     * @param length The number of characters to use.
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.ContentHandler#characters
-     */
-    public void characters (char ch[], int start, int length)
-	throws SAXException
-    {
-	documentHandler.characters(ch, start, length);
-    }
-
-
-    /**
-     * Adapt a SAX2 ignorable whitespace event.
-     *
-     * @param ch An array of characters.
-     * @param start The starting position in the array.
-     * @param length The number of characters to use.
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.ContentHandler#ignorableWhitespace
-     */
-    public void ignorableWhitespace (char ch[], int start, int length)
-	throws SAXException
-    {
-	documentHandler.ignorableWhitespace(ch, start, length);
-    }
-
-
-    /**
-     * Adapt a SAX2 processing instruction event.
-     *
-     * @param target The processing instruction target.
-     * @param data The remainder of the processing instruction
-     * @exception org.xml.sax.SAXException The client may raise a
-     *            processing exception.
-     * @see org.xml.sax.ContentHandler#processingInstruction
-     */
-    public void processingInstruction (String target, String data)
-	throws SAXException
-    {
-	documentHandler.processingInstruction(target, data);
-    }
-
-
-    /**
-     * Adapt a SAX2 skipped entity event.
-     *
-     * @param name The name of the skipped entity.
-     * @see org.xml.sax.ContentHandler#skippedEntity
-     */
-    public void skippedEntity (String name)
-	throws SAXException
-    {
-    }
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal state.
-    ////////////////////////////////////////////////////////////////////
-
-    XMLReader xmlReader;
-    DocumentHandler documentHandler;
-    AttributesAdapter qAtts;
-
-
-
-    ////////////////////////////////////////////////////////////////////
-    // Internal class.
-    ////////////////////////////////////////////////////////////////////
-
-
-    /**
-     * Internal class to wrap a SAX2 Attributes object for SAX1.
-     */
-    final class AttributesAdapter implements AttributeList
-    {
-	AttributesAdapter ()
-	{
-	}
-
-
-	/**
-	 * Set the embedded Attributes object.
-	 *
-	 * @param The embedded SAX2 Attributes.
-	 */ 
-	void setAttributes (Attributes attributes)
-	{
-	    this.attributes = attributes;
-	}
-
-
-	/**
-	 * Return the number of attributes.
-	 *
-	 * @return The length of the attribute list.
-	 * @see org.xml.sax.AttributeList#getLength
-	 */
-	public int getLength ()
-	{
-	    return attributes.getLength();
-	}
-
-
-	/**
-	 * Return the qualified (prefixed) name of an attribute by position.
-	 *
-	 * @return The qualified name.
-	 * @see org.xml.sax.AttributeList#getName
-	 */
-	public String getName (int i)
-	{
-	    return attributes.getQName(i);
-	}
-
-
-	/**
-	 * Return the type of an attribute by position.
-	 *
-	 * @return The type.
-	 * @see org.xml.sax.AttributeList#getType(int)
-	 */
-	public String getType (int i)
-	{
-	    return attributes.getType(i);
-	}
-
-
-	/**
-	 * Return the value of an attribute by position.
-	 *
-	 * @return The value.
-	 * @see org.xml.sax.AttributeList#getValue(int)
-	 */
-	public String getValue (int i)
-	{
-	    return attributes.getValue(i);
-	}
-
-
-	/**
-	 * Return the type of an attribute by qualified (prefixed) name.
-	 *
-	 * @return The type.
-	 * @see org.xml.sax.AttributeList#getType(java.lang.String)
-	 */
-	public String getType (String qName)
-	{
-	    return attributes.getType(qName);
-	}
-
-
-	/**
-	 * Return the value of an attribute by qualified (prefixed) name.
-	 *
-	 * @return The value.
-	 * @see org.xml.sax.AttributeList#getValue(java.lang.String)
-	 */
-	public String getValue (String qName)
-	{
-	    return attributes.getValue(qName);
-	}
-
-	private Attributes attributes;
-    }
-
-}
-
-// end of XMLReaderAdapter.java
diff --git a/src/org/xml/sax/helpers/XMLReaderFactory.java b/src/org/xml/sax/helpers/XMLReaderFactory.java
deleted file mode 100644
index b6a2e28..0000000
--- a/src/org/xml/sax/helpers/XMLReaderFactory.java
+++ /dev/null
@@ -1,200 +0,0 @@
-// XMLReaderFactory.java - factory for creating a new reader.
-// http://www.saxproject.org
-// Written by David Megginson
-// and by David Brownell
-// NO WARRANTY!  This class is in the Public Domain.
-// $Id: XMLReaderFactory.java,v 1.8 2001/11/21 01:02:50 dbrownell Exp $
-
-package org.xml.sax.helpers;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import org.xml.sax.XMLReader;
-import org.xml.sax.SAXException;
-
-
-/**
- * Factory for creating an XML reader.
- *
- * <blockquote>
- * <em>This module, both source code and documentation, is in the
- * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
- * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
- * for further information.
- * </blockquote>
- *
- * <p>This class contains static methods for creating an XML reader
- * from an explicit class name, or based on runtime defaults:</p>
- *
- * <pre>
- * try {
- *   XMLReader myReader = XMLReaderFactory.createXMLReader();
- * } catch (SAXException e) {
- *   System.err.println(e.getMessage());
- * }
- * </pre>
- *
- * <p><strong>Note to Distributions bundled with parsers:</strong>
- * You should modify the implementation of the no-arguments
- * <em>createXMLReader</em> to handle cases where the external
- * configuration mechanisms aren't set up.  That method should do its
- * best to return a parser when one is in the class path, even when
- * nothing bound its class name to <code>org.xml.sax.driver</code> so
- * those configuration mechanisms would see it.</p>
- *
- * @since SAX 2.0
- * @author David Megginson, David Brownell
- * @version 2.0r2pre3
- */
-final public class XMLReaderFactory
-{
-    /**
-     * Private constructor.
-     *
-     * <p>This constructor prevents the class from being instantiated.</p>
-     */
-    private XMLReaderFactory ()
-    {
-    }
-
-    private static final String property = "org.xml.sax.driver";
-
-    /**
-     * Attempt to create an XMLReader from system defaults.
-     * In environments which can support it, the name of the XMLReader
-     * class is determined by trying each these options in order, and
-     * using the first one which succeeds:</p> <ul>
-     *
-     * <li>If the system property <code>org.xml.sax.driver</code>
-     * has a value, that is used as an XMLReader class name. </li>
-     *
-     * <li>The JAR "Services API" is used to look for a class name
-     * in the <em>META-INF/services/org.xml.sax.driver</em> file in
-     * jarfiles available to the runtime.</li>
-     *
-     * <li> SAX parser distributions are strongly encouraged to provide
-     * a default XMLReader class name that will take effect only when
-     * previous options (on this list) are not successful.</li>
-     *
-     * <li>Finally, if {@link ParserFactory#makeParser()} can
-     * return a system default SAX1 parser, that parser is wrapped in
-     * a {@link ParserAdapter}.  (This is a migration aid for SAX1
-     * environments, where the <code>org.xml.sax.parser</code> system
-     * property will often be usable.) </li>
-     *
-     * </ul>
-     *
-     * <p> In environments such as small embedded systems, which can not
-     * support that flexibility, other mechanisms to determine the default
-     * may be used. </p>
-     *
-     * <p>Note that many Java environments allow system properties to be
-     * initialized on a command line.  This means that <em>in most cases</em>
-     * setting a good value for that property ensures that calls to this
-     * method will succeed, except when security policies intervene.
-     * This will also maximize application portability to older SAX
-     * environments, with less robust implementations of this method.
-     * </p>
-     *
-     * @return A new XMLReader.
-     * @exception org.xml.sax.SAXException If no default XMLReader class
-     *            can be identified and instantiated.
-     * @see #createXMLReader(java.lang.String)
-     */
-    public static XMLReader createXMLReader ()
-	throws SAXException
-    {
-	String		className = null;
-	ClassLoader	loader = NewInstance.getClassLoader ();
-	
-	// 1. try the JVM-instance-wide system property
-	try { className = System.getProperty (property); }
-	catch (Exception e) { /* normally fails for applets */ }
-
-	// 2. if that fails, try META-INF/services/
-	if (className == null) {
-	    try {
-		String		service = "META-INF/services/" + property;
-		InputStream	in;
-		BufferedReader	reader;
-
-		if (loader == null)
-		    in = ClassLoader.getSystemResourceAsStream (service);
-		else
-		    in = loader.getResourceAsStream (service);
-
-		if (in != null) {
-		    reader = new BufferedReader (
-			    new InputStreamReader (in, "UTF8"));
-		    className = reader.readLine ();
-		    in.close ();
-		}
-	    } catch (Exception e) {
-	    }
-	}
-
-	// 3. Distro-specific fallback
-	if (className == null) {
-        // modified by neilg in accordance with the "strong encouragement"
-        // provided to distributions which include parsers.
-
-	    className = "org.apache.xerces.parsers.SAXParser";
-
-	}
-	
-	// do we know the XMLReader implementation class yet?
-	if (className != null)
-	    return loadClass (loader, className);
-
-	// 4. panic -- adapt any SAX1 parser
-	try {
-	    return new ParserAdapter (ParserFactory.makeParser ());
-	} catch (Exception e) {
-	    throw new SAXException ("Can't create default XMLReader; "
-		    + "is system property org.xml.sax.driver set?");
-	}
-    }
-
-
-    /**
-     * Attempt to create an XML reader from a class name.
-     *
-     * <p>Given a class name, this method attempts to load
-     * and instantiate the class as an XML reader.</p>
-     *
-     * <p>Note that this method will not be usable in environments where
-     * the caller (perhaps an applet) is not permitted to load classes
-     * dynamically.</p>
-     *
-     * @return A new XML reader.
-     * @exception org.xml.sax.SAXException If the class cannot be
-     *            loaded, instantiated, and cast to XMLReader.
-     * @see #createXMLReader()
-     */
-    public static XMLReader createXMLReader (String className)
-	throws SAXException
-    {
-	return loadClass (NewInstance.getClassLoader (), className);
-    }
-
-    private static XMLReader loadClass (ClassLoader loader, String className)
-    throws SAXException
-    {
-	try {
-	    return (XMLReader) NewInstance.newInstance (loader, className);
-	} catch (ClassNotFoundException e1) {
-	    throw new SAXException("SAX2 driver class " + className +
-				   " not found", e1);
-	} catch (IllegalAccessException e2) {
-	    throw new SAXException("SAX2 driver class " + className +
-				   " found but cannot be loaded", e2);
-	} catch (InstantiationException e3) {
-	    throw new SAXException("SAX2 driver class " + className +
-	   " loaded but cannot be instantiated (no empty public constructor?)",
-				   e3);
-	} catch (ClassCastException e4) {
-	    throw new SAXException("SAX2 driver class " + className +
-				   " does not implement XMLReader", e4);
-	}
-    }
-}
diff --git a/src/org/xml/sax/helpers/package.html b/src/org/xml/sax/helpers/package.html
deleted file mode 100644
index 3e5f5b2..0000000
--- a/src/org/xml/sax/helpers/package.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>SAX2 is Free!</title>
-</head>
-
-<body>
-<p>
-SAX helper classes.
-</p>
-<h1>SAX2 is Free!</h1>
-
-<p>I hereby abandon any property rights to SAX 2.0 (the Simple API for
-XML), and release all of the SAX 2.0 source code, compiled code, and
-documentation contained in this distribution into the Public Domain.
-SAX comes with NO WARRANTY or guarantee of fitness for any
-purpose.</p>
-
-<p>David Megginson, david@megginson.com</p>
-<p>2000-05-05</p>
-
-</body>
-</html>
diff --git a/src/org/xml/sax/package.html b/src/org/xml/sax/package.html
deleted file mode 100644
index b3e2a8f..0000000
--- a/src/org/xml/sax/package.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!-- $Id$ -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Simple API for XML</title>
-</head>
-<body>
-<h1>Simple API for XML (SAX)</h1>
-<h2>About</h2>
-<p>
-SAX is the Simple API for XML, originally a Java-only API. SAX was 
-the first widely adopted API for XML in Java, and is a "de facto"
-standard. The current version is SAX 2.0, and there are versions 
-for several programming language environments other than Java. 
-</p>
-<h2>Copyright Status</h2>
-<p>
-<i>SAX is free!</i>
-</p>
-<p>
-In fact, it's not possible to own a license to SAX, since it's 
-been placed in the public domain. 
-</p>
-<h2>No Warranty</h2>
-<p>
-Because SAX is released to the public domain, there is no warranty 
-for the design or for the software implementation, to the extent 
-permitted by applicable law. Except when otherwise stated in 
-writing the copyright holders and/or other parties provide SAX "as 
-is" without warranty of any kind, either expressed or implied, 
-including, but not limited to, the implied warranties of 
-merchantability and fitness for a particular purpose. The entire 
-risk as to the quality and performance of SAX is with you. Should 
-SAX prove defective, you assume the cost of all necessary servicing, 
-repair or correction.
-</p>
-<p>
-In no event unless required by applicable law or agreed to in 
-writing will any copyright holder, or any other party who may 
-modify and/or redistribute SAX, be liable to you for damages, 
-including any general, special, incidental or consequential 
-damages arising out of the use or inability to use SAX (including 
-but not limited to loss of data or data being rendered inaccurate 
-or losses sustained by you or third parties or a failure of the 
-SAX to operate with any other programs), even if such holder or 
-other party has been advised of the possibility of such damages.
-</p>
-<h2>Copyright Disclaimers </h2>
-<p>
-This page includes statements to that effect by David Megginson, 
-who would have been able to claim copyright for the original work. 
-</p>
-<h3>SAX 1.0</h3>
-<p>
-Version 1.0 of the Simple API for XML (SAX), created collectively 
-by the membership of the XML-DEV mailing list, is hereby released 
-into the public domain.
-</p>
-<p>
-No one owns SAX: you may use it freely in both commercial and 
-non-commercial applications, bundle it with your software 
-distribution, include it on a CD-ROM, list the source code in a 
-book, mirror the documentation at your own web site, or use it in 
-any other way you see fit.
-</p>
-<p>
-<i>David Megginson, sax@megginson.com<br>1998-05-11</i>
-</p>
-<h3>SAX 2.0</h3>
-<p>
-I hereby abandon any property rights to SAX 2.0 (the Simple API 
-for XML), and release all of the SAX 2.0 source code, compiled 
-code, and documentation contained in this distribution into the 
-Public Domain. SAX comes with NO WARRANTY or guarantee of fitness 
-for any purpose.
-</p>
-<p>
-<i>David Megginson, david@megginson.com<br>2000-05-05</i>
-</p>
-</body>
-</html>
diff --git a/tests/dom/DTest.java b/tests/dom/DTest.java
deleted file mode 100644
index e5ff55a..0000000
--- a/tests/dom/DTest.java
+++ /dev/null
@@ -1,1758 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- * 
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- * 
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache\@apache.org.
- * 
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- * 
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation, and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com .  For more information
- * on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom;
-
-import org.w3c.dom.*;
-import java.lang.reflect.*;
-import java.io.StringWriter;
-import java.io.PrintWriter;
-import dom.util.Assertion;
-
-/**
- * This class tests methods for XML DOM implementation
- * version 2.0 10/12/98
- * 
- * DOMException errors are tested by calls to DOMExceptionsTest from: Main, docBuilder...
- *
- * @author Philip W. Davis
- */
- 
-public class DTest {
-	
-	public static Element 		testElementNode;
-	public static Attr 		testAttributeNode;
-	public static Text 		testTextNode;
-	public static CDATASection 	testCDATASectionNode;
-	public static EntityReference 	testEntityReferenceNode;
-	public static Entity 		testEntityNode;
-	public static ProcessingInstruction testProcessingInstructionNode;
-	public static Comment 		testCommentNode;
-	public static Document 		testDocumentNode;
-	public static DocumentType 	testDocumentTypeNode;
-	public static DocumentFragment 	testDocumentFragmentNode;
-	public static Notation 		testNotationNode;
-
-/**
- * 
- * version 2.0 10/12/98
- *
- * @author Philip W. Davis
- */
-public DTest() {
-	super();
-	
-}
-/**
- * version 3.0 01/25/99
- *  
- * @return org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public Document createDocument() {
-	return new org.apache.xerces.dom.DocumentImpl();	//Replace with a Document creator
-}
-/**
- * version 3.0 01/25/99
- * 
- * @return org.w3c.dom.DocumentType
- * @param name java.lang.String
- *
- * @author Philip W. Davis
- */
-public DocumentType createDocumentType(Document doc, String name) {
-	return ((org.apache.xerces.dom.DocumentImpl) doc).createDocumentType(name, null, null);	//Replace with a DocumentType creator
-}
-/**
- * version 3.0 01/25/99
- *  
- * @return org.w3c.dom.Entity
- * @param doc org.w3c.dom.Document
- * @param name java.lang.String
- *
- * @author Philip W. Davis
- */
-public Entity createEntity(Document doc, String name) {
-	return new org.apache.xerces.dom.EntityImpl((org.apache.xerces.dom.DocumentImpl)doc, name);	//Replace with an Entity creator
-}
-/**
- * version 3.0 01/25/99
- * 
- * @return org.w3c.dom.Notation
- * @param doc org.w3c.dom.Document
- * @param name java.lang.String
- *
- * @author Philip W. Davis
- */
-public Notation createNotation(Document doc, String name) {
-	return new org.apache.xerces.dom.NotationImpl((org.apache.xerces.dom.DocumentImpl) doc, name);	// Replace with a Notation creator
-}
-/**
- * This method builds test documents for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- * @param name document's name
- * @param type document's type
- *
- * @author Philip W. Davis
- */
-public void docBuilder(org.w3c.dom.Document document, String name)
-{
-	Document doc = document;
-	boolean OK = true;
-		
-	Element docFirstElement = doc.createElement(name + "FirstElement");
-	doc.appendChild(docFirstElement);
-	docFirstElement.setAttribute(name + "FirstElement", name + "firstElement");
-	
-	ProcessingInstruction docProcessingInstruction = doc.createProcessingInstruction(name +
-					"TargetProcessorChannel", "This is " + doc + "'s processing instruction");
-	docFirstElement.appendChild(docProcessingInstruction);
-	
-	Element docBody = doc.createElement(name + "TestBody");
-	docFirstElement.appendChild(docBody);
-	
-	Element docBodyLevel21 = doc.createElement(name + "BodyLevel21");
-	Element docBodyLevel22 = doc.createElement(name + "BodyLevel22");
-	Element docBodyLevel23 = doc.createElement(name + "BodyLevel23");
-	Element docBodyLevel24 = doc.createElement(name + "BodyLevel24");
-	docBody.appendChild(docBodyLevel21);
-	docBody.appendChild(docBodyLevel22);
-	docBody.appendChild(docBodyLevel23);
-	docBody.appendChild(docBodyLevel24);
-	
-	Element docBodyLevel31 = doc.createElement(name + "BodyLevel31");
-	Element docBodyLevel32 = doc.createElement(name + "BodyLevel32");
-	Element docBodyLevel33 = doc.createElement(name + "BodyLevel33");
-	Element docBodyLevel34 = doc.createElement(name + "BodyLevel34");
-	docBodyLevel21.appendChild(docBodyLevel31);
-	docBodyLevel21.appendChild(docBodyLevel32);
-	docBodyLevel22.appendChild(docBodyLevel33);
-	docBodyLevel22.appendChild(docBodyLevel34);
-	
-	Text docTextNode11 = doc.createTextNode(name + "BodyLevel31'sChildTextNode11");
-	Text docTextNode12 = doc.createTextNode(name + "BodyLevel31'sChildTextNode12");
-	Text docTextNode13 = doc.createTextNode(name + "BodyLevel31'sChildTextNode13");
-	Text docTextNode2 = doc.createTextNode(name + "TextNode2");
-	Text docTextNode3 = doc.createTextNode(name + "TextNode3");
-	Text docTextNode4 = doc.createTextNode(name + "TextNode4");
-	docBodyLevel31.appendChild(docTextNode11);
-	docBodyLevel31.appendChild(docTextNode12);
-	docBodyLevel31.appendChild(docTextNode13);
-	docBodyLevel32.appendChild(docTextNode2);
-	docBodyLevel33.appendChild(docTextNode3);
-	docBodyLevel34.appendChild(docTextNode4);
-	
-	CDATASection docCDATASection = doc.createCDATASection("<![CDATA[<greeting>Hello, world!</greeting>]]>");
-	docBodyLevel23.appendChild(docCDATASection);
-	
-	Comment docComment = doc.createComment("This should be a comment of some kind ");
-	docBodyLevel23.appendChild(docComment);
-	
-	EntityReference docReferenceEntity = doc.createEntityReference("ourEntityNode");
-	docBodyLevel24.appendChild(docReferenceEntity);
-
-	DTest make = new DTest();
-	Notation docNotation = make.createNotation(doc, "ourNotationNode");
-//	NotationImpl docNotation = new NotationImpl((DocumentImpl) doc, "ourNotationNode");//*****?
-	DocumentType docType = (DocumentType)doc.getFirstChild();
-	docType.getNotations().setNamedItem(docNotation);
-	
-	DocumentFragment docDocFragment = doc.createDocumentFragment();
-	
-//	System.out.println("This document's first element name is " + docFirstElement.getTagName() + "\n");
-
-
-//***********Following are for errorTests
-	Text docNode3 = doc.createTextNode(name + "docTextNode3");
-	Text docNode4 = doc.createTextNode(name + "docTextNode4");
-	
-	Entity docEntity = (Entity) doc.getDoctype().getEntities().getNamedItem("ourEntityNode"); // Get the Entity node
-	DocumentType docDocType = (DocumentType) doc.getFirstChild();	// Get the DocumentType node
-	EntityReference entityReferenceText = (EntityReference) doc.getLastChild().getLastChild().getLastChild().getFirstChild();
-	Text entityReferenceText2 = doc.createTextNode("entityReferenceText information");
-//************************************************* ERROR TESTS
-	DTest tests = new DTest();
-
-	OK &= Assertion.assert(tests.DOMExceptionsTest(document, "appendChild", new Class[]{Node.class}, new Object[]{docBody}, DOMException.HIERARCHY_REQUEST_ERR )); 
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docNode3, "appendChild", new Class[]{Node.class}, new Object[]{docNode4}, DOMException.HIERARCHY_REQUEST_ERR )); 
-	OK &= Assertion.assert(tests.DOMExceptionsTest(doc, "insertBefore", new Class[]{Node.class, Node.class}, new Object[]{docEntity, docFirstElement}, DOMException.HIERARCHY_REQUEST_ERR )); 
-	OK &= Assertion.assert(tests.DOMExceptionsTest(doc, "replaceChild", new Class[]{Node.class, Node.class}, new Object[]{docCDATASection, docFirstElement}, DOMException.HIERARCHY_REQUEST_ERR )); 
-
-        docFirstElement.setNodeValue("This shouldn't do anything!");
-	OK &= Assertion.assert(docFirstElement.getNodeValue() == null);
-        docReferenceEntity.setNodeValue("This shouldn't do anything!");
-	OK &= Assertion.assert(docReferenceEntity.getNodeValue() == null);
-        docEntity.setNodeValue("This shouldn't do anything!");
-	OK &= Assertion.assert(docEntity.getNodeValue() == null);
-        doc.setNodeValue("This shouldn't do anything!");
-	OK &= Assertion.assert(doc.getNodeValue() == null);
-        docType.setNodeValue("This shouldn't do anything!");
-	OK &= Assertion.assert(docType.getNodeValue() == null);
-        docDocFragment.setNodeValue("This shouldn't do anything!");
-	OK &= Assertion.assert(docDocFragment.getNodeValue() == null);
-        docNotation.setNodeValue("This shouldn't do anything!");
-	OK &= Assertion.assert(docNotation.getNodeValue() == null);
-
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docReferenceEntity, "appendChild", new Class[]{Node.class}, new Object[]{entityReferenceText2 }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docBodyLevel32, "insertBefore", new Class[]{Node.class, Node.class}, new Object[]{docTextNode11,docBody }, DOMException.NOT_FOUND_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docBodyLevel32, "removeChild", new Class[]{Node.class}, new Object[]{docFirstElement}, DOMException.NOT_FOUND_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docBodyLevel32, "replaceChild", new Class[]{Node.class, Node.class}, new Object[]{docTextNode11,docFirstElement }, DOMException.NOT_FOUND_ERR ));
-
-
-//!! Throws a NOT_FOUND_ERR	********
-	 
-	 //	docBodyLevel32.getAttributes().removeNamedItem(testAttribute.getName()); 	16  // To test removeNamedItem
-	 
-}//END OF DOCBUILDER
-/**
- * version 3.0 01/25/99
- * 
- * @return boolean
- * @param node java.lang.Object
- * @param mNameIndex int
- * @param signatureIndex int
- * @param parameters java.lang.Object[]
- * @param code short
- *
- * @author Philip W. Davis
- */
-public static boolean DOMExceptionsTest(Object node, String methodName, Class[] methodSignature, Object[] parameters, short code) {
-	
-	
-	boolean asExpected = false;
-	Method method;
-
-	try
-	{
-		method = node.getClass().getMethod(methodName,methodSignature);
-		method.invoke(node, parameters);
-	}catch(InvocationTargetException exc)
-	{
-		Throwable realE = exc.getTargetException(); 
-		if(realE instanceof DOMException)
-		{
-			asExpected = (((DOMException)realE).code== code);
-			if(!asExpected)
-				System.out.println("Wrong DOMException(" + ((DOMException)realE).code + ")");
-		}
-		else
-			System.out.println("Wrong Exception (" + code + ")");
-
-		if(!asExpected)
-		{
-			System.out.println("Expected DOMException (" + code + ") not thrown");			
-		}
-	}catch(Exception exc)
-	{
-		System.out.println("test invocation failure (" + exc + ")");
-	}
-	
-	
-	return (asExpected);
-}
-
-/**
- * @author Philip W. Davis
- * @param document org.w3c.dom.Document
- */
-public void findTestNodes(Document document) {
-
-
-
-
-	Node node = document;
-	int nodeCount = 0;
-
-	// Walk the tree until you find and assign all node types needed that exist.
-	while (node != null && nodeCount < 12)
-	{
-
-		switch (node.getNodeType())
-	{
-		case org.w3c.dom.Node.ELEMENT_NODE :
-			if (testElementNode == null) {testElementNode = (Element)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.ATTRIBUTE_NODE :
-			if (testAttributeNode == null) {testAttributeNode = (Attr)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.TEXT_NODE :
-			if (testTextNode == null) {testTextNode = (Text)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.CDATA_SECTION_NODE :
-			if (testCDATASectionNode == null) {testCDATASectionNode = (CDATASection)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.ENTITY_REFERENCE_NODE :
-			if (testEntityReferenceNode == null) {testEntityReferenceNode = (EntityReference)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.ENTITY_NODE :
-			if (testEntityNode == null) {testEntityNode = (Entity)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE :
-			if (testProcessingInstructionNode == null) {testProcessingInstructionNode = (ProcessingInstruction)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.COMMENT_NODE :
-			if (testCommentNode == null) {testCommentNode = (Comment)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.DOCUMENT_TYPE_NODE :
-			if (testDocumentTypeNode == null) {testDocumentTypeNode = (DocumentType)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.DOCUMENT_FRAGMENT_NODE :
-			if (testDocumentFragmentNode == null) {testDocumentFragmentNode = (DocumentFragment)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.NOTATION_NODE :
-			if (testNotationNode == null) {testNotationNode = (Notation)node; nodeCount++;}
-			break;
-		case org.w3c.dom.Node.DOCUMENT_NODE :
-			if (testDocumentNode == null) {testDocumentNode = (Document)node; nodeCount++;}
-			break;
-		default:
-	}// End of switch
-
-	
-
-
-	}// End of while
-	
-
-
-
-
-
-
-
-
-
-
-
-
-
-	
-}
-
-/**
- * @author Philip W. Davis
- * @param document org.w3c.dom.Document
- */
-public void findTestNodes(Node node) {
-
-	DTest test = new DTest();
-	Node kid;
-	// Walk the tree until you find and assign all node types needed that exist.
-	
-		
-	if (node.getFirstChild() != null)
-	{
-		kid = node.getFirstChild();
-		test.findTestNodes(kid);
-	}
-			
-				
-	if (node.getNextSibling() != null)
-	{
-		kid = node.getNextSibling();
-		test.findTestNodes(kid);
-	}
-
-		
-	switch (node.getNodeType())
-	{
-		case org.w3c.dom.Node.ELEMENT_NODE :
-			if (testElementNode == null) {testElementNode = (Element)node; }
-			break;
-		case org.w3c.dom.Node.ATTRIBUTE_NODE :
-			if (testAttributeNode == null) {testAttributeNode = (Attr)node; }
-			break;
-		case org.w3c.dom.Node.TEXT_NODE :
-			if (testTextNode == null) {testTextNode = (Text)node; }
-			break;
-		case org.w3c.dom.Node.CDATA_SECTION_NODE :
-			if (testCDATASectionNode == null) {testCDATASectionNode = (CDATASection)node; }
-			break;
-		case org.w3c.dom.Node.ENTITY_REFERENCE_NODE :
-			if (testEntityReferenceNode == null) {testEntityReferenceNode = (EntityReference)node;}
-			break;
-		case org.w3c.dom.Node.ENTITY_NODE :
-			if (testEntityNode == null) {testEntityNode = (Entity)node;}
-			break;
-		case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE :
-			if (testProcessingInstructionNode == null) {testProcessingInstructionNode = (ProcessingInstruction)node;}
-			break;
-		case org.w3c.dom.Node.COMMENT_NODE :
-			if (testCommentNode == null) {testCommentNode = (Comment)node;}
-			break;
-		case org.w3c.dom.Node.DOCUMENT_TYPE_NODE :
-			if (testDocumentTypeNode == null) {testDocumentTypeNode = (DocumentType)node; }
-			break;
-		case org.w3c.dom.Node.DOCUMENT_FRAGMENT_NODE :
-			if (testDocumentFragmentNode == null) {testDocumentFragmentNode = (DocumentFragment)node;}
-			break;
-		case org.w3c.dom.Node.NOTATION_NODE :
-			if (testNotationNode == null) {testNotationNode = (Notation)node;}
-			break;
-		case org.w3c.dom.Node.DOCUMENT_NODE :
-			if (testDocumentNode == null) {testDocumentNode = (Document)node;}
-			break;
-		default:
-	}// End of switch
-	
-
-}
-	
-/**
- * 
- * version 2.0 10/12/98
- *
- * @author Philip W. Davis
- */
-
-public static void main(String args[]) {
-    System.out.println("# main()");
-	
-	DTest test = new DTest();
-
-	long avgTime = 0;
-	boolean OK = true;
-	long startTime = 0;//****************Time the whole thing for efficiency of DOM implementation
-	 
-//	for (int i=0; i< 1000; i++)
-//	{	
-		startTime = System.currentTimeMillis();
-//		if(!OK)
-//		break;
-
-	Document d = test.createDocument();
-//	Document z = test.createDocument();
-
-	DocumentType docDocType = test.createDocumentType(d,"testDocument1");
-	d.appendChild(docDocType);
-
-	Entity docEntity = test.createEntity( d, "ourEntityNode");
-	Text entityChildText = d.createTextNode("entityChildText information"); // Build a branch for entityReference tests
-        ((org.apache.xerces.dom.NodeImpl)docEntity).setReadOnly(false, true);
-	docEntity.appendChild(entityChildText);					  // & for READONLY_ERR tests
-        ((org.apache.xerces.dom.NodeImpl)docEntity).setReadOnly(true, true);
-	docDocType.getEntities().setNamedItem(docEntity);
-	
-	test.docBuilder(d, "d");
-
-	test.findTestNodes((Node)d);
-//	test.docBuilder(z, "z");
-	try {
-/**/		test.testAttr(d);
-		test.testCDATASection(d);
-		test.testCharacterData(d);
-		test.testChildNodeList(d);
-		test.testComment(d);
-		test.testDeepNodeList(d);
-		test.testDocument(d);
-		test.testDocumentFragment(d);
-		test.testDocumentType(d);
-		test.testDOMImplementation(d);
-		test.testElement(d);
-		test.testEntity(d);
-		test.testEntityReference(d);
-		test.testNode(d);
-		test.testNotation(d);
-		test.testPI(d);
-		test.testText(d);
-/**/		test.testDOMerrors(d);
-	
-//!! Throws WRONG_DOCUMENT_ERR **********
-		
-	//	z.appendChild(d.createComment("Test doc d comment"));// Tries to append z document with document d comment
-	//	d.getDocumentElement().appendChild(z.createElement("newZdocElement"));// Tries to append d document with document z Element
-	//	d.getLastChild().getLastChild().insertBefore(z.createElement("newZdocElement"),d.getLastChild().getLastChild().getFirstChild());// Tries to insert into d document with document z Element
-	//	d.replaceChild(z.createElement("newZdocElement"),d.getLastChild().getLastChild().getFirstChild());	// Tries to replace in d document with document z Element
-
-	/*	Attribute newAttribute = d.createAttribute("newAttribute");
-		d.getDocumentElement().setAttributeNode(newAttribute);
-		d.getDocumentElement().getAttributes().setNamedItem(z.createAttribute("newzAttribute"));
-	*/
-		
-//!! Throws INVALID_CHARACTER_ERR **********
-	// ******This just gets us through each method. JKess has a comprehensive test of Invalid Names******
-	//	d.createAttribute("Invalid Name"); // Name with blank space
-	//	d.createElement("5InvalidName"); // Name starts with numeric
-	//	d.createProcessingInstruction("This is the target processor channel","InvalidName>");// Name ends with >
-	//	d.getDocumentElement().setAttribute("Invalid%Name",""); // Name contains %
-		
-
-//!!	******** NO_DATA_ALLOWED_ERR ********No cases to test as of 9/15
-
-
-//!! 	******** NO_MODIFICATION_ALLOWED_ERR ******** When read only exists
-	/*
-		
-
-		
-		//**** FOR Element when read only exists********
-		.removeAttribute("aString");		   //***** Not until read only exists.
-		.removeAttributeNode(Attribute); 	   //***** Not until read only exists.
-		.setAttribute("aString", "anotherString"); //***** Not until read only exists.
-		
-		
-		//**** FOR Node when read only exists********
-		.appendChild(aNode);			//***** Not until read only exists.
-		.insertBefore(aNode, AnotherNode);	//***** Not until read only exists.
-		.removeChild(aNode);			//***** Not until read only exists.
-		.replaceChild(aNode);			//***** Not until read only exists.
-		
-		.splitText(2); //***** Not until read only exists.
-		
-		.setNamedItem(Node); //***** Not until read only exists.
-	*/
-	
-
-//!!******** NOT_SUPPORTED_ERR	********For HTML when implemented
-	/*
-		.createCDATASection("String stuff");
-		.createEntityReference("String stuff");
-		.createProcessingInstruction("String stuff", "Some more String stuff");
-	*/
-
-	} catch (Exception e) {
-		System.out.println("Exception is: ");
-		e.printStackTrace();
-		OK = false;
-		
-	}
-//System.err.println("Elapsed time (measured in seconds): " +   ((System.currentTimeMillis() - startTime) / 1000.0));
-	avgTime += System.currentTimeMillis() - startTime;
-//	}//END OF FOR
-	  
-	
-//	System.err.println("Elapsed time (measured in seconds): " +
-//					   ((System.currentTimeMillis() - startTime) / 1000.0));
-//	      System.err.println("Elapsed time (measured in mili-seconds): " +
-//					   ((System.currentTimeMillis() - startTime)));
-
-
-//	System.err.println("Average Elapsed time (measured in seconds): " + (avgTime/10000000.0) );
-
-}
-/**
- * This method tests Attr methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testAttr(org.w3c.dom.Document document)
-{
-	
-	Node node;	
-	Attr attributeNode, attribute2;
-	String compare;
-	boolean T = true;
-	boolean F = false;
-	boolean OK = true;
-// For debugging*****	println("\n          testAttr's outputs:\n");
-
-	Attr testAttribute = document.createAttribute("testAttribute");
-	testAttribute.setValue("testAttribute's value");
-	node = document.getDocumentElement(); // node gets first element
-	((Element)node).setAttributeNode(testAttribute);
-	attributeNode = ((Element)node).getAttributeNode("testAttribute");
-
-	compare = "testAttribute";
-	if (!compare.equals(attributeNode.getName()))
-	{
-		System.out.println("Warning!!! Attr's 'getName' method failed to work properly!");
-		OK = false;
-	}
-	compare = "testAttribute's value";
-	if (!compare.equals(attributeNode.getNodeValue()))
-	{
-		System.out.println("Warning!!! Attr's 'getNodeValue' method failed to work properly!");
-		OK = false;
-	}
-	if (! T ==attributeNode.getSpecified())
-	{
-		System.out.println("Warning!!! Attr's 'getSpecified' method failed to work properly!");
-		OK = false;
-	}
-	
-	if (!compare.equals(attributeNode.getValue()))
-	{
-		System.out.println("Warning!!! Attr's 'getValue' method failed to work properly!");
-		OK = false;
-	}
-	
-	attributeNode.setNodeValue("Reset Value");
-	compare = "Reset Value";
-	if (!compare.equals(attributeNode.getNodeValue()))
-	{
-		System.out.println("Warning!!! Attr's 'setNodeValue' method failed to work properly!");
-		OK = false;
-	}
-	((org.apache.xerces.dom.AttrImpl)attributeNode).setSpecified(F);//***** How do we change this for external use??
-	if (! F ==attributeNode.getSpecified())
-	{
-		System.out.println("Warning!!! Attr's 'setSpecified' method failed to work properly!");
-		OK = false;
-	}
-	
-	attributeNode.setValue(null);
-	if (! attributeNode.getValue().equals(""))
-	{
-		System.out.println("Warning!!! Attr's 'setValue' to 'null' method failed to work properly!");
-		OK = false;
-	}
-	
-	attributeNode.setValue("Another value ");
-	compare = "Another value ";
-	if (!compare.equals(attributeNode.getValue()))
-	{
-		System.out.println("Warning!!! Attr's 'setValue' method failed to work properly!");
-		OK = false;
-	}
-
-	node = attributeNode.cloneNode(T);//*****?
-	// Check nodes for equality, both their name and value or lack thereof
-	if (! (node.getNodeName().equals(attributeNode.getNodeName()) &&	     // Compares node names for equality
-	      (node.getNodeValue() != null && attributeNode.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ?  node.getNodeValue().equals(attributeNode.getNodeValue()) 	     // If both have value nodes test those value nodes for equality
-	    : (node.getNodeValue() == null && attributeNode.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-		{	
-			System.out.println("'cloneNode' did not clone the Attribute node correctly");
-			OK = false;
-		}
-		// Deep clone test comparison is in testNode & testDocument
-
-//************************************************* ERROR TESTS
-	DTest tests = new DTest();
-        Assertion.assert(
-          tests.DOMExceptionsTest(document.getDocumentElement(),
-                                  "appendChild",
-                                  new Class[]{Node.class},
-                                  new Object[]{attributeNode},
-                                  DOMException.HIERARCHY_REQUEST_ERR));
-
-	attribute2 = document.createAttribute("testAttribute2");
-        Assertion.assert(
-          tests.DOMExceptionsTest(document.getDocumentElement(),
-                                  "removeAttributeNode",
-                                  new Class[]{Attr.class},
-                                  new Object[]{attribute2},
-                                  DOMException.NOT_FOUND_ERR));
-
-        Element element = (Element)document.getLastChild().getLastChild();
-        // Tests setNamedItem
-        Assertion.assert(
-          tests.DOMExceptionsTest(element,
-                                  "setAttributeNode",
-                                  new Class[]{Attr.class},
-                                  new Object[]{testAttribute},
-                                  DOMException.INUSE_ATTRIBUTE_ERR));
-	
-	if (! OK)
-		System.out.println("\n*****The Attr method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests CDATASection methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testCDATASection(org.w3c.dom.Document document)
-{
-	
-	Node node, node2;
-	boolean T = true;
-	boolean OK = true;
-// For debugging*****	println("\n          testCDATASection's outputs:\n");
-	node = document.getDocumentElement().getElementsByTagName("dBodyLevel23").item(0).getFirstChild(); // node gets CDATASection node
-
-	node2 = node.cloneNode(T);//*****?
-	// Check nodes for equality, both their name and value or lack thereof
-	if (! (node.getNodeName().equals(node2.getNodeName()) && 		// Compares node names for equality
-	      (node.getNodeValue() != null && node2.getNodeValue() != null)     // Checks to make sure each node has a value node
-	    ?  node.getNodeValue().equals(node2.getNodeValue()) 		// If both have value nodes test those value nodes for equality
-	    : (node.getNodeValue() == null && node2.getNodeValue() == null)))	// If one node doesn't have a value node make sure both don't
-	{
-		System.out.println("'cloneNode' did not clone the CDATASection node correctly");
-		OK = false;
-	}
-	// Deep clone test comparison is in testNode & testDocument
-	
-// For debugging*****	println("All CDATASection method calls worked correctly.");
-		
-	if (! OK)
-		System.out.println("\n*****The CDATASection method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests CharacterData methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testCharacterData(org.w3c.dom.Document document)
-{
-	CharacterData charData;
-	String compareData, newData, resetData;
-	boolean OK = true;
-// For debugging*****	println("\n          testCharacterData's outputs:\n");
-	charData = (CharacterData) document.getDocumentElement().getElementsByTagName("dBodyLevel31").item(0).getFirstChild(); // charData gets textNode11
-	compareData = "dBodyLevel31'sChildTextNode11";
-	if (!compareData.equals(charData.getData()))
-	{
-		System.out.println("Warning!!! CharacterData's 'getData' failed to work properly!\n This may corrupt other CharacterData tests!!!*****");
-		OK = false;
-	}	
-	
-	resetData = charData.getData();
-	//  println("This node's original data is: " + charData.getData());
-
-	newData = " This is new data for this node";
-	compareData = charData.getData() + newData;
-	charData.appendData(newData);
-	if (!compareData.equals(charData.getData()))
-	{
-		System.out.println("Warning!!! CharacterData's 'appendData' failed to work properly!");
-		OK = false;
-	}
-	//	println("This node's appended data is: " + charData.getData());
-
-	compareData = "dBodyLevel";
-	charData.deleteData(10, 100);
-	if (!compareData.equals(charData.getData()))
-	{
-		System.out.println("Warning!!! CharacterData's 'deleteData' failed to work properly!");
-		OK = false;
-	}
-	//  println("This node's partially deleted data is: " + charData.getData());
-
-	int length = 10;
-	if (!(length == charData.getLength()))
-	{
-		System.out.println("Warning!!! CharacterData's 'getLength' failed to work properly!");
-		OK = false;
-	}
-	//  println("This node's data length is: " + charData.getLength());
-
-	compareData = "dBody' This is data inserted into this node'Level";
-	charData.insertData(5, "' This is data inserted into this node'");
-	if (!compareData.equals(charData.getData()))
-	{
-		System.out.println("Warning!!! CharacterData's 'insertData' failed to work properly!");
-		OK = false;
-	}
-	//	println("This node's updated with insert data is: " + charData.getData());
-
-	compareData = "dBody' This is ' replacement data'ted into this node'Level";
-	charData.replaceData(15, 10, "' replacement data'");
-	if (!compareData.equals(charData.getData()))
-	{
-		System.out.println("Warning!!! CharacterData's 'replaceData' failed to work properly!");
-		OK = false;
-	}
-	//	println("This node's updated with replacement data is: " +charData.getData());
-
-	compareData = "New data A123456789B123456789C123456789D123456789E123456789";
-	charData.setData("New data A123456789B123456789C123456789D123456789E123456789");
-	if (!compareData.equals(charData.getData()))
-	{
-		System.out.println("Warning!!! CharacterData's 'setData' failed to work properly!");
-		OK = false;
-	}
-	//	println("This node's new data via setData: " + charData.getData());
-
-	compareData = "123456789D123456789E123456789";
-	if (!compareData.equals(charData.substringData(30, 30)))
-	{
-		System.out.println("Warning!!! CharacterData's 'substringData' failed to work properly!");
-		OK = false;
-	}
-	//	println("Using subString 30,30 you get:" + charData.substringData(30,30));
-
-	compareData = "New data A123456789B12345";
-	if (!compareData.equals(charData.substringData(0, 25)))
-	{
-		System.out.println("Warning!!! CharacterData's 'substringData' failed to work properly!");
-		OK = false;
-	}
-	//	println("Using subString 0,25 you get:" + charData.substringData(0,25));
-
-//************************************************* ERROR TESTS
-	DTest tests = new DTest();
-
-//!! Throws INDEX_SIZE_ERR ********************
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "deleteData", new Class[]{int.class, int.class}, 
-			new Object[]{new Integer(-1),new Integer(5) }, DOMException.INDEX_SIZE_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "deleteData", new Class[]{int.class, int.class}, 
-			new Object[]{new Integer(2),new Integer(-1) }, DOMException.INDEX_SIZE_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "deleteData", new Class[]{int.class, int.class}, 
-			new Object[]{new Integer(100),new Integer(5) }, DOMException.INDEX_SIZE_ERR ));
-	
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "insertData", new Class[]{int.class, String.class}, 
-			new Object[]{new Integer(-1),"Stuff inserted" }, DOMException.INDEX_SIZE_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "insertData", new Class[]{int.class, String.class}, 
-			new Object[]{new Integer(100),"Stuff inserted" }, DOMException.INDEX_SIZE_ERR ));
-	
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "replaceData", new Class[]{int.class, int.class, String.class}, 
-			new Object[]{new Integer(-1),new Integer(5),"Replacement stuff" }, DOMException.INDEX_SIZE_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "replaceData", new Class[]{int.class, int.class, String.class}, 
-			new Object[]{new Integer(100),new Integer(5),"Replacement stuff" }, DOMException.INDEX_SIZE_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "replaceData", new Class[]{int.class, int.class, String.class}, 
-			new Object[]{new Integer(2),new Integer(-1),"Replacement stuff" }, DOMException.INDEX_SIZE_ERR ));
-	
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "substringData", new Class[]{int.class, int.class}, 
-			new Object[]{new Integer(-1),new Integer(5) }, DOMException.INDEX_SIZE_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "substringData", new Class[]{int.class, int.class}, 
-			new Object[]{new Integer(100),new Integer(5) }, DOMException.INDEX_SIZE_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(charData, "substringData", new Class[]{int.class, int.class}, 
-			new Object[]{new Integer(2),new Integer(-1) }, DOMException.INDEX_SIZE_ERR ));
-	
-
-//!! Throws NO_MODIFICATION_ALLOWED_ERR ******** 
-	Node node = document.getDocumentElement().getElementsByTagName("dBodyLevel24").item(0).getFirstChild().getChildNodes().item(0); // node gets ourEntityReference node's child text
-
-	OK &= Assertion.assert(tests.DOMExceptionsTest(node, "appendData", new Class[]{String.class}, 
-			new Object[]{"new data" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(node, "deleteData", new Class[]{int.class, int.class}, 
-			new Object[]{new Integer(5),new Integer(10) }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(node, "insertData", new Class[]{int.class, String.class}, 
-			new Object[]{new Integer(5),"Stuff inserted" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(node, "replaceData", new Class[]{int.class, int.class, String.class}, 
-			new Object[]{new Integer(5),new Integer(10),"Replacementstuff" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(node, "setData", new Class[]{String.class}, 
-			new Object[]{"New setdata stuff"}, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	
-		
-// For debugging*****		println("All CharacterData method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The CharacterData method calls listed above failed, all others worked correctly.*****");
-	charData.setData(resetData); // reset node to original data
-//	println("");
-}
-/**
- * This method tests ChildNodeList methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testChildNodeList(org.w3c.dom.Document document)
-{
-	
-	Node node, node2;
-	boolean OK = true;
-// For debugging*****	println("\n          testChildNodeList's outputs:\n");
-	node = document.getDocumentElement().getLastChild(); // node gets doc's testBody element
-	
-	if (!(node.getChildNodes().getLength()== 4))
-		OK = false;
-	node2 = node.getChildNodes().item(2);
-	if (! node2.getNodeName().equals("dBodyLevel23"))
-		OK = false;
-	
-// For debugging*****		println("All ChildNodeList method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The ChildNodeList method calls listed above failed, all others worked correctly.*****");		
-//	println("");
-}
-/**
- * This method tests Comment methods for the XML DOM implementation
- * version 1.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testComment(org.w3c.dom.Document document)
-{
-	Node node, node2;
-	boolean T = true;
-	boolean OK = true;
-// For debugging*****	println("\n          testComment's outputs:\n");
-	node = document.getDocumentElement().getElementsByTagName("dBodyLevel31").item(0).getFirstChild(); // node gets textNode11
-	node2 = node.cloneNode(T);
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(node.getNodeName().equals(node2.getNodeName()) && 		// Compares node names for equality
-	      (node.getNodeValue() != null && node2.getNodeValue() != null)     // Checks to make sure each node has a value node
-	    ?  node.getNodeValue().equals(node2.getNodeValue()) 		// If both have value nodes test those value nodes for equality
-	    : (node.getNodeValue() == null && node2.getNodeValue() == null)))	// If one node doesn't have a value node make sure both don't
-		//println("'cloneNode' did not clone the Comment node correctly");
-		OK = false;
-	// Deep clone test comparison is in testNode & testDocument
-	if (OK)
-// For debugging*****		println("All Comment method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The Comment method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests DeepNodeList methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testDeepNodeList(org.w3c.dom.Document document)
-{
-	
-	Node node, node2;
-	boolean OK = true;
-// For debugging*****	println("\n          testDeepNodeList's outputs:\n");
-	node = document.getLastChild().getLastChild(); // node gets docBody element
-	if (!(8 == ((Element) node).getElementsByTagName("*").getLength()))
-		{
-			System.out.println ("Warning!!! DeepNodeList's 'getLength' failed to work properly!");
-			OK = false;		
-		}
-	node2 = ((Element) node).getElementsByTagName("*").item(2); //This also runs through 'nextMatchingElementAfter"
-	if (! node2.getNodeName().equals("dBodyLevel32"))
-		{
-			System.out.println ("Warning!!! DeepNodeList's 'item' (or Element's 'getElementsBy TagName)failed to work properly!");
-			OK = false;		
-		}
-	node2 = document.getLastChild();
-	if (! ((Element) node2).getElementsByTagName("dTestBody").item(0).getNodeName().equals("dTestBody"))//This also runs through 'nextMatchingElementAfter"
-		{
-			System.out.println ("Warning!!! DeepNodeList's 'item' (or Element's 'getElementsBy TagName)failed to work properly!");
-			OK = false;		
-		}
-		
-	
-// For debugging*****		println("All DeepNodeList method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The DeepNodeList method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests Document methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- *
- **** ALL Document create methods are run in docBuilder except createAttribute which is in testAttribute**
- */
-public void testDocument(org.w3c.dom.Document document)
-{
-	DTest make = new DTest();
-	DocumentFragment docFragment, docFragment2;
-	Element newElement;
-	Node node, node2;
-	String[] elementNames =  {"dFirstElement", "dTestBody", "dBodyLevel21","dBodyLevel31","dBodyLevel32",
-				   "dBodyLevel22","dBodyLevel33","dBodyLevel34","dBodyLevel23","dBodyLevel24"};
-	String[] newElementNames = {"dFirstElement", "dTestBody", "dBodyLevel22","dBodyLevel33","dBodyLevel34","dBodyLevel23"};
-	boolean result;
-	boolean OK = true;
-// For debugging*****	println("\n          testDocument's outputs:\n ");
-	
-	DocumentType checkDocType =  make.createDocumentType(document,"testDocument1");
-	DocumentType docType = document.getDoctype();
-	if (! (checkDocType.getNodeName().equals(docType.getNodeName()) && 		// Compares node names for equality
-	      (checkDocType.getNodeValue() != null && docType.getNodeValue() != null)   // Checks to make sure each node has a value node
-	    ?  checkDocType.getNodeValue().equals(docType.getNodeValue()) 		// If both have value nodes test those value nodes for equality
-	    : (checkDocType.getNodeValue() == null && docType.getNodeValue() == null)))	// If one node doesn't have a value node make sure both don't
-	{
-		System.out.println("Warning!!! Document's 'getDocType method failed!" );
-		OK = false;
-	}
-		
-	Node rootElement = document.getLastChild();
-	if (! (rootElement.getNodeName().equals(document.getDocumentElement().getNodeName()) && 		// Compares node names for equality
-	      (rootElement.getNodeValue() != null && document.getDocumentElement().getNodeValue() != null)   // Checks to make sure each node has a value node
-	    ?  rootElement.getNodeValue().equals(document.getDocumentElement().getNodeValue()) 		// If both have value nodes test those value nodes for equality
-	    : (rootElement.getNodeValue() == null && document.getDocumentElement().getNodeValue() == null)))	// If one node doesn't have a value node make sure both don't
-	{
-		System.out.println("Warning!!! Document's 'getDocumentElement' method failed!" );
-		OK = false;
-	}
-	
-	NodeList docElements = document.getElementsByTagName("*");
-	int docSize = docElements.getLength();
-	int i;
-	for (i = 0; i < docSize; i++)
-	{
-		Node n = (Node) docElements.item(i);
-		if (! (elementNames[i].equals(n.getNodeName())))
-		{
-			System.out.println("Comparison of this document's elements failed at element number " + i + " : " + n.getNodeName());
-			OK = false;
-			break;
-		}
-	}
-	if (document.equals(document.getImplementation()))
-	{
-		System.out.println("Warning!!! Document's 'getImplementation' method failed!" );
-		OK = false;		
-	}
-		
-	newElement = document.createElement("NewElementTestsInsertBefore");
-	//	doc.insertBefore(newElement,null);//!! Throws a HIERARCHY_REQUEST_ERR	*******	
-	//	doc.removeChild(docElements.item(9));//!! Throws a NOT_FOUND_ERR  ********
-
-	docFragment = document.createDocumentFragment();
-	//Tests removeChild and stores removed branch for tree reconstruction
-	docFragment.appendChild(docElements.item(1).removeChild(docElements.item(9)));
-	docFragment2 = document.createDocumentFragment();
-	//Tests removeChild and stores removed branch for tree reconstruction
-	docFragment2.appendChild(docElements.item(1).removeChild(docElements.item(2)));
-	docSize = docElements.getLength();
-	for (i = 0; i < docSize; i++)
-	{
-		Node n = (Node) docElements.item(i);
-		if (! (newElementNames[i].equals(n.getNodeName())))
-		{
-			System.out.println("Comparison of new document's elements failed at element number " + i + " : " + n.getNodeName());
-			OK = false;
-			break;
-		}
-	}
-	docElements.item(1).insertBefore(docFragment, null); //Reattaches removed branch to restore tree to the original
-	docElements.item(1).insertBefore(docFragment2, docElements.item(2)); //Reattaches removed branch to restore tree to the original
-
-	//	println(docElements.item(2).getNodeName());
-
-	docSize = docElements.getLength();
-	for (i = 0; i < docSize; i++)
-	{
-		Node n = (Node) docElements.item(i);
-		if (! (elementNames[i].equals(n.getNodeName())))
-		{
-			System.out.println("Comparison of restored document's elements failed at element number " + i + " : " + n.getNodeName());
-			OK = false;
-			break;
-		}
-	}
-
-	DTest tests = new DTest();
-
-	
-//	Document z = tests.createDocument();
-//	tests.docBuilder(z, "z");
-
-//!! Throws WRONG_DOCUMENT_ERR **********
-//	OK &= Assertion.assert(tests.DOMExceptionsTest(z, "appendChild", new Class[]{Node.class}, new Object[]{doc.createComment("Test doc d comment")}, DOMException.HIERARCHY_REQUEST_ERR )); 
-		
-	//	z.appendChild(d.createComment("Test doc d comment"));// Tries to append z document with document d comment
-	//	d.getDocumentElement().appendChild(z.createElement("newZdocElement"));// Tries to append d document with document z Element
-	//	d.getLastChild().getLastChild().insertBefore(z.createElement("newZdocElement"),d.getLastChild().getLastChild().getFirstChild());// Tries to insert into d document with document z Element
-	//	d.replaceChild(z.createElement("newZdocElement"),d.getLastChild().getLastChild().getFirstChild());	// Tries to replace in d document with document z Element
-
-	//	doc.setNodeValue("This shouldn't work");//!! Throws a NO_MODIFICATION_ALLOWED_ERR ********
-	
-	node = document;
-	node2 = document.cloneNode(true);
-	result = treeCompare(node, node2); // Deep clone test comparison of document cloneNode
-	if (!result)
-	{
-		System.out.println("Warning!!! Deep clone of the document failed!");
-		OK = false;
-	}
-
-	// check on the ownerDocument of the cloned nodes
-	Document doc2 = (Document) node2;
-	Assertion.assert(doc2.getDocumentElement().getOwnerDocument() == doc2);
-
-	// Deep clone test comparison is also in testNode
-
-	// try adding a new element to the cloned document
-	node2 = doc2.createElement("foo");
-	doc2.getDocumentElement().appendChild(node2);
-	
-// For debugging*****		println("All Document method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The Document method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests DocumentFragment methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- *
- *
- ********This really isn't needed, only exists to throw NO_MODIFICATION_ALLOWED_ERR ********
- */
-public void testDocumentFragment(org.w3c.dom.Document document)
-{
-	boolean OK = true;
-// For debugging*****	println("\n          testDocumentFragment's outputs:\n");
-	DocumentFragment testDocFragment = document.createDocumentFragment();
-		
-	//	testDocFragment.setNodeValue("This is a document fragment!");//!! Throws a NO_MODIFICATION_ALLOWED_ERR ********
-	
-// For debugging*****		println("All DocumentFragment method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The DocumentFragment method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests DocumentType methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testDocumentType(org.w3c.dom.Document document)
-{
-	DTest test = new DTest();
-	DocumentType docType, holdDocType;
-	NamedNodeMap docEntityMap, docNotationMap;
-	Node node, node2;
-	String compare;
-	boolean OK = true;
-// For debugging*****	println("\n          testDocumentType's outputs:\n");
-	DocumentType newDocumentType =  test.createDocumentType(document, "TestDocument");
-	node = document.getFirstChild(); // node gets doc's docType node
-	node2 = node.cloneNode(true);
-	// Check nodes for equality, both their name and value or lack thereof
-	if (! (node.getNodeName().equals(node2.getNodeName()) && 	     // Compares node names for equality
-	      (node.getNodeValue() != null && node2.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ?  node.getNodeValue().equals(node2.getNodeValue()) 	     // If both have value nodes test those value nodes for equality
-	    : (node.getNodeValue() == null && node2.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-	{	
-		System.out.println("'cloneNode' did not clone the DocumentType node correctly");
-		OK = false;
-	}
-	 // Deep clone test comparison is in testNode & testDocument
-
-	docType = (DocumentType) document.getFirstChild();
-	compare = "ourEntityNode";
-	docEntityMap = docType.getEntities();
-	if (! compare.equals(docEntityMap.item(0).getNodeName()))
-	{
-		System.out.println("Warning!!! DocumentType's 'getEntities' failed!" );
-		OK = false;
-	}
-	docNotationMap = docType.getNotations();
-	compare = "ourNotationNode";
-	if (! compare.equals(docNotationMap.item(0).getNodeName()))
-	{
-		System.out.println("Warning!!! DocumentType's 'getNotations' failed!");
-		OK = false;
-	}
-	//	doc.appendChild(newDocumentTypeImpl);//!! Throws a HIERARCHY_REQUEST_ERR	*******	
-	holdDocType = (DocumentType) document.removeChild(document.getFirstChild()); //Tests removeChild and stores removed branch for tree reconstruction
-	document.insertBefore(newDocumentType, document.getDocumentElement());
-	//** Other aspects of insertBefore are tested in docBuilder through appendChild*
-
-	document.removeChild(document.getFirstChild()); //Removes newDocumentType for tree restoral
-	document.insertBefore(holdDocType, document.getFirstChild()); //Reattaches removed branch to restore tree to the original
-
-	
-// For debugging*****		println("All DocumentType method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The DocumentType method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * @author Philip W. Davis
- * @param document org.w3c.dom.Document
- */
-public void testDOMerrors(Document document) {
-
-	boolean OK = true;
-
-	DTest tests = new DTest();
-
-	OK &= Assertion.assert(tests.DOMExceptionsTest(document, "appendChild", new Class[]{Node.class}, new Object[]{testElementNode}, DOMException.HIERARCHY_REQUEST_ERR )); 
-	OK &= Assertion.assert(tests.DOMExceptionsTest(testTextNode, "appendChild", new Class[]{Node.class}, new Object[]{testTextNode}, DOMException.HIERARCHY_REQUEST_ERR )); 
-//	OK &= Assertion.assert(tests.DOMExceptionsTest(document, "insertBefore", new Class[]{Node.class, Node.class}, new Object[]{document.getElementsByTagName("docEntity").item(0), document.getElementsByTagName("docFirstElement").item(0)}, DOMException.HIERARCHY_REQUEST_ERR )); 
-//	OK &= Assertion.assert(tests.DOMExceptionsTest(document, "replaceChild", new Class[]{Node.class, Node.class}, new Object[]{document.getElementsByTagName("docCDATASection").item(0), document.getElementsByTagName("docFirstElement").item(0)}, DOMException.HIERARCHY_REQUEST_ERR )); 
-
-//	OK &= Assertion.assert(tests.DOMExceptionsTest(document.getElementsByTagName("docFirstElement").item(0), "setNodeValue", new Class[]{String.class}, new Object[]{"This shouldn't work!" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));	
-/*	OK &= Assertion.assert(tests.DOMExceptionsTest(docReferenceEntity, "setNodeValue", new Class[]{String.class}, new Object[]{"This shouldn't work!" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docEntity, "setNodeValue", new Class[]{String.class}, new Object[]{"This shouldn't work!" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(document, "setNodeValue", new Class[]{String.class}, new Object[]{"This shouldn't work!" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docDocType, "setNodeValue", new Class[]{String.class}, new Object[]{"This shouldn't work!" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docDocFragment, "setNodeValue", new Class[]{String.class}, new Object[]{"This shouldn't work!" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docNotation, "setNodeValue", new Class[]{String.class}, new Object[]{"This shouldn't work!" }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docReferenceEntity, "appendChild", new Class[]{Node.class}, new Object[]{entityReferenceText2 }, DOMException.NO_MODIFICATION_ALLOWED_ERR ));
-
-
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docBodyLevel32, "insertBefore", new Class[]{Node.class, Node.class}, new Object[]{docTextNode11,docBody }, DOMException.NOT_FOUND_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docBodyLevel32, "removeChild", new Class[]{Node.class}, new Object[]{docFirstElement}, DOMException.NOT_FOUND_ERR ));
-	OK &= Assertion.assert(tests.DOMExceptionsTest(docBodyLevel32, "replaceChild", new Class[]{Node.class, Node.class}, new Object[]{docTextNode11,docFirstElement }, DOMException.NOT_FOUND_ERR ));
-*/
-
-//!! Throws a NOT_FOUND_ERR	********
-	 
-	 //	docBodyLevel32.getAttributes().removeNamedItem(testAttribute.getName()); 	16  // To test removeNamedItem
-	 
-
-
-
-
-
-
-
-
-
-
-
-	
-}
-/**
- * This method tests DOMImplementation methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testDOMImplementation(org.w3c.dom.Document document)
-{
-	
-	DOMImplementation implementation;
-	boolean result = false;
-	boolean OK = true;
-// For debugging*****	println("\n          testDOMImplementation's outputs:\n");
-	implementation = document.getImplementation(); //Uses getDOMImplementation to obtain implementation	
-
-	result = implementation.hasFeature("XML", "1.0");
-	if(!result)
-	{
-		System.out.println("Warning!!! DOMImplementation's 'hasFeature' that should be 'true' failed!");
-		OK = false;
-	}
-	
-	result = implementation.hasFeature("HTML", "4.0");
-	if(result)
-	{
-		System.out.println("Warning!!! DOMImplementation's 'hasFeature' that should be 'false' failed!");
-		OK = false;
-	}
-	
-	
-// For debugging*****		println("All DOMImplementation method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The DOMImplementation method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests Element methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testElement(org.w3c.dom.Document document)
-{
-	Attr attributeNode, newAttributeNode;
-	Element element, element2;
-	Node node, node2;
-	String attribute, compare;
-	String[] attributeCompare = {"AnotherFirstElementAttribute", "dFirstElement", "testAttribute"};
-	String[] elementNames =  {"dFirstElement", "dTestBody", "dBodyLevel21","dBodyLevel31","dBodyLevel32",
-				   "dBodyLevel22","dBodyLevel33","dBodyLevel34","dBodyLevel23","dBodyLevel24"};
-	String[] textCompare = {"dBodyLevel31'sChildTextNode11", "dBodyLevel31'sChildTextNode12", "dBodyLevel31'sChildTextNode13"};
-	NamedNodeMap nodeMap;
-	boolean OK = true;
-// For debugging*****	println("\n          testElement's outputs:\n");
-	node = document.getDocumentElement(); // node gets doc's firstElement
-	node2 = node.cloneNode(true);
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(node.getNodeName().equals(node2.getNodeName()) &&		    // Compares node names for equality
-	     (node.getNodeValue() != null && node2.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ? node.getNodeValue().equals(node2.getNodeValue())  	    // If both have value nodes test those value nodes for equality
-	    :(node.getNodeValue() == null && node2.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-	{	
-		System.out.println("'cloneNode' did not clone the Element node correctly");
-		OK = false;
-	}
-	// Deep clone test comparison is in testNode & testDocument
-
-	element = document.getDocumentElement(); // element gets doc's firstElement
-	compare = "";
-	attribute = element.getAttribute(document + "'s test attribute");
-	if (! compare.equals(element.getAttribute(document + "'s test attribute")))
-	{
-		System.out.println("Warning!!! Element's 'getAttribute' failed!");
-		OK = false;
-	}
-	
-	attributeNode = element.getAttributeNode(document + "FirstElement");
-	if(! (attributeNode == null))
-	{
-		System.out.println("Warning!!! Element's 'getAttributeNode' failed! It should have returned 'null' here!");
-		OK = false;
-	}
-	
-	newAttributeNode = document.createAttribute("AnotherFirstElementAttribute");
-	newAttributeNode.setValue("A new attribute which helps test calls in Element");
-	element.setAttributeNode(newAttributeNode);
-	nodeMap = element.getAttributes();
-	int size = nodeMap.getLength();
-	int k;
-	for (k = 0; k < size; k++)
-	{
-		Node n = (Node) nodeMap.item(k);
-		if (! (attributeCompare[k].equals(n.getNodeName())))
-		{
-			System.out.println("Warning!!! Comparison of firstElement's attributes failed at attribute #"+ (k+1) +" " + n.getNodeValue());
-			System.out.println("This failure can be a result of Element's 'setValue' and/or 'setAttributeNode' and/or 'getAttributes' failing.");
-			OK = false;
-			break;
-		}
-	//	println("firstElement's attribute number " + k + " : " + n.getNodeName());
-	}
-	NodeList docElements = document.getElementsByTagName("*");
-	int docSize = docElements.getLength();
-	int i;
-	for (i = 0; i < docSize; i++)
-	{
-		Node n = (Node) docElements.item(i);
-		if (! (elementNames[i].equals(n.getNodeName())))
-		{
-			System.out.println("Warning!!! Comparison of Element's 'getElementsByTagName' and/or 'item' failed at element number " 
-						+ i + " : " + n.getNodeName());
-			OK = false;
-			break;
-		}		
-	//	println("docElement's number " + i + " is: " + n.getNodeName());
-	}
-	element = (Element) document.getElementsByTagName("dBodyLevel21").item(0); // element gets Element test BodyLevel21 
-	element2 = (Element) document.getElementsByTagName("dBodyLevel31").item(0); // element2 gets Element test BodyLevel31 
-	NodeList text = ((Node) element2).getChildNodes();
-	int textSize = text.getLength();
-	int j;
-	for (j = 0; j < textSize; j++)
-	{
-		Node n = (Node) text.item(j);
-		if (! (textCompare[j].equals(n.getNodeValue())))
-		{
-			System.out.println("Warning!!! Comparison of original text nodes via Node 'getChildNodes' & NodeList 'item'"
-						+ "failed at text node: #" + j +" " + n.getNodeValue());
-			OK = false;
-			break;
-		}
-	//	println("Element testBodyLevel31's child text node " + j + " is: " + n.getNodeValue());
-	}
-	element = document.getDocumentElement(); // element gets doc's firstElement
-	element.normalize();		// Concatenates all adjacent text nodes in this element's subtree
-	NodeList text2 = ((Node) element2).getChildNodes();
-	compare = "dBodyLevel31'sChildTextNode11dBodyLevel31'sChildTextNode12dBodyLevel31'sChildTextNode13";
-	Node n = (Node) text2.item(0);
-		if (! (compare.equals(n.getNodeValue())))
-		{
-			System.out.println("Warning!!! Comparison of concatenated text nodes created by Element's 'normalize' failed!");
-			OK = false;
-		}
-	
-	element.setAttribute("FirstElementLastAttribute", "More attribute stuff for firstElement!!");
-	element.removeAttribute("FirstElementLastAttribute");
-	element.removeAttributeNode(newAttributeNode);
-
-	//	doc.getLastChild().setNodeValue("This shouldn't work");//!! Throws a NO_MODIFICATION_ALLOWED_ERR***
-	
-// For debugging*****		println("All Element method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The Element method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests Entity methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testEntity(org.w3c.dom.Document document)
-{
-	Entity entity;
-	Node node, node2;
-	boolean OK = true;
-	String compare;
-// For debugging*****	println("\n          testEntity's outputs:\n");
-	entity = (Entity) document.getDoctype().getEntities().getNamedItem("ourEntityNode");
-	node = entity;
-	node2 = entity.cloneNode(true);
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(node.getNodeName().equals(node2.getNodeName()) && 		// Compares node names for equality
-	     (node.getNodeValue() != null && node2.getNodeValue() != null) ?    // Checks to make sure each node has a value node
-	      node.getNodeValue().equals(node2.getNodeValue()) :		// If both have value nodes test those value nodes for equality
-	     (node.getNodeValue() == null && node2.getNodeValue() == null)))	// If one node doesn't have a value node make sure both don't
-	{	
-		System.out.println("Warning!!! 'cloneNode' did not clone the Entity node correctly");
-		OK = false;
-	}
-	// Deep clone test comparison is in testNode & testDocument
-
- 	((org.apache.xerces.dom.EntityImpl) entity).setNotationName("testNotationName");
-	compare = "testNotationName";
- 	if(! compare.equals(entity.getNotationName()))
-	{
-		System.out.println("Warning!!! Entity's 'setNotationName' and/or getNotationName' failed!");
-		OK = false;
-	}
- 	((org.apache.xerces.dom.EntityImpl) entity).setPublicId("testPublicId");
-	compare = "testPublicId";
- 	if(! compare.equals(entity.getPublicId()))
-	{
-		System.out.println("Warning!!! Entity's 'setPublicId' and/or getPublicId' failed!");
-		OK = false;
-	}	
- 	((org.apache.xerces.dom.EntityImpl) entity).setSystemId("testSystemId");
-	compare = "testSystemId";
- 	if(! compare.equals(entity.getSystemId()))
-	{
-		System.out.println("Warning!!! Entity's 'setSystemId' and/or getSystemId' failed!");
-		OK = false;
-	}		
-	//	entity.setNodeValue("This shouldn't work");//!! Throws a NO_MODIFICATION_ALLOWED_ERR ********
-	
-// For debugging*****		println("All Entity method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The Entity method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests EntityReference methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testEntityReference(org.w3c.dom.Document document)
-{
-	EntityReference entityReference;
-	Node node, node2;
-	boolean OK = true;
-// For debugging*****	println("\n          testEntityReference's outputs:\n");
-	entityReference = (EntityReference) document.getLastChild().getLastChild().getLastChild().getFirstChild();
-	node = entityReference;
-	node2 = node.cloneNode(true);
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(node.getNodeName().equals(node2.getNodeName()) && 	    // Compares node names for equality
-	     (node.getNodeValue() != null && node2.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ? node.getNodeValue().equals(node2.getNodeValue()) 		    // If both have value nodes test those value nodes for equality
-	    :(node.getNodeValue() == null && node2.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-	{	
-		System.out.println("'cloneNode' did not clone the EntityReference node correctly");
-		OK = false;
-	}
-	// Deep clone test comparison is in testNode & testDocument
-
-	//	entityReference.setNodeValue("This shouldn't work");//!! Throws a NO_MODIFICATION_ALLOWED_ERR ********
-	
-// For debugging*****		println("All EntityReference method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The EntityReference method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests Node methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- *
- *
- ********* This is only for a test of cloneNode "deep"*******
- ********* And for error tests*********
- */
-public void testNode(org.w3c.dom.Document document)
-{
-	Node node, node2;
-	boolean result;
-	boolean OK = true;
-// For debugging*****	println("\n          testNode's outputs:\n");
-	node = document.getDocumentElement();
-	node2 = node.cloneNode(true);
-	result = treeCompare(node, node2); // Deep clone test of cloneNode
-	if (result)
-	{
-		//println("'cloneNode' successfully cloned this whole node tree (deep)!");
-	}
-	else
-	{
-		System.out.println("'cloneNode' did not successfully clone this whole node tree (deep)!");
-		OK = false;	
-	}
-	//!! The following gives a did not clone successfully message*********
-	node = document.getDocumentElement();
-	node2 = node.getFirstChild();
-	result = treeCompare(node, node2);
-	if (!result)
-	{
-		//println("'cloneNode' did not successfully clone this whole node tree (deep)!");
-	}
-	else
-	{
-		System.out.println("'cloneNode' was supposed to fail here, either it or 'treeCompare' failed!!!");
-		OK = false;
-	}
-	// Deep clone test also in testDocument
-	
-// For debugging*****		println("All Node method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The Node method calls listed above failed, all others worked correctly.*****");	
-//	println("");
-}
-/**
- * This method tests Notation methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testNotation(org.w3c.dom.Document document)
-{
-	Node node, node2;
-	Notation notation;
-	boolean OK = true;
-	String compare;
-// For debugging*****	println("\n          testNotation's outputs:\n");
-	notation = (Notation) document.getDoctype().getNotations().getNamedItem("ourNotationNode");
-	node = notation;
-	node2 = notation.cloneNode(true);//*****?
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(node.getNodeName().equals(node2.getNodeName()) && 	    // Compares node names for equality
-	     (node.getNodeValue() != null && node2.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ? node.getNodeValue().equals(node2.getNodeValue()) 		    // If both have value nodes test those value nodes for equality
-	    :(node.getNodeValue() == null && node2.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-	{	
-		System.out.println("'cloneNode' did not clone the Notation node correctly");
-		OK = false;
-	}
-	// Deep clone test comparison is in testNode & testDocument
-
- 	((org.apache.xerces.dom.NotationImpl) notation).setPublicId("testPublicId");//*****?
-	compare = "testPublicId";
-	if (!compare.equals(notation.getPublicId()))
-	{
-		System.out.println("Warning!!! Notation's 'getPublicId' failed!");
-		OK = false;
-	}
- 	((org.apache.xerces.dom.NotationImpl) notation).setSystemId("testSystemId");//*****?
-	compare = "testSystemId";
-	if (! compare.equals(notation.getSystemId()))
-	{
-		System.out.println("Warning!!! Notation's 'getSystemId' failed!");
-		OK = false;
-	}
-	//	notation.setNodeValue("This shouldn't work");//!! Throws a NO_MODIFICATION_ALLOWED_ERR ********
-	
-// For debugging*****		println("All Notation method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The Notation method calls listed above failed, all others worked correctly.*****");
-//	println("");
-}
-/**
- * This method tests ProcessingInstruction methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testPI(org.w3c.dom.Document document)
-{
-	Node node, node2;
-	ProcessingInstruction pI, pI2;
-	String compare;
-	boolean OK = true;
-// For debugging*****	println("\n          testPI's outputs:\n");
-	pI = (ProcessingInstruction) document.getDocumentElement().getFirstChild();// Get doc's ProcessingInstruction
-	pI2 = (org.apache.xerces.dom.ProcessingInstructionImpl) pI.cloneNode(true);//*****?
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(pI.getNodeName().equals(pI2.getNodeName()) && 		// Compares node names for equality
-	     (pI.getNodeValue() != null && pI2.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ? pI.getNodeValue().equals(pI2.getNodeValue()) 		// If both have value nodes test those value nodes for equality
-	    :(pI.getNodeValue() == null && pI2.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-	{	
-		System.out.println("'cloneNode' did not clone the Entity node correctly");
-		OK = false;
-	}
-	// Deep clone test comparison is in testNode & testDocument
-	compare = "This is [#document: null]'s processing instruction";
-	if (! compare.equals(pI.getData()))
-	{
-		System.out.println("Warning!!! PI's 'getData' failed!");
-		OK = false;
-	}
-	
-	pI.setData("PI's reset data");
-	compare = "PI's reset data";
-	if (! compare.equals(pI.getData()))
-	{
-		System.out.println("Warning!!! PI's 'setData' failed!");
-		OK = false;
-	}	
-	compare = "dTargetProcessorChannel";
-	if (! compare.equals(pI.getTarget()))
-	{
-		System.out.println("Warning!!! PI's 'getTarget' failed!");
-		OK = false;
-	}	
-	
-// For debugging*****		println("All PI method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The PI method calls listed above failed, all others worked correctly.*****");
-	
-//	println("");
-}
-/**
- * This method tests Text methods for the XML DOM implementation
- * version 2.0 10/12/98
- * @param document org.w3c.dom.Document
- *
- * @author Philip W. Davis
- */
-public void testText(org.w3c.dom.Document document)
-{
-	Node node, node2;
-	Text text;
-	String compare;
-	boolean OK = true;
-// For debugging*****	println("\n          testText's outputs:\n");
-	node = document.getDocumentElement().getElementsByTagName("dBodyLevel31").item(0).getFirstChild(); // charData gets textNode11
-	text = (Text) node;
-	node2 = node.cloneNode(true);//*****?
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(node.getNodeName().equals(node2.getNodeName()) && 	    // Compares node names for equality
-	     (node.getNodeValue() != null && node2.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ? node.getNodeValue().equals(node2.getNodeValue()) 		    // If both have value nodes test those value nodes for equality
-	    :(node.getNodeValue() == null && node2.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-	{	
-		System.out.println("'cloneNode' did not clone the Text node correctly");
-		OK = false;
-	}
-	// Deep clone test comparison is in testNode & testDocument
-	text.splitText(25);
-	compare = "dBodyLevel31'sChildTextNo";	// Three original text nodes were concatenated by 'normalize' in testElement
-	if (! compare.equals(text.getNodeValue()))
-		{
-			System.out.println("First part of Text's split text failed!" );
-			OK = false;
-		}
-	compare = "de11dBodyLevel31'sChildTextNode12dBodyLevel31'sChildTextNode13";// Three original text nodes were concatenated by 'normalize' in testElement
-	if (! compare.equals(text.getNextSibling().getNodeValue()))
-		{
-			System.out.println("The second part of Text's split text failed!") ;
-			OK = false;	
-		}
-
-
-
-
-//************************************************* ERROR TESTS
-	DTest tests = new DTest();		
-	//!! Throws INDEX_SIZE_ERR ********************
-	//	text.splitText(-1);
-	//	text.splitText(100);
-	
-// For debugging*****		println("All Text method calls worked correctly.");
-	if (!OK)
-		System.out.println("\n*****The Text method calls listed above failed, all others worked correctly.*****");
-	
-//	println("");
-}
-/**
- * 
- * @param node org.w3c.dom.Node
- * @param node2 org.w3c.dom.Node
- *
- * @author Philip W. Davis
- */
-public boolean treeCompare(Node node, Node node2)
-{
-	boolean answer = true;
-		
-	Node kid, kid2;			// Check the subtree for equality
-	kid = node.getFirstChild();
-	kid2 = node2.getFirstChild();
-	if (kid != null && kid2 != null)
-	{
-		answer = treeCompare(kid, kid2);
-		if (!answer)
-			return answer;
-		else
-			if (kid.getNextSibling() != null && kid2.getNextSibling() != null)
-			{
-				while (kid.getNextSibling() != null && kid2.getNextSibling() != null)
-				{
-					answer = treeCompare(kid.getNextSibling(), kid2.getNextSibling());
-					if (!answer)
-						return answer;
-					else
-					{
-						kid = kid.getNextSibling();
-						kid2 = kid2.getNextSibling();
-					}
-				}
-			} else
-				if (!(kid.getNextSibling() == null && kid2.getNextSibling() == null))
-				{
-					return false;
-				}
-	} else
-		if (kid != kid2)
-		{
-			return false;
-		}
-
-	// Check nodes for equality, both their name and value or lack thereof
-	if (!(node.getNodeName().equals(node2.getNodeName()) &&		    // Compares node names for equality
-	     (node.getNodeValue() != null && node2.getNodeValue() != null)  // Checks to make sure each node has a value node
-	    ? node.getNodeValue().equals(node2.getNodeValue()) 		    // If both have value nodes test those value nodes for equality
-	    :(node.getNodeValue() == null && node2.getNodeValue() == null)))// If one node doesn't have a value node make sure both don't
-	{
-		return false;	// Return false if "any" of the above conditions are false
-	}
-	return answer;
-}
-}
diff --git a/tests/dom/events/EventReporter.java b/tests/dom/events/EventReporter.java
deleted file mode 100644
index c04b838..0000000
--- a/tests/dom/events/EventReporter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- * 
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- * 
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache\@apache.org.
- * 
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- * 
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation, and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com .  For more information
- * on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom.events;
-
-import org.w3c.dom.*;
-import org.w3c.dom.events.*;
-
-class EventReporter implements EventListener
-{
-    boolean silent=false; // Toggle this to mask reports you don't care about
-    int count=0;
-    String[] phasename={"?","BUBBLING","CAPTURING","AT_TARGET","?"};
-    
-    public void on()
-    {
-        System.out.println("\nEventReporter awakened:\n");
-        silent=false;
-    }
-    public void off()
-    {
-        System.out.println("\nEventReporter muted\n");
-        silent=true;
-    }
-    
-    public void handleEvent(Event evt)
-    {
-        ++count;
-        if(silent)
-            return;
-            
-        System.out.print("EVT "+count+": '"+
-            evt.getType()+
-            "' listener '"+((Node)evt.getCurrentTarget()).getNodeName()+
-            "' target '"+((Node)evt.getTarget()).getNodeName()+
-            "' while "+phasename[evt.getEventPhase()] +
-            "... ");
-        if(evt.getBubbles()) System.out.print("will bubble");
-        if(evt.getCancelable()) System.out.print("can cancel");
-        System.out.print("\n");
-        if(evt instanceof MutationEvent)
-        {
-            MutationEvent me=(MutationEvent)evt;
-            System.out.print("\t");
-            if(me.getRelatedNode()!=null)
-                System.out.print(" relatedNode='"+me.getRelatedNode()+"'");
-            if(me.getAttrName()!=null)
-                System.out.print(" attrName='"+me.getAttrName()+"'");
-            System.out.print("\n");
-            if(me.getPrevValue()!=null)
-                System.out.println("\t prevValue='"+me.getPrevValue()+"'");
-            if(me.getNewValue()!=null)
-                System.out.println("\t newValue='"+me.getNewValue()+"'");
-        }
-    }
-}
diff --git a/tests/dom/events/Test.java b/tests/dom/events/Test.java
deleted file mode 100644
index 5edfe37..0000000
--- a/tests/dom/events/Test.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- * 
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- * 
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache\@apache.org.
- * 
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- * 
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation, and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com .  For more information
- * on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom.events;
-
-import org.w3c.dom.*;
-import org.w3c.dom.events.*;
-
-public class Test
-{
-    EventReporter sharedReporter=new EventReporter();
-    
-    public static void main(String[] args)
-    {
-        Test met=new Test();
-        met.runTest();
-    }
-
-    void runTest()
-    {
-        Document doc=new org.apache.xerces.dom.DocumentImpl();
-        reportAllMutations(doc);
-        
-        Element root=addNoisyElement(doc,doc,0);
-        Element e=null;
-        int i;
-        
-        // Individual nodes
-        e=addNoisyElement(doc,root,0);
-        Attr a=addNoisyAttr(doc,e,0);
-        a.setNodeValue("Updated A0 of E0, prepare to be acidulated.");
-        NamedNodeMap nnm=e.getAttributes();
-        nnm.removeNamedItem(a.getName());
-        nnm.setNamedItem(a);
-        
-        // InsertedInto/RemovedFrom tests.
-        // ***** These do not currently cross the Attr/Element barrier.
-        // DOM spec is pretty clear on that, but this may not be the intent.
-        System.out.println("\nAdd/remove a preconstructed tree; tests AddedToDocument\n");
-        sharedReporter.off();
-        Element lateAdd=doc.createElement("lateAdd");
-        reportAllMutations(lateAdd);
-        e=lateAdd;
-        for(i=0;i<2;++i)
-        {
-            e=addNoisyElement(doc,e,i);
-            addNoisyAttr(doc,e,i);
-        }
-        sharedReporter.on();
-        root.appendChild(lateAdd);
-        root.removeChild(lateAdd);
-
-        System.out.println("\nReplace a preconstructed tree; tests AddedToDocument\n");
-
-        sharedReporter.off();
-        Node e0=root.replaceChild(lateAdd,root.getFirstChild());
-        sharedReporter.on();
-        root.replaceChild(e0,lateAdd);
-        
-
-        System.out.println("Done");
-    }
-    
-    Element addNoisyElement(Document doc,Node parent,int index)
-    {
-        String nodeName="Root";
-        if(parent!=doc)
-            nodeName=parent.getNodeName()+"_E"+index;
-        Element e=doc.createElement(nodeName);
-        reportAllMutations(e);
-        parent.appendChild(e);
-        return e;
-    }
-
-    Attr addNoisyAttr(Document doc,Element parent,int index)
-    {
-        String attrName=parent.getNodeName()+"_A"+index;
-        Attr a=doc.createAttribute(attrName);
-        reportAllMutations(a);
-        a.setNodeValue("Initialized A"+index+" of "+parent.getNodeName());
-        parent.setAttributeNode(a);
-        return a;
-    }
-    
-    void reportAllMutations(Node n)
-    {
-        String[] evtNames={
-            "DOMSubtreeModified","DOMAttrModified","DOMCharacterDataModified",
-            "DOMNodeInserted","DOMNodeRemoved",
-            "DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument",
-            };
-            
-        EventTarget t=(EventTarget)n;
-        
-        for(int i=evtNames.length-1;
-            i>=0;
-            --i)
-        {
-            t.addEventListener(evtNames[i], sharedReporter, true);
-            t.addEventListener(evtNames[i], sharedReporter, false);
-        }
-
-    }
-}
diff --git a/tests/dom/mem/Test.java b/tests/dom/mem/Test.java
deleted file mode 100644
index 0402577..0000000
--- a/tests/dom/mem/Test.java
+++ /dev/null
@@ -1,1332 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- * 
- * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights 
- * reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- * 
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache\@apache.org.
- * 
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- * 
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation, and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com .  For more information
- * on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-//
-//  Various DOM tests.
-//     Contents include
-//       1.  Basic functionality for DOMString
-//       2.  Regression tests for bugs fixed.
-//     All individual are wrapped in a memory leak checker.
-//
-//     This is NOT a complete test of DOM functionality.
-//
-
-package dom.mem;
-import org.w3c.dom.*;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.dom.DOMImplementationImpl;
-import org.apache.xerces.dom.NotationImpl;
-import java.lang.reflect.*;
-import dom.util.Assertion;
-
-import org.apache.xerces.dom3.UserDataHandler;
-import org.apache.xerces.dom3.Node3;
-
-
-public class Test {
-
-    /**
-     * version 3.0 01/25/99
-     * 
-     * @return boolean
-     * @param node java.lang.Object
-     * @param mNameIndex int
-     * @param signatureIndex int
-     * @param parameters java.lang.Object[]
-     * @param code short
-     *
-     * @author Philip W. Davis
-     */
-    public static boolean DOMExceptionsTest(Object node,
-					    String methodName,
-					    Class[] methodSignature,
-					    Object[] parameters,
-					    short code)
-    {
-	boolean asExpected = false;
-	Method method;
-
-	try {
-	    method = node.getClass().getMethod(methodName,methodSignature);
-	    method.invoke(node, parameters);
-	} catch(InvocationTargetException exc) {
-	    Throwable realE = exc.getTargetException(); 
-	    if(realE instanceof DOMException) {
-		asExpected = (((DOMException)realE).code== code);
-		if(!asExpected)
-		    System.out.println("Wrong DOMException(" +
-				       ((DOMException)realE).code + ")");
-	    } else {
-		System.out.println("Wrong Exception (" + code + ")");
-	    }
-	    if(!asExpected) {
-		System.out.println("Expected DOMException (" +
-				   code + ") not thrown");
-	    }
-	} catch(Exception exc) {
-	    System.out.println("test invocation failure (" + exc + ")");
-	}
-	return (asExpected);
-    }
-
-    public static void main(String argv[])
-    {
-    System.out.print("DOM Memory Test.\n");
-
-    //
-    //  Test Doc01      Create a new empty document
-    //
-    {
-        Document    doc;
-        doc = new DocumentImpl();
-    }
-    
-
-    //
-    //  Test Doc02      Create one of each kind of node using the
-    //                  document createXXX methods.
-    //                  Watch for memory leaks.
-    //
-    {
-        //  Do all operations in a preconditioning step, to force the
-        //  creation of implementation objects that are set up on first use.
-        //  Don't watch for leaks in this block (no  / )
-        Document doc = new DocumentImpl();
-        Element     el = doc.createElement("Doc02Element");
-        DocumentFragment frag = doc.createDocumentFragment ();
-        Text  text = doc.createTextNode("Doc02TextNode");
-        Comment comment = doc.createComment("Doc02Comment");
-        CDATASection  cdataSec = doc.createCDATASection("Doc02CDataSection");
-        DocumentType  docType = doc.getImplementation().createDocumentType("Doc02DocumentType", null, null);
-        Notation notation = ((DocumentImpl) doc).createNotation("Doc02Notation");
-        ProcessingInstruction pi = doc.createProcessingInstruction("Doc02PITarget",
-                                    "Doc02PIData");
-        NodeList    nodeList = doc.getElementsByTagName("*");
-    }
-
-
-    
-    {
-        Document doc = new DocumentImpl();
-        Element     el = doc.createElement("Doc02Element");
-    }
-    
-
-    
-    {
-        Document    doc = new DocumentImpl();
-        DocumentFragment frag = doc.createDocumentFragment ();
-    };
-    
-
-
-    
-    {
-        Document doc = new DocumentImpl();
-        Element     el = doc.createElement("Doc02Element");
-    }
-    
-
-    
-    {
-        Document doc = new DocumentImpl();
-        Text  text = doc.createTextNode("Doc02TextNode");
-    }
-    
-
-    
-    {
-        Document doc = new DocumentImpl();
-        Comment comment = doc.createComment("Doc02Comment");
-    }
-    
-
-    
-    {
-        Document doc = new DocumentImpl();
-        CDATASection  cdataSec = doc.createCDATASection("Doc02CDataSection");
-    }
-    
-
-
-    
-    {
-        Document doc = new DocumentImpl();
-        DocumentType  docType = doc.getImplementation().createDocumentType("Doc02DocumentType", null, null);
-    }
-    
-
-
-    
-    {
-        Document doc = new DocumentImpl();
-        Notation notation = ((DocumentImpl)doc).createNotation("Doc02Notation");
-    }
-    
-
-
-    
-    {
-        Document doc = new DocumentImpl();
-        ProcessingInstruction pi = doc.createProcessingInstruction("Doc02PITarget",
-                                    "Doc02PIData");
-    }
-    
-
-    
-    {
-        Document doc = new DocumentImpl();
-        Attr  attribute = doc.createAttribute("Doc02Attribute");
-    }
-    
-
-
-    
-    {
-        Document doc = new DocumentImpl();
-        EntityReference  er = doc.createEntityReference("Doc02EntityReference");
-    }
-    
-
-    
-    {
-        Document doc = new DocumentImpl();
-        NodeList    nodeList = doc.getElementsByTagName("*");
-    }
-    
-
-    
-    //
-    //  Doc03 - Create a small document tree
-    //
-    
-    {
-        Document    doc = new DocumentImpl();
-        Element     rootEl = doc.createElement("Doc03RootElement");
-        doc.appendChild(rootEl);
-
-        Text        textNode = doc.createTextNode("Doc03 text stuff");
-        Assertion.assert(rootEl.getFirstChild() == null);
-        Assertion.assert(rootEl.getLastChild() == null);
-        rootEl.appendChild(textNode);
-        Assertion.assert(rootEl.getFirstChild() == textNode);
-        Assertion.assert(rootEl.getLastChild() == textNode);
-
-        Assertion.assert(textNode.getNextSibling() == null);
-        Assertion.assert(textNode.getPreviousSibling() == null);
-        Text        textNode2 = doc.createTextNode("Doc03 text stuff");
-        rootEl.appendChild(textNode2);
-        Assertion.assert(textNode.getNextSibling() == textNode2);
-        Assertion.assert(textNode2.getNextSibling() == null);
-        Assertion.assert(textNode.getPreviousSibling() == null);
-        Assertion.assert(textNode2.getPreviousSibling() == textNode);
-
-        Assertion.assert(rootEl.getFirstChild() == textNode);
-        Assertion.assert(rootEl.getLastChild() == textNode2);
-
-        NodeList    nodeList = doc.getElementsByTagName("*");
-    };
-    
-
-
-    //
-    //  Attr01
-    //
-    {
-        Document    doc = new DocumentImpl();
-        Element     rootEl  = doc.createElement("RootElement");
-        doc.appendChild(rootEl);
-        {
-            Attr        attr01  = doc.createAttribute("Attr01");
-            rootEl.setAttributeNode(attr01);
-        }
-        
-        
-        {
-            Attr attr02 = doc.createAttribute("Attr01");
-            rootEl.setAttributeNode(attr02);  
-        }
-        
-    };
-
-    //
-    //  Attr02
-    //
-    
-    {
-        Document    doc = new DocumentImpl();
-        Element     rootEl  = doc.createElement("RootElement");
-        doc.appendChild(rootEl);
-        Attr        attr01  = doc.createAttribute("Attr02");
-        rootEl.setAttributeNode(attr01);
-        Attr        attr02 = doc.createAttribute("Attr02");
-        rootEl.setAttributeNode(attr02);  
-    }
-    
-
-
-    //
-    //  Attr03
-    //
-    
-    {
-        Document    doc = new DocumentImpl();
-        Element     rootEl  = doc.createElement("RootElement");
-        doc.appendChild(rootEl);
-        Attr        attr01  = doc.createAttribute("Attr03");
-        rootEl.setAttributeNode(attr01);
-
-        attr01.setValue("Attr03Value1");
-        attr01.setValue("Attr03Value2");
-    }
-    
-
-
-
-    //
-    //  Text01
-    //
-    
-    {
-        Document    doc = new DocumentImpl();
-        Element     rootEl  = doc.createElement("RootElement");
-        doc.appendChild(rootEl);
-
-
-        Text        txt1 = doc.createTextNode("Hello Goodbye");
-        rootEl.appendChild(txt1);
-
-        txt1.splitText(6);
-        rootEl.normalize();
-
-    }
-    
-
-
-    //
-    //  Notation01
-    //
-    
-    { 
-	/*
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        DocumentType    dt  =
-	  impl.createDocumentType("DocType_for_Notation01", null, null, null);
-        doc.appendChild(dt);
-
-
-        NamedNodeMap notationMap = dt.getNotations();
-        Notation    nt1 = ((DocumentImpl) doc).createNotation("Notation01");
-        ((NotationImpl) nt1).setPublicId("Notation01PublicId");
-        notationMap.setNamedItem (nt1);
-        Notation    nt2 = (Notation)notationMap.getNamedItem("Notation01");
-        Assertion.assert(nt1==nt2);
-        nt2 = new NotationImpl((DocumentImpl)doc, null);
-        nt1 = null;
-        nt2 = (Notation)notationMap.getNamedItem("Notation01");
-      
-    */
-    }
-    
-
-
-    //
-    //  NamedNodeMap01 - comparison operators.
-    //
-    
-    {
-        NamedNodeMap    nnm = null;
-        Assertion.assert(nnm == null);
-
-        Document        doc = new DocumentImpl();
-        nnm = doc.getAttributes();    // Should be null, because node type
-                                      //   is not Element.
-        Assertion.assert(nnm == null);
-        Assertion.assert(!(nnm != null));
-
-        Element el = doc.createElement("NamedNodeMap01");
-        NamedNodeMap nnm2 = el.getAttributes();    // Should be an empty, but non-null map.
-        Assertion.assert(nnm2 != null);
-        Assertion.assert(nnm != nnm2);
-        nnm = nnm2;
-        Assertion.assert(nnm == nnm2);
-    }
-    
-
-
-    //
-    //  importNode quick test
-    //
-    
-    {
-        Document    doc1 = new DocumentImpl();
-        Document    doc2 = new DocumentImpl();
-        
-        Element     el1  = doc1.createElement("abc");
-        doc1.appendChild(el1);
-        Assertion.assert(el1.getParentNode() != null);
-        el1.setAttribute("foo", "foovalue");
-        Node        el2  = doc2.importNode(el1, true);
-        Assertion.assert(el2.getParentNode() == null);
-        String       tagName = el2.getNodeName();
-        Assertion.equals(tagName, "abc");
-        Assertion.assert(el2.getOwnerDocument() == doc2);
-        Assertion.equals(((Element) el2).getAttribute("foo"), "foovalue");
-        Assertion.assert(doc1 != doc2);
-    }
-    
-
-    //
-    //  getLength() tests.  Both Node CharacterData and NodeList implement
-    //                  getLength().  Early versions of the DOM had a clash
-    //                  between the two, originating in the implementation class
-    //                  hirearchy, which has NodeList as a (distant) base class
-    //                  of CharacterData.  This is a regression test to verify
-    //                  that the problem stays fixed.
-    //
-    
-    {
-        Document     doc = new DocumentImpl();
-        Text          tx = doc.createTextNode("Hello");
-        Element       el = doc.createElement("abc");
-        el.appendChild(tx);
-
-        int     textLength = tx.getLength();
-        Assertion.assert(textLength == 5);
-
-        NodeList      nl = tx.getChildNodes();
-        int      nodeListLen = nl.getLength();
-        Assertion.assert(nodeListLen == 0);
-
-        nl = el.getChildNodes();
-        nodeListLen = nl.getLength();
-        Assertion.assert(nodeListLen == 1);
-    }
-
-
-    //
-    //  NodeList - comparison operators, basic operation.
-    //
-    
-    {
-        NodeList    nl = null;
-        NodeList    nl2 = null;
-        Assertion.assert(nl == null);
-        Assertion.assert(!(nl != null));
-        Assertion.assert(nl == nl2);
-
-        Document        doc = new DocumentImpl();
-        nl = doc.getChildNodes();    // Should be non-null, but empty
-
-        Assertion.assert(nl != null);
-        int len = nl.getLength();
-        Assertion.assert(len == 0);
-
-        Element el = doc.createElement("NodeList01");
-        doc.appendChild(el);
-        len = nl.getLength();
-        Assertion.assert(len == 1);
-        Assertion.assert(nl != nl2);
-        nl2 = nl;
-        Assertion.assert(nl == nl2);
-    }
-    
-
-
- 
-    //
-    //  Name validity checking.
-    //
-    
-    {
-         Document        doc = new DocumentImpl();
-         Assertion.assert(DOMExceptionsTest(doc, "createElement",
-					  new Class[]{String.class},
-					  new Object[]{"!@@ bad element name"},
-					  DOMException.INVALID_CHARACTER_ERR));
-    }
-    
-
-
-    //
-    //  Assignment ops return value
-    //
-    
-    {
-        Document        doc = new DocumentImpl();
-        Element el = doc.createElement("NodeList01");
-        doc.appendChild(el);
-        
-        Element n1, n2, n3;
-        
-        n1 = n2 = n3 = el;
-        Assertion.assert(n1 == n2);
-        Assertion.assert(n1 == n3);
-        Assertion.assert(n1 == el);
-        Assertion.assert(n1 != null);
-        n1 = n2 = n3 = null;
-        Assertion.assert(n1 == null);
-    }
-    
-
-
-    //
-    //  Cloning of a node with attributes. Regression test for a ref counting 
-    //  bug in attributes of cloned nodes that occured when the "owned" flag
-    //  was not set in the clone.
-    //
-    
-    {
-        Document    doc = new DocumentImpl();
-        Element     root = doc.createElement("CTestRoot");
-        root.setAttribute("CTestAttr", "CTestAttrValue");
-
-        String s = root.getAttribute("CTestAttr");
-        Assertion.equals(s, "CTestAttrValue");
-
-        Element     cloned = (Element)root.cloneNode(true);
-        Attr a = cloned.getAttributeNode("CTestAttr");
-        Assertion.assert(a != null);
-        s = a.getValue();
-        Assertion.equals(s, "CTestAttrValue");
-        a = null;
-
-        a = cloned.getAttributeNode("CTestAttr");
-        Assertion.assert(a != null);
-        s = a.getValue();
-        Assertion.equals(s, "CTestAttrValue");
-
-    }
-    
-
-    //
-    //  Cloning of default attributes.
-    //
-    
-    {
-        Document    doc = new DocumentImpl();
-        Element     root = doc.createElement("CTestRoot");
-        root.setAttribute("attr", "attrValue");
-        Attr attr = root.getAttributeNode("attr");
-        // turn this into a default attribute
-        ((org.apache.xerces.dom.AttrImpl)attr).setSpecified(false);
-        // add another attribute (this one is specified)
-        root.setAttribute("attr2", "attr2Value");
-
-        Element     cloned = (Element)root.cloneNode(true);
-        Attr a = cloned.getAttributeNode("attr");
-        Assertion.assert(a.getSpecified() == false);
-        a = cloned.getAttributeNode("attr2");
-        Assertion.assert(a.getSpecified() == true);
-
-        // now if we clone the default attribute by itself the clone should be
-        // specified
-        a = (Attr)attr.cloneNode(true);
-        Assertion.assert(a.getSpecified() == true);
-    }
-
-
-    //
-    //  DOM Level 2 tests.  These should be split out as a separate test.
-    //
-
-
-    //
-    // hasFeature.  The set of supported options tested here is for Xerces 1.1
-    //
-    
-    {
-        DOMImplementation  impl = DOMImplementationImpl.getDOMImplementation();
-        Assertion.assert(impl.hasFeature("XML", "2.0")    == true);
-        Assertion.assert(impl.hasFeature("XML", null)       == true);
-        //  We also support 1.0
-        Assertion.assert(impl.hasFeature("XML", "1.0")    == true);
-        Assertion.assert(impl.hasFeature("XML", "3.0")    == false);
-        Assertion.assert(impl.hasFeature("Traversal", null) == true);
-
-
-        Assertion.assert(impl.hasFeature("HTML", null)           == false);
-        Assertion.assert(impl.hasFeature("Views", null)          == false);
-        Assertion.assert(impl.hasFeature("StyleSheets", null)    == false);
-        Assertion.assert(impl.hasFeature("CSS", null)            == false);
-        Assertion.assert(impl.hasFeature("CSS2", null)           == false);
-        Assertion.assert(impl.hasFeature("Events", null)         == true);
-        Assertion.assert(impl.hasFeature("UIEvents", null)       == false);
-        Assertion.assert(impl.hasFeature("MouseEvents", null)    == false);
-        Assertion.assert(impl.hasFeature("MutationEvents", null) == true);
-        Assertion.assert(impl.hasFeature("HTMLEvents", null)     == false);
-        Assertion.assert(impl.hasFeature("Range", null)          == true);
-    }
-    
-
-
-    //
-    // CreateDocumentType
-    //
-    
-    {
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        
-        String qName = "foo:docName";
-        String pubId = "pubId";
-        String sysId = "http://sysId";
-        
-        DocumentType dt = impl.createDocumentType(qName, pubId, sysId);
-        
-        Assertion.assert(dt != null);
-        Assertion.assert(dt.getNodeType() == Node.DOCUMENT_TYPE_NODE);
-        Assertion.equals(dt.getNodeName(), qName);
-        Assertion.assert(dt.getNamespaceURI() == null);
-        Assertion.assert(dt.getPrefix() == null);
-        Assertion.assert(dt.getLocalName() == null);
-        Assertion.equals(dt.getPublicId(), pubId);
-        Assertion.equals(dt.getSystemId(), sysId);
-        Assertion.assert(dt.getInternalSubset() == null);
-        Assertion.assert(dt.getOwnerDocument() == null);
-        
-        NamedNodeMap nnm = dt.getEntities();
-        Assertion.assert(nnm.getLength() == 0);
-        nnm = dt.getNotations();
-        Assertion.assert(nnm.getLength() == 0);
-
-        //
-        // Qualified name without prefix should also work.
-        //
-        qName = "docName";
-        dt = impl.createDocumentType(qName, pubId, sysId);
-
-        Assertion.assert(dt != null);
-        Assertion.assert(dt.getNodeType() == Node.DOCUMENT_TYPE_NODE);
-        Assertion.equals(dt.getNodeName(), qName);
-        Assertion.assert(dt.getNamespaceURI() == null);
-        Assertion.assert(dt.getPrefix() == null);
-        Assertion.assert(dt.getLocalName() == null);
-        Assertion.equals(dt.getPublicId(), pubId);
-        Assertion.equals(dt.getSystemId(), sysId);
-        Assertion.assert(dt.getInternalSubset() == null);
-        Assertion.assert(dt.getOwnerDocument() == null);
-
-        // Creating a DocumentType with invalid or malformed qName should fail.
-        Assertion.assert(DOMExceptionsTest(impl, "createDocumentType",
-			new Class[]{String.class, String.class, String.class},
-			new Object[]{"<docName", pubId, sysId},
-			DOMException.INVALID_CHARACTER_ERR));     
-        Assertion.assert(DOMExceptionsTest(impl, "createDocumentType",
-			new Class[]{String.class, String.class, String.class},
-			new Object[]{":docName", pubId, sysId},
-			DOMException.NAMESPACE_ERR));     
-        Assertion.assert(DOMExceptionsTest(impl, "createDocumentType",
-			new Class[]{String.class, String.class, String.class},
-			new Object[]{"docName:", pubId, sysId},
-			DOMException.NAMESPACE_ERR));     
-        Assertion.assert(DOMExceptionsTest(impl, "createDocumentType",
-			new Class[]{String.class, String.class, String.class},
-			new Object[]{"<doc::Name", pubId, sysId},
-			DOMException.INVALID_CHARACTER_ERR));     
-        Assertion.assert(DOMExceptionsTest(impl, "createDocumentType",
-			new Class[]{String.class, String.class, String.class},
-			new Object[]{"<doc:N:ame", pubId, sysId},
-			DOMException.INVALID_CHARACTER_ERR));     
-    }
-
-    //
-    //  DOMImplementation.CreateDocument
-    //
-    
-    {
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        
-        String qName = "foo:docName";
-        String pubId = "pubId";
-        String sysId = "http://sysId";
-        
-        DocumentType dt = impl.createDocumentType(qName, pubId, sysId);
-        
-        String docNSURI = "http://document.namespace";
-        Document doc = impl.createDocument(docNSURI, qName, dt);
-
-        Assertion.assert(dt.getOwnerDocument() == doc);
-        Assertion.assert(doc.getOwnerDocument() == null);
-
-        Assertion.assert(doc.getNodeType() == Node.DOCUMENT_NODE);
-        Assertion.assert(doc.getDoctype() == dt);
-        Assertion.equals(doc.getNodeName(), "#document");
-        Assertion.assert(doc.getNodeValue() == null);
-
-        Element el = doc.getDocumentElement();
-
-        Assertion.equals(el.getLocalName(), "docName");
-        Assertion.equals(el.getNamespaceURI(), docNSURI);
-        Assertion.equals(el.getNodeName(), qName);
-        Assertion.assert(el.getOwnerDocument() == doc);
-        Assertion.assert(el.getParentNode() == doc);
-        Assertion.equals(el.getPrefix(), "foo");
-        Assertion.equals(el.getTagName(), qName);
-        Assertion.assert(el.hasChildNodes() == false);
-
-        //
-        // Creating a second document with the same docType object should fail.
-        //
-        Assertion.assert(DOMExceptionsTest(impl, "createDocument",
-					   new Class[]{String.class,
-						       String.class,
-						       DocumentType.class},
-					   new Object[]{docNSURI, qName, dt},
-					   DOMException.WRONG_DOCUMENT_ERR));
-
-        // Namespace tests of createDocument are covered by createElementNS below
-    }
-    
-    
-    //
-    //  CreateElementNS methods
-    //
-    
-    {
-        
-        // Set up an initial (root element only) document.
-        // 
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        
-        String qName = "foo:docName";
-        String pubId = "pubId";
-        String sysId = "http://sysId";
-        DocumentType dt = impl.createDocumentType(qName, pubId, sysId);
-        
-        String docNSURI = "http://document.namespace";
-	Document doc = impl.createDocument(docNSURI, qName, dt);
-        Element rootEl = doc.getDocumentElement();
-
-        //
-        // CreateElementNS
-        //
-        Element ela = doc.createElementNS("http://nsa", "a:ela");  // prefix and URI
-        Element elb = doc.createElementNS("http://nsb", "elb");    //  URI, no prefix.
-        Element elc = doc.createElementNS(null, "elc");              // No URI, no prefix.
-
-        rootEl.appendChild(ela);
-        rootEl.appendChild(elb);
-        rootEl.appendChild(elc);
-
-        Assertion.equals(ela.getNodeName(), "a:ela");
-        Assertion.equals(ela.getNamespaceURI(), "http://nsa");
-        Assertion.equals(ela.getPrefix(), "a");
-        Assertion.equals(ela.getLocalName(), "ela");
-        Assertion.equals(ela.getTagName(), "a:ela");
-
-        Assertion.equals(elb.getNodeName(), "elb");
-        Assertion.equals(elb.getNamespaceURI(), "http://nsb");
-        Assertion.assert(elb.getPrefix() == null);
-        Assertion.equals(elb.getLocalName(), "elb");
-        Assertion.equals(elb.getTagName(), "elb");
-
-        Assertion.equals(elc.getNodeName(), "elc");
-        Assertion.assert(elc.getNamespaceURI() == null);
-        Assertion.assert(elc.getPrefix() ==  null);
-        Assertion.equals(elc.getLocalName(), "elc");
-        Assertion.equals(elc.getTagName(), "elc");
-
-        // Badly formed qualified name
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "<a"},
-				      DOMException.INVALID_CHARACTER_ERR));
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", ":a"},
-				      DOMException.NAMESPACE_ERR));
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "a:"},
-				      DOMException.NAMESPACE_ERR));
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "a::a"},
-				      DOMException.NAMESPACE_ERR));
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "a:a:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        // xml:a must have namespaceURI == "http://www.w3.org/XML/1998/namespace"
-	String xmlURI = "http://www.w3.org/XML/1998/namespace";
-	Assertion.equals(doc.createElementNS(xmlURI, "xml:a").getNamespaceURI(), xmlURI);
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "xml:a"},
-				      DOMException.NAMESPACE_ERR));
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"", "xml:a"},
-				      DOMException.NAMESPACE_ERR));
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{null, "xml:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        //unlike Attribute, xmlns (no different from foo) can have any namespaceURI for Element
-        Assertion.equals(doc.createElementNS("http://nsa", "xmlns").getNamespaceURI(), "http://nsa");
-        Assertion.equals(doc.createElementNS(xmlURI, "xmlns").getNamespaceURI(), xmlURI);
-        Assertion.equals(doc.createElementNS("", "xmlns").getNamespaceURI(), "");
-        Assertion.assert(doc.createElementNS(null, "xmlns").getNamespaceURI() == null);
-
-        //unlike Attribute, xmlns:a (no different from foo:a) can have any
-	// namespaceURI for Element except null
-        Assertion.equals(doc.createElementNS("http://nsa", "xmlns:a").getNamespaceURI(), "http://nsa");
-        Assertion.equals(doc.createElementNS(xmlURI, "xmlns:a").getNamespaceURI(), xmlURI);
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{null, "xmlns:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        //In fact, any prefix != null should have a namespaceURI != null
-        Assertion.equals(doc.createElementNS("http://nsa", "foo:a").getNamespaceURI(), "http://nsa");
-	Assertion.assert(DOMExceptionsTest(doc, "createElementNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{null, "foo:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        //Change prefix
-        Element elem = doc.createElementNS("http://nsa", "foo:a");
-        elem.setPrefix("bar");
-        Assertion.equals(elem.getNodeName(), "bar:a");
-        Assertion.equals(elem.getNamespaceURI(), "http://nsa");
-        Assertion.equals(elem.getPrefix(), "bar");
-        Assertion.equals(elem.getLocalName(), "a");
-        Assertion.equals(elem.getTagName(), "bar:a");
-        //The spec does not prevent us from setting prefix to a node without prefix
-        elem = doc.createElementNS("http://nsa", "a");
-        Assertion.equals(elem.getPrefix(), null);
-        elem.setPrefix("bar");
-        Assertion.equals(elem.getNodeName(), "bar:a");
-        Assertion.equals(elem.getNamespaceURI(), "http://nsa");
-        Assertion.equals(elem.getPrefix(), "bar");
-        Assertion.equals(elem.getLocalName(), "a");
-        Assertion.equals(elem.getTagName(), "bar:a");
-        //Special case for xml:a where namespaceURI must be xmlURI
-        elem = doc.createElementNS(xmlURI, "foo:a");
-        elem.setPrefix("xml");
-        elem = doc.createElementNS("http://nsa", "foo:a");
-        Assertion.assert(DOMExceptionsTest(elem, "setPrefix",
-					  new Class[]{String.class},
-					  new Object[]{"xml"},
-					  DOMException.NAMESPACE_ERR));
-        //However, there is no restriction on prefix xmlns
-        elem.setPrefix("xmlns");
-        //Also an element can not have a prefix with namespaceURI == null
-        elem = doc.createElementNS(null, "a");
-        Assertion.assert(DOMExceptionsTest(elem, "setPrefix",
-					  new Class[]{String.class},
-					  new Object[]{"foo"},
-					  DOMException.NAMESPACE_ERR));
-
-        //Only prefix of Element and Attribute can be changed
-        Assertion.assert(DOMExceptionsTest(doc, "setPrefix",
-					  new Class[]{String.class},
-					  new Object[]{"foo"},
-					  DOMException.NAMESPACE_ERR));
-
-        //Prefix of readonly Element can not be changed.
-        //However, there is no way to create such Element for testing yet.
-    }
-    
-
-
-
-    //
-    //  CreateAttributeNS methods
-    //
-    
-    {
-        
-        // Set up an initial (root element only) document.
-        // 
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        
-        String qName = "foo:docName";
-        String pubId = "pubId";
-        String sysId = "http://sysId";
-        DocumentType dt = impl.createDocumentType(qName, pubId, sysId);
-        
-        String docNSURI = "http://document.namespace";
-        Document doc = impl.createDocument(docNSURI, qName, dt);
-        Element rootEl = doc.getDocumentElement();
-
-        //
-        // CreateAttributeNS
-        //
-        Attr attra = doc.createAttributeNS("http://nsa", "a:attra");       // prefix and URI
-        Attr attrb = doc.createAttributeNS("http://nsb", "attrb");         //  URI, no prefix.
-        Attr attrc = doc.createAttributeNS(null, "attrc");    // No URI, no prefix.
-
-        Assertion.equals(attra.getNodeName(), "a:attra");
-        Assertion.equals(attra.getNamespaceURI(), "http://nsa");
-        Assertion.equals(attra.getPrefix(), "a");
-        Assertion.equals(attra.getLocalName(), "attra");
-        Assertion.equals(attra.getName(), "a:attra");
-        Assertion.assert(attra.getOwnerElement() == null);
-
-        Assertion.equals(attrb.getNodeName(), "attrb");
-        Assertion.equals(attrb.getNamespaceURI(), "http://nsb");
-        Assertion.equals(attrb.getPrefix(), null);
-        Assertion.equals(attrb.getLocalName(), "attrb");
-        Assertion.equals(attrb.getName(), "attrb");
-        Assertion.assert(attrb.getOwnerElement() == null);
-
-        Assertion.equals(attrc.getNodeName(), "attrc");
-        Assertion.assert(attrc.getNamespaceURI() == null);
-        Assertion.assert(attrc.getPrefix() == null);
-        Assertion.equals(attrc.getLocalName(), "attrc");
-        Assertion.equals(attrc.getName(), "attrc");
-        Assertion.assert(attrc.getOwnerElement() == null);
-
-
-        // Badly formed qualified name
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "<a"},
-				      DOMException.INVALID_CHARACTER_ERR));
-	Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", ":a"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "a:"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "a::a"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "a:a:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        // xml:a must have namespaceURI == "http://www.w3.org/XML/1998/namespace"
-        String xmlURI = "http://www.w3.org/XML/1998/namespace";
-        Assertion.equals(doc.createAttributeNS(xmlURI, "xml:a").getNamespaceURI(), xmlURI);
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "xml:a"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"", "xml:a"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{null,  "xml:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        //unlike Element, xmlns must have namespaceURI == "http://www.w3.org/2000/xmlns/"
-        String xmlnsURI = "http://www.w3.org/2000/xmlns/";
-        Assertion.equals(doc.createAttributeNS(xmlnsURI, "xmlns").getNamespaceURI(), xmlnsURI);
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "xmlns"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{xmlURI, "xmlns"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"", "xmlns"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{null,  "xmlns"},
-				      DOMException.NAMESPACE_ERR));
-
-        //unlike Element, xmlns:a must have namespaceURI == "http://www.w3.org/2000/xmlns/"
-        Assertion.equals(doc.createAttributeNS(xmlnsURI, "xmlns:a").getNamespaceURI(), xmlnsURI);
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"http://nsa", "xmlns:a"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{xmlURI, "xmlns:a"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{"", "xmlns:a"},
-				      DOMException.NAMESPACE_ERR));
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{null,  "xmlns:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        //In fact, any prefix != null should have a namespaceURI != null
-        Assertion.equals(doc.createAttributeNS("http://nsa", "foo:a").getNamespaceURI(), "http://nsa");
-        Assertion.assert(DOMExceptionsTest(doc, "createAttributeNS",
-				      new Class[]{String.class, String.class},
-				      new Object[]{null,  "foo:a"},
-				      DOMException.NAMESPACE_ERR));
-
-        //Change prefix
-        Attr attr = doc.createAttributeNS("http://nsa", "foo:a");
-        attr.setPrefix("bar");
-        Assertion.equals(attr.getNodeName(), "bar:a");
-        Assertion.equals(attr.getNamespaceURI(), "http://nsa");
-        Assertion.equals(attr.getPrefix(), "bar");
-        Assertion.equals(attr.getLocalName(), "a");
-        Assertion.equals(attr.getName(), "bar:a");
-        //The spec does not prevent us from setting prefix to a node without prefix
-        attr = doc.createAttributeNS("http://nsa", "a");
-        Assertion.assert(attr.getPrefix() == null);
-        attr.setPrefix("bar");
-        Assertion.equals(attr.getNodeName(), "bar:a");
-        Assertion.equals(attr.getNamespaceURI(), "http://nsa");
-        Assertion.equals(attr.getPrefix(), "bar");
-        Assertion.equals(attr.getLocalName(), "a");
-        Assertion.equals(attr.getName(), "bar:a");
-        //Special case for xml:a where namespaceURI must be xmlURI
-        attr = doc.createAttributeNS(xmlURI, "foo:a");
-        attr.setPrefix("xml");
-        attr = doc.createAttributeNS("http://nsa", "foo:a");
-        Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
-					   new Class[]{String.class},
-					   new Object[]{"xml"},
-					   DOMException.NAMESPACE_ERR));
-        //Special case for xmlns:a where namespaceURI must be xmlURI
-        attr = doc.createAttributeNS(xmlnsURI, "foo:a");
-        attr.setPrefix("xmlns");
-        attr = doc.createAttributeNS("http://nsa", "foo:a");
-        Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
-					   new Class[]{String.class},
-					   new Object[]{"xmlns"},
-					   DOMException.NAMESPACE_ERR));
-        //Special case for xmlns where no prefix can be set
-        attr = doc.createAttributeNS(xmlnsURI, "xmlns");
-        Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
-					   new Class[]{String.class},
-					   new Object[]{"xml"},
-					   DOMException.NAMESPACE_ERR));
-        //Also an attribute can not have a prefix with namespaceURI == null
-        attr = doc.createAttributeNS(null, "a");
-        Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
-					   new Class[]{String.class},
-					   new Object[]{"foo"},
-					   DOMException.NAMESPACE_ERR));
-        
-        //Only prefix of Element and Attribute can be changed
-        Assertion.assert(DOMExceptionsTest(attr, "setPrefix",
-					   new Class[]{String.class},
-					   new Object[]{"foo"},
-					   DOMException.NAMESPACE_ERR));
-
-        //Prefix of readonly Attribute can not be changed.
-        //However, there is no way to create such DOM_Attribute for testing yet.
-    }
-    
-
-    //
-    //  getElementsByTagName*
-    //
-    
-    {
-        
-        // Set up an initial (root element only) document.
-        // 
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        
-        String qName = "foo:docName";
-        String pubId = "pubId";
-        String sysId = "http://sysId";
-        DocumentType dt = impl.createDocumentType(qName, pubId, sysId);
-        
-        String docNSURI = "http://document.namespace";
-	Document doc = impl.createDocument(docNSURI, qName, dt);
-        Element rootEl = doc.getDocumentElement();
-
-        //
-        // Populate the document
-        //
-        Element ela = doc.createElementNS("http://nsa", "a:ela");  
-        rootEl.appendChild(ela);
-        Element elb = doc.createElementNS("http://nsb", "elb");   
-        rootEl.appendChild(elb);
-        Element elc = doc.createElementNS(null,           "elc");  
-        rootEl.appendChild(elc);
-        Element eld = doc.createElementNS("http://nsa", "d:ela");
-        rootEl.appendChild(eld);
-        Element ele = doc.createElementNS("http://nse", "elb");   
-        rootEl.appendChild(ele);
-
-
-        // 
-        // Access with DOM Level 1 getElementsByTagName
-        //
-
-        NodeList nl = doc.getElementsByTagName("a:ela");
-        Assertion.assert(nl.getLength() == 1);
-        Assertion.assert(nl.item(0) == ela);
-
-        nl = doc.getElementsByTagName("elb");
-        Assertion.assert(nl.getLength() == 2);
-        Assertion.assert(nl.item(0) == elb);
-        Assertion.assert(nl.item(1) == ele);
-
-        nl = doc.getElementsByTagName("d:ela");
-        Assertion.assert(nl.getLength() == 1);
-        Assertion.assert(nl.item(0) == eld);
-
-        //
-        //  Access with DOM Level 2 getElementsByTagNameNS
-        //
-
-        nl = doc.getElementsByTagNameNS(null, "elc");
-        Assertion.assert(nl.getLength() == 1);
-        Assertion.assert(nl.item(0) == elc);
-       
-        nl = doc.getElementsByTagNameNS("http://nsa", "ela");
-        Assertion.assert(nl.getLength() == 2);
-        Assertion.assert(nl.item(0) == ela);
-        Assertion.assert(nl.item(1) == eld);
-
-        nl = doc.getElementsByTagNameNS(null, "elb");
-        Assertion.assert(nl.getLength() == 0);
-
-        nl = doc.getElementsByTagNameNS("http://nsb", "elb");
-        Assertion.assert(nl.getLength() == 1);
-        Assertion.assert(nl.item(0) == elb);
-
-        nl = doc.getElementsByTagNameNS("*", "elb");
-        Assertion.assert(nl.getLength() == 2);
-        Assertion.assert(nl.item(0) == elb);
-        Assertion.assert(nl.item(1) == ele);
-
-        nl = doc.getElementsByTagNameNS("http://nsa", "*");
-        Assertion.assert(nl.getLength() == 2);
-        Assertion.assert(nl.item(0) == ela);
-        Assertion.assert(nl.item(1) == eld);
-
-        nl = doc.getElementsByTagNameNS("*", "*");
-        Assertion.assert(nl.getLength() == 6);     // Gets the document root element, plus 5 more
-
-        Assertion.assert(nl.item(6) == null);
-        // Assertion.assert(nl.item(-1) == 0);
-
-        nl = rootEl.getElementsByTagNameNS("*", "*");
-        Assertion.assert(nl.getLength() == 5);
-
-
-        nl = doc.getElementsByTagNameNS("http://nsa", "d:ela");
-        Assertion.assert(nl.getLength() == 0);
-
-
-        //
-        // Node lists are Live
-        //
-
-        nl = doc.getElementsByTagNameNS("*", "*");
-        NodeList nla = ela.getElementsByTagNameNS("*", "*");
-
-        Assertion.assert(nl.getLength() == 6); 
-        Assertion.assert(nla.getLength() == 0);
-
-        rootEl.removeChild(elc);
-        Assertion.assert(nl.getLength() == 5);
-        Assertion.assert(nla.getLength() == 0);
-
-        ela.appendChild(elc);
-        Assertion.assert(nl.getLength() == 6);
-        Assertion.assert(nla.getLength() == 1);
-    }
-
-
-    //
-    // Attributes and NamedNodeMaps.
-    //
-    {
-
-        // Set up an initial (root element only) document.
-        // 
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        
-        String qName = "foo:docName";
-        String pubId = "pubId";
-        String sysId = "http://sysId";
-        DocumentType dt = impl.createDocumentType(qName, pubId, sysId);
-        
-        String docNSURI = "http://document.namespace";
-        Document doc = impl.createDocument(docNSURI, qName, dt);
-        Element rootEl = doc.getDocumentElement();
-
-        //
-        // Create a set of attributes and hang them on the root element.
-        //
-        Attr attra = doc.createAttributeNS("http://nsa", "a:attra");  
-        rootEl.setAttributeNodeNS(attra);
-        Attr attrb = doc.createAttributeNS("http://nsb", "attrb");   
-        rootEl.setAttributeNodeNS(attrb);
-        Attr attrc = doc.createAttributeNS(null,           "attrc");  
-        rootEl.setAttributeNodeNS(attrc);
-        Attr attrd = doc.createAttributeNS("http://nsa", "d:attra");
-        rootEl.setAttributeNodeNS(attrd);
-        Attr attre = doc.createAttributeNS("http://nse", "attrb");   
-        rootEl.setAttributeNodeNS(attre);
-
-        //
-        // Check that the attribute nodes were created with the correct properties.
-        //
-        Assertion.equals(attra.getNodeName(), "a:attra");
-        Assertion.equals(attra.getNamespaceURI(), "http://nsa");
-        Assertion.equals(attra.getLocalName(), "attra");
-        Assertion.equals(attra.getName(), "a:attra");
-        Assertion.assert(attra.getNodeType() == Node.ATTRIBUTE_NODE);
-        Assertion.equals(attra.getNodeValue(), "");
-        Assertion.equals(attra.getPrefix(), "a");
-        Assertion.assert(attra.getSpecified() == true);
-        Assertion.equals(attra.getValue(), "");
-        Assertion.assert(attra.getOwnerElement() == null);
-
-        // Test methods of NamedNodeMap
-        NamedNodeMap nnm = rootEl.getAttributes();
-        Assertion.assert(nnm.getLength() == 4);
-        Assertion.assert(nnm.getNamedItemNS("http://nsa", "attra") == attrd);
-        Assertion.assert(nnm.getNamedItemNS("http://nsb", "attrb") == attrb);
-        Assertion.assert(nnm.getNamedItemNS("http://nse", "attrb") == attre);
-        Assertion.assert(nnm.getNamedItemNS(null, "attrc") == attrc);
-        Assertion.assert(nnm.getNamedItemNS(null, "attra") == null);
-        Assertion.assert(nnm.getNamedItemNS("http://nsa", "attrb") == null);
-    }
-
-
-
-    //
-    // Text Content and User Data
-    //
-
-    {
-        DOMImplementation impl = DOMImplementationImpl.getDOMImplementation();
-        DocumentType dt = impl.createDocumentType("foo", "PubId", "SysId");
-
-        Document doc = impl.createDocument(null, "foo", dt);
-        Assertion.assert(((Node3) doc).getTextContent() == null);
-        Assertion.assert(((Node3) dt).getTextContent() == null);
-        // no-ops:
-        ((Node3) doc).setTextContent("foo");
-        ((Node3) dt).setTextContent("foo");
-
-        Node3 el = (Node3) doc.getDocumentElement();
-        Assertion.equals(((Node3) el).getTextContent(), "");
-        el.setTextContent("yo!");
-        Node t = el.getFirstChild();
-        Assertion.assert(t != null && t.getNodeType() == Node.TEXT_NODE &&
-                         t.getNodeValue().equals("yo!"));
-        Assertion.equals(el.getTextContent(), "yo!");
-
-        Comment c = doc.createComment("dummy");
-        el.appendChild(c);
-        
-        Node3 el2 = (Node3) doc.createElement("bar");
-        el2.setTextContent("bye now");
-        el.appendChild(el2);
-        Assertion.equals(el.getTextContent(), "yo!bye now");
-
-
-        class MyHandler implements UserDataHandler {
-            boolean fCalled;
-            Node fNode;
-            String fKey;
-            Object fData;
-
-            MyHandler(String key, Object data, Node node) {
-                fCalled = false;
-                fKey = key;
-                fData = data;
-                fNode = node;
-            }
-            public void handle(short operation, String key,
-                               Object data, Node src, Node dst) {
-                Assertion.assert(operation == UserDataHandler.NODE_CLONED);
-                Assertion.assert(key == fKey && data == fData && src == fNode);
-                Assertion.assert(dst != null &&
-                                 dst.getNodeType() == fNode.getNodeType());
-                fCalled = true;
-            }
-        }
-
-        el.setUserData("mykey", c, null);
-        el.setUserData("mykey2", el2, null);
-        Assertion.assert(el.getUserData("mykey") == c);
-        Assertion.assert(el.getUserData("mykey2") == el2);
-        el.setUserData("mykey", null, null);
-        Assertion.assert(el.getUserData("mykey") == null);
-        el.setUserData("mykey2", null, null);
-        Assertion.assert(el.getUserData("mykey2") == null);
-
-        MyHandler h = new MyHandler("mykey", c, el);
-        el.setUserData("mykey", c, h);
-        MyHandler h2 = new MyHandler("mykey2", el2, el);
-        el.setUserData("mykey2", el2, h2);
-        Node cl = el.cloneNode(false);
-        Assertion.assert(h.fCalled == true);
-        Assertion.assert(h2.fCalled == true);
-
-
-        el.setTextContent("zapped!");
-        Node t2 = el.getFirstChild();
-        Assertion.assert(t2.getNodeValue().equals("zapped!"));
-        Assertion.assert(t2.getNextSibling() == null);
-    }
-
-    };
-}    
diff --git a/tests/dom/range/Test.java b/tests/dom/range/Test.java
deleted file mode 100644
index a47dd45..0000000
--- a/tests/dom/range/Test.java
+++ /dev/null
@@ -1,709 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package dom.range;
-import org.apache.xerces.parsers.*;
-import org.apache.xerces.dom.*;
-import org.apache.xerces.dom.DocumentImpl;
-
-import org.w3c.dom.*;
-import org.w3c.dom.Element;
-import org.w3c.dom.ranges.*;
-import org.w3c.dom.ranges.RangeException;
-
-import java.io.*;
-import dom.Writer;
-import org.xml.sax.InputSource;
-
-/** This RangeTest tests all of the cases delineated as examples
- *  in the DOM Level 2 Range specification, and a few others.
- *  <p>These do not by any means completely test the API and 
- *  corner cases. 
- */
-public class Test {
-    
-    static final boolean DEBUG = false;
-    
-    static final String [] tests = {
-        "<FOO>AB<MOO>CD</MOO>CD</FOO>",
-        "<FOO>A<MOO>BC</MOO>DE</FOO>",
-        "<FOO>XY<BAR>ZW</BAR>Q</FOO>",
-        "<FOO><BAR1>AB</BAR1><BAR2/><BAR3>CD</BAR3></FOO>",
-        "<A><B><M/><C><D/><E/><F/><HELLO/></C><N/><O/></B>"+
-        "<Z><X/><Y/></Z>"+
-        "<G/><Q><V/><W/></Q></A>"
-    };
-    static final String [] deleteResult = {
-        "<FOO>ACD</FOO>",
-        "<FOO>A<MOO>B</MOO>E</FOO>",
-        "<FOO>X<BAR>W</BAR>Q</FOO>",
-        "<FOO><BAR1>A</BAR1><BAR3>D</BAR3></FOO>",
-        "<A><B><M></M><C><D></D></C></B><Q><W></W></Q></A>"
-    };
-    static final String [] extractResult = {
-        "B<MOO>CD</MOO>",
-        "<MOO>C</MOO>D",
-        "Y<BAR>Z</BAR>",
-        "<BAR1>B</BAR1><BAR2></BAR2><BAR3>C</BAR3>",
-        "<B><C><E></E><F></F><HELLO></HELLO></C>"+
-        "<N></N><O></O></B><Z><X></X><Y></Y></Z><G></G><Q><V></V></Q>"
-    };
-    
-    static final String INSERT="***";
-    static final String [] insertResult = {
-"<FOO>A"+INSERT+"B<MOO>CD</MOO>CD</FOO>",
-"<FOO>A<MOO>B"+INSERT+"C</MOO>DE</FOO>",
-"<FOO>X"+INSERT+"Y<BAR>ZW</BAR>Q</FOO>",
-"<FOO><BAR1>A"+INSERT+"B</BAR1><BAR2></BAR2><BAR3>CD</BAR3></FOO>",
-"<A><B><M></M><C><D></D>"+INSERT+"<E></E><F></F><HELLO></HELLO></C>"+
-"<N></N><O></O></B><Z><X></X><Y></Y></Z><G></G><Q><V></V><W></W></Q></A>"
-    };
-    
-
-    static final String SURROUND="SURROUND";
-
-    static final String [] surroundResult = {
-"<FOO>A<"+SURROUND+">B<MOO>CD</MOO>C</"+SURROUND+">D</FOO>",
-"<FOO>A<MOO>B<"+SURROUND+">C</"+SURROUND+"></MOO>DE</FOO>",
-"<FOO>X<"+SURROUND+">Y<BAR>ZW</BAR></"+SURROUND+">Q</FOO>",
-"<FOO><BAR1>AB</BAR1><"+SURROUND+"><BAR2></BAR2></"+SURROUND+"><BAR3>CD</BAR3></FOO>",
-"<A><B><M></M><C><D></D><E></E><F></F><HELLO></HELLO></C>"+
-"<N></N><O></O></B><Z><"+SURROUND+"><X></X><Y></Y></"+SURROUND+"></Z>"+
-"<G></G><Q><V></V><W></W></Q></A>"
-    };
-    
-    static final String [] rangeDelete = {
-    "<P>Abcd efgh The Range ijkl</P>",
-    "<p>Abcd efgh The Range ijkl</p>",
-    "<P>ABCD efgh The <EM>Range</EM> ijkl</P>",
-    "<P>Abcd efgh The Range ijkl</P>",
-    "<P>Abcd <EM>efgh The Range ij</EM>kl</P>"
-    };
-    //
-    static final String [] rangeDeleteResult = {
-    "<P>Abcd ^Range ijkl</P>",
-    "<p>Abcd ^kl</p>",
-    "<P>ABCD ^<EM>ange</EM> ijkl</P>",
-    "<P>Abcd ^he Range ijkl</P>",
-    "<P>Abcd ^kl</P>"
-    };
-    
-    static final String INSERT2="<P>Abcd efgh XY blah ijkl</P>";
-    static final String INSERTED_TEXT = "INSERTED TEXT";
-    
-    static final String [] rangeInsertResult = {
-    "<P>Abcd efgh INSERTED TEXTXY blah ijkl</P>",
-    "<P>Abcd efgh XINSERTED TEXTY blah ijkl</P>",
-    "<P>Abcd efgh XYINSERTED TEXT blah ijkl</P>",
-    "<P>Abcd efgh XY blahINSERTED TEXT ijkl</P>"
-    };
-    
-    
-    public static void main(String args[]) {
-        // is there anything to do?
-        if ( args.length == 0 ) {
-            printUsage();
-            System.exit(1);
-        }
-        new Test(args[0]);
-    }
-    
-   /** Prints the usage. */
-   private static void printUsage() {
-
-      System.err.println("usage: java dom.range.Test (options) ...");
-      System.err.println();
-      System.err.println("options:");
-      System.err.println("  all             all tests");
-      System.err.println("  delete          delete test");
-      System.err.println("  extract         extract test");
-      System.err.println("  clone           clone test");
-      System.err.println("  insert          insert test");
-      System.err.println("  surround        surround test");
-      System.err.println("  insert2         insert mutation test");
-      System.err.println("  delete2         delete mutation test");
-
-   } // printUsage()
-    
-    
-    public Test(String arg) {
-        if (arg.equals("all")) {
-            boolean all = false;
-            all = performTest("delete");
-            all = performTest("extract")&&all;
-            all = performTest("clone")&&all;
-            all = performTest("insert")&&all;
-            all = performTest("surround")&&all;
-            all = performTest("insert2")&&all;
-            all = performTest("delete2")&&all;
-            if (all) 
-                System.out.println("*** ALL TESTS PASSED! ***");
-            else 
-                System.out.println("*** ONE OR MORE TESTS FAILED! ***");
-            
-        } else {
-            performTest(arg);            
-        }
-    }
-    
-    public boolean performTest(String arg) {
-        boolean passed = true;
-        try {
-            Writer writer = new Writer(false);
-            DOMParser parser = new DOMParser();
-            if (!arg.equals("delete2") && !arg.equals("insert2")) {
-            System.out.println("\n*************** Test == "+arg+" ***************");
-            for (int i = 0; i < tests.length; i++) {
-                System.out.println("\n\nTest["+i+"]");
-                System.out.println("\nBefore "+arg+": document="+tests[i]+":");
-                parser.parse(new InputSource(new StringReader(tests[i])));
-                DocumentImpl document = (DocumentImpl)parser.getDocument();
-                Range range = document.createRange();
-                Node root = document.getDocumentElement();
-                boolean surround = false;
-                Node surroundNode=document.createElement(SURROUND);
-                if (arg.equals("surround")) {
-                    surround = true;
-                }
-                
-                if (i == 0) { 
-                    range.setStart(root.getFirstChild(), 1);
-                    range.setEndBefore(root.getLastChild());
-                    if (surround)
-                        range.setEnd(root.getLastChild(),1);
-                    
-                }
-                else if (i == 1) {
-                    Node n1 = root.getFirstChild().getNextSibling().
-                    getFirstChild();
-                    range.setStart(n1, 1);
-                    range.setEnd(root.getLastChild(), 1);
-                    if (surround)
-                        range.setEnd(n1,2);
-                }
-                else if (i == 2) {
-                    range.setStart(root.getFirstChild(), 1);
-                    Node n2 = root.getFirstChild().getNextSibling().getFirstChild();
-                    range.setEnd(n2, 1);
-                    if (surround)
-                        range.setEndBefore(root.getLastChild());
-                }
-                else if (i == 3) {
-                    Node n3 = root.getFirstChild().getFirstChild();
-                    range.setStart(n3, 1);
-                    range.setEnd(root.getLastChild().getFirstChild(), 1);
-                    if (surround) {
-                        range.selectNode(root.getFirstChild().getNextSibling());
-                    }
-                }
-                else if (i == 4) {
-                    Node n4 = root.getFirstChild().getFirstChild().getNextSibling().getFirstChild();
-                    range.setStartAfter(n4);
-                    range.setEndAfter(root.getLastChild().getFirstChild());
-                    if (surround) {
-                        range.selectNodeContents(root.getFirstChild().getNextSibling());
-                    }
-                }
-                
-                System.out.println("range.toString="+range.toString());
-                DocumentFragment frag = null;
-                
-                if (arg.equals("surround")) {
-                    try {
-                        System.out.println("surroundNode="+surroundNode);
-                        range.surroundContents(surroundNode);
-                    } catch (org.w3c.dom.ranges.RangeException e) {
-                        System.out.println(e);
-                    }
-                   String result = toString(document);
-                   System.out.println("After surround: document="+result+":");
-                   if (!result.equals(surroundResult[i])) {
-                        System.out.println("Should be: document="+surroundResult[i]+":");
-                        passed = false;
-                        System.out.println("Test FAILED!");
-                        System.out.println("*** Surround document Test["+i+"] FAILED!");
-                   }
-                }
-                
-                if (arg.equals("insert")) {
-                    range.insertNode(document.createTextNode(INSERT));
-                   String result = toString(document);
-                   System.out.println("After  insert: document="+result+":");
-                   if (!result.equals(insertResult[i])) {
-                        System.out.println("Should be: document="+insertResult[i]+":");
-                        passed = false;
-                        System.out.println("Test FAILED!");
-                        System.out.println("*** Insert document Test["+i+"] FAILED!");
-                   }
-                    
-                } else 
-                if (arg.equals("delete")) {
-                   range.deleteContents();
-                   String result = toString(document);
-                   System.out.println("After delete:"+result+":");
-                   if (!result.equals(deleteResult[i])) {
-                        System.out.println("Should be: document="+deleteResult[i]+":");
-                        passed = false;
-                        System.out.println("Test FAILED!");
-                        System.out.println("*** Delete document Test["+i+"] FAILED!");
-                   }
-                }
-                else 
-                if (arg.equals("extract")) {
-                    frag = range.extractContents();
-                    //range.insertNode(document.createTextNode("^"));
-                   String result = toString(document);
-                   System.out.println("After extract: document="+result+":");
-                   if (!result.equals(deleteResult[i])) {
-                        System.out.println("Should be: document="+deleteResult[i]+":");
-                        passed = false;
-                        System.out.println("*** Extract document Test["+i+"] FAILED!");
-                   }
-                   String fragResult = toString(frag);
-                   System.out.println("After extract: fragment="+fragResult+":");
-                   if (!fragResult.equals(extractResult[i])) {
-                        System.out.println("Should be: fragment="+extractResult[i]+":");
-                        passed = false;
-                        System.out.println("*** Extract Fragment Test["+i+"] FAILED!");
-                   }
-                }
-                   
-                else 
-                if (arg.equals("clone")) {
-                    frag = range.cloneContents();
-                   String fragResult = toString(frag);
-                   System.out.println("After clone: fragment="+fragResult);
-                   if (!fragResult.equals(extractResult[i])) {
-                        System.out.println("Should be: fragment="+extractResult[i]+":");
-                        passed = false;
-                        System.out.println("*** Clone Fragment Test["+i+"] FAILED!");
-                   }
-                }
-                
-            }
-            
-            } else
-            if (arg.equals("insert2")) {
-            System.out.println("\n*************** Test == "+arg+" ***************");
-            for (int i = 0; i < 4; i++) {
-
-                System.out.println("\n\nTest["+i+"]");
-                System.out.println("\nBefore "+arg+": document="+INSERT2+":");
-                parser.parse(new InputSource(new StringReader(INSERT2)));
-                DocumentImpl document = (DocumentImpl)parser.getDocument();
-                Node root = document.getDocumentElement();
-                Range range = document.createRange();
-                range.setStart(root.getFirstChild(),11);
-                range.setEnd(root.getFirstChild(),18);
-                Range rangei = document.createRange();
-                if (i == 0) { 
-                    rangei.setStart(root.getFirstChild(), 10);
-                    rangei.setEnd(root.getFirstChild(), 10);
-                }
-                if (i == 1) { 
-                    rangei.setStart(root.getFirstChild(), 11);
-                    rangei.setEnd(root.getFirstChild(), 11);
-                }
-                if (i == 2) { 
-                    rangei.setStart(root.getFirstChild(), 12);
-                    rangei.setEnd(root.getFirstChild(), 12);
-                }
-                if (i == 3) { 
-                    rangei.setStart(root.getFirstChild(), 17);
-                    rangei.setEnd(root.getFirstChild(), 17);
-                }
-                //System.out.println("range: start1=="+range.getStartContainer());
-                //root.insertBefore(document.createTextNode("YES!"), root.getFirstChild());
-                //System.out.println("range: start2=="+range.getStartContainer());
-   
-                if (DEBUG) System.out.println("before insert start="+range.getStartOffset());
-                if (DEBUG) System.out.println("before insert end="+range.getEndOffset());
-                rangei.insertNode(document.createTextNode(INSERTED_TEXT));
-                if (DEBUG) System.out.println("after insert start="+range.getStartOffset());
-                if (DEBUG) System.out.println("after insert end="+range.getEndOffset());
-                
-                String result = toString(document);
-                System.out.println("After insert2: document="+result+":");
-                if (!result.equals(rangeInsertResult[i])) {
-                    System.out.println("Should be: document="+rangeInsertResult[i]+":");
-                    passed = false;
-                    System.out.println("Test FAILED!");
-                    System.out.println("*** Delete Ranges document Test["+i+"] FAILED!");
-                }
-            }
-            } else
-            if (arg.equals("delete2")) {
-            //
-            // Range Deletion, acting upon another range.
-            //
-       
-            System.out.println("\n*************** Test == "+arg+" ***************");
-            for (int i = 0; i < rangeDelete.length; i++) {
-                System.out.println("\n\nTest["+i+"]");
-                System.out.println("\nBefore "+arg+": document="+rangeDelete[i]+":");
-                parser.parse(new InputSource(new StringReader(rangeDelete[i])));
-                DocumentImpl document = (DocumentImpl)parser.getDocument();
-                Range range = document.createRange();
-                Range ranged = document.createRange();
-                Node root = document.getDocumentElement();
-                boolean surround = false;
-                Node surroundNode=document.createElement(SURROUND);
-                if (arg.equals("surround")) {
-                    surround = true;
-                }
-                
-                if (i == 0) { 
-                    ranged.setStart(root.getFirstChild(), 5);
-                    ranged.setEnd(root.getFirstChild(), 14);
-                    
-                    range.setStart(root.getFirstChild(), 11);
-                    range.setEnd(root.getFirstChild(), 19);
-                }
-                else if (i == 1) {
-                    ranged.setStart(root.getFirstChild(), 5);
-                    ranged.setEnd(root.getFirstChild(), 22);
-                    
-                    range.setStart(root.getFirstChild(), 11);
-                    range.setEnd(root.getFirstChild(), 21);
-                }
-                else if (i == 2) {
-                    ranged.setStart(root.getFirstChild(), 5);
-                    ranged.setEnd(root.getFirstChild().getNextSibling()
-                        .getFirstChild(), 1);
-                        
-                    range.setStart(root.getFirstChild(), 11);
-                    
-                    range.setEndAfter(root.getFirstChild().getNextSibling()
-                        .getFirstChild());
-                }
-                else if (i == 3) {
-                    ranged.setStart(root.getFirstChild(), 5);
-                    ranged.setEnd(root.getFirstChild(), 11);
-                    
-                    range.setStart(root.getFirstChild(), 11);
-                    range.setEnd(root.getFirstChild(), 21);
-                }
-                else if (i == 4) {
-                    ranged.selectNode(root.getFirstChild().getNextSibling());
-                    
-                    range.setStart(root.getFirstChild().getNextSibling()
-                        .getFirstChild(), 6);
-                    range.setEnd(root.getFirstChild().getNextSibling()
-                        .getFirstChild(), 15);
-                }
-                
-                DocumentFragment frag = null;
-                
-                if (arg.equals("delete2")) {
-                    if (DEBUG) {
-                   System.out.println("BEFORE deleteContents()");
-                   System.out.println("ranged: startc="+ranged.getStartContainer());
-                   System.out.println("ranged: starto="+ranged.getStartOffset());
-                   System.out.println("ranged:   endc="+ranged.getEndContainer());
-                   System.out.println("ranged:   endo="+ranged.getEndOffset());
-             
-                   System.out.println("range: startc="+range.getStartContainer());
-                   System.out.println("range: starto="+range.getStartOffset());
-                   System.out.println("range:   endc="+range.getEndContainer());
-                   System.out.println("range:   endo="+range.getEndOffset());
-                    }
-                   ranged.deleteContents();
-                   String result = null;
-                   if (DEBUG) {
-                   System.out.println("AFTER deleteContents()");
-                   result = toString(document);
-                   System.out.println("ranged: startc="+ranged.getStartContainer());
-                   System.out.println("ranged: starto="+ranged.getStartOffset());
-                   System.out.println("ranged:   endc="+ranged.getEndContainer());
-                   System.out.println("ranged:   endo="+ranged.getEndOffset());
-             
-                   System.out.println("range: startc="+range.getStartContainer());
-                   System.out.println("range: starto="+range.getStartOffset());
-                   System.out.println("range:   endc="+range.getEndContainer());
-                   System.out.println("range:   endo="+range.getEndOffset());
-                   }
-                   
-                   ranged.insertNode(document.createTextNode("^"));
-                   
-                   result = toString(document);
-                   System.out.println("After delete2: document="+result+":");
-                   if (!result.equals(rangeDeleteResult[i])) {
-                        System.out.println("Should be: document="+rangeDeleteResult[i]+":");
-                        passed = false;
-                        System.out.println("Test FAILED!");
-                        System.out.println("*** Delete Ranges document Test["+i+"] FAILED!");
-                   }
-                }
-            }
-                
-            }
-            
-       
-        }
-        catch (org.xml.sax.SAXParseException spe) {
-            passed = false;
-        }
-        catch (org.xml.sax.SAXException se) {
-            if (se.getException() != null)
-                se.getException().printStackTrace(System.err);
-            else
-                se.printStackTrace(System.err);
-            passed = false;
-        }
-        catch (Exception e) {
-            e.printStackTrace(System.err);
-            passed = false;
-        }
-        if (!passed) System.out.println("*** The "+arg+" Test FAILED! ***");
-        
-        return passed;
-    }
-    StringBuffer sb;
-    boolean canonical = true;
-    
-    String toString(Node node) {
-        sb = new StringBuffer();
-        return print(node);
-    
-    }
-   
-   /** Prints the specified node, recursively. */
-   public String print(Node node) {
-
-      // is there anything to do?
-      if ( node == null ) {
-         return sb.toString();
-      }
-
-      int type = node.getNodeType();
-      switch ( type ) {
-         // print document
-         case Node.DOCUMENT_NODE: {
-               return print(((Document)node).getDocumentElement());
-               //out.flush();
-               //break;
-            }
-
-            // print element with attributes
-         case Node.ELEMENT_NODE: {
-               sb.append('<');
-               sb.append(node.getNodeName());
-               Attr attrs[] = sortAttributes(node.getAttributes());
-               for ( int i = 0; i < attrs.length; i++ ) {
-                  Attr attr = attrs[i];
-                  sb.append(' ');
-                  sb.append(attr.getNodeName());
-                  sb.append("=\"");
-                  sb.append(normalize(attr.getNodeValue()));
-                  sb.append('"');
-               }
-               sb.append('>');
-               NodeList children = node.getChildNodes();
-               if ( children != null ) {
-                  int len = children.getLength();
-                  for ( int i = 0; i < len; i++ ) {
-                     print(children.item(i));
-                  }
-               }
-               break;
-            }
-
-            // handle entity reference nodes
-         case Node.ENTITY_REFERENCE_NODE: {
-               if ( canonical ) {
-                  NodeList children = node.getChildNodes();
-                  if ( children != null ) {
-                     int len = children.getLength();
-                     for ( int i = 0; i < len; i++ ) {
-                        print(children.item(i));
-                     }
-                  }
-               } else {
-                  sb.append('&');
-                  sb.append(node.getNodeName());
-                  sb.append(';');
-               }
-               break;
-            }
-
-            // print cdata sections
-         case Node.CDATA_SECTION_NODE: {
-               if ( canonical ) {
-                  sb.append(normalize(node.getNodeValue()));
-               } else {
-                  sb.append("<![CDATA[");
-                  sb.append(node.getNodeValue());
-                  sb.append("]]>");
-               }
-               break;
-            }
-
-            // print text
-         case Node.TEXT_NODE: {
-               sb.append(normalize(node.getNodeValue()));
-               break;
-            }
-
-            // print processing instruction
-         case Node.PROCESSING_INSTRUCTION_NODE: {
-               sb.append("<?");
-               sb.append(node.getNodeName());
-               String data = node.getNodeValue();
-               if ( data != null && data.length() > 0 ) {
-                  sb.append(' ');
-                  sb.append(data);
-               }
-               sb.append("?>");
-               break;
-            }
-            // handle entity reference nodes
-         case Node.DOCUMENT_FRAGMENT_NODE: {
-            NodeList children = node.getChildNodes();
-            if ( children != null ) {
-                int len = children.getLength();
-                for ( int i = 0; i < len; i++ ) {
-                     print(children.item(i));
-                }
-            }
-               break;
-            }
-      }
-
-      if ( type == Node.ELEMENT_NODE ) {
-         sb.append("</");
-         sb.append(node.getNodeName());
-         sb.append('>');
-      }
-
-      return sb.toString();
-
-   } // print(Node)
-
-   /** Returns a sorted list of attributes. */
-   protected Attr[] sortAttributes(NamedNodeMap attrs) {
-
-      int len = (attrs != null) ? attrs.getLength() : 0;
-      Attr array[] = new Attr[len];
-      for ( int i = 0; i < len; i++ ) {
-         array[i] = (Attr)attrs.item(i);
-      }
-      for ( int i = 0; i < len - 1; i++ ) {
-         String name  = array[i].getNodeName();
-         int    index = i;
-         for ( int j = i + 1; j < len; j++ ) {
-            String curName = array[j].getNodeName();
-            if ( curName.compareTo(name) < 0 ) {
-               name  = curName;
-               index = j;
-            }
-         }
-         if ( index != i ) {
-            Attr temp    = array[i];
-            array[i]     = array[index];
-            array[index] = temp;
-         }
-      }
-
-      return (array);
-
-   } // sortAttributes(NamedNodeMap):Attr[]
-    
-   /** Normalizes the given string. */
-   protected String normalize(String s) {
-      StringBuffer str = new StringBuffer();
-
-      int len = (s != null) ? s.length() : 0;
-      for ( int i = 0; i < len; i++ ) {
-         char ch = s.charAt(i);
-         switch ( ch ) {
-            case '<': {
-                  str.append("&lt;");
-                  break;
-               }
-            case '>': {
-                  str.append("&gt;");
-                  break;
-               }
-            case '&': {
-                  str.append("&amp;");
-                  break;
-               }
-            case '"': {
-                  str.append("&quot;");
-                  break;
-               }
-            case '\r':
-            case '\n': {
-                  if ( canonical ) {
-                     str.append("&#");
-                     str.append(Integer.toString(ch));
-                     str.append(';');
-                     break;
-                  }
-                  // else, default append char
-               }
-            default: {
-                  str.append(ch);
-               }
-         }
-      }
-
-      return (str.toString());
-
-   } // normalize(String):String
-   
-    
-}
diff --git a/tests/dom/range/TestCompare.java b/tests/dom/range/TestCompare.java
deleted file mode 100644
index 6abf0bf..0000000
--- a/tests/dom/range/TestCompare.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package dom.range;
-import junit.framework.*;
-import org.apache.xerces.dom.DocumentImpl;
-import org.w3c.dom.*;
-import org.w3c.dom.ranges.*;
-
-/**
- * This class is used to validate that the implementation of DOM Ranges
- * is functionally correct.  We include in this test suite examples 
- * from the DOM Spec.
- *
- * @author Lynn Monson
- */
-public class TestCompare extends TestCase 
-{
-    /**
-     * Creates an instance of the test
-     */
-    public TestCompare(String name) {
-            super(name);
-    }
-
-    /**
-     * Builds a set of ranges that correspond to the range example from
-     * section 2.1 of the DOM range spec.  These ranges are based on a 
-     * document that looks like:
-     * 
-     *     <BODY><H1>Title</H1><P>Blah xyz.</P></BODY>
-     * 
-     * The ranges are as follows:
-     *  Range   Start-node  Start-Offset        End-node    End-Offset
-     *   0      "Title"     2                   "Blah.."    2
-     *   1      BODY        1                   BODY        2
-     *   2      P           0                   P           1
-     *   3      "Blah.."    0                   "Blah.."    9
-     * 
-     * These ranges are in sorted order based on the boundary point
-     * of the start of each range, in document order.  
-     * 
-     * The ending points of the ranges are not in any particular order.
-     * These ranges cover all four boundary tests as enumerated in
-     * the DOM range specification.
-     */
-    private Range[] buildRanges()
-    {
-        DocumentImpl doc=new org.apache.xerces.dom.DocumentImpl();
-
-        Element body = doc.createElement("BODY");
-        doc.appendChild(body);
-        Element h1 = doc.createElement("H1");
-        body.appendChild(h1);
-        Text title = doc.createTextNode("Title");
-        h1.appendChild(title);
-        Element p = doc.createElement("P");
-        body.appendChild(p);
-        Text blah = doc.createTextNode("Blah xyz.");
-        p.appendChild(blah);
-
-        // We are creating the four ranges specified in the DOM example.
-        Range[] ranges = new Range[4];
-
-        ranges[0] = doc.createRange();
-        ranges[0].setStart( title, 2 );
-        ranges[0].setEnd( blah, 2 );
-
-        ranges[1] = doc.createRange();
-        ranges[1].setStart( body, 1 );
-        ranges[1].setEnd( body, 2 );
-
-        ranges[2] = doc.createRange();
-        ranges[2].setStart( p, 0 );
-        ranges[2].setEnd( p, 1 );
-
-        ranges[3] = doc.createRange();
-        ranges[3].setStart( blah, 0 );
-        ranges[3].setEnd( blah, 9 );
-
-        return ranges;
-    }
-
-    /**
-     * This table is the set of compareBoundaryPoints results you can
-     * expect to see when comparing the start-to-start points of ranges found in 
-     * the DOM Spec section 2.1.  These ranges are built by the above
-     * buildRanges() method. 
-     */
-    private final int[][] results_START_TO_START = 
-    {
-        { 0, -1, -1, -1 },  // range[0].compareBoundaryPoints( range[x] )
-        { 1, 0, -1, -1 },   // range[1].compareBoundaryPoints( range[x] )
-        { 1, 1, 0, -1 },    // range[2].compareBoundaryPoints( range[x] )
-        { 1, 1, 1, 0 },     // range[3].compareBoundaryPoints( range[x] )
-    };
-
-    /**
-     * This table is the set of compareBoundaryPoints results you can
-     * expect to see when comparing the start-to-end points of ranges found in 
-     * the DOM Spec section 2.1.  These ranges are built by the above
-     * buildRanges() method. 
-     */
-    private final int[][] results_START_TO_END = 
-    {
-        { 1, 1, 1, 1 },  // range[0].compareBoundaryPoints( range[x] ) 
-        { 1, 1, 1, 1 },  // range[1].compareBoundaryPoints( range[x] ) 
-        { 1, 1, 1, 1 },  // range[2].compareBoundaryPoints( range[x] ) 
-        { 1, 1, 1, 1 },  // range[3].compareBoundaryPoints( range[x] ) 
-    };
-
-    /**
-     * This table is the set of compareBoundaryPoints results you can
-     * expect to see when comparing the end-to-start points of ranges found in 
-     * the DOM Spec section 2.1.  These ranges are built by the above
-     * buildRanges() method. 
-     */
-    private final int[][] results_END_TO_START = 
-    {
-        { -1, -1, -1, -1 },    // range[0].compareBoundaryPoints( range[x] ) 
-        { -1, -1, -1, -1 },    // range[0].compareBoundaryPoints( range[x] ) 
-        { -1, -1, -1, -1 },    // range[0].compareBoundaryPoints( range[x] ) 
-        { -1, -1, -1, -1 },    // range[0].compareBoundaryPoints( range[x] ) 
-    };
-
-    /**
-     * This table is the set of compareBoundaryPoints results you can
-     * expect to see when comparing the end-to-end points of ranges found in 
-     * the DOM Spec section 2.1.  These ranges are built by the above
-     * buildRanges() method. 
-     */
-    private final int[][] results_END_TO_END = 
-    {
-        { 0, -1, -1, -1 },       // range[0].compareBoundaryPoints( range[x] ) 
-        { 1, 0, 1, 1 },          // range[1].compareBoundaryPoints( range[x] ) 
-        { 1, -1, 0, 1 },         // range[2].compareBoundaryPoints( range[x] ) 
-        { 1, -1, -1, 0 },        // range[3].compareBoundaryPoints( range[x] ) 
-    };
-
-    /**
-     * Utility method used to compare the Ranges from the 
-     * buildRanges() method.  The caller specifies how the ranges
-     * should be compared and what the results should be.
-     */
-    private void doTestCompare( short how, int[][] results )
-    {
-        // get the sample ranges
-        Range[] ranges = buildRanges();
-
-        // Compare every pair of ranges.
-        for( int i=0; i<ranges.length; ++i )
-        {
-            for( int j=0; j<ranges.length; ++j )
-            {
-                int result = ranges[i].compareBoundaryPoints( how, ranges[j] );
-                assert( 
-                    "Compare returned the wrong value i="+i+" j="+j + " result="+result,
-                    result == results[i][j] 
-                );
-            }
-        }
-    }
-
-    /**
-     * Using all of the sample ranges from section 2.1 of the DOM
-     * specification, compare each starting point to every other 
-     * starting point.
-     */
-    public void testCompareStartToStart()
-    {
-        doTestCompare( Range.START_TO_START, results_START_TO_START );
-    }
-
-    /**
-     * Using all of the sample ranges from section 2.1 of the DOM
-     * specification, compare each starting point to every other 
-     * ending point.
-     */
-    public void testCompareStartToEnd()
-    {
-        doTestCompare( Range.START_TO_END, results_START_TO_END );
-    }
-
-    /**
-     * Using all of the sample ranges from section 2.1 of the DOM
-     * specification, compare each ending point to every other 
-     * starting point.
-     */
-    public void testCompareEndToStart()
-    {
-        doTestCompare( Range.END_TO_START, results_END_TO_START );
-    }
-    
-    /**
-     * Using all of the sample ranges from section 2.1 of the DOM
-     * specification, compare each ending point to every other 
-     * ending point.
-     */
-    public void testCompareEndToEnd()
-    {
-        doTestCompare( Range.END_TO_END, results_END_TO_END );
-    }
-
-    /**
-     * Returns the set of all tests in this class
-     */
-    public static junit.framework.Test suite() {
-        return new TestSuite( TestCompare.class );
-    }
-
-    /**
-     * Utility for invoking the class from the command line.
-     */
-    public static void main (String[] args) {
-            junit.textui.TestRunner.run (suite());
-    }
-
-}
-
diff --git a/tests/dom/serialize/TestSerializeDOMIn.java b/tests/dom/serialize/TestSerializeDOMIn.java
deleted file mode 100644
index a1a410c..0000000
--- a/tests/dom/serialize/TestSerializeDOMIn.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom.serialize;
-import java.io.ObjectInputStream;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.dom.DeferredDocumentImpl;
-import org.w3c.dom.NodeList;
-import org.apache.xerces.dom.NodeImpl;
-import org.w3c.dom.Document;
-import java.io.FileInputStream;
-import org.w3c.dom.Node;
-import dom.Writer;
-import dom.serialize.*;
-
-
-/**
- * This testcase tests the Java Serialization
- * of the DOM.
- * I wrote this to test this capability for
- * regresion
- * 
- * @author Jeffrey Rodriguez
- * @version $id$
- * @see                      TestSerializeDOMIn
- */
-public class TestSerializeDOMIn {
-
-    public TestSerializeDOMIn() {
-    }
-
-
-    /**
-     * Serializes Java DOM Object 
-     * 
-     * @param nameSerializeFile
-     * @return 
-     */
-    public DocumentImpl deserializeDOM( String nameSerializedFile ){
-        ObjectInputStream in   = null;
-        DocumentImpl      doc  = null;
-        try {
-
-            FileInputStream fileIn = new FileInputStream( nameSerializedFile );
-            in                     = new ObjectInputStream(fileIn);
-            doc                    = (DocumentImpl) in.readObject();//Deserialize object
-        } catch ( Exception ex ) {
-            ex.printStackTrace();
-        }
-        return doc;
-    }
-
-
-    public static void main( String argv[]  ){
-        if ( argv.length != 2 ) {
-            System.out.println("Error - Usage: java TestSerializeDOMIn yourFile.ser elementName" );
-            System.exit(1);
-        }
-
-        String    xmlFilename = argv[0];
-
-        TestSerializeDOMIn         tst  = new TestSerializeDOMIn();
-        DocumentImpl   doc  = tst.deserializeDOM( xmlFilename );
-
-        NodeList nl         = doc.getElementsByTagName( argv[1]);
-
-
-        int length      = nl.getLength();
-
-        if ( length == 0 )
-            System.out.println(argv[1] + ": is not in the document!");
-
-        NodeImpl node = null;
-        for ( int i = 0;i<length;i++ ){
-            node                = (NodeImpl) nl.item(i);
-            Node childOfElement = node.getFirstChild();
-            if ( childOfElement != null ){
-                System.out.println( node.getNodeName() + ": " +
-                                    childOfElement.getNodeValue() );
-            }
-        }
-        try {
-           Writer prettyWriter = new Writer( false );
-           System.out.println( "Here is the whole Document" );
-           prettyWriter.write(  doc.getDocumentElement() );
-        } catch( Exception ex ){
-        }
-    }
-}
diff --git a/tests/dom/serialize/TestSerializeDOMOut.java b/tests/dom/serialize/TestSerializeDOMOut.java
deleted file mode 100644
index 9246695..0000000
--- a/tests/dom/serialize/TestSerializeDOMOut.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom.serialize;
-import java.io.ObjectOutputStream;
-import org.apache.xerces.parsers.DOMParser;
-import org.apache.xerces.dom.DocumentImpl;
-import org.apache.xerces.dom.DeferredDocumentImpl;
-import org.w3c.dom.NodeList;
-import org.apache.xerces.dom.NodeImpl;
-import org.w3c.dom.Document;
-import java.io.FileOutputStream;
-import org.w3c.dom.Node;
-import dom.Writer;
-
-
-/**
- * This testcase tests the Java Serialization
- * of the DOM.
- * I wrote this to test this capability for
- * regresion
- * 
- * @author Jeffrey Rodriguez
- * @version $id$
- * @see                      TestSerializeDOMOut
- */
-
-
-public class TestSerializeDOMOut
-{          
-
-    public TestSerializeDOMOut(){
-    }
-
-      /**
-     * Deserializes Java DOM Object 
-     * 
-     * @param nameSerializeFile
-     * @return 
-     */
-    public void serializeDOM( Document doc, String nameSerializedFile ){
-        try {
-            ObjectOutputStream out               =
-                              new ObjectOutputStream( new FileOutputStream( nameSerializedFile ) );
-            out.writeObject(doc);
-            out.close();
-
-        } catch ( Exception ex ) {
-            ex.printStackTrace();
-        }
-    }
-
-
-    public static void main (String[] argv) 
-    { 
-
-        if ( argv.length != 1 ) {
-            System.out.println("Error - Usage: java TestOut yourFile.xml" );
-            System.exit(1);
-        }
-
-        String    xmlFilename = argv[0];
-
-
-        try {
-            DOMParser parser     = new DOMParser();
-
-            parser.parse( xmlFilename ); 
-
-            DocumentImpl doc     = (DocumentImpl) parser.getDocument();
-
-            int indexOfextension = xmlFilename.indexOf("." );
-
-
-
-            String nameOfSerializedFile = null;
-
-            if ( indexOfextension == -1 ) {
-                nameOfSerializedFile = xmlFilename +".ser" ;
-            } else {
-                nameOfSerializedFile = 
-                xmlFilename.substring(0,indexOfextension) + ".ser";
-            }
-
-            System.out.println( "Writing Serialize DOM  to file = " + nameOfSerializedFile ); 
-
-
-            FileOutputStream fileOut =  new FileOutputStream( nameOfSerializedFile );
-
-
-            TestSerializeDOMOut  tstOut = new TestSerializeDOMOut();
-
-            tstOut.serializeDOM( doc, nameOfSerializedFile );
-
-
-            System.out.println( "Reading Serialize DOM from " + nameOfSerializedFile );
-
-
-            TestSerializeDOMIn    tstIn  = new TestSerializeDOMIn();
-            doc           = tstIn.deserializeDOM( nameOfSerializedFile );
-
-            Writer prettyWriter = new Writer( false );
-            System.out.println( "Here is the whole Document" );
-            prettyWriter.write(  doc.getDocumentElement() );
-        } catch ( Exception ex ){
-            ex.printStackTrace();
-        }
-    } 
-}
-
diff --git a/tests/dom/treewalker/TestFirstChild.java b/tests/dom/treewalker/TestFirstChild.java
deleted file mode 100644
index 8ef1611..0000000
--- a/tests/dom/treewalker/TestFirstChild.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally developed by Christian Geuer-Pollmann.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package dom.treewalker;
-import java.io.*;
-import javax.xml.parsers.*;
-import org.w3c.dom.*;
-import org.w3c.dom.traversal.*;
-import org.xml.sax.*;
-
-
-/**
- * The class tests TreeWalkerImpl.firstChild() and TreeWalkerImpl.nextSibling();
- * The class generates simple XML document and traverses it.
- * 
- * @author Christian Geuer-Pollmann <geuer-pollmann@nue.et-inf.uni-siegen.de>
- * @version $Id$
- */
-public class TestFirstChild {
-
-    public static void main(String args[]) throws Exception {
-
-
-        System.out.println(" --- "
-                           + org.apache.xerces.impl.Version.fVersion
-                           + " --- ");
-        Document doc = getNodeSet1();
-        NodeFilter nodefilter = null;
-        boolean entityReferenceExpansion = true;
-        int whatToShow = NodeFilter.SHOW_ALL;
-        TreeWalker treewalker =
-        ((DocumentTraversal) doc).createTreeWalker(doc, whatToShow,
-                                                   nodefilter, entityReferenceExpansion);
-        ByteArrayOutputStream bytearrayoutputstream =
-        new ByteArrayOutputStream();
-        PrintWriter printwriter =
-        new PrintWriter(new OutputStreamWriter(bytearrayoutputstream,
-                                               "UTF8"));
-
-        process2(treewalker, printwriter);
-        printwriter.flush();
-
-        System.out.println();
-        System.out.println("Testing the following XML document:\n" + new String(bytearrayoutputstream.toByteArray()));
-    }
-
-    /**
-     * Method getNodeSet1
-     *
-     * @return
-     * @throws ParserConfigurationException
-     */
-    private static Document getNodeSet1()
-    throws ParserConfigurationException {
-
-        DocumentBuilderFactory dfactory =
-        DocumentBuilderFactory.newInstance();
-
-        dfactory.setValidating(false);
-        dfactory.setNamespaceAware(true);
-
-        DocumentBuilder db = dfactory.newDocumentBuilder();
-        Document doc = db.newDocument();
-        Element root = doc.createElement("RootElement");
-        Element e1 = doc.createElement("Element1");
-        Element e2 = doc.createElement("Element2");
-        Element e3 = doc.createElement("Element3");
-        Text e3t = doc.createTextNode("Text in Element3");
-
-        e3.appendChild(e3t);
-        root.appendChild(e1);
-        root.appendChild(e2);
-        root.appendChild(e3);
-        doc.appendChild(root);
-
-        String s1 ="<RootElement><Element1/><Element2/><Element3>Text in Element3</Element3></RootElement>";
-
-        return doc;
-    }
-
-    /**
-     * recursively traverses the tree
-     *
-     * for simplicity, I don't handle comments, Attributes, PIs etc.
-     * Only Text, Document and Element
-     *
-     * @param treewalker
-     * @param printwriter
-     */
-    private static void process2(TreeWalker treewalker,
-                                 PrintWriter printwriter) {
-
-        Node currentNode = treewalker.getCurrentNode();
-
-        switch (currentNode.getNodeType()) {
-        
-        case Node.TEXT_NODE :
-        case Node.CDATA_SECTION_NODE :
-            printwriter.print(currentNode.getNodeValue());
-            break;
-
-        case Node.ENTITY_REFERENCE_NODE :
-        case Node.DOCUMENT_NODE :
-        case Node.ELEMENT_NODE :
-        default :
-            if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
-                printwriter.print('<');
-                printwriter.print(currentNode.getNodeName());
-                printwriter.print(">");
-            }
-
-            Node node1 = treewalker.firstChild();
-
-            if (node1 == null) {
-                System.out.println(getNodeTypeString(currentNode.getNodeType())
-                                   + "_NODE parent: "
-                                   + currentNode.getNodeName()
-                                   + " has no children ");
-            }
-            else {
-                System.out.println(getNodeTypeString(currentNode.getNodeType())
-                                   + "_NODE parent: "
-                                   + currentNode.getNodeName()
-                                   + " has children ");
-
-                while (node1 != null) {
-                    {
-                        String qStr = "";
-
-                        for (Node q = node1; q != null; q = q.getParentNode()) {
-                            qStr = q.getNodeName() + "/" + qStr;
-                        }
-
-                        System.out.println(getNodeTypeString(currentNode.getNodeType())
-                                           + "_NODE process child " + qStr);
-                    }
-
-
-                    // recursion !!!
-                    process2(treewalker, printwriter);
-
-                    node1 = treewalker.nextSibling();
-                    if (node1 != null) {
-                        System.out.println("treewalker.nextSibling() = "
-                                           + node1.getNodeName());
-                    }
-                } // while(node1 != null)
-            }
-
-            System.out.println("setCurrentNode() back to "
-                               + currentNode.getNodeName());
-            treewalker.setCurrentNode(currentNode);
-
-            if (currentNode.getNodeType() == Node.ELEMENT_NODE) {
-                printwriter.print("</");
-                printwriter.print(currentNode.getNodeName());
-                printwriter.print(">");
-            }
-
-            break;
-        }
-    }
-
-    /** Field nodeTypeString */
-    private static String[] nodeTypeString = new String[]{ "", "ELEMENT",
-        "ATTRIBUTE",
-        "TEXT_NODE",
-        "CDATA_SECTION",
-        "ENTITY_REFERENCE",
-        "ENTITY",
-        "PROCESSING_INSTRUCTION",
-        "COMMENT",
-        "DOCUMENT",
-        "DOCUMENT_TYPE",
-        "DOCUMENT_FRAGMENT",
-        "NOTATION"};
-
-
-
-    /**
-     *    
-     *  Transforms <code>org.w3c.dom.Node.XXX_NODE</code> NodeType values into
-     *  XXX Strings.
-     * 
-     *  @param nodeType as taken from the {@link org.w3c.dom.Node#getNodeType}
-     * function
-     *  @return the String value.
-     *  @see org.w3c.dom.Node#getNodeType
-     * @param nodeType
-     * @return 
-     */
-    public static String getNodeTypeString(short nodeType) {
-
-        if ((nodeType > 0) && (nodeType < 13)) {
-            return nodeTypeString[nodeType];
-        }
-        else {
-            return "";
-        }
-    }
-
-}
diff --git a/tests/dom/util/Assertion.java b/tests/dom/util/Assertion.java
deleted file mode 100644
index ffd0e89..0000000
--- a/tests/dom/util/Assertion.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/* $Id$ */
-/*
- * The Apache Software License, Version 1.1
- * 
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- * 
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- * 
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache\@apache.org.
- * 
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- * 
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- * 
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation, and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com .  For more information
- * on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-/**
- * A simple Assertion class (a hack really ;-) to report the source line number
- * where an assertion fails.
- */
-
-
-package dom.util;
-
-import java.io.StringWriter;
-import java.io.PrintWriter;
-
-public class Assertion {
-
-    public static boolean assert(boolean result) {
-	return assert(result, null);
-    }
-
-    public static boolean assert(boolean result, String error) {
-	if (!result) {
-	    System.err.print("Assertion failed: ");
-	    if (error != null) {
-		System.err.print(error);
-	    }
-	    System.err.println();
-	    System.err.println(getSourceLocation());
-	}
-	return result;
-    }
-
-    public static boolean equals(String s1, String s2) {
-        boolean result = ((s1 != null && s1.equals(s2))
-			  || (s1 == null && s2 == null));
-	if (!result) {
-	    assert(result);
-	    System.err.println("  was: equals(" + s1 + ", \"" + s2 + "\")");
-	}
-	return result;
-    }
-
-    public static String getSourceLocation() {
-	RuntimeException ex = new RuntimeException("assertion failed");
-	StringWriter writer = new StringWriter();
-	PrintWriter printer = new PrintWriter(writer);
-	ex.printStackTrace(printer);
-	String buf = writer.toString();
-	// skip the first line as well as every line related to this class
-	int index = buf.lastIndexOf("dom.util.Assertion.");
-	index = buf.indexOf('\n', index);
-	return buf.substring(index + 1);
-    }
-}
diff --git a/tests/io/UTF8.java b/tests/io/UTF8.java
deleted file mode 100644
index eb94a0b..0000000
--- a/tests/io/UTF8.java
+++ /dev/null
@@ -1,503 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2000 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:  
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written 
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.apache.org.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-package io;
-
-import java.io.EOFException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.apache.xerces.impl.io.UTF8Reader;
-
-/**
- * This program tests the customized UTF-8 reader for the parser,
- * comparing it with the Java UTF-8 reader. Interestingly, when
- * reading character by character (as opposed to block character
- * reads), the Java reader silently skips surrogate characters
- * on the input! I've seen this behavior in 1.1.8, 1.2, and 1.3
- * under the Windows platform.
- *
- * @author Andy Clark, IBM
- *
- * @version $Id$
- */
-public class UTF8 {
-
-    //
-    // MAIN
-    //
-
-    /** Main program entry. */
-    public static void main(String[] argv) throws Exception {
-
-        final int BLOCK_READ_SIZE = 2048;
-
-        //
-        // Test Java reference implementation of UTF-8 decoder
-        //
-
-        System.err.println("#");
-        System.err.println("# Testing Java UTF-8 decoder");
-        System.err.println("#");
-
-        // test character by character
-        try {
-            InputStream stream = new UTF8Producer();
-            Reader reader = new InputStreamReader(stream, "UTF8");
-            long time = testCharByChar(reader);
-            System.err.println("PASS ("+time+" ms)");
-            reader.close();
-        } 
-        catch (IOException e) {
-            System.err.println("FAIL: "+e.getMessage());
-        }
-        
-        // test character array
-        try {
-            InputStream stream = new UTF8Producer();
-            Reader reader = new InputStreamReader(stream, "UTF8");
-            long time = testCharArray(reader, BLOCK_READ_SIZE);
-            System.err.println("PASS ("+time+" ms)");
-            reader.close();
-        } 
-        catch (IOException e) {
-            System.err.println("FAIL: "+e.getMessage());
-        }
-        
-        //
-        // Test custom implementation of UTF-8 decoder
-        //
-
-        System.err.println("#");
-        System.err.println("# Testing custom UTF-8 decoder");
-        System.err.println("#");
-
-        // test character by character
-        try {
-            InputStream stream = new UTF8Producer();
-            Reader reader = new UTF8Reader(stream);
-            long time = testCharByChar(reader);
-            System.err.println("PASS ("+time+" ms)");
-            reader.close();
-        } 
-        catch (IOException e) {
-            System.err.println("FAIL: "+e.getMessage());
-        }
-        
-        // test character array
-        try {
-            InputStream stream = new UTF8Producer();
-            Reader reader = new UTF8Reader(stream);
-            long time = testCharArray(reader, BLOCK_READ_SIZE);
-            System.err.println("PASS ("+time+" ms)");
-            reader.close();
-        } 
-        catch (IOException e) {
-            System.err.println("FAIL: "+e.getMessage());
-        }
-        
-    } // main(String[])
-
-    //
-    // Public static methods
-    //
-
-    /** This function tests the specified reader character by character. */
-    public static long testCharByChar(Reader reader) throws Exception {
-
-        long before = System.currentTimeMillis();
-        System.err.println("# Testing character by character");
-
-        System.err.println("testing 0x000000 -> 0x00007F");
-        for (int i = 0; i < 0x0080; i++) {
-            int c = reader.read();
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x000080 -> 0x0007FF");
-        for (int i = 0x0080; i < 0x0800; i++) {
-            int c = reader.read();
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x000800 -> 0x00D7FF");
-        for (int i = 0x0800; i < 0xD800; i++) {
-            int c = reader.read();
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x00E000 -> 0x00FFFF");
-        for (int i = 0xE000; i < 0x010000; i++) {
-            int c = reader.read();
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x010000 -> 0x110000");
-        for (int i = 0x10000; i < 0x110000; i++) {
-            // vars
-            int uuuuu = (i >> 16) & 0x001F;
-            int wwww = uuuuu - 1;
-            int zzzz = (i >> 12) & 0x000F;
-            int yyyyyy = (i >> 6) & 0x003F;
-            int xxxxxx = i & 0x003F;
-            int hs = 0xD800 | (wwww << 6) | (zzzz << 2) | (yyyyyy >> 4);
-            int ls = 0xDC00 | ((yyyyyy << 6) & 0x03C0) | xxxxxx;
-            // high surrogate
-            int c = reader.read();
-            if (c != hs) {
-                expectedChar("high surrogate", hs, c);
-            }
-            // low surrogate
-            c = reader.read();
-            if (c != ls) {
-                expectedChar("low surrogate", ls, c);
-            }
-        }
-        System.err.println("checking EOF");
-        int c = reader.read();
-        if (c != -1) {
-            extraChar(c);
-        }
-        long after = System.currentTimeMillis();
-
-        return after - before;
-
-    } // testCharByChar(Reader):long
-
-    /**
-     * This function tests the given reader by performing block character
-     * reads of the specified size.
-     */
-    public static long testCharArray(Reader reader, int size) throws Exception {
-
-        long before = System.currentTimeMillis();
-        System.err.println("# Testing character array of size "+size);
-
-        char[] ch = new char[size];
-        int count = 0;
-        int position = 0;
-
-        System.err.println("testing 0x000000 -> 0x00007F");
-        for (int i = 0; i < 0x0080; i++) {
-            if (position == count) {
-                count = load(reader, ch);
-                position = 0;
-            }
-            int c = ch[position++];
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x000080 -> 0x0007FF");
-        for (int i = 0x0080; i < 0x0800; i++) {
-            if (position == count) {
-                count = load(reader, ch);
-                position = 0;
-            }
-            int c = ch[position++];
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x000800 -> 0x00D7FF");
-        for (int i = 0x0800; i < 0xD800; i++) {
-            if (position == count) {
-                count = load(reader, ch);
-                position = 0;
-            }
-            int c = ch[position++];
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x00E000 -> 0x00FFFF");
-        for (int i = 0xE000; i < 0x010000; i++) {
-            if (position == count) {
-                count = load(reader, ch);
-                position = 0;
-            }
-            int c = ch[position++];
-            if (c != i) {
-                expectedChar(null, i, c);
-            }
-        }
-        System.err.println("testing 0x010000 -> 0x110000");
-        for (int i = 0x10000; i < 0x110000; i++) {
-            // vars
-            int uuuuu = (i >> 16) & 0x001F;
-            int wwww = uuuuu - 1;
-            int zzzz = (i >> 12) & 0x000F;
-            int yyyyyy = (i >> 6) & 0x003F;
-            int xxxxxx = i & 0x003F;
-            int hs = 0xD800 | (wwww << 6) | (zzzz << 2) | (yyyyyy >> 4);
-            int ls = 0xDC00 | ((yyyyyy << 6) & 0x03C0) | xxxxxx;
-            // high surrogate
-            if (position == count) {
-                count = load(reader, ch);
-                position = 0;
-            }
-            int c = ch[position++];
-            if (c != hs) {
-                expectedChar("high surrogate", hs, c);
-            }
-            // low surrogate
-            if (position == count) {
-                count = load(reader, ch);
-                position = 0;
-            }
-            c = ch[position++];
-            if (c != ls) {
-                expectedChar("low surrogate", ls, c);
-            }
-        }
-        System.err.println("checking EOF");
-        if (position == count) {
-            count = load(reader, ch);
-            position = 0;
-        }
-        if (count != -1) {
-            extraChar(ch[position]);
-        }
-        long after = System.currentTimeMillis();
-
-        return after - before;
-
-    } // testCharArray(Reader):long
-
-    //
-    // Private static methods
-    //
-
-    /** Loads another block of characters from the reader. */
-    private static int load(Reader reader, char[] ch) throws IOException {
-        int count = reader.read(ch, 0, ch.length);
-        return count;
-    } // load(Reader,char[]):int
-
-    /** Creates an I/O exception for expected character. */
-    private static void expectedChar(String prefix, int ec, int fc) throws IOException {
-        StringBuffer str = new StringBuffer();
-        str.append("expected ");
-        if (prefix != null) {
-            str.append(prefix);
-            str.append(' ');
-        }
-        str.append("0x");
-        str.append(Integer.toHexString(ec));
-        str.append(" but found 0x");
-        if (fc != -1) {
-            str.append(Integer.toHexString(fc));
-        }
-        else {
-            str.append("EOF");
-        }
-        String message = str.toString();
-        throw new IOException(message);
-    } // expectedChar(String,int,int)
-
-    /** Creates an I/O exception for extra character. */
-    private static void extraChar(int c) throws IOException {
-        StringBuffer str = new StringBuffer();
-        str.append("found extra character 0x");
-        str.append(Integer.toHexString(c));
-        String message = str.toString();
-        throw new IOException(message);
-    } // extraChar(int)
-
-    //
-    // Classes
-    //
-
-    /**
-     * This classes produces a stream of UTF-8 byte sequences for all 
-     * valid Unicode characters.
-     *
-     * @author Andy Clark, IBM
-     */
-    public static class UTF8Producer
-        extends InputStream {
-
-        //
-        // Data
-        //
-
-        /** The current code point. */
-        private int fCodePoint;
-
-        /** The current byte of the current code point. */
-        private int fByte;
-
-        //
-        // InputStream methods
-        //
-
-        /** Reads the next character. */
-        public int read() throws IOException {
-
-            // UTF-8:   [0xxx xxxx]
-            // Unicode: [0000 0000] [0xxx xxxx]
-            if (fCodePoint < 0x0080) {
-                int b = fCodePoint;
-                fCodePoint++;
-                fByte = 0;
-                return b;
-            }
-
-            // UTF-8:   [110y yyyy] [10xx xxxx]
-            // Unicode: [0000 0yyy] [yyxx xxxx]
-            if (fCodePoint < 0x0800) {
-                switch (fByte) {
-                    case 0: {
-                        int b = 0x00C0 | ((fCodePoint >> 6) & 0x001F);
-                        fByte++;
-                        return b;
-                    }
-                    case 1: {
-                        int b = 0x0080 | (fCodePoint & 0x003F);
-                        fCodePoint++;
-                        fByte = 0;
-                        return b;
-                    }
-                    default: {
-                        throw new RuntimeException("byte "+fByte+" of 2 byte UTF-8 sequence");
-                    }
-                }
-            }
-
-            // UTF-8:   [1110 zzzz] [10yy yyyy] [10xx xxxx]
-            // Unicode: [zzzz yyyy] [yyxx xxxx]*
-            if (fCodePoint < 0x10000) {
-                switch (fByte) {
-                    case 0: {
-                        int b = 0x00E0 | ((fCodePoint >> 12) & 0x000F);
-                        fByte++;
-                        return b;
-                    }
-                    case 1: {
-                        int b = 0x0080 | ((fCodePoint >> 6) & 0x003F);
-                        fByte++;
-                        return b;
-                    }
-                    case 2: {
-                        int b = 0x0080 | (fCodePoint & 0x003F);
-                        fCodePoint++;
-                        // skip surrogate blocks
-                        if (fCodePoint == 0xD800) {
-                            fCodePoint = 0xE000;
-                        }
-                        fByte = 0;
-                        return b;
-                    }
-                    default: {
-                        throw new RuntimeException("byte "+fByte+" of 3 byte UTF-8 sequence");
-                    }
-                }
-            }
-
-            // UTF-8:   [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]*
-            // Unicode: [1101 10ww] [wwzz zzyy] (high surrogate)
-            //          [1101 11yy] [yyxx xxxx] (low surrogate)
-            //          * uuuuu = wwww + 1
-            //          [0000 0000] [000u uuuu] [zzzz yyyy] [yyxx xxxx]
-            if (fCodePoint < 0x110000) {
-                switch (fByte) {
-                    case 0: {
-                        int uuuuu = (fCodePoint >> 16) & 0x001F;
-                        int b = 0x00F0 | (uuuuu >> 2);
-                        fByte++;
-                        return b;
-                    }
-                    case 1: {
-                        int uuuuu = (fCodePoint >> 16) & 0x001F;
-                        int zzzz = (fCodePoint >> 12) & 0x000F;
-                        int b = 0x0080 | ((uuuuu << 4) & 0x0030) | zzzz;
-                        fByte++;
-                        return b;
-                    }
-                    case 2: {
-                        int yyyyyy = (fCodePoint >> 6) & 0x003F;
-                        int b = 0x0080 | yyyyyy;
-                        fByte++;
-                        return b;
-                    }
-                    case 3: {
-                        int xxxxxx = fCodePoint & 0x003F;
-                        int b = 0x0080 | xxxxxx;
-                        fCodePoint++;
-                        fByte = 0;
-                        return b;
-                    }
-                    default: {
-                        throw new RuntimeException("byte "+fByte+" of 4 byte UTF-8 sequence");
-                    }
-                }
-            }
-            
-            // done
-            return -1;
-
-        } // read():int
-
-    } // class UTF8Producer
-
-} // class UTF8
diff --git a/tests/thread/Test.java b/tests/thread/Test.java
deleted file mode 100644
index 9f7cd34..0000000
--- a/tests/thread/Test.java
+++ /dev/null
@@ -1,891 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- *    if any, must include the following acknowledgment:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowledgment may appear in the software itself,
- *    if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xerces" and "Apache Software Foundation" must
- *    not be used to endorse or promote products derived from this
- *    software without prior written permission. For written
- *    permission, please contact apache\@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- *    nor may "Apache" appear in their name, without prior written
- *    permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation, and was
- * originally based on software copyright (c) 1999, International
- * Business Machines, Inc., http://www.ibm.com .  For more information
- * on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-/**
- * $Id$
- *
- * This program is a straight port of xerces/c/tests/ThreadTest.cpp
- * No particular effort has been made to make it more java-like (who cares
- * besides a few biggots? ;-)
- *
- * @author Andy Heninger, IBM (C++ version)
- * @author Arnaud  Le Hors, IBM
- */
-
-package thread;
-
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
-import org.apache.xerces.parsers.SAXParser;
-import org.apache.xerces.parsers.DOMParser;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStreamReader;
-import java.io.IOException;
-import java.io.StringReader;
-
-public class Test {
-
-
-//------------------------------------------------------------------------------
-//
-//  struct InFileInfo   One of these structs will be set up for each file listed
-//                      on the command line.  Once set, the data is unchanging
-//                      and can safely be referenced by the test threads without
-//                      use of synchronization.
-//
-//------------------------------------------------------------------------------
-class InFileInfo
-{
-    public String fileName;
-    public String fileContent; // If doing an in-memory parse, this field points
-                             //   to an allocated string containing the entire file
-                             //   contents.  Otherwise it's 0.
-    int     checkSum;        // The XML checksum.  Set up by the main thread for
-                             //   each file before the worker threads are started.
-}
-
-//------------------------------------------------------------------------------
-//
-//  struct runInfo     Holds the info extracted from the command line.
-//                     There is only one of these, and it is static, and
-//                     unchanging once the command line has been parsed.
-//                     During the test, the threads will access this info without
-//                     any synchronization.
-//
-//------------------------------------------------------------------------------
-final int MAXINFILES = 25;
-class RunInfo
-{
-    boolean     quiet;
-    boolean     verbose;
-    int         numThreads;
-    boolean     validating;
-    boolean     dom;
-    boolean     reuseParser;
-    boolean     inMemory;
-    boolean     dumpOnErr;
-    int         totalTime;
-    int         numInputFiles;
-    InFileInfo  files[] = new InFileInfo[MAXINFILES];
-}
-
-
-//------------------------------------------------------------------------------
-//
-//  struct threadInfo  Holds information specific to an individual thread.
-//                     One of these is set up for each thread in the test.
-//                     The main program monitors the threads by looking
-//                     at the status stored in these structs.
-//
-//------------------------------------------------------------------------------
-class ThreadInfo
-{
-    boolean    fHeartBeat;      // Set true by the thread each time it finishes
-                                //   parsing a file.
-    int        fParses;         // Number of parses completed.
-    int        fThreadNum;      // Identifying number for this thread.
-
-    ThreadInfo() {
-        fHeartBeat = false;
-        fParses = 0;
-        fThreadNum = -1;
-    }
-}
-
-
-//
-//------------------------------------------------------------------------------
-//
-//  Global Data
-//
-//------------------------------------------------------------------------------
-RunInfo         gRunInfo = new RunInfo();
-ThreadInfo      gThreadInfo[];
-
-
-
-//------------------------------------------------------------------------------
-//
-//  class ThreadParser   Bundles together a SAX parser and the SAX handlers
-//                       and contains the API that the rest of this test
-//                       program uses for creating parsers and doing parsing.
-//
-//                       Multiple instances of this class can operate concurrently
-//                       in different threads.
-//
-//-------------------------------------------------------------------------------
-class ThreadParser extends HandlerBase
-{
-    private int           fCheckSum;
-    private SAXParser     fSAXParser;
-    private DOMParser     fDOMParser;
-
-
-    // Not really public,
-    //  These are the SAX call-back functions
-    //  that this class implements.
-    public void characters(char chars[], int start, int length) {
-        addToCheckSum(chars, start, length);}
-    public void ignorableWhitespace(char chars[], int start, int length) {
-        addToCheckSum(chars, start, length);}
-
-    public void warning(SAXParseException ex)     {
-        System.err.print("*** Warning "+
-                         ex.getMessage());}
-
-    public void error(SAXParseException ex)       {
-        System.err.print("*** Error "+
-                         ex.getMessage());}
-
-    public void fatalError(SAXParseException ex)  {
-        System.err.print("***** Fatal error "+
-                         ex.getMessage());}
-
-//
-//  ThreadParser constructor.  Invoked by the threads of the test program
-//                              to create parsers.
-//
-ThreadParser()
-{
-    if (gRunInfo.dom) {
-        // Set up to use a DOM parser
-        fDOMParser = new org.apache.xerces.parsers.DOMParser();
-        try {
-            fDOMParser.setFeature( "http://xml.org/sax/features/validation", 
-                                   gRunInfo.validating);
-        }
-        catch (Exception e) {}
-        fDOMParser.setErrorHandler(this);
-    }
-    else
-    {
-        // Set up to use a SAX parser.
-        fSAXParser = new org.apache.xerces.parsers.SAXParser();
-        try {
-            fSAXParser.setFeature( "http://xml.org/sax/features/validation", 
-                                   gRunInfo.validating);
-        }
-        catch (Exception e) {}
-        fSAXParser.setDocumentHandler(this);
-        fSAXParser.setErrorHandler(this);
-    }
-
-}
-
-//------------------------------------------------------------------------
-//
-//  parse   - This is the method that is invoked by the rest of
-//            the test program to actually parse an XML file.
-//
-// @param fileNum is an index into the gRunInfo.files array.
-// @return the XML checksum, or 0 if a parse error occured.
-//
-//------------------------------------------------------------------------
-int parse(int fileNum)
-{
-    InputSource mbis = null;
-    InFileInfo  fInfo = gRunInfo.files[fileNum];
-
-    fCheckSum = 0;
-
-    if (gRunInfo.inMemory) {
-        mbis = new InputSource(new StringReader(fInfo.fileContent));
-    }
-
-    try
-    {
-        if (gRunInfo.dom) {
-            // Do a DOM parse
-            if (gRunInfo.inMemory)
-                fDOMParser.parse(mbis);
-            else
-                fDOMParser.parse(fInfo.fileName);
-            Document doc = fDOMParser.getDocument();
-            domCheckSum(doc);
-        }
-        else
-        {
-            // Do a SAX parse
-            if (gRunInfo.inMemory)
-                fSAXParser.parse(mbis);
-            else
-                fSAXParser.parse(fInfo.fileName);
-        }
-    }
-
-    catch (SAXException e)
-    {
-        String exceptionMessage = e.getMessage();
-        System.err.println(" during parsing: " + fInfo.fileName +
-                           " Exception message is: " + exceptionMessage);
-    }
-    catch (IOException e)
-    {
-        String exceptionMessage = e.getMessage();
-        System.err.println(" during parsing: " + fInfo.fileName +
-                           " Exception message is: " + exceptionMessage);
-    }
-
-    return fCheckSum;
-}
-
-
-//
-//  addToCheckSum - private function, used within ThreadParser in
-//                  computing the checksum of the XML file.
-//
-private void addToCheckSum(char chars[], int start, int len)
-{
-    // String with character count.
-    int i;
-    for (i=start; i<len; i++)
-        fCheckSum = fCheckSum*5 + chars[i];
-}
-
-//
-//  addToCheckSum - private function, used within ThreadParser in
-//                  computing the checksum of the XML file.
-//
-private void addToCheckSum(String chars)
-{
-    int i;
-    int len = chars.length();
-    for (i=0; i<len; i++)
-        fCheckSum = fCheckSum*5 + chars.charAt(i);
-}
-
-
-
-//
-// startElement - our SAX handler callback function for element starts.
-//                update the document checksum with the element name
-//                and any attribute names and values.
-//
-public void startElement(String name, AttributeList attributes)
-{
-    addToCheckSum(name);
-
-    int n = attributes.getLength();
-    int i;
-    for (i=0; i<n; i++)
-    {
-        String attNam = attributes.getName(i);
-        addToCheckSum(attNam);
-        String attVal = attributes.getValue(i);
-        addToCheckSum(attVal);
-    }
-}
-
-
-//
-// domCheckSum  -  Compute the check sum for a DOM node.
-//                 Works recursively - initially called with a document node.
-//
-public void domCheckSum(Node node)
-{
-    String        s;
-    Node          child;
-    NamedNodeMap  attributes;
-
-    switch (node.getNodeType() )
-    {
-    case Node.ELEMENT_NODE:
-        {
-            s = node.getNodeName();   // the element name
-
-            attributes = node.getAttributes();  // Element's attributes
-            int numAttributes = attributes.getLength();
-            int i;
-            for (i=0; i<numAttributes; i++)
-                domCheckSum(attributes.item(i));
-
-            addToCheckSum(s);  // Content and Children
-            for (child=node.getFirstChild(); child!=null; child=child.getNextSibling())
-                domCheckSum(child);
-
-            break;
-        }
-
-
-    case Node.ATTRIBUTE_NODE:
-        {
-            s = node.getNodeName();  // The attribute name
-            addToCheckSum(s);
-            s = node.getNodeValue();  // The attribute value
-            if (s != null)
-                addToCheckSum(s);
-            break;
-        }
-
-
-    case Node.TEXT_NODE:
-    case Node.CDATA_SECTION_NODE:
-        {
-            s = node.getNodeValue();
-            addToCheckSum(s);
-            break;
-        }
-
-    case Node.ENTITY_REFERENCE_NODE:
-    case Node.DOCUMENT_NODE:
-        {
-            // For entity references and the document, nothing is dirctly
-            //  added to the checksum, but we do want to process the chidren nodes.
-            //
-            for (child=node.getFirstChild(); child!=null; child=child.getNextSibling())
-                domCheckSum(child);
-            break;
-        }
-    }
-}
-
-
-//
-// Recompute the checksum.  Meaningful only for DOM, will tell us whether
-//  a failure is transient, or whether the DOM data is permanently corrupted.
-//  for DOM, re-walk the tree.
-//  for SAX, can't do, just return previous value.
-//
-public int reCheck()
-{
-    if (gRunInfo.dom) {
-        fCheckSum = 0;
-        Document doc = fDOMParser.getDocument();
-        domCheckSum(doc);
-    }
-    return fCheckSum;
-}
-
-//
-// domPrint  -  Dump the contents of a DOM document.
-//              For debugging failures, when all else fails.
-//
-public void domPrint()
-{
-    System.out.println("Begin DOMPrint ...");
-    if (gRunInfo.dom)
-        domPrint(fDOMParser.getDocument());
-    System.out.println("End DOMPrint");
-}
-
-//
-// domPrint  -  Dump the contents of a DOM node.
-//              For debugging failures, when all else fails.
-//                 Works recursively - initially called with a document node.
-//
-void domPrint(Node node)
-{
-
-    String        s;
-    Node          child;
-    NamedNodeMap  attributes;
-
-    switch (node.getNodeType() )
-    {
-    case Node.ELEMENT_NODE:
-        {
-            System.out.print("<");
-            System.out.print(node.getNodeName());   // the element name
-
-            attributes = node.getAttributes();  // Element's attributes
-            int numAttributes = attributes.getLength();
-            int i;
-            for (i=0; i<numAttributes; i++) {
-                domPrint(attributes.item(i));
-            }
-            System.out.print(">");
-
-            for (child=node.getFirstChild(); child!=null; child=child.getNextSibling())
-                domPrint(child);
-
-            System.out.print("</");
-            System.out.print(node.getNodeName());
-            System.out.print(">");
-            break;
-        }
-
-
-    case Node.ATTRIBUTE_NODE:
-        {
-            System.out.print(" ");
-            System.out.print(node.getNodeName());   // The attribute name
-            System.out.print("= \"");
-            System.out.print(node.getNodeValue());  // The attribute value
-            System.out.print("\"");
-            break;
-        }
-
-
-    case Node.TEXT_NODE:
-    case Node.CDATA_SECTION_NODE:
-        {
-            System.out.print(node.getNodeValue());
-            break;
-        }
-
-    case Node.ENTITY_REFERENCE_NODE:
-    case Node.DOCUMENT_NODE:
-        {
-            // For entity references and the document, nothing is dirctly
-            //  printed, but we do want to process the chidren nodes.
-            //
-            for (child=node.getFirstChild(); child!=null; child=child.getNextSibling())
-                domPrint(child);
-            break;
-        }
-    }
-}
-
-} // class ThreadParser
-
-
-//----------------------------------------------------------------------
-//
-//   parseCommandLine   Read through the command line, and save all
-//                      of the options in the gRunInfo struct.
-//
-//                      Display the usage message if the command line
-//                      is no good.
-//
-//                      Probably ought to be a member function of RunInfo.
-//
-//----------------------------------------------------------------------
-
-void parseCommandLine(String argv[])
-{
-    gRunInfo.quiet = false;               // Set up defaults for run.
-    gRunInfo.verbose = false;
-    gRunInfo.numThreads = 2;
-    gRunInfo.validating = false;
-    gRunInfo.dom = false;
-    gRunInfo.reuseParser = false;
-    gRunInfo.inMemory = false;
-    gRunInfo.dumpOnErr = false;
-    gRunInfo.totalTime = 0;
-    gRunInfo.numInputFiles = 0;
-
-    try             // Use exceptions for command line syntax errors.
-    {
-        int argnum = 0;
-        int argc = argv.length;
-        while (argnum < argc)
-        {
-            if (argv[argnum].equals("-quiet"))
-                gRunInfo.quiet = true;
-            else if (argv[argnum].equals("-verbose"))
-                gRunInfo.verbose = true;
-            else if (argv[argnum].equals("-v"))
-                gRunInfo.validating = true;
-            else if (argv[argnum].equals("-dom"))
-                gRunInfo.dom = true;
-            else if (argv[argnum].equals("-reuse"))
-                gRunInfo.reuseParser = true;
-            else if (argv[argnum].equals("-dump"))
-                gRunInfo.dumpOnErr = true;
-            else if (argv[argnum].equals("-mem"))
-                gRunInfo.inMemory = true;
-            else if (argv[argnum].equals("-threads"))
-            {
-                ++argnum;
-                if (argnum >= argc)
-                    throw new Exception();
-                try {
-                    gRunInfo.numThreads = Integer.parseInt(argv[argnum]);
-                }
-                catch (NumberFormatException e) {
-                    throw new Exception();
-                }
-                if (gRunInfo.numThreads < 0)
-                    throw new Exception();
-            }
-            else if (argv[argnum].equals("-time"))
-            {
-                ++argnum;
-                if (argnum >= argc)
-                    throw new Exception();
-                try {
-                    gRunInfo.totalTime = Integer.parseInt(argv[argnum]);
-                }
-                catch (NumberFormatException e) {
-                    throw new Exception();
-                }
-                if (gRunInfo.totalTime < 1)
-                    throw new Exception();
-            }
-            else  if (argv[argnum].charAt(0) == '-')
-            {
-                System.err.println("Unrecognized command line option. Scanning"
-                                   + " \"" + argv[argnum] + "\"");
-                throw new Exception();
-            }
-            else
-            {
-                gRunInfo.numInputFiles++;
-                if (gRunInfo.numInputFiles >= MAXINFILES)
-                {
-                    System.err.println("Too many input files. Limit is "
-                                       + MAXINFILES);
-                    throw new Exception();
-                }
-                gRunInfo.files[gRunInfo.numInputFiles-1] = new InFileInfo();
-                gRunInfo.files[gRunInfo.numInputFiles-1].fileName = argv[argnum];
-            }
-            argnum++;
-        }
-
-        // We've made it through the command line.
-        //  Verify that at least one input file to be parsed was specified.
-        if (gRunInfo.numInputFiles == 0)
-        {
-            System.err.println("No input XML file specified on command line.");
-            throw new Exception();
-        };
-
-
-    }
-    catch (Exception e)
-    {
-        System.err.print("usage: java thread.Test [-v] [-threads nnn] [-time nnn] [-quiet] [-verbose] xmlfile...\n" +
-            "     -v             Use validating parser.  Non-validating is default. \n" +
-            "     -dom           Use a DOM parser.  Default is SAX. \n" +
-            "     -quiet         Suppress periodic status display. \n" +
-            "     -verbose       Display extra messages. \n" +
-            "     -reuse         Retain and reuse parser.  Default creates new for each parse.\n" +
-            "     -threads nnn   Number of threads.  Default is 2. \n" +
-            "     -time nnn      Total time to run, in seconds.  Default is forever.\n" +
-            "     -dump          Dump DOM tree on error.\n" +
-            "     -mem           Read files into memory once only, and parse them from there.\n"
-            );
-        System.exit(1);
-    }
-}
-
-
-//---------------------------------------------------------------------------
-//
-//   ReadFilesIntoMemory   For use when parsing from memory rather than
-//                          reading the files each time, here is the code that
-//                          reads the files into local memory buffers.
-//
-//                          This function is only called once, from the main
-//                          thread, before all of the worker threads are started.
-//
-//---------------------------------------------------------------------------
-void ReadFilesIntoMemory()
-{
-    int     fileNum;
-    InputStreamReader fileF;
-    char chars[] = new char[1024];
-    StringBuffer buf = new StringBuffer();
-
-    if (gRunInfo.inMemory)
-    {
-        for (fileNum = 0; fileNum <gRunInfo.numInputFiles; fileNum++)
-        {
-            InFileInfo fInfo = gRunInfo.files[fileNum];
-            buf.setLength(0);
-            try {
-                FileInputStream in = new FileInputStream( fInfo.fileName );
-                fileF = new InputStreamReader(in);
-                int len = 0;
-                while ((len = fileF.read(chars, 0, chars.length)) > 0) {
-                    buf.append(chars, 0, len);
-                }
-                fInfo.fileContent = buf.toString();
-                fileF.close();
-            }
-            catch (FileNotFoundException e) {
-                System.err.print("File not found: \"" +
-                                 fInfo.fileName + "\".");
-                System.exit(-1);
-            }
-            catch (IOException e) {
-                System.err.println("Error reading file \"" +
-                                   fInfo.fileName + "\".");
-                System.exit(-1);
-            }
-        }
-    }
-}
-
-
-
-//----------------------------------------------------------------------
-//
-//  threadMain   The main function for each of the swarm of test threads.
-//               Run in an infinite loop, parsing each of the documents
-//               given on the command line in turn.
-//
-//               There is no return from this fuction, and no graceful
-//               thread termination.  Threads are stuck running here
-//               until the OS shuts them down as a consequence of the
-//               main thread of the process (which never calls this
-//               function) exiting.
-//
-//----------------------------------------------------------------------
-
-
-class thread extends Thread {
-
-    ThreadInfo thInfo;
-
-    thread (ThreadInfo param) {
-        thInfo = param;
-    }
-
-    public void run()
-{
-    ThreadParser thParser = null;
-
-    if (gRunInfo.verbose)
-        System.out.println("Thread " + thInfo.fThreadNum + ": starting");
-
-    int docNum = gRunInfo.numInputFiles;
-
-    //
-    // Each time through this loop, one file will be parsed and its checksum
-    // computed and compared with the precomputed value for that file.
-    //
-    while (true)
-    {
-
-        if (thParser == null)
-            thParser = new ThreadParser();
-
-        docNum++;
-
-        if (docNum >= gRunInfo.numInputFiles)
-            docNum = 0;
-
-        InFileInfo fInfo = gRunInfo.files[docNum];
-
-        if (gRunInfo.verbose )
-            System.out.println("Thread " + thInfo.fThreadNum +
-                               ": starting file " + fInfo.fileName);
-
-
-        int checkSum = 0;
-        checkSum = thParser.parse(docNum);
-
-        if (checkSum != gRunInfo.files[docNum].checkSum)
-        {
-            System.err.println("\nThread " + thInfo.fThreadNum +
-                               ": Parse Check sum error on file  \"" +
-                               fInfo.fileName + "\".  Expected " +
-                               fInfo.checkSum + ",  got " + checkSum);
-
-            // Revisit - let the loop continue to run?
-            int secondTryCheckSum = thParser.reCheck();
-            System.err.println("   Retry checksum is " + secondTryCheckSum);
-            if (gRunInfo.dumpOnErr)
-                thParser.domPrint();
-            System.out.flush();
-            System.exit(-1);
-        }
-
-        if (gRunInfo.reuseParser == false)
-        {
-            thParser = null;
-        }
-
-
-        thInfo.fHeartBeat = true;
-        thInfo.fParses++;
-    }
-} // run():void
-
-} // class thread
-
-
-//----------------------------------------------------------------------
-//
-//   main
-//
-//----------------------------------------------------------------------
-
-void run(String argv[])
-{
-    parseCommandLine(argv);
-
-    //
-    // If we will be parsing from memory, read each of the input files
-    //  into memory now.
-    //
-    ReadFilesIntoMemory();
-
-
-    //
-    // While we are still single threaded, parse each of the documents
-    //  once, to check for errors, and to note the checksum.
-    // Blow off the rest of the test if there are errors.
-    //
-    ThreadParser mainParser = new ThreadParser();
-    int     n;
-    boolean errors = false;
-    int     cksum;
-
-
-    for (n = 0; n < gRunInfo.numInputFiles; n++)
-    {
-        String fileName = gRunInfo.files[n].fileName;
-        if (gRunInfo.verbose)
-            System.out.print(fileName + " checksum is ");
-
-        cksum = mainParser.parse(n);
-
-        if (cksum == 0)
-        {
-            System.err.println("An error occured while initially parsing" +
-                               fileName);
-            errors = true;
-        }
-
-        gRunInfo.files[n].checkSum = cksum;
-        if (gRunInfo.verbose )
-            System.out.println(cksum);
-        if (gRunInfo.dumpOnErr && errors)
-            mainParser.domPrint();
-
-    }
-    if (errors)
-        System.exit(1);
-
-    //
-    //  Fire off the requested number of parallel threads
-    //
-
-    if (gRunInfo.numThreads == 0)
-        return;
-
-    gThreadInfo = new ThreadInfo[gRunInfo.numThreads];
-
-    int threadNum;
-    for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++)
-    {
-        gThreadInfo[threadNum] = new ThreadInfo();
-        gThreadInfo[threadNum].fThreadNum = threadNum;
-        thread t = new thread(gThreadInfo[threadNum]);
-        t.start();
-    }
-
-    //
-    //  Loop, watching the heartbeat of the worker threads.
-    //    Each second, display "+" when all threads have completed a parse
-    //                 display "." if some thread hasn't since previous "+"
-    //
-
-    long startTime = System.currentTimeMillis();
-    long elapsedSeconds = 0;
-    while (gRunInfo.totalTime == 0 || gRunInfo.totalTime > elapsedSeconds)
-    {
-        try {
-            Thread.sleep(1000);
-        }
-        catch (InterruptedException e) {
-            // nobody would dare!! :-)
-        }
-        if (gRunInfo.quiet == false && gRunInfo.verbose == false)
-        {
-            char c = '+';
-            for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++)
-            {
-                if (gThreadInfo[threadNum].fHeartBeat == false)
-                {
-                    c = '.';
-                    break;
-                }
-            }
-            System.out.print(c);
-            System.out.flush();
-            if (c == '+')
-                for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++)
-                    gThreadInfo[threadNum].fHeartBeat = false;
-        }
-        elapsedSeconds = (System.currentTimeMillis() - startTime) / 1000;
-    };
-
-    //
-    //  Time's up, we are done.  (We only get here if this was a timed run)
-    //  Tally up the total number of parses completed by each of the threads.
-    //  To Do:  Run the main thread at higher priority, so that the worker threads
-    //    won't make much progress while we are adding up the results.
-    //
-    double totalParsesCompleted = 0;
-    for (threadNum=0; threadNum < gRunInfo.numThreads; threadNum++)
-    {
-        totalParsesCompleted += gThreadInfo[threadNum].fParses;
-        // printf("%f   ", totalParsesCompleted);
-    }
-
-    double parsesPerMinute =
-        totalParsesCompleted / (((double)gRunInfo.totalTime) / ((double)60));
-    System.out.println("\n" + parsesPerMinute + " parses per minute.");
-
-    //  The threads are still running; we just return
-    //   and leave it to the operating sytem to kill them.
-    //
-    System.exit(0);
-}
-
-static public void main(String argv[]) {
-    Test test = new Test();
-    test.run(argv);
-}
-
-} // class Test
diff --git a/tools/ant.jar b/tools/ant.jar
deleted file mode 100644
index e4efab3..0000000
--- a/tools/ant.jar
+++ /dev/null
Binary files differ
diff --git a/tools/bin/ant b/tools/bin/ant
deleted file mode 100755
index dff60be..0000000
--- a/tools/bin/ant
+++ /dev/null
@@ -1,71 +0,0 @@
-#! /bin/sh
-
-if [ -f $HOME/.antrc ] ; then 
-  . $HOME/.antrc
-fi
-
-if [ "$ANT_HOME" = "" ] ; then
-  # try to find ANT
-  if [ -d /opt/ant ] ; then 
-    ANT_HOME=/opt/ant
-  fi
-
-  if [ -d ${HOME}/opt/ant ] ; then 
-    ANT_HOME=${HOME}/opt/ant
-  fi
-
-  ## resolve links - $0 may be a link to ant's home
-  PRG=$0
-  progname=`basename $0`
-  
-  while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '.*/.*' > /dev/null; then
-	PRG="$link"
-    else
-	PRG="`dirname $PRG`/$link"
-    fi
-  done
-  
-  ANT_HOME=`dirname "$PRG"`/..
-
-fi
-
-# Allow .antrc to specifiy flags to java cmd
-if [ "$JAVACMD" = "" ] ; then 
-  JAVACMD=java
-fi
-
-LOCALCLASSPATH=`echo $ANT_HOME/lib/*.jar | tr ' ' ':'`
-
-if [ "$CLASSPATH" != "" ] ; then
-  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
-fi
-
-if [ "$JAVA_HOME" != "" ] ; then
-  if test -f $JAVA_HOME/lib/tools.jar ; then
-    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
-  fi
-
-  if test -f $JAVA_HOME/lib/classes.zip ; then
-    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
-  fi
-else
-  echo "Warning: JAVA_HOME environment variable is not set."
-  echo "  If build fails because sun.* classes could not be found"
-  echo "  you will need to set the JAVA_HOME environment variable"
-  echo "  to the installation directory of java."
-fi
-
-# supply JIKESPATH to Ant as jikes.class.path
-if [ "$JIKESPATH" != "" ] ; then
-  if [ "$ANT_OPTS" != "" ] ; then
-    ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
-  else
-    ANT_OPTS=-Djikes.class.path=$JIKESPATH
-  fi
-fi
-
-$JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS org.apache.tools.ant.Main $@
-
diff --git a/tools/bin/ant.bat b/tools/bin/ant.bat
deleted file mode 100755
index 069a2ef..0000000
--- a/tools/bin/ant.bat
+++ /dev/null
@@ -1,48 +0,0 @@
-@echo off
-rem find ANT_HOME
-if not "%ANT_HOME%"=="" goto checkJava
-
-rem check for ant in Program Files on system drive
-if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
-set ANT_HOME=%SystemDrive%\Program Files\ant
-goto checkJava
-
-:checkSystemDrive
-rem check for ant in root directory of system drive
-if not exist "%SystemDrive%\ant" goto noAntHome
-set ANT_HOME=%SystemDrive%\ant
-goto checkJava
-
-:noAntHome
-echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
-goto end
-
-:checkJava
-if "%JAVACMD%" == "" set JAVACMD=java
-
-set LOCALCLASSPATH=%CLASSPATH%
-for %%i in (%ANT_HOME%\lib\*.jar) do call %ANT_HOME%\bin\lcp.bat %%i
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if exist %JAVA_HOME%\lib\tools.jar call %ANT_HOME%\bin\lcp.bat %JAVA_HOME%\lib\tools.jar
-if exist %JAVA_HOME%\lib\classes.zip call %ANT_HOME%\bin\lcp.bat %JAVA_HOME%\lib\classes.zip
-goto checkJikes
-
-:noJavaHome
-echo.
-echo Warning: JAVA_HOME environment variable is not set.
-echo   If build fails because sun.* classes could not be found
-echo   you will need to set the JAVA_HOME environment variable
-echo   to the installation directory of java.
-echo.
-
-:checkJikes
-set ANT_OPTS_RUN=%ANT_OPTS%
-if not "%JIKESPATH%" == "" set ANT_OPTS_RUN=%ANT_OPTS% -Djikes.class.path=%JIKESPATH%
-
-:runAnt
-%JAVACMD% -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS_RUN% org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
-
-:end
-set LOCALCLASSPATH=
-
diff --git a/tools/bin/antRun b/tools/bin/antRun
deleted file mode 100755
index f0a18f1..0000000
--- a/tools/bin/antRun
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec $CMD "$@"
diff --git a/tools/bin/antRun.bat b/tools/bin/antRun.bat
deleted file mode 100755
index fe0d1ce..0000000
--- a/tools/bin/antRun.bat
+++ /dev/null
@@ -1,18 +0,0 @@
-@echo off
-
-cd %1
-set ANT_RUN_CMD=%2
-shift
-shift
-
-set PARAMS=
-:loop
-if "%1" == "" goto runCommand
-set PARAMS=%PARAMS% %1
-shift
-goto loop
-
-:runCommand
-echo %ANT_RUN_CMD% %PARAMS%
-%ANT_RUN_CMD% %PARAMS%
-
diff --git a/tools/bin/lcp.bat b/tools/bin/lcp.bat
deleted file mode 100755
index 8feb0d0..0000000
--- a/tools/bin/lcp.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-set LOCALCLASSPATH=%LOCALCLASSPATH%;%1
-
diff --git a/tools/junit.jar b/tools/junit.jar
deleted file mode 100644
index 9ed239f..0000000
--- a/tools/junit.jar
+++ /dev/null
Binary files differ
diff --git a/tools/optional.jar b/tools/optional.jar
deleted file mode 100644
index cebb238..0000000
--- a/tools/optional.jar
+++ /dev/null
Binary files differ
diff --git a/tools/stylebook-1.0-b2.jar b/tools/stylebook-1.0-b2.jar
deleted file mode 100644
index 4e31e9c..0000000
--- a/tools/stylebook-1.0-b2.jar
+++ /dev/null
Binary files differ
diff --git a/tools/xalan.jar b/tools/xalan.jar
deleted file mode 100644
index f6827f6..0000000
--- a/tools/xalan.jar
+++ /dev/null
Binary files differ
diff --git a/tools/xerces.jar b/tools/xerces.jar
deleted file mode 100644
index 0766fd7..0000000
--- a/tools/xerces.jar
+++ /dev/null
Binary files differ